@arbidocs/blocks 0.4.137 → 0.4.139
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/agents/definitions/AgentConnectInstructions.d.ts +12 -0
- package/dist/agents/definitions/defaults.d.ts +12 -0
- package/dist/agents/definitions/index.d.ts +2 -0
- package/dist/agents/index.cjs +457 -418
- package/dist/agents/index.js +12 -13
- package/dist/agents/skills/SkillLibraryDetail.d.ts +26 -0
- package/dist/agents/skills/index.d.ts +2 -0
- package/dist/agents/skills/skillLibrary.d.ts +46 -0
- package/dist/calendar/CalendarFormDialog.d.ts +13 -0
- package/dist/calendar/ProposeTimeDialog.d.ts +22 -0
- package/dist/calendar/WeeklyHoursEditor.d.ts +7 -0
- package/dist/calendar/access-setup.d.ts +8 -0
- package/dist/calendar/api-mapping.d.ts +22 -0
- package/dist/calendar/booking-form.d.ts +46 -0
- package/dist/calendar/conference.d.ts +11 -0
- package/dist/calendar/errors.d.ts +7 -0
- package/dist/calendar/feeds.d.ts +2 -0
- package/dist/calendar/freebusy.d.ts +22 -0
- package/dist/calendar/ics.d.ts +33 -0
- package/dist/calendar/index.cjs +472 -4293
- package/dist/calendar/index.cjs.map +1 -1
- package/dist/calendar/index.d.ts +17 -1
- package/dist/calendar/index.js +1 -4227
- package/dist/calendar/index.js.map +1 -1
- package/dist/calendar/requests.d.ts +42 -0
- package/dist/calendar/room-window.d.ts +6 -0
- package/dist/calendar/settings-value.d.ts +4 -0
- package/dist/calls/index.cjs +4 -4
- package/dist/calls/index.js +3 -3
- package/dist/chat/index.cjs +141 -141
- package/dist/chat/index.js +6 -6
- package/dist/{chunk-M33QUNFH.js → chunk-22WFGXG2.js} +3 -3
- package/dist/{chunk-M33QUNFH.js.map → chunk-22WFGXG2.js.map} +1 -1
- package/dist/{chunk-VMESMX7N.js → chunk-453PNNNW.js} +3 -3
- package/dist/{chunk-VMESMX7N.js.map → chunk-453PNNNW.js.map} +1 -1
- package/dist/{chunk-2KUCVSFF.js → chunk-45LRMW54.js} +3 -3
- package/dist/{chunk-2KUCVSFF.js.map → chunk-45LRMW54.js.map} +1 -1
- package/dist/chunk-5FTIHRZH.cjs +177 -0
- package/dist/chunk-5FTIHRZH.cjs.map +1 -0
- package/dist/{chunk-FUTMU4FR.js → chunk-5HFPRI3W.js} +3 -3
- package/dist/{chunk-FUTMU4FR.js.map → chunk-5HFPRI3W.js.map} +1 -1
- package/dist/{chunk-JY73DJOS.cjs → chunk-5UXDUOOB.cjs} +84 -1211
- package/dist/chunk-5UXDUOOB.cjs.map +1 -0
- package/dist/{chunk-ATJUVHVB.js → chunk-6QMWP5IU.js} +1445 -11
- package/dist/chunk-6QMWP5IU.js.map +1 -0
- package/dist/chunk-6YTHQ73P.cjs +5334 -0
- package/dist/chunk-6YTHQ73P.cjs.map +1 -0
- package/dist/{chunk-KMNZ2RVO.js → chunk-7QUUZBQZ.js} +15 -1109
- package/dist/chunk-7QUUZBQZ.js.map +1 -0
- package/dist/{chunk-C3ZRLULA.cjs → chunk-7X255TOM.cjs} +5 -5
- package/dist/{chunk-C3ZRLULA.cjs.map → chunk-7X255TOM.cjs.map} +1 -1
- package/dist/chunk-A3XPS2EU.js +245 -0
- package/dist/chunk-A3XPS2EU.js.map +1 -0
- package/dist/chunk-B3AHCIV5.js +5206 -0
- package/dist/chunk-B3AHCIV5.js.map +1 -0
- package/dist/{chunk-2Q7FDZAY.js → chunk-BPBSSMRB.js} +5 -163
- package/dist/chunk-BPBSSMRB.js.map +1 -0
- package/dist/{chunk-KSHKTOY2.js → chunk-CKCBBYTA.js} +205 -5
- package/dist/chunk-CKCBBYTA.js.map +1 -0
- package/dist/chunk-CYNF5PZI.js +170 -0
- package/dist/chunk-CYNF5PZI.js.map +1 -0
- package/dist/{chunk-OPTBQSCV.cjs → chunk-DJM7DLCT.cjs} +3 -3
- package/dist/{chunk-OPTBQSCV.cjs.map → chunk-DJM7DLCT.cjs.map} +1 -1
- package/dist/{chunk-E5OYHJMU.js → chunk-DN55PRGS.js} +4 -4
- package/dist/{chunk-E5OYHJMU.js.map → chunk-DN55PRGS.js.map} +1 -1
- package/dist/{chunk-VHJHY7TT.js → chunk-ECERC6TI.js} +3 -3
- package/dist/{chunk-VHJHY7TT.js.map → chunk-ECERC6TI.js.map} +1 -1
- package/dist/{chunk-KDUGTKVI.cjs → chunk-GFNELPDP.cjs} +17 -6
- package/dist/chunk-GFNELPDP.cjs.map +1 -0
- package/dist/{chunk-OGBXV326.cjs → chunk-GFRQG36Y.cjs} +2 -243
- package/dist/chunk-GFRQG36Y.cjs.map +1 -0
- package/dist/{chunk-WXYQ66KC.cjs → chunk-HEMU73OP.cjs} +2 -166
- package/dist/chunk-HEMU73OP.cjs.map +1 -0
- package/dist/{chunk-UUHUQHXR.cjs → chunk-JZNXRMLH.cjs} +6 -6
- package/dist/{chunk-UUHUQHXR.cjs.map → chunk-JZNXRMLH.cjs.map} +1 -1
- package/dist/{chunk-HDYWXEQU.cjs → chunk-K3HNLWZZ.cjs} +8 -8
- package/dist/{chunk-HDYWXEQU.cjs.map → chunk-K3HNLWZZ.cjs.map} +1 -1
- package/dist/{chunk-7M4C6CK7.js → chunk-KTFDUSON.js} +4 -4
- package/dist/{chunk-7M4C6CK7.js.map → chunk-KTFDUSON.js.map} +1 -1
- package/dist/{chunk-HLB4DIYV.cjs → chunk-MABUMUCA.cjs} +6 -6
- package/dist/{chunk-HLB4DIYV.cjs.map → chunk-MABUMUCA.cjs.map} +1 -1
- package/dist/{chunk-RQ2Y7USX.cjs → chunk-MIDXCYZB.cjs} +235 -15
- package/dist/chunk-MIDXCYZB.cjs.map +1 -0
- package/dist/{chunk-L3T7OJRX.js → chunk-MTPWZQTL.js} +4 -4
- package/dist/{chunk-L3T7OJRX.js.map → chunk-MTPWZQTL.js.map} +1 -1
- package/dist/{chunk-BUNZWOPX.cjs → chunk-O4ZIQDUT.cjs} +5 -5
- package/dist/{chunk-BUNZWOPX.cjs.map → chunk-O4ZIQDUT.cjs.map} +1 -1
- package/dist/{chunk-W3VYZXNS.js → chunk-O6W6RW3B.js} +5 -240
- package/dist/chunk-O6W6RW3B.js.map +1 -0
- package/dist/{chunk-WS5EX7DN.cjs → chunk-OGP6MQXQ.cjs} +3 -3
- package/dist/{chunk-WS5EX7DN.cjs.map → chunk-OGP6MQXQ.cjs.map} +1 -1
- package/dist/{chunk-6F7SZCVL.cjs → chunk-OWCEQKAR.cjs} +3 -3
- package/dist/{chunk-6F7SZCVL.cjs.map → chunk-OWCEQKAR.cjs.map} +1 -1
- package/dist/{chunk-OQ7RUNOC.js → chunk-PC5KVHX3.js} +22 -6
- package/dist/chunk-PC5KVHX3.js.map +1 -0
- package/dist/{chunk-CHVCTKF4.cjs → chunk-ULEDHANM.cjs} +1543 -66
- package/dist/chunk-ULEDHANM.cjs.map +1 -0
- package/dist/{chunk-L2PAPOZ5.js → chunk-US3S4DCB.js} +17 -6
- package/dist/chunk-US3S4DCB.js.map +1 -0
- package/dist/chunk-V46W7YLI.cjs +252 -0
- package/dist/chunk-V46W7YLI.cjs.map +1 -0
- package/dist/{chunk-3RJN2VTL.js → chunk-XDQXDWE7.js} +3 -3
- package/dist/{chunk-3RJN2VTL.js.map → chunk-XDQXDWE7.js.map} +1 -1
- package/dist/{chunk-EHOPZBAX.cjs → chunk-XOC44HQY.cjs} +12 -12
- package/dist/{chunk-EHOPZBAX.cjs.map → chunk-XOC44HQY.cjs.map} +1 -1
- package/dist/{chunk-YOMPLCP6.js → chunk-Y5KTM3V5.js} +3 -3
- package/dist/{chunk-YOMPLCP6.js.map → chunk-Y5KTM3V5.js.map} +1 -1
- package/dist/{chunk-DWZXSPMB.cjs → chunk-ZAVEMQ37.cjs} +3 -3
- package/dist/{chunk-DWZXSPMB.cjs.map → chunk-ZAVEMQ37.cjs.map} +1 -1
- package/dist/{chunk-AAFX64WD.cjs → chunk-ZXAWOLBQ.cjs} +22 -5
- package/dist/chunk-ZXAWOLBQ.cjs.map +1 -0
- package/dist/citations/QuietMarks.d.ts +5 -2
- package/dist/citations/index.cjs +15 -14
- package/dist/citations/index.js +3 -2
- package/dist/collaboration/index.cjs +51 -51
- package/dist/collaboration/index.js +3 -3
- package/dist/connect/docx.cjs +6 -6
- package/dist/connect/docx.js +5 -5
- package/dist/connect/index.cjs +6595 -1600
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.d.ts +5 -0
- package/dist/connect/index.js +5064 -90
- package/dist/connect/index.js.map +1 -1
- package/dist/connection/ConnectedAgentCreator.d.ts +37 -0
- package/dist/connection/ConnectedSkillsLibrary.d.ts +26 -0
- package/dist/connection/ConnectedWorkflowHistory.d.ts +45 -0
- package/dist/connection/ConnectionProvider.d.ts +3 -1
- package/dist/connection/calendar/AddCalendarDialogs.d.ts +9 -0
- package/dist/connection/calendar/BookingPagesPanel.d.ts +13 -0
- package/dist/connection/calendar/CalendarAccountsPanel.d.ts +5 -0
- package/dist/connection/calendar/CalendarSettingsDialog.d.ts +12 -0
- package/dist/connection/calendar/ConnectedCalendar.d.ts +13 -0
- package/dist/connection/calendar/ConnectedMailInviteCard.d.ts +12 -0
- package/dist/connection/calendar/ConnectedPublicBooking.d.ts +9 -0
- package/dist/connection/calendar/ConnectedUpcomingEvents.d.ts +12 -0
- package/dist/connection/calendar/CopyField.d.ts +9 -0
- package/dist/connection/calendar/EventEditorDialog.d.ts +29 -0
- package/dist/connection/calendar/EventScheduling.d.ts +8 -0
- package/dist/connection/calendar/InvitationsPanel.d.ts +5 -0
- package/dist/connection/calendar/OpenAccessPanel.d.ts +7 -0
- package/dist/connection/calendar/PublishCalendarDialog.d.ts +8 -0
- package/dist/connection/calendar/RoomsDirectoryPanel.d.ts +8 -0
- package/dist/connection/calendar/ShareCalendarDialog.d.ts +6 -0
- package/dist/connection/calendar/copy.d.ts +2 -0
- package/dist/connection/calendar/index.d.ts +6 -0
- package/dist/connection/calendar/store.d.ts +47 -0
- package/dist/connection/calendar/types.d.ts +36 -0
- package/dist/connection/calendar/useWebinarAttendee.d.ts +3 -0
- package/dist/connection/notification-center/ConnectedNotificationCenter.d.ts +15 -0
- package/dist/connection/notification-center/NotificationCenter.d.ts +37 -0
- package/dist/connection/notification-center/NotificationEvent.d.ts +33 -0
- package/dist/connection/notification-center/index.d.ts +4 -0
- package/dist/connection/notification-center/items.d.ts +44 -0
- package/dist/document-tools/index.cjs +1 -1
- package/dist/document-tools/index.js +1 -1
- package/dist/facts/index.cjs +6 -6
- package/dist/facts/index.js +6 -6
- package/dist/files/index.cjs +6 -6
- package/dist/files/index.js +6 -6
- package/dist/home/index.cjs +20 -20
- package/dist/home/index.js +5 -5
- package/dist/index.cjs +969 -928
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +26 -25
- package/dist/index.js.map +1 -1
- package/dist/retrieval/index.cjs +1 -1
- package/dist/retrieval/index.js +1 -1
- package/dist/settings/index.cjs +58 -72
- package/dist/settings/index.cjs.map +1 -1
- package/dist/settings/index.js +6 -23
- package/dist/settings/index.js.map +1 -1
- package/dist/shell/index.cjs +61 -60
- package/dist/shell/index.js +5 -4
- package/dist/site/index.cjs +5 -5
- package/dist/site/index.js +1 -1
- package/dist/studio/index.cjs +11 -11
- package/dist/studio/index.js +9 -9
- package/dist/workflow-canvas/index.cjs +69 -70
- package/dist/workflow-canvas/index.cjs.map +1 -1
- package/dist/workflow-canvas/index.js +14 -15
- package/dist/workflow-canvas/index.js.map +1 -1
- package/dist/workspaces/index.cjs +2 -2
- package/dist/workspaces/index.js +2 -2
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +4 -4
- package/dist/chunk-2Q7FDZAY.js.map +0 -1
- package/dist/chunk-AAFX64WD.cjs.map +0 -1
- package/dist/chunk-ATJUVHVB.js.map +0 -1
- package/dist/chunk-CHVCTKF4.cjs.map +0 -1
- package/dist/chunk-CQCC7LE7.js +0 -210
- package/dist/chunk-CQCC7LE7.js.map +0 -1
- package/dist/chunk-JY73DJOS.cjs.map +0 -1
- package/dist/chunk-KDUGTKVI.cjs.map +0 -1
- package/dist/chunk-KMNZ2RVO.js.map +0 -1
- package/dist/chunk-KSHKTOY2.js.map +0 -1
- package/dist/chunk-L2PAPOZ5.js.map +0 -1
- package/dist/chunk-OGBXV326.cjs.map +0 -1
- package/dist/chunk-OQ7RUNOC.js.map +0 -1
- package/dist/chunk-RFIBUWLF.cjs +0 -232
- package/dist/chunk-RFIBUWLF.cjs.map +0 -1
- package/dist/chunk-RQ2Y7USX.cjs.map +0 -1
- package/dist/chunk-W3VYZXNS.js.map +0 -1
- package/dist/chunk-WXYQ66KC.cjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useConnectedWorkspace } from './chunk-
|
|
2
|
+
import { useConnectedWorkspace } from './chunk-US3S4DCB.js';
|
|
3
3
|
import { createContext, useMemo, useContext } from 'react';
|
|
4
4
|
import { useDocuments, useTags, useConversations } from '@arbidocs/react';
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -47,5 +47,5 @@ function useConnectedConversations(options) {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
export { ConnectedWorkspaceDataProvider, useConnectedConversations, useConnectedDocuments, useConnectedTags };
|
|
50
|
-
//# sourceMappingURL=chunk-
|
|
51
|
-
//# sourceMappingURL=chunk-
|
|
50
|
+
//# sourceMappingURL=chunk-45LRMW54.js.map
|
|
51
|
+
//# sourceMappingURL=chunk-45LRMW54.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/connection/workspaceData.tsx"],"names":[],"mappings":";;;;;AA+BA,IAAM,oBAAA,GAAuB,aAAA,CAAsC,EAAE,CAAA;AAE9D,SAAS,8BAAA,CAA+B;AAAA,EAC7C,SAAA;AAAA,EACA,IAAA;AAAA,EACA,aAAA;AAAA,EACA;AACF,CAAA,EAAqD;AACnD,EAAA,MAAM,KAAA,GAAQ,OAAA;AAAA,IACZ,OAAO,EAAE,SAAA,EAAW,IAAA,EAAM,aAAA,EAAc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CAAO,SAAA,EAAW,OAAO;AAAA,GAClC;AACF;AAGO,SAAS,qBAAA,GAAgE;AAC9E,EAAA,MAAM,MAAA,GAAS,UAAA,CAAW,oBAAoB,CAAA,CAAE,SAAA;AAChD,EAAA,MAAM,EAAE,WAAA,EAAY,GAAI,qBAAA,EAAsB;AAC9C,EAAA,MAAM,GAAA,GAAM,aAAa,WAAA,IAAe,MAAA,EAAW,EAAE,OAAA,EAAS,CAAC,QAAQ,CAAA;AACvE,EAAA,OAAO,OAAA,CAAQ,QAAQ,GAAG,CAAA;AAC5B;AAGO,SAAS,gBAAA,GAAsD;AACpE,EAAA,MAAM,MAAA,GAAS,UAAA,CAAW,oBAAoB,CAAA,CAAE,IAAA;AAChD,EAAA,MAAM,EAAE,WAAA,EAAY,GAAI,qBAAA,EAAsB;AAC9C,EAAA,MAAM,GAAA,GAAM,QAAQ,WAAA,IAAe,MAAA,EAAW,EAAE,OAAA,EAAS,CAAC,QAAQ,CAAA;AAClE,EAAA,OAAO,OAAA,CAAQ,QAAQ,GAAG,CAAA;AAC5B;AAMO,SAAS,0BAA0B,OAAA,EAEK;AAC7C,EAAA,MAAM,MAAA,GAAS,UAAA,CAAW,oBAAoB,CAAA,CAAE,aAAA;AAChD,EAAA,MAAM,EAAE,WAAA,EAAY,GAAI,qBAAA,EAAsB;AAC9C,EAAA,MAAM,GAAA,GAAM,gBAAA,CAAiB,WAAA,IAAe,MAAA,EAAW,EAAE,OAAA,EAAS,CAAC,MAAA,EAAQ,IAAA,EAAM,OAAA,EAAS,IAAA,EAAM,CAAA;AAChG,EAAA,OAAO,OAAA,CAAQ,QAAQ,GAAG,CAAA;AAC5B","file":"chunk-45LRMW54.js","sourcesContent":["/**\n * The open workspace's documents, tags and conversations for the connected kits. By default each kit reads them\n * through the `@arbidocs/react` hooks. A host that already keeps these lists live in its own cache\n * (the ARBI app, with its progressive loader and WebSocket patches) passes them once through\n * `ConnectedWorkspaceDataProvider`, so the kits show the same list and nothing is fetched twice.\n */\n\nimport { createContext, useContext, useMemo, type ReactNode } from 'react'\nimport { useConversations, useDocuments, useTags } from '@arbidocs/react'\nimport { useConnectedWorkspace } from './ConnectionProvider'\n\nexport type ConnectedDocument = NonNullable<ReturnType<typeof useDocuments>['data']>[number]\nexport type ConnectedTag = NonNullable<ReturnType<typeof useTags>['data']>[number]\nexport type ConnectedConversation = NonNullable<ReturnType<typeof useConversations>['data']>[number]\n\n/**\n * A list the host keeps: its rows, whether it has arrived, and how to read it again (absent: the\n * host keeps it current itself, so a kit never re-reads it).\n */\nexport interface ConnectedList<T> {\n data: T[] | undefined\n isFetched: boolean\n refetch?: () => unknown\n}\n\nexport interface ConnectedWorkspaceData {\n documents?: ConnectedList<ConnectedDocument>\n tags?: ConnectedList<ConnectedTag>\n conversations?: ConnectedList<ConnectedConversation>\n}\n\nconst WorkspaceDataContext = createContext<ConnectedWorkspaceData>({})\n\nexport function ConnectedWorkspaceDataProvider({\n documents,\n tags,\n conversations,\n children,\n}: ConnectedWorkspaceData & { children: ReactNode }) {\n const value = useMemo(\n () => ({ documents, tags, conversations }),\n [documents, tags, conversations]\n )\n return <WorkspaceDataContext.Provider value={value}>{children}</WorkspaceDataContext.Provider>\n}\n\nexport interface ConnectedListResult<T> {\n data: T[]\n loaded: boolean\n /** Read the list again after a change made here; absent when the host keeps it current. */\n refetch?: () => unknown\n}\n\nconst EMPTY: never[] = []\n\nfunction useList<T>(\n hosted: ConnectedList<T> | undefined,\n own: { data?: T[]; isFetched: boolean; refetch: () => unknown }\n): ConnectedListResult<T> {\n const source = hosted ?? own\n const data = source.data ?? (EMPTY as T[])\n const refetch = hosted ? hosted.refetch : own.refetch\n return useMemo(\n () => ({ data, loaded: source.isFetched, refetch }),\n [data, source.isFetched, refetch]\n )\n}\n\n/** The open workspace's documents: the host's list when it gives one, else read here. */\nexport function useConnectedDocuments(): ConnectedListResult<ConnectedDocument> {\n const hosted = useContext(WorkspaceDataContext).documents\n const { workspaceId } = useConnectedWorkspace()\n const own = useDocuments(workspaceId ?? undefined, { enabled: !hosted })\n return useList(hosted, own)\n}\n\n/** The open workspace's tags: the host's list when it gives one, else read here. */\nexport function useConnectedTags(): ConnectedListResult<ConnectedTag> {\n const hosted = useContext(WorkspaceDataContext).tags\n const { workspaceId } = useConnectedWorkspace()\n const own = useTags(workspaceId ?? undefined, { enabled: !hosted })\n return useList(hosted, own)\n}\n\n/**\n * The open workspace's conversations (threads and tasks): the host's list when it gives one, else\n * read here (`live`: re-read while shown, as a run moves on by itself).\n */\nexport function useConnectedConversations(options?: {\n live?: boolean\n}): ConnectedListResult<ConnectedConversation> {\n const hosted = useContext(WorkspaceDataContext).conversations\n const { workspaceId } = useConnectedWorkspace()\n const own = useConversations(workspaceId ?? undefined, { enabled: !hosted, live: options?.live })\n return useList(hosted, own)\n}\n"]}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
var chunkC4WSHRR6_cjs = require('./chunk-C4WSHRR6.cjs');
|
|
5
|
+
var react = require('react');
|
|
6
|
+
var ui = require('@arbidocs/react/ui');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
|
|
9
|
+
var DEFAULT_QUIET_MARK_LABELS = {
|
|
10
|
+
openLink: "Open link",
|
|
11
|
+
copyLink: "Copy link",
|
|
12
|
+
linkCopied: "Link copied",
|
|
13
|
+
copyFailed: "Could not copy",
|
|
14
|
+
jumpHere: "Jump to here",
|
|
15
|
+
copyPlaceLink: "Copy link to this place",
|
|
16
|
+
openDocument: "Open document",
|
|
17
|
+
linkMenu: "Link actions",
|
|
18
|
+
bookmarkMenu: "Bookmark actions"
|
|
19
|
+
};
|
|
20
|
+
function useCopyText(labels) {
|
|
21
|
+
const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
|
|
22
|
+
const done = labels?.linkCopied ?? DEFAULT_QUIET_MARK_LABELS.linkCopied;
|
|
23
|
+
const failed = labels?.copyFailed ?? DEFAULT_QUIET_MARK_LABELS.copyFailed;
|
|
24
|
+
return react.useCallback(
|
|
25
|
+
async (text, message) => {
|
|
26
|
+
try {
|
|
27
|
+
await navigator.clipboard.writeText(text);
|
|
28
|
+
notify(message ?? done, "success");
|
|
29
|
+
return true;
|
|
30
|
+
} catch {
|
|
31
|
+
notify(failed, "error");
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
[notify, done, failed]
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
var LINK_STYLE = {
|
|
39
|
+
external: "text-primary underline decoration-primary/40 decoration-1 underline-offset-[3px] transition-colors hover:decoration-primary focus-visible:decoration-primary",
|
|
40
|
+
document: "text-primary underline decoration-primary/40 decoration-1 underline-offset-[3px] transition-colors hover:decoration-primary focus-visible:decoration-primary",
|
|
41
|
+
// A bookmark is nearly invisible until hovered or focused.
|
|
42
|
+
anchor: "text-inherit underline decoration-dotted decoration-1 decoration-foreground/25 underline-offset-[3px] transition-colors hover:decoration-foreground/70 focus-visible:decoration-foreground/70"
|
|
43
|
+
};
|
|
44
|
+
function scrollToHash(href) {
|
|
45
|
+
const id = href?.startsWith("#") ? decodeURIComponent(href.slice(1)) : "";
|
|
46
|
+
document.getElementById(id)?.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
47
|
+
}
|
|
48
|
+
function QuietLink({
|
|
49
|
+
href,
|
|
50
|
+
kind = "external",
|
|
51
|
+
onOpen,
|
|
52
|
+
placeLink,
|
|
53
|
+
labels,
|
|
54
|
+
className,
|
|
55
|
+
testId,
|
|
56
|
+
children
|
|
57
|
+
}) {
|
|
58
|
+
const l = { ...DEFAULT_QUIET_MARK_LABELS, ...labels };
|
|
59
|
+
const copy = useCopyText(l);
|
|
60
|
+
const open = onOpen ?? (kind === "anchor" ? () => scrollToHash(href) : () => {
|
|
61
|
+
if (href) window.open(href, "_blank", "noopener,noreferrer");
|
|
62
|
+
});
|
|
63
|
+
const copyTarget = kind === "anchor" ? placeLink ?? `${window.location.href.split("#")[0]}${href ?? ""}` : placeLink ?? href ?? "";
|
|
64
|
+
const items = [
|
|
65
|
+
{
|
|
66
|
+
id: "open",
|
|
67
|
+
label: kind === "anchor" ? l.jumpHere : kind === "document" ? l.openDocument : l.openLink,
|
|
68
|
+
primary: true,
|
|
69
|
+
onSelect: open,
|
|
70
|
+
testId: "mark-open"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
id: "copy",
|
|
74
|
+
label: kind === "anchor" ? l.copyPlaceLink : l.copyLink,
|
|
75
|
+
onSelect: () => void copy(copyTarget),
|
|
76
|
+
testId: "mark-copy"
|
|
77
|
+
}
|
|
78
|
+
];
|
|
79
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
80
|
+
ui.MarkMenu,
|
|
81
|
+
{
|
|
82
|
+
as: "a",
|
|
83
|
+
href,
|
|
84
|
+
items,
|
|
85
|
+
menuLabel: kind === "anchor" ? l.bookmarkMenu : l.linkMenu,
|
|
86
|
+
preview: kind === "external" && href ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block break-all text-xs text-muted-foreground", children: href }) : void 0,
|
|
87
|
+
className: ui.cn(LINK_STYLE[kind], "cursor-pointer", className),
|
|
88
|
+
testId,
|
|
89
|
+
"data-mark-kind": kind,
|
|
90
|
+
children
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
function PassageMark({ label, menuLabel, items, className, testId }) {
|
|
95
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
96
|
+
ui.MarkMenu,
|
|
97
|
+
{
|
|
98
|
+
items,
|
|
99
|
+
menuLabel,
|
|
100
|
+
testId,
|
|
101
|
+
"data-mark-kind": "passage",
|
|
102
|
+
className: ui.cn(
|
|
103
|
+
"touch-hit cursor-pointer select-none rounded-sm px-1 text-xs tabular-nums text-muted-foreground/80 transition-colors hover:text-foreground focus-visible:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring pointer-coarse:px-2 pointer-coarse:py-2",
|
|
104
|
+
className
|
|
105
|
+
),
|
|
106
|
+
children: label
|
|
107
|
+
}
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
function LabelMark({
|
|
111
|
+
colors,
|
|
112
|
+
menuLabel,
|
|
113
|
+
preview,
|
|
114
|
+
items,
|
|
115
|
+
name,
|
|
116
|
+
className,
|
|
117
|
+
testId
|
|
118
|
+
}) {
|
|
119
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
120
|
+
ui.MarkMenu,
|
|
121
|
+
{
|
|
122
|
+
items,
|
|
123
|
+
preview,
|
|
124
|
+
menuLabel,
|
|
125
|
+
testId,
|
|
126
|
+
"aria-label": name,
|
|
127
|
+
"data-mark-kind": "label",
|
|
128
|
+
className: ui.cn(
|
|
129
|
+
"flex cursor-pointer flex-col gap-1 rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring pointer-coarse:px-2 pointer-coarse:py-1",
|
|
130
|
+
className
|
|
131
|
+
),
|
|
132
|
+
children: colors.slice(0, 4).map((c, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
133
|
+
"span",
|
|
134
|
+
{
|
|
135
|
+
"aria-hidden": "true",
|
|
136
|
+
className: "h-2.5 w-1 rounded-full",
|
|
137
|
+
style: { backgroundColor: c }
|
|
138
|
+
},
|
|
139
|
+
i
|
|
140
|
+
))
|
|
141
|
+
}
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
function NoteMark({
|
|
145
|
+
label,
|
|
146
|
+
title,
|
|
147
|
+
menuLabel = "Note actions",
|
|
148
|
+
items = [],
|
|
149
|
+
className,
|
|
150
|
+
testId
|
|
151
|
+
}) {
|
|
152
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
153
|
+
ui.MarkMenu,
|
|
154
|
+
{
|
|
155
|
+
items,
|
|
156
|
+
preview: title ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block text-xs text-muted-foreground", children: title }) : void 0,
|
|
157
|
+
menuLabel,
|
|
158
|
+
testId,
|
|
159
|
+
"data-slot": "note-mark",
|
|
160
|
+
"data-mark-kind": "note",
|
|
161
|
+
className: ui.cn(
|
|
162
|
+
"cursor-default select-none rounded-sm px-1 text-xs font-medium tabular-nums text-foreground/80 underline decoration-yellow-400 decoration-2 underline-offset-[3px] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
163
|
+
className
|
|
164
|
+
),
|
|
165
|
+
children: label
|
|
166
|
+
}
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
exports.DEFAULT_QUIET_MARK_LABELS = DEFAULT_QUIET_MARK_LABELS;
|
|
171
|
+
exports.LabelMark = LabelMark;
|
|
172
|
+
exports.NoteMark = NoteMark;
|
|
173
|
+
exports.PassageMark = PassageMark;
|
|
174
|
+
exports.QuietLink = QuietLink;
|
|
175
|
+
exports.useCopyText = useCopyText;
|
|
176
|
+
//# sourceMappingURL=chunk-5FTIHRZH.cjs.map
|
|
177
|
+
//# sourceMappingURL=chunk-5FTIHRZH.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/citations/QuietMarks.tsx"],"names":["useBlocksEnvironment","useCallback","jsx","MarkMenu","cn"],"mappings":";;;;;;;AAyBO,IAAM,yBAAA,GAA6C;AAAA,EACxD,QAAA,EAAU,WAAA;AAAA,EACV,QAAA,EAAU,WAAA;AAAA,EACV,UAAA,EAAY,aAAA;AAAA,EACZ,UAAA,EAAY,gBAAA;AAAA,EACZ,QAAA,EAAU,cAAA;AAAA,EACV,aAAA,EAAe,yBAAA;AAAA,EACf,YAAA,EAAc,eAAA;AAAA,EACd,QAAA,EAAU,cAAA;AAAA,EACV,YAAA,EAAc;AAChB;AAMO,SAAS,YAAY,MAAA,EAAsE;AAChG,EAAA,MAAM,EAAE,MAAA,EAAO,GAAIA,sCAAA,EAAqB;AACxC,EAAA,MAAM,IAAA,GAAO,MAAA,EAAQ,UAAA,IAAc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AAA;AAAA,QAHvB;AAAA,OAKR;AAAA;AAAA,GACH;AAEJ;AAkBO,SAAS,QAAA,CAAS;AAAA,EACvB,KAAA;AAAA,EACA,KAAA;AAAA,EACA,SAAA,GAAY,cAAA;AAAA,EACZ,QAAQ,EAAC;AAAA,EACT,SAAA;AAAA,EACA;AACF,CAAA,EAAkB;AAChB,EAAA,uBACEA,cAAA;AAAA,IAACC,WAAA;AAAA,IAAA;AAAA,MACC,KAAA;AAAA,MACA,SACE,KAAA,mBAAQD,cAAA,CAAC,UAAK,SAAA,EAAU,qCAAA,EAAuC,iBAAM,CAAA,GAAU,MAAA;AAAA,MAEjF,SAAA;AAAA,MACA,MAAA;AAAA,MACA,WAAA,EAAU,WAAA;AAAA,MACV,gBAAA,EAAe,MAAA;AAAA,MACf,SAAA,EAAWE,KAAA;AAAA,QACT,4OAAA;AAAA,QACA;AAAA,OACF;AAAA,MAEC,QAAA,EAAA;AAAA;AAAA,GACH;AAEJ","file":"chunk-5FTIHRZH.cjs","sourcesContent":["import { useCallback, type ReactNode } from 'react'\nimport { MarkMenu, cn, type MarkMenuItem } from '@arbidocs/react/ui'\nimport { useBlocksEnvironment } from '../provider/BlocksProvider'\n\n/**\n * Quiet inline marks: links, bookmarks, passage references, label and note marks.\n *\n * Each is typographically distinct TEXT (no pill, no button chrome, no icon in the flow) and owns\n * exactly one contextual menu through the shared `MarkMenu`. Domain-neutral: hosts supply the\n * handlers that make a row mean something.\n */\n\n/** Every fixed string of the quiet marks. */\nexport interface QuietMarkLabels {\n openLink: string\n copyLink: string\n linkCopied: string\n copyFailed: string\n jumpHere: string\n copyPlaceLink: string\n openDocument: string\n linkMenu: string\n bookmarkMenu: string\n}\n\nexport const DEFAULT_QUIET_MARK_LABELS: QuietMarkLabels = {\n openLink: 'Open link',\n copyLink: 'Copy link',\n linkCopied: 'Link copied',\n copyFailed: 'Could not copy',\n jumpHere: 'Jump to here',\n copyPlaceLink: 'Copy link to this place',\n openDocument: 'Open document',\n linkMenu: 'Link actions',\n bookmarkMenu: 'Bookmark actions',\n}\n\n/**\n * Copy text to the clipboard and say so (or say it failed) through the host's `notify`. Resolves\n * whether it was copied.\n */\nexport function useCopyText(labels?: Partial<Pick<QuietMarkLabels, 'linkCopied' | 'copyFailed'>>) {\n const { notify } = useBlocksEnvironment()\n const done = labels?.linkCopied ?? DEFAULT_QUIET_MARK_LABELS.linkCopied\n const failed = labels?.copyFailed ?? DEFAULT_QUIET_MARK_LABELS.copyFailed\n return useCallback(\n async (text: string, message?: string): Promise<boolean> => {\n try {\n await navigator.clipboard.writeText(text)\n notify(message ?? done, 'success')\n return true\n } catch {\n notify(failed, 'error')\n return false\n }\n },\n [notify, done, failed]\n )\n}\n\nexport type QuietLinkKind = 'external' | 'anchor' | 'document'\n\nexport interface QuietLinkProps {\n href?: string\n /** `external` (default) opens elsewhere, `anchor` jumps within the page, `document` is an in-app target. */\n kind?: QuietLinkKind\n /** The primary action. Defaults: external opens a new tab, anchor scrolls to the id. */\n onOpen?: () => void\n /** Absolute URL a copied anchor should carry; defaults to the current page plus the hash. */\n placeLink?: string\n labels?: Partial<QuietMarkLabels>\n className?: string\n testId?: string\n children: ReactNode\n}\n\nconst LINK_STYLE: Record<QuietLinkKind, string> = {\n external:\n 'text-primary underline decoration-primary/40 decoration-1 underline-offset-[3px] transition-colors hover:decoration-primary focus-visible:decoration-primary',\n document:\n 'text-primary underline decoration-primary/40 decoration-1 underline-offset-[3px] transition-colors hover:decoration-primary focus-visible:decoration-primary',\n // A bookmark is nearly invisible until hovered or focused.\n anchor:\n 'text-inherit underline decoration-dotted decoration-1 decoration-foreground/25 underline-offset-[3px] transition-colors hover:decoration-foreground/70 focus-visible:decoration-foreground/70',\n}\n\nfunction scrollToHash(href: string | undefined) {\n const id = href?.startsWith('#') ? decodeURIComponent(href.slice(1)) : ''\n document.getElementById(id)?.scrollIntoView({ behavior: 'smooth', block: 'start' })\n}\n\n/** A hyperlink, bookmark or document link as quiet text with one menu (open / copy). */\nexport function QuietLink({\n href,\n kind = 'external',\n onOpen,\n placeLink,\n labels,\n className,\n testId,\n children,\n}: QuietLinkProps) {\n const l = { ...DEFAULT_QUIET_MARK_LABELS, ...labels }\n const copy = useCopyText(l)\n\n const open =\n onOpen ??\n (kind === 'anchor'\n ? () => scrollToHash(href)\n : () => {\n if (href) window.open(href, '_blank', 'noopener,noreferrer')\n })\n const copyTarget =\n kind === 'anchor'\n ? (placeLink ?? `${window.location.href.split('#')[0]}${href ?? ''}`)\n : (placeLink ?? href ?? '')\n\n const items: MarkMenuItem[] = [\n {\n id: 'open',\n label: kind === 'anchor' ? l.jumpHere : kind === 'document' ? l.openDocument : l.openLink,\n primary: true,\n onSelect: open,\n testId: 'mark-open',\n },\n {\n id: 'copy',\n label: kind === 'anchor' ? l.copyPlaceLink : l.copyLink,\n onSelect: () => void copy(copyTarget),\n testId: 'mark-copy',\n },\n ]\n\n return (\n <MarkMenu\n as=\"a\"\n href={href}\n items={items}\n menuLabel={kind === 'anchor' ? l.bookmarkMenu : l.linkMenu}\n preview={\n kind === 'external' && href ? (\n <span className=\"block break-all text-xs text-muted-foreground\">{href}</span>\n ) : undefined\n }\n className={cn(LINK_STYLE[kind], 'cursor-pointer', className)}\n testId={testId}\n data-mark-kind={kind}\n >\n {children}\n </MarkMenu>\n )\n}\n\nexport interface PassageMarkProps {\n /** The reference as plain text, e.g. \"¶4\" or \"¶4–9 · p.1\". */\n label: string\n menuLabel: string\n /** Menu rows: copy, link, label, open in navigator. */\n items: MarkMenuItem[]\n className?: string\n testId?: string\n}\n\n/** A passage's reference as a faint text mark in the margin; its menu carries the passage actions. */\nexport function PassageMark({ label, menuLabel, items, className, testId }: PassageMarkProps) {\n return (\n <MarkMenu\n items={items}\n menuLabel={menuLabel}\n testId={testId}\n data-mark-kind=\"passage\"\n className={cn(\n 'touch-hit cursor-pointer select-none rounded-sm px-1 text-xs tabular-nums text-muted-foreground/80 transition-colors hover:text-foreground focus-visible:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring pointer-coarse:px-2 pointer-coarse:py-2',\n className\n )}\n >\n {label}\n </MarkMenu>\n )\n}\n\nexport interface LabelMarkProps {\n /** Colours of every label marking the passage. */\n colors: string[]\n menuLabel: string\n /** Names of the labels, shown in the menu. */\n preview?: ReactNode\n items: MarkMenuItem[]\n /** Accessible name of the stripes. */\n name: string\n className?: string\n testId?: string\n}\n\n/** The labels on a passage as thin margin stripes (not a chip); the menu shows / removes them. */\nexport function LabelMark({\n colors,\n menuLabel,\n preview,\n items,\n name,\n className,\n testId,\n}: LabelMarkProps) {\n return (\n <MarkMenu\n items={items}\n preview={preview}\n menuLabel={menuLabel}\n testId={testId}\n aria-label={name}\n data-mark-kind=\"label\"\n className={cn(\n 'flex cursor-pointer flex-col gap-1 rounded-full focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring pointer-coarse:px-2 pointer-coarse:py-1',\n className\n )}\n >\n {colors.slice(0, 4).map((c, i) => (\n <span\n key={i}\n aria-hidden=\"true\"\n className=\"h-2.5 w-1 rounded-full\"\n style={{ backgroundColor: c }}\n />\n ))}\n </MarkMenu>\n )\n}\n\nexport interface NoteMarkProps {\n /** Short label, e.g. the passage range this run covers (\"¶4–9\"). */\n label: string\n /** Full note text, shown as the menu preview so the mark is self-explaining. */\n title?: string\n menuLabel?: string\n /** Rows such as \"Show note\" and \"Edit\". With none, the menu is a read-only preview. */\n items?: MarkMenuItem[]\n className?: string\n testId?: string\n}\n\n/**\n * Marks a passage as cited by a Note: small text with a soft yellow underline, drawn once on\n * each CONTIGUOUS run of cited passages (a run is one citation).\n */\nexport function NoteMark({\n label,\n title,\n menuLabel = 'Note actions',\n items = [],\n className,\n testId,\n}: NoteMarkProps) {\n return (\n <MarkMenu\n items={items}\n preview={\n title ? <span className=\"block text-xs text-muted-foreground\">{title}</span> : undefined\n }\n menuLabel={menuLabel}\n testId={testId}\n data-slot=\"note-mark\"\n data-mark-kind=\"note\"\n className={cn(\n 'cursor-default select-none rounded-sm px-1 text-xs font-medium tabular-nums text-foreground/80 underline decoration-yellow-400 decoration-2 underline-offset-[3px] focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring',\n className\n )}\n >\n {label}\n </MarkMenu>\n )\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { RoleBadge } from './chunk-NBV56SGU.js';
|
|
3
|
-
import { testIdOr } from './chunk-7F6CBP3Z.js';
|
|
4
3
|
import { ModalSection, ModalSectionTitle } from './chunk-TX2ZICS7.js';
|
|
4
|
+
import { testIdOr } from './chunk-7F6CBP3Z.js';
|
|
5
5
|
import { Clock, UserMinus, Trash2, Gift, AtSign, Contact, Mail, Phone, MoreHorizontal, Download, UserPlus, MoreVertical, Plus, KeyRound, Loader2, BellOff, Bell, X, ChevronsUpDown, AlertCircle, XCircle, CheckCircle, ChevronDown, ChevronRight } from 'lucide-react';
|
|
6
6
|
import { cn, Tooltip, TooltipTrigger, Select, SelectTrigger, SelectContent, SelectItem, TooltipContent, SelectValue, Button, Textarea, Avatar, AvatarImage, AvatarFallback, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, ScrollArea, Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter, Popover, PopoverTrigger, PopoverContent, Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, Checkbox } from '@arbidocs/react/ui';
|
|
7
7
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -973,5 +973,5 @@ function MailFolderTree({
|
|
|
973
973
|
}
|
|
974
974
|
|
|
975
975
|
export { ActionMenu, AddContactsForm, AddContactsResults, ContactCard, DEFAULT_ADD_CONTACTS_LABELS, DEFAULT_CONTACT_CARD_LABELS, DEFAULT_CONTACT_OUTCOME_LABELS, DEFAULT_DM_ACCESS_REQUEST_BANNER_LABELS, DEFAULT_DM_GRANT_ACCESS_DIALOG_LABELS, DEFAULT_DM_INVITE_CHIP_LABELS, DEFAULT_DM_THREAD_FRAME_LABELS, DEFAULT_MAIL_FOLDER_TREE_LABELS, DEFAULT_RECIPIENT_PICKER_LABELS, DmAccessRequestBanner, DmGrantAccessDialogView, DmInviteAvatar, DmInviteChip, DmNewTabIcon, DmThreadFrame, DmThreadHeader, MAX_INVITE_EMAILS, MailFolderTree, MemberBulkActions, MemberListLoading, MemberMutedText, MemberNameCell, MemberRoleCell, RecipientPicker, RoleSelect, WorkspaceDeleteButton, buildMailFolderTree, contactToVCard, descendantFolderIds, downloadVCard, isInboxFolder, parseEmails, toAddContactsRow, toAddContactsRows, toggleMailFolder, vCardFilename };
|
|
976
|
-
//# sourceMappingURL=chunk-
|
|
977
|
-
//# sourceMappingURL=chunk-
|
|
976
|
+
//# sourceMappingURL=chunk-5HFPRI3W.js.map
|
|
977
|
+
//# sourceMappingURL=chunk-5HFPRI3W.js.map
|