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 @@ -6,24 +6,24 @@ Demo http://repo.respo-mvc.org/markup/ .

### Usages

本次候选 **0.0.5** 配对正式 Calcit / `@calcit/procs` **0.34.2**。
本次候选 **0.0.5** 配对正式 Calcit / `@calcit/procs` **0.35.1**。
消费者需重新安装完整依赖图、生成 JS 并完整刷新页面。Content 输入、Run、Reel 调试工具、
存档 key 和格式保持;Demo 不新增 Markdown 解析功能。UI/Reel 跨 minor 升级可能有样式差异。
0.0.5 尚未发布,正式 tag 出现前不要将本分支当作已发布依赖。

依赖使用已发布的 Respo **0.19.2**、UI **0.14.1**、Reel **0.9.0**、JS-FFI **0.2.10**,
传递 Router **0.11.2**;不再使用 Reel / Router 的旧 alpha 图。
依赖使用已发布的 Respo **0.19.4**、UI **0.15.1**、Reel **0.9.2**、JS-FFI **0.2.13**,
传递 Router **0.12.1**;不再使用 Reel / Router 的旧 alpha 图。
两个 DOM 回调使用真实 RespoEvent 和单 Enum dispatch,输入值由公开 `event-value` 检查为 String。
原 Reel 的 `read-field` 已删除;此处直接读取数据,保留 Map/Struct 字段读取及缺失值语义。
两个间隔分别保持 8 / 8px,开发态子节点显式使用 Option。
根渲染和原 SSR 回归均按 Respo 的公开 managed memo frame 合同包住构造与渲染。

应用 Op 与 Store 仍为原名义类型。开放 Enum 分发入口必须检查后转为 Op;它也承载 Reel 控制事件。
应用 Op 与 Store 仍为原名义类型。开放 `AnyEnum` 分发入口必须检查后转为 Op;它也承载 Reel 控制事件。
Store.states 是应用与 Reel 共用的真实异构状态树,继续保留 Map Dynamic Dynamic;不以含 Dynamic
的 union 或伪泛型隐藏该边界。固定 Site 已是具体 Struct,不为本次升级引入无实际需要的 union。

启动仍先恢复成功,再渲染并注册保存。已有本地 Store 保留身份;旧同名外部 Struct 转为 Map,
验证后重建本地 Store,名称不代表来源或授权。游标只接受缺失或实际 List。
验证后重建本地 Store,名称不代表来源或授权。游标可缺失;存在时须是由 Tag、字符串或数字组成的列表。
解析异常会停止启动并保留原存档,但不会显示此处的 HUD 提示;
只有 `decode-store` 返回 :none 时才显示原 HUD 错误,然后停止启动。坏存档恢复 UI 尚未实现。

Expand Down
30 changes: 17 additions & 13 deletions calcit.cirru
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
cursor $ match (get states :cursor)
(:none) ([])
(:some value)
if (list? value) value $ raise "|Expected List cursor"
match
try-decode-map-as value $ List respo.schema/CoordKey
(:ok checked) checked
(:err _) (raise "|Expected List cursor")
state $ or
.unwrap-or (get states :data) nil
{} $ :content |
Expand All @@ -34,7 +37,7 @@
:style $ {} $ :height |320px
:on-input $ fn (e d!)
hint-fn $ Fn respo.schema/RespoEvent
Fn Enum $ -> Unit
Fn AnyEnum $ -> Unit
-> Unit
d! $ schema/Op :states cursor $ assoc state :content (event-value e)
space-x 8
Expand All @@ -45,7 +48,7 @@
button $ {} (:class-name css/button) (:inner-text |Run)
:on-click $ fn (e d!)
hint-fn $ Fn respo.schema/RespoEvent
Fn Enum $ -> Unit
Fn AnyEnum $ -> Unit
-> Unit
println content
if dev?
Expand Down Expand Up @@ -95,7 +98,7 @@
:timestamp $ date-now-snapshot
, &unit
:examples $ []
:schema $ quote $ Fn Enum (-> Unit) (:features :js-ffi)
:schema $ quote $ Fn AnyEnum (-> Unit) (:features :js-ffi)
'main! $ %{} 'CodeEntry (:doc |)
:code $ quote $ defn main! ()
println "|Running mode:" $ if config/dev? |dev |release
Expand Down Expand Up @@ -182,18 +185,16 @@
'DispatchOp $ %{} 'CodeEntry (:doc "|Respo 入口事件合同,容纳应用和 Reel 控制事件;代表值不发送。")
:code $ quote $ def DispatchOp (:: :unhandled)
:examples $ []
:schema $ quote Enum
:schema $ quote AnyEnum
'Op $ %{} 'CodeEntry (:doc |)
:code $ quote $ defenum Op
:states
quote $ List Dynamic
, Dynamic
:states (List respo.schema/CoordKey) Dynamic
:hydrate-storage app.schema/Store
:examples $ []
:schema $ quote EnumDef
'Store $ %{} 'CodeEntry (:doc |)
:code $ quote $ defstruct Store
:states $ quote $ Map Dynamic Dynamic
:states $ Map Dynamic Dynamic
:examples $ []
:schema $ quote StructDef
'decode-op $ %{} 'CodeEntry
Expand All @@ -202,15 +203,15 @@
match op
(:states cursor data)
Op :states
decode-map-as cursor $ quote $ List Dynamic
decode-map-as cursor $ List respo.schema/CoordKey
, data
(:hydrate-storage data)
match (decode-store data)
(:some stored) (Op :hydrate-storage stored)
(:none) (raise "|Invalid saved Markup state")
_ $ raise "|Unknown Markup operation"
:examples $ []
:schema $ quote $ Fn Enum (-> app.schema/Op)
:schema $ quote $ Fn AnyEnum (-> app.schema/Op)
'decode-store $ %{} 'CodeEntry
:doc "|本地存档/旧存档的开放入口:已有 Store 保留身份,Map 验证后构造成 Store。states 是应用与 Reel 共用的异构 UI 状态树,不伪装成泛型关系。"
:code $ quote $ defn decode-store (data)
Expand All @@ -228,7 +229,10 @@
match (get stored.:states :cursor)
(:none) (Option :some stored)
(:some cursor)
if (list? cursor) (Option :some stored) (Option :none)
match
try-decode-map-as cursor $ List respo.schema/CoordKey
(:ok _) (Option :some stored)
(:err _) (Option :none)
(:err message) (Option :none)
:examples $ []
:schema $ quote $ Fn Dynamic
Expand All @@ -248,7 +252,7 @@
(:states cursor s)
assoc store :states $ decode-map-as
update-state-tree (:states store) cursor s
quote $ Map Dynamic Dynamic
Map Dynamic Dynamic
(:hydrate-storage data) data
:examples $ []
:schema $ quote $ Fn app.schema/Store app.schema/Op String Number (-> app.schema/Store)
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.34.2)
{} (:calcit-version |0.35.1)
:version |0.0.5
:dependencies $ {} (|Respo/reel.calcit |0.9.0)
|Respo/respo-ui.calcit |0.14.1
|Respo/respo.calcit |0.19.2
|calcit-lang/js-ffi |0.2.10
:dependencies $ {} (|Respo/reel.calcit |0.9.2)
|Respo/respo-ui.calcit |0.15.1
|Respo/respo.calcit |0.19.4
|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
@@ -1,7 +1,7 @@
{
"packageManager": "yarn@4.18.0",
"dependencies": {
"@calcit/procs": "0.34.2"
"@calcit/procs": "0.35.1"
},
"devDependencies": {
"bottom-tip": "^0.1.5",
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.