diff --git a/README.md b/README.md index c493923..5db3bbd 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ ClojureScript, beginners' home page ### 使用者影响 -升级到 Calcit 和 `@calcit/procs` **0.40.0** 后,请重新安装依赖、生成 JS 并刷新页面。导航、十份展示示例、代码高亮、旧 Map 存档和页面 HUD 继续适用。`content/*.cljs` 仍作为页面示例展示。 +升级到 Calcit 和 `@calcit/procs` **0.41.0** 后,请重新安装依赖、生成 JS 并刷新页面。导航、十份展示示例、代码高亮、旧 Map 存档和页面 HUD 继续适用。`content/*.cljs` 仍作为页面示例展示。 Logo 切换使用 `RespoEvent` 和具名 `Action`,状态路径校验为 `CoordKey`。开发面板直接使用类型化 Reel,渲染进入 Respo 的 memo frame。依赖配对正式 Respo **0.19.5**、Reel **0.11.0**、Markdown **0.8.2**、UI **0.15.2**、JS-FFI **0.2.13**,传递 Router **0.12.2**。 页面只派发具名 `Action`,Reel 面板和快捷键单独接收 `reel.typed/Control`,两者在更新状态时用联合类型匹配,缺席的工具 Logo 保持为 `Option`。Highlight.js 注册回调使用具名宿主类型。 diff --git a/calcit.cirru b/calcit.cirru index 8ff2377..b3a3732 100644 --- a/calcit.cirru +++ b/calcit.cirru @@ -32,8 +32,8 @@ respo.comp.space/space-y 16 comp-footer if dev? - Option :some $ comp-typed-reel (>> states :reel) reel ({}) on-control - Option :none + Some $ comp-typed-reel (>> states :reel) reel ({}) on-control + , None :examples $ [] :schema $ quote $ Fn (reel.typed/State app.schema/Action app.schema/Store) Fn reel.typed/Control $ -> Unit @@ -117,16 +117,16 @@ <> $ :description info match (:logo info) (:some logo) - Option :some $ div $ {} + Some $ div $ {} :style $ {} :background-image $ str "|url(" logo "|)" :background-size |cover :background-position |center :width |40px :height |40px - (:none) (Option :none) + (:none) None :examples $ [] - :schema $ quote $ Fn app.schema/ToolInfo (-> respo.schema/Component) + :schema $ quote $ Fn ToolInfo (-> respo.schema/Component) 'comp-tools $ %{} 'CodeEntry (:doc |) :code $ quote $ defcomp comp-tools () div @@ -147,8 +147,8 @@ {} $ :class-name |content div {} $ :style $ {} (:width |auto) - comp-tool-card $ ToolInfo :name |shadow-cljs :logo (Option :some |http://cdn.tiye.me/logo/shadow-cljs.png) :url |http://shadow-cljs.org :description "|ClojureScript compilation made easy." - comp-tool-card $ ToolInfo :name |figwheel-main :logo (Option :none) :url |https://figwheel.org :description "|Figwheel Main builds your ClojureScript code and hot loads it as you are coding!" + comp-tool-card $ ToolInfo :name |shadow-cljs :logo (Some |http://cdn.tiye.me/logo/shadow-cljs.png) :url |http://shadow-cljs.org :description "|ClojureScript compilation made easy." + comp-tool-card $ ToolInfo :name |figwheel-main :logo None :url |https://figwheel.org :description "|Figwheel Main builds your ClojureScript code and hot loads it as you are coding!" :examples $ [] :schema $ quote $ Fn (-> respo.schema/Component) :ns $ %{} 'NsEntry (:doc |) @@ -208,7 +208,7 @@ 8 $ Showcase :code (inline |atom.cljs) :text |Atom :url |https://clojuredocs.org/clojure.core/atom 9 $ Showcase :code (inline |edn.cljs) :text |EDN :url |https://learnxinyminutes.com/docs/edn/ :examples $ [] - :schema $ quote $ Map Number app.schema/Showcase + :schema $ quote $ Map Number Showcase :ns $ %{} 'NsEntry (:doc |) :code $ quote $ ns app.comp.showcase :require @@ -234,7 +234,7 @@ :code $ quote $ def site Site :dev-ui |http://localhost:8100/main.css :release-ui |http://cdn.tiye.me/favored-fonts/main.css :cdn-url |http://cdn.tiye.me/clojure-script-org/ :title "|ClojureScript, beginners' home page" :icon |http://cdn.tiye.me/logo/cljs.png :storage-key |clojure-script.org :examples $ [] - :schema $ quote app.config/Site + :schema $ quote Site :ns $ %{} 'NsEntry (:doc |) :code $ quote $ ns app.config 'app.main $ %{} 'FileEntry @@ -242,20 +242,20 @@ '*reel $ %{} 'CodeEntry (:doc |) :code $ quote $ defref *reel (typed-reel/new-reel schema/store) :examples $ [] - :schema $ quote $ Ref (reel.typed/State app.schema/Action app.schema/Store) + :schema $ quote $ Ref (reel.typed/State schema/Action schema/Store) 'dispatch! $ %{} 'CodeEntry (:doc "|Dispatches a typed application action.") :code $ quote $ defn dispatch! (op) (dispatch-resolved! op) :examples $ [] - :schema $ quote $ Fn app.schema/Action (-> Unit) (:features :js-ffi) + :schema $ quote $ Fn schema/Action (-> Unit) (:features :js-ffi) 'dispatch-resolved! $ %{} 'CodeEntry (:doc |) :code $ quote $ defn dispatch-resolved! (op) - hint-fn $ Fn app.schema/ResolvedAction (-> Unit) (:features :js-ffi) reset! *reel $ match op (reel.typed/Control control) (typed-reel/apply-control updater @*reel control) (app.schema/Action action) typed-reel/record-op updater @*reel action (generate-id!) (host/now-ms) , &unit :examples $ [] + :schema $ quote $ Fn schema/ResolvedAction (-> Unit) (:features :js-ffi) 'main! $ %{} 'CodeEntry (:doc |) :code $ quote $ defn main! () println "|Running mode:" $ if config/dev? |dev |release @@ -380,7 +380,7 @@ :code $ quote $ def store Store :states ({}) :content | :case-idx 0 :examples $ [] - :schema $ quote app.schema/Store + :schema $ quote Store :ns $ %{} 'NsEntry (:doc |) :code $ quote $ ns app.schema 'app.updater $ %{} 'FileEntry @@ -389,7 +389,7 @@ :code $ quote $ defn restore-action (raw) Action :hydrate-storage $ decode-map-as (parse-cirru-edn raw) 'app.schema/Store :examples $ [] - :schema $ quote $ Fn String (-> app.schema/Action) + :schema $ quote $ Fn String (-> Action) :tests $ [] $ %{} 'TestEntry (:name |restores-legacy-store-map) :code $ quote $ let action $ restore-action $ format-cirru-edn @@ -415,7 +415,7 @@ (:pick-case c) (assoc store :case-idx c) (:hydrate-storage d) d :examples $ [] - :schema $ quote $ Fn app.schema/Store app.schema/Action String Number (-> app.schema/Store) + :schema $ quote $ Fn Store Action String Number (-> Store) :tests $ [] $ %{} 'TestEntry (:name |updates-concrete-store) :code $ quote $ let original $ Store :states ({}) :content | :case-idx 0 @@ -481,7 +481,7 @@ , &unit :examples $ [] :schema $ quote $ Fn String - Fn app.util/HighlightHost $ -> app.util/LanguageDefinition + Fn HighlightHost $ -> LanguageDefinition -> Unit :features :js-ffi 'supported-langs $ %{} 'CodeEntry (:doc |) diff --git a/deps.cirru b/deps.cirru index 307e5c3..8b7bfe3 100644 --- a/deps.cirru +++ b/deps.cirru @@ -1,4 +1,4 @@ -{} (:calcit-version |0.40.0) (:version |0.1.1) +{} (:calcit-version |0.41.0) (:version |0.1.1) :dependencies $ {} |Respo/respo.calcit |0.19.5 |Respo/reel.calcit |0.11.0 diff --git a/package.json b/package.json index f7f4056..a648759 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "vite": "8.3.3" }, "dependencies": { - "@calcit/procs": "0.40.0", + "@calcit/procs": "0.41.0", "@calcit/std": "^0.0.2", "cirru-color": "^0.2.4", "copy-text-to-clipboard": "^3.2.2", diff --git a/yarn.lock b/yarn.lock index 1ca4002..f4b8203 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12,15 +12,15 @@ __metadata: languageName: node linkType: hard -"@calcit/procs@npm:0.40.0": - version: 0.40.0 - resolution: "@calcit/procs@npm:0.40.0" +"@calcit/procs@npm:0.41.0": + version: 0.41.0 + resolution: "@calcit/procs@npm:0.41.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/4122eaa8d63fd57826d24c6c072dbd1cb6cdd2934dbfdb4fd0afc03f4aec73f07d71ccba246120c15e198134b7e92a324f1f1900b43c458b02e871354739cf84 + checksum: 10c0/5de94b39e435363d0f80611b63914c9abd6b0afac3c77adf9b9846ac439fce319ac0780697364cabf67b2997d39495a1e72086e1496ac560c51bb57462f37628 languageName: node linkType: hard @@ -229,7 +229,7 @@ __metadata: version: 0.0.0-use.local resolution: "clojure-script-org@workspace:." dependencies: - "@calcit/procs": "npm:0.40.0" + "@calcit/procs": "npm:0.41.0" "@calcit/std": "npm:^0.0.2" bottom-tip: "npm:^0.1.5" cirru-color: "npm:^0.2.4"