@arbidocs/blocks 0.5.127 → 0.5.129

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 (89) hide show
  1. package/dist/ConnectedCallDock-XJOYVVAH.cjs +1 -1
  2. package/dist/ConnectedCallRoom-CUDYAPQK.cjs +1 -1
  3. package/dist/{ConnectedNativeDocxComparison-JUF2TI2P.cjs → ConnectedNativeDocxComparison-7KTAOUE3.cjs} +10 -10
  4. package/dist/{ConnectedStreamedWordArtifact-Q64DRRQD.cjs.map → ConnectedNativeDocxComparison-7KTAOUE3.cjs.map} +1 -1
  5. package/dist/ConnectedPresentation-SI3L77J4.cjs +1 -1
  6. package/dist/{ConnectedProductionSetDialog-LHB4VQWC.cjs → ConnectedProductionSetDialog-4EAY6KAZ.cjs} +3 -3
  7. package/dist/{ConnectedProductionSetDialog-LHB4VQWC.cjs.map → ConnectedProductionSetDialog-4EAY6KAZ.cjs.map} +1 -1
  8. package/dist/ConnectedSlidesTab-E76OVY34.cjs +1 -1
  9. package/dist/{ConnectedStreamedWordArtifact-Q64DRRQD.cjs → ConnectedStreamedWordArtifact-J4MYBABA.cjs} +10 -10
  10. package/dist/{ConnectedNativeDocxComparison-JUF2TI2P.cjs.map → ConnectedStreamedWordArtifact-J4MYBABA.cjs.map} +1 -1
  11. package/dist/DocumentReviewCard-M53XFLI2.cjs +1 -1
  12. package/dist/{FilesViewerDialog-V6FSRQTP.cjs → FilesViewerDialog-GGF4WMU4.cjs} +13 -13
  13. package/dist/{FilesViewerDialog-V6FSRQTP.cjs.map → FilesViewerDialog-GGF4WMU4.cjs.map} +1 -1
  14. package/dist/{WorkspaceTableView-3XYAV4BV.cjs → WorkspaceTableView-CUCTCA2O.cjs} +6 -6
  15. package/dist/{WorkspaceTableView-3XYAV4BV.cjs.map → WorkspaceTableView-CUCTCA2O.cjs.map} +1 -1
  16. package/dist/agents/index.cjs +177 -177
  17. package/dist/ai-IEIR7SC2.cjs +1 -1
  18. package/dist/calls/index.cjs +1 -1
  19. package/dist/chat/index.cjs +1 -1
  20. package/dist/{chunk-VLQCLQAS.cjs → chunk-5GA65VBW.cjs} +5 -5
  21. package/dist/{chunk-VLQCLQAS.cjs.map → chunk-5GA65VBW.cjs.map} +1 -1
  22. package/dist/{chunk-KXIRVKCJ.cjs → chunk-CNLIXB6S.cjs} +39 -7
  23. package/dist/chunk-CNLIXB6S.cjs.map +1 -0
  24. package/dist/{chunk-MXBXZXXQ.cjs → chunk-ENOPKX7E.cjs} +3 -3
  25. package/dist/{chunk-MXBXZXXQ.cjs.map → chunk-ENOPKX7E.cjs.map} +1 -1
  26. package/dist/{chunk-E3L5DB5F.cjs → chunk-GEZB3OEC.cjs} +4 -4
  27. package/dist/{chunk-E3L5DB5F.cjs.map → chunk-GEZB3OEC.cjs.map} +1 -1
  28. package/dist/{chunk-YP5EBGLU.cjs → chunk-HH5RDNO5.cjs} +23 -23
  29. package/dist/{chunk-YP5EBGLU.cjs.map → chunk-HH5RDNO5.cjs.map} +1 -1
  30. package/dist/{chunk-2SU37RZA.cjs → chunk-I3A6KKWY.cjs} +29 -13
  31. package/dist/chunk-I3A6KKWY.cjs.map +1 -0
  32. package/dist/{chunk-NTDQQLDD.cjs → chunk-I7J3ED6P.cjs} +4 -4
  33. package/dist/{chunk-NTDQQLDD.cjs.map → chunk-I7J3ED6P.cjs.map} +1 -1
  34. package/dist/{chunk-QG2U2JGX.cjs → chunk-L4CIFLCU.cjs} +4 -4
  35. package/dist/{chunk-QG2U2JGX.cjs.map → chunk-L4CIFLCU.cjs.map} +1 -1
  36. package/dist/{chunk-M6WVIGYP.cjs → chunk-LXFCED4Z.cjs} +7 -7
  37. package/dist/{chunk-M6WVIGYP.cjs.map → chunk-LXFCED4Z.cjs.map} +1 -1
  38. package/dist/{chunk-CQQQIZU4.cjs → chunk-NQML7IUC.cjs} +3 -3
  39. package/dist/{chunk-CQQQIZU4.cjs.map → chunk-NQML7IUC.cjs.map} +1 -1
  40. package/dist/{chunk-JVLOIIA7.cjs → chunk-U7D6ZDR2.cjs} +12 -12
  41. package/dist/{chunk-JVLOIIA7.cjs.map → chunk-U7D6ZDR2.cjs.map} +1 -1
  42. package/dist/{chunk-MMSHIIKG.cjs → chunk-XGTMC54Q.cjs} +4 -4
  43. package/dist/{chunk-MMSHIIKG.cjs.map → chunk-XGTMC54Q.cjs.map} +1 -1
  44. package/dist/connect/docx.cjs +13 -13
  45. package/dist/connect/index.cjs +463 -463
  46. package/dist/connect/index.cjs.map +1 -1
  47. package/dist/connect/viewer.cjs +11 -11
  48. package/dist/connection/billing/AddAddonDialog.d.ts +2 -2
  49. package/dist/connection/billing/AddAddonDialog.js.map +1 -1
  50. package/dist/connection/billing/ConnectedQuotaDialog.d.ts +1 -1
  51. package/dist/connection/billing/ConnectedQuotaDialog.js.map +1 -1
  52. package/dist/connection/billing/MonthlySpendCap.js +1 -1
  53. package/dist/connection/billing/MonthlySpendCap.js.map +1 -1
  54. package/dist/connection/billing/ProjectBilling.js.map +1 -1
  55. package/dist/connection/billing/ProjectPurchaseOptions.js +1 -1
  56. package/dist/connection/billing/ProjectPurchaseOptions.js.map +1 -1
  57. package/dist/connection/billing/ProjectUsageCard.js +1 -1
  58. package/dist/connection/billing/ProjectUsageCard.js.map +1 -1
  59. package/dist/connection/billing/ReduceAddonDialog.d.ts +1 -1
  60. package/dist/connection/billing/ReduceAddonDialog.js.map +1 -1
  61. package/dist/connection/billing/StripeCheckoutModal.d.ts +1 -1
  62. package/dist/connection/billing/StripeCheckoutModal.js.map +1 -1
  63. package/dist/connection/billing/addon-pricing.d.ts +4 -4
  64. package/dist/connection/billing/addon-pricing.js.map +1 -1
  65. package/dist/connection/billing/plan-constants.d.ts +3 -3
  66. package/dist/connection/billing/plan-constants.js +2 -2
  67. package/dist/connection/billing/plan-constants.js.map +1 -1
  68. package/dist/connection/billing/plan-pricing.d.ts +2 -2
  69. package/dist/connection/billing/plan-pricing.js.map +1 -1
  70. package/dist/connection/billing/useAddonPurchase.d.ts +1 -1
  71. package/dist/connection/billing/useAddonPurchase.js.map +1 -1
  72. package/dist/connection/conversation/MermaidDiagram.js +11 -2
  73. package/dist/connection/conversation/MermaidDiagram.js.map +2 -2
  74. package/dist/connection/conversation/download-mermaid.d.ts +2 -0
  75. package/dist/connection/conversation/download-mermaid.js +29 -0
  76. package/dist/connection/conversation/download-mermaid.js.map +7 -0
  77. package/dist/connection/remote-control/remoteControl.js +19 -3
  78. package/dist/connection/remote-control/remoteControl.js.map +2 -2
  79. package/dist/embed/index.cjs +13 -13
  80. package/dist/facts/index.cjs +43 -43
  81. package/dist/index.cjs +288 -288
  82. package/dist/settings/index.cjs +1 -1
  83. package/dist/site/index.cjs +5 -5
  84. package/dist/studio/index.cjs +2 -2
  85. package/dist/workflow-canvas/index.cjs +19 -19
  86. package/node_modules/@arbidocs/coedit/package.json +1 -1
  87. package/package.json +5 -5
  88. package/dist/chunk-2SU37RZA.cjs.map +0 -1
  89. package/dist/chunk-KXIRVKCJ.cjs.map +0 -1
@@ -6,7 +6,7 @@ var chunk7NLO7ASW_cjs = require('./chunk-7NLO7ASW.cjs');
6
6
  var chunk7PN3YENO_cjs = require('./chunk-7PN3YENO.cjs');
7
7
  var chunkTJY7XPDE_cjs = require('./chunk-TJY7XPDE.cjs');
8
8
  var chunkXNW62J54_cjs = require('./chunk-XNW62J54.cjs');
9
- var chunkKXIRVKCJ_cjs = require('./chunk-KXIRVKCJ.cjs');
9
+ var chunkCNLIXB6S_cjs = require('./chunk-CNLIXB6S.cjs');
10
10
  var chunkT73BHNQX_cjs = require('./chunk-T73BHNQX.cjs');
11
11
  var chunk223D4727_cjs = require('./chunk-223D4727.cjs');
12
12
  var chunkQQMMCXBP_cjs = require('./chunk-QQMMCXBP.cjs');
@@ -33,8 +33,8 @@ var chunk75BNMCUX_cjs = require('./chunk-75BNMCUX.cjs');
33
33
  var chunkHSLPFBK2_cjs = require('./chunk-HSLPFBK2.cjs');
34
34
  var chunkQGVOT7E4_cjs = require('./chunk-QGVOT7E4.cjs');
35
35
  var chunkIPSHAMO2_cjs = require('./chunk-IPSHAMO2.cjs');
36
- var chunkTKHCIHE2_cjs = require('./chunk-TKHCIHE2.cjs');
37
36
  var chunkLJJJ6CYH_cjs = require('./chunk-LJJJ6CYH.cjs');
37
+ var chunkTKHCIHE2_cjs = require('./chunk-TKHCIHE2.cjs');
38
38
  var jsxRuntime = require('react/jsx-runtime');
39
39
  var React6 = require('react');
40
40
  var client = require('@arbidocs/client');
@@ -310,7 +310,7 @@ var screenRuntimes = /* @__PURE__ */ new WeakMap();
310
310
  function screenRuntime(session) {
311
311
  let runtime = screenRuntimes.get(session);
312
312
  if (!runtime) {
313
- runtime = { sharing: createScreenSharing(), generation: 0, setup: "" };
313
+ runtime = { sharing: createScreenSharing(), generation: 0, setup: "", opening: false };
314
314
  screenRuntimes.set(session, runtime);
315
315
  }
316
316
  return runtime;
@@ -321,6 +321,7 @@ function stopScreen(session) {
321
321
  runtime.generation++;
322
322
  runtime.sharing.stop();
323
323
  runtime.setup = "";
324
+ runtime.opening = false;
324
325
  const actions = react.remoteControlActions(session);
325
326
  if (react.remoteControlStateOf(session.getState()).sharing) actions.setSharing(false);
326
327
  }
@@ -353,12 +354,14 @@ function createRemoteControl(session, guided, screenTransport) {
353
354
  actions.setControllingAgent({ name: req.agentName, extId: req.agentExtId });
354
355
  try {
355
356
  if (!runtime.sharing.active) {
357
+ runtime.opening = true;
356
358
  await runtime.sharing.start(disable);
357
359
  if (!current()) {
358
360
  runtime.sharing.stop();
359
361
  await reply(req, "stopped");
360
362
  return;
361
363
  }
364
+ runtime.opening = false;
362
365
  actions.setSharing(true);
363
366
  if (screenTransport.diagnose)
364
367
  runtime.setup = await screenTransport.diagnose().catch(() => "Setup checks unavailable.");
@@ -383,7 +386,9 @@ ${runtime.setup}`.slice(0, 24e3)
383
386
  if (current()) disable();
384
387
  } finally {
385
388
  if (current()) {
386
- actions.setControllingAgent(null);
389
+ const currentAgent = state().controllingAgent;
390
+ if (currentAgent?.name === req.agentName && currentAgent.extId === req.agentExtId)
391
+ actions.setControllingAgent(null);
387
392
  if (!keepSharing) disable();
388
393
  }
389
394
  }
@@ -489,6 +494,17 @@ function useRemoteControlSessionReset() {
489
494
  ];
490
495
  return () => off.forEach((unsubscribe) => unsubscribe?.());
491
496
  }, [arbi, session]);
497
+ React6.useEffect(
498
+ () => session.subscribe(() => {
499
+ const permission = react.remoteControlStateOf(session.getState());
500
+ const runtime = screenRuntimes.get(session);
501
+ if (runtime && (runtime.sharing.active || runtime.opening) && !permission.enabled && !permission.controllingAgent) {
502
+ stopScreen(session);
503
+ chunkORELHENJ_cjs.cancelGuidedRun();
504
+ }
505
+ }),
506
+ [session]
507
+ );
492
508
  const lastUser = React6.useRef(userId);
493
509
  React6.useEffect(() => {
494
510
  if (lastUser.current === userId) return;
@@ -510,7 +526,7 @@ function useRemoteControlHandlers() {
510
526
  react.remoteControlActions(session).setEnabled(false);
511
527
  chunkORELHENJ_cjs.cancelGuidedRun();
512
528
  },
513
- [session, workspaceId]
529
+ [session, workspaceId, remoteControl]
514
530
  );
515
531
  return React6.useMemo(
516
532
  () => remoteControl ? {
@@ -1738,7 +1754,7 @@ var AgentStepsComponent = ({
1738
1754
  summary && !isActive && (step.narration ? (
1739
1755
  /* Narration is PROSE (headings, bold, lists): render markdown, not raw asterisks.
1740
1756
  Tool summaries stay plain text: one-line headlines where a clamp matters. */
1741
- /* @__PURE__ */ jsxRuntime.jsx(chunkTP5PGWIO_cjs.StepNarration, { index: step.index, children: /* @__PURE__ */ jsxRuntime.jsx(chunkKXIRVKCJ_cjs.ConnectedMarkdown, { isStreaming: false, children: summary }) })
1757
+ /* @__PURE__ */ jsxRuntime.jsx(chunkTP5PGWIO_cjs.StepNarration, { index: step.index, children: /* @__PURE__ */ jsxRuntime.jsx(chunkCNLIXB6S_cjs.ConnectedMarkdown, { isStreaming: false, children: summary }) })
1742
1758
  ) : /* @__PURE__ */ jsxRuntime.jsx(chunkTP5PGWIO_cjs.StepSummary, { index: step.index, multiLine: isMultiLine, children: summary })),
1743
1759
  details.map((d, di) => /* @__PURE__ */ jsxRuntime.jsx(chunkTP5PGWIO_cjs.StepDetail, { index: step.index, children: d }, di)),
1744
1760
  showOutcome && /* @__PURE__ */ jsxRuntime.jsx(chunkTP5PGWIO_cjs.StepOutcome, { index: step.index, failed: outcomeFailed, children: step.outcome }),
@@ -2120,13 +2136,13 @@ function withAnswerTable(components) {
2120
2136
  }
2121
2137
  return merged;
2122
2138
  }
2123
- var renderMarkdown = ({ components, isStreaming, children }) => /* @__PURE__ */ jsxRuntime.jsx(chunkKXIRVKCJ_cjs.ConnectedMarkdown, { components: withAnswerTable(components), isStreaming, children });
2139
+ var renderMarkdown = ({ components, isStreaming, children }) => /* @__PURE__ */ jsxRuntime.jsx(chunkCNLIXB6S_cjs.ConnectedMarkdown, { components: withAnswerTable(components), isStreaming, children });
2124
2140
  function LinkInAnswer({ href, children, ...props }) {
2125
2141
  const docId = chunkZ2XZ2D4N_cjs.workspaceDocIdFromHref(href, chunkTKHCIHE2_cjs.useBlocksEnvironment().runtimeConfig.deploymentDomain);
2126
2142
  if (docId) {
2127
- return /* @__PURE__ */ jsxRuntime.jsx(chunkKXIRVKCJ_cjs.InternalDocLink, { docId, href, ...props, children });
2143
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkCNLIXB6S_cjs.InternalDocLink, { docId, href, ...props, children });
2128
2144
  }
2129
- return /* @__PURE__ */ jsxRuntime.jsx(chunkKXIRVKCJ_cjs.ExternalLink, { href, ...props, children });
2145
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkCNLIXB6S_cjs.ExternalLink, { href, ...props, children });
2130
2146
  }
2131
2147
  var ConnectedCitationRendererComponent = (props) => {
2132
2148
  const session = react.useArbiSessionStore();
@@ -2856,7 +2872,7 @@ var MessageComponent = ({
2856
2872
  ),
2857
2873
  subagentTaskRecord && /* @__PURE__ */ jsxRuntime.jsx(chunkM2FOXGJU_cjs.MessageSubagentBadge, { messageId }),
2858
2874
  /* @__PURE__ */ jsxRuntime.jsxs(chunkM2FOXGJU_cjs.MessageBody, { messageId, children: [
2859
- settledNarration ? /* @__PURE__ */ jsxRuntime.jsx(chunkM2FOXGJU_cjs.MessageNarration, { messageId, children: /* @__PURE__ */ jsxRuntime.jsx(chunkKXIRVKCJ_cjs.ConnectedMarkdown, { isStreaming: false, children: settledNarration }) }) : null,
2875
+ settledNarration ? /* @__PURE__ */ jsxRuntime.jsx(chunkM2FOXGJU_cjs.MessageNarration, { messageId, children: /* @__PURE__ */ jsxRuntime.jsx(chunkCNLIXB6S_cjs.ConnectedMarkdown, { isStreaming: false, children: settledNarration }) }) : null,
2860
2876
  liveContent ? role === "assistant" ? /* @__PURE__ */ jsxRuntime.jsx(
2861
2877
  ConnectedCitationRenderer,
2862
2878
  {
@@ -2866,7 +2882,7 @@ var MessageComponent = ({
2866
2882
  messageId: message.external_id || "unknown",
2867
2883
  isStreaming: isGenerating
2868
2884
  }
2869
- ) : /* @__PURE__ */ jsxRuntime.jsx(chunkKXIRVKCJ_cjs.ConnectedMarkdown, { isStreaming: isGenerating, children: linkMentions(
2885
+ ) : /* @__PURE__ */ jsxRuntime.jsx(chunkCNLIXB6S_cjs.ConnectedMarkdown, { isStreaming: isGenerating, children: linkMentions(
2870
2886
  isUser && liveContent.startsWith("/pa ") ? liveContent.slice(4) : liveContent,
2871
2887
  message.mentions
2872
2888
  ) }) : null,
@@ -5607,5 +5623,5 @@ exports.useRemoteControlHandlers = useRemoteControlHandlers;
5607
5623
  exports.useRemoteControlSessionReset = useRemoteControlSessionReset;
5608
5624
  exports.useSsoSignIn = useSsoSignIn;
5609
5625
  exports.useWorkspaceDocTitles = useWorkspaceDocTitles;
5610
- //# sourceMappingURL=chunk-2SU37RZA.cjs.map
5611
- //# sourceMappingURL=chunk-2SU37RZA.cjs.map
5626
+ //# sourceMappingURL=chunk-I3A6KKWY.cjs.map
5627
+ //# sourceMappingURL=chunk-I3A6KKWY.cjs.map