diff --git a/README.md b/README.md index d30081f..2a12be1 100644 --- a/README.md +++ b/README.md @@ -8,19 +8,19 @@ _TODO_ ### 使用者影响 -升级到 Calcit **0.35.1** 后,请重新安装依赖、生成 JS 并刷新页面。原存档可以继续打开, +升级到 Calcit **0.37.0** 后,请重新安装依赖、生成 JS 并刷新页面。原存档可以继续打开, Run、文本输入、复制、错误 HUD 和开发模式的 Reel 面板沿用原有行为。 -Reel 使用 `State`,按钮和文本框通过 Respo 的类型化事件读取输入。 +Reel 使用 `State`,按钮和文本框通过 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 diff --git a/calcit.cirru b/calcit.cirru index 9d26266..f1904ab 100644 --- a/calcit.cirru +++ b/calcit.cirru @@ -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 @@ -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 @@ -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 @@ -89,7 +89,7 @@ {} $ :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) @@ -97,7 +97,7 @@ {} $ :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? @@ -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 @@ -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 @@ -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 |) diff --git a/deps.cirru b/deps.cirru index 8d114b1..da34225 100644 --- a/deps.cirru +++ b/deps.cirru @@ -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 diff --git a/package.json b/package.json index 52dd57c..560c93a 100644 --- a/package.json +++ b/package.json @@ -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": { @@ -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" diff --git a/yarn.lock b/yarn.lock index 71e1894..f9ce0ea 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12,15 +12,15 @@ __metadata: languageName: node linkType: hard -"@calcit/procs@npm:0.35.1": - version: 0.35.1 - resolution: "@calcit/procs@npm:0.35.1" +"@calcit/procs@npm:0.37.0": + version: 0.37.0 + resolution: "@calcit/procs@npm:0.37.0" dependencies: "@calcit/finger-vec": "npm:0.1.1" "@calcit/ternary-tree": "npm:0.0.26" "@cirru/parser.ts": "npm:0.0.10" "@cirru/writer.ts": "npm:^0.1.9" - checksum: 10c0/c39ab807cdda677cfd9fa9f6ae8adbb468347d5dd85ac38355a27a048cc9a1b7301d4f9c73f3bbf815269ecc7a59d824f61c8c46a9d56ae6a67f3b5cb21be3de + checksum: 10c0/38efd6a08b096419d41aa1d502a573ecbb415867caa18ee69142010e5d6c285f36f47d4e4334c33eff15617b1eff980f29662176422acb1bbf4fac5fdca83178 languageName: node linkType: hard @@ -236,7 +236,7 @@ __metadata: version: 0.0.0-use.local resolution: "data-former@workspace:." dependencies: - "@calcit/procs": "npm:0.35.1" + "@calcit/procs": "npm:0.37.0" bottom-tip: "npm:^0.1.5" copy-text-to-clipboard: "npm:^3.1.0" feather-icons: "npm:^4.29.0"