@cueloop/client 0.1.0-alpha.6 → 0.1.0-alpha.7
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/package.json +5 -5
- package/src/App.tsx +0 -0
- package/src/view.test.ts +6 -6
- package/src/view.ts +0 -0
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cueloop/client",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.7",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": "./src/index.ts"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@cueloop/daemon": "0.1.0-alpha.
|
|
11
|
-
"@cueloop/extension-api": "0.1.0-alpha.
|
|
12
|
-
"@cueloop/integration-obsidian": "0.1.0-alpha.
|
|
13
|
-
"@cueloop/schema": "0.1.0-alpha.
|
|
10
|
+
"@cueloop/daemon": "0.1.0-alpha.7",
|
|
11
|
+
"@cueloop/extension-api": "0.1.0-alpha.7",
|
|
12
|
+
"@cueloop/integration-obsidian": "0.1.0-alpha.7",
|
|
13
|
+
"@cueloop/schema": "0.1.0-alpha.7",
|
|
14
14
|
"@opentui/core": "^0.4.3",
|
|
15
15
|
"@opentui/react": "^0.4.3",
|
|
16
16
|
"@opentui/ssh": "0.4.5",
|
package/src/App.tsx
CHANGED
|
Binary file
|
package/src/view.test.ts
CHANGED
|
@@ -2,17 +2,15 @@ import { describe, expect, test } from "bun:test";
|
|
|
2
2
|
import {
|
|
3
3
|
blockRuns,
|
|
4
4
|
buildDisplay,
|
|
5
|
-
cutBlock,
|
|
6
5
|
displayText,
|
|
7
6
|
marksByDisplay,
|
|
7
|
+
nextWorkBlock,
|
|
8
8
|
overlayMarks,
|
|
9
|
-
restoreBlock,
|
|
10
|
-
restoreLine,
|
|
11
9
|
spanKey,
|
|
12
10
|
startSpan,
|
|
13
11
|
wrapRuns,
|
|
14
12
|
} from "./view";
|
|
15
|
-
import { parseBlocks, type Annotation } from "@cueloop/schema";
|
|
13
|
+
import { cutBlock, parseBlocks, restoreBlock, restoreLine, type Annotation } from "@cueloop/schema";
|
|
16
14
|
|
|
17
15
|
const BASE = `# Plan
|
|
18
16
|
|
|
@@ -150,8 +148,10 @@ describe("cut / restore round-trip", () => {
|
|
|
150
148
|
expect(cut).not.toContain("second item");
|
|
151
149
|
const display = buildDisplay(BASE, cut);
|
|
152
150
|
const delIdx = display.findIndex((d) => d.type === "del");
|
|
153
|
-
const line = restoreLine(display, delIdx, cut.split("\n").length);
|
|
154
|
-
|
|
151
|
+
const line = restoreLine(nextWorkBlock(display, delIdx), cut.split("\n").length);
|
|
152
|
+
// undefined = the working copy round-tripped back to the submitted revision
|
|
153
|
+
const restored = restoreBlock(BASE, cut, li, line);
|
|
154
|
+
expect(restored).toBeUndefined();
|
|
155
155
|
expect(buildDisplay(BASE, restored).every((d) => d.type === "same")).toBe(true);
|
|
156
156
|
});
|
|
157
157
|
});
|
package/src/view.ts
CHANGED
|
Binary file
|