@arbidocs/react 0.4.32 → 0.4.33
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/README.md +1 -1
- package/dist/artifacts/index.cjs +16 -16
- package/dist/artifacts/index.js +3 -3
- package/dist/{chunk-OXUFBF5W.js → chunk-5JGBZQD4.js} +405 -123
- package/dist/chunk-5JGBZQD4.js.map +1 -0
- package/dist/{chunk-EOOHRPFM.cjs → chunk-775VGSKN.cjs} +59 -10
- package/dist/chunk-775VGSKN.cjs.map +1 -0
- package/dist/{chunk-6YSHODMG.js → chunk-FOEYFNQ4.js} +59 -10
- package/dist/chunk-FOEYFNQ4.js.map +1 -0
- package/dist/{chunk-6BLXIF4R.cjs → chunk-PW7GGG7E.cjs} +9 -7
- package/dist/chunk-PW7GGG7E.cjs.map +1 -0
- package/dist/{chunk-OBTCAI4E.js → chunk-UDOPD3GK.js} +12 -4
- package/dist/chunk-UDOPD3GK.js.map +1 -0
- package/dist/{chunk-3AK4QJ62.cjs → chunk-UFSATX3N.cjs} +412 -125
- package/dist/chunk-UFSATX3N.cjs.map +1 -0
- package/dist/{chunk-NDG44JWI.js → chunk-V3A7JDJV.js} +8 -6
- package/dist/chunk-V3A7JDJV.js.map +1 -0
- package/dist/{chunk-YSZJCWDD.cjs → chunk-Z4M7JB4L.cjs} +12 -4
- package/dist/chunk-Z4M7JB4L.cjs.map +1 -0
- package/dist/{index-CcbVSNSP.d.cts → index-C7OqcKY3.d.cts} +3 -1
- package/dist/{index-CcbVSNSP.d.ts → index-C7OqcKY3.d.ts} +3 -1
- package/dist/{index-C99tcxue.d.ts → index-CUxIcC5j.d.cts} +19 -7
- package/dist/{index-C99tcxue.d.cts → index-CUxIcC5j.d.ts} +19 -7
- package/dist/index.cjs +408 -579
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +60 -10
- package/dist/index.d.ts +60 -10
- package/dist/index.js +25 -212
- package/dist/index.js.map +1 -1
- package/dist/shell/index.cjs +6 -6
- package/dist/shell/index.d.cts +1 -1
- package/dist/shell/index.d.ts +1 -1
- package/dist/shell/index.js +1 -1
- package/dist/ui/index.cjs +152 -148
- package/dist/ui/index.d.cts +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +2 -2
- package/package.json +3 -3
- package/dist/chunk-3AK4QJ62.cjs.map +0 -1
- package/dist/chunk-6BLXIF4R.cjs.map +0 -1
- package/dist/chunk-6YSHODMG.js.map +0 -1
- package/dist/chunk-EOOHRPFM.cjs.map +0 -1
- package/dist/chunk-NDG44JWI.js.map +0 -1
- package/dist/chunk-OBTCAI4E.js.map +0 -1
- package/dist/chunk-OXUFBF5W.js.map +0 -1
- package/dist/chunk-YSZJCWDD.cjs.map +0 -1
package/README.md
CHANGED
|
@@ -176,7 +176,7 @@ const contacts = usePendingContacts() // + useAddContacts(), useRemoveContacts
|
|
|
176
176
|
|
|
177
177
|
Form-to-request mappings (`taskComposerToCreateRequest`, `composePersona`, ...) are in
|
|
178
178
|
`@arbidocs/blocks/agents`. Usage is reported in **credits**, not dollars: use
|
|
179
|
-
`formatCredits(n)`, `creditsToUsd(n)` and the `metered` flag on `useProjectUsage` /
|
|
179
|
+
`formatCredits(n)` (fractional: `0.47 credits`, `1.5 credits`; whole from 100 up), `creditsToUsd(n)` and the `metered` flag on `useProjectUsage` /
|
|
180
180
|
`useProjectsUsage` (`false` = this deployment does not record usage). `DirectMessages` takes
|
|
181
181
|
`listHeader`, `listLead`, `startByEmail` and `hideOwnContact`. See `docs/design/blocks-package.md`
|
|
182
182
|
("Hooks and mappings a host should not rewrite").
|
package/dist/artifacts/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkPW7GGG7E_cjs = require('../chunk-PW7GGG7E.cjs');
|
|
4
4
|
var chunkPATLJSAO_cjs = require('../chunk-PATLJSAO.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunk775VGSKN_cjs = require('../chunk-775VGSKN.cjs');
|
|
6
6
|
require('../chunk-S6A6FSG7.cjs');
|
|
7
7
|
var chunkZMTLGO3K_cjs = require('../chunk-ZMTLGO3K.cjs');
|
|
8
8
|
var react = require('react');
|
|
@@ -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
|
+
chunkPW7GGG7E_cjs.repairParsedStructure(chunkPW7GGG7E_cjs.repairParsedTitle(chunkPW7GGG7E_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: [...chunkPW7GGG7E_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 } = chunkPW7GGG7E_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: chunkPW7GGG7E_cjs.arbiQueryKeys.documents(workspaceId) });
|
|
410
410
|
}
|
|
411
411
|
return { docId: result.doc_ext_ids?.[0] };
|
|
412
412
|
}
|
|
@@ -524,7 +524,7 @@ function useArtifactSession(options) {
|
|
|
524
524
|
);
|
|
525
525
|
}
|
|
526
526
|
function renderArtifactMarkdown(markdown, components) {
|
|
527
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
527
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunk775VGSKN_cjs.MarkdownRenderer, { components, children: markdown });
|
|
528
528
|
}
|
|
529
529
|
function useStreamedArtifact({
|
|
530
530
|
artifacts,
|
|
@@ -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 = chunkPW7GGG7E_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 chunkPW7GGG7E_cjs.cleanDraftMarkdown; }
|
|
599
599
|
});
|
|
600
600
|
Object.defineProperty(exports, "cleanDraftWithReport", {
|
|
601
601
|
enumerable: true,
|
|
602
|
-
get: function () { return
|
|
602
|
+
get: function () { return chunkPW7GGG7E_cjs.cleanDraftWithReport; }
|
|
603
603
|
});
|
|
604
604
|
Object.defineProperty(exports, "promoteBoldTitle", {
|
|
605
605
|
enumerable: true,
|
|
606
|
-
get: function () { return
|
|
606
|
+
get: function () { return chunkPW7GGG7E_cjs.promoteBoldTitle; }
|
|
607
607
|
});
|
|
608
608
|
Object.defineProperty(exports, "repairParsedStructure", {
|
|
609
609
|
enumerable: true,
|
|
610
|
-
get: function () { return
|
|
610
|
+
get: function () { return chunkPW7GGG7E_cjs.repairParsedStructure; }
|
|
611
611
|
});
|
|
612
612
|
Object.defineProperty(exports, "repairParsedTitle", {
|
|
613
613
|
enumerable: true,
|
|
614
|
-
get: function () { return
|
|
614
|
+
get: function () { return chunkPW7GGG7E_cjs.repairParsedTitle; }
|
|
615
615
|
});
|
|
616
616
|
Object.defineProperty(exports, "stripAgentPreamble", {
|
|
617
617
|
enumerable: true,
|
|
618
|
-
get: function () { return
|
|
618
|
+
get: function () { return chunkPW7GGG7E_cjs.stripAgentPreamble; }
|
|
619
619
|
});
|
|
620
620
|
Object.defineProperty(exports, "unescapeMarkdown", {
|
|
621
621
|
enumerable: true,
|
|
622
|
-
get: function () { return
|
|
622
|
+
get: function () { return chunkPW7GGG7E_cjs.unescapeMarkdown; }
|
|
623
623
|
});
|
|
624
624
|
Object.defineProperty(exports, "unwrapCitationLinks", {
|
|
625
625
|
enumerable: true,
|
|
626
|
-
get: function () { return
|
|
626
|
+
get: function () { return chunkPW7GGG7E_cjs.unwrapCitationLinks; }
|
|
627
627
|
});
|
|
628
628
|
Object.defineProperty(exports, "buildHybridRedlineMarkdown", {
|
|
629
629
|
enumerable: true,
|
package/dist/artifacts/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { repairParsedStructure, repairParsedTitle, unescapeMarkdown, arbiQueryKeys, useDocuments, cleanDraftWithReport } from '../chunk-
|
|
2
|
-
export { cleanDraftMarkdown, cleanDraftWithReport, promoteBoldTitle, repairParsedStructure, repairParsedTitle, stripAgentPreamble, unescapeMarkdown, unwrapCitationLinks } from '../chunk-
|
|
1
|
+
import { repairParsedStructure, repairParsedTitle, unescapeMarkdown, arbiQueryKeys, useDocuments, cleanDraftWithReport } from '../chunk-V3A7JDJV.js';
|
|
2
|
+
export { cleanDraftMarkdown, cleanDraftWithReport, promoteBoldTitle, repairParsedStructure, repairParsedTitle, stripAgentPreamble, unescapeMarkdown, unwrapCitationLinks } from '../chunk-V3A7JDJV.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 { MarkdownRenderer } from '../chunk-
|
|
5
|
+
import { MarkdownRenderer } from '../chunk-FOEYFNQ4.js';
|
|
6
6
|
import '../chunk-SN5YV6FF.js';
|
|
7
7
|
import { useArbi } from '../chunk-J4MX2W4H.js';
|
|
8
8
|
import { useState, useRef, useEffect, useCallback, useMemo } from 'react';
|