@tangle-network/sandbox-ui 0.3.11 → 0.3.12
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/{chunk-BOBXH6CH.js → chunk-4HT5J6CE.js} +40 -20
- package/dist/{chunk-6NYG2R7V.js → chunk-IAIJUFM6.js} +1 -1
- package/dist/{chunk-CREVWUCA.js → chunk-QMKWQF6F.js} +1 -1
- package/dist/{document-editor-pane-AFBP2KFT.js → document-editor-pane-AVKKXSLG.js} +1 -1
- package/dist/editor.js +1 -1
- package/dist/files.js +1 -1
- package/dist/index.js +2 -2
- package/dist/workspace.js +2 -2
- package/package.json +1 -1
|
@@ -10753,6 +10753,21 @@ function connectionLabel(state) {
|
|
|
10753
10753
|
return "Offline";
|
|
10754
10754
|
}
|
|
10755
10755
|
}
|
|
10756
|
+
function connectionDescription(state, collaborators, readOnly) {
|
|
10757
|
+
if (readOnly) {
|
|
10758
|
+
return state === "disconnected" ? "Live access is paused. You can keep reading while the editor reconnects." : "You are viewing the live document in read-only mode.";
|
|
10759
|
+
}
|
|
10760
|
+
switch (state) {
|
|
10761
|
+
case "synced":
|
|
10762
|
+
return collaborators > 0 ? `You and ${collaborators} collaborator${collaborators === 1 ? "" : "s"} are editing the same document.` : "You are editing the live document. Changes sync automatically.";
|
|
10763
|
+
case "connected":
|
|
10764
|
+
case "connecting":
|
|
10765
|
+
return "Connecting the live document. Local edits stay in place while sync catches up.";
|
|
10766
|
+
case "disconnected":
|
|
10767
|
+
default:
|
|
10768
|
+
return "Live updates are paused. You can keep editing and reconnect when the transport is healthy again.";
|
|
10769
|
+
}
|
|
10770
|
+
}
|
|
10756
10771
|
function CollaborativeDocumentSurface({
|
|
10757
10772
|
markdown,
|
|
10758
10773
|
placeholder,
|
|
@@ -10764,26 +10779,30 @@ function CollaborativeDocumentSurface({
|
|
|
10764
10779
|
const { state } = useEditorConnection();
|
|
10765
10780
|
const { collaborators } = useCollaborators();
|
|
10766
10781
|
const initialContent = useMemo4(() => markdownToHtml(markdown), [markdown]);
|
|
10782
|
+
const collaboratorCount = collaborators.length + 1;
|
|
10767
10783
|
return /* @__PURE__ */ jsxs3("div", { className: cn("flex h-full min-h-0 flex-col gap-3", className), children: [
|
|
10768
10784
|
/* @__PURE__ */ jsxs3("div", { className: "flex flex-wrap items-center justify-between gap-3 rounded-[var(--radius-lg)] border border-[var(--border-subtle)] bg-[var(--bg-card)]/80 px-3 py-2", children: [
|
|
10769
|
-
/* @__PURE__ */ jsxs3("div", { className: "
|
|
10770
|
-
/* @__PURE__ */ jsxs3(
|
|
10771
|
-
|
|
10772
|
-
|
|
10773
|
-
|
|
10774
|
-
|
|
10775
|
-
|
|
10776
|
-
|
|
10777
|
-
|
|
10778
|
-
|
|
10779
|
-
|
|
10780
|
-
|
|
10781
|
-
|
|
10782
|
-
|
|
10783
|
-
|
|
10784
|
-
/* @__PURE__ */
|
|
10785
|
-
|
|
10786
|
-
|
|
10785
|
+
/* @__PURE__ */ jsxs3("div", { className: "min-w-0 space-y-2", children: [
|
|
10786
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex flex-wrap items-center gap-2 text-xs text-[var(--text-muted)]", children: [
|
|
10787
|
+
/* @__PURE__ */ jsxs3(
|
|
10788
|
+
"span",
|
|
10789
|
+
{
|
|
10790
|
+
className: cn(
|
|
10791
|
+
"inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 font-medium",
|
|
10792
|
+
connectionTone(state)
|
|
10793
|
+
),
|
|
10794
|
+
children: [
|
|
10795
|
+
state === "disconnected" ? /* @__PURE__ */ jsx5(WifiOff, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ jsx5(Wifi, { className: "h-3.5 w-3.5" }),
|
|
10796
|
+
connectionLabel(state)
|
|
10797
|
+
]
|
|
10798
|
+
}
|
|
10799
|
+
),
|
|
10800
|
+
/* @__PURE__ */ jsxs3("span", { className: "inline-flex items-center gap-1.5 rounded-full border border-[var(--border-subtle)] bg-[var(--bg-input)] px-2.5 py-1", children: [
|
|
10801
|
+
/* @__PURE__ */ jsx5(Users, { className: "h-3.5 w-3.5" }),
|
|
10802
|
+
collaborators.length === 0 ? "Solo editing" : `${collaboratorCount} active`
|
|
10803
|
+
] })
|
|
10804
|
+
] }),
|
|
10805
|
+
/* @__PURE__ */ jsx5("p", { className: "text-xs text-[var(--text-muted)]", children: connectionDescription(state, collaborators.length, readOnly) })
|
|
10787
10806
|
] }),
|
|
10788
10807
|
/* @__PURE__ */ jsx5(CollaboratorsList, { collaborators })
|
|
10789
10808
|
] }),
|
|
@@ -10834,6 +10853,7 @@ function DocumentEditorPane({
|
|
|
10834
10853
|
const activeMode = mode ?? uncontrolledMode;
|
|
10835
10854
|
const isCollaborative = backend === "collaborative" && Boolean(collaboration);
|
|
10836
10855
|
const isDirty = normalizeMarkdown(draft) !== normalizeMarkdown(markdown);
|
|
10856
|
+
const saveStateLabel = readOnly ? "Read only" : isCollaborative ? isDirty ? "Snapshot pending" : "Live document current" : isDirty ? "Unsaved changes" : "Saved";
|
|
10837
10857
|
useEffect5(() => {
|
|
10838
10858
|
setDraft(markdown);
|
|
10839
10859
|
}, [markdown]);
|
|
@@ -10885,8 +10905,8 @@ function DocumentEditorPane({
|
|
|
10885
10905
|
),
|
|
10886
10906
|
/* @__PURE__ */ jsxs3("div", { className: "flex flex-wrap items-center gap-2 text-xs text-[var(--text-muted)]", children: [
|
|
10887
10907
|
toolbar,
|
|
10888
|
-
/* @__PURE__ */ jsx5("span", { className: "rounded-full border border-[var(--border-subtle)] bg-[var(--bg-card)] px-2.5 py-1 font-medium", children: isCollaborative ? "
|
|
10889
|
-
|
|
10908
|
+
/* @__PURE__ */ jsx5("span", { className: "rounded-full border border-[var(--border-subtle)] bg-[var(--bg-card)] px-2.5 py-1 font-medium", children: isCollaborative ? "Live document" : "Local draft" }),
|
|
10909
|
+
/* @__PURE__ */ jsx5("span", { className: "rounded-full border border-[var(--border-subtle)] bg-[var(--bg-input)] px-2.5 py-1", children: saveStateLabel }),
|
|
10890
10910
|
onSave && !readOnly && /* @__PURE__ */ jsxs3(
|
|
10891
10911
|
"button",
|
|
10892
10912
|
{
|
|
@@ -484,7 +484,7 @@ import { lazy, Suspense } from "react";
|
|
|
484
484
|
import { Download as Download2, X as X3 } from "lucide-react";
|
|
485
485
|
import { Fragment, jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
486
486
|
var LazyDocumentEditorPane = lazy(async () => {
|
|
487
|
-
const module = await import("./document-editor-pane-
|
|
487
|
+
const module = await import("./document-editor-pane-AVKKXSLG.js");
|
|
488
488
|
return { default: module.DocumentEditorPane };
|
|
489
489
|
});
|
|
490
490
|
function FileArtifactPane({
|
package/dist/editor.js
CHANGED
package/dist/files.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -89,7 +89,7 @@ import {
|
|
|
89
89
|
StatusBar,
|
|
90
90
|
TerminalPanel,
|
|
91
91
|
WorkspaceLayout
|
|
92
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-QMKWQF6F.js";
|
|
93
93
|
import "./chunk-OEX7NZE3.js";
|
|
94
94
|
import {
|
|
95
95
|
EmptyState,
|
|
@@ -158,7 +158,7 @@ import {
|
|
|
158
158
|
FileTabs,
|
|
159
159
|
FileTree,
|
|
160
160
|
filterFileTree
|
|
161
|
-
} from "./chunk-
|
|
161
|
+
} from "./chunk-IAIJUFM6.js";
|
|
162
162
|
import {
|
|
163
163
|
ArtifactPane
|
|
164
164
|
} from "./chunk-W4LM3QYZ.js";
|
package/dist/workspace.js
CHANGED
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
StatusBar,
|
|
11
11
|
TerminalPanel,
|
|
12
12
|
WorkspaceLayout
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-QMKWQF6F.js";
|
|
14
14
|
import "./chunk-OEX7NZE3.js";
|
|
15
15
|
import "./chunk-MUOL44AE.js";
|
|
16
16
|
import "./chunk-6H3EFUUC.js";
|
|
@@ -21,7 +21,7 @@ import "./chunk-CJ2RYVZH.js";
|
|
|
21
21
|
import "./chunk-BX6AQMUS.js";
|
|
22
22
|
import "./chunk-YDBXQQLC.js";
|
|
23
23
|
import "./chunk-TQN3VR4F.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-IAIJUFM6.js";
|
|
25
25
|
import {
|
|
26
26
|
ArtifactPane
|
|
27
27
|
} from "./chunk-W4LM3QYZ.js";
|
package/package.json
CHANGED