@arbidocs/react 0.4.20 → 0.4.22
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/artifacts/index.cjs +15 -15
- package/dist/artifacts/index.js +4 -4
- package/dist/{chunk-SDUISFTV.js → chunk-6IYHNWQK.js} +3 -3
- package/dist/{chunk-SDUISFTV.js.map → chunk-6IYHNWQK.js.map} +1 -1
- package/dist/{chunk-JJSPTHI2.js → chunk-DLT354KA.js} +2 -2
- package/dist/{chunk-JJSPTHI2.js.map → chunk-DLT354KA.js.map} +1 -1
- package/dist/{chunk-SJBGNP7E.cjs → chunk-KXIIARRK.cjs} +2 -2
- package/dist/{chunk-SJBGNP7E.cjs.map → chunk-KXIIARRK.cjs.map} +1 -1
- package/dist/{chunk-VC2I4NST.cjs → chunk-PQDHGEXJ.cjs} +3 -3
- package/dist/{chunk-VC2I4NST.cjs.map → chunk-PQDHGEXJ.cjs.map} +1 -1
- package/dist/index.cjs +442 -440
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +9 -7
- package/dist/index.js.map +1 -1
- package/dist/ui/index.cjs +148 -148
- package/dist/ui/index.js +2 -2
- package/package.json +3 -3
package/dist/artifacts/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var chunkPATLJSAO_cjs = require('../chunk-PATLJSAO.cjs');
|
|
3
|
+
var chunkKXIIARRK_cjs = require('../chunk-KXIIARRK.cjs');
|
|
5
4
|
var chunkEOOHRPFM_cjs = require('../chunk-EOOHRPFM.cjs');
|
|
6
5
|
require('../chunk-S6A6FSG7.cjs');
|
|
7
6
|
var chunkZMTLGO3K_cjs = require('../chunk-ZMTLGO3K.cjs');
|
|
7
|
+
var chunkPATLJSAO_cjs = require('../chunk-PATLJSAO.cjs');
|
|
8
8
|
var react = require('react');
|
|
9
9
|
var reactQuery = require('@tanstack/react-query');
|
|
10
10
|
var jsxRuntime = require('react/jsx-runtime');
|
|
@@ -134,7 +134,7 @@ function flattenChunks(chunks, options) {
|
|
|
134
134
|
const text = (chunks ?? []).map((c) => (c.content ?? "").trim()).join("\n\n");
|
|
135
135
|
if (!options?.unescape) return text;
|
|
136
136
|
return chunkPATLJSAO_cjs.normalizeMarkdown(
|
|
137
|
-
|
|
137
|
+
chunkKXIIARRK_cjs.repairParsedStructure(chunkKXIIARRK_cjs.repairParsedTitle(chunkKXIIARRK_cjs.unescapeMarkdown(text)))
|
|
138
138
|
).replace(/\n$/, "");
|
|
139
139
|
}
|
|
140
140
|
var DOC_ID = /^doc/;
|
|
@@ -342,7 +342,7 @@ function useArtifactText(docId, options) {
|
|
|
342
342
|
const enabled = (options?.enabled ?? true) && isDocumentId(docId) && arbi.hasWorkspace;
|
|
343
343
|
const query = reactQuery.useQuery({
|
|
344
344
|
// Under the shared `parsedDoc` key, so a document's invalidation reaches it too.
|
|
345
|
-
queryKey: [...
|
|
345
|
+
queryKey: [...chunkKXIIARRK_cjs.arbiQueryKeys.parsedDoc(docId ?? "", "marker"), "artifact-text"],
|
|
346
346
|
queryFn: async () => {
|
|
347
347
|
const parsed = await arbi.documents.getParsedContent(docId, "marker");
|
|
348
348
|
if (!parsed.chunks?.some((c) => c.content?.trim())) throw new NotParsedYetError();
|
|
@@ -384,7 +384,7 @@ function useArtifactText(docId, options) {
|
|
|
384
384
|
|
|
385
385
|
// src/artifacts/useArtifactSession.ts
|
|
386
386
|
function useArtifactVersions(workspaceId, docId) {
|
|
387
|
-
const { data: documents } =
|
|
387
|
+
const { data: documents } = chunkKXIIARRK_cjs.useDocuments(workspaceId);
|
|
388
388
|
return react.useMemo(
|
|
389
389
|
() => toArtifactVersions(buildVersionChain(documents ?? [], docId)),
|
|
390
390
|
[documents, docId]
|
|
@@ -406,7 +406,7 @@ function useSaveArtifactVersion() {
|
|
|
406
406
|
}
|
|
407
407
|
);
|
|
408
408
|
if (workspaceId) {
|
|
409
|
-
await queryClient.invalidateQueries({ queryKey:
|
|
409
|
+
await queryClient.invalidateQueries({ queryKey: chunkKXIIARRK_cjs.arbiQueryKeys.documents(workspaceId) });
|
|
410
410
|
}
|
|
411
411
|
return { docId: result.doc_ext_ids?.[0] };
|
|
412
412
|
}
|
|
@@ -554,7 +554,7 @@ function useStreamedArtifact({
|
|
|
554
554
|
let stored;
|
|
555
555
|
if (clean) stored = clean(content);
|
|
556
556
|
else {
|
|
557
|
-
const report =
|
|
557
|
+
const report = chunkKXIIARRK_cjs.cleanDraftWithReport(content);
|
|
558
558
|
stored = report.text;
|
|
559
559
|
setCleaned(report);
|
|
560
560
|
onCleaned?.(report);
|
|
@@ -595,35 +595,35 @@ function useStreamedArtifact({
|
|
|
595
595
|
|
|
596
596
|
Object.defineProperty(exports, "cleanDraftMarkdown", {
|
|
597
597
|
enumerable: true,
|
|
598
|
-
get: function () { return
|
|
598
|
+
get: function () { return chunkKXIIARRK_cjs.cleanDraftMarkdown; }
|
|
599
599
|
});
|
|
600
600
|
Object.defineProperty(exports, "cleanDraftWithReport", {
|
|
601
601
|
enumerable: true,
|
|
602
|
-
get: function () { return
|
|
602
|
+
get: function () { return chunkKXIIARRK_cjs.cleanDraftWithReport; }
|
|
603
603
|
});
|
|
604
604
|
Object.defineProperty(exports, "promoteBoldTitle", {
|
|
605
605
|
enumerable: true,
|
|
606
|
-
get: function () { return
|
|
606
|
+
get: function () { return chunkKXIIARRK_cjs.promoteBoldTitle; }
|
|
607
607
|
});
|
|
608
608
|
Object.defineProperty(exports, "repairParsedStructure", {
|
|
609
609
|
enumerable: true,
|
|
610
|
-
get: function () { return
|
|
610
|
+
get: function () { return chunkKXIIARRK_cjs.repairParsedStructure; }
|
|
611
611
|
});
|
|
612
612
|
Object.defineProperty(exports, "repairParsedTitle", {
|
|
613
613
|
enumerable: true,
|
|
614
|
-
get: function () { return
|
|
614
|
+
get: function () { return chunkKXIIARRK_cjs.repairParsedTitle; }
|
|
615
615
|
});
|
|
616
616
|
Object.defineProperty(exports, "stripAgentPreamble", {
|
|
617
617
|
enumerable: true,
|
|
618
|
-
get: function () { return
|
|
618
|
+
get: function () { return chunkKXIIARRK_cjs.stripAgentPreamble; }
|
|
619
619
|
});
|
|
620
620
|
Object.defineProperty(exports, "unescapeMarkdown", {
|
|
621
621
|
enumerable: true,
|
|
622
|
-
get: function () { return
|
|
622
|
+
get: function () { return chunkKXIIARRK_cjs.unescapeMarkdown; }
|
|
623
623
|
});
|
|
624
624
|
Object.defineProperty(exports, "unwrapCitationLinks", {
|
|
625
625
|
enumerable: true,
|
|
626
|
-
get: function () { return
|
|
626
|
+
get: function () { return chunkKXIIARRK_cjs.unwrapCitationLinks; }
|
|
627
627
|
});
|
|
628
628
|
Object.defineProperty(exports, "buildHybridRedlineMarkdown", {
|
|
629
629
|
enumerable: true,
|
package/dist/artifacts/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { repairParsedStructure, repairParsedTitle, unescapeMarkdown, arbiQueryKeys, useDocuments, cleanDraftWithReport } from '../chunk-
|
|
2
|
-
export { cleanDraftMarkdown, cleanDraftWithReport, promoteBoldTitle, repairParsedStructure, repairParsedTitle, stripAgentPreamble, unescapeMarkdown, unwrapCitationLinks } from '../chunk-
|
|
3
|
-
import { revertRedlineRegion, buildHybridRedlineWithRegions, buildHybridRedlineMarkdown, normalizeMarkdown } from '../chunk-43AKLNBC.js';
|
|
4
|
-
export { buildHybridRedlineMarkdown, buildHybridRedlineWithRegions, normalizeMarkdown, revertRedlineRegion } from '../chunk-43AKLNBC.js';
|
|
1
|
+
import { repairParsedStructure, repairParsedTitle, unescapeMarkdown, arbiQueryKeys, useDocuments, cleanDraftWithReport } from '../chunk-DLT354KA.js';
|
|
2
|
+
export { cleanDraftMarkdown, cleanDraftWithReport, promoteBoldTitle, repairParsedStructure, repairParsedTitle, stripAgentPreamble, unescapeMarkdown, unwrapCitationLinks } from '../chunk-DLT354KA.js';
|
|
5
3
|
import { MarkdownRenderer } from '../chunk-6YSHODMG.js';
|
|
6
4
|
import '../chunk-SN5YV6FF.js';
|
|
7
5
|
import { useArbi } from '../chunk-J4MX2W4H.js';
|
|
6
|
+
import { revertRedlineRegion, buildHybridRedlineWithRegions, buildHybridRedlineMarkdown, normalizeMarkdown } from '../chunk-43AKLNBC.js';
|
|
7
|
+
export { buildHybridRedlineMarkdown, buildHybridRedlineWithRegions, normalizeMarkdown, revertRedlineRegion } from '../chunk-43AKLNBC.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 { MarkdownRenderer } from './chunk-6YSHODMG.js';
|
|
2
1
|
import { getCollisionPadding, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuLabel, DropdownMenuItem, DropdownMenuSeparator } from './chunk-N5SVBDLC.js';
|
|
2
|
+
import { MarkdownRenderer } from './chunk-6YSHODMG.js';
|
|
3
3
|
import { cn } from './chunk-SN5YV6FF.js';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import React__default, { createContext, forwardRef, memo, useContext, useState, useRef, useEffect, useCallback, useId, useMemo, Fragment as Fragment$1 } from 'react';
|
|
@@ -3727,5 +3727,5 @@ function DocumentCard({
|
|
|
3727
3727
|
}
|
|
3728
3728
|
|
|
3729
3729
|
export { AgentBadge, AiMarkdown, ArbiBotHeadIcon, AudIcon, Avatar, AvatarFallback, AvatarImage, BASE_COLORS2 as BASE_COLORS, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DictateProvider, DocumentCard, DocumentEntity, ENTITY_MAPPINGS, EmlIcon, EntityIcon, EntityPill, FILE_TYPE_COLORS, HoverCard, HoverCardContent, HoverCardTrigger, IconToggle, ImgIcon, InlineMicButton, Input, 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, Separator, Slider, StatusPill, Switch, TAG_TYPE_ICONS, TAG_TYPE_LABELS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TagEntity, Textarea, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UserEntity, UserMenu, VISIBILITY_ICONS, VidIcon, VisibilityIcon, VisibilityToggle, badgeVariants, buttonVariants, cardVariants, classifyMediaError, configureEntityRegistry, configureRagLabels, configureStatusRegistry, formatElapsed, getDocIcon, getEntityColor2 as getEntityColor, getEntityColorStyles, getEntityIcon, getEntityLabel, getStatusVariant, getTagTypeIcon, getTagTypeLabel, getWorkspaceColor, toggleVariants, useAudioRecorder };
|
|
3730
|
-
//# sourceMappingURL=chunk-
|
|
3731
|
-
//# sourceMappingURL=chunk-
|
|
3730
|
+
//# sourceMappingURL=chunk-6IYHNWQK.js.map
|
|
3731
|
+
//# sourceMappingURL=chunk-6IYHNWQK.js.map
|