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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ ClojureScript, beginners' home page

### 使用者影响

升级到 Calcit 和 `@calcit/procs` **0.35.1** 后,请重新安装依赖、生成 JS 并刷新页面。导航、十份展示示例、代码高亮、旧 Map 存档和页面 HUD 继续适用。`content/*.cljs` 仍作为页面示例展示。
升级到 Calcit 和 `@calcit/procs` **0.37.0** 后,请重新安装依赖、生成 JS 并刷新页面。导航、十份展示示例、代码高亮、旧 Map 存档和页面 HUD 继续适用。`content/*.cljs` 仍作为页面示例展示。

Logo 切换使用 `RespoEvent` 和具名 `Action`,状态路径校验为 `CoordKey`。开发面板直接使用类型化 Reel,渲染进入 Respo 的 memo frame。依赖配对正式 Respo **0.19.4**、Reel **0.9.2**、Markdown **0.8.1**、UI **0.15.1**、JS-FFI **0.2.13**,传递 Router **0.12.1**。
Logo 切换使用 `RespoEvent` 和具名 `Action`,状态路径校验为 `CoordKey`。开发面板直接使用类型化 Reel,渲染进入 Respo 的 memo frame。依赖配对正式 Respo **0.19.5**、Reel **0.10.0**、Markdown **0.8.2**、UI **0.15.2**、JS-FFI **0.2.13**,传递 Router **0.12.2**。 应用派发使用 `Action | reel.typed/Control`,缺席的工具 Logo 保持为 `Option`。Highlight.js 注册回调使用具名宿主类型。

### Workflow
### 0.31.0 迁移记录

使用者影响:应用使用精确配套正式 Calcit / `@calcit/procs` **0.31.0**,以及
Respo 0.17.0-alpha.4、Reel 0.7.0-alpha.4、Markdown 0.5.0-alpha.4、UI 0.9.0-alpha.4、js-ffi 0.2.7
Expand Down
46 changes: 36 additions & 10 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/ |respo-markdown.calcit/ |reel.calcit/ |js-ffi/
:type-slots $ {} $ :dispatch-op |app.schema/DispatchOp
:type-slots $ {} $ :dispatch-op 'app.schema/DispatchOp
:files $ {}
'app.comp.container $ %{} 'FileEntry
:defs $ {}
Expand Down Expand Up @@ -115,14 +115,14 @@
<> $ :description info
match (:logo info)
(:some logo)
div $ {} $ :style
{}
Option :some $ div $ {}
:style $ {}
:background-image $ str "|url(" logo "|)"
:background-size |cover
:background-position |center
:width |40px
:height |40px
(:none) nil
(:none) (Option :none)
:examples $ []
:schema $ quote $ Fn app.schema/ToolInfo (-> respo.schema/Component)
'comp-tools $ %{} 'CodeEntry (:doc |)
Expand Down Expand Up @@ -245,20 +245,32 @@
:doc "|Checks incoming application operations and Reel controls before updating typed state."
:code $ quote $ defn dispatch! (op)
match (typed-reel/decode-control op)
(:some control)
reset! *reel $ typed-reel/apply-control updater @*reel control
(:some control) (dispatch-resolved! control)
(:none)
reset! *reel $ typed-reel/record-op updater @*reel (decode-action op) (generate-id!) (host/now-ms)
dispatch-resolved! $ decode-action op
, &unit
:examples $ []
:schema $ quote $ Fn AnyEnum (-> 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 $ []
'main! $ %{} 'CodeEntry (:doc |)
:code $ quote $ defn main! ()
println "|Running mode:" $ if config/dev? |dev |release
if config/dev? $ load-console-formatter!
let
language clojure-lang
if (fn? language) (register-language! |clojure language) (raise "|Expected Highlight.js LanguageFn")
if (fn? language)
register-language! |clojure $ fn (api)
hint-fn $ Fn app.util/HighlightHost (-> app.util/LanguageDefinition) (:features :js-ffi)
js-cast (language api) 'app.util/LanguageDefinition
raise "|Expected Highlight.js LanguageFn"
match
browser/storage-get $ :storage-key config/site
(:some raw)
Expand Down Expand Up @@ -347,6 +359,10 @@
:code $ quote $ def DispatchOp (:: :unhandled)
:examples $ []
:schema $ quote AnyEnum
'ResolvedAction $ %{} 'CodeEntry (:doc |)
:code $ quote $ defunion ResolvedAction Action reel.typed/Control
:examples $ []
:schema $ quote UnionDef
'Showcase $ %{} 'CodeEntry (:doc |)
:code $ quote $ defstruct Showcase (:code String) (:text String) (:url String)
:examples $ []
Expand Down Expand Up @@ -435,7 +451,9 @@
'HighlightHost $ %{} 'CodeEntry (:doc |)
:code $ quote $ deftrait HighlightHost
.highlight $ Fn app.util/HighlightHost String JsObject $ -> JsObject
.register-language! $ Fn app.util/HighlightHost String Fn $ -> Unit
.register-language! $ Fn app.util/HighlightHost String
Fn app.util/HighlightHost $ -> app.util/LanguageDefinition
-> Unit
:examples $ []
:ffi $ {} (:backend :js) (:kind :external-object)
:schema $ quote Trait
Expand All @@ -444,6 +462,11 @@
:examples $ []
:ffi $ {} (:backend :js) (:kind :external-object)
:schema $ quote Trait
'LanguageDefinition $ %{} 'CodeEntry (:doc |)
:code $ quote $ deftrait LanguageDefinition (:name 'String)
:examples $ []
:ffi $ {} (:backend :js) (:kind :external-object) (:target :browser)
:schema $ quote Trait
'highlighter $ %{} 'CodeEntry (:doc |)
:code $ quote $ defn highlighter (code lang)
let
Expand Down Expand Up @@ -472,7 +495,10 @@
registry .register-language! name language
, &unit
:examples $ []
:schema $ quote $ Fn String Fn (-> Unit) (:features :js-ffi)
:schema $ quote $ Fn String
Fn app.util/HighlightHost $ -> app.util/LanguageDefinition
-> Unit
:features :js-ffi
'supported-langs $ %{} 'CodeEntry (:doc |)
:code $ quote $ def supported-langs (&{} |clojure |clojure)
:examples $ []
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)
{} (:calcit-version |0.37.0) (:version |0.1.1)
:dependencies $ {}
|Respo/respo.calcit |0.19.4
|Respo/reel.calcit |0.9.2
|Respo/respo-markdown.calcit |0.8.1
|Respo/respo-ui.calcit |0.15.1
|Respo/respo.calcit |0.19.5
|Respo/reel.calcit |0.10.0
|Respo/respo-markdown.calcit |0.8.2
|Respo/respo-ui.calcit |0.15.2
|calcit-lang/js-ffi |0.2.13
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"vite": "8.3.3"
},
"dependencies": {
"@calcit/procs": "0.35.1",
"@calcit/procs": "0.37.0",
"@calcit/std": "^0.0.2",
"cirru-color": "^0.2.4",
"copy-text-to-clipboard": "^3.2.2",
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.