@arbidocs/blocks 0.4.4 → 0.4.5
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 +25 -0
- package/dist/agents/index.cjs +163 -163
- package/dist/agents/index.js +6 -6
- package/dist/artifacts/ArtifactCompareBar.d.ts +33 -0
- package/dist/artifacts/ArtifactEditor.d.ts +64 -0
- package/dist/artifacts/ArtifactEditorBody.d.ts +34 -0
- package/dist/artifacts/ArtifactRedlineView.d.ts +57 -0
- package/dist/artifacts/ArtifactToolbar.d.ts +53 -0
- package/dist/artifacts/ArtifactVersionBar.d.ts +42 -0
- package/dist/{files → artifacts}/RedlineParts.d.ts +4 -0
- package/dist/artifacts/editor/ArtifactMarkdownEditor.d.ts +39 -0
- package/dist/artifacts/editor/index.cjs +89 -0
- package/dist/artifacts/editor/index.cjs.map +1 -0
- package/dist/artifacts/editor/index.d.ts +1 -0
- package/dist/artifacts/editor/index.js +86 -0
- package/dist/artifacts/editor/index.js.map +1 -0
- package/dist/artifacts/index.cjs +807 -0
- package/dist/artifacts/index.cjs.map +1 -0
- package/dist/artifacts/index.d.ts +8 -0
- package/dist/artifacts/index.js +787 -0
- package/dist/artifacts/index.js.map +1 -0
- package/dist/chat/index.cjs +54 -54
- package/dist/chat/index.js +2 -2
- package/dist/{chunk-XKKGGUU2.cjs → chunk-3MIQASHO.cjs} +4 -4
- package/dist/{chunk-XKKGGUU2.cjs.map → chunk-3MIQASHO.cjs.map} +1 -1
- package/dist/{chunk-B673CCW5.js → chunk-3PJCET7H.js} +3 -3
- package/dist/{chunk-B673CCW5.js.map → chunk-3PJCET7H.js.map} +1 -1
- package/dist/{chunk-DGVKBOY5.cjs → chunk-3PZPRAAR.cjs} +14 -14
- package/dist/{chunk-DGVKBOY5.cjs.map → chunk-3PZPRAAR.cjs.map} +1 -1
- package/dist/{chunk-BBEMPS6C.js → chunk-5XTZFH65.js} +6 -6
- package/dist/{chunk-BBEMPS6C.js.map → chunk-5XTZFH65.js.map} +1 -1
- package/dist/{chunk-JPO3F4J7.js → chunk-6YHWXMPQ.js} +3 -3
- package/dist/{chunk-JPO3F4J7.js.map → chunk-6YHWXMPQ.js.map} +1 -1
- package/dist/{chunk-ZVPTFTGV.cjs → chunk-MVNCQDDE.cjs} +4 -4
- package/dist/{chunk-ZVPTFTGV.cjs.map → chunk-MVNCQDDE.cjs.map} +1 -1
- package/dist/{chunk-NJL4LIXX.js → chunk-NPKGUQU5.js} +4 -4
- package/dist/{chunk-NJL4LIXX.js.map → chunk-NPKGUQU5.js.map} +1 -1
- package/dist/{chunk-ATXPAD6S.cjs → chunk-YLOKCIQJ.cjs} +3 -3
- package/dist/{chunk-ATXPAD6S.cjs.map → chunk-YLOKCIQJ.cjs.map} +1 -1
- package/dist/connect/index.cjs +18 -18
- package/dist/connect/index.js +4 -4
- package/dist/facts/index.cjs +1 -1
- package/dist/facts/index.js +1 -1
- package/dist/files/ViewerChrome.d.ts +0 -45
- package/dist/files/ViewerParts.d.ts +0 -19
- package/dist/files/index.cjs +4 -436
- package/dist/files/index.cjs.map +1 -1
- package/dist/files/index.d.ts +2 -4
- package/dist/files/index.js +8 -428
- package/dist/files/index.js.map +1 -1
- package/dist/home/index.cjs +19 -19
- package/dist/home/index.js +4 -4
- package/dist/index.cjs +415 -415
- package/dist/index.js +14 -14
- package/dist/settings/index.cjs +3 -3
- package/dist/settings/index.js +4 -4
- package/dist/shell/index.cjs +10 -10
- package/dist/shell/index.js +2 -2
- package/dist/site/index.cjs +5 -5
- package/dist/site/index.js +1 -1
- package/dist/studio/index.cjs +8 -8
- package/dist/studio/index.js +6 -6
- package/package.json +25 -4
- /package/dist/{files → artifacts}/VersionTimeline.d.ts +0 -0
package/dist/files/index.cjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
+
var chunkLRUCMZK6_cjs = require('../chunk-LRUCMZK6.cjs');
|
|
4
5
|
var chunk223D4727_cjs = require('../chunk-223D4727.cjs');
|
|
5
6
|
var chunkVFUWWH52_cjs = require('../chunk-VFUWWH52.cjs');
|
|
7
|
+
var chunkV4ISCZJ7_cjs = require('../chunk-V4ISCZJ7.cjs');
|
|
8
|
+
require('../chunk-PPCATBOY.cjs');
|
|
6
9
|
var chunkOB5F4577_cjs = require('../chunk-OB5F4577.cjs');
|
|
7
10
|
var chunkVLCY46K6_cjs = require('../chunk-VLCY46K6.cjs');
|
|
8
11
|
var chunkULWRNGGE_cjs = require('../chunk-ULWRNGGE.cjs');
|
|
9
|
-
var chunkLRUCMZK6_cjs = require('../chunk-LRUCMZK6.cjs');
|
|
10
|
-
var chunkV4ISCZJ7_cjs = require('../chunk-V4ISCZJ7.cjs');
|
|
11
|
-
require('../chunk-PPCATBOY.cjs');
|
|
12
12
|
require('../chunk-C54XEN5T.cjs');
|
|
13
|
-
var chunkKDG6FER6_cjs = require('../chunk-KDG6FER6.cjs');
|
|
14
13
|
var chunkMHVNT4J3_cjs = require('../chunk-MHVNT4J3.cjs');
|
|
14
|
+
var chunkKDG6FER6_cjs = require('../chunk-KDG6FER6.cjs');
|
|
15
15
|
var react = require('react');
|
|
16
16
|
var lucideReact = require('lucide-react');
|
|
17
17
|
var ui = require('@arbidocs/react/ui');
|
|
@@ -1463,17 +1463,6 @@ function ExportFooter({
|
|
|
1463
1463
|
}
|
|
1464
1464
|
var DEFAULT_VIEWER_LABELS = {
|
|
1465
1465
|
shared: "Shared",
|
|
1466
|
-
edit: "Edit",
|
|
1467
|
-
cancel: "Cancel",
|
|
1468
|
-
cancelEditing: "Cancel editing",
|
|
1469
|
-
compare: "Compare",
|
|
1470
|
-
compareTitle: "Compare against the previous version",
|
|
1471
|
-
saveDocument: "Save document",
|
|
1472
|
-
saveAsVersion: "Save as a new version",
|
|
1473
|
-
noChanges: "No changes to save",
|
|
1474
|
-
saving: "Saving\u2026",
|
|
1475
|
-
save: "Save",
|
|
1476
|
-
saveVersion: "Save version",
|
|
1477
1466
|
useAsReference: "Use as reference",
|
|
1478
1467
|
useAsReferenceTitle: "Use as reference for a new image generation",
|
|
1479
1468
|
crop: "Crop",
|
|
@@ -1484,12 +1473,6 @@ var DEFAULT_VIEWER_LABELS = {
|
|
|
1484
1473
|
pageInput: "Page number input",
|
|
1485
1474
|
pageOfTitle: "Click to go to page",
|
|
1486
1475
|
pageOf: (page, total) => `Page ${page} of ${total}. Click to navigate.`,
|
|
1487
|
-
compareVs: "Compare vs.",
|
|
1488
|
-
trackChanges: "Track changes",
|
|
1489
|
-
trackChangesBack: "Back to editing (your comparison stays active)",
|
|
1490
|
-
trackChangesView: "View tracked changes against Compare vs.",
|
|
1491
|
-
flipComparison: "Flip comparison direction",
|
|
1492
|
-
stopComparing: "Stop comparing",
|
|
1493
1476
|
previewUnavailable: "Preview not available",
|
|
1494
1477
|
cannotPreview: (extension) => `${extension} files cannot be previewed in the browser.`,
|
|
1495
1478
|
downloadToOpen: "Download to open",
|
|
@@ -1571,99 +1554,6 @@ function ViewerTitle({
|
|
|
1571
1554
|
}
|
|
1572
1555
|
);
|
|
1573
1556
|
}
|
|
1574
|
-
function ViewerEditActions({
|
|
1575
|
-
isEditing,
|
|
1576
|
-
isDraft,
|
|
1577
|
-
compact,
|
|
1578
|
-
hasChanges,
|
|
1579
|
-
isSaving,
|
|
1580
|
-
canCompare,
|
|
1581
|
-
onStartEdit,
|
|
1582
|
-
onCancel,
|
|
1583
|
-
onCompare,
|
|
1584
|
-
onSave,
|
|
1585
|
-
labels,
|
|
1586
|
-
testIds
|
|
1587
|
-
}) {
|
|
1588
|
-
const l = { ...DEFAULT_VIEWER_LABELS, ...labels };
|
|
1589
|
-
if (!isEditing) {
|
|
1590
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1591
|
-
ui.Button,
|
|
1592
|
-
{
|
|
1593
|
-
onClick: onStartEdit,
|
|
1594
|
-
variant: "outline",
|
|
1595
|
-
size: compact ? "icon" : "sm",
|
|
1596
|
-
title: l.edit,
|
|
1597
|
-
"aria-label": l.edit,
|
|
1598
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.edit, { testId: "edit-document-button" }),
|
|
1599
|
-
className: "pointer-coarse:min-h-11",
|
|
1600
|
-
children: [
|
|
1601
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Pencil, { className: "size-4" }),
|
|
1602
|
-
!compact && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1", children: l.edit })
|
|
1603
|
-
]
|
|
1604
|
-
}
|
|
1605
|
-
);
|
|
1606
|
-
}
|
|
1607
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1608
|
-
!isDraft && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1609
|
-
ui.Button,
|
|
1610
|
-
{
|
|
1611
|
-
onClick: onCancel,
|
|
1612
|
-
variant: "outline",
|
|
1613
|
-
size: "sm",
|
|
1614
|
-
title: l.cancelEditing,
|
|
1615
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.cancel, { testId: "cancel-edit-button" }),
|
|
1616
|
-
className: "pointer-coarse:min-h-11",
|
|
1617
|
-
children: [
|
|
1618
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "size-4" }),
|
|
1619
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1", children: l.cancel })
|
|
1620
|
-
]
|
|
1621
|
-
}
|
|
1622
|
-
),
|
|
1623
|
-
canCompare && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1624
|
-
ui.Button,
|
|
1625
|
-
{
|
|
1626
|
-
onClick: onCompare,
|
|
1627
|
-
variant: "outline",
|
|
1628
|
-
size: compact ? "icon" : "sm",
|
|
1629
|
-
title: l.compareTitle,
|
|
1630
|
-
"aria-label": l.compare,
|
|
1631
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.compare, { testId: "compare-button" }),
|
|
1632
|
-
className: "pointer-coarse:min-h-11",
|
|
1633
|
-
children: [
|
|
1634
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.GitCompare, { className: "size-4" }),
|
|
1635
|
-
!compact && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1", children: l.compare })
|
|
1636
|
-
]
|
|
1637
|
-
}
|
|
1638
|
-
),
|
|
1639
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
1640
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
1641
|
-
ui.Button,
|
|
1642
|
-
{
|
|
1643
|
-
onClick: onSave,
|
|
1644
|
-
variant: hasChanges ? "default" : "outline",
|
|
1645
|
-
size: "sm",
|
|
1646
|
-
title: hasChanges ? isDraft ? l.saveDocument : l.saveAsVersion : l.noChanges,
|
|
1647
|
-
disabled: !hasChanges || isSaving,
|
|
1648
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.save, { testId: "save-document-button" }),
|
|
1649
|
-
className: "pointer-coarse:min-h-11",
|
|
1650
|
-
children: [
|
|
1651
|
-
isSaving ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "size-4 animate-spin" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "size-4" }),
|
|
1652
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-1", children: isSaving ? l.saving : isDraft ? l.save : l.saveVersion })
|
|
1653
|
-
]
|
|
1654
|
-
}
|
|
1655
|
-
),
|
|
1656
|
-
hasChanges && !isSaving && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1657
|
-
"span",
|
|
1658
|
-
{
|
|
1659
|
-
className: "absolute -right-1 -top-1 size-2.5 rounded-full bg-primary ring-2 ring-background",
|
|
1660
|
-
"aria-hidden": true,
|
|
1661
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.unsavedDot, { testId: "unsaved-changes-dot" })
|
|
1662
|
-
}
|
|
1663
|
-
)
|
|
1664
|
-
] })
|
|
1665
|
-
] });
|
|
1666
|
-
}
|
|
1667
1557
|
function ViewerImageActions({
|
|
1668
1558
|
compact,
|
|
1669
1559
|
onUseAsReference,
|
|
@@ -2035,71 +1925,6 @@ function ViewerPageCounter({ page, total, onGoTo, labels }) {
|
|
|
2035
1925
|
] })
|
|
2036
1926
|
] });
|
|
2037
1927
|
}
|
|
2038
|
-
var barButton = "inline-flex shrink-0 items-center gap-1 rounded-md px-1.5 py-0.5 text-xs font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring pointer-coarse:min-h-11";
|
|
2039
|
-
function ViewerCompareBar({
|
|
2040
|
-
compareTarget,
|
|
2041
|
-
versionLabel,
|
|
2042
|
-
mode,
|
|
2043
|
-
showTrackChanges,
|
|
2044
|
-
onToggleTrackChanges,
|
|
2045
|
-
onFlip,
|
|
2046
|
-
onStop,
|
|
2047
|
-
labels,
|
|
2048
|
-
trackChangesTestId
|
|
2049
|
-
}) {
|
|
2050
|
-
const l = { ...DEFAULT_VIEWER_LABELS, ...labels };
|
|
2051
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2052
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-sm text-muted-foreground", children: l.compareVs }),
|
|
2053
|
-
compareTarget,
|
|
2054
|
-
versionLabel && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-xs text-muted-foreground", children: versionLabel }),
|
|
2055
|
-
mode === "track-changes" ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2056
|
-
"button",
|
|
2057
|
-
{
|
|
2058
|
-
type: "button",
|
|
2059
|
-
onClick: onToggleTrackChanges,
|
|
2060
|
-
className: ui.cn(
|
|
2061
|
-
barButton,
|
|
2062
|
-
showTrackChanges ? "bg-accent text-accent-foreground hover:bg-accent/70" : "text-muted-foreground hover:bg-muted hover:text-foreground"
|
|
2063
|
-
),
|
|
2064
|
-
title: showTrackChanges ? l.trackChangesBack : l.trackChangesView,
|
|
2065
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(trackChangesTestId, { testId: "track-changes-toggle" }),
|
|
2066
|
-
children: [
|
|
2067
|
-
showTrackChanges ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Eye, { className: "size-3.5" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.EyeOff, { className: "size-3.5" }),
|
|
2068
|
-
l.trackChanges
|
|
2069
|
-
]
|
|
2070
|
-
}
|
|
2071
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
2072
|
-
"button",
|
|
2073
|
-
{
|
|
2074
|
-
type: "button",
|
|
2075
|
-
onClick: onFlip,
|
|
2076
|
-
className: ui.cn(
|
|
2077
|
-
barButton,
|
|
2078
|
-
"p-1 text-muted-foreground hover:bg-muted hover:text-foreground"
|
|
2079
|
-
),
|
|
2080
|
-
title: l.flipComparison,
|
|
2081
|
-
"aria-label": l.flipComparison,
|
|
2082
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowLeftRight, { className: "size-3.5" })
|
|
2083
|
-
}
|
|
2084
|
-
),
|
|
2085
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2086
|
-
"button",
|
|
2087
|
-
{
|
|
2088
|
-
type: "button",
|
|
2089
|
-
onClick: onStop,
|
|
2090
|
-
className: ui.cn(
|
|
2091
|
-
barButton,
|
|
2092
|
-
"ml-auto text-muted-foreground hover:bg-muted hover:text-foreground"
|
|
2093
|
-
),
|
|
2094
|
-
title: l.stopComparing,
|
|
2095
|
-
children: [
|
|
2096
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "size-3" }),
|
|
2097
|
-
l.stopComparing
|
|
2098
|
-
]
|
|
2099
|
-
}
|
|
2100
|
-
)
|
|
2101
|
-
] });
|
|
2102
|
-
}
|
|
2103
1928
|
function ViewerPreviewUnavailable({
|
|
2104
1929
|
extension,
|
|
2105
1930
|
onDownload,
|
|
@@ -2471,140 +2296,6 @@ function FolderCommandList({
|
|
|
2471
2296
|
] })
|
|
2472
2297
|
] });
|
|
2473
2298
|
}
|
|
2474
|
-
var DEFAULT_VERSION_TIMELINE_LABELS = {
|
|
2475
|
-
emptyLive: "No earlier versions yet. When you ask the assistant for a change, the previous version is kept here.",
|
|
2476
|
-
emptyDocument: "No earlier versions yet. Editing this draft and saving creates a new version here.",
|
|
2477
|
-
untitled: "Untitled",
|
|
2478
|
-
latest: "Latest",
|
|
2479
|
-
viewing: "Viewing",
|
|
2480
|
-
current: "Current",
|
|
2481
|
-
version: (n) => `Version ${n}`,
|
|
2482
|
-
branchedFrom: (n) => `branched from Version ${n}`,
|
|
2483
|
-
open: "Open",
|
|
2484
|
-
compare: "Compare"
|
|
2485
|
-
};
|
|
2486
|
-
function VersionTimeline({
|
|
2487
|
-
versions,
|
|
2488
|
-
currentId,
|
|
2489
|
-
live = false,
|
|
2490
|
-
formatDate,
|
|
2491
|
-
onOpen,
|
|
2492
|
-
onCompare,
|
|
2493
|
-
className,
|
|
2494
|
-
labels,
|
|
2495
|
-
testIds
|
|
2496
|
-
}) {
|
|
2497
|
-
const l = { ...DEFAULT_VERSION_TIMELINE_LABELS, ...labels };
|
|
2498
|
-
if (versions.length <= 1) {
|
|
2499
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2500
|
-
"div",
|
|
2501
|
-
{
|
|
2502
|
-
className: ui.cn("p-6 text-sm text-muted-foreground", className),
|
|
2503
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.empty, { testId: "version-timeline-empty" }),
|
|
2504
|
-
children: live ? l.emptyLive : l.emptyDocument
|
|
2505
|
-
}
|
|
2506
|
-
);
|
|
2507
|
-
}
|
|
2508
|
-
const numberById = /* @__PURE__ */ new Map();
|
|
2509
|
-
versions.forEach((v, i) => numberById.set(v.id, i + 1));
|
|
2510
|
-
const canCompare = !live && !!onCompare;
|
|
2511
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2512
|
-
"div",
|
|
2513
|
-
{
|
|
2514
|
-
className: ui.cn("h-full overflow-auto p-4", className),
|
|
2515
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.root, { testId: "version-timeline" }),
|
|
2516
|
-
children: /* @__PURE__ */ jsxRuntime.jsx("ol", { className: "mx-auto max-w-2xl space-y-1", children: versions.map((v, i) => {
|
|
2517
|
-
const isCurrent = v.id === currentId;
|
|
2518
|
-
const isLatest = i === versions.length - 1;
|
|
2519
|
-
const parentNumber = v.parentId ? numberById.get(v.parentId) : void 0;
|
|
2520
|
-
const branchedFrom = parentNumber !== void 0 && parentNumber !== i ? parentNumber : null;
|
|
2521
|
-
const badge = !isCurrent ? null : live ? isLatest ? l.latest : l.viewing : l.current;
|
|
2522
|
-
const name = live ? (v.name || l.untitled).replace(/\.[A-Za-z0-9]+$/, "") : v.name || l.untitled;
|
|
2523
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2524
|
-
"li",
|
|
2525
|
-
{
|
|
2526
|
-
className: ui.cn(
|
|
2527
|
-
"flex items-center gap-3 rounded-md px-3 py-2.5",
|
|
2528
|
-
isCurrent && "bg-accent"
|
|
2529
|
-
),
|
|
2530
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.row?.(v.id), { testId: `version-row-${v.id}` }),
|
|
2531
|
-
children: [
|
|
2532
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.History, { className: "size-4 shrink-0 text-muted-foreground", "aria-hidden": true }),
|
|
2533
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
2534
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2535
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold text-foreground", children: l.version(i + 1) }),
|
|
2536
|
-
badge && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2537
|
-
"span",
|
|
2538
|
-
{
|
|
2539
|
-
className: "rounded-full bg-background px-2 py-0.5 text-xs font-medium text-accent-foreground",
|
|
2540
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.currentBadge, {
|
|
2541
|
-
testId: "version-current-badge"
|
|
2542
|
-
}),
|
|
2543
|
-
children: badge
|
|
2544
|
-
}
|
|
2545
|
-
)
|
|
2546
|
-
] }),
|
|
2547
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "truncate text-sm text-muted-foreground", children: [
|
|
2548
|
-
name,
|
|
2549
|
-
" \xB7 ",
|
|
2550
|
-
formatDate(v.createdAt),
|
|
2551
|
-
branchedFrom !== null && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2552
|
-
"span",
|
|
2553
|
-
{
|
|
2554
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.branch?.(v.id), {
|
|
2555
|
-
testId: `version-branch-${v.id}`
|
|
2556
|
-
}),
|
|
2557
|
-
children: [
|
|
2558
|
-
" ",
|
|
2559
|
-
"\xB7 ",
|
|
2560
|
-
l.branchedFrom(branchedFrom)
|
|
2561
|
-
]
|
|
2562
|
-
}
|
|
2563
|
-
)
|
|
2564
|
-
] })
|
|
2565
|
-
] }),
|
|
2566
|
-
!isCurrent && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2567
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2568
|
-
"button",
|
|
2569
|
-
{
|
|
2570
|
-
type: "button",
|
|
2571
|
-
onClick: () => onOpen(v.id),
|
|
2572
|
-
className: "inline-flex shrink-0 items-center gap-1 rounded-md px-2.5 py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring pointer-coarse:min-h-11",
|
|
2573
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.open?.(v.id), {
|
|
2574
|
-
testId: `open-version-${v.id}`
|
|
2575
|
-
}),
|
|
2576
|
-
children: [
|
|
2577
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Eye, { className: "size-3.5" }),
|
|
2578
|
-
" ",
|
|
2579
|
-
l.open
|
|
2580
|
-
]
|
|
2581
|
-
}
|
|
2582
|
-
),
|
|
2583
|
-
canCompare && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2584
|
-
"button",
|
|
2585
|
-
{
|
|
2586
|
-
type: "button",
|
|
2587
|
-
onClick: () => onCompare(v.id),
|
|
2588
|
-
className: "inline-flex shrink-0 items-center gap-1 rounded-md px-2.5 py-1.5 text-sm font-medium text-primary transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring pointer-coarse:min-h-11",
|
|
2589
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testIds?.compare?.(v.id), {
|
|
2590
|
-
testId: `compare-version-${v.id}`
|
|
2591
|
-
}),
|
|
2592
|
-
children: [
|
|
2593
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.GitCompare, { className: "size-3.5" }),
|
|
2594
|
-
" ",
|
|
2595
|
-
l.compare
|
|
2596
|
-
]
|
|
2597
|
-
}
|
|
2598
|
-
)
|
|
2599
|
-
] })
|
|
2600
|
-
]
|
|
2601
|
-
},
|
|
2602
|
-
v.id
|
|
2603
|
-
);
|
|
2604
|
-
}) })
|
|
2605
|
-
}
|
|
2606
|
-
);
|
|
2607
|
-
}
|
|
2608
2299
|
var DEFAULT_HTML_VIEWER_LABELS = {
|
|
2609
2300
|
viewerRegion: "Parsed document viewer",
|
|
2610
2301
|
pageOfTotal: (page, total) => `Page ${page} of ${total}`,
|
|
@@ -3130,117 +2821,6 @@ function TagPassagePanel({
|
|
|
3130
2821
|
}
|
|
3131
2822
|
);
|
|
3132
2823
|
}
|
|
3133
|
-
var DEFAULT_REDLINE_LABELS = {
|
|
3134
|
-
flipComparison: "Flip comparison",
|
|
3135
|
-
noDocument: "No document selected for comparison.",
|
|
3136
|
-
noChangesYet: "No changes yet \u2014 start editing to see redlined differences here.",
|
|
3137
|
-
identical: "Documents are identical.",
|
|
3138
|
-
unavailable: "Document text not available for comparison.",
|
|
3139
|
-
revertMove: "Undo this move (revert both ends)",
|
|
3140
|
-
revertReplace: "Undo this edit",
|
|
3141
|
-
revertAdd: "Undo this insertion",
|
|
3142
|
-
revertRemove: "Undo this deletion"
|
|
3143
|
-
};
|
|
3144
|
-
function RedlineFrame({ header, children }) {
|
|
3145
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full flex-col", "data-slot": "redline-frame", children: [
|
|
3146
|
-
header,
|
|
3147
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-auto text-sm leading-relaxed", children })
|
|
3148
|
-
] });
|
|
3149
|
-
}
|
|
3150
|
-
function RedlineHeader({ base, compare, onFlip, labels }) {
|
|
3151
|
-
const l = { ...DEFAULT_REDLINE_LABELS, ...labels };
|
|
3152
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex shrink-0 items-center gap-2 border-b border-border bg-muted px-3 py-2", children: [
|
|
3153
|
-
base,
|
|
3154
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3155
|
-
ui.Button,
|
|
3156
|
-
{
|
|
3157
|
-
variant: "ghost",
|
|
3158
|
-
size: "icon",
|
|
3159
|
-
className: "size-6 shrink-0 pointer-coarse:size-11",
|
|
3160
|
-
onClick: onFlip,
|
|
3161
|
-
title: l.flipComparison,
|
|
3162
|
-
"aria-label": l.flipComparison,
|
|
3163
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowLeftRight, { className: "size-3.5" })
|
|
3164
|
-
}
|
|
3165
|
-
),
|
|
3166
|
-
compare
|
|
3167
|
-
] });
|
|
3168
|
-
}
|
|
3169
|
-
function RedlineStatus({
|
|
3170
|
-
kind,
|
|
3171
|
-
reviewMode,
|
|
3172
|
-
labels
|
|
3173
|
-
}) {
|
|
3174
|
-
const l = { ...DEFAULT_REDLINE_LABELS, ...labels };
|
|
3175
|
-
const text = kind === "idle" ? l.noDocument : kind === "identical" ? reviewMode ? l.noChangesYet : l.identical : l.unavailable;
|
|
3176
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-full items-center justify-center text-sm text-muted-foreground", children: text });
|
|
3177
|
-
}
|
|
3178
|
-
function RedlineComputing({ children }) {
|
|
3179
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-full items-center justify-center", children });
|
|
3180
|
-
}
|
|
3181
|
-
function RedlineDocument({ children, bodyRef, gutter }) {
|
|
3182
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
3183
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { ref: bodyRef, className: "mx-auto max-w-3xl px-6 py-4 pr-14", children }),
|
|
3184
|
-
gutter
|
|
3185
|
-
] });
|
|
3186
|
-
}
|
|
3187
|
-
var MARK_TONE = {
|
|
3188
|
-
del: {
|
|
3189
|
-
base: "font-semibold text-red-600 line-through decoration-2 dark:text-red-400",
|
|
3190
|
-
move: "font-semibold text-emerald-600 line-through decoration-2 dark:text-emerald-400"
|
|
3191
|
-
},
|
|
3192
|
-
ins: {
|
|
3193
|
-
base: "font-semibold text-blue-600 underline decoration-2 dark:text-blue-400",
|
|
3194
|
-
move: "font-semibold text-emerald-600 underline decoration-2 dark:text-emerald-400"
|
|
3195
|
-
}
|
|
3196
|
-
};
|
|
3197
|
-
function RedlineMark({
|
|
3198
|
-
as: Tag,
|
|
3199
|
-
isMove,
|
|
3200
|
-
children,
|
|
3201
|
-
...props
|
|
3202
|
-
}) {
|
|
3203
|
-
const cls = MARK_TONE[Tag][isMove ? "move" : "base"];
|
|
3204
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Tag, { className: cls, ...props, children });
|
|
3205
|
-
}
|
|
3206
|
-
var REVERT_TONE = {
|
|
3207
|
-
move: "border-emerald-600 text-emerald-700 hover:bg-emerald-50 dark:border-emerald-400 dark:text-emerald-300 dark:hover:bg-emerald-950/40",
|
|
3208
|
-
add: "border-blue-600 text-blue-700 hover:bg-blue-50 dark:border-blue-400 dark:text-blue-300 dark:hover:bg-blue-950/40",
|
|
3209
|
-
replace: "border-blue-600 text-blue-700 hover:bg-blue-50 dark:border-blue-400 dark:text-blue-300 dark:hover:bg-blue-950/40",
|
|
3210
|
-
remove: "border-red-600 text-red-700 hover:bg-red-50 dark:border-red-400 dark:text-red-300 dark:hover:bg-red-950/40"
|
|
3211
|
-
};
|
|
3212
|
-
function RedlineRevertGutter({
|
|
3213
|
-
markers,
|
|
3214
|
-
onRevert,
|
|
3215
|
-
labels,
|
|
3216
|
-
testId
|
|
3217
|
-
}) {
|
|
3218
|
-
if (markers.length === 0) return null;
|
|
3219
|
-
const l = { ...DEFAULT_REDLINE_LABELS, ...labels };
|
|
3220
|
-
const revertTitle = {
|
|
3221
|
-
move: l.revertMove,
|
|
3222
|
-
replace: l.revertReplace,
|
|
3223
|
-
add: l.revertAdd,
|
|
3224
|
-
remove: l.revertRemove
|
|
3225
|
-
};
|
|
3226
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute right-2 top-0 w-9", "data-slot": "redline-gutter", children: markers.map((m) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3227
|
-
"button",
|
|
3228
|
-
{
|
|
3229
|
-
type: "button",
|
|
3230
|
-
onClick: () => onRevert(m.cid),
|
|
3231
|
-
title: revertTitle[m.kind],
|
|
3232
|
-
"aria-label": revertTitle[m.kind],
|
|
3233
|
-
style: { top: m.top - 2 },
|
|
3234
|
-
className: ui.cn(
|
|
3235
|
-
"pointer-events-auto absolute right-0 inline-flex h-6 w-7 items-center justify-center rounded-md border bg-background transition-colors pointer-coarse:h-11 pointer-coarse:w-11",
|
|
3236
|
-
REVERT_TONE[m.kind]
|
|
3237
|
-
),
|
|
3238
|
-
"data-testid": chunkMHVNT4J3_cjs.testIdOr(testId?.(m.cid), { testId: `redline-revert-${m.cid}` }),
|
|
3239
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Undo2, { className: "size-3.5" })
|
|
3240
|
-
},
|
|
3241
|
-
m.cid
|
|
3242
|
-
)) });
|
|
3243
|
-
}
|
|
3244
2824
|
var CLOSE_DELAY_MS = 120;
|
|
3245
2825
|
function FilesAddMenu({
|
|
3246
2826
|
items,
|
|
@@ -7388,14 +6968,12 @@ exports.DEFAULT_HTML_VIEWER_LABELS = DEFAULT_HTML_VIEWER_LABELS;
|
|
|
7388
6968
|
exports.DEFAULT_IMPORT_LABELS = DEFAULT_IMPORT_LABELS;
|
|
7389
6969
|
exports.DEFAULT_LABEL_MULTI_SELECT_LABELS = DEFAULT_LABEL_MULTI_SELECT_LABELS;
|
|
7390
6970
|
exports.DEFAULT_MOVE_TO_FOLDER_LABELS = DEFAULT_MOVE_TO_FOLDER_LABELS;
|
|
7391
|
-
exports.DEFAULT_REDLINE_LABELS = DEFAULT_REDLINE_LABELS;
|
|
7392
6971
|
exports.DEFAULT_TAG_MANAGER_LABELS = DEFAULT_TAG_MANAGER_LABELS;
|
|
7393
6972
|
exports.DEFAULT_TAG_PASSAGE_PANEL_LABELS = DEFAULT_TAG_PASSAGE_PANEL_LABELS;
|
|
7394
6973
|
exports.DEFAULT_UPLOAD_FOOTER_LABELS = DEFAULT_UPLOAD_FOOTER_LABELS;
|
|
7395
6974
|
exports.DEFAULT_UPLOAD_PARTS_LABELS = DEFAULT_UPLOAD_PARTS_LABELS;
|
|
7396
6975
|
exports.DEFAULT_UPLOAD_SOURCES_LABELS = DEFAULT_UPLOAD_SOURCES_LABELS;
|
|
7397
6976
|
exports.DEFAULT_URL_INPUT_DIALOG_LABELS = DEFAULT_URL_INPUT_DIALOG_LABELS;
|
|
7398
|
-
exports.DEFAULT_VERSION_TIMELINE_LABELS = DEFAULT_VERSION_TIMELINE_LABELS;
|
|
7399
6977
|
exports.DEFAULT_VIEWER_LABELS = DEFAULT_VIEWER_LABELS;
|
|
7400
6978
|
exports.DEFAULT_VIEW_SELECTOR_LABELS = DEFAULT_VIEW_SELECTOR_LABELS;
|
|
7401
6979
|
exports.DocStatusIcon = DocStatusIcon;
|
|
@@ -7485,13 +7063,6 @@ exports.MediaPreviewView = MediaPreviewView;
|
|
|
7485
7063
|
exports.MoveToFolderDialog = MoveToFolderDialog;
|
|
7486
7064
|
exports.PassageStepper = PassageStepper;
|
|
7487
7065
|
exports.PdfPageNav = PdfPageNav;
|
|
7488
|
-
exports.RedlineComputing = RedlineComputing;
|
|
7489
|
-
exports.RedlineDocument = RedlineDocument;
|
|
7490
|
-
exports.RedlineFrame = RedlineFrame;
|
|
7491
|
-
exports.RedlineHeader = RedlineHeader;
|
|
7492
|
-
exports.RedlineMark = RedlineMark;
|
|
7493
|
-
exports.RedlineRevertGutter = RedlineRevertGutter;
|
|
7494
|
-
exports.RedlineStatus = RedlineStatus;
|
|
7495
7066
|
exports.RejectedFilesList = RejectedFilesList;
|
|
7496
7067
|
exports.RelatedDocsCell = RelatedDocsCell;
|
|
7497
7068
|
exports.SelectedFilesList = SelectedFilesList;
|
|
@@ -7527,10 +7098,7 @@ exports.UploadUrlButton = UploadUrlButton;
|
|
|
7527
7098
|
exports.UrlDialogTitle = UrlDialogTitle;
|
|
7528
7099
|
exports.UrlInputDialogView = UrlInputDialogView;
|
|
7529
7100
|
exports.VendorLogo = VendorLogo;
|
|
7530
|
-
exports.VersionTimeline = VersionTimeline;
|
|
7531
7101
|
exports.ViewSelectorMenu = ViewSelectorMenu;
|
|
7532
|
-
exports.ViewerCompareBar = ViewerCompareBar;
|
|
7533
|
-
exports.ViewerEditActions = ViewerEditActions;
|
|
7534
7102
|
exports.ViewerFrame = ViewerFrame;
|
|
7535
7103
|
exports.ViewerHeaderEnd = ViewerHeaderEnd;
|
|
7536
7104
|
exports.ViewerHeaderStart = ViewerHeaderStart;
|