Skip to content

Commit 1226b2e

Browse files
authored
升级 Diffview 到 Calcit 0.44.0 (#58)
1 parent 60cbc5a commit 1226b2e

6 files changed

Lines changed: 34 additions & 24 deletions

File tree

‎README.md‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ http://r.tiye.me/Memkits/diffview/
77

88
### 使用者影响
99

10-
CLI 与 `@calcit/procs` 配对升级到正式 **0.42.1**,需要重新安装完整模块图、
11-
生成 JS 并完整刷新,不能跨工具链热重载旧 Reel。依赖使用正式 Reel **0.10.0**、
12-
UI **0.15.2**、Respo **0.19.5**、JS-FFI **0.2.13**,传递 Router **0.12.2**。
10+
CLI 与 `@calcit/procs` 配对升级到正式 **0.44.0**,需要重新安装完整模块图、
11+
生成 JS 并完整刷新,不能跨工具链热重载旧 Reel。依赖使用正式 Reel **0.11.3**、
12+
UI **0.15.5**、Respo **0.19.11**、JS-FFI **0.2.18**,传递 Router **0.12.9**。
1313
不使用 main/hash 或 alpha,不关闭 Caps strict 解决冲突。
1414

1515
行/词差异、Sorted、Swap、Clear、原 ⌘E/⌘I/⌘K、存储 key `diffview` 和 Map 存档
@@ -23,15 +23,15 @@ UI **0.15.2**、Respo **0.19.5**、JS-FFI **0.2.13**,传递 Router **0.12.2**
2323

2424
DiffChunk、StoreData 和 `Map Tag String` site 配置沿用。存档入口接受原 Map/Struct,
2525
通过原 decoder 构造本地 StoreData。应用事件构造具名 `Op` 后进入 Reel,
26-
开发工具的控制操作仍由 Reel 解码。移除闲置的开放事件解码器,回归测试直接使用页面派发的具名事件。状态坐标使用 Respo 的 `CoordKey` union,
26+
开发工具面板通过独立的具名 `reel.typed/Control` 回调直接应用控制操作;旧应用操作仍由 Reel 解码。移除闲置的开放事件解码器,回归测试直接使用页面派发的具名事件。状态坐标使用 Respo 的 `CoordKey` union,
2727
状态节点载荷继续接受异构数据。
2828

2929
根组件构建与 render! 同处 managed memo frame。开发 Reel 直接使用 typed State,
3030
两个开发工具条件子节点采用 Option,四处 spacer 保持宽 16。
3131

3232
### 安装与原门禁
3333

34-
使用 Calcit 0.42.1、Caps 0.1.1、Node.js 24、Yarn 4.18.0。
34+
使用 Calcit 0.44.0、Caps 0.1.1、Node.js 24、Yarn 4.18.0。
3535
Caps 独立安装,见 [官方说明](https://github.com/calcit-lang/caps);Corepack/Yarn 不会安装它。
3636
新解析 npm 包保留 60 分钟年龄门禁,无单包例外。lock 只更新 procs 配对;已有
3737
undici Dependabot #48 单独保留。

‎calcit.cirru‎

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
-> Unit
2727
-> respo.schema/Component
2828
'comp-container $ %{} 'CodeEntry (:doc |)
29-
:code $ quote $ defcomp comp-container (reel)
29+
:code $ quote $ defcomp comp-container (reel on-control!)
3030
let
3131
store $ :store reel
3232
states $ :states store
@@ -81,13 +81,16 @@
8181
, | $ decode-map-as value String
8282
:spellcheck false
8383
if dev?
84-
Some $ comp-typed-reel (>> states :reel) reel $ {}
84+
Some $ comp-typed-reel (>> states :reel) reel ({}) on-control!
8585
, None
8686
if dev?
8787
Some $ comp-inspect |Store store $ {} (:bottom |0px)
8888
, None
8989
:examples $ []
90-
:schema $ quote $ Fn (reel.typed/State app.schema/Op app.schema/StoreData) (-> respo.schema/Component) (:features :js-ffi)
90+
:schema $ quote $ Fn (reel.typed/State app.schema/Op app.schema/StoreData)
91+
Fn reel.typed/Control (-> Unit) (:features :io :state)
92+
-> respo.schema/Component
93+
:features :js-ffi :state
9194
'comp-diff-view $ %{} 'CodeEntry (:doc |)
9295
:code $ quote $ defcomp comp-diff-view (changes by-word?)
9396
list->
@@ -299,6 +302,12 @@
299302
:schema $ quote $ Fn
300303
-> $ JsNullish respo.dom/DomElement
301304
:features :js-ffi
305+
'on-control! $ %{} 'CodeEntry (:doc |)
306+
:code $ quote $ defn on-control! (control)
307+
reset! *reel $ typed-reel/apply-control updater @*reel control
308+
, &unit
309+
:examples $ []
310+
:schema $ quote $ Fn reel.typed/Control (-> Unit) (:features :state)
302311
'persist-storage! $ %{} 'CodeEntry (:doc |)
303312
:code $ quote $ defn persist-storage! ()
304313
browser/storage-set!
@@ -318,13 +327,13 @@
318327
hud! |error build-errors
319328
, &unit
320329
:examples $ []
321-
:schema $ quote $ Fn (-> Unit) (:features :state)
330+
:schema $ quote $ Fn (-> Unit) (:features :io :state)
322331
'render-app! $ %{} 'CodeEntry (:doc |)
323332
:code $ quote $ defn render-app! ()
324-
with-memo-frame $ fn () $ render! (mount-target) (comp-container @*reel)
333+
with-memo-frame $ fn () $ render! (mount-target) (comp-container @*reel on-control!)
325334
fn (op) (dispatch! op)
326335
:examples $ []
327-
:schema $ quote $ Fn (-> Unit) (:features :state)
336+
:schema $ quote $ Fn (-> Unit) (:features :io :state)
328337
'repeat! $ %{} 'CodeEntry (:doc |)
329338
:code $ quote $ defn repeat! (duration cb)
330339
browser/set-timeout!

‎deps.cirru‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

2-
{} (:calcit-version |0.43.0)
2+
{} (:calcit-version |0.44.0)
33
:version |0.1.5
4-
:dependencies $ {} (|Respo/reel.calcit |0.10.0)
5-
|Respo/respo-ui.calcit |0.15.2
6-
|Respo/respo.calcit |0.19.5
7-
|calcit-lang/js-ffi |0.2.13
4+
:dependencies $ {} (|Respo/reel.calcit |0.11.3)
5+
|Respo/respo-ui.calcit |0.15.5
6+
|Respo/respo.calcit |0.19.11
7+
|calcit-lang/js-ffi |0.2.18

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"vite": "8.3.3"
2121
},
2222
"dependencies": {
23-
"@calcit/procs": "0.43.0",
23+
"@calcit/procs": "0.44.0",
2424
"diff": "^8.0.2"
2525
}
2626
}

‎scripts/upgrade.test.mjs‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ const unwrap = clt.option_$o_unwrap;
1717
const read = (value, key) => unwrap(clt.get(value, key));
1818
const op = (name, ...args) => clt._PCT__$o__$o_(Op, init_tags([name])[name], ...args);
1919
const apply = (store, name, ...args) => updater(store, op(name, ...args), "test", 0);
20-
const render = (store) => comp_container(new_reel(store));
20+
const onControl = () => {};
21+
const render = (store) => comp_container(new_reel(store), onControl);
2122

2223
function handlers(node, kind) {
2324
if (component_$q_(node)) return handlers(unwrap(component_tree(node)), kind);
@@ -38,7 +39,7 @@ test("npm diff chunks decode into typed Calcit data", () => {
3839
);
3940
const reel = new_reel(store);
4041

41-
assert.ok(comp_container(reel));
42+
assert.ok(comp_container(reel, onControl));
4243
});
4344

4445
test("line and word differences render added and removed content", () => {

‎yarn.lock‎

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)