Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ _TODO_

### 使用者影响

升级到 Calcit **0.35.1** 后,请重新安装依赖、生成 JS 并刷新页面。原存档可以继续打开,
升级到 Calcit **0.37.0** 后,请重新安装依赖、生成 JS 并刷新页面。原存档可以继续打开,
Run、文本输入、复制、错误 HUD 和开发模式的 Reel 面板沿用原有行为。

Reel 使用 `State<Op, Store>`,按钮和文本框通过 Respo 的类型化事件读取输入。
Reel 使用 `State<Op, Store>`,按钮和文本框通过 Respo 的类型化事件派发具名 `Op`。按钮路径使用 `CoordKey` union,局部状态使用 `Map Tag Bool`。
复制边界以 `CopyScalar` 表示 String、Number、Bool、Tag、Symbol,空值仍复制为空字符串,
复合数据仍会报错。`Store.data` 保留对任意旧存档数据的支持,恢复成功后才启用自动保存。

配对正式 `@calcit/procs` **0.35.1**、Respo **0.19.4**、Reel **0.9.2**、UI **0.15.1**、
JS-FFI **0.2.13**,传递依赖 Router **0.12.1**。
配对正式 `@calcit/procs` **0.37.0**、Respo **0.19.5**、Reel **0.10.0**、UI **0.15.2**、
JS-FFI **0.2.13**,传递依赖 Router **0.12.2**。

### 开发

使用Node24、Yarn4.18.0、Caps0.1.1和配对 Calcit 0.35.1:
使用Node24、Yarn4.18.0、Caps0.1.1和配对 Calcit 0.37.0:

```sh
caps --strict --ci
Expand Down
30 changes: 16 additions & 14 deletions calcit.cirru
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{} (:description |) (:init-fn 'app.main/main!) (:mode :js) (:reload-fn 'app.main/reload!) (:target :browser)
:feature-policy $ {}
:modules $ [] |respo.calcit/ |respo-ui.calcit/ |reel.calcit/ |js-ffi/
:type-slots $ {} $ :dispatch-op |app.schema/DispatchOp
:type-slots $ {} $ :dispatch-op 'app.schema/Op
:files $ {}
'app.comp.button $ %{} 'FileEntry
:defs $ {} $ 'comp-live-button
Expand All @@ -28,7 +28,7 @@
:inner-text text
:on-click $ fn (event d!)
hint-fn $ Fn respo.schema/RespoEvent
Fn AnyEnum $ -> Unit
Fn app.schema/Op $ -> Unit
-> Unit
on-click event d!
d! $ Op :states cursor $ assoc state :darken? true
Expand Down Expand Up @@ -72,13 +72,13 @@
div ({})
comp-live-button (>> states :run) |Run $ fn (e d!)
hint-fn $ Fn respo.schema/RespoEvent
Fn AnyEnum $ -> Unit
Fn app.schema/Op $ -> Unit
-> Unit
d! $ Op :data $ format-to-lisp (parse-cirru-edn content)
respo.comp.space/space-x 8
comp-live-button (>> states :copy) |Copy $ fn (e d!)
hint-fn $ Fn respo.schema/RespoEvent
Fn AnyEnum $ -> Unit
Fn app.schema/Op $ -> Unit
-> Unit
copy! $ scalar-copy-text data
, &unit
Expand All @@ -89,15 +89,15 @@
{} $ :font-family ui/font-code
:on-input $ fn (e d!)
hint-fn $ Fn respo.schema/RespoEvent
Fn AnyEnum $ -> Unit
Fn app.schema/Op $ -> Unit
-> Unit
d! $ Op :content $ input-text e
textarea $ {} (:value data) (:placeholder |data)
:style $ merge (merge ui/flex ui/textarea)
{} $ :font-family ui/font-code
:on-input $ fn (e d!)
hint-fn $ Fn respo.schema/RespoEvent
Fn AnyEnum $ -> Unit
Fn app.schema/Op $ -> Unit
-> Unit
d! $ Op :data $ input-text e
if dev?
Expand Down Expand Up @@ -184,10 +184,10 @@
reset! *reel $ match (reel.typed/decode-control op)
(:some control) (reel.typed/apply-control updater @*reel control)
(:none)
reel.typed/record-op updater @*reel (decode-map-as op app.schema/Op) (generate-id!) (js-ffi.shared/now-ms)
reel.typed/record-op updater @*reel op (generate-id!) (js-ffi.shared/now-ms)
, &unit
:examples $ []
:schema $ quote $ Fn AnyEnum (-> Unit) (:features :js-ffi)
:schema $ quote $ Fn app.schema/Op (-> Unit) (:features :js-ffi)
'main! $ %{} 'CodeEntry (:doc |)
:code $ quote $ defn main! ()
println "|Running mode:" $ if config/dev? |dev |release
Expand Down Expand Up @@ -246,7 +246,6 @@
app.comp.container :refer $ comp-container
app.updater :refer $ updater
app.schema :as schema
reel.util :refer $ listen-devtools!
cljs.reader :refer $ read-string
app.config :as config
|./calcit.build-errors :default build-errors
Expand All @@ -255,16 +254,19 @@
respo.ffi.browser :as respo-browser
'app.schema $ %{} 'FileEntry
:defs $ {}
'DispatchOp $ %{} 'CodeEntry (:doc |)
:code $ quote $ def DispatchOp (:: :content |)
:examples $ []
:schema $ quote AnyEnum
'Op $ %{} 'CodeEntry (:doc |)
:code $ quote $ defenum Op
:states (List Dynamic) Dynamic
:states (List respo.schema/CoordKey) (Map Tag Bool)
:content String
:data Dynamic
:hydrate-storage app.schema/Store
:reel/toggle
:reel/recall Number
:reel/run
:reel/step
:reel/merge
:reel/reset
:reel/remove Number
:examples $ []
:schema $ quote EnumDef
'Store $ %{} 'CodeEntry (:doc |)
Expand Down
10 changes: 5 additions & 5 deletions deps.cirru
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

{} (:calcit-version |0.35.1)
:version |0.1.1
:dependencies $ {} (|Respo/reel.calcit |0.9.2)
|Respo/respo-ui.calcit |0.15.1
|Respo/respo.calcit |0.19.4
{} (:calcit-version |0.37.0)
:version |0.1.2
:dependencies $ {} (|Respo/reel.calcit |0.10.0)
|Respo/respo-ui.calcit |0.15.2
|Respo/respo.calcit |0.19.5
|calcit-lang/js-ffi |0.2.13
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "data-former",
"version": "0.1.1",
"version": "0.1.2",
"description": "Data form editor built with Calcit",
"main": "index.js",
"scripts": {
Expand All @@ -19,7 +19,7 @@
"vite": "8.3.3"
},
"dependencies": {
"@calcit/procs": "0.35.1",
"@calcit/procs": "0.37.0",
"copy-text-to-clipboard": "^3.1.0",
"feather-icons": "^4.29.0",
"shortid": "^2.2.16"
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.