@powerhousedao/design-system 6.0.2-staging.8 → 6.1.0-dev.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/dist/{button-DIE3LLBZ.d.ts → button-49Walvwn.d.ts} +1 -1
- package/dist/{button-DIE3LLBZ.d.ts.map → button-49Walvwn.d.ts.map} +1 -1
- package/dist/{character-counter-BZ-4xC7Q.d.ts → character-counter-BcuG4STA.d.ts} +1 -1
- package/dist/{character-counter-BZ-4xC7Q.d.ts.map → character-counter-BcuG4STA.d.ts.map} +1 -1
- package/dist/{checkbox-base-Bh08IVG2.d.ts → checkbox-base-8xXJvAbj.d.ts} +1 -1
- package/dist/{checkbox-base-Bh08IVG2.d.ts.map → checkbox-base-8xXJvAbj.d.ts.map} +1 -1
- package/dist/{checkbox-BgS8z46p.d.ts → checkbox-dqrYEK5V.d.ts} +3 -3
- package/dist/{checkbox-BgS8z46p.d.ts.map → checkbox-dqrYEK5V.d.ts.map} +1 -1
- package/dist/{command-COqe4AfR.d.ts → command-BtOLY735.d.ts} +14 -14
- package/dist/{command-COqe4AfR.d.ts.map → command-BtOLY735.d.ts.map} +1 -1
- package/dist/connect/components/toast/toast.js +1 -1
- package/dist/connect/index.d.ts +345 -41
- package/dist/connect/index.d.ts.map +1 -1
- package/dist/connect/index.js +884 -345
- package/dist/connect/index.js.map +1 -1
- package/dist/{content-ZWaCzypo.d.ts → content-OpXUtrTe.d.ts} +2 -2
- package/dist/{content-ZWaCzypo.d.ts.map → content-OpXUtrTe.d.ts.map} +1 -1
- package/dist/{enum-field-7NPFL29j.d.ts → enum-field-BEyFQh8A.d.ts} +4 -4
- package/dist/{enum-field-7NPFL29j.d.ts.map → enum-field-BEyFQh8A.d.ts.map} +1 -1
- package/dist/{form-6Lmx7pU_.d.ts → form-B9JNvrH6.d.ts} +1 -1
- package/dist/{form-6Lmx7pU_.d.ts.map → form-B9JNvrH6.d.ts.map} +1 -1
- package/dist/{form-description-Bsurk7mm.d.ts → form-description-BpST5Ww-.d.ts} +1 -1
- package/dist/{form-description-Bsurk7mm.d.ts.map → form-description-BpST5Ww-.d.ts.map} +1 -1
- package/dist/{form-group-B092xF-f.d.ts → form-group-BauWlFkQ.d.ts} +1 -1
- package/dist/form-group-BauWlFkQ.d.ts.map +1 -0
- package/dist/{form-label-CURXUfpb.d.ts → form-label-Cz_gcj-B.d.ts} +1 -1
- package/dist/{form-label-CURXUfpb.d.ts.map → form-label-Cz_gcj-B.d.ts.map} +1 -1
- package/dist/{form-message-BeAVBzjc.d.ts → form-message-BPqNM4gG.d.ts} +1 -1
- package/dist/{form-message-BeAVBzjc.d.ts.map → form-message-BPqNM4gG.d.ts.map} +1 -1
- package/dist/{form-server-error-message-CbKMtocn.d.ts → form-server-error-message-CzMQQ8ru.d.ts} +1 -1
- package/dist/{form-server-error-message-CbKMtocn.d.ts.map → form-server-error-message-CzMQQ8ru.d.ts.map} +1 -1
- package/dist/{id-autocomplete-input-container-DefHskQg.d.ts → id-autocomplete-input-container-NIuWfCB_.d.ts} +2 -2
- package/dist/{id-autocomplete-input-container-DefHskQg.d.ts.map → id-autocomplete-input-container-NIuWfCB_.d.ts.map} +1 -1
- package/dist/{id-autocomplete-DGTfhFRw.d.ts → id-autocomplete-jkaREmPP.d.ts} +2 -2
- package/dist/{id-autocomplete-DGTfhFRw.d.ts.map → id-autocomplete-jkaREmPP.d.ts.map} +1 -1
- package/dist/{id-autocomplete-list-C5uiH5nJ.d.ts → id-autocomplete-list-Bi2IXdXg.d.ts} +2 -2
- package/dist/{id-autocomplete-list-C5uiH5nJ.d.ts.map → id-autocomplete-list-Bi2IXdXg.d.ts.map} +1 -1
- package/dist/{id-autocomplete-list-option-CyF3v8IB.d.ts → id-autocomplete-list-option-CA9HIqEh.d.ts} +2 -2
- package/dist/{id-autocomplete-list-option-CyF3v8IB.d.ts.map → id-autocomplete-list-option-CA9HIqEh.d.ts.map} +1 -1
- package/dist/{index-DoFR9kRM.d.ts → index-DtPJq-vz.d.ts} +1 -1
- package/dist/{index-DoFR9kRM.d.ts.map → index-DtPJq-vz.d.ts.map} +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/{input-BMf1G8BP.d.ts → input-D11GgWGm.d.ts} +1 -1
- package/dist/{input-BMf1G8BP.d.ts.map → input-D11GgWGm.d.ts.map} +1 -1
- package/dist/{json-viewer-DD7b-PP2.d.ts → json-viewer-vWp8vOvz.d.ts} +1 -1
- package/dist/{json-viewer-DD7b-PP2.d.ts.map → json-viewer-vWp8vOvz.d.ts.map} +1 -1
- package/dist/{message-list-DDi6OrSM.d.ts → message-list-aysvo-xf.d.ts} +2 -2
- package/dist/{message-list-DDi6OrSM.d.ts.map → message-list-aysvo-xf.d.ts.map} +1 -1
- package/dist/{popover-BXlVJZZW.d.ts → popover-glLRVxPS.d.ts} +1 -1
- package/dist/{popover-BXlVJZZW.d.ts.map → popover-glLRVxPS.d.ts.map} +1 -1
- package/dist/{radio-YzIhzpRk.d.ts → radio-DZ4xl9oz.d.ts} +1 -1
- package/dist/{radio-YzIhzpRk.d.ts.map → radio-DZ4xl9oz.d.ts.map} +1 -1
- package/dist/{radio-group-D2NSfihe.d.ts → radio-group-DjJbcDzB.d.ts} +1 -1
- package/dist/{radio-group-D2NSfihe.d.ts.map → radio-group-DjJbcDzB.d.ts.map} +1 -1
- package/dist/{radio-group-field-xAiLWNsq.d.ts → radio-group-field-C8MQjHb7.d.ts} +3 -3
- package/dist/{radio-group-field-xAiLWNsq.d.ts.map → radio-group-field-C8MQjHb7.d.ts.map} +1 -1
- package/dist/{search-autocomplete-CfSjqceY.d.ts → search-autocomplete-OeZbE-VN.d.ts} +2 -2
- package/dist/{search-autocomplete-CfSjqceY.d.ts.map → search-autocomplete-OeZbE-VN.d.ts.map} +1 -1
- package/dist/{select-field-U8KSDxbg.d.ts → select-field-BClhLm83.d.ts} +2 -2
- package/dist/{select-field-U8KSDxbg.d.ts.map → select-field-BClhLm83.d.ts.map} +1 -1
- package/dist/{selected-content-iwV6vmSI.d.ts → selected-content-q33DjCYy.d.ts} +2 -2
- package/dist/{selected-content-iwV6vmSI.d.ts.map → selected-content-q33DjCYy.d.ts.map} +1 -1
- package/dist/{splitted-input-diff-DSME-KaQ.d.ts → splitted-input-diff-Ch6IKdEa.d.ts} +2 -2
- package/dist/{splitted-input-diff-DSME-KaQ.d.ts.map → splitted-input-diff-Ch6IKdEa.d.ts.map} +1 -1
- package/dist/{src-DTHkTkyy.js → src-BgCjYazJ.js} +6 -6
- package/dist/{src-DTHkTkyy.js.map → src-BgCjYazJ.js.map} +1 -1
- package/dist/style.css +309 -200
- package/dist/{text-field-Cxpz1D2u.d.ts → text-field-Cx-EfZP6.d.ts} +3 -3
- package/dist/{text-field-Cxpz1D2u.d.ts.map → text-field-Cx-EfZP6.d.ts.map} +1 -1
- package/dist/{text-input-t0uGOMAO.d.ts → text-input-DUddj4-C.d.ts} +3 -3
- package/dist/{text-input-t0uGOMAO.d.ts.map → text-input-DUddj4-C.d.ts.map} +1 -1
- package/dist/{text-input-diff-bO84di00.d.ts → text-input-diff-4i2zuulO.d.ts} +2 -2
- package/dist/{text-input-diff-bO84di00.d.ts.map → text-input-diff-4i2zuulO.d.ts.map} +1 -1
- package/dist/{tooltip-Db1dLIxg.d.ts → tooltip-Cf5jSzdt.d.ts} +1 -1
- package/dist/{tooltip-Db1dLIxg.d.ts.map → tooltip-Cf5jSzdt.d.ts.map} +1 -1
- package/dist/{types-BDeBOEOj.d.ts → types-9JRQnd7a.d.ts} +1 -1
- package/dist/{types-BDeBOEOj.d.ts.map → types-9JRQnd7a.d.ts.map} +1 -1
- package/dist/{types-BzoMu6VB.d.ts → types-BfmDXMrz.d.ts} +1 -1
- package/dist/{types-BzoMu6VB.d.ts.map → types-BfmDXMrz.d.ts.map} +1 -1
- package/dist/{types-BLss8ZBX.d.ts → types-tThrTH_c.d.ts} +1 -1
- package/dist/{types-BLss8ZBX.d.ts.map → types-tThrTH_c.d.ts.map} +1 -1
- package/dist/ui/components/button/button.d.ts +1 -1
- package/dist/ui/components/button/button.js +4 -4
- package/dist/ui/components/button/button.js.map +1 -1
- package/dist/ui/components/character-counter/character-counter.d.ts +1 -1
- package/dist/ui/components/character-counter/character-counter.js +3 -3
- package/dist/ui/components/character-counter/character-counter.js.map +1 -1
- package/dist/ui/components/checkbox/checkbox-base.d.ts +1 -1
- package/dist/ui/components/checkbox/checkbox-base.js +2 -2
- package/dist/ui/components/checkbox/checkbox-base.js.map +1 -1
- package/dist/ui/components/checkbox/checkbox.d.ts +1 -1
- package/dist/ui/components/checkbox/checkbox.js +1 -1
- package/dist/ui/components/command/command.d.ts +1 -1
- package/dist/ui/components/command/command.js +7 -7
- package/dist/ui/components/command/command.js.map +1 -1
- package/dist/ui/components/enum-field/enum-field.d.ts +1 -1
- package/dist/ui/components/enum-field/types.d.ts +1 -1
- package/dist/ui/components/form/form.d.ts +1 -1
- package/dist/ui/components/form-description/form-description.d.ts +1 -1
- package/dist/ui/components/form-description/form-description.js +2 -2
- package/dist/ui/components/form-description/form-description.js.map +1 -1
- package/dist/ui/components/form-group/form-group.d.ts +1 -1
- package/dist/ui/components/form-label/form-label.d.ts +1 -1
- package/dist/ui/components/form-label/form-label.js +3 -3
- package/dist/ui/components/form-label/form-label.js.map +1 -1
- package/dist/ui/components/form-message/form-message.d.ts +1 -1
- package/dist/ui/components/form-message/form-message.js +1 -1
- package/dist/ui/components/form-message/form-server-error-message.d.ts +1 -1
- package/dist/ui/components/form-message/message-list.d.ts +1 -1
- package/dist/ui/components/form-message/message-list.js +2 -2
- package/dist/ui/components/form-message/message-list.js.map +1 -1
- package/dist/ui/components/id-autocomplete/id-autocomplete-input-container.d.ts +1 -1
- package/dist/ui/components/id-autocomplete/id-autocomplete-input-container.js +2 -2
- package/dist/ui/components/id-autocomplete/id-autocomplete-input-container.js.map +1 -1
- package/dist/ui/components/id-autocomplete/id-autocomplete-list-option.d.ts +1 -1
- package/dist/ui/components/id-autocomplete/id-autocomplete-list-option.js +9 -9
- package/dist/ui/components/id-autocomplete/id-autocomplete-list-option.js.map +1 -1
- package/dist/ui/components/id-autocomplete/id-autocomplete-list.d.ts +1 -1
- package/dist/ui/components/id-autocomplete/id-autocomplete-list.js +1 -1
- package/dist/ui/components/id-autocomplete/id-autocomplete.d.ts +1 -1
- package/dist/ui/components/id-autocomplete/id-autocomplete.js +2 -2
- package/dist/ui/components/id-autocomplete/id-autocomplete.js.map +1 -1
- package/dist/ui/components/id-autocomplete/types.d.ts +1 -1
- package/dist/ui/components/id-autocomplete/use-id-autocomplete.d.ts +1 -1
- package/dist/ui/components/index.d.ts +36 -36
- package/dist/ui/components/input/input.d.ts +1 -1
- package/dist/ui/components/input/input.js +1 -1
- package/dist/ui/components/input/input.js.map +1 -1
- package/dist/ui/components/input/splitted-input-diff.d.ts +1 -1
- package/dist/ui/components/input/splitted-input-diff.js +2 -2
- package/dist/ui/components/input/splitted-input-diff.js.map +1 -1
- package/dist/ui/components/input/subcomponent/input-diff.js +2 -2
- package/dist/ui/components/input/subcomponent/input-diff.js.map +1 -1
- package/dist/ui/components/input/subcomponent/text-diff.d.ts +1 -1
- package/dist/ui/components/input/subcomponent/text-diff.js +1 -1
- package/dist/ui/components/json-viewer/json-viewer.d.ts +1 -1
- package/dist/ui/components/popover/popover.d.ts +1 -1
- package/dist/ui/components/popover/popover.js +3 -3
- package/dist/ui/components/popover/popover.js.map +1 -1
- package/dist/ui/components/radio-group-field/radio-group-field.d.ts +1 -1
- package/dist/ui/components/radio-group-field/radio-group-field.js +1 -1
- package/dist/ui/components/radio-group-field/radio-group.d.ts +1 -1
- package/dist/ui/components/radio-group-field/radio.d.ts +1 -1
- package/dist/ui/components/radio-group-field/radio.js +2 -2
- package/dist/ui/components/radio-group-field/radio.js.map +1 -1
- package/dist/ui/components/search-autocomplete/index.d.ts +3 -3
- package/dist/ui/components/search-autocomplete/search-autocomplete.d.ts +1 -1
- package/dist/ui/components/search-autocomplete/search-autocomplete.js +1 -1
- package/dist/ui/components/search-autocomplete/types.d.ts +1 -1
- package/dist/ui/components/search-autocomplete/use-search-autocomplete.d.ts +1 -1
- package/dist/ui/components/select-field/content.d.ts +1 -1
- package/dist/ui/components/select-field/content.js +3 -3
- package/dist/ui/components/select-field/content.js.map +1 -1
- package/dist/ui/components/select-field/select-field.d.ts +1 -1
- package/dist/ui/components/select-field/select-field.js +2 -2
- package/dist/ui/components/select-field/select-field.js.map +1 -1
- package/dist/ui/components/select-field/selected-content.d.ts +1 -1
- package/dist/ui/components/select-field/selected-content.js +4 -4
- package/dist/ui/components/select-field/selected-content.js.map +1 -1
- package/dist/ui/components/select-field/subcomponents/CommandItemList.d.ts +1 -1
- package/dist/ui/components/select-field/subcomponents/CommandItemList.js +4 -4
- package/dist/ui/components/select-field/subcomponents/CommandItemList.js.map +1 -1
- package/dist/ui/components/select-field/use-select-field.d.ts +1 -1
- package/dist/ui/components/text-field/text-field.d.ts +1 -1
- package/dist/ui/components/text-input/text-input-diff.d.ts +1 -1
- package/dist/ui/components/text-input/text-input.d.ts +1 -1
- package/dist/ui/components/text-input/text-input.js +1 -1
- package/dist/ui/components/text-input/types.d.ts +1 -1
- package/dist/ui/components/tooltip/tooltip.d.ts +1 -1
- package/dist/ui/components/tooltip/tooltip.js +2 -2
- package/dist/ui/components/tooltip/tooltip.js.map +1 -1
- package/dist/ui/components/types.d.ts +1 -1
- package/dist/ui/components/value-transformer/value-transformer.d.ts +1 -1
- package/dist/ui/components/with-field-validation/with-field-validation.d.ts +1 -1
- package/dist/ui/components/with-field-validation/with-field-validation.js +5 -10
- package/dist/ui/components/with-field-validation/with-field-validation.js.map +1 -1
- package/dist/ui/index.d.ts +38 -38
- package/dist/ui/lib/date-picker.d.ts +1 -1
- package/dist/ui/lib/shared-value-transformers.d.ts +1 -1
- package/dist/ui/lib/types.d.ts +1 -1
- package/dist/ui/types.d.ts +2 -2
- package/dist/{use-id-autocomplete-BRzpIF4U.d.ts → use-id-autocomplete-BPHVmVE8.d.ts} +2 -2
- package/dist/{use-id-autocomplete-BRzpIF4U.d.ts.map → use-id-autocomplete-BPHVmVE8.d.ts.map} +1 -1
- package/dist/{use-search-autocomplete-ZLxfAC6X.d.ts → use-search-autocomplete-Xf7shCtk.d.ts} +2 -2
- package/dist/{use-search-autocomplete-ZLxfAC6X.d.ts.map → use-search-autocomplete-Xf7shCtk.d.ts.map} +1 -1
- package/dist/{value-transformer-MGhQTCdM.d.ts → value-transformer-DCiU65Qa.d.ts} +2 -2
- package/dist/{value-transformer-MGhQTCdM.d.ts.map → value-transformer-DCiU65Qa.d.ts.map} +1 -1
- package/dist/{with-field-validation-DWMigXJz.d.ts → with-field-validation-vt0l1Sp7.d.ts} +2 -2
- package/dist/{with-field-validation-DWMigXJz.d.ts.map → with-field-validation-vt0l1Sp7.d.ts.map} +1 -1
- package/package.json +11 -5
- package/theme.css +2 -2
- package/dist/document-timeline-BTTeXWMa.js +0 -288
- package/dist/document-timeline-BTTeXWMa.js.map +0 -1
- package/dist/form-group-B092xF-f.d.ts.map +0 -1
- /package/dist/{index-BN8Gwmlj.d.ts → index-CWsYGvaO.d.ts} +0 -0
- /package/dist/{index-Dw5cCt-A.d.ts → index-uQcTfU6c.d.ts} +0 -0
package/dist/connect/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { C as DropdownMenuTrigger, b as DropdownMenuContent, c as SidebarFooter, d as Pagination, f as mergeClassNameProps, g as getDimensions, h as Icon, l as SidebarHeader, m as Modal, p as PackageAnimation, r as usePagination, s as Sidebar, t as cn, u as SidebarPanel, w as PowerhouseButton, x as DropdownMenuItem, y as DropdownMenu } from "../src-DTHkTkyy.js";
|
|
1
|
+
import { C as DropdownMenuTrigger, b as DropdownMenuContent, c as SidebarFooter, d as Pagination, f as mergeClassNameProps, g as getDimensions, h as Icon, l as SidebarHeader, m as Modal, p as PackageAnimation, r as usePagination, s as Sidebar, t as cn, u as SidebarPanel, w as PowerhouseButton, x as DropdownMenuItem, y as DropdownMenu } from "../src-BgCjYazJ.js";
|
|
3
2
|
import { Popover, PopoverContent, PopoverTrigger } from "../ui/components/popover/popover.js";
|
|
4
3
|
import { SelectFieldRaw } from "../ui/components/select-field/select-field.js";
|
|
5
4
|
import { Input } from "../ui/components/input/input.js";
|
|
6
5
|
import { JsonViewer } from "../ui/components/json-viewer/json-viewer.js";
|
|
7
6
|
import { SearchAutocomplete } from "../ui/components/search-autocomplete/search-autocomplete.js";
|
|
8
|
-
import React, { Fragment,
|
|
7
|
+
import React, { Fragment, createElement, forwardRef, memo, useCallback, useEffect, useLayoutEffect, useMemo, useReducer, useRef, useState } from "react";
|
|
9
8
|
import { twJoin, twMerge } from "tailwind-merge";
|
|
10
9
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { Content, Portal, Provider, Root, Trigger } from "@radix-ui/react-tooltip";
|
|
11
11
|
import { Controller, useForm } from "react-hook-form";
|
|
12
|
-
import { Anchor, Content, Portal, Root, Trigger } from "@radix-ui/react-popover";
|
|
13
|
-
import { format } from "date-fns";
|
|
12
|
+
import { Anchor, Content as Content$1, Portal as Portal$1, Root as Root$1, Trigger as Trigger$1 } from "@radix-ui/react-popover";
|
|
13
|
+
import { format, formatDistanceToNow, parseISO } from "date-fns";
|
|
14
14
|
import { useCopyToClipboard, useDebounceValue, useEventListener, useOnClickOutside } from "usehooks-ts";
|
|
15
|
-
import { SyncOperationStatus, addFolder, getSyncStatusSync, setSelectedDrive, setSelectedNode,
|
|
15
|
+
import { SyncOperationStatus, addFolder, getSyncStatusSync, setSelectedDrive, setSelectedNode, showDeleteNodeModal, showPHModal, showRevisionHistory, useDocumentById, useDownloadDocument, useDragNode, useDropFile, useDropNode, useGetSwitchboardLink, useIsDragAndDropEnabled, useNodeActions, useNodeById, useNodeParentFolderById, useOnDropFile, useSelectedDocumentSafe, useSelectedDriveId, useSelectedDriveSafe, useSelectedNodePath, useUserPermissions } from "@powerhousedao/reactor-browser";
|
|
16
16
|
import Select, { components } from "react-select";
|
|
17
|
-
import { Content as Content$
|
|
17
|
+
import { Content as Content$2, List, Root as Root$2, Trigger as Trigger$2 } from "@radix-ui/react-tabs";
|
|
18
|
+
import { addProp, defaultTo, entries, filter, funnel, hasAtLeast, isArray, isDefined, isIncludedIn, isStrictEqual, isString, isTruthy, keys, map, pipe, prop, values } from "remeda";
|
|
18
19
|
import { garbageCollect, redo, sortOperations, undo } from "@powerhousedao/shared/document-model";
|
|
19
|
-
import { addProp, entries, funnel, isStrictEqual, isString, map, pipe } from "remeda";
|
|
20
20
|
import { JsonView } from "@uiw/react-json-view";
|
|
21
21
|
import { isValidName } from "@powerhousedao/shared/document-drive";
|
|
22
22
|
import { capitalCase } from "change-case";
|
|
@@ -74,6 +74,9 @@ function NodeInput(props) {
|
|
|
74
74
|
const { onSubmit, onCancel, defaultValue, className, minLength = 1, ...inputProps } = props;
|
|
75
75
|
const [value, setValue] = useState(defaultValue ?? "");
|
|
76
76
|
const ref = useRef(null);
|
|
77
|
+
function handleSubmit() {
|
|
78
|
+
if (value.length >= minLength) onSubmit(value);
|
|
79
|
+
}
|
|
77
80
|
useOnClickOutside(ref, handleSubmit);
|
|
78
81
|
useEventListener("keyup", (e) => {
|
|
79
82
|
if (e.key === "Enter") handleSubmit();
|
|
@@ -86,9 +89,6 @@ function NodeInput(props) {
|
|
|
86
89
|
ref.current?.scroll({ left: 9999 });
|
|
87
90
|
}, 100);
|
|
88
91
|
}, []);
|
|
89
|
-
function handleSubmit() {
|
|
90
|
-
if (value.length >= minLength) onSubmit(value);
|
|
91
|
-
}
|
|
92
92
|
return /* @__PURE__ */ jsx("input", {
|
|
93
93
|
...inputProps,
|
|
94
94
|
autoFocus: true,
|
|
@@ -397,7 +397,7 @@ function ConnectConfirmationModal(props) {
|
|
|
397
397
|
},
|
|
398
398
|
...restProps,
|
|
399
399
|
children: /* @__PURE__ */ jsxs("div", {
|
|
400
|
-
...mergeClassNameProps(containerProps, "w-[400px] p-6 text-slate-300"),
|
|
400
|
+
...mergeClassNameProps(containerProps, "w-[400px] bg-white p-6 text-slate-300"),
|
|
401
401
|
children: [
|
|
402
402
|
/* @__PURE__ */ jsx("div", {
|
|
403
403
|
...mergeClassNameProps(headerProps, "border-b border-slate-50 pb-2 text-2xl font-bold text-gray-800"),
|
|
@@ -437,7 +437,7 @@ function TreeItem({ label, depth, expanded, selected, hasChildren, icon, onToggl
|
|
|
437
437
|
onClick,
|
|
438
438
|
children: [
|
|
439
439
|
hasChildren ? /* @__PURE__ */ jsx("button", {
|
|
440
|
-
className: "flex
|
|
440
|
+
className: "flex size-4 shrink-0 items-center justify-center text-gray-500 hover:text-gray-700",
|
|
441
441
|
onClick: handleChevronClick,
|
|
442
442
|
type: "button",
|
|
443
443
|
children: /* @__PURE__ */ jsx(Icon, {
|
|
@@ -454,7 +454,7 @@ function TreeItem({ label, depth, expanded, selected, hasChildren, icon, onToggl
|
|
|
454
454
|
className: "min-w-0 flex-1 truncate text-gray-700",
|
|
455
455
|
children: label
|
|
456
456
|
}),
|
|
457
|
-
selected && /* @__PURE__ */ jsx("span", { className: "ml-auto
|
|
457
|
+
selected && /* @__PURE__ */ jsx("span", { className: "ml-auto size-2 shrink-0 rounded-full bg-blue-500" })
|
|
458
458
|
]
|
|
459
459
|
}), expanded && children] });
|
|
460
460
|
}
|
|
@@ -604,7 +604,7 @@ function ItemContainer(props) {
|
|
|
604
604
|
className: twMerge(disabled ? "cursor-not-allowed text-gray-500" : "text-gray-800", "flex size-full cursor-pointer items-center gap-2 bg-inherit py-3 pl-3 text-start outline-none", className),
|
|
605
605
|
onClick: onItemClick,
|
|
606
606
|
children: [icon, /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
|
|
607
|
-
className: "
|
|
607
|
+
className: "text-inherit capitalize",
|
|
608
608
|
children: displayValue ?? value.toLowerCase()
|
|
609
609
|
}), /* @__PURE__ */ jsx("p", {
|
|
610
610
|
className: "text-xs text-gray-600",
|
|
@@ -727,13 +727,13 @@ function FilterClauseComponent({ clause, columns, onUpdate, onRemove, showConnec
|
|
|
727
727
|
onChange: handleOperatorChange
|
|
728
728
|
}),
|
|
729
729
|
showValueInput && /* @__PURE__ */ jsx("input", {
|
|
730
|
-
className: "min-w-[150px] rounded border border-gray-300 bg-white px-2 py-1 text-xs text-gray-900",
|
|
730
|
+
className: "min-w-[150px] rounded-sm border border-gray-300 bg-white px-2 py-1 text-xs text-gray-900",
|
|
731
731
|
type: inputType,
|
|
732
732
|
value: clause.value,
|
|
733
733
|
onChange: (e) => handleValueChange(e.target.value)
|
|
734
734
|
}),
|
|
735
735
|
/* @__PURE__ */ jsx("button", {
|
|
736
|
-
className: "flex items-center justify-center rounded p-1 text-gray-500 hover:bg-gray-200 hover:text-gray-700",
|
|
736
|
+
className: "flex items-center justify-center rounded-sm p-1 text-gray-500 hover:bg-gray-200 hover:text-gray-700",
|
|
737
737
|
onClick: onRemove,
|
|
738
738
|
title: "Remove filter",
|
|
739
739
|
type: "button",
|
|
@@ -813,12 +813,12 @@ function FilterBar({ columns, filters, onFiltersChange }) {
|
|
|
813
813
|
}),
|
|
814
814
|
/* @__PURE__ */ jsx("span", { children: "Filters" }),
|
|
815
815
|
hasFilters && /* @__PURE__ */ jsx("span", {
|
|
816
|
-
className: "rounded bg-blue-100 px-1.5 py-0.5 text-xs text-blue-700",
|
|
816
|
+
className: "rounded-sm bg-blue-100 px-1.5 py-0.5 text-xs text-blue-700",
|
|
817
817
|
children: filters.clauses.length
|
|
818
818
|
})
|
|
819
819
|
]
|
|
820
820
|
}), /* @__PURE__ */ jsxs("button", {
|
|
821
|
-
className: "flex items-center gap-1 rounded border border-gray-300 bg-white px-2 py-1 text-xs text-gray-700 hover:bg-gray-100",
|
|
821
|
+
className: "flex items-center gap-1 rounded-sm border border-gray-300 bg-white px-2 py-1 text-xs text-gray-700 hover:bg-gray-100",
|
|
822
822
|
onClick: handleAddFilter,
|
|
823
823
|
type: "button",
|
|
824
824
|
children: [/* @__PURE__ */ jsx(Icon, {
|
|
@@ -943,7 +943,7 @@ function TableView({ columns, rows, pagination, onPageChange, onSort, currentSor
|
|
|
943
943
|
className: "text-gray-600",
|
|
944
944
|
children: loading ? "Loading..." : total !== null ? `Showing ${startItem.toLocaleString()}-${endItem.toLocaleString()} of ${total.toLocaleString()}` : `Showing ${rows.length.toLocaleString()} rows`
|
|
945
945
|
}), rows.length > 0 && /* @__PURE__ */ jsxs("button", {
|
|
946
|
-
className: "flex items-center gap-1 rounded border border-gray-300 bg-white px-2 py-1 text-xs text-gray-700 hover:bg-gray-100 disabled:cursor-not-allowed disabled:opacity-50",
|
|
946
|
+
className: "flex items-center gap-1 rounded-sm border border-gray-300 bg-white px-2 py-1 text-xs text-gray-700 hover:bg-gray-100 disabled:cursor-not-allowed disabled:opacity-50",
|
|
947
947
|
disabled: loading || copying,
|
|
948
948
|
onClick: handleCopyAll,
|
|
949
949
|
title: "Copy all rows as CSV",
|
|
@@ -957,14 +957,14 @@ function TableView({ columns, rows, pagination, onPageChange, onSort, currentSor
|
|
|
957
957
|
className: "flex gap-1",
|
|
958
958
|
children: [
|
|
959
959
|
/* @__PURE__ */ jsx("button", {
|
|
960
|
-
className: "rounded border border-gray-300 bg-white px-2 py-1 text-xs text-gray-700 hover:bg-gray-100 disabled:cursor-not-allowed disabled:opacity-50",
|
|
960
|
+
className: "rounded-sm border border-gray-300 bg-white px-2 py-1 text-xs text-gray-700 hover:bg-gray-100 disabled:cursor-not-allowed disabled:opacity-50",
|
|
961
961
|
disabled: currentPage === 0,
|
|
962
962
|
onClick: () => goToPage(0),
|
|
963
963
|
type: "button",
|
|
964
964
|
children: "First"
|
|
965
965
|
}),
|
|
966
966
|
/* @__PURE__ */ jsx("button", {
|
|
967
|
-
className: "rounded border border-gray-300 bg-white px-2 py-1 text-xs text-gray-700 hover:bg-gray-100 disabled:cursor-not-allowed disabled:opacity-50",
|
|
967
|
+
className: "rounded-sm border border-gray-300 bg-white px-2 py-1 text-xs text-gray-700 hover:bg-gray-100 disabled:cursor-not-allowed disabled:opacity-50",
|
|
968
968
|
disabled: currentPage === 0,
|
|
969
969
|
onClick: () => goToPage(currentPage - 1),
|
|
970
970
|
type: "button",
|
|
@@ -979,7 +979,7 @@ function TableView({ columns, rows, pagination, onPageChange, onSort, currentSor
|
|
|
979
979
|
children: "..."
|
|
980
980
|
}),
|
|
981
981
|
visiblePages.map((page) => /* @__PURE__ */ jsx("button", {
|
|
982
|
-
className: twMerge("min-w-8 rounded border px-2 py-1 text-xs", page === currentPage ? "border-blue-500 bg-blue-50 text-blue-700" : "border-gray-300 bg-white text-gray-700 hover:bg-gray-100"),
|
|
982
|
+
className: twMerge("min-w-8 rounded-sm border px-2 py-1 text-xs", page === currentPage ? "border-blue-500 bg-blue-50 text-blue-700" : "border-gray-300 bg-white text-gray-700 hover:bg-gray-100"),
|
|
983
983
|
onClick: () => goToPage(page),
|
|
984
984
|
type: "button",
|
|
985
985
|
children: page + 1
|
|
@@ -989,7 +989,7 @@ function TableView({ columns, rows, pagination, onPageChange, onSort, currentSor
|
|
|
989
989
|
children: "..."
|
|
990
990
|
}),
|
|
991
991
|
/* @__PURE__ */ jsx("button", {
|
|
992
|
-
className: "rounded border border-gray-300 bg-white px-2 py-1 text-xs text-gray-700 hover:bg-gray-100 disabled:cursor-not-allowed disabled:opacity-50",
|
|
992
|
+
className: "rounded-sm border border-gray-300 bg-white px-2 py-1 text-xs text-gray-700 hover:bg-gray-100 disabled:cursor-not-allowed disabled:opacity-50",
|
|
993
993
|
disabled: currentPage >= totalPages - 1,
|
|
994
994
|
onClick: () => goToPage(currentPage + 1),
|
|
995
995
|
type: "button",
|
|
@@ -1000,7 +1000,7 @@ function TableView({ columns, rows, pagination, onPageChange, onSort, currentSor
|
|
|
1000
1000
|
})
|
|
1001
1001
|
}),
|
|
1002
1002
|
/* @__PURE__ */ jsx("button", {
|
|
1003
|
-
className: "rounded border border-gray-300 bg-white px-2 py-1 text-xs text-gray-700 hover:bg-gray-100 disabled:cursor-not-allowed disabled:opacity-50",
|
|
1003
|
+
className: "rounded-sm border border-gray-300 bg-white px-2 py-1 text-xs text-gray-700 hover:bg-gray-100 disabled:cursor-not-allowed disabled:opacity-50",
|
|
1004
1004
|
disabled: currentPage >= totalPages - 1,
|
|
1005
1005
|
onClick: () => goToPage(totalPages - 1),
|
|
1006
1006
|
type: "button",
|
|
@@ -1016,7 +1016,7 @@ function TableView({ columns, rows, pagination, onPageChange, onSort, currentSor
|
|
|
1016
1016
|
children: [/* @__PURE__ */ jsx("thead", {
|
|
1017
1017
|
className: "sticky top-0 bg-gray-100",
|
|
1018
1018
|
children: /* @__PURE__ */ jsxs("tr", { children: [/* @__PURE__ */ jsx("th", {
|
|
1019
|
-
className: "w-12
|
|
1019
|
+
className: "w-12 p-2 text-center text-xs font-medium text-gray-600",
|
|
1020
1020
|
children: /* @__PURE__ */ jsx("span", {
|
|
1021
1021
|
className: "sr-only",
|
|
1022
1022
|
children: "Copy"
|
|
@@ -1046,9 +1046,9 @@ function TableView({ columns, rows, pagination, onPageChange, onSort, currentSor
|
|
|
1046
1046
|
}) }) : rows.map((row, rowIndex) => /* @__PURE__ */ jsxs("tr", {
|
|
1047
1047
|
className: "odd:bg-white even:bg-gray-50 hover:bg-blue-50",
|
|
1048
1048
|
children: [/* @__PURE__ */ jsx("td", {
|
|
1049
|
-
className: "
|
|
1049
|
+
className: "p-2 text-center",
|
|
1050
1050
|
children: /* @__PURE__ */ jsx("button", {
|
|
1051
|
-
className: "flex items-center justify-center rounded p-1 text-gray-500 hover:bg-gray-200 hover:text-gray-700",
|
|
1051
|
+
className: "flex items-center justify-center rounded-sm p-1 text-gray-500 hover:bg-gray-200 hover:text-gray-700",
|
|
1052
1052
|
onClick: () => void handleCopyRow(rowIndex),
|
|
1053
1053
|
title: "Copy row as CSV",
|
|
1054
1054
|
type: "button",
|
|
@@ -1060,7 +1060,7 @@ function TableView({ columns, rows, pagination, onPageChange, onSort, currentSor
|
|
|
1060
1060
|
}), columns.map((column, colIndex) => /* @__PURE__ */ jsx("td", {
|
|
1061
1061
|
className: twMerge("px-3 py-2 text-xs text-gray-900", colIndex > 0 && "border-l border-gray-300"),
|
|
1062
1062
|
children: /* @__PURE__ */ jsx("span", {
|
|
1063
|
-
className: twMerge("block truncate", row[column.name] === null && "
|
|
1063
|
+
className: twMerge("block truncate", row[column.name] === null && "text-gray-400 italic"),
|
|
1064
1064
|
title: formatCellValue(row[column.name]),
|
|
1065
1065
|
children: formatCellValue(row[column.name])
|
|
1066
1066
|
})
|
|
@@ -1278,13 +1278,13 @@ function DBExplorer({ schema, getTables, getTableRows, getDefaultSort, pageSize
|
|
|
1278
1278
|
className: "flex shrink-0 flex-col gap-2 border-t border-gray-200 p-2",
|
|
1279
1279
|
children: [
|
|
1280
1280
|
onImportDb && /* @__PURE__ */ jsx("button", {
|
|
1281
|
-
className: "rounded border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-100",
|
|
1281
|
+
className: "rounded-sm border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-100",
|
|
1282
1282
|
onClick: handleImportClick,
|
|
1283
1283
|
type: "button",
|
|
1284
1284
|
children: "Import DB"
|
|
1285
1285
|
}),
|
|
1286
1286
|
onExportDb && /* @__PURE__ */ jsx("button", {
|
|
1287
|
-
className: "rounded border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-100",
|
|
1287
|
+
className: "rounded-sm border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-100",
|
|
1288
1288
|
onClick: handleExportClick,
|
|
1289
1289
|
type: "button",
|
|
1290
1290
|
children: "Export DB"
|
|
@@ -1298,7 +1298,7 @@ function DBExplorer({ schema, getTables, getTableRows, getDefaultSort, pageSize
|
|
|
1298
1298
|
children: pgVersionControl.currentPgVersion === null ? "—" : `PG${pgVersionControl.currentPgVersion}`
|
|
1299
1299
|
})]
|
|
1300
1300
|
}), resetTargetMajor !== null && /* @__PURE__ */ jsx("button", {
|
|
1301
|
-
className: "rounded border border-red-300 bg-red-50 px-3 py-1.5 text-sm text-red-700 hover:bg-red-100 disabled:opacity-50",
|
|
1301
|
+
className: "rounded-sm border border-red-300 bg-red-50 px-3 py-1.5 text-sm text-red-700 hover:bg-red-100 disabled:opacity-50",
|
|
1302
1302
|
onClick: () => setPendingResetMajor(resetTargetMajor),
|
|
1303
1303
|
disabled: resetting,
|
|
1304
1304
|
type: "button",
|
|
@@ -1372,7 +1372,7 @@ function DebugInspector({ supportedPgVersions, currentPgVersion, onResetToPgVers
|
|
|
1372
1372
|
children: "Kill the reactor, delete the local IndexedDB, initialize a fresh Postgres cluster at the chosen major version, then reload. Useful for testing version-detection and migration flows."
|
|
1373
1373
|
}),
|
|
1374
1374
|
/* @__PURE__ */ jsxs("div", {
|
|
1375
|
-
className: "mt-2 inline-flex items-center gap-2 rounded bg-gray-100 px-3 py-1 text-sm",
|
|
1375
|
+
className: "mt-2 inline-flex items-center gap-2 rounded-sm bg-gray-100 px-3 py-1 text-sm",
|
|
1376
1376
|
children: [/* @__PURE__ */ jsx("span", {
|
|
1377
1377
|
className: "text-gray-600",
|
|
1378
1378
|
children: "Current version:"
|
|
@@ -1389,13 +1389,13 @@ function DebugInspector({ supportedPgVersions, currentPgVersion, onResetToPgVers
|
|
|
1389
1389
|
type: "button",
|
|
1390
1390
|
disabled: running,
|
|
1391
1391
|
onClick: () => setConfirmMajor(major),
|
|
1392
|
-
className: "flex items-center gap-1 rounded border border-red-300 bg-red-50 px-3 py-1.5 text-sm text-red-700 hover:bg-red-100 disabled:opacity-50",
|
|
1392
|
+
className: "flex items-center gap-1 rounded-sm border border-red-300 bg-red-50 px-3 py-1.5 text-sm text-red-700 hover:bg-red-100 disabled:opacity-50",
|
|
1393
1393
|
children: pendingMajor === major && running ? `Resetting to PG${major}…` : `Reset to PG${major}`
|
|
1394
1394
|
}, major);
|
|
1395
1395
|
})
|
|
1396
1396
|
}),
|
|
1397
1397
|
confirmMajor !== null && /* @__PURE__ */ jsxs("div", {
|
|
1398
|
-
className: "flex shrink-0 items-center gap-3 rounded border border-yellow-400 bg-yellow-50 px-3 py-2",
|
|
1398
|
+
className: "flex shrink-0 items-center gap-3 rounded-sm border border-yellow-400 bg-yellow-50 px-3 py-2",
|
|
1399
1399
|
children: [
|
|
1400
1400
|
/* @__PURE__ */ jsxs("span", {
|
|
1401
1401
|
className: "text-sm text-yellow-900",
|
|
@@ -1408,19 +1408,19 @@ function DebugInspector({ supportedPgVersions, currentPgVersion, onResetToPgVers
|
|
|
1408
1408
|
/* @__PURE__ */ jsxs("button", {
|
|
1409
1409
|
type: "button",
|
|
1410
1410
|
onClick: () => handleReset(confirmMajor),
|
|
1411
|
-
className: "rounded bg-yellow-600 px-3 py-1 text-sm text-white hover:bg-yellow-700",
|
|
1411
|
+
className: "rounded-sm bg-yellow-600 px-3 py-1 text-sm text-white hover:bg-yellow-700",
|
|
1412
1412
|
children: ["Confirm reset to PG", confirmMajor]
|
|
1413
1413
|
}),
|
|
1414
1414
|
/* @__PURE__ */ jsx("button", {
|
|
1415
1415
|
type: "button",
|
|
1416
1416
|
onClick: () => setConfirmMajor(null),
|
|
1417
|
-
className: "rounded border border-gray-300 bg-white px-3 py-1 text-sm text-gray-600 hover:bg-gray-50",
|
|
1417
|
+
className: "rounded-sm border border-gray-300 bg-white px-3 py-1 text-sm text-gray-600 hover:bg-gray-50",
|
|
1418
1418
|
children: "Cancel"
|
|
1419
1419
|
})
|
|
1420
1420
|
]
|
|
1421
1421
|
}),
|
|
1422
1422
|
error && /* @__PURE__ */ jsx("div", {
|
|
1423
|
-
className: "rounded border border-red-300 bg-red-50 px-3 py-2 text-sm text-red-800",
|
|
1423
|
+
className: "rounded-sm border border-red-300 bg-red-50 px-3 py-2 text-sm text-red-800",
|
|
1424
1424
|
children: error
|
|
1425
1425
|
})
|
|
1426
1426
|
]
|
|
@@ -1485,7 +1485,7 @@ function TabContent(props) {
|
|
|
1485
1485
|
//#endregion
|
|
1486
1486
|
//#region src/connect/components/tabs/tabs.tsx
|
|
1487
1487
|
function Tabs({ children, defaultValue }) {
|
|
1488
|
-
return /* @__PURE__ */ jsxs(Root$
|
|
1488
|
+
return /* @__PURE__ */ jsxs(Root$2, {
|
|
1489
1489
|
defaultValue,
|
|
1490
1490
|
className: "flex min-h-0 flex-1 flex-col gap-2",
|
|
1491
1491
|
children: [/* @__PURE__ */ jsx("div", {
|
|
@@ -1495,8 +1495,8 @@ function Tabs({ children, defaultValue }) {
|
|
|
1495
1495
|
children: React.Children.map(children, (child, i) => {
|
|
1496
1496
|
if (!/* @__PURE__ */ React.isValidElement(child)) return;
|
|
1497
1497
|
const { label, disabled } = child.props;
|
|
1498
|
-
return /* @__PURE__ */ jsx(Trigger$
|
|
1499
|
-
className: "
|
|
1498
|
+
return /* @__PURE__ */ jsx(Trigger$2, {
|
|
1499
|
+
className: "flex h-7 flex-1 items-center justify-center rounded-lg transition duration-300 data-disabled:cursor-not-allowed data-disabled:text-gray-400 data-[state='active']:bg-gray-50 data-[state='active']:text-gray-900",
|
|
1500
1500
|
value: label,
|
|
1501
1501
|
disabled: disabled ?? false,
|
|
1502
1502
|
children: label
|
|
@@ -1508,7 +1508,7 @@ function Tabs({ children, defaultValue }) {
|
|
|
1508
1508
|
children: React.Children.map(children, (child, i) => {
|
|
1509
1509
|
if (!/* @__PURE__ */ React.isValidElement(child)) return;
|
|
1510
1510
|
const { label } = child.props;
|
|
1511
|
-
return /* @__PURE__ */ jsx(Content$
|
|
1511
|
+
return /* @__PURE__ */ jsx(Content$2, {
|
|
1512
1512
|
className: "h-full",
|
|
1513
1513
|
value: label,
|
|
1514
1514
|
children: child
|
|
@@ -1543,204 +1543,743 @@ function DocumentStateViewer({ state, ignoredScopes = ["auth", "document"], defa
|
|
|
1543
1543
|
});
|
|
1544
1544
|
}
|
|
1545
1545
|
//#endregion
|
|
1546
|
-
//#region src/connect/components/
|
|
1547
|
-
function
|
|
1548
|
-
const
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1546
|
+
//#region src/connect/components/tooltip/tooltip.tsx
|
|
1547
|
+
function ConnectTooltip(props) {
|
|
1548
|
+
const { children, content, open, defaultOpen, onOpenChange, className, side = "top", sideOffset = 5, delayDuration, ...rest } = props;
|
|
1549
|
+
return /* @__PURE__ */ jsxs(Root, {
|
|
1550
|
+
defaultOpen,
|
|
1551
|
+
delayDuration,
|
|
1552
|
+
onOpenChange,
|
|
1553
|
+
open,
|
|
1554
|
+
children: [/* @__PURE__ */ jsx(Trigger, {
|
|
1555
|
+
asChild: true,
|
|
1556
|
+
children
|
|
1557
|
+
}), /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(Content, {
|
|
1558
|
+
...rest,
|
|
1559
|
+
side,
|
|
1560
|
+
sideOffset,
|
|
1561
|
+
className: twMerge("z-50 rounded-lg border border-gray-200 bg-white p-2 text-xs shadow-tooltip", className),
|
|
1562
|
+
children: content
|
|
1563
|
+
}) })]
|
|
1564
|
+
});
|
|
1565
|
+
}
|
|
1566
|
+
const ConnectTooltipProvider = Provider;
|
|
1567
|
+
//#endregion
|
|
1568
|
+
//#region src/connect/components/document-timeline/components/h-divider.tsx
|
|
1569
|
+
const HDivider = (props) => {
|
|
1570
|
+
const { className, timestampUtcMs: timestamp, title, subtitle, onClick, isSelected = false } = props;
|
|
1571
|
+
const [open, setOpen] = useState(false);
|
|
1572
|
+
const hasContent = !!title || !!subtitle || !!timestamp;
|
|
1573
|
+
useEffect(() => {
|
|
1574
|
+
if (open) {
|
|
1575
|
+
setOpen(false);
|
|
1576
|
+
setTimeout(() => hasContent && setOpen(true), 50);
|
|
1577
|
+
}
|
|
1578
|
+
}, [
|
|
1579
|
+
title,
|
|
1580
|
+
subtitle,
|
|
1581
|
+
timestamp,
|
|
1582
|
+
hasContent
|
|
1583
|
+
]);
|
|
1584
|
+
const formatTimestamp = (isoString) => {
|
|
1585
|
+
if (!isoString) return "";
|
|
1586
|
+
try {
|
|
1587
|
+
return formatDistanceToNow(new Date(isoString), { addSuffix: true });
|
|
1588
|
+
} catch {
|
|
1589
|
+
return isoString;
|
|
1590
|
+
}
|
|
1591
|
+
};
|
|
1592
|
+
const tooltipContent = /* @__PURE__ */ jsxs("div", {
|
|
1593
|
+
className: "flex flex-col text-xs",
|
|
1594
|
+
children: [
|
|
1595
|
+
!!title && /* @__PURE__ */ jsx("div", { children: title }),
|
|
1596
|
+
!!subtitle && /* @__PURE__ */ jsx("div", {
|
|
1597
|
+
className: "text-gray-300",
|
|
1598
|
+
children: subtitle
|
|
1599
|
+
}),
|
|
1600
|
+
!!timestamp && /* @__PURE__ */ jsx("div", { children: formatTimestamp(timestamp) })
|
|
1601
|
+
]
|
|
1602
|
+
});
|
|
1603
|
+
const handleMouseEnter = () => {
|
|
1604
|
+
if (hasContent) setOpen(true);
|
|
1555
1605
|
};
|
|
1556
|
-
const
|
|
1557
|
-
|
|
1606
|
+
const handleMouseLeave = () => {
|
|
1607
|
+
setOpen(false);
|
|
1558
1608
|
};
|
|
1609
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1610
|
+
className: "relative",
|
|
1611
|
+
onMouseEnter: handleMouseEnter,
|
|
1612
|
+
onMouseLeave: handleMouseLeave,
|
|
1613
|
+
children: [isSelected && /* @__PURE__ */ jsx(Icon, {
|
|
1614
|
+
name: "TimelineCaret",
|
|
1615
|
+
color: "#4EA9FF",
|
|
1616
|
+
size: 10,
|
|
1617
|
+
className: "absolute top-[-11px] z-40"
|
|
1618
|
+
}), /* @__PURE__ */ jsx(ConnectTooltip, {
|
|
1619
|
+
className: "rounded-md bg-gray-900 text-white",
|
|
1620
|
+
content: tooltipContent,
|
|
1621
|
+
open: open && hasContent,
|
|
1622
|
+
onOpenChange: setOpen,
|
|
1623
|
+
delayDuration: 0,
|
|
1624
|
+
side: "bottom",
|
|
1625
|
+
sideOffset: 5,
|
|
1626
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
1627
|
+
className: twMerge("mx-0.5 flex h-6.25 w-1.5 cursor-pointer flex-col items-center justify-center rounded-xs hover:bg-blue-300", isSelected && "bg-blue-300", className),
|
|
1628
|
+
onClick,
|
|
1629
|
+
"data-title": title,
|
|
1630
|
+
"data-subtitle": subtitle,
|
|
1631
|
+
"data-timestamp": timestamp,
|
|
1632
|
+
children: /* @__PURE__ */ jsx("div", { className: "h-0.5 w-1 rounded-full bg-gray-500" })
|
|
1633
|
+
})
|
|
1634
|
+
})]
|
|
1635
|
+
});
|
|
1636
|
+
};
|
|
1637
|
+
//#endregion
|
|
1638
|
+
//#region src/connect/components/document-timeline/components/timeline-bar.tsx
|
|
1639
|
+
const getBarHeight = (size = 0) => {
|
|
1640
|
+
switch (true) {
|
|
1641
|
+
case size <= 0: return "h-[1px]";
|
|
1642
|
+
case size === 1: return "h-[3px]";
|
|
1643
|
+
case size === 2: return "h-[6px]";
|
|
1644
|
+
case size === 3: return "h-[9px]";
|
|
1645
|
+
case size >= 4: return "h-[12px]";
|
|
1646
|
+
default: return "h-[1px]";
|
|
1647
|
+
}
|
|
1648
|
+
};
|
|
1649
|
+
const formatTimestamp$1 = (isoString) => {
|
|
1650
|
+
if (!isoString) return "";
|
|
1651
|
+
try {
|
|
1652
|
+
return format(parseISO(isoString), "HH:mm, dd, MMMM");
|
|
1653
|
+
} catch {
|
|
1654
|
+
return isoString;
|
|
1655
|
+
}
|
|
1656
|
+
};
|
|
1657
|
+
const TimelineBar = ({ onClick, className, timestampUtcMs: timestamp, additions, deletions, addSize = 0, delSize = 0, isSelected = false }) => {
|
|
1658
|
+
const [open, setOpen] = useState(false);
|
|
1659
|
+
const noChanges = addSize === 0 && delSize === 0;
|
|
1660
|
+
const addBarHeight = getBarHeight(addSize);
|
|
1661
|
+
const delBarHeight = getBarHeight(delSize);
|
|
1662
|
+
const tooltipContent = /* @__PURE__ */ jsxs("div", {
|
|
1663
|
+
className: "flex flex-col text-xs",
|
|
1664
|
+
children: [
|
|
1665
|
+
/* @__PURE__ */ jsx("div", { children: formatTimestamp$1(timestamp) }),
|
|
1666
|
+
/* @__PURE__ */ jsx("div", {
|
|
1667
|
+
className: "text-green-900",
|
|
1668
|
+
children: `${additions} additions +`
|
|
1669
|
+
}),
|
|
1670
|
+
/* @__PURE__ */ jsx("div", {
|
|
1671
|
+
className: "text-red-700",
|
|
1672
|
+
children: `${deletions} deletions -`
|
|
1673
|
+
})
|
|
1674
|
+
]
|
|
1675
|
+
});
|
|
1676
|
+
const handleMouseEnter = () => {
|
|
1677
|
+
if (!noChanges) setOpen(true);
|
|
1678
|
+
};
|
|
1679
|
+
const handleMouseLeave = () => {
|
|
1680
|
+
setOpen(false);
|
|
1681
|
+
};
|
|
1682
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
1683
|
+
className: "relative",
|
|
1684
|
+
onMouseEnter: handleMouseEnter,
|
|
1685
|
+
onMouseLeave: handleMouseLeave,
|
|
1686
|
+
children: [isSelected && /* @__PURE__ */ jsx(Icon, {
|
|
1687
|
+
name: "TimelineCaret",
|
|
1688
|
+
color: "#4EA9FF",
|
|
1689
|
+
size: 10,
|
|
1690
|
+
className: "absolute top-[-11px] left-[-2px] z-40"
|
|
1691
|
+
}), noChanges ? /* @__PURE__ */ jsx("div", {
|
|
1692
|
+
className: twMerge("flex h-[25px] w-1.5 cursor-pointer flex-col items-center justify-center rounded-[2px] hover:bg-blue-300", className),
|
|
1693
|
+
"data-timestamp": timestamp,
|
|
1694
|
+
onClick,
|
|
1695
|
+
children: /* @__PURE__ */ jsx("div", { className: "size-[3px] rounded-full bg-gray-500" })
|
|
1696
|
+
}) : /* @__PURE__ */ jsx(ConnectTooltip, {
|
|
1697
|
+
className: "rounded-md bg-gray-900 text-white",
|
|
1698
|
+
content: tooltipContent,
|
|
1699
|
+
open,
|
|
1700
|
+
onOpenChange: setOpen,
|
|
1701
|
+
delayDuration: 0,
|
|
1702
|
+
side: "bottom",
|
|
1703
|
+
sideOffset: 5,
|
|
1704
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
1705
|
+
className: twMerge("flex h-[25px] w-1.5 cursor-pointer flex-col items-center justify-center rounded-[2px] hover:bg-blue-300", className, isSelected && "bg-blue-300"),
|
|
1706
|
+
"data-timestamp": timestamp,
|
|
1707
|
+
onClick,
|
|
1708
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
1709
|
+
className: "flex h-3 w-0.5 items-end",
|
|
1710
|
+
children: /* @__PURE__ */ jsx("div", { className: twMerge("h-3 w-0.5 rounded-t-full bg-green-600", addBarHeight) })
|
|
1711
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
1712
|
+
className: "flex h-3 w-0.5 items-start",
|
|
1713
|
+
children: /* @__PURE__ */ jsx("div", { className: twMerge("h-3 w-0.5 rounded-b-full bg-red-600", delBarHeight) })
|
|
1714
|
+
})]
|
|
1715
|
+
})
|
|
1716
|
+
})]
|
|
1717
|
+
});
|
|
1718
|
+
};
|
|
1719
|
+
//#endregion
|
|
1720
|
+
//#region src/connect/components/document-timeline/document-timeline.tsx
|
|
1721
|
+
const defaultTimeLineItem = {
|
|
1722
|
+
id: "default",
|
|
1723
|
+
type: "bar",
|
|
1724
|
+
addSize: 0,
|
|
1725
|
+
delSize: 0
|
|
1726
|
+
};
|
|
1727
|
+
const DocumentTimeline = (props) => {
|
|
1728
|
+
const { timeline = [], onItemClick } = props;
|
|
1729
|
+
const [selectedItem, setSelectedItem] = useState(null);
|
|
1730
|
+
const scrollContainerRef = useRef(null);
|
|
1731
|
+
const handleClick = (item) => {
|
|
1732
|
+
if (item.id === selectedItem || item.id === defaultTimeLineItem.id) {
|
|
1733
|
+
onItemClick?.(null);
|
|
1734
|
+
setSelectedItem(null);
|
|
1735
|
+
} else {
|
|
1736
|
+
onItemClick?.(item);
|
|
1737
|
+
setSelectedItem(item.id);
|
|
1738
|
+
}
|
|
1739
|
+
};
|
|
1740
|
+
const mergedTimelineItems = [...timeline, defaultTimeLineItem];
|
|
1741
|
+
const [unselectedItems, selectedItems] = useMemo(() => {
|
|
1742
|
+
const indexSelected = mergedTimelineItems.findIndex((item) => item.id === selectedItem);
|
|
1743
|
+
return indexSelected === -1 ? [mergedTimelineItems, []] : [mergedTimelineItems.slice(0, indexSelected), mergedTimelineItems.slice(indexSelected)];
|
|
1744
|
+
}, [mergedTimelineItems, selectedItem]);
|
|
1745
|
+
const renderTimelineItems = useCallback((items) => {
|
|
1746
|
+
return items.map((item) => {
|
|
1747
|
+
if (item.type === "divider") {
|
|
1748
|
+
const { timestampUtcMs, title, subtitle } = item;
|
|
1749
|
+
return /* @__PURE__ */ jsx(HDivider, {
|
|
1750
|
+
timestampUtcMs,
|
|
1751
|
+
title,
|
|
1752
|
+
subtitle,
|
|
1753
|
+
onClick: () => handleClick(item),
|
|
1754
|
+
isSelected: item.id === selectedItem
|
|
1755
|
+
}, item.id);
|
|
1756
|
+
}
|
|
1757
|
+
return /* @__PURE__ */ jsx(TimelineBar, {
|
|
1758
|
+
timestampUtcMs: item.timestampUtcMs,
|
|
1759
|
+
addSize: item.addSize,
|
|
1760
|
+
delSize: item.delSize,
|
|
1761
|
+
additions: item.additions,
|
|
1762
|
+
deletions: item.deletions,
|
|
1763
|
+
isSelected: item.id === selectedItem,
|
|
1764
|
+
onClick: () => handleClick(item)
|
|
1765
|
+
}, item.id);
|
|
1766
|
+
});
|
|
1767
|
+
}, [handleClick, selectedItem]);
|
|
1768
|
+
const unselectedContent = useMemo(() => renderTimelineItems(unselectedItems), [unselectedItems, renderTimelineItems]);
|
|
1769
|
+
const selectedContent = useMemo(() => renderTimelineItems(selectedItems), [selectedItems, renderTimelineItems]);
|
|
1770
|
+
useEffect(() => {
|
|
1771
|
+
if (scrollContainerRef.current) scrollContainerRef.current.scrollLeft = scrollContainerRef.current.scrollWidth;
|
|
1772
|
+
}, []);
|
|
1773
|
+
return /* @__PURE__ */ jsx(ConnectTooltipProvider, {
|
|
1774
|
+
delayDuration: 0,
|
|
1775
|
+
skipDelayDuration: 0,
|
|
1776
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
1777
|
+
className: "relative h-[36px] w-full",
|
|
1778
|
+
children: [
|
|
1779
|
+
/* @__PURE__ */ jsx("div", {
|
|
1780
|
+
className: "absolute left-0 z-20 h-[17px] w-[6px] bg-white",
|
|
1781
|
+
children: /* @__PURE__ */ jsx("div", { className: "mt-[11px] h-[6px] w-[6px] rounded-tl-md bg-slate-50" })
|
|
1782
|
+
}),
|
|
1783
|
+
/* @__PURE__ */ jsx("div", {
|
|
1784
|
+
className: "absolute top-[11px] right-0 z-20 h-[6px] w-[6px] bg-white",
|
|
1785
|
+
children: /* @__PURE__ */ jsx("div", { className: "h-[6px] w-[6px] rounded-tr-md bg-slate-50" })
|
|
1786
|
+
}),
|
|
1787
|
+
/* @__PURE__ */ jsx("div", { className: "absolute inset-x-0 bottom-0 h-[25px] rounded-md bg-slate-50" }),
|
|
1788
|
+
/* @__PURE__ */ jsx("div", {
|
|
1789
|
+
className: "absolute inset-x-0 bottom-0 h-[36px]",
|
|
1790
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
1791
|
+
ref: scrollContainerRef,
|
|
1792
|
+
className: "h-full overflow-x-auto rounded-md",
|
|
1793
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
1794
|
+
className: "ml-auto flex h-[36px] w-max items-end px-2 pb-0",
|
|
1795
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
1796
|
+
className: "flex",
|
|
1797
|
+
children: unselectedContent
|
|
1798
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
1799
|
+
className: "flex rounded-sm bg-blue-200",
|
|
1800
|
+
children: selectedContent
|
|
1801
|
+
})]
|
|
1802
|
+
})
|
|
1803
|
+
})
|
|
1804
|
+
}),
|
|
1805
|
+
/* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute bottom-0 left-0 z-10 h-[25px] w-2 rounded-l-md bg-slate-50" }),
|
|
1806
|
+
/* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute right-0 bottom-0 z-10 h-[25px] w-2 rounded-r-md bg-slate-50" })
|
|
1807
|
+
]
|
|
1808
|
+
})
|
|
1809
|
+
});
|
|
1810
|
+
};
|
|
1811
|
+
//#endregion
|
|
1812
|
+
//#region src/connect/components/document-toolbar/containers.tsx
|
|
1813
|
+
/**
|
|
1814
|
+
* Default outer container for `DocumentToolbar`.
|
|
1815
|
+
*
|
|
1816
|
+
* This component provides the toolbar's base layout and visual styling while
|
|
1817
|
+
* still accepting standard `div` props. Pass a custom container to
|
|
1818
|
+
* `DocumentToolbar` when you need to replace this wrapper.
|
|
1819
|
+
*/
|
|
1820
|
+
function ToolbarContainer(props) {
|
|
1821
|
+
const { children, className, ...rest } = props;
|
|
1822
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1823
|
+
...rest,
|
|
1824
|
+
className: twMerge("flex h-12 w-full items-center justify-between rounded-xl border border-gray-200 bg-slate-50 px-4", className),
|
|
1825
|
+
children
|
|
1826
|
+
});
|
|
1827
|
+
}
|
|
1828
|
+
/**
|
|
1829
|
+
* Default container for a group of toolbar controls.
|
|
1830
|
+
*
|
|
1831
|
+
* `DocumentToolbar` renders one controls container per toolbar slot. This
|
|
1832
|
+
* component provides the default horizontal layout for the controls in that
|
|
1833
|
+
* slot while still accepting standard `div` props.
|
|
1834
|
+
*/
|
|
1835
|
+
function ToolbarControlsContainer(props) {
|
|
1836
|
+
const { children, className, ...rest } = props;
|
|
1837
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1838
|
+
className: twMerge("flex items-center gap-x-2", className),
|
|
1839
|
+
...rest,
|
|
1840
|
+
children
|
|
1841
|
+
});
|
|
1842
|
+
}
|
|
1843
|
+
//#endregion
|
|
1844
|
+
//#region src/connect/components/document-toolbar/use-document-undo-redo.ts
|
|
1845
|
+
/**
|
|
1846
|
+
* Checks whether a document has at least one non-zero revision count.
|
|
1847
|
+
*
|
|
1848
|
+
* Revision scopes are dynamic document-model keys, so this checks the values of
|
|
1849
|
+
* the document's revision object instead of relying on a fixed list of scope
|
|
1850
|
+
* names.
|
|
1851
|
+
*/
|
|
1852
|
+
function hasRevisions(document) {
|
|
1853
|
+
return pipe(prop(document, "header", "revision"), defaultTo({}), values(), filter(isTruthy), hasAtLeast(1));
|
|
1854
|
+
}
|
|
1855
|
+
/**
|
|
1856
|
+
* Returns undo state and an undo dispatcher for a document.
|
|
1857
|
+
*
|
|
1858
|
+
* `canUndo` is true when the document has at least one non-zero revision count
|
|
1859
|
+
* across any revision scope.
|
|
1860
|
+
*/
|
|
1861
|
+
function useUndo(documentId) {
|
|
1862
|
+
const [document, dispatch] = useDocumentById(documentId);
|
|
1863
|
+
return {
|
|
1864
|
+
canUndo: hasRevisions(document),
|
|
1865
|
+
undo: () => dispatch(undo())
|
|
1866
|
+
};
|
|
1867
|
+
}
|
|
1868
|
+
/**
|
|
1869
|
+
* Returns redo state and a redo dispatcher for a document.
|
|
1870
|
+
*
|
|
1871
|
+
* `canRedo` is true when the document clipboard contains at least one operation
|
|
1872
|
+
* that can be reapplied.
|
|
1873
|
+
*/
|
|
1874
|
+
function useRedo(documentId) {
|
|
1875
|
+
const [document, dispatch] = useDocumentById(documentId);
|
|
1559
1876
|
return {
|
|
1560
|
-
|
|
1561
|
-
redo:
|
|
1562
|
-
canUndo,
|
|
1563
|
-
canRedo
|
|
1877
|
+
canRedo: hasAtLeast(document?.clipboard ?? [], 1),
|
|
1878
|
+
redo: () => dispatch(redo())
|
|
1564
1879
|
};
|
|
1565
1880
|
}
|
|
1566
1881
|
//#endregion
|
|
1567
|
-
//#region src/connect/components/document-toolbar/
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1882
|
+
//#region src/connect/components/document-toolbar/toolbar-button.tsx
|
|
1883
|
+
/**
|
|
1884
|
+
* Base button component used by the built-in toolbar controls.
|
|
1885
|
+
*
|
|
1886
|
+
* This component provides the default toolbar button styling and disabled-state
|
|
1887
|
+
* behavior while accepting standard `button` props.
|
|
1888
|
+
*/
|
|
1889
|
+
function ToolbarButton(props) {
|
|
1890
|
+
const { className, children, disabled, ...rest } = props;
|
|
1891
|
+
return /* @__PURE__ */ jsx("button", {
|
|
1892
|
+
...rest,
|
|
1893
|
+
disabled,
|
|
1894
|
+
className: twMerge("grid size-fit place-items-center rounded-lg border border-gray-200 bg-white p-1 text-gray-900", disabled ? "cursor-not-allowed text-gray-500" : "cursor-pointer active:opacity-70", className),
|
|
1895
|
+
children
|
|
1896
|
+
});
|
|
1571
1897
|
}
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
const document =
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
const
|
|
1585
|
-
const
|
|
1586
|
-
const
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1898
|
+
/**
|
|
1899
|
+
* Toolbar control for undoing the latest document revision.
|
|
1900
|
+
*
|
|
1901
|
+
* The button is disabled when there are no revisions available to undo.
|
|
1902
|
+
* Provide `children` to replace the default icon, or `onClick` to override the
|
|
1903
|
+
* default undo behavior.
|
|
1904
|
+
*/
|
|
1905
|
+
function ToolbarUndoButton(props) {
|
|
1906
|
+
const { className, onClick: onClickOverride, document, children = /* @__PURE__ */ jsx(Icon, {
|
|
1907
|
+
name: "ArrowCouterclockwise",
|
|
1908
|
+
size: 16
|
|
1909
|
+
}) } = props;
|
|
1910
|
+
const { undo, canUndo } = useUndo(document?.header.id);
|
|
1911
|
+
const disabled = !canUndo;
|
|
1912
|
+
const onClick = makeOnClick(document, onClickOverride, undo);
|
|
1913
|
+
return /* @__PURE__ */ jsx(ToolbarButton, {
|
|
1914
|
+
"data-testid": "toolbar-undo-button",
|
|
1915
|
+
"aria-label": "Undo",
|
|
1916
|
+
className,
|
|
1917
|
+
disabled,
|
|
1918
|
+
onClick,
|
|
1919
|
+
children
|
|
1920
|
+
});
|
|
1921
|
+
}
|
|
1922
|
+
/**
|
|
1923
|
+
* Toolbar control for redoing the latest undone document revision.
|
|
1924
|
+
*
|
|
1925
|
+
* The button is disabled when there are no revisions available to redo.
|
|
1926
|
+
* Provide `children` to replace the default icon, or `onClick` to override the
|
|
1927
|
+
* default redo behavior.
|
|
1928
|
+
*/
|
|
1929
|
+
function ToolbarRedoButton(props) {
|
|
1930
|
+
const { className, onClick: onClickOverride, document, children = /* @__PURE__ */ jsx(Icon, {
|
|
1931
|
+
name: "ArrowCouterclockwise",
|
|
1932
|
+
className: "-scale-x-100",
|
|
1933
|
+
size: 16
|
|
1934
|
+
}) } = props;
|
|
1935
|
+
const { redo, canRedo } = useRedo(document?.header.id);
|
|
1936
|
+
const onClick = makeOnClick(document, onClickOverride, redo);
|
|
1937
|
+
const disabled = !canRedo;
|
|
1938
|
+
return /* @__PURE__ */ jsx(ToolbarButton, {
|
|
1939
|
+
"data-testid": "toolbar-redo-button",
|
|
1940
|
+
"aria-label": "Redo",
|
|
1941
|
+
className,
|
|
1942
|
+
disabled,
|
|
1943
|
+
onClick,
|
|
1944
|
+
children
|
|
1945
|
+
});
|
|
1946
|
+
}
|
|
1947
|
+
/**
|
|
1948
|
+
* Toolbar control for downloading the current document.
|
|
1949
|
+
*
|
|
1950
|
+
* Provide `children` to replace the default label, or `onClick` to override the
|
|
1951
|
+
* default download behavior.
|
|
1952
|
+
*/
|
|
1953
|
+
function ToolbarDownloadButton(props) {
|
|
1954
|
+
const { className, onClick: onClickOverride, document, children = /* @__PURE__ */ jsx("span", {
|
|
1955
|
+
className: "px-1 text-xs",
|
|
1956
|
+
children: "Download"
|
|
1957
|
+
}) } = props;
|
|
1958
|
+
const onClick = makeOnClick(document, onClickOverride, useDownloadDocument(document?.header.id));
|
|
1959
|
+
return /* @__PURE__ */ jsx(ToolbarButton, {
|
|
1960
|
+
"data-testid": "toolbar-download-button",
|
|
1961
|
+
"aria-label": "Download",
|
|
1962
|
+
className,
|
|
1963
|
+
onClick,
|
|
1964
|
+
children
|
|
1965
|
+
});
|
|
1966
|
+
}
|
|
1967
|
+
/**
|
|
1968
|
+
* Toolbar control for opening the current document in Switchboard.
|
|
1969
|
+
*
|
|
1970
|
+
* Provide `children` to replace the default icon, or `onClick` to override the
|
|
1971
|
+
* default behavior.
|
|
1972
|
+
*/
|
|
1973
|
+
function ToolbarSwitchboardButton(props) {
|
|
1974
|
+
const { className, onClick: onClickOverride, document, children = /* @__PURE__ */ jsx(Icon, {
|
|
1975
|
+
name: "Drive",
|
|
1976
|
+
size: 16
|
|
1977
|
+
}) } = props;
|
|
1592
1978
|
const getSwitchboardLink = useGetSwitchboardLink(document);
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1979
|
+
const onClick = makeOnClick(document, onClickOverride, () => {
|
|
1980
|
+
getSwitchboardLink?.().then((url) => window.open(url, "_blank")).catch((error) => console.error("Error opening switchboard link:", error));
|
|
1981
|
+
});
|
|
1982
|
+
return /* @__PURE__ */ jsx(ToolbarButton, {
|
|
1983
|
+
"data-testid": "toolbar-switchboard-button",
|
|
1984
|
+
"aria-label": "Open link in Switchboard",
|
|
1985
|
+
className,
|
|
1986
|
+
onClick,
|
|
1987
|
+
children
|
|
1988
|
+
});
|
|
1989
|
+
}
|
|
1990
|
+
/**
|
|
1991
|
+
* Toolbar control for showing the current document's revision history.
|
|
1992
|
+
*
|
|
1993
|
+
* Provide `children` to replace the default icon, or `onClick` to override the
|
|
1994
|
+
* default revision-history behavior.
|
|
1995
|
+
*/
|
|
1996
|
+
function ToolbarHistoryButton(props) {
|
|
1997
|
+
const { className, onClick: onClickOverride, document, children = /* @__PURE__ */ jsx(Icon, {
|
|
1998
|
+
name: "History",
|
|
1999
|
+
size: 16
|
|
2000
|
+
}) } = props;
|
|
2001
|
+
const onClick = makeOnClick(document, onClickOverride, showRevisionHistory);
|
|
2002
|
+
return /* @__PURE__ */ jsx(ToolbarButton, {
|
|
2003
|
+
"data-testid": "toolbar-history-button",
|
|
2004
|
+
"aria-label": "Open document revision history",
|
|
2005
|
+
className,
|
|
2006
|
+
onClick,
|
|
2007
|
+
children
|
|
2008
|
+
});
|
|
2009
|
+
}
|
|
2010
|
+
/**
|
|
2011
|
+
* Toolbar control for closing the current document view.
|
|
2012
|
+
*
|
|
2013
|
+
* By default, this selects the current document's parent folder. Provide
|
|
2014
|
+
* `children` to replace the default icon, or `onClick` to override the default
|
|
2015
|
+
* close behavior.
|
|
2016
|
+
*/
|
|
2017
|
+
function ToolbarCloseButton(props) {
|
|
2018
|
+
const { className, onClick: onClickOverride, document, children = /* @__PURE__ */ jsx(Icon, {
|
|
2019
|
+
name: "XmarkLight",
|
|
2020
|
+
size: 16
|
|
2021
|
+
}) } = props;
|
|
2022
|
+
const parentFolder = useNodeParentFolderById(document?.header.id);
|
|
2023
|
+
const onClick = makeOnClick(document, onClickOverride, () => setSelectedNode(parentFolder));
|
|
2024
|
+
return /* @__PURE__ */ jsx(ToolbarButton, {
|
|
2025
|
+
"data-testid": "toolbar-close-button",
|
|
2026
|
+
"aria-label": "Close document",
|
|
2027
|
+
className,
|
|
2028
|
+
onClick,
|
|
2029
|
+
children
|
|
2030
|
+
});
|
|
2031
|
+
}
|
|
2032
|
+
/**
|
|
2033
|
+
* Creates a toolbar button click handler.
|
|
2034
|
+
*
|
|
2035
|
+
* If an override is provided, it is called with the current document. Otherwise,
|
|
2036
|
+
* the built-in handler is called with the current document.
|
|
2037
|
+
*/
|
|
2038
|
+
function makeOnClick(document, onClickOverride, defaultOnClick) {
|
|
2039
|
+
if (isDefined(onClickOverride)) return () => onClickOverride(document);
|
|
2040
|
+
return () => defaultOnClick(document);
|
|
2041
|
+
}
|
|
2042
|
+
//#endregion
|
|
2043
|
+
//#region src/connect/components/document-toolbar/toolbar-input.tsx
|
|
2044
|
+
/**
|
|
2045
|
+
* Text input styled for use inside a toolbar.
|
|
2046
|
+
*
|
|
2047
|
+
* This wraps `NodeInput` with toolbar-specific text styling. Use it for inline
|
|
2048
|
+
* toolbar editing flows where the user can submit a value or cancel editing.
|
|
2049
|
+
*/
|
|
2050
|
+
function ToolbarInput(props) {
|
|
2051
|
+
const { defaultValue, className, onSubmit, onCancel, "aria-label": ariaLabel } = props;
|
|
2052
|
+
return /* @__PURE__ */ jsx(NodeInput, {
|
|
2053
|
+
defaultValue,
|
|
2054
|
+
className: twMerge("text-center text-sm font-medium text-gray-500", className),
|
|
2055
|
+
"aria-label": ariaLabel,
|
|
2056
|
+
onCancel,
|
|
2057
|
+
onSubmit
|
|
2058
|
+
});
|
|
2059
|
+
}
|
|
2060
|
+
//#endregion
|
|
2061
|
+
//#region src/connect/components/document-toolbar/toolbar-name.tsx
|
|
2062
|
+
/**
|
|
2063
|
+
* Toolbar control for displaying and renaming the current document.
|
|
2064
|
+
*
|
|
2065
|
+
* By default, the component renders the document name as a clickable heading.
|
|
2066
|
+
* When clicked, it switches to an inline input. Submitting the input renames
|
|
2067
|
+
* both the node and the corresponding drive node entry.
|
|
2068
|
+
*/
|
|
2069
|
+
function ToolbarName(props) {
|
|
2070
|
+
const { document, inputClassName, titleClassName } = props;
|
|
2071
|
+
const [isEditing, setIsEditing] = useState(false);
|
|
2072
|
+
const node = useNodeById(document?.header.id);
|
|
2073
|
+
const { onRenameNode, onRenameDriveNodes } = useNodeActions();
|
|
2074
|
+
const documentName = document?.header.name;
|
|
2075
|
+
const documentId = document?.header.id;
|
|
2076
|
+
const activateEditing = () => setIsEditing(true);
|
|
2077
|
+
const cancelEditing = () => setIsEditing(false);
|
|
2078
|
+
const onSubmit = (newName) => {
|
|
2079
|
+
cancelEditing();
|
|
2080
|
+
if (!documentId || !node) return;
|
|
2081
|
+
Promise.all([onRenameNode(newName, node), onRenameDriveNodes(newName, documentId)]).catch(console.error);
|
|
1604
2082
|
};
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
2083
|
+
if (!documentName) return null;
|
|
2084
|
+
if (isEditing) return /* @__PURE__ */ jsx(ToolbarInput, {
|
|
2085
|
+
className: inputClassName,
|
|
2086
|
+
onSubmit,
|
|
2087
|
+
onCancel: cancelEditing,
|
|
2088
|
+
defaultValue: documentName,
|
|
2089
|
+
"aria-label": "Document name"
|
|
2090
|
+
});
|
|
2091
|
+
return /* @__PURE__ */ jsx("h1", {
|
|
2092
|
+
className: twMerge("cursor-pointer text-sm font-medium text-gray-500 hover:text-gray-700", titleClassName),
|
|
2093
|
+
onClick: activateEditing,
|
|
2094
|
+
title: "Click to edit",
|
|
2095
|
+
children: documentName
|
|
2096
|
+
});
|
|
2097
|
+
}
|
|
2098
|
+
//#endregion
|
|
2099
|
+
//#region src/connect/components/document-toolbar/constants.ts
|
|
2100
|
+
/**
|
|
2101
|
+
* Default slot layout for the built-in document toolbar controls.
|
|
2102
|
+
*
|
|
2103
|
+
* The toolbar is divided into three control groups:
|
|
2104
|
+
*
|
|
2105
|
+
* - `first`: primary document actions.
|
|
2106
|
+
* - `second`: document identity/display controls.
|
|
2107
|
+
* - `third`: secondary document actions.
|
|
2108
|
+
*/
|
|
2109
|
+
const defaultControlSlots = {
|
|
2110
|
+
first: [
|
|
2111
|
+
"undo",
|
|
2112
|
+
"redo",
|
|
2113
|
+
"download"
|
|
2114
|
+
],
|
|
2115
|
+
second: ["name"],
|
|
2116
|
+
third: [
|
|
2117
|
+
"history",
|
|
2118
|
+
"switchboard",
|
|
2119
|
+
"close"
|
|
2120
|
+
]
|
|
2121
|
+
};
|
|
2122
|
+
/**
|
|
2123
|
+
* Ordered list of toolbar slot names.
|
|
2124
|
+
*/
|
|
2125
|
+
const controlSlots = keys(defaultControlSlots);
|
|
2126
|
+
/**
|
|
2127
|
+
* Ordered list of all built-in document toolbar control names.
|
|
2128
|
+
*
|
|
2129
|
+
* The order is derived from `defaultControlSlots`.
|
|
2130
|
+
*/
|
|
2131
|
+
const documentToolbarControls = [
|
|
2132
|
+
...defaultControlSlots.first,
|
|
2133
|
+
...defaultControlSlots.second,
|
|
2134
|
+
...defaultControlSlots.third
|
|
2135
|
+
];
|
|
2136
|
+
/**
|
|
2137
|
+
* Default component implementation for each built-in toolbar control.
|
|
2138
|
+
*
|
|
2139
|
+
* These components are used unless a matching entry is provided through
|
|
2140
|
+
* `componentOverrides`.
|
|
2141
|
+
*/
|
|
2142
|
+
const defaultControlComponents = {
|
|
2143
|
+
undo: ToolbarUndoButton,
|
|
2144
|
+
redo: ToolbarRedoButton,
|
|
2145
|
+
download: ToolbarDownloadButton,
|
|
2146
|
+
name: ToolbarName,
|
|
2147
|
+
switchboard: ToolbarSwitchboardButton,
|
|
2148
|
+
history: ToolbarHistoryButton,
|
|
2149
|
+
close: ToolbarCloseButton
|
|
2150
|
+
};
|
|
2151
|
+
//#endregion
|
|
2152
|
+
//#region src/connect/components/document-toolbar/utils.tsx
|
|
2153
|
+
/**
|
|
2154
|
+
* Creates a predicate for checking whether a built-in toolbar control should render.
|
|
2155
|
+
*
|
|
2156
|
+
* A control renders when it is included in `enabledControls` and absent from
|
|
2157
|
+
* `disabledControls`. When `enabledControls` is omitted, all built-in controls
|
|
2158
|
+
* are considered enabled. When a control appears in both lists,
|
|
2159
|
+
* `disabledControls` takes precedence.
|
|
2160
|
+
*/
|
|
2161
|
+
function makeIsEnabledChecker(args) {
|
|
2162
|
+
const { enabledControls = documentToolbarControls, disabledControls = [] } = args;
|
|
2163
|
+
return (control) => isIncludedIn(control, enabledControls) && !isIncludedIn(control, disabledControls);
|
|
2164
|
+
}
|
|
2165
|
+
/**
|
|
2166
|
+
* Creates a getter for rendering the built-in toolbar controls in a slot.
|
|
2167
|
+
*
|
|
2168
|
+
* The returned function resolves the controls assigned to a slot, filters them
|
|
2169
|
+
* through the enabled/disabled control lists, applies any component overrides,
|
|
2170
|
+
* and renders each control with the current document.
|
|
2171
|
+
*/
|
|
2172
|
+
function makeToolbarControlsRenderer(args) {
|
|
2173
|
+
const { document, enabledControls, disabledControls, componentOverrides } = args;
|
|
2174
|
+
const checkIsEnabled = makeIsEnabledChecker({
|
|
2175
|
+
enabledControls,
|
|
2176
|
+
disabledControls
|
|
2177
|
+
});
|
|
2178
|
+
const renderComponent = (control) => pipe(prop(componentOverrides, control), defaultTo(prop(defaultControlComponents, control)), (Component) => /* @__PURE__ */ jsx(Component, { document }, control));
|
|
2179
|
+
return (slot) => pipe(prop(defaultControlSlots, slot), filter(checkIsEnabled), map(renderComponent));
|
|
2180
|
+
}
|
|
2181
|
+
/**
|
|
2182
|
+
* Checks whether a custom control should render in the requested position.
|
|
2183
|
+
*
|
|
2184
|
+
* Controls without an explicit position are treated as `"start"`.
|
|
2185
|
+
*/
|
|
2186
|
+
function isControlInPosition(control, position) {
|
|
2187
|
+
return defaultTo(control.position, "start") === position;
|
|
2188
|
+
}
|
|
2189
|
+
/**
|
|
2190
|
+
* Creates a getter for rendering custom controls in a slot and position.
|
|
2191
|
+
*
|
|
2192
|
+
* The returned function resolves the custom control or controls assigned to a
|
|
2193
|
+
* slot, then renders only the controls that belong in the requested position.
|
|
2194
|
+
*/
|
|
2195
|
+
function makeCustomControlsRenderer(args) {
|
|
2196
|
+
const { document, customControls = {} } = args;
|
|
2197
|
+
return (slot, pos) => {
|
|
2198
|
+
const controlOrControlList = prop(customControls, slot);
|
|
2199
|
+
if (!isDefined(controlOrControlList)) return null;
|
|
2200
|
+
if (isArray(controlOrControlList)) return renderCustomControlList(controlOrControlList, pos, document);
|
|
2201
|
+
return renderCustomControl(controlOrControlList, pos, document);
|
|
1615
2202
|
};
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
2203
|
+
}
|
|
2204
|
+
/**
|
|
2205
|
+
* Renders a single custom control when it belongs in the requested position.
|
|
2206
|
+
*/
|
|
2207
|
+
function renderCustomControl(control, pos, document) {
|
|
2208
|
+
if (!isControlInPosition(control, pos)) return null;
|
|
2209
|
+
const Component = control.component;
|
|
2210
|
+
return /* @__PURE__ */ jsx(Component, { document });
|
|
2211
|
+
}
|
|
2212
|
+
/**
|
|
2213
|
+
* Renders a list of custom controls for the requested position.
|
|
2214
|
+
*
|
|
2215
|
+
* Returns `null` when no controls in the list belong in that position.
|
|
2216
|
+
*/
|
|
2217
|
+
function renderCustomControlList(controls, pos, document) {
|
|
2218
|
+
const controlsInPosition = filter(controls, (control) => isControlInPosition(control, pos));
|
|
2219
|
+
if (!hasAtLeast(controlsInPosition, 1)) return null;
|
|
2220
|
+
return /* @__PURE__ */ jsx(Fragment$1, { children: map(controlsInPosition, ({ component: Component, key }) => /* @__PURE__ */ jsx(Component, { document }, key)) });
|
|
2221
|
+
}
|
|
2222
|
+
//#endregion
|
|
2223
|
+
//#region src/connect/components/document-toolbar/document-toolbar.tsx
|
|
2224
|
+
/**
|
|
2225
|
+
* Renders a document toolbar.
|
|
2226
|
+
*
|
|
2227
|
+
* By default, the toolbar renders the built-in document controls grouped into
|
|
2228
|
+
* toolbar slots. The controls operate on the provided `document`, or on the
|
|
2229
|
+
* currently selected document when no document is provided.
|
|
2230
|
+
*
|
|
2231
|
+
* Use `enabledControls` and `disabledControls` to control which built-in
|
|
2232
|
+
* controls are shown. Use `componentOverrides` to replace individual built-in
|
|
2233
|
+
* controls while keeping the default toolbar layout. Use `customControls` to
|
|
2234
|
+
* insert additional controls before or after the built-in controls in a slot.
|
|
2235
|
+
*
|
|
2236
|
+
* To take over the toolbar contents completely, pass `children`.
|
|
2237
|
+
*/
|
|
2238
|
+
function DocumentToolbar(props) {
|
|
2239
|
+
const [selectedDocument] = useSelectedDocumentSafe();
|
|
2240
|
+
const { toolbarClassName, document = selectedDocument, toolbarContainer: Container = ToolbarContainer } = props;
|
|
2241
|
+
if ("children" in props) return /* @__PURE__ */ jsx(Container, {
|
|
2242
|
+
className: toolbarClassName,
|
|
2243
|
+
children: props.children
|
|
2244
|
+
});
|
|
2245
|
+
return /* @__PURE__ */ jsx(Container, {
|
|
2246
|
+
className: toolbarClassName,
|
|
2247
|
+
children: map(controlSlots, (slot) => /* @__PURE__ */ createElement(ControlsContainerSlot, {
|
|
2248
|
+
...props,
|
|
2249
|
+
document,
|
|
2250
|
+
slot,
|
|
2251
|
+
key: slot
|
|
2252
|
+
}))
|
|
2253
|
+
});
|
|
2254
|
+
}
|
|
2255
|
+
/**
|
|
2256
|
+
* Renders one toolbar controls slot.
|
|
2257
|
+
*
|
|
2258
|
+
* Custom controls with position `"start"` are rendered before the built-in
|
|
2259
|
+
* controls for the slot. Custom controls with position `"end"` are rendered
|
|
2260
|
+
* after them.
|
|
2261
|
+
*/
|
|
2262
|
+
function ControlsContainerSlot(props) {
|
|
2263
|
+
const { slot, document, controlsContainerClassName, enabledControls, disabledControls, componentOverrides, customControls, controlsContainer: ControlsContainer = ToolbarControlsContainer } = props;
|
|
2264
|
+
const renderToolbarControls = makeToolbarControlsRenderer({
|
|
2265
|
+
document,
|
|
2266
|
+
enabledControls,
|
|
2267
|
+
disabledControls,
|
|
2268
|
+
componentOverrides
|
|
2269
|
+
});
|
|
2270
|
+
const renderCustomControls = makeCustomControlsRenderer({
|
|
2271
|
+
document,
|
|
2272
|
+
customControls
|
|
2273
|
+
});
|
|
2274
|
+
return /* @__PURE__ */ jsxs(ControlsContainer, {
|
|
2275
|
+
className: controlsContainerClassName,
|
|
1619
2276
|
children: [
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
/* @__PURE__ */ jsxs("div", {
|
|
1624
|
-
className: "flex items-center gap-x-2",
|
|
1625
|
-
children: [
|
|
1626
|
-
enabledControls.includes("undo") && /* @__PURE__ */ jsx("button", {
|
|
1627
|
-
className: twMerge("grid size-8 place-items-center rounded-lg border border-gray-200 bg-white", isUndoDisabled ? "cursor-not-allowed" : "cursor-pointer active:opacity-70"),
|
|
1628
|
-
onClick: documentUndoRedo.undo,
|
|
1629
|
-
disabled: isUndoDisabled,
|
|
1630
|
-
children: /* @__PURE__ */ jsx(Icon, {
|
|
1631
|
-
name: "ArrowCouterclockwise",
|
|
1632
|
-
size: 16,
|
|
1633
|
-
className: isUndoDisabled ? "text-gray-500" : "text-gray-900"
|
|
1634
|
-
})
|
|
1635
|
-
}),
|
|
1636
|
-
enabledControls.includes("redo") && /* @__PURE__ */ jsx("button", {
|
|
1637
|
-
className: twMerge("grid size-8 place-items-center rounded-lg border border-gray-200 bg-white", isRedoDisabled ? "cursor-not-allowed" : "cursor-pointer active:opacity-70"),
|
|
1638
|
-
onClick: documentUndoRedo.redo,
|
|
1639
|
-
disabled: isRedoDisabled,
|
|
1640
|
-
children: /* @__PURE__ */ jsx("div", {
|
|
1641
|
-
className: "-scale-x-100",
|
|
1642
|
-
children: /* @__PURE__ */ jsx(Icon, {
|
|
1643
|
-
name: "ArrowCouterclockwise",
|
|
1644
|
-
size: 16,
|
|
1645
|
-
className: isRedoDisabled ? "text-gray-500" : "text-gray-900"
|
|
1646
|
-
})
|
|
1647
|
-
})
|
|
1648
|
-
}),
|
|
1649
|
-
enabledControls.includes("export") && /* @__PURE__ */ jsx("button", {
|
|
1650
|
-
className: twMerge("flex h-8 items-center rounded-lg border border-gray-200 bg-white px-3 text-sm", isDownloadDisabled ? "cursor-not-allowed" : "cursor-pointer active:opacity-70"),
|
|
1651
|
-
onClick: handleDownloadDocument,
|
|
1652
|
-
disabled: isDownloadDisabled,
|
|
1653
|
-
children: /* @__PURE__ */ jsx("span", {
|
|
1654
|
-
className: isDownloadDisabled ? "text-gray-500" : "text-gray-900",
|
|
1655
|
-
children: "Download"
|
|
1656
|
-
})
|
|
1657
|
-
})
|
|
1658
|
-
]
|
|
1659
|
-
}),
|
|
1660
|
-
/* @__PURE__ */ jsx("div", {
|
|
1661
|
-
className: "flex items-center",
|
|
1662
|
-
children: isEditingName && document ? /* @__PURE__ */ jsx(NodeInput, {
|
|
1663
|
-
defaultValue: documentName,
|
|
1664
|
-
className: "text-center text-sm font-medium text-gray-500",
|
|
1665
|
-
"aria-label": "Document name",
|
|
1666
|
-
onCancel: () => setIsEditingName(false),
|
|
1667
|
-
onSubmit: (newName) => {
|
|
1668
|
-
const node = { id: document.header.id };
|
|
1669
|
-
Promise.all([onRenameNode(newName, node), onRenameDriveNodes(newName, document.header.id)]).then(() => setIsEditingName(false)).catch((error) => {
|
|
1670
|
-
console.error("Failed to rename document:", error);
|
|
1671
|
-
setIsEditingName(false);
|
|
1672
|
-
});
|
|
1673
|
-
}
|
|
1674
|
-
}) : /* @__PURE__ */ jsx("h1", {
|
|
1675
|
-
className: twMerge("text-sm font-medium text-gray-500", document && "cursor-pointer hover:text-gray-700"),
|
|
1676
|
-
onDoubleClick: document ? () => setIsEditingName(true) : void 0,
|
|
1677
|
-
title: document ? "Double-click to edit" : void 0,
|
|
1678
|
-
children: documentName
|
|
1679
|
-
})
|
|
1680
|
-
}),
|
|
1681
|
-
/* @__PURE__ */ jsxs("div", {
|
|
1682
|
-
className: "flex items-center gap-x-2",
|
|
1683
|
-
children: [
|
|
1684
|
-
!isSwitchboardLinkDisabled && /* @__PURE__ */ jsx("button", {
|
|
1685
|
-
className: twMerge("grid size-8 place-items-center rounded-lg border border-gray-200 bg-white", "cursor-pointer active:opacity-70"),
|
|
1686
|
-
onClick: resolvedSwitchboardHandler,
|
|
1687
|
-
disabled: isSwitchboardLinkDisabled,
|
|
1688
|
-
children: /* @__PURE__ */ jsx(Icon, {
|
|
1689
|
-
name: "Drive",
|
|
1690
|
-
size: 16,
|
|
1691
|
-
className: "text-gray-900"
|
|
1692
|
-
})
|
|
1693
|
-
}),
|
|
1694
|
-
enabledControls.includes("history") && /* @__PURE__ */ jsx("button", {
|
|
1695
|
-
className: twMerge("grid size-8 place-items-center rounded-lg border border-gray-200 bg-white", disableRevisionHistory ? "cursor-not-allowed" : "cursor-pointer active:opacity-70"),
|
|
1696
|
-
onClick: showRevisionHistory,
|
|
1697
|
-
disabled: disableRevisionHistory,
|
|
1698
|
-
children: /* @__PURE__ */ jsx(Icon, {
|
|
1699
|
-
name: "History",
|
|
1700
|
-
size: 16,
|
|
1701
|
-
className: disableRevisionHistory ? "text-gray-500" : "text-gray-900"
|
|
1702
|
-
})
|
|
1703
|
-
}),
|
|
1704
|
-
enabledControls.includes("timeline") && defaultTimelineVisible && /* @__PURE__ */ jsx("button", {
|
|
1705
|
-
className: twMerge("grid size-8 place-items-center rounded-lg border border-gray-200 bg-white", isTimelineDisabled ? "cursor-not-allowed" : "cursor-pointer active:opacity-70"),
|
|
1706
|
-
onClick: handleTimelineToggle,
|
|
1707
|
-
disabled: isTimelineDisabled,
|
|
1708
|
-
"aria-pressed": showTimeline,
|
|
1709
|
-
children: /* @__PURE__ */ jsx(Icon, {
|
|
1710
|
-
name: "Timeline",
|
|
1711
|
-
size: 16,
|
|
1712
|
-
className: twMerge("text-gray-900", isTimelineDisabled && "opacity-50", showTimeline && "text-blue-600")
|
|
1713
|
-
})
|
|
1714
|
-
}),
|
|
1715
|
-
/* @__PURE__ */ jsx("button", {
|
|
1716
|
-
id: "close-document-button",
|
|
1717
|
-
"aria-label": "Close document",
|
|
1718
|
-
className: "grid size-8 cursor-pointer place-items-center rounded-lg border border-gray-200 bg-white active:opacity-70",
|
|
1719
|
-
onClick: handleClose,
|
|
1720
|
-
children: /* @__PURE__ */ jsx(Icon, {
|
|
1721
|
-
name: "XmarkLight",
|
|
1722
|
-
size: 16,
|
|
1723
|
-
className: "text-gray-900"
|
|
1724
|
-
})
|
|
1725
|
-
})
|
|
1726
|
-
]
|
|
1727
|
-
})
|
|
1728
|
-
]
|
|
1729
|
-
}),
|
|
1730
|
-
showTimeline && /* @__PURE__ */ jsx("div", {
|
|
1731
|
-
className: "mt-2 w-full",
|
|
1732
|
-
children: /* @__PURE__ */ jsx(Suspense, {
|
|
1733
|
-
fallback: null,
|
|
1734
|
-
children: /* @__PURE__ */ jsx(DocumentTimeline$1, {
|
|
1735
|
-
timeline: timelineItemsData,
|
|
1736
|
-
onItemClick: setSelectedTimelineItem
|
|
1737
|
-
})
|
|
1738
|
-
})
|
|
1739
|
-
}),
|
|
1740
|
-
children
|
|
2277
|
+
renderCustomControls(slot, "start"),
|
|
2278
|
+
renderToolbarControls(slot),
|
|
2279
|
+
renderCustomControls(slot, "end")
|
|
1741
2280
|
]
|
|
1742
2281
|
});
|
|
1743
|
-
}
|
|
2282
|
+
}
|
|
1744
2283
|
//#endregion
|
|
1745
2284
|
//#region src/connect/components/modal/replace-duplicate-modal.tsx
|
|
1746
2285
|
const buttonStyles$4 = "min-h-[48px] min-w-[142px] text-base font-semibold py-3 px-6 rounded-xl outline-none active:opacity-75 hover:scale-105 transform transition-all";
|
|
@@ -1759,7 +2298,7 @@ function ConnectReplaceDuplicateModal(props) {
|
|
|
1759
2298
|
},
|
|
1760
2299
|
...restProps,
|
|
1761
2300
|
children: /* @__PURE__ */ jsxs("div", {
|
|
1762
|
-
...mergeClassNameProps(containerProps, "w-[450px] p-6 text-slate-300"),
|
|
2301
|
+
...mergeClassNameProps(containerProps, "w-[450px] bg-white p-6 text-slate-300"),
|
|
1763
2302
|
children: [
|
|
1764
2303
|
/* @__PURE__ */ jsxs("div", {
|
|
1765
2304
|
className: "flex items-center justify-between border-b border-slate-50 pb-2",
|
|
@@ -1798,7 +2337,7 @@ function UploadFileItemErrorDetails(props) {
|
|
|
1798
2337
|
const { status, errorDetails } = props;
|
|
1799
2338
|
if (!((status === "failed" || status === "unsupported-document-type") && errorDetails)) return null;
|
|
1800
2339
|
return /* @__PURE__ */ jsx("div", {
|
|
1801
|
-
className: "
|
|
2340
|
+
className: "text-xs leading-[18px] wrap-break-word text-gray-500",
|
|
1802
2341
|
children: errorDetails
|
|
1803
2342
|
});
|
|
1804
2343
|
}
|
|
@@ -1824,7 +2363,7 @@ function UploadFileItemHeader(props) {
|
|
|
1824
2363
|
...delegatedProps,
|
|
1825
2364
|
children: [
|
|
1826
2365
|
/* @__PURE__ */ jsx("div", {
|
|
1827
|
-
className: "flex h-9 w-7
|
|
2366
|
+
className: "flex h-9 w-7 shrink-0 items-center justify-center",
|
|
1828
2367
|
children: /* @__PURE__ */ jsx(Icon, {
|
|
1829
2368
|
name: getDocumentIcon(documentType),
|
|
1830
2369
|
size: 48,
|
|
@@ -1834,15 +2373,15 @@ function UploadFileItemHeader(props) {
|
|
|
1834
2373
|
/* @__PURE__ */ jsxs("div", {
|
|
1835
2374
|
className: "flex flex-1 flex-col gap-0.5",
|
|
1836
2375
|
children: [/* @__PURE__ */ jsx("div", {
|
|
1837
|
-
className: "text-xs
|
|
2376
|
+
className: "text-xs leading-[18px] font-medium text-gray-900",
|
|
1838
2377
|
children: fileName
|
|
1839
2378
|
}), /* @__PURE__ */ jsx("div", {
|
|
1840
|
-
className: "text-xs
|
|
2379
|
+
className: "text-xs leading-[18px] font-medium text-gray-500",
|
|
1841
2380
|
children: fileSize
|
|
1842
2381
|
})]
|
|
1843
2382
|
}),
|
|
1844
2383
|
onClose && /* @__PURE__ */ jsx("div", {
|
|
1845
|
-
className: "flex h-9 w-[18px]
|
|
2384
|
+
className: "flex h-9 w-[18px] shrink-0 items-start justify-center",
|
|
1846
2385
|
children: /* @__PURE__ */ jsx("button", {
|
|
1847
2386
|
type: "button",
|
|
1848
2387
|
onClick: onClose,
|
|
@@ -1917,7 +2456,7 @@ function UploadFileItemStatusRow(props) {
|
|
|
1917
2456
|
children: getStatusText(status)
|
|
1918
2457
|
}),
|
|
1919
2458
|
status === "uploading" && /* @__PURE__ */ jsxs("div", {
|
|
1920
|
-
className: "text-xs
|
|
2459
|
+
className: "text-xs leading-[18px] font-medium text-gray-900",
|
|
1921
2460
|
children: [Math.round(progress), "%"]
|
|
1922
2461
|
}),
|
|
1923
2462
|
shouldShowCTA(status, onOpenDocument, onFindResolution) && /* @__PURE__ */ jsx("button", {
|
|
@@ -1935,7 +2474,7 @@ const UploadFileItem = /* @__PURE__ */ forwardRef(function UploadFileItem(props,
|
|
|
1935
2474
|
const { fileName, fileSize, status, documentType, progress = 0, errorDetails, onClose, onOpenDocument, onFindResolution, className, ...delegatedProps } = props;
|
|
1936
2475
|
return /* @__PURE__ */ jsxs("div", {
|
|
1937
2476
|
ref,
|
|
1938
|
-
className: twMerge("flex w-full flex-col gap-0.5 rounded-md border border-gray-100 bg-white p-2 shadow-
|
|
2477
|
+
className: twMerge("flex w-full flex-col gap-0.5 rounded-md border border-gray-100 bg-white p-2 shadow-sidebar", className),
|
|
1939
2478
|
...delegatedProps,
|
|
1940
2479
|
children: [/* @__PURE__ */ jsx(UploadFileItemHeader, {
|
|
1941
2480
|
fileName,
|
|
@@ -1976,7 +2515,7 @@ function UploadFileList(props) {
|
|
|
1976
2515
|
const [isCollapsed, setIsCollapsed] = useState(defaultCollapsed);
|
|
1977
2516
|
const computedTitle = useMemo(() => getUploadListTitle(items.length, title), [items.length, title]);
|
|
1978
2517
|
return /* @__PURE__ */ jsxs("div", {
|
|
1979
|
-
className: twMerge("w-
|
|
2518
|
+
className: twMerge("w-89.5 rounded-md border border-gray-100 bg-gray-50 p-4 shadow-charcoal", className),
|
|
1980
2519
|
...delegatedProps,
|
|
1981
2520
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
1982
2521
|
className: "flex items-center justify-between",
|
|
@@ -1985,7 +2524,7 @@ function UploadFileList(props) {
|
|
|
1985
2524
|
"aria-expanded": !isCollapsed,
|
|
1986
2525
|
"aria-label": isCollapsed ? "Expand list" : "Collapse list",
|
|
1987
2526
|
onClick: () => setIsCollapsed((v) => !v),
|
|
1988
|
-
className: "min-w-0 flex-1 text-left text-sm font-medium
|
|
2527
|
+
className: "min-w-0 flex-1 text-left text-sm/4 font-medium text-gray-900 hover:opacity-80",
|
|
1989
2528
|
children: computedTitle
|
|
1990
2529
|
}), /* @__PURE__ */ jsxs("div", {
|
|
1991
2530
|
className: "flex shrink-0 items-center gap-4",
|
|
@@ -1995,7 +2534,7 @@ function UploadFileList(props) {
|
|
|
1995
2534
|
onClick: () => setIsCollapsed((v) => !v),
|
|
1996
2535
|
className: "text-gray-900 hover:opacity-80",
|
|
1997
2536
|
children: /* @__PURE__ */ jsx("span", {
|
|
1998
|
-
className: twMerge("inline-block
|
|
2537
|
+
className: twMerge("inline-block size-4 transition-transform select-none", isCollapsed ? "-rotate-90" : "rotate-0"),
|
|
1999
2538
|
children: /* @__PURE__ */ jsx(Icon, {
|
|
2000
2539
|
name: "CaretDown",
|
|
2001
2540
|
size: 16,
|
|
@@ -2008,7 +2547,7 @@ function UploadFileList(props) {
|
|
|
2008
2547
|
onClick: onClose,
|
|
2009
2548
|
className: "text-gray-900 hover:opacity-80",
|
|
2010
2549
|
children: /* @__PURE__ */ jsx("span", {
|
|
2011
|
-
className: "inline-block
|
|
2550
|
+
className: "inline-block size-4 select-none",
|
|
2012
2551
|
children: /* @__PURE__ */ jsx(Icon, {
|
|
2013
2552
|
name: "XmarkLight",
|
|
2014
2553
|
size: 16,
|
|
@@ -2018,7 +2557,7 @@ function UploadFileList(props) {
|
|
|
2018
2557
|
})]
|
|
2019
2558
|
})]
|
|
2020
2559
|
}), !isCollapsed && /* @__PURE__ */ jsx("div", {
|
|
2021
|
-
className: "mt-4 flex max-h-[404px] flex-col gap-4 overflow-
|
|
2560
|
+
className: "mt-4 flex max-h-[404px] flex-col gap-4 overflow-x-visible overflow-y-auto p-2",
|
|
2022
2561
|
children: items.map((item, idx) => /* @__PURE__ */ jsx(UploadFileItem, { ...item }, `${item.fileName}-${idx}`))
|
|
2023
2562
|
})]
|
|
2024
2563
|
});
|
|
@@ -2083,7 +2622,7 @@ function UploadFileListContainer(props) {
|
|
|
2083
2622
|
const items = mapUploadsToFileItems(uploadsArray, removeUpload, setSelectedNode, onConflictResolution);
|
|
2084
2623
|
const handleClose = onClose ?? clearAllUploads;
|
|
2085
2624
|
return /* @__PURE__ */ jsx("div", {
|
|
2086
|
-
className: twMerge("fixed
|
|
2625
|
+
className: twMerge("fixed right-4 bottom-4 z-1001", className),
|
|
2087
2626
|
...delegatedProps,
|
|
2088
2627
|
children: /* @__PURE__ */ jsx(UploadFileList, {
|
|
2089
2628
|
items,
|
|
@@ -2340,18 +2879,18 @@ function DropZone(props) {
|
|
|
2340
2879
|
children: [
|
|
2341
2880
|
children,
|
|
2342
2881
|
enable && isDropTarget && /* @__PURE__ */ jsx("div", {
|
|
2343
|
-
className: "fixed inset-0 z-
|
|
2882
|
+
className: "pointer-events-none fixed inset-0 z-1000 flex min-h-screen w-screen items-center justify-center bg-black/50",
|
|
2344
2883
|
children: /* @__PURE__ */ jsx("div", {
|
|
2345
|
-
className: "rounded-
|
|
2884
|
+
className: "rounded-3xl bg-white p-6 shadow-charcoal",
|
|
2346
2885
|
children: /* @__PURE__ */ jsxs("div", {
|
|
2347
|
-
className: "relative flex h-
|
|
2886
|
+
className: "relative flex h-32.5 w-100 flex-col items-center justify-start overflow-visible rounded-lg border border-dashed border-black px-4 py-6",
|
|
2348
2887
|
children: [
|
|
2349
2888
|
/* @__PURE__ */ jsx("div", {
|
|
2350
|
-
className: "text-center text-base
|
|
2889
|
+
className: "text-center text-base/5 text-zinc-500",
|
|
2351
2890
|
children: title
|
|
2352
2891
|
}),
|
|
2353
2892
|
/* @__PURE__ */ jsx("div", {
|
|
2354
|
-
className: "text-center text-base
|
|
2893
|
+
className: "text-center text-base/5 text-zinc-500",
|
|
2355
2894
|
children: subtitle
|
|
2356
2895
|
}),
|
|
2357
2896
|
/* @__PURE__ */ jsx("span", {
|
|
@@ -2475,7 +3014,7 @@ function EditorActionButtons(props) {
|
|
|
2475
3014
|
//#region src/connect/components/editor-undo-redo-buttons/editor-undo-redo-buttons.tsx
|
|
2476
3015
|
function EditorUndoRedoButtons(props) {
|
|
2477
3016
|
const { canUndo, canRedo, undo, redo } = props;
|
|
2478
|
-
const buttonStyles = "w-8 h-8 rounded-lg flex justify-center items-center rounded border border-gray-200";
|
|
3017
|
+
const buttonStyles = "w-8 h-8 rounded-lg flex justify-center items-center rounded border border-gray-200 bg-white";
|
|
2479
3018
|
return /* @__PURE__ */ jsxs("div", {
|
|
2480
3019
|
className: "flex gap-x-2 text-gray-500",
|
|
2481
3020
|
children: [/* @__PURE__ */ jsx("button", {
|
|
@@ -2790,9 +3329,9 @@ function FileItem(props) {
|
|
|
2790
3329
|
width: 32,
|
|
2791
3330
|
draggable: false
|
|
2792
3331
|
}), isReadMode && syncStatus && /* @__PURE__ */ jsx("div", {
|
|
2793
|
-
className: "absolute bottom-[-2px]
|
|
3332
|
+
className: "absolute right-0 bottom-[-2px] size-3 rounded-full bg-white",
|
|
2794
3333
|
children: /* @__PURE__ */ jsx("div", {
|
|
2795
|
-
className: "absolute
|
|
3334
|
+
className: "absolute top-[-2px] left-[-2px]",
|
|
2796
3335
|
children: /* @__PURE__ */ jsx(SyncStatusIcon, {
|
|
2797
3336
|
overrideSyncIcons: { SUCCESS: "CheckCircleFill" },
|
|
2798
3337
|
syncStatus
|
|
@@ -2800,7 +3339,7 @@ function FileItem(props) {
|
|
|
2800
3339
|
})
|
|
2801
3340
|
})]
|
|
2802
3341
|
});
|
|
2803
|
-
const containerStyles = twMerge("group flex h-12 cursor-pointer
|
|
3342
|
+
const containerStyles = twMerge("group flex h-12 cursor-pointer items-center rounded-lg bg-gray-200 px-2 text-gray-600 select-none hover:text-gray-800", isDragging ? "opacity-60" : "", className);
|
|
2804
3343
|
const content = isReadMode ? /* @__PURE__ */ jsxs("div", {
|
|
2805
3344
|
className: "flex w-52 items-center justify-between",
|
|
2806
3345
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
@@ -2899,7 +3438,7 @@ function FolderItem(props) {
|
|
|
2899
3438
|
onCancel,
|
|
2900
3439
|
onSubmit
|
|
2901
3440
|
});
|
|
2902
|
-
const containerStyles = twMerge("group flex h-12 cursor-pointer
|
|
3441
|
+
const containerStyles = twMerge("group flex h-12 cursor-pointer items-center rounded-lg bg-gray-200 px-2 select-none", isDragging ? "opacity-60" : isDropTarget ? "bg-blue-100" : "", className);
|
|
2903
3442
|
return /* @__PURE__ */ jsx("div", {
|
|
2904
3443
|
className: "relative w-64",
|
|
2905
3444
|
onClick: isReadMode ? () => setSelectedNode(folderNode) : void 0,
|
|
@@ -2949,7 +3488,7 @@ function FooterLink(props) {
|
|
|
2949
3488
|
//#region src/connect/components/footer/footer.tsx
|
|
2950
3489
|
const Footer = ({ children, ...props }) => {
|
|
2951
3490
|
return /* @__PURE__ */ jsx("footer", {
|
|
2952
|
-
...mergeClassNameProps(props, "flex items-center gap-x-6 text-xs font-medium text-
|
|
3491
|
+
...mergeClassNameProps(props, "flex items-center gap-x-6 text-xs font-medium text-charcoal-300"),
|
|
2953
3492
|
children
|
|
2954
3493
|
});
|
|
2955
3494
|
};
|
|
@@ -3011,7 +3550,7 @@ const Toggle = /* @__PURE__ */ forwardRef(function Toggle(props, ref) {
|
|
|
3011
3550
|
type: "checkbox",
|
|
3012
3551
|
value: "",
|
|
3013
3552
|
...props
|
|
3014
|
-
}), /* @__PURE__ */ jsx("div", { className: "peer h-6 w-11 rounded-full bg-gray-500 after:absolute after:
|
|
3553
|
+
}), /* @__PURE__ */ jsx("div", { className: "peer h-6 w-11 rounded-full bg-gray-500 peer-checked:bg-blue-900 peer-focus:outline-none after:absolute after:inset-s-0.5 after:top-0.5 after:size-5 after:rounded-full after:border after:border-none after:bg-gray-50 after:transition-all peer-checked:after:translate-x-full" })]
|
|
3015
3554
|
});
|
|
3016
3555
|
});
|
|
3017
3556
|
//#endregion
|
|
@@ -3131,7 +3670,7 @@ function LocationInfo(props) {
|
|
|
3131
3670
|
const locationInfo = locationInfoByLocation[location];
|
|
3132
3671
|
return /* @__PURE__ */ jsxs("div", {
|
|
3133
3672
|
...divProps,
|
|
3134
|
-
className: twMerge("my-3 flex items-center gap-2 rounded-xl border border-gray-100 p-3 text-gray-800 shadow", className),
|
|
3673
|
+
className: twMerge("my-3 flex items-center gap-2 rounded-xl border border-gray-100 bg-white p-3 text-gray-800 shadow-sm", className),
|
|
3135
3674
|
children: [locationInfo.icon, /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", { children: locationInfo.title }), /* @__PURE__ */ jsx("p", {
|
|
3136
3675
|
className: "text-xs text-slate-200",
|
|
3137
3676
|
children: locationInfo.description
|
|
@@ -3256,7 +3795,7 @@ function FormattedJsonViewer(props) {
|
|
|
3256
3795
|
...rest,
|
|
3257
3796
|
className: "inline-grid",
|
|
3258
3797
|
children: /* @__PURE__ */ jsxs("span", {
|
|
3259
|
-
className: "
|
|
3798
|
+
className: "pl-[1ch] indent-[-1ch] wrap-anywhere hyphens-none",
|
|
3260
3799
|
style: { maxWidth: `${60 - keyName.toString().length}ch` },
|
|
3261
3800
|
children: [
|
|
3262
3801
|
"\"",
|
|
@@ -3310,7 +3849,7 @@ const HomeScreenItem = function HomeScreenItem(props) {
|
|
|
3310
3849
|
children: icon || /* @__PURE__ */ jsx("div", {
|
|
3311
3850
|
className: "size-8 items-center justify-center rounded-lg bg-black pt-1",
|
|
3312
3851
|
children: /* @__PURE__ */ jsx("span", {
|
|
3313
|
-
className: "
|
|
3852
|
+
className: "w-6 text-white",
|
|
3314
3853
|
children: title.slice(0, 1).toUpperCase()
|
|
3315
3854
|
})
|
|
3316
3855
|
})
|
|
@@ -3318,7 +3857,7 @@ const HomeScreenItem = function HomeScreenItem(props) {
|
|
|
3318
3857
|
/* @__PURE__ */ jsxs("div", {
|
|
3319
3858
|
className: "w-full max-w-full",
|
|
3320
3859
|
children: [/* @__PURE__ */ jsx("h3", {
|
|
3321
|
-
className: "w-full max-w-full truncate px-2",
|
|
3860
|
+
className: "w-full max-w-full truncate px-2 text-gray-900",
|
|
3322
3861
|
children: title
|
|
3323
3862
|
}), description && /* @__PURE__ */ jsx("p", {
|
|
3324
3863
|
className: "text-gray-500",
|
|
@@ -3326,7 +3865,7 @@ const HomeScreenItem = function HomeScreenItem(props) {
|
|
|
3326
3865
|
})]
|
|
3327
3866
|
}),
|
|
3328
3867
|
shareable && /* @__PURE__ */ jsx("div", {
|
|
3329
|
-
className: "absolute left-2
|
|
3868
|
+
className: "absolute top-0 left-2 mb-2",
|
|
3330
3869
|
children: /* @__PURE__ */ jsx(Icon, {
|
|
3331
3870
|
name: "PeopleFill",
|
|
3332
3871
|
width: 12,
|
|
@@ -3355,9 +3894,9 @@ const HomeScreenAddDriveItem = function HomeScreenAddDriveItem(props) {
|
|
|
3355
3894
|
const HomeScreen = function HomeScreen(props) {
|
|
3356
3895
|
const { children, containerClassName } = props;
|
|
3357
3896
|
return /* @__PURE__ */ jsx("div", {
|
|
3358
|
-
className: twMerge("container
|
|
3897
|
+
className: twMerge("relative container mx-auto flex h-full flex-col", containerClassName),
|
|
3359
3898
|
children: /* @__PURE__ */ jsxs("div", {
|
|
3360
|
-
className: "m-8 flex flex-wrap justify-center gap-4 pt-12",
|
|
3899
|
+
className: "m-8 flex flex-wrap justify-center gap-4 bg-white pt-12",
|
|
3361
3900
|
children: [/* @__PURE__ */ jsx(HomeBackgroundImage, {}), children]
|
|
3362
3901
|
})
|
|
3363
3902
|
});
|
|
@@ -3448,7 +3987,7 @@ function IntegrityInspector({ onValidate, onRebuildKeyframes, onRebuildSnapshots
|
|
|
3448
3987
|
className: "text-xs font-medium text-gray-600",
|
|
3449
3988
|
children: "Document ID"
|
|
3450
3989
|
}), /* @__PURE__ */ jsx("input", {
|
|
3451
|
-
className: "rounded border border-gray-300 px-3 py-1.5 text-sm outline-none focus:border-blue-400",
|
|
3990
|
+
className: "rounded-sm border border-gray-300 px-3 py-1.5 text-sm outline-none focus:border-blue-400",
|
|
3452
3991
|
onChange: (e) => setDocumentId(e.target.value),
|
|
3453
3992
|
placeholder: "Enter document ID",
|
|
3454
3993
|
type: "text",
|
|
@@ -3461,7 +4000,7 @@ function IntegrityInspector({ onValidate, onRebuildKeyframes, onRebuildSnapshots
|
|
|
3461
4000
|
className: "text-xs font-medium text-gray-600",
|
|
3462
4001
|
children: "Branch (optional)"
|
|
3463
4002
|
}), /* @__PURE__ */ jsx("input", {
|
|
3464
|
-
className: "rounded border border-gray-300 px-3 py-1.5 text-sm outline-none focus:border-blue-400",
|
|
4003
|
+
className: "rounded-sm border border-gray-300 px-3 py-1.5 text-sm outline-none focus:border-blue-400",
|
|
3465
4004
|
onChange: (e) => setBranch(e.target.value),
|
|
3466
4005
|
placeholder: "main",
|
|
3467
4006
|
type: "text",
|
|
@@ -3472,7 +4011,7 @@ function IntegrityInspector({ onValidate, onRebuildKeyframes, onRebuildSnapshots
|
|
|
3472
4011
|
className: "flex gap-2",
|
|
3473
4012
|
children: [
|
|
3474
4013
|
/* @__PURE__ */ jsxs("button", {
|
|
3475
|
-
className: "flex items-center gap-1 rounded border border-blue-300 bg-blue-50 px-3 py-1.5 text-sm text-blue-700 hover:bg-blue-100 disabled:opacity-50",
|
|
4014
|
+
className: "flex items-center gap-1 rounded-sm border border-blue-300 bg-blue-50 px-3 py-1.5 text-sm text-blue-700 hover:bg-blue-100 disabled:opacity-50",
|
|
3476
4015
|
disabled: !documentId.trim() || status === "running" || confirmAction !== null,
|
|
3477
4016
|
onClick: () => void handleValidate(),
|
|
3478
4017
|
type: "button",
|
|
@@ -3482,7 +4021,7 @@ function IntegrityInspector({ onValidate, onRebuildKeyframes, onRebuildSnapshots
|
|
|
3482
4021
|
}), "Validate"]
|
|
3483
4022
|
}),
|
|
3484
4023
|
/* @__PURE__ */ jsxs("button", {
|
|
3485
|
-
className: "flex items-center gap-1 rounded border border-yellow-300 bg-yellow-50 px-3 py-1.5 text-sm text-yellow-700 hover:bg-yellow-100 disabled:opacity-50",
|
|
4024
|
+
className: "flex items-center gap-1 rounded-sm border border-yellow-300 bg-yellow-50 px-3 py-1.5 text-sm text-yellow-700 hover:bg-yellow-100 disabled:opacity-50",
|
|
3486
4025
|
disabled: !documentId.trim() || status === "running" || confirmAction !== null,
|
|
3487
4026
|
onClick: () => setConfirmAction("keyframes"),
|
|
3488
4027
|
type: "button",
|
|
@@ -3492,7 +4031,7 @@ function IntegrityInspector({ onValidate, onRebuildKeyframes, onRebuildSnapshots
|
|
|
3492
4031
|
}), "Rebuild Keyframes"]
|
|
3493
4032
|
}),
|
|
3494
4033
|
/* @__PURE__ */ jsxs("button", {
|
|
3495
|
-
className: "flex items-center gap-1 rounded border border-yellow-300 bg-yellow-50 px-3 py-1.5 text-sm text-yellow-700 hover:bg-yellow-100 disabled:opacity-50",
|
|
4034
|
+
className: "flex items-center gap-1 rounded-sm border border-yellow-300 bg-yellow-50 px-3 py-1.5 text-sm text-yellow-700 hover:bg-yellow-100 disabled:opacity-50",
|
|
3496
4035
|
disabled: !documentId.trim() || status === "running" || confirmAction !== null,
|
|
3497
4036
|
onClick: () => setConfirmAction("snapshots"),
|
|
3498
4037
|
type: "button",
|
|
@@ -3506,14 +4045,14 @@ function IntegrityInspector({ onValidate, onRebuildKeyframes, onRebuildSnapshots
|
|
|
3506
4045
|
]
|
|
3507
4046
|
}),
|
|
3508
4047
|
confirmAction && /* @__PURE__ */ jsxs("div", {
|
|
3509
|
-
className: "flex shrink-0 items-center gap-3 rounded border border-yellow-400 bg-yellow-50 px-3 py-2",
|
|
4048
|
+
className: "flex shrink-0 items-center gap-3 rounded-sm border border-yellow-400 bg-yellow-50 px-3 py-2",
|
|
3510
4049
|
children: [
|
|
3511
4050
|
/* @__PURE__ */ jsx("span", {
|
|
3512
4051
|
className: "text-sm text-yellow-800",
|
|
3513
4052
|
children: confirmAction === "keyframes" ? "This will delete all keyframes for this document. Continue?" : "This will invalidate all cached snapshots for this document. Continue?"
|
|
3514
4053
|
}),
|
|
3515
4054
|
/* @__PURE__ */ jsx("button", {
|
|
3516
|
-
className: "rounded bg-yellow-600 px-3 py-1 text-sm text-white hover:bg-yellow-700",
|
|
4055
|
+
className: "rounded-sm bg-yellow-600 px-3 py-1 text-sm text-white hover:bg-yellow-700",
|
|
3517
4056
|
onClick: () => {
|
|
3518
4057
|
if (confirmAction === "keyframes") handleRebuildKeyframes();
|
|
3519
4058
|
else handleRebuildSnapshots();
|
|
@@ -3522,7 +4061,7 @@ function IntegrityInspector({ onValidate, onRebuildKeyframes, onRebuildSnapshots
|
|
|
3522
4061
|
children: "Confirm"
|
|
3523
4062
|
}),
|
|
3524
4063
|
/* @__PURE__ */ jsx("button", {
|
|
3525
|
-
className: "rounded border border-gray-300 bg-white px-3 py-1 text-sm text-gray-600 hover:bg-gray-50",
|
|
4064
|
+
className: "rounded-sm border border-gray-300 bg-white px-3 py-1 text-sm text-gray-600 hover:bg-gray-50",
|
|
3526
4065
|
onClick: () => setConfirmAction(null),
|
|
3527
4066
|
type: "button",
|
|
3528
4067
|
children: "Cancel"
|
|
@@ -3541,7 +4080,7 @@ function IntegrityInspector({ onValidate, onRebuildKeyframes, onRebuildSnapshots
|
|
|
3541
4080
|
children: "Running..."
|
|
3542
4081
|
}),
|
|
3543
4082
|
status === "error" && error && /* @__PURE__ */ jsx("div", {
|
|
3544
|
-
className: "rounded bg-red-50 p-3 text-sm text-red-700",
|
|
4083
|
+
className: "rounded-sm bg-red-50 p-3 text-sm text-red-700",
|
|
3545
4084
|
children: error
|
|
3546
4085
|
}),
|
|
3547
4086
|
status === "done" && validationResult && /* @__PURE__ */ jsx(ValidationResultView, { result: validationResult }),
|
|
@@ -3729,7 +4268,7 @@ function AddDriveModal(props) {
|
|
|
3729
4268
|
open,
|
|
3730
4269
|
children: /* @__PURE__ */ jsx("div", {
|
|
3731
4270
|
...containerProps,
|
|
3732
|
-
className: twMerge("w-[408px] rounded-2xl p-6", containerProps?.className),
|
|
4271
|
+
className: twMerge("w-[408px] rounded-2xl bg-white p-6", containerProps?.className),
|
|
3733
4272
|
children: /* @__PURE__ */ jsxs(Tabs, {
|
|
3734
4273
|
defaultValue: "Create Drive",
|
|
3735
4274
|
children: [/* @__PURE__ */ jsx(TabContent, {
|
|
@@ -3768,7 +4307,7 @@ function AddLocalDriveModal(props) {
|
|
|
3768
4307
|
open,
|
|
3769
4308
|
children: /* @__PURE__ */ jsxs("div", {
|
|
3770
4309
|
...containerProps,
|
|
3771
|
-
className: twMerge("max-w-[408px] rounded-2xl p-6", containerProps?.className),
|
|
4310
|
+
className: twMerge("max-w-[408px] rounded-2xl bg-white p-6", containerProps?.className),
|
|
3772
4311
|
children: [
|
|
3773
4312
|
/* @__PURE__ */ jsxs("div", {
|
|
3774
4313
|
className: "flex justify-between",
|
|
@@ -3809,7 +4348,7 @@ function AddRemoteDriveModal(props) {
|
|
|
3809
4348
|
open,
|
|
3810
4349
|
children: /* @__PURE__ */ jsxs("div", {
|
|
3811
4350
|
...containerProps,
|
|
3812
|
-
className: twMerge("
|
|
4351
|
+
className: twMerge("max-w-[408px] min-w-[408px] rounded-2xl bg-white p-6", containerProps?.className),
|
|
3813
4352
|
children: [
|
|
3814
4353
|
/* @__PURE__ */ jsxs("div", {
|
|
3815
4354
|
className: "flex justify-between",
|
|
@@ -3875,7 +4414,7 @@ function CreateDocumentModal(props) {
|
|
|
3875
4414
|
...restProps,
|
|
3876
4415
|
children: /* @__PURE__ */ jsxs("form", {
|
|
3877
4416
|
name: "create-document",
|
|
3878
|
-
className: "w-[400px] p-6 text-slate-300",
|
|
4417
|
+
className: "w-[400px] bg-white p-6 text-slate-300",
|
|
3879
4418
|
onSubmit: handleSubmit,
|
|
3880
4419
|
children: [
|
|
3881
4420
|
/* @__PURE__ */ jsx("div", {
|
|
@@ -4123,7 +4662,7 @@ function DriveSettingsModal(props) {
|
|
|
4123
4662
|
open,
|
|
4124
4663
|
children: /* @__PURE__ */ jsxs("div", {
|
|
4125
4664
|
...containerProps,
|
|
4126
|
-
className: twMerge("max-w-[408px] rounded-2xl p-6", containerProps?.className),
|
|
4665
|
+
className: twMerge("max-w-[408px] rounded-2xl bg-white p-6", containerProps?.className),
|
|
4127
4666
|
children: [
|
|
4128
4667
|
/* @__PURE__ */ jsxs("div", {
|
|
4129
4668
|
className: "flex justify-between",
|
|
@@ -4186,7 +4725,7 @@ function ObjectInspectorModal({ open, onOpenChange, title, object }) {
|
|
|
4186
4725
|
open,
|
|
4187
4726
|
title,
|
|
4188
4727
|
children: /* @__PURE__ */ jsxs("div", {
|
|
4189
|
-
className: "flex
|
|
4728
|
+
className: "flex size-full flex-col bg-white",
|
|
4190
4729
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
4191
4730
|
className: "flex shrink-0 items-center justify-between border-b border-gray-200 px-4 py-3",
|
|
4192
4731
|
children: [/* @__PURE__ */ jsx("h2", {
|
|
@@ -4373,7 +4912,7 @@ function ProcessorsInspector({ getProcessors, onRetry }) {
|
|
|
4373
4912
|
}), /* @__PURE__ */ jsx("div", {
|
|
4374
4913
|
className: "flex items-center gap-2",
|
|
4375
4914
|
children: /* @__PURE__ */ jsxs("button", {
|
|
4376
|
-
className: "flex items-center gap-1 rounded border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-100 disabled:opacity-50",
|
|
4915
|
+
className: "flex items-center gap-1 rounded-sm border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-100 disabled:opacity-50",
|
|
4377
4916
|
disabled: loading,
|
|
4378
4917
|
onClick: () => void handleRefresh(),
|
|
4379
4918
|
type: "button",
|
|
@@ -4461,7 +5000,7 @@ function ProcessorsInspector({ getProcessors, onRetry }) {
|
|
|
4461
5000
|
/* @__PURE__ */ jsx("td", {
|
|
4462
5001
|
className: "px-3 py-2 text-xs",
|
|
4463
5002
|
children: /* @__PURE__ */ jsx("button", {
|
|
4464
|
-
className: "flex items-center gap-1 rounded bg-blue-50 px-2 py-1 text-xs text-blue-700 hover:bg-blue-100",
|
|
5003
|
+
className: "flex items-center gap-1 rounded-sm bg-blue-50 px-2 py-1 text-xs text-blue-700 hover:bg-blue-100",
|
|
4465
5004
|
onClick: () => setSelectedProcessor(processor),
|
|
4466
5005
|
type: "button",
|
|
4467
5006
|
children: "View"
|
|
@@ -4470,7 +5009,7 @@ function ProcessorsInspector({ getProcessors, onRetry }) {
|
|
|
4470
5009
|
/* @__PURE__ */ jsx("td", {
|
|
4471
5010
|
className: "border-l border-gray-300 px-3 py-2 text-xs",
|
|
4472
5011
|
children: /* @__PURE__ */ jsxs("span", {
|
|
4473
|
-
className: twMerge("inline-flex items-center gap-1 rounded px-1.5 py-0.5", processor.status === "active" ? "bg-green-100 text-green-700" : "bg-red-100 text-red-700"),
|
|
5012
|
+
className: twMerge("inline-flex items-center gap-1 rounded-sm px-1.5 py-0.5", processor.status === "active" ? "bg-green-100 text-green-700" : "bg-red-100 text-red-700"),
|
|
4474
5013
|
children: [
|
|
4475
5014
|
processor.status === "active" && /* @__PURE__ */ jsx("span", { className: "inline-block size-1.5 rounded-full bg-green-500" }),
|
|
4476
5015
|
processor.status === "errored" && /* @__PURE__ */ jsx("span", { className: "inline-block size-1.5 rounded-full bg-red-500" }),
|
|
@@ -4535,7 +5074,7 @@ function ProcessorsInspector({ getProcessors, onRetry }) {
|
|
|
4535
5074
|
/* @__PURE__ */ jsx("td", {
|
|
4536
5075
|
className: "border-l border-gray-300 px-3 py-2 text-xs",
|
|
4537
5076
|
children: processor.status === "errored" && onRetry && /* @__PURE__ */ jsx("button", {
|
|
4538
|
-
className: "flex items-center gap-1 rounded bg-yellow-50 px-2 py-1 text-xs text-yellow-700 hover:bg-yellow-100 disabled:opacity-50",
|
|
5077
|
+
className: "flex items-center gap-1 rounded-sm bg-yellow-50 px-2 py-1 text-xs text-yellow-700 hover:bg-yellow-100 disabled:opacity-50",
|
|
4539
5078
|
disabled: retryingId === processor.processorId,
|
|
4540
5079
|
onClick: () => void handleRetry(processor.processorId),
|
|
4541
5080
|
type: "button",
|
|
@@ -4728,7 +5267,7 @@ function QueueInspector({ getQueueState, onPause, onResume }) {
|
|
|
4728
5267
|
}), /* @__PURE__ */ jsxs("div", {
|
|
4729
5268
|
className: "flex items-center gap-2",
|
|
4730
5269
|
children: [/* @__PURE__ */ jsxs("button", {
|
|
4731
|
-
className: twMerge("flex items-center gap-1 rounded border px-3 py-1.5 text-sm disabled:opacity-50", state.isPaused ? "border-green-300 bg-green-50 text-green-700 hover:bg-green-100" : "border-yellow-300 bg-yellow-50 text-yellow-700 hover:bg-yellow-100"),
|
|
5270
|
+
className: twMerge("flex items-center gap-1 rounded-sm border px-3 py-1.5 text-sm disabled:opacity-50", state.isPaused ? "border-green-300 bg-green-50 text-green-700 hover:bg-green-100" : "border-yellow-300 bg-yellow-50 text-yellow-700 hover:bg-yellow-100"),
|
|
4732
5271
|
disabled: actionInProgress,
|
|
4733
5272
|
onClick: () => void handlePauseResume(),
|
|
4734
5273
|
type: "button",
|
|
@@ -4737,7 +5276,7 @@ function QueueInspector({ getQueueState, onPause, onResume }) {
|
|
|
4737
5276
|
size: 14
|
|
4738
5277
|
}), state.isPaused ? "Resume" : "Pause"]
|
|
4739
5278
|
}), /* @__PURE__ */ jsxs("button", {
|
|
4740
|
-
className: "flex items-center gap-1 rounded border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-100 disabled:opacity-50",
|
|
5279
|
+
className: "flex items-center gap-1 rounded-sm border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-100 disabled:opacity-50",
|
|
4741
5280
|
disabled: loading,
|
|
4742
5281
|
onClick: () => void handleRefresh(),
|
|
4743
5282
|
type: "button",
|
|
@@ -4813,7 +5352,7 @@ function QueueInspector({ getQueueState, onPause, onResume }) {
|
|
|
4813
5352
|
/* @__PURE__ */ jsx("td", {
|
|
4814
5353
|
className: "px-3 py-2 text-xs",
|
|
4815
5354
|
children: /* @__PURE__ */ jsx("button", {
|
|
4816
|
-
className: "flex items-center gap-1 rounded bg-blue-50 px-2 py-1 text-xs text-blue-700 hover:bg-blue-100",
|
|
5355
|
+
className: "flex items-center gap-1 rounded-sm bg-blue-50 px-2 py-1 text-xs text-blue-700 hover:bg-blue-100",
|
|
4817
5356
|
onClick: () => setSelectedJob(job),
|
|
4818
5357
|
type: "button",
|
|
4819
5358
|
children: "View"
|
|
@@ -4830,7 +5369,7 @@ function QueueInspector({ getQueueState, onPause, onResume }) {
|
|
|
4830
5369
|
/* @__PURE__ */ jsx("td", {
|
|
4831
5370
|
className: "border-l border-gray-300 px-3 py-2 text-xs text-gray-900",
|
|
4832
5371
|
children: /* @__PURE__ */ jsx("span", {
|
|
4833
|
-
className: twMerge("inline-block rounded px-1.5 py-0.5", job.kind === "mutation" ? "bg-purple-100 text-purple-700" : "bg-blue-100 text-blue-700"),
|
|
5372
|
+
className: twMerge("inline-block rounded-sm px-1.5 py-0.5", job.kind === "mutation" ? "bg-purple-100 text-purple-700" : "bg-blue-100 text-blue-700"),
|
|
4834
5373
|
children: job.kind
|
|
4835
5374
|
})
|
|
4836
5375
|
}),
|
|
@@ -4873,7 +5412,7 @@ function QueueInspector({ getQueueState, onPause, onResume }) {
|
|
|
4873
5412
|
/* @__PURE__ */ jsx("td", {
|
|
4874
5413
|
className: "border-l border-gray-300 px-3 py-2 text-xs",
|
|
4875
5414
|
children: /* @__PURE__ */ jsxs("span", {
|
|
4876
|
-
className: twMerge("inline-flex items-center gap-1 rounded px-1.5 py-0.5", job.status === "executing" ? "bg-green-100 text-green-700" : "bg-gray-100 text-gray-600"),
|
|
5415
|
+
className: twMerge("inline-flex items-center gap-1 rounded-sm px-1.5 py-0.5", job.status === "executing" ? "bg-green-100 text-green-700" : "bg-gray-100 text-gray-600"),
|
|
4877
5416
|
children: [job.status === "executing" && /* @__PURE__ */ jsx("span", { className: "inline-block size-1.5 animate-pulse rounded-full bg-green-500" }), job.status]
|
|
4878
5417
|
})
|
|
4879
5418
|
})
|
|
@@ -4911,7 +5450,7 @@ function ConnectionStateBadge({ state, failureCount }) {
|
|
|
4911
5450
|
return /* @__PURE__ */ jsxs("span", {
|
|
4912
5451
|
className: twMerge("inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium", stateStyles[state] ?? "bg-gray-100 text-gray-600"),
|
|
4913
5452
|
children: [state, failureCount > 0 && /* @__PURE__ */ jsxs("span", {
|
|
4914
|
-
className: "text-
|
|
5453
|
+
className: "text-xs opacity-75",
|
|
4915
5454
|
children: [
|
|
4916
5455
|
"(",
|
|
4917
5456
|
failureCount,
|
|
@@ -5096,7 +5635,7 @@ function MailboxTable({ title, mailboxType, operations, sort, onSort, collapsed,
|
|
|
5096
5635
|
")"
|
|
5097
5636
|
]
|
|
5098
5637
|
}), operations.length > 0 && /* @__PURE__ */ jsxs("button", {
|
|
5099
|
-
className: "flex items-center gap-1 rounded bg-gray-100 px-2 py-1 text-xs text-gray-700 hover:bg-gray-200",
|
|
5638
|
+
className: "flex items-center gap-1 rounded-sm bg-gray-100 px-2 py-1 text-xs text-gray-700 hover:bg-gray-200",
|
|
5100
5639
|
onClick: () => void handleCopyAll(),
|
|
5101
5640
|
type: "button",
|
|
5102
5641
|
children: [/* @__PURE__ */ jsx(Icon, {
|
|
@@ -5140,7 +5679,7 @@ function MailboxTable({ title, mailboxType, operations, sort, onSort, collapsed,
|
|
|
5140
5679
|
/* @__PURE__ */ jsx("td", {
|
|
5141
5680
|
className: "px-3 py-2 text-xs",
|
|
5142
5681
|
children: /* @__PURE__ */ jsx("button", {
|
|
5143
|
-
className: "flex items-center gap-1 rounded bg-blue-50 px-2 py-1 text-xs text-blue-700 hover:bg-blue-100",
|
|
5682
|
+
className: "flex items-center gap-1 rounded-sm bg-blue-50 px-2 py-1 text-xs text-blue-700 hover:bg-blue-100",
|
|
5144
5683
|
onClick: () => setSelectedOperation(op),
|
|
5145
5684
|
type: "button",
|
|
5146
5685
|
children: "View"
|
|
@@ -5300,7 +5839,7 @@ function ChannelInspector({ remoteName, channel, onBack, onRefresh, connectionSt
|
|
|
5300
5839
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
5301
5840
|
className: "flex items-center gap-2",
|
|
5302
5841
|
children: [/* @__PURE__ */ jsxs("button", {
|
|
5303
|
-
className: "flex items-center gap-1 rounded border border-gray-300 bg-white px-2 py-1 text-sm text-gray-700 hover:bg-gray-100",
|
|
5842
|
+
className: "flex items-center gap-1 rounded-sm border border-gray-300 bg-white px-2 py-1 text-sm text-gray-700 hover:bg-gray-100",
|
|
5304
5843
|
onClick: onBack,
|
|
5305
5844
|
type: "button",
|
|
5306
5845
|
children: [/* @__PURE__ */ jsx(Icon, {
|
|
@@ -5313,7 +5852,7 @@ function ChannelInspector({ remoteName, channel, onBack, onRefresh, connectionSt
|
|
|
5313
5852
|
children: ["Channel: ", remoteName]
|
|
5314
5853
|
})]
|
|
5315
5854
|
}), onRefresh && /* @__PURE__ */ jsxs("button", {
|
|
5316
|
-
className: "flex items-center gap-1 rounded border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-100",
|
|
5855
|
+
className: "flex items-center gap-1 rounded-sm border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-100",
|
|
5317
5856
|
onClick: onRefresh,
|
|
5318
5857
|
type: "button",
|
|
5319
5858
|
children: [/* @__PURE__ */ jsx(Icon, {
|
|
@@ -5323,7 +5862,7 @@ function ChannelInspector({ remoteName, channel, onBack, onRefresh, connectionSt
|
|
|
5323
5862
|
})]
|
|
5324
5863
|
}),
|
|
5325
5864
|
connectionState && /* @__PURE__ */ jsxs("div", {
|
|
5326
|
-
className: "rounded border border-gray-200 bg-white p-4",
|
|
5865
|
+
className: "rounded-sm border border-gray-200 bg-white p-4",
|
|
5327
5866
|
children: [/* @__PURE__ */ jsx("h3", {
|
|
5328
5867
|
className: "mb-3 text-sm font-semibold text-gray-900",
|
|
5329
5868
|
children: "Connection State"
|
|
@@ -5360,7 +5899,7 @@ function ChannelInspector({ remoteName, channel, onBack, onRefresh, connectionSt
|
|
|
5360
5899
|
})]
|
|
5361
5900
|
}),
|
|
5362
5901
|
pollerControls && /* @__PURE__ */ jsxs("div", {
|
|
5363
|
-
className: "rounded border border-gray-200 bg-white p-4",
|
|
5902
|
+
className: "rounded-sm border border-gray-200 bg-white p-4",
|
|
5364
5903
|
children: [/* @__PURE__ */ jsx("h3", {
|
|
5365
5904
|
className: "mb-3 text-sm font-semibold text-gray-900",
|
|
5366
5905
|
children: "Poller"
|
|
@@ -5387,7 +5926,7 @@ function ChannelInspector({ remoteName, channel, onBack, onRefresh, connectionSt
|
|
|
5387
5926
|
children: "Interval:"
|
|
5388
5927
|
}),
|
|
5389
5928
|
/* @__PURE__ */ jsx("input", {
|
|
5390
|
-
className: "w-20 rounded border border-gray-300 px-2 py-1 text-sm",
|
|
5929
|
+
className: "w-20 rounded-sm border border-gray-300 px-2 py-1 text-sm",
|
|
5391
5930
|
id: "poll-interval",
|
|
5392
5931
|
min: 100,
|
|
5393
5932
|
onChange: (e) => setIntervalMs(Number(e.target.value)),
|
|
@@ -5402,7 +5941,7 @@ function ChannelInspector({ remoteName, channel, onBack, onRefresh, connectionSt
|
|
|
5402
5941
|
children: "ms"
|
|
5403
5942
|
}),
|
|
5404
5943
|
/* @__PURE__ */ jsx("button", {
|
|
5405
|
-
className: "ml-1 rounded border border-gray-300 bg-white px-2 py-1 text-sm text-gray-700 hover:bg-gray-100",
|
|
5944
|
+
className: "ml-1 rounded-sm border border-gray-300 bg-white px-2 py-1 text-sm text-gray-700 hover:bg-gray-100",
|
|
5406
5945
|
onClick: handleApplyInterval,
|
|
5407
5946
|
type: "button",
|
|
5408
5947
|
children: "Apply"
|
|
@@ -5412,17 +5951,17 @@ function ChannelInspector({ remoteName, channel, onBack, onRefresh, connectionSt
|
|
|
5412
5951
|
}), /* @__PURE__ */ jsxs("div", {
|
|
5413
5952
|
className: "flex gap-2",
|
|
5414
5953
|
children: [pollerState.isPaused ? /* @__PURE__ */ jsx("button", {
|
|
5415
|
-
className: "flex items-center gap-1 rounded border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-100",
|
|
5954
|
+
className: "flex items-center gap-1 rounded-sm border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-100",
|
|
5416
5955
|
onClick: handleResume,
|
|
5417
5956
|
type: "button",
|
|
5418
5957
|
children: "Resume"
|
|
5419
5958
|
}) : /* @__PURE__ */ jsx("button", {
|
|
5420
|
-
className: "flex items-center gap-1 rounded border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-100",
|
|
5959
|
+
className: "flex items-center gap-1 rounded-sm border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-100",
|
|
5421
5960
|
onClick: handlePause,
|
|
5422
5961
|
type: "button",
|
|
5423
5962
|
children: "Pause"
|
|
5424
5963
|
}), /* @__PURE__ */ jsx("button", {
|
|
5425
|
-
className: "flex items-center gap-1 rounded border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-100 disabled:cursor-not-allowed disabled:opacity-50",
|
|
5964
|
+
className: "flex items-center gap-1 rounded-sm border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-100 disabled:cursor-not-allowed disabled:opacity-50",
|
|
5426
5965
|
disabled: !pollerState.isPaused,
|
|
5427
5966
|
onClick: handlePollNow,
|
|
5428
5967
|
type: "button",
|
|
@@ -5432,7 +5971,7 @@ function ChannelInspector({ remoteName, channel, onBack, onRefresh, connectionSt
|
|
|
5432
5971
|
})]
|
|
5433
5972
|
}),
|
|
5434
5973
|
/* @__PURE__ */ jsxs("div", {
|
|
5435
|
-
className: "rounded border border-gray-200 bg-white p-4",
|
|
5974
|
+
className: "rounded-sm border border-gray-200 bg-white p-4",
|
|
5436
5975
|
children: [/* @__PURE__ */ jsx("h3", {
|
|
5437
5976
|
className: "mb-3 text-sm font-semibold text-gray-900",
|
|
5438
5977
|
children: "Mailbox Processing"
|
|
@@ -5462,17 +6001,17 @@ function ChannelInspector({ remoteName, channel, onBack, onRefresh, connectionSt
|
|
|
5462
6001
|
}), /* @__PURE__ */ jsxs("div", {
|
|
5463
6002
|
className: "flex gap-2",
|
|
5464
6003
|
children: [mailboxStates.inbox.isPaused ? /* @__PURE__ */ jsx("button", {
|
|
5465
|
-
className: "flex items-center gap-1 rounded border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-100",
|
|
6004
|
+
className: "flex items-center gap-1 rounded-sm border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-100",
|
|
5466
6005
|
onClick: () => handleMailboxResume("inbox"),
|
|
5467
6006
|
type: "button",
|
|
5468
6007
|
children: "Resume"
|
|
5469
6008
|
}) : /* @__PURE__ */ jsx("button", {
|
|
5470
|
-
className: "flex items-center gap-1 rounded border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-100",
|
|
6009
|
+
className: "flex items-center gap-1 rounded-sm border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-100",
|
|
5471
6010
|
onClick: () => handleMailboxPause("inbox"),
|
|
5472
6011
|
type: "button",
|
|
5473
6012
|
children: "Pause"
|
|
5474
6013
|
}), /* @__PURE__ */ jsx("button", {
|
|
5475
|
-
className: "flex items-center gap-1 rounded border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-100 disabled:cursor-not-allowed disabled:opacity-50",
|
|
6014
|
+
className: "flex items-center gap-1 rounded-sm border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-100 disabled:cursor-not-allowed disabled:opacity-50",
|
|
5476
6015
|
disabled: !mailboxStates.inbox.isPaused,
|
|
5477
6016
|
onClick: () => handleMailboxFlush("inbox"),
|
|
5478
6017
|
type: "button",
|
|
@@ -5503,17 +6042,17 @@ function ChannelInspector({ remoteName, channel, onBack, onRefresh, connectionSt
|
|
|
5503
6042
|
}), /* @__PURE__ */ jsxs("div", {
|
|
5504
6043
|
className: "flex gap-2",
|
|
5505
6044
|
children: [mailboxStates.outbox.isPaused ? /* @__PURE__ */ jsx("button", {
|
|
5506
|
-
className: "flex items-center gap-1 rounded border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-100",
|
|
6045
|
+
className: "flex items-center gap-1 rounded-sm border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-100",
|
|
5507
6046
|
onClick: () => handleMailboxResume("outbox"),
|
|
5508
6047
|
type: "button",
|
|
5509
6048
|
children: "Resume"
|
|
5510
6049
|
}) : /* @__PURE__ */ jsx("button", {
|
|
5511
|
-
className: "flex items-center gap-1 rounded border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-100",
|
|
6050
|
+
className: "flex items-center gap-1 rounded-sm border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-100",
|
|
5512
6051
|
onClick: () => handleMailboxPause("outbox"),
|
|
5513
6052
|
type: "button",
|
|
5514
6053
|
children: "Pause"
|
|
5515
6054
|
}), /* @__PURE__ */ jsx("button", {
|
|
5516
|
-
className: "flex items-center gap-1 rounded border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-100 disabled:cursor-not-allowed disabled:opacity-50",
|
|
6055
|
+
className: "flex items-center gap-1 rounded-sm border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-100 disabled:cursor-not-allowed disabled:opacity-50",
|
|
5517
6056
|
disabled: !mailboxStates.outbox.isPaused,
|
|
5518
6057
|
onClick: () => handleMailboxFlush("outbox"),
|
|
5519
6058
|
type: "button",
|
|
@@ -5725,7 +6264,7 @@ function RemotesInspector({ getRemotes, removeRemote, addRemoteManual, triggerPu
|
|
|
5725
6264
|
children: [addRemoteManual && /* @__PURE__ */ jsxs("div", {
|
|
5726
6265
|
className: "flex items-center gap-1",
|
|
5727
6266
|
children: [/* @__PURE__ */ jsx("input", {
|
|
5728
|
-
className: "w-[260px] rounded border border-gray-300 px-2 py-1.5 text-sm text-gray-900 placeholder:text-gray-400",
|
|
6267
|
+
className: "w-[260px] rounded-sm border border-gray-300 px-2 py-1.5 text-sm text-gray-900 placeholder:text-gray-400",
|
|
5729
6268
|
disabled: adding,
|
|
5730
6269
|
onChange: (e) => setManualUrl(e.target.value),
|
|
5731
6270
|
onKeyDown: (e) => {
|
|
@@ -5735,7 +6274,7 @@ function RemotesInspector({ getRemotes, removeRemote, addRemoteManual, triggerPu
|
|
|
5735
6274
|
type: "text",
|
|
5736
6275
|
value: manualUrl
|
|
5737
6276
|
}), /* @__PURE__ */ jsx("button", {
|
|
5738
|
-
className: "flex items-center gap-1 rounded border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-100 disabled:opacity-50",
|
|
6277
|
+
className: "flex items-center gap-1 rounded-sm border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-100 disabled:opacity-50",
|
|
5739
6278
|
disabled: adding || !manualUrl.trim(),
|
|
5740
6279
|
onClick: () => void handleAddManual(),
|
|
5741
6280
|
title: "Register a remote drive in manual poll mode (no background polling)",
|
|
@@ -5743,7 +6282,7 @@ function RemotesInspector({ getRemotes, removeRemote, addRemoteManual, triggerPu
|
|
|
5743
6282
|
children: "Add (manual)"
|
|
5744
6283
|
})]
|
|
5745
6284
|
}), /* @__PURE__ */ jsxs("button", {
|
|
5746
|
-
className: "flex items-center gap-1 rounded border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-100 disabled:opacity-50",
|
|
6285
|
+
className: "flex items-center gap-1 rounded-sm border border-gray-300 bg-white px-3 py-1.5 text-sm text-gray-700 hover:bg-gray-100 disabled:opacity-50",
|
|
5747
6286
|
disabled: loading,
|
|
5748
6287
|
onClick: () => void handleRefresh(),
|
|
5749
6288
|
type: "button",
|
|
@@ -5755,7 +6294,7 @@ function RemotesInspector({ getRemotes, removeRemote, addRemoteManual, triggerPu
|
|
|
5755
6294
|
})]
|
|
5756
6295
|
}),
|
|
5757
6296
|
addError && /* @__PURE__ */ jsx("div", {
|
|
5758
|
-
className: "shrink-0 rounded border border-red-300 bg-red-50 px-3 py-1.5 text-xs text-red-700",
|
|
6297
|
+
className: "shrink-0 rounded-sm border border-red-300 bg-red-50 px-3 py-1.5 text-xs text-red-700",
|
|
5759
6298
|
children: addError
|
|
5760
6299
|
}),
|
|
5761
6300
|
/* @__PURE__ */ jsx("div", {
|
|
@@ -5840,7 +6379,7 @@ function RemotesInspector({ getRemotes, removeRemote, addRemoteManual, triggerPu
|
|
|
5840
6379
|
/* @__PURE__ */ jsx("td", {
|
|
5841
6380
|
className: "border-l border-gray-300 px-3 py-2",
|
|
5842
6381
|
children: /* @__PURE__ */ jsxs("button", {
|
|
5843
|
-
className: "flex items-center gap-1 rounded bg-blue-50 px-2 py-1 text-xs text-blue-700 hover:bg-blue-100",
|
|
6382
|
+
className: "flex items-center gap-1 rounded-sm bg-blue-50 px-2 py-1 text-xs text-blue-700 hover:bg-blue-100",
|
|
5844
6383
|
onClick: () => handleViewChannel(remote),
|
|
5845
6384
|
type: "button",
|
|
5846
6385
|
children: ["View", /* @__PURE__ */ jsx(Icon, {
|
|
@@ -5854,13 +6393,13 @@ function RemotesInspector({ getRemotes, removeRemote, addRemoteManual, triggerPu
|
|
|
5854
6393
|
children: /* @__PURE__ */ jsxs("div", {
|
|
5855
6394
|
className: "flex items-center gap-1",
|
|
5856
6395
|
children: [triggerPull && /* @__PURE__ */ jsx("button", {
|
|
5857
|
-
className: "rounded bg-gray-100 px-2 py-1 text-xs text-gray-700 hover:bg-gray-200",
|
|
6396
|
+
className: "rounded-sm bg-gray-100 px-2 py-1 text-xs text-gray-700 hover:bg-gray-200",
|
|
5858
6397
|
onClick: () => handlePull(remote),
|
|
5859
6398
|
title: "Trigger a single pull cycle for this remote",
|
|
5860
6399
|
type: "button",
|
|
5861
6400
|
children: "Pull"
|
|
5862
6401
|
}), removeRemote && /* @__PURE__ */ jsx("button", {
|
|
5863
|
-
className: "rounded bg-red-50 px-2 py-1 text-xs text-red-700 hover:bg-red-100",
|
|
6402
|
+
className: "rounded-sm bg-red-50 px-2 py-1 text-xs text-red-700 hover:bg-red-100",
|
|
5864
6403
|
onClick: () => void handleRemove(remote),
|
|
5865
6404
|
type: "button",
|
|
5866
6405
|
children: "Remove"
|
|
@@ -5899,7 +6438,7 @@ function InspectorModal({ open, onOpenChange, modalProps, containerProps, dbExpl
|
|
|
5899
6438
|
open,
|
|
5900
6439
|
children: /* @__PURE__ */ jsxs("div", {
|
|
5901
6440
|
...containerProps,
|
|
5902
|
-
className: twMerge("flex
|
|
6441
|
+
className: twMerge("flex size-full flex-col bg-white", containerProps?.className),
|
|
5903
6442
|
children: [/* @__PURE__ */ jsx("div", {
|
|
5904
6443
|
className: "flex shrink-0 items-center justify-end px-3 pt-3",
|
|
5905
6444
|
children: /* @__PURE__ */ jsx("button", {
|
|
@@ -6010,7 +6549,7 @@ function PackageInstallModal(props) {
|
|
|
6010
6549
|
},
|
|
6011
6550
|
...restProps,
|
|
6012
6551
|
children: /* @__PURE__ */ jsxs("div", {
|
|
6013
|
-
className: "w-[460px] p-6 text-slate-300",
|
|
6552
|
+
className: "w-[460px] bg-white p-6 text-slate-300",
|
|
6014
6553
|
children: [
|
|
6015
6554
|
/* @__PURE__ */ jsx("div", {
|
|
6016
6555
|
className: "border-b border-slate-50 pb-2 text-2xl font-bold text-gray-800",
|
|
@@ -6102,7 +6641,7 @@ function ReadRequiredModal(props) {
|
|
|
6102
6641
|
},
|
|
6103
6642
|
...restProps,
|
|
6104
6643
|
children: /* @__PURE__ */ jsxs("div", {
|
|
6105
|
-
...mergeClassNameProps(containerProps, "w-[500px] p-6 text-slate-300"),
|
|
6644
|
+
...mergeClassNameProps(containerProps, "w-[500px] bg-white p-6 text-slate-300"),
|
|
6106
6645
|
children: [
|
|
6107
6646
|
/* @__PURE__ */ jsx("div", {
|
|
6108
6647
|
...mergeClassNameProps(headerProps, "border-b border-slate-50 pb-2 text-2xl font-bold text-gray-800"),
|
|
@@ -6286,10 +6825,10 @@ function Drive(props) {
|
|
|
6286
6825
|
children: [
|
|
6287
6826
|
icon,
|
|
6288
6827
|
/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("span", {
|
|
6289
|
-
className: "block text-sm font-medium
|
|
6828
|
+
className: "block text-sm/4.5 font-medium",
|
|
6290
6829
|
children: capitalCase(drive.header.name)
|
|
6291
6830
|
}), /* @__PURE__ */ jsxs("div", {
|
|
6292
|
-
className: "flex items-baseline gap-x-2 leading-
|
|
6831
|
+
className: "flex items-baseline gap-x-2 leading-4.5",
|
|
6293
6832
|
children: [/* @__PURE__ */ jsxs("span", {
|
|
6294
6833
|
className: "text-sm text-gray-600",
|
|
6295
6834
|
children: [capitalCase(getDriveSharingType(drive)), " App"]
|
|
@@ -6297,7 +6836,7 @@ function Drive(props) {
|
|
|
6297
6836
|
href: "https://www.powerhouse.inc/",
|
|
6298
6837
|
target: "_blank",
|
|
6299
6838
|
rel: "noopener noreferrer",
|
|
6300
|
-
className: "group flex items-center gap-x-2 text-sm text-slate-500 transition-colors hover:text-
|
|
6839
|
+
className: "group flex items-center gap-x-2 text-sm text-slate-500 transition-colors hover:text-purple-700",
|
|
6301
6840
|
children: ["By Powerhouse", /* @__PURE__ */ jsx("svg", {
|
|
6302
6841
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6303
6842
|
viewBox: "0 0 12 12",
|
|
@@ -6353,7 +6892,7 @@ function LocalStorage(props) {
|
|
|
6353
6892
|
function DefaultEditor(props) {
|
|
6354
6893
|
const { className, ...rest } = props;
|
|
6355
6894
|
return /* @__PURE__ */ jsx("div", {
|
|
6356
|
-
className: twMerge("rounded-lg p-3", className),
|
|
6895
|
+
className: twMerge("rounded-lg bg-white p-3", className),
|
|
6357
6896
|
children: /* @__PURE__ */ jsx(DefaultEditorSelect, { ...rest })
|
|
6358
6897
|
});
|
|
6359
6898
|
}
|
|
@@ -6363,7 +6902,7 @@ function DefaultEditorSelect(props) {
|
|
|
6363
6902
|
className: "mb-4 font-semibold text-gray-900",
|
|
6364
6903
|
children: "Default Editor Selection"
|
|
6365
6904
|
}), /* @__PURE__ */ jsx(SelectFieldRaw, {
|
|
6366
|
-
className: twMerge("
|
|
6905
|
+
className: twMerge("max-w-fit min-w-36", className),
|
|
6367
6906
|
name: "default-editor",
|
|
6368
6907
|
required: true,
|
|
6369
6908
|
value: documentModelEditor,
|
|
@@ -6464,7 +7003,7 @@ const VersionPicker = (props) => {
|
|
|
6464
7003
|
},
|
|
6465
7004
|
children: [/* @__PURE__ */ jsxs(PopoverTrigger, {
|
|
6466
7005
|
disabled: disabled || !hasAnyPickable,
|
|
6467
|
-
className: cn("flex items-center justify-between gap-2 rounded-md border border-gray-300 bg-white px-2.5 py-1 text-xs font-medium text-gray-800 transition-colors", "hover:bg-gray-50 focus:
|
|
7006
|
+
className: cn("flex items-center justify-between gap-2 rounded-md border border-gray-300 bg-white px-2.5 py-1 text-xs font-medium text-gray-800 transition-colors", "hover:bg-gray-50 focus:ring-2 focus:ring-gray-900/20 focus:outline-none", "disabled:cursor-not-allowed disabled:opacity-60", className),
|
|
6468
7007
|
"data-version-picker-trigger": true,
|
|
6469
7008
|
children: [/* @__PURE__ */ jsx("span", {
|
|
6470
7009
|
className: "truncate",
|
|
@@ -6487,7 +7026,7 @@ const VersionPicker = (props) => {
|
|
|
6487
7026
|
children: [/* @__PURE__ */ jsx(Icon, {
|
|
6488
7027
|
name: "Search",
|
|
6489
7028
|
size: 14,
|
|
6490
|
-
className: "absolute
|
|
7029
|
+
className: "absolute top-1/2 left-2 -translate-y-1/2 text-gray-400"
|
|
6491
7030
|
}), /* @__PURE__ */ jsx(Input, {
|
|
6492
7031
|
value: query,
|
|
6493
7032
|
onChange: (e) => setQuery(e.target.value),
|
|
@@ -6505,7 +7044,7 @@ const VersionPicker = (props) => {
|
|
|
6505
7044
|
filteredTags.length > 0 && /* @__PURE__ */ jsxs("div", {
|
|
6506
7045
|
className: "pb-1",
|
|
6507
7046
|
children: [/* @__PURE__ */ jsx("p", {
|
|
6508
|
-
className: "px-3 py-1 text-
|
|
7047
|
+
className: "px-3 py-1 text-xs font-semibold tracking-wide text-gray-500 uppercase",
|
|
6509
7048
|
children: "Tags"
|
|
6510
7049
|
}), filteredTags.map(([tag, ver]) => {
|
|
6511
7050
|
return /* @__PURE__ */ jsxs("button", {
|
|
@@ -6530,7 +7069,7 @@ const VersionPicker = (props) => {
|
|
|
6530
7069
|
})]
|
|
6531
7070
|
}),
|
|
6532
7071
|
filteredVersions.length > 0 && /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
|
|
6533
|
-
className: "px-3 py-1 text-
|
|
7072
|
+
className: "px-3 py-1 text-xs font-semibold tracking-wide text-gray-500 uppercase",
|
|
6534
7073
|
children: "Versions"
|
|
6535
7074
|
}), filteredVersions.map((ver) => {
|
|
6536
7075
|
return /* @__PURE__ */ jsx("button", {
|
|
@@ -6591,7 +7130,7 @@ function PackageResultCard(props) {
|
|
|
6591
7130
|
const isSelecting = selectingValue === installSpec;
|
|
6592
7131
|
const isDisabled = option.disabled === true;
|
|
6593
7132
|
return /* @__PURE__ */ jsxs("div", {
|
|
6594
|
-
className: "flex items-start justify-between gap-3 rounded-md
|
|
7133
|
+
className: "flex items-start justify-between gap-3 rounded-md p-2 hover:bg-gray-50",
|
|
6595
7134
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
6596
7135
|
className: "min-w-0 flex-1",
|
|
6597
7136
|
children: [
|
|
@@ -6737,7 +7276,7 @@ const PackageManagerListItem = (props) => {
|
|
|
6737
7276
|
}
|
|
6738
7277
|
const dropdownItems = getDropdownItems();
|
|
6739
7278
|
return /* @__PURE__ */ jsxs("li", {
|
|
6740
|
-
className: twMerge("relative flex flex-col items-start rounded-md border border-gray-200 p-3 text-sm
|
|
7279
|
+
className: twMerge("relative flex flex-col items-start rounded-md border border-gray-200 bg-white p-3 text-sm/5 shadow-sm", className),
|
|
6741
7280
|
children: [
|
|
6742
7281
|
/* @__PURE__ */ jsxs("div", {
|
|
6743
7282
|
className: "flex flex-wrap items-center gap-2 pr-8",
|
|
@@ -6792,7 +7331,7 @@ const PackageManagerListItem = (props) => {
|
|
|
6792
7331
|
onOpenChange: setIsDropdownMenuOpen,
|
|
6793
7332
|
open: isDropdownMenuOpen,
|
|
6794
7333
|
children: /* @__PURE__ */ jsx("button", {
|
|
6795
|
-
className: "group absolute
|
|
7334
|
+
className: "group absolute top-3 right-3",
|
|
6796
7335
|
onClick: (e) => {
|
|
6797
7336
|
e.stopPropagation();
|
|
6798
7337
|
setIsDropdownMenuOpen(true);
|
|
@@ -6946,9 +7485,9 @@ const PackageSection = ({ sectionId, title, count, isEmpty, emptyText, children
|
|
|
6946
7485
|
};
|
|
6947
7486
|
const PackageSubSection = ({ title, count, children }) => {
|
|
6948
7487
|
return /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs("h4", {
|
|
6949
|
-
className: "mb-2 flex items-baseline gap-2 text-xs font-semibold
|
|
7488
|
+
className: "mb-2 flex items-baseline gap-2 text-xs font-semibold tracking-wide text-gray-500 uppercase",
|
|
6950
7489
|
children: [/* @__PURE__ */ jsx("span", { children: title }), /* @__PURE__ */ jsxs("span", {
|
|
6951
|
-
className: "font-medium
|
|
7490
|
+
className: "font-medium tracking-normal text-gray-400 normal-case",
|
|
6952
7491
|
children: [
|
|
6953
7492
|
"(",
|
|
6954
7493
|
count,
|
|
@@ -6972,7 +7511,7 @@ const PackageList = ({ packages, onInstall, onUninstall }) => {
|
|
|
6972
7511
|
const PackageManager = (props) => {
|
|
6973
7512
|
const { registryPackageList, onInstall, onUninstall, mutable, disabled, className } = props;
|
|
6974
7513
|
return /* @__PURE__ */ jsxs("div", {
|
|
6975
|
-
className: twMerge("flex h-full flex-1 flex-col rounded-lg p-3", className),
|
|
7514
|
+
className: twMerge("flex h-full flex-1 flex-col rounded-lg bg-white p-3", className),
|
|
6976
7515
|
children: [mutable && /* @__PURE__ */ jsx(PackageManagerInput, {
|
|
6977
7516
|
className: "mb-4",
|
|
6978
7517
|
registryPackageList,
|
|
@@ -7034,7 +7573,7 @@ function SettingsModal(props) {
|
|
|
7034
7573
|
className: "flex flex-col gap-y-1 p-3 pt-6",
|
|
7035
7574
|
children: tabsContent
|
|
7036
7575
|
}), /* @__PURE__ */ jsx("div", {
|
|
7037
|
-
className: "m-6 flex h-full flex-1 flex-col overflow-hidden rounded-lg border border-slate-50",
|
|
7576
|
+
className: "m-6 flex h-full flex-1 flex-col overflow-hidden rounded-lg border border-slate-50 bg-white",
|
|
7038
7577
|
children: typeof SelectedTabComponent === "function" ? /* @__PURE__ */ jsx(SelectedTabComponent, {}) : SelectedTabComponent
|
|
7039
7578
|
})]
|
|
7040
7579
|
})]
|
|
@@ -7062,7 +7601,7 @@ const ClearStorageSettingsRow = (props) => {
|
|
|
7062
7601
|
return /* @__PURE__ */ jsx(SettingsRow, {
|
|
7063
7602
|
...restProps,
|
|
7064
7603
|
children: /* @__PURE__ */ jsx(PowerhouseButton, {
|
|
7065
|
-
className: "h-auto min-h-9 rounded border border-solid border-gray-300 bg-white px-3 py-0 text-sm text-red-800 hover:border-gray-500 hover:bg-white hover:text-red-900",
|
|
7604
|
+
className: "h-auto min-h-9 rounded-sm border border-solid border-gray-300 bg-white px-3 py-0 text-sm text-red-800 hover:border-gray-500 hover:bg-white hover:text-red-900",
|
|
7066
7605
|
icon: /* @__PURE__ */ jsx(Icon, {
|
|
7067
7606
|
name: "Trash",
|
|
7068
7607
|
size: 18
|
|
@@ -7089,7 +7628,7 @@ const SettingsModalOld = (props) => {
|
|
|
7089
7628
|
},
|
|
7090
7629
|
...restProps,
|
|
7091
7630
|
children: /* @__PURE__ */ jsxs("div", {
|
|
7092
|
-
className: "w-[432px] p-4 text-gray-900",
|
|
7631
|
+
className: "w-[432px] bg-white p-4 text-gray-900",
|
|
7093
7632
|
children: [
|
|
7094
7633
|
/* @__PURE__ */ jsxs("div", {
|
|
7095
7634
|
className: "flex justify-between",
|
|
@@ -7146,7 +7685,7 @@ function ConnectUpgradeDriveModal(props) {
|
|
|
7146
7685
|
},
|
|
7147
7686
|
...restProps,
|
|
7148
7687
|
children: /* @__PURE__ */ jsxs("div", {
|
|
7149
|
-
className: "w-[400px] p-6 text-slate-300",
|
|
7688
|
+
className: "w-[400px] bg-white p-6 text-slate-300",
|
|
7150
7689
|
children: [
|
|
7151
7690
|
/* @__PURE__ */ jsx("div", {
|
|
7152
7691
|
className: "border-b border-slate-50 pb-2 text-2xl font-bold text-gray-800",
|
|
@@ -7177,7 +7716,7 @@ function ConnectUpgradeDriveModal(props) {
|
|
|
7177
7716
|
function Branch(props) {
|
|
7178
7717
|
const { branch = "main" } = props;
|
|
7179
7718
|
return /* @__PURE__ */ jsxs("button", {
|
|
7180
|
-
className: "flex h-8 w-fit items-center gap-1 rounded-lg bg-slate-50 pl-1
|
|
7719
|
+
className: "flex h-8 w-fit items-center gap-1 rounded-lg bg-slate-50 pr-2 pl-1 text-xs text-stone-300",
|
|
7181
7720
|
children: [
|
|
7182
7721
|
/* @__PURE__ */ jsx(Icon, { name: "Branch" }),
|
|
7183
7722
|
/* @__PURE__ */ jsx("span", { children: "BRANCH" }),
|
|
@@ -7203,7 +7742,7 @@ function DocId(props) {
|
|
|
7203
7742
|
};
|
|
7204
7743
|
}
|
|
7205
7744
|
return /* @__PURE__ */ jsxs("button", {
|
|
7206
|
-
className: "flex h-8 w-fit items-center gap-1 rounded-lg bg-slate-50 pl-1
|
|
7745
|
+
className: "flex h-8 w-fit items-center gap-1 rounded-lg bg-slate-50 pr-2 pl-1 text-xs text-stone-300",
|
|
7207
7746
|
onClick: handleCopy(docId),
|
|
7208
7747
|
children: [
|
|
7209
7748
|
/* @__PURE__ */ jsx(Icon, { name: "Link" }),
|
|
@@ -7265,7 +7804,7 @@ function Header(props) {
|
|
|
7265
7804
|
className: "flex items-center gap-3",
|
|
7266
7805
|
children: [/* @__PURE__ */ jsx("button", {
|
|
7267
7806
|
name: "close-revision-history",
|
|
7268
|
-
className: "
|
|
7807
|
+
className: "rounded-lg bg-gray-50 p-1 text-stone-300 shadow-button",
|
|
7269
7808
|
onClick: onClose,
|
|
7270
7809
|
children: /* @__PURE__ */ jsx(Icon, { name: "VariantArrowLeft" })
|
|
7271
7810
|
}), /* @__PURE__ */ jsx("h1", {
|
|
@@ -7367,11 +7906,11 @@ function CodePopover(props) {
|
|
|
7367
7906
|
opener.cancel();
|
|
7368
7907
|
closer.call();
|
|
7369
7908
|
}
|
|
7370
|
-
return /* @__PURE__ */ jsxs(Root, {
|
|
7909
|
+
return /* @__PURE__ */ jsxs(Root$1, {
|
|
7371
7910
|
open: isOpen,
|
|
7372
7911
|
onOpenChange: (changedIsOpen) => changedIsOpen ? open() : close(),
|
|
7373
7912
|
children: [
|
|
7374
|
-
/* @__PURE__ */ jsx(Trigger, {
|
|
7913
|
+
/* @__PURE__ */ jsx(Trigger$1, {
|
|
7375
7914
|
onMouseEnter: open,
|
|
7376
7915
|
children: trigger
|
|
7377
7916
|
}),
|
|
@@ -7379,7 +7918,7 @@ function CodePopover(props) {
|
|
|
7379
7918
|
asChild: true,
|
|
7380
7919
|
children: anchor
|
|
7381
7920
|
}),
|
|
7382
|
-
/* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(Content, {
|
|
7921
|
+
/* @__PURE__ */ jsx(Portal$1, { children: /* @__PURE__ */ jsx(Content$1, {
|
|
7383
7922
|
forceMount: true,
|
|
7384
7923
|
onMouseLeave: close,
|
|
7385
7924
|
sideOffset: -28,
|
|
@@ -7390,7 +7929,7 @@ function CodePopover(props) {
|
|
|
7390
7929
|
bottom: -1e4,
|
|
7391
7930
|
left: 24
|
|
7392
7931
|
},
|
|
7393
|
-
className: "
|
|
7932
|
+
className: "z-50 rounded-lg border border-gray-200 bg-white p-2 text-xs shadow-tooltip outline-none",
|
|
7394
7933
|
children: content
|
|
7395
7934
|
}) })
|
|
7396
7935
|
]
|
|
@@ -7430,7 +7969,7 @@ function Errors(props) {
|
|
|
7430
7969
|
});
|
|
7431
7970
|
const text = hasErrors ? `Error: ${errors[0]}` : "No errors";
|
|
7432
7971
|
const content = /* @__PURE__ */ jsxs("span", {
|
|
7433
|
-
className: twMerge("flex w-fit items-center rounded-lg border border-gray-200 px-2 py-1 text-xs", color, hasErrors && "cursor-pointer"),
|
|
7972
|
+
className: twMerge("flex w-fit items-center rounded-lg border border-gray-200 bg-white px-2 py-1 text-xs", color, hasErrors && "cursor-pointer"),
|
|
7434
7973
|
children: [icon, /* @__PURE__ */ jsx("span", {
|
|
7435
7974
|
className: twMerge("inline-block max-w-36 truncate"),
|
|
7436
7975
|
children: text
|
|
@@ -7491,7 +8030,7 @@ function Signature(props) {
|
|
|
7491
8030
|
if (!signatures?.length) return null;
|
|
7492
8031
|
return /* @__PURE__ */ jsx(CodePopover, {
|
|
7493
8032
|
trigger: /* @__PURE__ */ jsxs("span", {
|
|
7494
|
-
className: "flex w-fit cursor-pointer items-center gap-1 rounded-lg border border-gray-200 px-2 py-1",
|
|
8033
|
+
className: "flex w-fit cursor-pointer items-center gap-1 rounded-lg border border-gray-200 bg-white px-2 py-1",
|
|
7495
8034
|
children: [
|
|
7496
8035
|
/* @__PURE__ */ jsx(VerificationStatus, { signatures }),
|
|
7497
8036
|
" ",
|
|
@@ -7861,7 +8400,7 @@ const SidebarItem = function SidebarItem(props) {
|
|
|
7861
8400
|
children: /* @__PURE__ */ jsxs("div", {
|
|
7862
8401
|
className: twMerge("group/sidebar-item relative flex cursor-pointer flex-col items-center justify-center text-center text-sm text-black", containerClassName, active && "bg-white", onClick && "cursor-pointer"),
|
|
7863
8402
|
onClick,
|
|
7864
|
-
children: [active ? /* @__PURE__ */ jsx("div", { className: "absolute
|
|
8403
|
+
children: [active ? /* @__PURE__ */ jsx("div", { className: "absolute top-1/2 left-0 h-10 w-1 -translate-y-1/2 rounded-r-sm bg-violet-400" }) : /* @__PURE__ */ jsx("div", { className: "absolute top-1/2 left-0 h-6 w-1 -translate-y-1/2 rounded-r-sm bg-zinc-300 opacity-0 transition-opacity group-hover/sidebar-item:opacity-100" }), /* @__PURE__ */ jsx("div", {
|
|
7865
8404
|
className: "mx-auto py-4",
|
|
7866
8405
|
children: icon || /* @__PURE__ */ jsx("div", {
|
|
7867
8406
|
className: "flex size-8 items-center justify-center rounded-lg bg-black",
|
|
@@ -7935,7 +8474,7 @@ const SidebarLogin = ({ onLogin }) => {
|
|
|
7935
8474
|
return /* @__PURE__ */ jsx(AccountPopover, {
|
|
7936
8475
|
content: /* @__PURE__ */ jsx(AccountPopoverLogin, { onLogin }),
|
|
7937
8476
|
children: /* @__PURE__ */ jsxs("div", {
|
|
7938
|
-
className: twMerge("group/sidebar-footer flex w-full items-baseline justify-start text-sm font-semibold
|
|
8477
|
+
className: twMerge("group/sidebar-footer flex w-full items-baseline justify-start text-sm/10 font-semibold text-gray-600", onLogin ? "cursor-pointer" : "cursor-wait"),
|
|
7939
8478
|
children: [/* @__PURE__ */ jsx("img", {
|
|
7940
8479
|
width: 42,
|
|
7941
8480
|
height: 42,
|
|
@@ -8101,7 +8640,7 @@ const ConnectSidebarFooter = ({ address, ensName, avatarUrl, className, onLogin,
|
|
|
8101
8640
|
className: "text-gray-600",
|
|
8102
8641
|
name: "Settings"
|
|
8103
8642
|
}), /* @__PURE__ */ jsx("span", {
|
|
8104
|
-
className: "hidden text-sm font-semibold
|
|
8643
|
+
className: "hidden text-sm/6 font-semibold text-gray-800",
|
|
8105
8644
|
children: "Settings"
|
|
8106
8645
|
})]
|
|
8107
8646
|
})
|
|
@@ -8189,6 +8728,6 @@ const removeSuccessFiles = (files) => {
|
|
|
8189
8728
|
return files.filter((file) => file.status !== "SUCCESS");
|
|
8190
8729
|
};
|
|
8191
8730
|
//#endregion
|
|
8192
|
-
export { About, AccountPopover, AddDriveModal, AddLocalDriveForm, AddLocalDriveModal, AddRemoteDriveForm, AddRemoteDriveModal, AnimatedLoader, Breadcrumb, Breadcrumbs, CONFLICT, ChannelInspector, ClearStorageSettingsRow, Combobox, ConnectConfirmationModal, ConnectDeleteDriveModal, ConnectDeleteItemModal, ConnectDropdownMenu, ConnectReplaceDuplicateModal, ConnectSearchBar, ConnectSelect, ConnectSidebar, ConnectSidebarFooter, ConnectSidebarHeader, ConnectTooltip, ConnectTooltipProvider, ConnectUpgradeDriveModal, ConnectionStateBadge, CookieBanner, CreateDocumentModal, DBExplorer, DangerZone, DebugInspector, DefaultEditor, DefaultEditorLoader, DefaultEditorSelect, DependencyVersions, Disclosure, Divider, DocumentStateViewer, DocumentTimeline, DocumentToolbar, DriveSettingsModal, DropZone, DropZoneWrapper, ENSAvatar, ERROR, EditorActionButtons, EditorUndoRedoButtons, FileItem, FolderItem, Footer, FooterLink, FormInput, FormattedJsonViewer, HomeBackgroundImage, HomeScreen, HomeScreenAddDriveItem, HomeScreenItem, INITIAL_SYNC, InspectorModal, IntegrityInspector, LoadingScreen, MISSING, NodeInput, ObjectInspectorModal, PackageInstallModal, PackageManager, PackageManagerInput, PackageManagerList, PackageManagerListItem, ProcessorsInspector, QueueInspector, ReadRequiredModal, RemotesInspector, RevisionHistory, SUCCESS, SYNCING, SettingsModal, SettingsModalOld, SettingsRow, SidebarAddDriveItem, SidebarItem, SidebarLogin, SidebarUser, SyncStatusIcon, TabContent, Tabs, Toggle, UploadFileItem, UploadFileList, UploadFileListContainer, debugNodeOptions, debugNodeOptionsMap, defaultDriveOptions, defaultNodeOptions, fileNodeDropdownOptions, folderNodeDropdownOptions, formatEthAddress, getFolderStatus, locationInfoByLocation, nodeOptions, normalNodeOptions, removeSuccessFiles, sharingTypeOptions, sortFilesByStatus, syncStatuses, useEns, verifyPackageJsonFields };
|
|
8731
|
+
export { About, AccountPopover, AddDriveModal, AddLocalDriveForm, AddLocalDriveModal, AddRemoteDriveForm, AddRemoteDriveModal, AnimatedLoader, Breadcrumb, Breadcrumbs, CONFLICT, ChannelInspector, ClearStorageSettingsRow, Combobox, ConnectConfirmationModal, ConnectDeleteDriveModal, ConnectDeleteItemModal, ConnectDropdownMenu, ConnectReplaceDuplicateModal, ConnectSearchBar, ConnectSelect, ConnectSidebar, ConnectSidebarFooter, ConnectSidebarHeader, ConnectTooltip, ConnectTooltipProvider, ConnectUpgradeDriveModal, ConnectionStateBadge, CookieBanner, CreateDocumentModal, DBExplorer, DangerZone, DebugInspector, DefaultEditor, DefaultEditorLoader, DefaultEditorSelect, DependencyVersions, Disclosure, Divider, DocumentStateViewer, DocumentTimeline, DocumentToolbar, DriveSettingsModal, DropZone, DropZoneWrapper, ENSAvatar, ERROR, EditorActionButtons, EditorUndoRedoButtons, FileItem, FolderItem, Footer, FooterLink, FormInput, FormattedJsonViewer, HomeBackgroundImage, HomeScreen, HomeScreenAddDriveItem, HomeScreenItem, INITIAL_SYNC, InspectorModal, IntegrityInspector, LoadingScreen, MISSING, NodeInput, ObjectInspectorModal, PackageInstallModal, PackageManager, PackageManagerInput, PackageManagerList, PackageManagerListItem, ProcessorsInspector, QueueInspector, ReadRequiredModal, RemotesInspector, RevisionHistory, SUCCESS, SYNCING, SettingsModal, SettingsModalOld, SettingsRow, SidebarAddDriveItem, SidebarItem, SidebarLogin, SidebarUser, SyncStatusIcon, TabContent, Tabs, Toggle, ToolbarButton, ToolbarCloseButton, ToolbarContainer, ToolbarControlsContainer, ToolbarDownloadButton, ToolbarHistoryButton, ToolbarInput, ToolbarName, ToolbarRedoButton, ToolbarSwitchboardButton, ToolbarUndoButton, UploadFileItem, UploadFileList, UploadFileListContainer, debugNodeOptions, debugNodeOptionsMap, defaultDriveOptions, defaultNodeOptions, fileNodeDropdownOptions, folderNodeDropdownOptions, formatEthAddress, getFolderStatus, locationInfoByLocation, nodeOptions, normalNodeOptions, removeSuccessFiles, sharingTypeOptions, sortFilesByStatus, syncStatuses, useEns, verifyPackageJsonFields };
|
|
8193
8732
|
|
|
8194
8733
|
//# sourceMappingURL=index.js.map
|