@arbidocs/blocks 0.4.57 → 0.4.59

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 (40) hide show
  1. package/dist/{StreamedArtifactEditor-7JHF4JIY.js → StreamedArtifactEditor-373E5JE7.js} +3 -3
  2. package/dist/{StreamedArtifactEditor-7JHF4JIY.js.map → StreamedArtifactEditor-373E5JE7.js.map} +1 -1
  3. package/dist/{StreamedArtifactEditor-L2AZZORU.cjs → StreamedArtifactEditor-DBB7MXM3.cjs} +5 -5
  4. package/dist/{StreamedArtifactEditor-L2AZZORU.cjs.map → StreamedArtifactEditor-DBB7MXM3.cjs.map} +1 -1
  5. package/dist/agents/index.cjs +218 -218
  6. package/dist/agents/index.js +2 -2
  7. package/dist/artifacts/VersionTimeline.d.ts +4 -2
  8. package/dist/artifacts/index.cjs +21 -21
  9. package/dist/artifacts/index.js +1 -1
  10. package/dist/{chunk-V34YFQ5Q.js → chunk-BIAALPXI.js} +3 -3
  11. package/dist/{chunk-V34YFQ5Q.js.map → chunk-BIAALPXI.js.map} +1 -1
  12. package/dist/{chunk-DTLOXXPN.js → chunk-FKIRBH5S.js} +9 -8
  13. package/dist/chunk-FKIRBH5S.js.map +1 -0
  14. package/dist/{chunk-LH4GHGQJ.cjs → chunk-KLPHGTQA.cjs} +3 -3
  15. package/dist/chunk-KLPHGTQA.cjs.map +1 -0
  16. package/dist/{chunk-PVK3GAMH.cjs → chunk-QWK7XXBP.cjs} +9 -8
  17. package/dist/chunk-QWK7XXBP.cjs.map +1 -0
  18. package/dist/{chunk-C3656J3H.js → chunk-YDVSD2XZ.js} +3 -3
  19. package/dist/chunk-YDVSD2XZ.js.map +1 -0
  20. package/dist/{chunk-HAADKDRN.cjs → chunk-ZSNH4CWE.cjs} +3 -3
  21. package/dist/{chunk-HAADKDRN.cjs.map → chunk-ZSNH4CWE.cjs.map} +1 -1
  22. package/dist/connect/docx.cjs +4 -4
  23. package/dist/connect/docx.js +1 -1
  24. package/dist/connect/index.cjs +1 -1
  25. package/dist/connect/index.js +1 -1
  26. package/dist/connection/ai.d.ts +9 -1
  27. package/dist/docx/index.cjs +14 -14
  28. package/dist/docx/index.js +2 -2
  29. package/dist/files/cells/RelatedDocsCell.d.ts +5 -2
  30. package/dist/files/index.cjs +6 -1
  31. package/dist/files/index.cjs.map +1 -1
  32. package/dist/files/index.js +7 -2
  33. package/dist/files/index.js.map +1 -1
  34. package/dist/index.cjs +219 -219
  35. package/dist/index.js +2 -2
  36. package/package.json +4 -4
  37. package/dist/chunk-C3656J3H.js.map +0 -1
  38. package/dist/chunk-DTLOXXPN.js.map +0 -1
  39. package/dist/chunk-LH4GHGQJ.cjs.map +0 -1
  40. package/dist/chunk-PVK3GAMH.cjs.map +0 -1
@@ -2,7 +2,7 @@
2
2
  'use strict';
3
3
 
4
4
  var chunkTLQQV7WW_cjs = require('../chunk-TLQQV7WW.cjs');
5
- var chunkLH4GHGQJ_cjs = require('../chunk-LH4GHGQJ.cjs');
5
+ var chunkKLPHGTQA_cjs = require('../chunk-KLPHGTQA.cjs');
6
6
  require('../chunk-7UTB4PHM.cjs');
7
7
  require('../chunk-MHVNT4J3.cjs');
8
8
  var react$1 = require('react');
@@ -15,7 +15,7 @@ function ConnectedNativeDocxEditor({
15
15
  ...props
16
16
  }) {
17
17
  const adapter = useConnectedNativeDocxAdapter(fontBaseUrl);
18
- return /* @__PURE__ */ jsxRuntime.jsx(chunkLH4GHGQJ_cjs.NativeDocxEditor, { ...props, adapter });
18
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkKLPHGTQA_cjs.NativeDocxEditor, { ...props, adapter });
19
19
  }
20
20
  function useConnectedNativeDocxAdapter(fontBaseUrl = "/native-docx/fonts") {
21
21
  const arbi = react.useArbi();
@@ -44,7 +44,7 @@ function useConnectedNativeDocxAdapter(fontBaseUrl = "/native-docx/fonts") {
44
44
  headers: { "Content-Type": "application/json" },
45
45
  body: JSON.stringify({ state })
46
46
  })).json(),
47
- loadFonts: () => chunkLH4GHGQJ_cjs.loadDocxFonts(fontBaseUrl),
47
+ loadFonts: () => chunkKLPHGTQA_cjs.loadDocxFonts(fontBaseUrl),
48
48
  baseUrl: apiUrl,
49
49
  author: user?.name || "You",
50
50
  onVersionSaved: async (id) => {
@@ -95,7 +95,7 @@ function ConnectedStreamedWordArtifact({
95
95
  ...props
96
96
  }) {
97
97
  const adapter = useConnectedNativeDocxAdapter(fontBaseUrl);
98
- return /* @__PURE__ */ jsxRuntime.jsx(chunkLH4GHGQJ_cjs.StreamedWordArtifact, { ...props, adapter });
98
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkKLPHGTQA_cjs.StreamedWordArtifact, { ...props, adapter });
99
99
  }
100
100
 
101
101
  exports.ConnectedNativeDocxEditor = ConnectedNativeDocxEditor;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { useConnection } from '../chunk-EHXSBH6U.js';
3
- import { NativeDocxEditor, loadDocxFonts, StreamedWordArtifact } from '../chunk-C3656J3H.js';
3
+ import { NativeDocxEditor, loadDocxFonts, StreamedWordArtifact } from '../chunk-YDVSD2XZ.js';
4
4
  import '../chunk-AA3PT6KR.js';
5
5
  import '../chunk-7F6CBP3Z.js';
6
6
  import { useMemo } from 'react';
@@ -108,7 +108,7 @@ function ConnectedSkillUpload() {
108
108
  upload.error && /* @__PURE__ */ jsxRuntime.jsx("p", { role: "alert", className: "text-sm text-destructive", children: upload.error.message })
109
109
  ] });
110
110
  }
111
- var StreamedArtifactEditor = react.lazy(() => import('../StreamedArtifactEditor-L2AZZORU.cjs'));
111
+ var StreamedArtifactEditor = react.lazy(() => import('../StreamedArtifactEditor-DBB7MXM3.cjs'));
112
112
  function StreamedArtifact({
113
113
  artifacts: artifacts$1,
114
114
  workspaceId,
@@ -107,7 +107,7 @@ function ConnectedSkillUpload() {
107
107
  upload.error && /* @__PURE__ */ jsx("p", { role: "alert", className: "text-sm text-destructive", children: upload.error.message })
108
108
  ] });
109
109
  }
110
- var StreamedArtifactEditor = lazy(() => import('../StreamedArtifactEditor-7JHF4JIY.js'));
110
+ var StreamedArtifactEditor = lazy(() => import('../StreamedArtifactEditor-373E5JE7.js'));
111
111
  function StreamedArtifact({
112
112
  artifacts,
113
113
  workspaceId,
@@ -25,7 +25,7 @@ export declare function useConnectedAiTask(): {
25
25
  file_type: string;
26
26
  is_complete: boolean;
27
27
  version: number;
28
- parent_doc_ext_id?: string | null;
28
+ version_of?: string | null;
29
29
  message_ext_id?: string | null;
30
30
  }[];
31
31
  reset: () => void;
@@ -54,6 +54,14 @@ export declare function useWorkspaceDocs(): {
54
54
  re_ocred?: boolean | null | undefined;
55
55
  config_ext_id?: string | null | undefined;
56
56
  parent_ext_id?: string | null | undefined;
57
+ lineage_id?: string | null | undefined;
58
+ version_number: number;
59
+ is_current: boolean;
60
+ thread_id?: string | null | undefined;
61
+ derived_from: {
62
+ doc_ext_id: string;
63
+ role: import("@arbidocs/client").components["schemas"]["DocRelationRole"];
64
+ }[];
57
65
  source_message_ext_id?: string | null | undefined;
58
66
  conversation_ext_id?: string | null | undefined;
59
67
  created_by_ext_id: string;
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var chunkLH4GHGQJ_cjs = require('../chunk-LH4GHGQJ.cjs');
4
+ var chunkKLPHGTQA_cjs = require('../chunk-KLPHGTQA.cjs');
5
5
  require('../chunk-7UTB4PHM.cjs');
6
6
  require('../chunk-MHVNT4J3.cjs');
7
7
  var react = require('@docx-editor.dev/react');
@@ -48,7 +48,7 @@ function NativeDocxComparison({
48
48
  if (!documentId)
49
49
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "native-docx-error", role: "status", children: "Comparing Word documents\u2026" });
50
50
  return /* @__PURE__ */ jsxRuntime.jsx(
51
- chunkLH4GHGQJ_cjs.NativeDocxEditor,
51
+ chunkKLPHGTQA_cjs.NativeDocxEditor,
52
52
  {
53
53
  adapter,
54
54
  documentId,
@@ -60,51 +60,51 @@ function NativeDocxComparison({
60
60
 
61
61
  Object.defineProperty(exports, "DocxCommentActivity", {
62
62
  enumerable: true,
63
- get: function () { return chunkLH4GHGQJ_cjs.DocxCommentActivity; }
63
+ get: function () { return chunkKLPHGTQA_cjs.DocxCommentActivity; }
64
64
  });
65
65
  Object.defineProperty(exports, "DocxEditorReview", {
66
66
  enumerable: true,
67
- get: function () { return chunkLH4GHGQJ_cjs.DocxEditorReview; }
67
+ get: function () { return chunkKLPHGTQA_cjs.DocxEditorReview; }
68
68
  });
69
69
  Object.defineProperty(exports, "DocxMentions", {
70
70
  enumerable: true,
71
- get: function () { return chunkLH4GHGQJ_cjs.DocxMentions; }
71
+ get: function () { return chunkKLPHGTQA_cjs.DocxMentions; }
72
72
  });
73
73
  Object.defineProperty(exports, "DocxParticipants", {
74
74
  enumerable: true,
75
- get: function () { return chunkLH4GHGQJ_cjs.DocxParticipants; }
75
+ get: function () { return chunkKLPHGTQA_cjs.DocxParticipants; }
76
76
  });
77
77
  Object.defineProperty(exports, "DocxRibbon", {
78
78
  enumerable: true,
79
- get: function () { return chunkLH4GHGQJ_cjs.DocxRibbon; }
79
+ get: function () { return chunkKLPHGTQA_cjs.DocxRibbon; }
80
80
  });
81
81
  Object.defineProperty(exports, "NativeDocxEditor", {
82
82
  enumerable: true,
83
- get: function () { return chunkLH4GHGQJ_cjs.NativeDocxEditor; }
83
+ get: function () { return chunkKLPHGTQA_cjs.NativeDocxEditor; }
84
84
  });
85
85
  Object.defineProperty(exports, "StreamedWordArtifact", {
86
86
  enumerable: true,
87
- get: function () { return chunkLH4GHGQJ_cjs.StreamedWordArtifact; }
87
+ get: function () { return chunkKLPHGTQA_cjs.StreamedWordArtifact; }
88
88
  });
89
89
  Object.defineProperty(exports, "loadDocxFonts", {
90
90
  enumerable: true,
91
- get: function () { return chunkLH4GHGQJ_cjs.loadDocxFonts; }
91
+ get: function () { return chunkKLPHGTQA_cjs.loadDocxFonts; }
92
92
  });
93
93
  Object.defineProperty(exports, "normalizeDocxExport", {
94
94
  enumerable: true,
95
- get: function () { return chunkLH4GHGQJ_cjs.normalizeDocxExport; }
95
+ get: function () { return chunkKLPHGTQA_cjs.normalizeDocxExport; }
96
96
  });
97
97
  Object.defineProperty(exports, "reviewModule", {
98
98
  enumerable: true,
99
- get: function () { return chunkLH4GHGQJ_cjs.reviewModule; }
99
+ get: function () { return chunkKLPHGTQA_cjs.reviewModule; }
100
100
  });
101
101
  Object.defineProperty(exports, "useReview", {
102
102
  enumerable: true,
103
- get: function () { return chunkLH4GHGQJ_cjs.useReview; }
103
+ get: function () { return chunkKLPHGTQA_cjs.useReview; }
104
104
  });
105
105
  Object.defineProperty(exports, "useReviewItem", {
106
106
  enumerable: true,
107
- get: function () { return chunkLH4GHGQJ_cjs.useReviewItem; }
107
+ get: function () { return chunkKLPHGTQA_cjs.useReviewItem; }
108
108
  });
109
109
  Object.defineProperty(exports, "DocxEditor", {
110
110
  enumerable: true,
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { NativeDocxEditor } from '../chunk-C3656J3H.js';
3
- export { DocxCommentActivity, DocxEditorReview, DocxMentions, DocxParticipants, DocxRibbon, NativeDocxEditor, StreamedWordArtifact, loadDocxFonts, normalizeDocxExport, reviewModule, useReview, useReviewItem } from '../chunk-C3656J3H.js';
2
+ import { NativeDocxEditor } from '../chunk-YDVSD2XZ.js';
3
+ export { DocxCommentActivity, DocxEditorReview, DocxMentions, DocxParticipants, DocxRibbon, NativeDocxEditor, StreamedWordArtifact, loadDocxFonts, normalizeDocxExport, reviewModule, useReview, useReviewItem } from '../chunk-YDVSD2XZ.js';
4
4
  import '../chunk-AA3PT6KR.js';
5
5
  import '../chunk-7F6CBP3Z.js';
6
6
  export { DocxEditor, useDocxEditor, useEditorState } from '@docx-editor.dev/react';
@@ -1,8 +1,11 @@
1
1
  import type { ReactNode } from 'react';
2
2
  export interface RelatedDocsCellProps<T> {
3
+ /** The email (or mailbox archive) this document was extracted from. */
3
4
  parent?: T | null;
4
- /** Attachments. */
5
+ /** Attachments (the documents extracted from this email). */
5
6
  attachments: T[];
7
+ /** Documents this one was made from (a crop's image, a redline's inputs). */
8
+ madeFrom?: T[];
6
9
  duplicates: T[];
7
10
  similar: T[];
8
11
  /** Slot: the document pill for one related doc (the app supplies its entity chip). */
@@ -19,4 +22,4 @@ export interface RelatedDocsCellProps<T> {
19
22
  * duplicates, similar); clicking opens a popover grouping the related documents with an action
20
23
  * per group (Switch to / Delete / Compare). Renders nothing when there are no relations.
21
24
  */
22
- export declare function RelatedDocsCell<T>({ parent, attachments, duplicates, similar, renderDoc, getKey, onSwitchTo, onDelete, onCompare, className, }: RelatedDocsCellProps<T>): import("react").JSX.Element | null;
25
+ export declare function RelatedDocsCell<T>({ parent, attachments, madeFrom, duplicates, similar, renderDoc, getKey, onSwitchTo, onDelete, onCompare, className, }: RelatedDocsCellProps<T>): import("react").JSX.Element | null;
@@ -3750,6 +3750,7 @@ function RelatedGroup({
3750
3750
  function RelatedDocsCell({
3751
3751
  parent,
3752
3752
  attachments,
3753
+ madeFrom = [],
3753
3754
  duplicates,
3754
3755
  similar,
3755
3756
  renderDoc,
@@ -3761,9 +3762,11 @@ function RelatedDocsCell({
3761
3762
  }) {
3762
3763
  const [open, setOpen] = react.useState(false);
3763
3764
  const attachmentCount = attachments.length;
3765
+ const madeFromCount = madeFrom.length;
3764
3766
  const dupeCount = duplicates.length;
3765
3767
  const simCount = similar.length;
3766
- if (!parent && attachmentCount === 0 && dupeCount === 0 && simCount === 0) return null;
3768
+ if (!parent && attachmentCount === 0 && madeFromCount === 0 && dupeCount === 0 && simCount === 0)
3769
+ return null;
3767
3770
  const row = (doc, action) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1", children: [
3768
3771
  renderDoc(doc),
3769
3772
  action
@@ -3790,6 +3793,7 @@ function RelatedDocsCell({
3790
3793
  label: attachmentCount === 1 ? "attachment" : "attachments"
3791
3794
  }
3792
3795
  ),
3796
+ /* @__PURE__ */ jsxRuntime.jsx(RelatedBadge, { icon: lucideReact.GitFork, count: madeFromCount, label: "made from" }),
3793
3797
  /* @__PURE__ */ jsxRuntime.jsx(
3794
3798
  RelatedBadge,
3795
3799
  {
@@ -3805,6 +3809,7 @@ function RelatedDocsCell({
3805
3809
  /* @__PURE__ */ jsxRuntime.jsx(ui.PopoverContent, { className: "max-h-[400px] w-[320px] overflow-y-auto p-3", align: "start", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-3", children: [
3806
3810
  parent && /* @__PURE__ */ jsxRuntime.jsx(RelatedGroup, { icon: lucideReact.CornerDownRight, title: "Parent", count: 1, children: row(parent, switchAction(parent)) }),
3807
3811
  attachmentCount > 0 && /* @__PURE__ */ jsxRuntime.jsx(RelatedGroup, { icon: lucideReact.CornerRightDown, title: "Attachments", count: attachmentCount, children: attachments.map((doc) => row(doc, switchAction(doc))) }),
3812
+ madeFromCount > 0 && /* @__PURE__ */ jsxRuntime.jsx(RelatedGroup, { icon: lucideReact.GitFork, title: "Made from", count: madeFromCount, children: madeFrom.map((doc) => row(doc, switchAction(doc))) }),
3808
3813
  dupeCount > 0 && /* @__PURE__ */ jsxRuntime.jsx(RelatedGroup, { icon: lucideReact.CopyX, title: "Duplicates", count: dupeCount, children: duplicates.map(
3809
3814
  (doc) => row(
3810
3815
  doc,