@arbidocs/blocks 0.4.4 → 0.4.5

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.
Files changed (64) hide show
  1. package/README.md +25 -0
  2. package/dist/agents/index.cjs +163 -163
  3. package/dist/agents/index.js +6 -6
  4. package/dist/artifacts/ArtifactCompareBar.d.ts +33 -0
  5. package/dist/artifacts/ArtifactEditor.d.ts +64 -0
  6. package/dist/artifacts/ArtifactEditorBody.d.ts +34 -0
  7. package/dist/artifacts/ArtifactRedlineView.d.ts +57 -0
  8. package/dist/artifacts/ArtifactToolbar.d.ts +53 -0
  9. package/dist/artifacts/ArtifactVersionBar.d.ts +42 -0
  10. package/dist/{files → artifacts}/RedlineParts.d.ts +4 -0
  11. package/dist/artifacts/editor/ArtifactMarkdownEditor.d.ts +39 -0
  12. package/dist/artifacts/editor/index.cjs +89 -0
  13. package/dist/artifacts/editor/index.cjs.map +1 -0
  14. package/dist/artifacts/editor/index.d.ts +1 -0
  15. package/dist/artifacts/editor/index.js +86 -0
  16. package/dist/artifacts/editor/index.js.map +1 -0
  17. package/dist/artifacts/index.cjs +807 -0
  18. package/dist/artifacts/index.cjs.map +1 -0
  19. package/dist/artifacts/index.d.ts +8 -0
  20. package/dist/artifacts/index.js +787 -0
  21. package/dist/artifacts/index.js.map +1 -0
  22. package/dist/chat/index.cjs +54 -54
  23. package/dist/chat/index.js +2 -2
  24. package/dist/{chunk-XKKGGUU2.cjs → chunk-3MIQASHO.cjs} +4 -4
  25. package/dist/{chunk-XKKGGUU2.cjs.map → chunk-3MIQASHO.cjs.map} +1 -1
  26. package/dist/{chunk-B673CCW5.js → chunk-3PJCET7H.js} +3 -3
  27. package/dist/{chunk-B673CCW5.js.map → chunk-3PJCET7H.js.map} +1 -1
  28. package/dist/{chunk-DGVKBOY5.cjs → chunk-3PZPRAAR.cjs} +14 -14
  29. package/dist/{chunk-DGVKBOY5.cjs.map → chunk-3PZPRAAR.cjs.map} +1 -1
  30. package/dist/{chunk-BBEMPS6C.js → chunk-5XTZFH65.js} +6 -6
  31. package/dist/{chunk-BBEMPS6C.js.map → chunk-5XTZFH65.js.map} +1 -1
  32. package/dist/{chunk-JPO3F4J7.js → chunk-6YHWXMPQ.js} +3 -3
  33. package/dist/{chunk-JPO3F4J7.js.map → chunk-6YHWXMPQ.js.map} +1 -1
  34. package/dist/{chunk-ZVPTFTGV.cjs → chunk-MVNCQDDE.cjs} +4 -4
  35. package/dist/{chunk-ZVPTFTGV.cjs.map → chunk-MVNCQDDE.cjs.map} +1 -1
  36. package/dist/{chunk-NJL4LIXX.js → chunk-NPKGUQU5.js} +4 -4
  37. package/dist/{chunk-NJL4LIXX.js.map → chunk-NPKGUQU5.js.map} +1 -1
  38. package/dist/{chunk-ATXPAD6S.cjs → chunk-YLOKCIQJ.cjs} +3 -3
  39. package/dist/{chunk-ATXPAD6S.cjs.map → chunk-YLOKCIQJ.cjs.map} +1 -1
  40. package/dist/connect/index.cjs +18 -18
  41. package/dist/connect/index.js +4 -4
  42. package/dist/facts/index.cjs +1 -1
  43. package/dist/facts/index.js +1 -1
  44. package/dist/files/ViewerChrome.d.ts +0 -45
  45. package/dist/files/ViewerParts.d.ts +0 -19
  46. package/dist/files/index.cjs +4 -436
  47. package/dist/files/index.cjs.map +1 -1
  48. package/dist/files/index.d.ts +2 -4
  49. package/dist/files/index.js +8 -428
  50. package/dist/files/index.js.map +1 -1
  51. package/dist/home/index.cjs +19 -19
  52. package/dist/home/index.js +4 -4
  53. package/dist/index.cjs +415 -415
  54. package/dist/index.js +14 -14
  55. package/dist/settings/index.cjs +3 -3
  56. package/dist/settings/index.js +4 -4
  57. package/dist/shell/index.cjs +10 -10
  58. package/dist/shell/index.js +2 -2
  59. package/dist/site/index.cjs +5 -5
  60. package/dist/site/index.js +1 -1
  61. package/dist/studio/index.cjs +8 -8
  62. package/dist/studio/index.js +6 -6
  63. package/package.json +25 -4
  64. /package/dist/{files → artifacts}/VersionTimeline.d.ts +0 -0
@@ -1,18 +1,18 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var chunkXKKGGUU2_cjs = require('../chunk-XKKGGUU2.cjs');
5
- require('../chunk-ATXPAD6S.cjs');
4
+ var chunk3MIQASHO_cjs = require('../chunk-3MIQASHO.cjs');
5
+ require('../chunk-YLOKCIQJ.cjs');
6
6
  require('../chunk-KHX2BX3S.cjs');
7
- require('../chunk-KDG6FER6.cjs');
8
7
  require('../chunk-MHVNT4J3.cjs');
8
+ require('../chunk-KDG6FER6.cjs');
9
9
  var react = require('react');
10
10
  var reactQuery = require('@tanstack/react-query');
11
11
  var react$1 = require('@arbidocs/react');
12
12
  var jsxRuntime = require('react/jsx-runtime');
13
13
 
14
14
  function ConnectionBoundWebSocket({ children }) {
15
- const { status } = chunkXKKGGUU2_cjs.useConnection();
15
+ const { status } = chunk3MIQASHO_cjs.useConnection();
16
16
  return /* @__PURE__ */ jsxRuntime.jsx(react$1.ArbiWebSocketProvider, { enabled: status === "authenticated", children });
17
17
  }
18
18
  function ArbiAppProvider({
@@ -25,10 +25,10 @@ function ArbiAppProvider({
25
25
  })
26
26
  );
27
27
  const providerUrl = config.apiUrl || config.demoApiUrl || "https://demo.arbi.local";
28
- return /* @__PURE__ */ jsxRuntime.jsx(reactQuery.QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsxRuntime.jsx(react$1.ArbiProvider, { url: providerUrl, children: /* @__PURE__ */ jsxRuntime.jsx(chunkXKKGGUU2_cjs.ConnectionProvider, { config, children: /* @__PURE__ */ jsxRuntime.jsx(ConnectionBoundWebSocket, { children }) }) }) });
28
+ return /* @__PURE__ */ jsxRuntime.jsx(reactQuery.QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsxRuntime.jsx(react$1.ArbiProvider, { url: providerUrl, children: /* @__PURE__ */ jsxRuntime.jsx(chunk3MIQASHO_cjs.ConnectionProvider, { config, children: /* @__PURE__ */ jsxRuntime.jsx(ConnectionBoundWebSocket, { children }) }) }) });
29
29
  }
30
30
  function useConnectedShellWorkspaces(options = {}) {
31
- const { workspaceId, setWorkspace } = chunkXKKGGUU2_cjs.useConnection();
31
+ const { workspaceId, setWorkspace } = chunk3MIQASHO_cjs.useConnection();
32
32
  const query = react$1.useWorkspaces();
33
33
  return react$1.useShellWorkspaces({
34
34
  ...options,
@@ -42,51 +42,51 @@ function useConnectedShellWorkspaces(options = {}) {
42
42
 
43
43
  Object.defineProperty(exports, "ConnectedAssistantDock", {
44
44
  enumerable: true,
45
- get: function () { return chunkXKKGGUU2_cjs.ConnectedAssistantDock; }
45
+ get: function () { return chunk3MIQASHO_cjs.ConnectedAssistantDock; }
46
46
  });
47
47
  Object.defineProperty(exports, "ConnectionProvider", {
48
48
  enumerable: true,
49
- get: function () { return chunkXKKGGUU2_cjs.ConnectionProvider; }
49
+ get: function () { return chunk3MIQASHO_cjs.ConnectionProvider; }
50
50
  });
51
51
  Object.defineProperty(exports, "SESSION_EXPIRED_MESSAGE", {
52
52
  enumerable: true,
53
- get: function () { return chunkXKKGGUU2_cjs.SESSION_EXPIRED_MESSAGE; }
53
+ get: function () { return chunk3MIQASHO_cjs.SESSION_EXPIRED_MESSAGE; }
54
54
  });
55
55
  Object.defineProperty(exports, "isAuthenticated", {
56
56
  enumerable: true,
57
- get: function () { return chunkXKKGGUU2_cjs.isAuthenticated; }
57
+ get: function () { return chunk3MIQASHO_cjs.isAuthenticated; }
58
58
  });
59
59
  Object.defineProperty(exports, "redlineStats", {
60
60
  enumerable: true,
61
- get: function () { return chunkXKKGGUU2_cjs.redlineStats; }
61
+ get: function () { return chunk3MIQASHO_cjs.redlineStats; }
62
62
  });
63
63
  Object.defineProperty(exports, "textToArtifact", {
64
64
  enumerable: true,
65
- get: function () { return chunkXKKGGUU2_cjs.textToArtifact; }
65
+ get: function () { return chunk3MIQASHO_cjs.textToArtifact; }
66
66
  });
67
67
  Object.defineProperty(exports, "toRedlineMarkdown", {
68
68
  enumerable: true,
69
- get: function () { return chunkXKKGGUU2_cjs.toRedlineMarkdown; }
69
+ get: function () { return chunk3MIQASHO_cjs.toRedlineMarkdown; }
70
70
  });
71
71
  Object.defineProperty(exports, "useConnectedAiTask", {
72
72
  enumerable: true,
73
- get: function () { return chunkXKKGGUU2_cjs.useConnectedAiTask; }
73
+ get: function () { return chunk3MIQASHO_cjs.useConnectedAiTask; }
74
74
  });
75
75
  Object.defineProperty(exports, "useConnectedChat", {
76
76
  enumerable: true,
77
- get: function () { return chunkXKKGGUU2_cjs.useConnectedChat; }
77
+ get: function () { return chunk3MIQASHO_cjs.useConnectedChat; }
78
78
  });
79
79
  Object.defineProperty(exports, "useConnection", {
80
80
  enumerable: true,
81
- get: function () { return chunkXKKGGUU2_cjs.useConnection; }
81
+ get: function () { return chunk3MIQASHO_cjs.useConnection; }
82
82
  });
83
83
  Object.defineProperty(exports, "useSemanticSearch", {
84
84
  enumerable: true,
85
- get: function () { return chunkXKKGGUU2_cjs.useSemanticSearch; }
85
+ get: function () { return chunk3MIQASHO_cjs.useSemanticSearch; }
86
86
  });
87
87
  Object.defineProperty(exports, "useWorkspaceDocs", {
88
88
  enumerable: true,
89
- get: function () { return chunkXKKGGUU2_cjs.useWorkspaceDocs; }
89
+ get: function () { return chunk3MIQASHO_cjs.useWorkspaceDocs; }
90
90
  });
91
91
  exports.ArbiAppProvider = ArbiAppProvider;
92
92
  exports.useConnectedShellWorkspaces = useConnectedShellWorkspaces;
@@ -1,10 +1,10 @@
1
1
  "use client";
2
- import { ConnectionProvider, useConnection } from '../chunk-B673CCW5.js';
3
- export { ConnectedAssistantDock, ConnectionProvider, SESSION_EXPIRED_MESSAGE, isAuthenticated, redlineStats, textToArtifact, toRedlineMarkdown, useConnectedAiTask, useConnectedChat, useConnection, useSemanticSearch, useWorkspaceDocs } from '../chunk-B673CCW5.js';
4
- import '../chunk-JPO3F4J7.js';
2
+ import { ConnectionProvider, useConnection } from '../chunk-3PJCET7H.js';
3
+ export { ConnectedAssistantDock, ConnectionProvider, SESSION_EXPIRED_MESSAGE, isAuthenticated, redlineStats, textToArtifact, toRedlineMarkdown, useConnectedAiTask, useConnectedChat, useConnection, useSemanticSearch, useWorkspaceDocs } from '../chunk-3PJCET7H.js';
4
+ import '../chunk-6YHWXMPQ.js';
5
5
  import '../chunk-2VBJ763Y.js';
6
- import '../chunk-OXF2IFXG.js';
7
6
  import '../chunk-7F6CBP3Z.js';
7
+ import '../chunk-OXF2IFXG.js';
8
8
  import { useState } from 'react';
9
9
  import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
10
10
  import { ArbiProvider, useWorkspaces, useShellWorkspaces, ArbiWebSocketProvider } from '@arbidocs/react';
@@ -8,8 +8,8 @@ var chunkV4ISCZJ7_cjs = require('../chunk-V4ISCZJ7.cjs');
8
8
  var chunk5B4PXAKI_cjs = require('../chunk-5B4PXAKI.cjs');
9
9
  var chunkPPCATBOY_cjs = require('../chunk-PPCATBOY.cjs');
10
10
  require('../chunk-C54XEN5T.cjs');
11
- var chunkKDG6FER6_cjs = require('../chunk-KDG6FER6.cjs');
12
11
  var chunkMHVNT4J3_cjs = require('../chunk-MHVNT4J3.cjs');
12
+ var chunkKDG6FER6_cjs = require('../chunk-KDG6FER6.cjs');
13
13
  var lucideReact = require('lucide-react');
14
14
  var ui = require('@arbidocs/react/ui');
15
15
  var jsxRuntime = require('react/jsx-runtime');
@@ -6,8 +6,8 @@ import { SelectionBar, SelectionBarAction } from '../chunk-NUNKSZKU.js';
6
6
  import { TabHeader } from '../chunk-UBNVIIBT.js';
7
7
  import { observeResize } from '../chunk-NPLYHR2E.js';
8
8
  import '../chunk-76JDDMSP.js';
9
- import { initials } from '../chunk-OXF2IFXG.js';
10
9
  import { testIdOr } from '../chunk-7F6CBP3Z.js';
10
+ import { initials } from '../chunk-OXF2IFXG.js';
11
11
  import { PencilLine, Check, MoreVertical, Pencil, Trash2, CalendarDays, X, Filter, SlidersHorizontal, Columns3, ChevronDown, RotateCcw, Milestone, CalendarClock, Scale, Lightbulb, ArrowRight, Loader2, Info, PinOff, Pin, Tags, MoreHorizontal, FolderUp, BookMarked, Plus, Search, CheckCircle2, CornerDownLeft, Quote, ChevronLeft, ChevronRight, Table2, CalendarRange, GanttChartSquare } from 'lucide-react';
12
12
  import { Popover, PopoverTrigger, PopoverContent, Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, cn, Input, Button, CommandSeparator, Tooltip, TooltipTrigger, TooltipContent } from '@arbidocs/react/ui';
13
13
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
@@ -2,17 +2,6 @@ import type { ReactNode } from 'react';
2
2
  /** Every fixed string of the viewer chrome and parts. Pass a partial `labels` to translate or reword. */
3
3
  export interface ViewerLabels {
4
4
  shared: string;
5
- edit: string;
6
- cancel: string;
7
- cancelEditing: string;
8
- compare: string;
9
- compareTitle: string;
10
- saveDocument: string;
11
- saveAsVersion: string;
12
- noChanges: string;
13
- saving: string;
14
- save: string;
15
- saveVersion: string;
16
5
  useAsReference: string;
17
6
  useAsReferenceTitle: string;
18
7
  crop: string;
@@ -24,12 +13,6 @@ export interface ViewerLabels {
24
13
  pageInput: string;
25
14
  pageOfTitle: string;
26
15
  pageOf: (page: number, total: number) => string;
27
- compareVs: string;
28
- trackChanges: string;
29
- trackChangesBack: string;
30
- trackChangesView: string;
31
- flipComparison: string;
32
- stopComparing: string;
33
16
  previewUnavailable: string;
34
17
  cannotPreview: (extension: string) => string;
35
18
  downloadToOpen: string;
@@ -77,34 +60,6 @@ export interface ViewerTitleProps {
77
60
  }
78
61
  /** Read-only document name pill with the shared marker and version label. */
79
62
  export declare function ViewerTitle({ title, shared, versionLabel, shrink, labels, sharedTestId, }: ViewerTitleProps): import("react").JSX.Element;
80
- export interface ViewerEditActionsProps {
81
- isEditing: boolean;
82
- isDraft: boolean;
83
- /** Narrow panel: icon-only Edit/Compare. Save keeps its label. */
84
- compact: boolean;
85
- hasChanges: boolean;
86
- isSaving: boolean;
87
- /** Offer "Compare against the previous version". */
88
- canCompare: boolean;
89
- onStartEdit: () => void;
90
- onCancel: () => void;
91
- onCompare: () => void;
92
- onSave: () => void;
93
- labels?: Partial<ViewerLabels>;
94
- testIds?: Partial<ViewerEditActionsTestIds>;
95
- }
96
- export interface ViewerEditActionsTestIds {
97
- edit: string;
98
- cancel: string;
99
- compare: string;
100
- save: string;
101
- unsavedDot: string;
102
- }
103
- /**
104
- * Edit / Cancel / Compare / Save. Save is the ONE filled button and only once there is something
105
- * to save; a dot marks unsaved changes as a second glanceable signal.
106
- */
107
- export declare function ViewerEditActions({ isEditing, isDraft, compact, hasChanges, isSaving, canCompare, onStartEdit, onCancel, onCompare, onSave, labels, testIds, }: ViewerEditActionsProps): import("react").JSX.Element;
108
63
  export interface ViewerImageActionsProps {
109
64
  compact: boolean;
110
65
  onUseAsReference: () => void;
@@ -27,25 +27,6 @@ export interface ViewerPageCounterProps {
27
27
  }
28
28
  /** "3 / 12": click the number to type a page; Enter or blur commits, Escape cancels. */
29
29
  export declare function ViewerPageCounter({ page, total, onGoTo, labels }: ViewerPageCounterProps): import("react").JSX.Element | null;
30
- export interface ViewerCompareBarProps {
31
- /** The compared-against document pill (the host renders its entity). */
32
- compareTarget: ReactNode;
33
- versionLabel?: string | null;
34
- /** Artifacts toggle "Track changes"; plain documents get a flip-direction arrow instead. */
35
- mode: 'track-changes' | 'flip';
36
- showTrackChanges: boolean;
37
- onToggleTrackChanges: () => void;
38
- onFlip: () => void;
39
- onStop: () => void;
40
- labels?: Partial<ViewerLabels>;
41
- /** Overrides the track-changes toggle test id (default `track-changes-toggle`). */
42
- trackChangesTestId?: string;
43
- }
44
- /**
45
- * "Compare vs. [doc]" row contents: always an explicit text label (an icon-only pill was unclear),
46
- * with Track changes (artifacts) or Flip (plain documents), and Stop comparing.
47
- */
48
- export declare function ViewerCompareBar({ compareTarget, versionLabel, mode, showTrackChanges, onToggleTrackChanges, onFlip, onStop, labels, trackChangesTestId, }: ViewerCompareBarProps): import("react").JSX.Element;
49
30
  /** A format that cannot be previewed in the browser: offer the original instead. */
50
31
  export declare function ViewerPreviewUnavailable({ extension, onDownload, labels, }: {
51
32
  extension: string;