@arbidocs/react 0.4.65 → 0.4.66

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.
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunkVH5ITITV_cjs = require('../chunk-VH5ITITV.cjs');
3
+ var chunkNCUBNIO4_cjs = require('../chunk-NCUBNIO4.cjs');
4
4
  var chunkPATLJSAO_cjs = require('../chunk-PATLJSAO.cjs');
5
+ var chunkZMTLGO3K_cjs = require('../chunk-ZMTLGO3K.cjs');
5
6
  var chunkNA3FOYSF_cjs = require('../chunk-NA3FOYSF.cjs');
6
7
  require('../chunk-S6A6FSG7.cjs');
7
- var chunkZMTLGO3K_cjs = require('../chunk-ZMTLGO3K.cjs');
8
8
  var react = require('react');
9
9
  var reactQuery = require('@tanstack/react-query');
10
10
  var jsxRuntime = require('react/jsx-runtime');
@@ -127,7 +127,7 @@ function flattenChunks(chunks, options) {
127
127
  const text = (chunks ?? []).map((c) => (c.content ?? "").trim()).join("\n\n");
128
128
  if (!options?.unescape) return text;
129
129
  return chunkPATLJSAO_cjs.normalizeMarkdown(
130
- chunkVH5ITITV_cjs.repairParsedStructure(chunkVH5ITITV_cjs.repairParsedTitle(chunkVH5ITITV_cjs.unescapeMarkdown(text)))
130
+ chunkNCUBNIO4_cjs.repairParsedStructure(chunkNCUBNIO4_cjs.repairParsedTitle(chunkNCUBNIO4_cjs.unescapeMarkdown(text)))
131
131
  ).replace(/\n$/, "");
132
132
  }
133
133
  var DOC_ID = /^doc/;
@@ -335,7 +335,7 @@ function useArtifactText(docId, options) {
335
335
  const enabled = (options?.enabled ?? true) && isDocumentId(docId) && arbi.hasWorkspace;
336
336
  const query = reactQuery.useQuery({
337
337
  // Under the shared `parsedDoc` key, so a document's invalidation reaches it too.
338
- queryKey: [...chunkVH5ITITV_cjs.arbiQueryKeys.parsedDoc(docId ?? "", "marker"), "artifact-text"],
338
+ queryKey: [...chunkNCUBNIO4_cjs.arbiQueryKeys.parsedDoc(docId ?? "", "marker"), "artifact-text"],
339
339
  queryFn: async () => {
340
340
  const { docId: plainId, version } = parseVersionRef(docId);
341
341
  const parsed = await arbi.documents.getParsedContent(
@@ -383,12 +383,12 @@ function useArtifactText(docId, options) {
383
383
  // src/artifacts/useArtifactSession.ts
384
384
  function useArtifactVersions(workspaceId, docId) {
385
385
  const plainId = docId ? parseVersionRef(docId).docId : null;
386
- const { data: documents } = chunkVH5ITITV_cjs.useDocuments(workspaceId);
386
+ const { data: documents } = chunkNCUBNIO4_cjs.useDocuments(workspaceId);
387
387
  const listed = react.useMemo(
388
388
  () => (documents ?? []).find((d) => d.external_id === plainId),
389
389
  [documents, plainId]
390
390
  );
391
- const { data: history } = chunkVH5ITITV_cjs.useDocumentVersionList(plainId, {
391
+ const { data: history } = chunkNCUBNIO4_cjs.useDocumentVersionList(plainId, {
392
392
  enabled: !!plainId && documents !== void 0 && !listed
393
393
  });
394
394
  return react.useMemo(
@@ -413,9 +413,9 @@ function useSaveArtifactVersion() {
413
413
  );
414
414
  const docId = result.doc_ext_ids?.[0];
415
415
  if (workspaceId) {
416
- await queryClient.invalidateQueries({ queryKey: chunkVH5ITITV_cjs.arbiQueryKeys.documents(workspaceId) });
416
+ await queryClient.invalidateQueries({ queryKey: chunkNCUBNIO4_cjs.arbiQueryKeys.documents(workspaceId) });
417
417
  }
418
- await queryClient.invalidateQueries({ queryKey: chunkVH5ITITV_cjs.arbiQueryKeys.allDocumentVersions() });
418
+ await queryClient.invalidateQueries({ queryKey: chunkNCUBNIO4_cjs.arbiQueryKeys.allDocumentVersions() });
419
419
  if (docId) await queryClient.invalidateQueries({ queryKey: ["arbi", "parsedDoc", docId] });
420
420
  return { docId, version: result.version ?? void 0 };
421
421
  }
@@ -564,7 +564,7 @@ function useStreamedArtifact({
564
564
  let stored;
565
565
  if (clean) stored = clean(content);
566
566
  else {
567
- const report = chunkVH5ITITV_cjs.cleanDraftWithReport(content);
567
+ const report = chunkNCUBNIO4_cjs.cleanDraftWithReport(content);
568
568
  stored = report.text;
569
569
  setCleaned(report);
570
570
  onCleaned?.(report);
@@ -605,35 +605,35 @@ function useStreamedArtifact({
605
605
 
606
606
  Object.defineProperty(exports, "cleanDraftMarkdown", {
607
607
  enumerable: true,
608
- get: function () { return chunkVH5ITITV_cjs.cleanDraftMarkdown; }
608
+ get: function () { return chunkNCUBNIO4_cjs.cleanDraftMarkdown; }
609
609
  });
610
610
  Object.defineProperty(exports, "cleanDraftWithReport", {
611
611
  enumerable: true,
612
- get: function () { return chunkVH5ITITV_cjs.cleanDraftWithReport; }
612
+ get: function () { return chunkNCUBNIO4_cjs.cleanDraftWithReport; }
613
613
  });
614
614
  Object.defineProperty(exports, "promoteBoldTitle", {
615
615
  enumerable: true,
616
- get: function () { return chunkVH5ITITV_cjs.promoteBoldTitle; }
616
+ get: function () { return chunkNCUBNIO4_cjs.promoteBoldTitle; }
617
617
  });
618
618
  Object.defineProperty(exports, "repairParsedStructure", {
619
619
  enumerable: true,
620
- get: function () { return chunkVH5ITITV_cjs.repairParsedStructure; }
620
+ get: function () { return chunkNCUBNIO4_cjs.repairParsedStructure; }
621
621
  });
622
622
  Object.defineProperty(exports, "repairParsedTitle", {
623
623
  enumerable: true,
624
- get: function () { return chunkVH5ITITV_cjs.repairParsedTitle; }
624
+ get: function () { return chunkNCUBNIO4_cjs.repairParsedTitle; }
625
625
  });
626
626
  Object.defineProperty(exports, "stripAgentPreamble", {
627
627
  enumerable: true,
628
- get: function () { return chunkVH5ITITV_cjs.stripAgentPreamble; }
628
+ get: function () { return chunkNCUBNIO4_cjs.stripAgentPreamble; }
629
629
  });
630
630
  Object.defineProperty(exports, "unescapeMarkdown", {
631
631
  enumerable: true,
632
- get: function () { return chunkVH5ITITV_cjs.unescapeMarkdown; }
632
+ get: function () { return chunkNCUBNIO4_cjs.unescapeMarkdown; }
633
633
  });
634
634
  Object.defineProperty(exports, "unwrapCitationLinks", {
635
635
  enumerable: true,
636
- get: function () { return chunkVH5ITITV_cjs.unwrapCitationLinks; }
636
+ get: function () { return chunkNCUBNIO4_cjs.unwrapCitationLinks; }
637
637
  });
638
638
  Object.defineProperty(exports, "buildHybridRedlineMarkdown", {
639
639
  enumerable: true,
@@ -1,10 +1,10 @@
1
- import { repairParsedStructure, repairParsedTitle, unescapeMarkdown, arbiQueryKeys, useDocuments, useDocumentVersionList, cleanDraftWithReport } from '../chunk-SX7FCSON.js';
2
- export { cleanDraftMarkdown, cleanDraftWithReport, promoteBoldTitle, repairParsedStructure, repairParsedTitle, stripAgentPreamble, unescapeMarkdown, unwrapCitationLinks } from '../chunk-SX7FCSON.js';
1
+ import { repairParsedStructure, repairParsedTitle, unescapeMarkdown, arbiQueryKeys, useDocuments, useDocumentVersionList, cleanDraftWithReport } from '../chunk-OTNB2IZL.js';
2
+ export { cleanDraftMarkdown, cleanDraftWithReport, promoteBoldTitle, repairParsedStructure, repairParsedTitle, stripAgentPreamble, unescapeMarkdown, unwrapCitationLinks } from '../chunk-OTNB2IZL.js';
3
3
  import { revertRedlineRegion, buildHybridRedlineWithRegions, buildHybridRedlineMarkdown, normalizeMarkdown } from '../chunk-43AKLNBC.js';
4
4
  export { buildHybridRedlineMarkdown, buildHybridRedlineWithRegions, normalizeMarkdown, revertRedlineRegion } from '../chunk-43AKLNBC.js';
5
+ import { useArbi } from '../chunk-J4MX2W4H.js';
5
6
  import { MarkdownRenderer } from '../chunk-JPGV7NMY.js';
6
7
  import '../chunk-SN5YV6FF.js';
7
- import { useArbi } from '../chunk-J4MX2W4H.js';
8
8
  import { useState, useRef, useEffect, useCallback, useMemo } from 'react';
9
9
  import { useQuery, useQueryClient, useMutation } from '@tanstack/react-query';
10
10
  import { jsx } from 'react/jsx-runtime';
@@ -1,5 +1,5 @@
1
- import { Dialog, DialogContent } from './chunk-2VW47ADK.js';
2
1
  import { MarkdownRenderer } from './chunk-JPGV7NMY.js';
2
+ import { Dialog, DialogContent } from './chunk-2VW47ADK.js';
3
3
  import { getCollisionPadding, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuLabel, DropdownMenuItem, DropdownMenuSeparator } from './chunk-DIZC2XVB.js';
4
4
  import { usePortalContainer } from './chunk-QICALPFQ.js';
5
5
  import { cn } from './chunk-SN5YV6FF.js';
@@ -3908,5 +3908,5 @@ function DocumentCard({
3908
3908
  }
3909
3909
 
3910
3910
  export { AgentBadge, AiMarkdown, ArbiBotHeadIcon, AudIcon, Avatar, AvatarFallback, AvatarImage, BASE_COLORS2 as BASE_COLORS, Badge, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DictateProvider, DocIcon, DocumentCard, DocumentEntity, ENTITY_MAPPINGS, EmlIcon, EntityIcon, EntityPill, FILE_TYPE_COLORS, HoverCard, HoverCardContent, HoverCardTrigger, HtmlIcon, IconToggle, ImgIcon, InlineMicButton, Input, Label2 as Label, MarkMenu, MicRecordingOverlay, MicWaveformIndicator, NEUTRAL_GRAY2 as NEUTRAL_GRAY, PLACEHOLDER_COLOR, PassageCard, PdfIcon, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PresenceLabel, Progress, ProjectEntity, RadioGroup, RadioGroupItem, RagDot, RelevanceDot, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator2 as Separator, Slider, StatusPill, Switch, TAG_TYPE_ICONS, TAG_TYPE_LABELS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TagEntity, Textarea, ThreadVisibilityIcon, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TxtIcon, UserEntity, UserMenu, VISIBILITY_ICONS, VidIcon, VisibilityIcon, VisibilityToggle, XlsIcon, badgeVariants, cardVariants, classifyMediaError, configureEntityRegistry, configureRagLabels, configureStatusRegistry, formatElapsed, getDocIcon, getEntityColor2 as getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getStatusVariant, getTagTypeIcon, getTagTypeLabel, getWorkspaceColor, returnFocusToMark, toggleVariants, useAudioRecorder };
3911
- //# sourceMappingURL=chunk-F5WHYJRB.js.map
3912
- //# sourceMappingURL=chunk-F5WHYJRB.js.map
3911
+ //# sourceMappingURL=chunk-IS23MR2A.js.map
3912
+ //# sourceMappingURL=chunk-IS23MR2A.js.map