@@ -0,0 +1,919 @@
1+#### /ui/todo-list/jibb control
4+++ main (program init update view subs)
6++$ model [todos=(list item.todo) draft=@t error=(unit @t)]
11+ [%got todos=(list item.todo)]
12+ [%acked err=(unit @t)]
14+++ init |= ts=(list item.todo)
15+ [todos=ts draft="" error=~]
17+++ update |= [=msg m=model]
20+ ?- (gth (lent (tuba (trip t))) 80)
21+ %.y [m(draft=t error=`"Too long") ~]
22+ %.n [m(draft=t error=~) ~]
23+ %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
24+ [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
25+ [%got ts] [m(todos=ts) ~]
26+ [%acked err] [m(error=err) ~]
29+ ~[[%watch (todos.todo |=%got)]]
34+ each (turn todos.m row-of)
36+ el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
38+ el ~[tone+%danger] (text (fall error.m ""))
40+++ row-of |= t=item.todo
41+ [id.t (toggle done.t text.t [%toggled id.t])]
42+#### /ui/todo-list/jibb reorder
45+++ row-of |= t=item.todo
46+ [id.t (toggle done.t text.t [%toggled id.t])]
51+ each (turn todos.m row-of)
53+ el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
55+ el ~[tone+%danger] (text (fall error.m ""))
58+ ~[[%watch (todos.todo |=%got)]]
60+++ update |= [=msg m=model]
63+ ?- (gth (lent (tuba (trip t))) 80)
64+ %.y [m(draft=t error=`"Too long") ~]
65+ %.n [m(draft=t error=~) ~]
66+ %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
67+ [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
68+ [%got ts] [m(todos=ts) ~]
69+ [%acked err] [m(error=err) ~]
71+++ init |= ts=(list item.todo)
72+ [todos=ts draft="" error=~]
74++$ model [todos=(list item.todo) draft=@t error=(unit @t)]
79+ [%got todos=(list item.todo)]
80+ [%acked err=(unit @t)]
82+++ main (program init update view subs)
83+#### /ui/todo-list/jibb rename-view-sample
86+++ main (program init update view subs)
88++$ model [todos=(list item.todo) draft=@t error=(unit @t)]
93+ [%got todos=(list item.todo)]
94+ [%acked err=(unit @t)]
96+++ init |= ts=(list item.todo)
97+ [todos=ts draft="" error=~]
99+++ update |= [=msg m=model]
102+ ?- (gth (lent (tuba (trip t))) 80)
103+ %.y [m(draft=t error=`"Too long") ~]
104+ %.n [m(draft=t error=~) ~]
105+ %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
106+ [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
107+ [%got ts] [m(todos=ts) ~]
108+ [%acked err] [m(error=err) ~]
111+ ~[[%watch (todos.todo |=%got)]]
114+ column ~[gap+%s2] ~[
116+ each (turn todos.mdl row-of)
118+ el ~[width+[%fill 1]] (field "New todo" draft.mdl |=%typed)
119+ button "Add" %submit
120+ el ~[tone+%danger] (text (fall error.mdl ""))
122+++ row-of |= t=item.todo
123+ [id.t (toggle done.t text.t [%toggled id.t])]
124+#### /ui/todo-list/jibb rename-row-sample
127+++ main (program init update view subs)
129++$ model [todos=(list item.todo) draft=@t error=(unit @t)]
134+ [%got todos=(list item.todo)]
135+ [%acked err=(unit @t)]
137+++ init |= ts=(list item.todo)
138+ [todos=ts draft="" error=~]
140+++ update |= [=msg m=model]
143+ ?- (gth (lent (tuba (trip t))) 80)
144+ %.y [m(draft=t error=`"Too long") ~]
145+ %.n [m(draft=t error=~) ~]
146+ %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
147+ [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
148+ [%got ts] [m(todos=ts) ~]
149+ [%acked err] [m(error=err) ~]
152+ ~[[%watch (todos.todo |=%got)]]
155+ column ~[gap+%s2] ~[
157+ each (turn todos.m row-of)
159+ el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
160+ button "Add" %submit
161+ el ~[tone+%danger] (text (fall error.m ""))
163+++ row-of |= it=item.todo
164+ [id.it (toggle done.it text.it [%toggled id.it])]
165+#### /ui/todo-list/jibb rename-init-sample
168+++ main (program init update view subs)
170++$ model [todos=(list item.todo) draft=@t error=(unit @t)]
175+ [%got todos=(list item.todo)]
176+ [%acked err=(unit @t)]
178+++ init |= items=(list item.todo)
179+ [todos=items draft="" error=~]
181+++ update |= [=msg m=model]
184+ ?- (gth (lent (tuba (trip t))) 80)
185+ %.y [m(draft=t error=`"Too long") ~]
186+ %.n [m(draft=t error=~) ~]
187+ %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
188+ [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
189+ [%got ts] [m(todos=ts) ~]
190+ [%acked err] [m(error=err) ~]
193+ ~[[%watch (todos.todo |=%got)]]
196+ column ~[gap+%s2] ~[
198+ each (turn todos.m row-of)
200+ el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
201+ button "Add" %submit
202+ el ~[tone+%danger] (text (fall error.m ""))
204+++ row-of |= t=item.todo
205+ [id.t (toggle done.t text.t [%toggled id.t])]
206+#### /ui/todo-list/jibb rename-subs-sample
209+++ main (program init update view subs)
211++$ model [todos=(list item.todo) draft=@t error=(unit @t)]
216+ [%got todos=(list item.todo)]
217+ [%acked err=(unit @t)]
219+++ init |= ts=(list item.todo)
220+ [todos=ts draft="" error=~]
222+++ update |= [=msg m=model]
225+ ?- (gth (lent (tuba (trip t))) 80)
226+ %.y [m(draft=t error=`"Too long") ~]
227+ %.n [m(draft=t error=~) ~]
228+ %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
229+ [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
230+ [%got ts] [m(todos=ts) ~]
231+ [%acked err] [m(error=err) ~]
234+ ~[[%watch (todos.todo |=%got)]]
237+ column ~[gap+%s2] ~[
239+ each (turn todos.m row-of)
241+ el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
242+ button "Add" %submit
243+ el ~[tone+%danger] (text (fall error.m ""))
245+++ row-of |= t=item.todo
246+ [id.t (toggle done.t text.t [%toggled id.t])]
247+#### /ui/todo-list/jibb unused-helper
250+++ main (program init update view subs)
252++$ model [todos=(list item.todo) draft=@t error=(unit @t)]
257+ [%got todos=(list item.todo)]
258+ [%acked err=(unit @t)]
260+++ init |= ts=(list item.todo)
261+ [todos=ts draft="" error=~]
263+++ update |= [=msg m=model]
266+ ?- (gth (lent (tuba (trip t))) 80)
267+ %.y [m(draft=t error=`"Too long") ~]
268+ %.n [m(draft=t error=~) ~]
269+ %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
270+ [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
271+ [%got ts] [m(todos=ts) ~]
272+ [%acked err] [m(error=err) ~]
275+ ~[[%watch (todos.todo |=%got)]]
278+ column ~[gap+%s2] ~[
280+ each (turn todos.m row-of)
282+ el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
283+ button "Add" %submit
284+ el ~[tone+%danger] (text (fall error.m ""))
286+++ row-of |= t=item.todo
287+ [id.t (toggle done.t text.t [%toggled id.t])]
291+#### /ui/todo-list/jibb unused-helper-mold
294+++ main (program init update view subs)
296++$ model [todos=(list item.todo) draft=@t error=(unit @t)]
301+ [%got todos=(list item.todo)]
302+ [%acked err=(unit @t)]
304+++ init |= ts=(list item.todo)
305+ [todos=ts draft="" error=~]
307+++ update |= [=msg m=model]
310+ ?- (gth (lent (tuba (trip t))) 80)
311+ %.y [m(draft=t error=`"Too long") ~]
312+ %.n [m(draft=t error=~) ~]
313+ %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
314+ [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
315+ [%got ts] [m(todos=ts) ~]
316+ [%acked err] [m(error=err) ~]
319+ ~[[%watch (todos.todo |=%got)]]
322+ column ~[gap+%s2] ~[
324+ each (turn todos.m row-of)
326+ el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
327+ button "Add" %submit
328+ el ~[tone+%danger] (text (fall error.m ""))
330+++ row-of |= t=item.todo
331+ [id.t (toggle done.t text.t [%toggled id.t])]
334+#### /ui/todo-list/jibb swap-model-fields
337+++ main (program init update view subs)
339++$ model [draft=@t todos=(list item.todo) error=(unit @t)]
344+ [%got todos=(list item.todo)]
345+ [%acked err=(unit @t)]
347+++ init |= ts=(list item.todo)
348+ [draft="" todos=ts error=~]
350+++ update |= [=msg m=model]
353+ ?- (gth (lent (tuba (trip t))) 80)
354+ %.y [m(draft=t error=`"Too long") ~]
355+ %.n [m(draft=t error=~) ~]
356+ %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
357+ [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
358+ [%got ts] [m(todos=ts) ~]
359+ [%acked err] [m(error=err) ~]
362+ ~[[%watch (todos.todo |=%got)]]
365+ column ~[gap+%s2] ~[
367+ each (turn todos.m row-of)
369+ el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
370+ button "Add" %submit
371+ el ~[tone+%danger] (text (fall error.m ""))
373+++ row-of |= t=item.todo
374+ [id.t (toggle done.t text.t [%toggled id.t])]
375+#### /ui/todo-list/jibb init-cast-body
378+++ main (program init update view subs)
380++$ model [todos=(list item.todo) draft=@t error=(unit @t)]
385+ [%got todos=(list item.todo)]
386+ [%acked err=(unit @t)]
388+++ init |= ts=(list item.todo)
391+++ update |= [=msg m=model]
394+ ?- (gth (lent (tuba (trip t))) 80)
395+ %.y [m(draft=t error=`"Too long") ~]
396+ %.n [m(draft=t error=~) ~]
397+ %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
398+ [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
399+ [%got ts] [m(todos=ts) ~]
400+ [%acked err] [m(error=err) ~]
403+ ~[[%watch (todos.todo |=%got)]]
406+ column ~[gap+%s2] ~[
408+ each (turn todos.m row-of)
410+ el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
411+ button "Add" %submit
412+ el ~[tone+%danger] (text (fall error.m ""))
414+++ row-of |= t=item.todo
415+ [id.t (toggle done.t text.t [%toggled id.t])]
416+#### /ui/todo-list/jibb init-positional
419+++ main (program init update view subs)
421++$ model [todos=(list item.todo) draft=@t error=(unit @t)]
426+ [%got todos=(list item.todo)]
427+ [%acked err=(unit @t)]
429+++ init |= ts=(list item.todo)
432+++ update |= [=msg m=model]
435+ ?- (gth (lent (tuba (trip t))) 80)
436+ %.y [m(draft=t error=`"Too long") ~]
437+ %.n [m(draft=t error=~) ~]
438+ %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
439+ [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
440+ [%got ts] [m(todos=ts) ~]
441+ [%acked err] [m(error=err) ~]
444+ ~[[%watch (todos.todo |=%got)]]
447+ column ~[gap+%s2] ~[
449+ each (turn todos.m row-of)
451+ el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
452+ button "Add" %submit
453+ el ~[tone+%danger] (text (fall error.m ""))
455+++ row-of |= t=item.todo
456+ [id.t (toggle done.t text.t [%toggled id.t])]
457+#### /ui/todo-list/jibb second-sub-every
460+++ main (program init update view subs)
462++$ model [todos=(list item.todo) draft=@t error=(unit @t)]
467+ [%got todos=(list item.todo)]
468+ [%acked err=(unit @t)]
471+++ init |= ts=(list item.todo)
472+ [todos=ts draft="" error=~]
474+++ update |= [=msg m=model]
477+ ?- (gth (lent (tuba (trip t))) 80)
478+ %.y [m(draft=t error=`"Too long") ~]
479+ %.n [m(draft=t error=~) ~]
480+ %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
481+ [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
482+ [%got ts] [m(todos=ts) ~]
483+ [%acked err] [m(error=err) ~]
487+ ~[[%watch (todos.todo |=%got)] [%every ~s30 |=%tick]]
490+ column ~[gap+%s2] ~[
492+ each (turn todos.m row-of)
494+ el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
495+ button "Add" %submit
496+ el ~[tone+%danger] (text (fall error.m ""))
498+++ row-of |= t=item.todo
499+ [id.t (toggle done.t text.t [%toggled id.t])]
500+#### /ui/todo-list/jibb second-sub-watch
503+++ main (program init update view subs)
505++$ model [todos=(list item.todo) draft=@t error=(unit @t)]
510+ [%got todos=(list item.todo)]
511+ [%acked err=(unit @t)]
513+++ init |= ts=(list item.todo)
514+ [todos=ts draft="" error=~]
516+++ update |= [=msg m=model]
519+ ?- (gth (lent (tuba (trip t))) 80)
520+ %.y [m(draft=t error=`"Too long") ~]
521+ %.n [m(draft=t error=~) ~]
522+ %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
523+ [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
524+ [%got ts] [m(todos=ts) ~]
525+ [%acked err] [m(error=err) ~]
528+ ~[[%watch (todos.todo |=%got)] [%watch (todos.todo |=%got)]]
531+ column ~[gap+%s2] ~[
533+ each (turn todos.m row-of)
535+ el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
536+ button "Add" %submit
537+ el ~[tone+%danger] (text (fall error.m ""))
539+++ row-of |= t=item.todo
540+ [id.t (toggle done.t text.t [%toggled id.t])]
541+#### /ui/todo-list/jibb subs-none
544+++ main (program init update view subs)
546++$ model [todos=(list item.todo) draft=@t error=(unit @t)]
551+ [%got todos=(list item.todo)]
552+ [%acked err=(unit @t)]
554+++ init |= ts=(list item.todo)
555+ [todos=ts draft="" error=~]
557+++ update |= [=msg m=model]
560+ ?- (gth (lent (tuba (trip t))) 80)
561+ %.y [m(draft=t error=`"Too long") ~]
562+ %.n [m(draft=t error=~) ~]
563+ %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
564+ [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
565+ [%got ts] [m(todos=ts) ~]
566+ [%acked err] [m(error=err) ~]
571+ column ~[gap+%s2] ~[
573+ each (turn todos.m row-of)
575+ el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
576+ button "Add" %submit
577+ el ~[tone+%danger] (text (fall error.m ""))
579+++ row-of |= t=item.todo
580+ [id.t (toggle done.t text.t [%toggled id.t])]
581+#### /ui/todo-list/jibb sixth-msg
584+++ main (program init update view subs)
586++$ model [todos=(list item.todo) draft=@t error=(unit @t)]
591+ [%got todos=(list item.todo)]
592+ [%acked err=(unit @t)]
595+++ init |= ts=(list item.todo)
596+ [todos=ts draft="" error=~]
598+++ update |= [=msg m=model]
601+ ?- (gth (lent (tuba (trip t))) 80)
602+ %.y [m(draft=t error=`"Too long") ~]
603+ %.n [m(draft=t error=~) ~]
604+ %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
605+ [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
606+ [%got ts] [m(todos=ts) ~]
607+ [%acked err] [m(error=err) ~]
608+ %clear [m(todos=~) ~]
611+ ~[[%watch (todos.todo |=%got)]]
614+ column ~[gap+%s2] ~[
616+ each (turn todos.m row-of)
618+ el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
619+ button "Add" %submit
620+ el ~[tone+%danger] (text (fall error.m ""))
622+++ row-of |= t=item.todo
623+ [id.t (toggle done.t text.t [%toggled id.t])]
624+#### /ui/todo-list/jibb sixth-msg-button
627+++ main (program init update view subs)
629++$ model [todos=(list item.todo) draft=@t error=(unit @t)]
634+ [%got todos=(list item.todo)]
635+ [%acked err=(unit @t)]
638+++ init |= ts=(list item.todo)
639+ [todos=ts draft="" error=~]
641+++ update |= [=msg m=model]
644+ ?- (gth (lent (tuba (trip t))) 80)
645+ %.y [m(draft=t error=`"Too long") ~]
646+ %.n [m(draft=t error=~) ~]
647+ %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
648+ [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
649+ [%got ts] [m(todos=ts) ~]
650+ [%acked err] [m(error=err) ~]
651+ %clear [m(todos=~) ~]
654+ ~[[%watch (todos.todo |=%got)]]
657+ column ~[gap+%s2] ~[
659+ each (turn todos.m row-of)
661+ el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
662+ button "Add" %submit
663+ button "Clear" %clear
664+ el ~[tone+%danger] (text (fall error.m ""))
666+++ row-of |= t=item.todo
667+ [id.t (toggle done.t text.t [%toggled id.t])]
668+#### /ui/todo-list/jibb view-helper-title
671+++ main (program init update view subs)
673++$ model [todos=(list item.todo) draft=@t error=(unit @t)]
678+ [%got todos=(list item.todo)]
679+ [%acked err=(unit @t)]
681+++ init |= ts=(list item.todo)
682+ [todos=ts draft="" error=~]
684+++ update |= [=msg m=model]
687+ ?- (gth (lent (tuba (trip t))) 80)
688+ %.y [m(draft=t error=`"Too long") ~]
689+ %.n [m(draft=t error=~) ~]
690+ %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
691+ [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
692+ [%got ts] [m(todos=ts) ~]
693+ [%acked err] [m(error=err) ~]
696+ ~[[%watch (todos.todo |=%got)]]
699+ column ~[gap+%s2] ~[
701+ each (turn todos.m row-of)
703+ el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
704+ button "Add" %submit
705+ el ~[tone+%danger] (text (fall error.m ""))
707+++ row-of |= t=item.todo
708+ [id.t (toggle done.t text.t [%toggled id.t])]
712+#### /ui/todo-list/jibb view-helper-error
715+++ main (program init update view subs)
717++$ model [todos=(list item.todo) draft=@t error=(unit @t)]
722+ [%got todos=(list item.todo)]
723+ [%acked err=(unit @t)]
725+++ init |= ts=(list item.todo)
726+ [todos=ts draft="" error=~]
728+++ update |= [=msg m=model]
731+ ?- (gth (lent (tuba (trip t))) 80)
732+ %.y [m(draft=t error=`"Too long") ~]
733+ %.n [m(draft=t error=~) ~]
734+ %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
735+ [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
736+ [%got ts] [m(todos=ts) ~]
737+ [%acked err] [m(error=err) ~]
740+ ~[[%watch (todos.todo |=%got)]]
743+ column ~[gap+%s2] ~[
745+ each (turn todos.m row-of)
747+ el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
748+ button "Add" %submit
751+++ row-of |= t=item.todo
752+ [id.t (toggle done.t text.t [%toggled id.t])]
754+++ error-line |= m=model
755+ el ~[tone+%danger] (text (fall error.m ""))
756+#### /ui/todo-list/jibb inline-row-of
759+++ main (program init update view subs)
761++$ model [todos=(list item.todo) draft=@t error=(unit @t)]
766+ [%got todos=(list item.todo)]
767+ [%acked err=(unit @t)]
769+++ init |= ts=(list item.todo)
770+ [todos=ts draft="" error=~]
772+++ update |= [=msg m=model]
775+ ?- (gth (lent (tuba (trip t))) 80)
776+ %.y [m(draft=t error=`"Too long") ~]
777+ %.n [m(draft=t error=~) ~]
778+ %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
779+ [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
780+ [%got ts] [m(todos=ts) ~]
781+ [%acked err] [m(error=err) ~]
784+ ~[[%watch (todos.todo |=%got)]]
787+ column ~[gap+%s2] ~[
789+ each (turn todos.m |=(t=item.todo [id.t (toggle done.t text.t [%toggled id.t])]))
791+ el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
792+ button "Add" %submit
793+ el ~[tone+%danger] (text (fall error.m ""))
794+#### /ui/todo-list/jibb view-local-rows
797+++ main (program init update view subs)
799++$ model [todos=(list item.todo) draft=@t error=(unit @t)]
804+ [%got todos=(list item.todo)]
805+ [%acked err=(unit @t)]
807+++ init |= ts=(list item.todo)
808+ [todos=ts draft="" error=~]
810+++ update |= [=msg m=model]
813+ ?- (gth (lent (tuba (trip t))) 80)
814+ %.y [m(draft=t error=`"Too long") ~]
815+ %.n [m(draft=t error=~) ~]
816+ %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
817+ [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
818+ [%got ts] [m(todos=ts) ~]
819+ [%acked err] [m(error=err) ~]
822+ ~[[%watch (todos.todo |=%got)]]
825+ ++ rows (turn todos.m row-of)
826+ column ~[gap+%s2] ~[
830+ el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
831+ button "Add" %submit
832+ el ~[tone+%danger] (text (fall error.m ""))
834+++ row-of |= t=item.todo
835+ [id.t (toggle done.t text.t [%toggled id.t])]
836+#### /ui/todo-list/jibb drop-each
839+++ main (program init update view subs)
841++$ model [todos=(list item.todo) draft=@t error=(unit @t)]
846+ [%got todos=(list item.todo)]
847+ [%acked err=(unit @t)]
849+++ init |= ts=(list item.todo)
850+ [todos=ts draft="" error=~]
852+++ update |= [=msg m=model]
855+ ?- (gth (lent (tuba (trip t))) 80)
856+ %.y [m(draft=t error=`"Too long") ~]
857+ %.n [m(draft=t error=~) ~]
858+ %submit [m(draft="") ~[(poke.todo [%add draft.m] |=%acked)]]
859+ [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
860+ [%got ts] [m(todos=ts) ~]
861+ [%acked err] [m(error=err) ~]
864+ ~[[%watch (todos.todo |=%got)]]
867+ column ~[gap+%s2] ~[
870+ el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
871+ button "Add" %submit
872+ el ~[tone+%danger] (text (fall error.m ""))
874+++ row-of |= t=item.todo
875+ [id.t (toggle done.t text.t [%toggled id.t])]
876+#### /ui/todo-list/jibb update-helper-cmd
879+++ main (program init update view subs)
881++$ model [todos=(list item.todo) draft=@t error=(unit @t)]
886+ [%got todos=(list item.todo)]
887+ [%acked err=(unit @t)]
889+++ init |= ts=(list item.todo)
890+ [todos=ts draft="" error=~]
892+++ update |= [=msg m=model]
895+ ?- (gth (lent (tuba (trip t))) 80)
896+ %.y [m(draft=t error=`"Too long") ~]
897+ %.n [m(draft=t error=~) ~]
898+ %submit [m(draft="") ~[(add-cmd draft.m)]]
899+ [%toggled id] [m ~[(poke.todo [%toggle id] |=%acked)]]
900+ [%got ts] [m(todos=ts) ~]
901+ [%acked err] [m(error=err) ~]
904+ ~[[%watch (todos.todo |=%got)]]
907+ column ~[gap+%s2] ~[
909+ each (turn todos.m row-of)
911+ el ~[width+[%fill 1]] (field "New todo" draft.m |=%typed)
912+ button "Add" %submit
913+ el ~[tone+%danger] (text (fall error.m ""))
915+++ row-of |= t=item.todo
916+ [id.t (toggle done.t text.t [%toggled id.t])]
919+ (poke.todo [%add d] |=%acked)