inplan 0.1.3 → 0.1.4
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.
|
@@ -148,7 +148,8 @@ body {
|
|
|
148
148
|
|
|
149
149
|
/* rail — a soft recessed paper surface so the comment cards read as light, floating
|
|
150
150
|
cards rather than rows. */
|
|
151
|
-
.ap-rail {
|
|
151
|
+
.ap-rail { background: var(--paper); } /* flex column (from .ap-pane); the inner scroller below scrolls, so PaneTabs stays pinned */
|
|
152
|
+
.ap-rail-scroll { flex: 1; min-height: 0; overflow: auto; }
|
|
152
153
|
.ap-rail-head { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 1; font-size: 12px; }
|
|
153
154
|
.ap-composer { padding: 12px; border-bottom: 1px solid var(--line); background: var(--bg); }
|
|
154
155
|
.ap-composer textarea { width: 100%; min-height: 48px; resize: vertical; }
|
|
@@ -52060,42 +52060,44 @@ function App() {
|
|
|
52060
52060
|
/* @__PURE__ */ jsxRuntimeExports.jsx(VSplitter, { width: cmtW, setWidth: setCmtW }),
|
|
52061
52061
|
/* @__PURE__ */ jsxRuntimeExports.jsxs("section", { className: "ap-pane ap-rail", ref: railRef, style: { width: cmtW }, children: [
|
|
52062
52062
|
panes === 2 && /* @__PURE__ */ jsxRuntimeExports.jsx(PaneTabs, { tab: rightTab, onTab: setRightTab }),
|
|
52063
|
-
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ap-rail-
|
|
52064
|
-
/* @__PURE__ */ jsxRuntimeExports.
|
|
52065
|
-
|
|
52066
|
-
|
|
52067
|
-
|
|
52068
|
-
|
|
52069
|
-
|
|
52070
|
-
|
|
52071
|
-
|
|
52072
|
-
|
|
52073
|
-
|
|
52074
|
-
|
|
52075
|
-
|
|
52076
|
-
|
|
52077
|
-
|
|
52078
|
-
|
|
52079
|
-
(
|
|
52080
|
-
|
|
52081
|
-
|
|
52082
|
-
|
|
52083
|
-
|
|
52084
|
-
|
|
52085
|
-
|
|
52086
|
-
|
|
52087
|
-
|
|
52088
|
-
|
|
52089
|
-
|
|
52090
|
-
|
|
52091
|
-
|
|
52092
|
-
|
|
52093
|
-
|
|
52094
|
-
|
|
52095
|
-
|
|
52096
|
-
|
|
52097
|
-
|
|
52098
|
-
|
|
52063
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ap-rail-scroll", children: [
|
|
52064
|
+
/* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ap-rail-head", children: [
|
|
52065
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("strong", { children: t2("rail.comments") }),
|
|
52066
|
+
(resolvedCount > 0 || orphanedCount > 0) && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
52067
|
+
"button",
|
|
52068
|
+
{
|
|
52069
|
+
type: "button",
|
|
52070
|
+
className: `ap-iconbtn ap-reveal${showResolvedOrphaned ? " on" : ""}`,
|
|
52071
|
+
"aria-pressed": showResolvedOrphaned,
|
|
52072
|
+
title: revealTip,
|
|
52073
|
+
"aria-label": revealTip,
|
|
52074
|
+
onClick: () => setShowResolvedOrphaned((v2) => !v2),
|
|
52075
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconRevealArchive, {})
|
|
52076
|
+
}
|
|
52077
|
+
)
|
|
52078
|
+
] }),
|
|
52079
|
+
visible.map((o, i) => /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, { children: [
|
|
52080
|
+
(i === 0 || visible[i - 1].group !== o.group) && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ap-section-title", children: o.group === 0 ? "Document" : "Anchored" }),
|
|
52081
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
52082
|
+
ThreadCard,
|
|
52083
|
+
{
|
|
52084
|
+
thread: o.thread,
|
|
52085
|
+
body: doc2.body,
|
|
52086
|
+
orphaned: o.orphaned,
|
|
52087
|
+
focused: focused === o.thread.root.id,
|
|
52088
|
+
synced: syncedCommentId === o.thread.root.id,
|
|
52089
|
+
disabled: editingLocked,
|
|
52090
|
+
onFocus: () => focusComment(o.thread.root.id, false, true),
|
|
52091
|
+
onReply: (text2) => apply(addReply(docRef.current, o.thread.root.id, text2, USER_AUTHOR).doc, { type: "comment_created", payload: { parentId: o.thread.root.id } }),
|
|
52092
|
+
onAnswer: (selected, text2) => apply(addAnswer(docRef.current, o.thread.root.id, selected, text2, USER_AUTHOR).doc, { type: "comment_answered", payload: { parentId: o.thread.root.id, selected } }),
|
|
52093
|
+
onResolve: (r2) => apply(setResolved(docRef.current, o.thread.root.id, r2), { type: "comment_resolved", payload: { id: o.thread.root.id, resolved: r2 } }),
|
|
52094
|
+
onEdit: (id2, text2) => apply(editCommentText(docRef.current, id2, text2), { type: "comment_modified", payload: { id: id2 } }),
|
|
52095
|
+
onDelete: (id2) => apply(deleteComment(docRef.current, id2), { type: "comment_deleted", payload: { id: id2 } })
|
|
52096
|
+
}
|
|
52097
|
+
)
|
|
52098
|
+
] }, o.thread.root.id)),
|
|
52099
|
+
visible.length === 0 && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "ap-empty", children: "No comments. Select text and use “+ Add Comment”." })
|
|
52100
|
+
] })
|
|
52099
52101
|
] })
|
|
52100
52102
|
] })
|
|
52101
52103
|
] }),
|
package/app/renderer/index.html
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; style-src 'self' 'unsafe-inline'" />
|
|
6
6
|
<title>inplan</title>
|
|
7
|
-
<script type="module" crossorigin src="./assets/index-
|
|
8
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
7
|
+
<script type="module" crossorigin src="./assets/index-PB8Gbp1q.js"></script>
|
|
8
|
+
<link rel="stylesheet" crossorigin href="./assets/index-DFcIiH7R.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
11
11
|
<div id="root"></div>
|
package/bin/cli.js
CHANGED
|
@@ -866,7 +866,7 @@ function waitForActions(opts) {
|
|
|
866
866
|
}
|
|
867
867
|
|
|
868
868
|
// src/cli.ts
|
|
869
|
-
var VERSION = "0.1.
|
|
869
|
+
var VERSION = "0.1.4";
|
|
870
870
|
function output(obj) {
|
|
871
871
|
process.stdout.write(JSON.stringify(obj) + "\n");
|
|
872
872
|
}
|
|
@@ -905,27 +905,43 @@ function announcePresence(docId, token, model) {
|
|
|
905
905
|
}
|
|
906
906
|
}
|
|
907
907
|
function resolveBundledApp() {
|
|
908
|
+
const here = dirname6(fileURLToPath(import.meta.url));
|
|
909
|
+
const appMain = join5(here, "..", "app", "main", "index.js");
|
|
910
|
+
if (!existsSync7(appMain)) return { appMain: null };
|
|
908
911
|
try {
|
|
909
|
-
const here = dirname6(fileURLToPath(import.meta.url));
|
|
910
|
-
const appMain = join5(here, "..", "app", "main", "index.js");
|
|
911
|
-
if (!existsSync7(appMain)) return null;
|
|
912
912
|
const electron = createRequire(import.meta.url)("electron");
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
913
|
+
if (typeof electron === "string" && electron) return { electron, appMain };
|
|
914
|
+
return { appMain, error: "the electron dependency did not resolve to a runtime path" };
|
|
915
|
+
} catch (e) {
|
|
916
|
+
return { appMain, error: e instanceof Error ? e.message : String(e) };
|
|
916
917
|
}
|
|
917
918
|
}
|
|
918
919
|
function spawnApp(file) {
|
|
920
|
+
const env = { ...process.env, INPLAN_CLI: process.argv[1] ?? "" };
|
|
919
921
|
const override = process.env.INPLAN_APP_CMD;
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
return null;
|
|
922
|
+
if (override) {
|
|
923
|
+
const child = spawn2(override, [file], { detached: true, stdio: "ignore", shell: true, env });
|
|
924
|
+
child.unref();
|
|
925
|
+
return child.pid ?? null;
|
|
926
|
+
}
|
|
927
|
+
const bundled = resolveBundledApp();
|
|
928
|
+
if ("electron" in bundled) {
|
|
929
|
+
const child = spawn2(bundled.electron, [bundled.appMain, file], { detached: true, stdio: "ignore", env });
|
|
930
|
+
child.unref();
|
|
931
|
+
return child.pid ?? null;
|
|
932
|
+
}
|
|
933
|
+
if (bundled.appMain === null) {
|
|
934
|
+
process.stderr.write("[inplan] no bundled editor (running from source?) \u2014 set INPLAN_APP_CMD to your editor; running headless\n");
|
|
935
|
+
} else {
|
|
936
|
+
process.stderr.write(
|
|
937
|
+
`[inplan] the bundled editor's Electron runtime is unavailable: ${bundled.error}
|
|
938
|
+
\u2192 fix it with: npm rebuild electron --prefix "$(npm root -g)/inplan" (re-downloads the binary;
|
|
939
|
+
set ELECTRON_MIRROR if a proxy blocks it), or point INPLAN_APP_CMD at an Electron binary.
|
|
940
|
+
Running headless for now.
|
|
941
|
+
`
|
|
942
|
+
);
|
|
924
943
|
}
|
|
925
|
-
|
|
926
|
-
const child = override ? spawn2(override, [file], { detached: true, stdio: "ignore", shell: true, env }) : spawn2(bundled.electron, [bundled.appMain, file], { detached: true, stdio: "ignore", env });
|
|
927
|
-
child.unref();
|
|
928
|
-
return child.pid ?? null;
|
|
944
|
+
return null;
|
|
929
945
|
}
|
|
930
946
|
function cadenceFrom(entries) {
|
|
931
947
|
for (let i = entries.length - 1; i >= 0; i--) {
|