|
26 | 26 | -> Unit |
27 | 27 | -> respo.schema/Component |
28 | 28 | 'comp-container $ %{} 'CodeEntry (:doc |) |
29 | | - :code $ quote $ defcomp comp-container (reel) |
| 29 | + :code $ quote $ defcomp comp-container (reel on-control!) |
30 | 30 | let |
31 | 31 | store $ :store reel |
32 | 32 | states $ :states store |
|
81 | 81 | , | $ decode-map-as value String |
82 | 82 | :spellcheck false |
83 | 83 | if dev? |
84 | | - Some $ comp-typed-reel (>> states :reel) reel $ {} |
| 84 | + Some $ comp-typed-reel (>> states :reel) reel ({}) on-control! |
85 | 85 | , None |
86 | 86 | if dev? |
87 | 87 | Some $ comp-inspect |Store store $ {} (:bottom |0px) |
88 | 88 | , None |
89 | 89 | :examples $ [] |
90 | | - :schema $ quote $ Fn (reel.typed/State app.schema/Op app.schema/StoreData) (-> respo.schema/Component) (:features :js-ffi) |
| 90 | + :schema $ quote $ Fn (reel.typed/State app.schema/Op app.schema/StoreData) |
| 91 | + Fn reel.typed/Control (-> Unit) (:features :io :state) |
| 92 | + -> respo.schema/Component |
| 93 | + :features :js-ffi :state |
91 | 94 | 'comp-diff-view $ %{} 'CodeEntry (:doc |) |
92 | 95 | :code $ quote $ defcomp comp-diff-view (changes by-word?) |
93 | 96 | list-> |
|
299 | 302 | :schema $ quote $ Fn |
300 | 303 | -> $ JsNullish respo.dom/DomElement |
301 | 304 | :features :js-ffi |
| 305 | + 'on-control! $ %{} 'CodeEntry (:doc |) |
| 306 | + :code $ quote $ defn on-control! (control) |
| 307 | + reset! *reel $ typed-reel/apply-control updater @*reel control |
| 308 | + , &unit |
| 309 | + :examples $ [] |
| 310 | + :schema $ quote $ Fn reel.typed/Control (-> Unit) (:features :state) |
302 | 311 | 'persist-storage! $ %{} 'CodeEntry (:doc |) |
303 | 312 | :code $ quote $ defn persist-storage! () |
304 | 313 | browser/storage-set! |
|
318 | 327 | hud! |error build-errors |
319 | 328 | , &unit |
320 | 329 | :examples $ [] |
321 | | - :schema $ quote $ Fn (-> Unit) (:features :state) |
| 330 | + :schema $ quote $ Fn (-> Unit) (:features :io :state) |
322 | 331 | 'render-app! $ %{} 'CodeEntry (:doc |) |
323 | 332 | :code $ quote $ defn render-app! () |
324 | | - with-memo-frame $ fn () $ render! (mount-target) (comp-container @*reel) |
| 333 | + with-memo-frame $ fn () $ render! (mount-target) (comp-container @*reel on-control!) |
325 | 334 | fn (op) (dispatch! op) |
326 | 335 | :examples $ [] |
327 | | - :schema $ quote $ Fn (-> Unit) (:features :state) |
| 336 | + :schema $ quote $ Fn (-> Unit) (:features :io :state) |
328 | 337 | 'repeat! $ %{} 'CodeEntry (:doc |) |
329 | 338 | :code $ quote $ defn repeat! (duration cb) |
330 | 339 | browser/set-timeout! |
|
0 commit comments