@almadar/std 16.228.0 → 16.230.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/behaviors/behaviors-registry.json +97602 -98073
  2. package/behaviors/lolo/infra/atoms/std-notify-on-event.lolo +2 -2
  3. package/behaviors/lolo/ui/core/atoms/std-book-reader.lolo +316 -0
  4. package/behaviors/lolo/ui/core/atoms/std-card-grid.lolo +172 -0
  5. package/behaviors/lolo/ui/core/atoms/std-hero.lolo +247 -0
  6. package/behaviors/lolo/ui/core/atoms/std-media-section.lolo +154 -0
  7. package/behaviors/lolo/ui/core/atoms/std-pricing.lolo +177 -0
  8. package/behaviors/lolo/ui/core/atoms/std-prose.lolo +85 -0
  9. package/behaviors/lolo/ui/core/atoms/std-site-footer.lolo +159 -0
  10. package/behaviors/lolo/ui/core/atoms/std-site-header.lolo +131 -0
  11. package/behaviors/lolo/ui/core/atoms/std-stat-band.lolo +83 -0
  12. package/behaviors/lolo/ui/core/atoms/std-stats.lolo +4 -5
  13. package/behaviors/lolo/ui/core/atoms/std-steps.lolo +124 -0
  14. package/behaviors/lolo/ui/core/atoms/ui-box.lolo +5 -0
  15. package/behaviors/lolo/ui/core/atoms/ui-button.lolo +6 -1
  16. package/behaviors/lolo/ui/core/atoms/ui-image.lolo +64 -0
  17. package/behaviors/lolo/ui/{marketing/atoms → core/molecules}/ui-animated-counter.lolo +11 -6
  18. package/behaviors/lolo/ui/core/organisms/ui-chat-bar.lolo +5 -0
  19. package/behaviors/lolo/ui/game/atoms/ui-canvas-2d.lolo +1 -1
  20. package/behaviors/lolo-behavior-contracts.json +1 -1
  21. package/behaviors/registry/factory-signatures.json +1 -1
  22. package/behaviors/registry/infra/atoms/std-notify-on-event.orb +45 -9
  23. package/behaviors/registry/ui/core/atoms/std-book-reader.orb +1269 -0
  24. package/behaviors/registry/ui/core/atoms/std-card-grid.orb +826 -0
  25. package/behaviors/registry/ui/core/atoms/std-hero.orb +811 -0
  26. package/behaviors/registry/ui/core/atoms/std-media-section.orb +740 -0
  27. package/behaviors/registry/ui/core/atoms/std-pricing.orb +751 -0
  28. package/behaviors/registry/ui/core/atoms/std-prose.orb +264 -0
  29. package/behaviors/registry/ui/core/atoms/std-site-footer.orb +589 -0
  30. package/behaviors/registry/ui/core/atoms/std-site-header.orb +530 -0
  31. package/behaviors/registry/ui/core/atoms/std-stat-band.orb +311 -0
  32. package/behaviors/registry/ui/core/atoms/std-stats.orb +4 -5
  33. package/behaviors/registry/ui/core/atoms/std-steps.orb +532 -0
  34. package/behaviors/registry/ui/{marketing → core}/atoms/ui-animated-graphic.orb +20 -20
  35. package/behaviors/registry/ui/{marketing → core}/atoms/ui-animated-reveal.orb +20 -20
  36. package/behaviors/registry/ui/core/atoms/ui-box.orb +7 -0
  37. package/behaviors/registry/ui/core/atoms/ui-button.orb +9 -1
  38. package/behaviors/registry/ui/core/atoms/ui-image.orb +231 -0
  39. package/behaviors/registry/ui/{marketing → core}/atoms/ui-pattern-tile.orb +20 -20
  40. package/behaviors/registry/ui/{marketing/atoms → core/molecules}/ui-animated-counter.orb +33 -26
  41. package/behaviors/registry/ui/{marketing/atoms → core/molecules}/ui-feature-card.orb +20 -20
  42. package/behaviors/registry/ui/{marketing/atoms → core/molecules}/ui-geometric-pattern.orb +20 -20
  43. package/behaviors/registry/ui/core/organisms/ui-chat-bar.orb +7 -0
  44. package/behaviors/registry/ui/{marketing → core}/templates/ui-auth-layout.orb +20 -20
  45. package/behaviors/registry/ui/game/atoms/ui-canvas-2d.orb +1 -1
  46. package/behaviors/signatures.lolo +1070 -2984
  47. package/canonical-operators.json +3 -3
  48. package/dist/behaviors/exports-reader.js +3818 -10339
  49. package/dist/behaviors/functions/index.d.ts +3965 -6984
  50. package/dist/behaviors/functions/index.js +3786 -10195
  51. package/dist/behaviors/index.d.ts +1 -1
  52. package/dist/behaviors/index.js +3819 -10340
  53. package/dist/behaviors/query.js +3818 -10339
  54. package/dist/behaviors-embeddings.hash.json +3 -3
  55. package/dist/behaviors-embeddings.json +77 -237
  56. package/dist/behaviors-registry.json +97602 -98073
  57. package/dist/index.d.ts +1 -1
  58. package/dist/index.js +3821 -10342
  59. package/dist/knob-embeddings.hash.json +3 -3
  60. package/dist/knob-embeddings.json +352 -1212
  61. package/dist/modules/core.js +2 -2
  62. package/dist/modules/index.js +2 -2
  63. package/dist/registry/factory-signatures.json +1 -1
  64. package/dist/registry.js +2 -2
  65. package/i18n/ar.json +8 -4
  66. package/i18n/en.json +4 -0
  67. package/i18n/sl.json +8 -4
  68. package/package.json +4 -6
  69. package/behaviors/lolo/ui/marketing/atoms/std-marketing-article.lolo +0 -31
  70. package/behaviors/lolo/ui/marketing/atoms/std-marketing-cta.lolo +0 -93
  71. package/behaviors/lolo/ui/marketing/atoms/std-marketing-features.lolo +0 -83
  72. package/behaviors/lolo/ui/marketing/atoms/std-marketing-footer.lolo +0 -72
  73. package/behaviors/lolo/ui/marketing/atoms/std-marketing-hero.lolo +0 -131
  74. package/behaviors/lolo/ui/marketing/atoms/std-marketing-nav.lolo +0 -86
  75. package/behaviors/lolo/ui/marketing/atoms/std-marketing-pricing.lolo +0 -85
  76. package/behaviors/lolo/ui/marketing/atoms/std-marketing-showcase.lolo +0 -87
  77. package/behaviors/lolo/ui/marketing/atoms/std-marketing-split.lolo +0 -50
  78. package/behaviors/lolo/ui/marketing/atoms/std-marketing-stats.lolo +0 -43
  79. package/behaviors/lolo/ui/marketing/atoms/std-marketing-steps.lolo +0 -48
  80. package/behaviors/lolo/ui/marketing/atoms/std-marketing-team.lolo +0 -51
  81. package/behaviors/lolo/ui/marketing/atoms/ui-article-section.lolo +0 -44
  82. package/behaviors/lolo/ui/marketing/atoms/ui-case-study-card.lolo +0 -60
  83. package/behaviors/lolo/ui/marketing/atoms/ui-community-links.lolo +0 -67
  84. package/behaviors/lolo/ui/marketing/atoms/ui-content-section.lolo +0 -44
  85. package/behaviors/lolo/ui/marketing/atoms/ui-cta-banner.lolo +0 -68
  86. package/behaviors/lolo/ui/marketing/atoms/ui-hero-section.lolo +0 -112
  87. package/behaviors/lolo/ui/marketing/atoms/ui-install-box.lolo +0 -39
  88. package/behaviors/lolo/ui/marketing/atoms/ui-marketing-footer.lolo +0 -58
  89. package/behaviors/lolo/ui/marketing/atoms/ui-marketing-stat-card.lolo +0 -45
  90. package/behaviors/lolo/ui/marketing/atoms/ui-pricing-card.lolo +0 -70
  91. package/behaviors/lolo/ui/marketing/atoms/ui-pricing-grid.lolo +0 -49
  92. package/behaviors/lolo/ui/marketing/atoms/ui-pull-quote.lolo +0 -34
  93. package/behaviors/lolo/ui/marketing/atoms/ui-service-catalog.lolo +0 -40
  94. package/behaviors/lolo/ui/marketing/atoms/ui-showcase-card.lolo +0 -64
  95. package/behaviors/lolo/ui/marketing/atoms/ui-split-section.lolo +0 -69
  96. package/behaviors/lolo/ui/marketing/atoms/ui-stats-grid.lolo +0 -44
  97. package/behaviors/lolo/ui/marketing/atoms/ui-step-flow.lolo +0 -51
  98. package/behaviors/lolo/ui/marketing/atoms/ui-tag-cloud.lolo +0 -45
  99. package/behaviors/lolo/ui/marketing/atoms/ui-team-card.lolo +0 -54
  100. package/behaviors/lolo/ui/marketing/organisms/ui-book-chapter-view.lolo +0 -63
  101. package/behaviors/lolo/ui/marketing/organisms/ui-book-cover-page.lolo +0 -54
  102. package/behaviors/lolo/ui/marketing/organisms/ui-book-nav-bar.lolo +0 -49
  103. package/behaviors/lolo/ui/marketing/organisms/ui-book-table-of-contents.lolo +0 -70
  104. package/behaviors/lolo/ui/marketing/organisms/ui-book-viewer.lolo +0 -161
  105. package/behaviors/lolo/ui/marketing/organisms/ui-case-study-organism.lolo +0 -153
  106. package/behaviors/lolo/ui/marketing/organisms/ui-feature-grid-organism.lolo +0 -159
  107. package/behaviors/lolo/ui/marketing/organisms/ui-hero-organism.lolo +0 -162
  108. package/behaviors/lolo/ui/marketing/organisms/ui-pricing-organism.lolo +0 -155
  109. package/behaviors/lolo/ui/marketing/organisms/ui-showcase-organism.lolo +0 -164
  110. package/behaviors/lolo/ui/marketing/organisms/ui-stats-organism.lolo +0 -142
  111. package/behaviors/lolo/ui/marketing/organisms/ui-step-flow-organism.lolo +0 -165
  112. package/behaviors/lolo/ui/marketing/organisms/ui-team-organism.lolo +0 -152
  113. package/behaviors/lolo/ui/marketing/templates/ui-about-page-template.lolo +0 -105
  114. package/behaviors/lolo/ui/marketing/templates/ui-feature-detail-page-template.lolo +0 -93
  115. package/behaviors/lolo/ui/marketing/templates/ui-landing-page-template.lolo +0 -144
  116. package/behaviors/lolo/ui/marketing/templates/ui-pricing-page-template.lolo +0 -89
  117. package/behaviors/registry/ui/marketing/atoms/std-marketing-article.orb +0 -121
  118. package/behaviors/registry/ui/marketing/atoms/std-marketing-cta.orb +0 -360
  119. package/behaviors/registry/ui/marketing/atoms/std-marketing-features.orb +0 -305
  120. package/behaviors/registry/ui/marketing/atoms/std-marketing-footer.orb +0 -265
  121. package/behaviors/registry/ui/marketing/atoms/std-marketing-hero.orb +0 -424
  122. package/behaviors/registry/ui/marketing/atoms/std-marketing-nav.orb +0 -288
  123. package/behaviors/registry/ui/marketing/atoms/std-marketing-pricing.orb +0 -366
  124. package/behaviors/registry/ui/marketing/atoms/std-marketing-showcase.orb +0 -415
  125. package/behaviors/registry/ui/marketing/atoms/std-marketing-split.orb +0 -152
  126. package/behaviors/registry/ui/marketing/atoms/std-marketing-stats.orb +0 -151
  127. package/behaviors/registry/ui/marketing/atoms/std-marketing-steps.orb +0 -221
  128. package/behaviors/registry/ui/marketing/atoms/std-marketing-team.orb +0 -239
  129. package/behaviors/registry/ui/marketing/atoms/ui-article-section.orb +0 -176
  130. package/behaviors/registry/ui/marketing/atoms/ui-case-study-card.orb +0 -195
  131. package/behaviors/registry/ui/marketing/atoms/ui-community-links.orb +0 -254
  132. package/behaviors/registry/ui/marketing/atoms/ui-content-section.orb +0 -182
  133. package/behaviors/registry/ui/marketing/atoms/ui-cta-banner.orb +0 -254
  134. package/behaviors/registry/ui/marketing/atoms/ui-hero-section.orb +0 -345
  135. package/behaviors/registry/ui/marketing/atoms/ui-install-box.orb +0 -163
  136. package/behaviors/registry/ui/marketing/atoms/ui-marketing-footer.orb +0 -298
  137. package/behaviors/registry/ui/marketing/atoms/ui-marketing-stat-card.orb +0 -177
  138. package/behaviors/registry/ui/marketing/atoms/ui-pricing-card.orb +0 -237
  139. package/behaviors/registry/ui/marketing/atoms/ui-pricing-grid.orb +0 -313
  140. package/behaviors/registry/ui/marketing/atoms/ui-pull-quote.orb +0 -156
  141. package/behaviors/registry/ui/marketing/atoms/ui-service-catalog.orb +0 -205
  142. package/behaviors/registry/ui/marketing/atoms/ui-showcase-card.orb +0 -221
  143. package/behaviors/registry/ui/marketing/atoms/ui-split-section.orb +0 -239
  144. package/behaviors/registry/ui/marketing/atoms/ui-stats-grid.orb +0 -202
  145. package/behaviors/registry/ui/marketing/atoms/ui-step-flow.orb +0 -236
  146. package/behaviors/registry/ui/marketing/atoms/ui-tag-cloud.orb +0 -217
  147. package/behaviors/registry/ui/marketing/atoms/ui-team-card.orb +0 -186
  148. package/behaviors/registry/ui/marketing/organisms/ui-book-chapter-view.orb +0 -277
  149. package/behaviors/registry/ui/marketing/organisms/ui-book-cover-page.orb +0 -190
  150. package/behaviors/registry/ui/marketing/organisms/ui-book-nav-bar.orb +0 -183
  151. package/behaviors/registry/ui/marketing/organisms/ui-book-table-of-contents.orb +0 -286
  152. package/behaviors/registry/ui/marketing/organisms/ui-book-viewer.orb +0 -553
  153. package/behaviors/registry/ui/marketing/organisms/ui-case-study-organism.orb +0 -507
  154. package/behaviors/registry/ui/marketing/organisms/ui-feature-grid-organism.orb +0 -504
  155. package/behaviors/registry/ui/marketing/organisms/ui-hero-organism.orb +0 -635
  156. package/behaviors/registry/ui/marketing/organisms/ui-pricing-organism.orb +0 -539
  157. package/behaviors/registry/ui/marketing/organisms/ui-showcase-organism.orb +0 -542
  158. package/behaviors/registry/ui/marketing/organisms/ui-stats-organism.orb +0 -447
  159. package/behaviors/registry/ui/marketing/organisms/ui-step-flow-organism.orb +0 -505
  160. package/behaviors/registry/ui/marketing/organisms/ui-team-organism.orb +0 -494
  161. package/behaviors/registry/ui/marketing/templates/ui-about-page-template.orb +0 -752
  162. package/behaviors/registry/ui/marketing/templates/ui-feature-detail-page-template.orb +0 -638
  163. package/behaviors/registry/ui/marketing/templates/ui-landing-page-template.orb +0 -1028
  164. package/behaviors/registry/ui/marketing/templates/ui-pricing-page-template.orb +0 -603
  165. /package/behaviors/lolo/ui/{marketing → core}/atoms/ui-animated-graphic.lolo +0 -0
  166. /package/behaviors/lolo/ui/{marketing → core}/atoms/ui-animated-reveal.lolo +0 -0
  167. /package/behaviors/lolo/ui/{marketing → core}/atoms/ui-pattern-tile.lolo +0 -0
  168. /package/behaviors/lolo/ui/{marketing/atoms → core/molecules}/ui-feature-card.lolo +0 -0
  169. /package/behaviors/lolo/ui/{marketing/atoms → core/molecules}/ui-geometric-pattern.lolo +0 -0
  170. /package/behaviors/lolo/ui/{marketing → core}/templates/ui-auth-layout.lolo +0 -0
@@ -0,0 +1,1269 @@
1
+ {
2
+ "description": "std-book-reader — reads a multi-chapter book one chapter at a time. Opens on a cover (cover image, title, subtitle, author, a start button and the table of contents); reading shows a contents rail with the current chapter marked, the chapter title and progress, the chapter text (markdown) and previous/next buttons. Supports right-to-left books. Emits CHAPTER_OPENED on every chapter change. Pick for handbooks, manifestos, course readers and long-form guides.",
3
+ "ledger": {
4
+ "entries": {
5
+ "ent_01M3B9EHG2VZZ5YT90M5M37VQC": {
6
+ "bakedName": "BookReaderView",
7
+ "curName": "BookReaderView",
8
+ "id": "ent_01M3B9EHG2VZZ5YT90M5M37VQC",
9
+ "kind": "entity",
10
+ "owner": "workspace",
11
+ "renames": []
12
+ },
13
+ "evt_01M3B9EHG27GQBR87HFQDZQMYJ": {
14
+ "bakedName": "START_READING",
15
+ "curName": "START_READING",
16
+ "id": "evt_01M3B9EHG27GQBR87HFQDZQMYJ",
17
+ "kind": "event",
18
+ "owner": "workspace",
19
+ "parent": "trt_01M3B9EHG2NGP2RVNXSB2ZYXQH",
20
+ "renames": []
21
+ },
22
+ "evt_01M3B9EHG28V4GG799SEAJCVFJ": {
23
+ "bakedName": "BACK_TO_COVER",
24
+ "curName": "BACK_TO_COVER",
25
+ "id": "evt_01M3B9EHG28V4GG799SEAJCVFJ",
26
+ "kind": "event",
27
+ "owner": "workspace",
28
+ "parent": "trt_01M3B9EHG2NGP2RVNXSB2ZYXQH",
29
+ "renames": []
30
+ },
31
+ "evt_01M3B9EHG2AFZ6QJRB2GTYAZ2H": {
32
+ "bakedName": "NEXT_CHAPTER",
33
+ "curName": "NEXT_CHAPTER",
34
+ "id": "evt_01M3B9EHG2AFZ6QJRB2GTYAZ2H",
35
+ "kind": "event",
36
+ "owner": "workspace",
37
+ "parent": "trt_01M3B9EHG2NGP2RVNXSB2ZYXQH",
38
+ "renames": []
39
+ },
40
+ "evt_01M3B9EHG2AHYVJ47RZW3B40HK": {
41
+ "bakedName": "CHAPTER_OPENED",
42
+ "curName": "CHAPTER_OPENED",
43
+ "id": "evt_01M3B9EHG2AHYVJ47RZW3B40HK",
44
+ "kind": "event",
45
+ "owner": "workspace",
46
+ "parent": "trt_01M3B9EHG2NGP2RVNXSB2ZYXQH",
47
+ "renames": []
48
+ },
49
+ "evt_01M3B9EHG2JYGWZ0NEKDDJ06CR": {
50
+ "bakedName": "INIT",
51
+ "curName": "INIT",
52
+ "id": "evt_01M3B9EHG2JYGWZ0NEKDDJ06CR",
53
+ "kind": "event",
54
+ "owner": "workspace",
55
+ "parent": "trt_01M3B9EHG2NGP2RVNXSB2ZYXQH",
56
+ "renames": []
57
+ },
58
+ "evt_01M3B9EHG2Y1XCZAT8KX11T5PQ": {
59
+ "bakedName": "OPEN_CHAPTER",
60
+ "curName": "OPEN_CHAPTER",
61
+ "id": "evt_01M3B9EHG2Y1XCZAT8KX11T5PQ",
62
+ "kind": "event",
63
+ "owner": "workspace",
64
+ "parent": "trt_01M3B9EHG2NGP2RVNXSB2ZYXQH",
65
+ "renames": []
66
+ },
67
+ "evt_01M3B9EHG2YR3VPKGM882TA46D": {
68
+ "bakedName": "PREV_CHAPTER",
69
+ "curName": "PREV_CHAPTER",
70
+ "id": "evt_01M3B9EHG2YR3VPKGM882TA46D",
71
+ "kind": "event",
72
+ "owner": "workspace",
73
+ "parent": "trt_01M3B9EHG2NGP2RVNXSB2ZYXQH",
74
+ "renames": []
75
+ },
76
+ "orb_01M3B9EHG2NCKE94SQHZV2AG8D": {
77
+ "bakedName": "BookReaderOrbital",
78
+ "curName": "BookReaderOrbital",
79
+ "id": "orb_01M3B9EHG2NCKE94SQHZV2AG8D",
80
+ "kind": "orbital",
81
+ "owner": "workspace",
82
+ "renames": []
83
+ },
84
+ "pag_01M3B9EHG2WJXJ5W1QFDBVWB26": {
85
+ "bakedName": "BookReaderPage",
86
+ "curName": "BookReaderPage",
87
+ "id": "pag_01M3B9EHG2WJXJ5W1QFDBVWB26",
88
+ "kind": "page",
89
+ "owner": "workspace",
90
+ "renames": []
91
+ },
92
+ "trt_01M3B9EHG2NGP2RVNXSB2ZYXQH": {
93
+ "bakedName": "BookReaderRead",
94
+ "curName": "BookReaderRead",
95
+ "id": "trt_01M3B9EHG2NGP2RVNXSB2ZYXQH",
96
+ "kind": "trait",
97
+ "owner": "workspace",
98
+ "renames": []
99
+ }
100
+ },
101
+ "schemaVersion": 1
102
+ },
103
+ "name": "std-book-reader",
104
+ "orbitals": [
105
+ {
106
+ "entity": {
107
+ "fields": [
108
+ {
109
+ "name": "id",
110
+ "required": true,
111
+ "type": "string"
112
+ },
113
+ {
114
+ "default": 0.0,
115
+ "name": "chapterIndex",
116
+ "type": "number"
117
+ },
118
+ {
119
+ "default": "",
120
+ "name": "chapterTitle",
121
+ "type": "string"
122
+ },
123
+ {
124
+ "default": "",
125
+ "name": "chapterContent",
126
+ "type": "string"
127
+ },
128
+ {
129
+ "default": "",
130
+ "name": "progressLabel",
131
+ "type": "string"
132
+ },
133
+ {
134
+ "default": true,
135
+ "name": "isFirst",
136
+ "type": "boolean"
137
+ },
138
+ {
139
+ "default": false,
140
+ "name": "isLast",
141
+ "type": "boolean"
142
+ }
143
+ ],
144
+ "id": "ent_01M3B9EHG2VZZ5YT90M5M37VQC",
145
+ "name": "BookReaderView",
146
+ "persistence": "runtime"
147
+ },
148
+ "id": "orb_01M3B9EHG2NCKE94SQHZV2AG8D",
149
+ "name": "BookReaderOrbital",
150
+ "pages": [
151
+ {
152
+ "id": "pag_01M3B9EHG2WJXJ5W1QFDBVWB26",
153
+ "name": "BookReaderPage",
154
+ "path": "/book",
155
+ "traits": [
156
+ {
157
+ "ref": "BookReaderRead",
158
+ "refId": "trt_01M3B9EHG2NGP2RVNXSB2ZYXQH"
159
+ }
160
+ ]
161
+ }
162
+ ],
163
+ "traits": [
164
+ {
165
+ "category": "interaction",
166
+ "config": {
167
+ "author": {
168
+ "default": "",
169
+ "label": "Author",
170
+ "tier": "presentation",
171
+ "type": "string"
172
+ },
173
+ "chapters": {
174
+ "default": [
175
+ {
176
+ "content": "The first chapter's text, in **markdown**.",
177
+ "title": "Chapter one"
178
+ },
179
+ {
180
+ "content": "The second chapter's text.",
181
+ "title": "Chapter two"
182
+ }
183
+ ],
184
+ "description": "Ordered chapters: a title and markdown content each",
185
+ "items": {
186
+ "properties": {
187
+ "content": {
188
+ "name": "content",
189
+ "required": true,
190
+ "type": "string"
191
+ },
192
+ "title": {
193
+ "name": "title",
194
+ "required": true,
195
+ "type": "string"
196
+ }
197
+ },
198
+ "type": "object"
199
+ },
200
+ "label": "Chapters",
201
+ "synonyms": "sections, parts, pages, table of contents",
202
+ "tier": "presentation",
203
+ "type": "[BookChapter]"
204
+ },
205
+ "contentsLabel": {
206
+ "default": "Contents",
207
+ "label": "Contents heading",
208
+ "tier": "presentation",
209
+ "type": "string"
210
+ },
211
+ "coverContent": {
212
+ "default": {
213
+ "children": [
214
+ {
215
+ "children": [
216
+ {
217
+ "children": [
218
+ {
219
+ "align": "center",
220
+ "children": [
221
+ {
222
+ "alt": "@config.title",
223
+ "bordered": true,
224
+ "className": "max-w-xs",
225
+ "loading": "eager",
226
+ "rounded": "lg",
227
+ "src": "@config.coverImage",
228
+ "type": "image"
229
+ },
230
+ {
231
+ "align": "center",
232
+ "className": "tracking-tight text-balance",
233
+ "content": "@config.title",
234
+ "type": "typography",
235
+ "variant": "h1",
236
+ "weight": "bold"
237
+ },
238
+ {
239
+ "align": "center",
240
+ "className": [
241
+ "if",
242
+ [
243
+ "==",
244
+ "@config.subtitle",
245
+ ""
246
+ ],
247
+ "hidden",
248
+ "text-pretty"
249
+ ],
250
+ "color": "muted",
251
+ "content": "@config.subtitle",
252
+ "type": "typography",
253
+ "variant": "large"
254
+ },
255
+ {
256
+ "align": "center",
257
+ "className": [
258
+ "if",
259
+ [
260
+ "==",
261
+ "@config.author",
262
+ ""
263
+ ],
264
+ "hidden",
265
+ ""
266
+ ],
267
+ "color": "muted",
268
+ "content": "@config.author",
269
+ "type": "typography",
270
+ "variant": "label"
271
+ },
272
+ {
273
+ "action": "START_READING",
274
+ "className": [
275
+ "if",
276
+ [
277
+ "==",
278
+ [
279
+ "array/len",
280
+ "@config.chapters"
281
+ ],
282
+ 0.0
283
+ ],
284
+ "hidden",
285
+ ""
286
+ ],
287
+ "label": "@config.startLabel",
288
+ "size": "lg",
289
+ "type": "button",
290
+ "variant": "primary"
291
+ }
292
+ ],
293
+ "direction": "vertical",
294
+ "gap": "md",
295
+ "type": "stack"
296
+ },
297
+ {
298
+ "children": [
299
+ {
300
+ "content": "@config.contentsLabel",
301
+ "type": "typography",
302
+ "variant": "label",
303
+ "weight": "semibold"
304
+ },
305
+ {
306
+ "align": "start",
307
+ "children": [
308
+ "array/map",
309
+ "@config.chapters",
310
+ [
311
+ "fn",
312
+ "chapter",
313
+ {
314
+ "action": "OPEN_CHAPTER",
315
+ "actionPayload": {
316
+ "index": "@index"
317
+ },
318
+ "label": [
319
+ "str/concat",
320
+ [
321
+ "+",
322
+ "@index",
323
+ 1.0
324
+ ],
325
+ ". ",
326
+ [
327
+ "object/get",
328
+ "@chapter",
329
+ "title",
330
+ ""
331
+ ]
332
+ ],
333
+ "type": "button",
334
+ "variant": "link"
335
+ }
336
+ ]
337
+ ],
338
+ "direction": "vertical",
339
+ "gap": "none",
340
+ "type": "stack"
341
+ }
342
+ ],
343
+ "className": [
344
+ "if",
345
+ [
346
+ "==",
347
+ [
348
+ "array/len",
349
+ "@config.chapters"
350
+ ],
351
+ 0.0
352
+ ],
353
+ "hidden",
354
+ ""
355
+ ],
356
+ "direction": "vertical",
357
+ "gap": "xs",
358
+ "type": "stack"
359
+ }
360
+ ],
361
+ "direction": "vertical",
362
+ "gap": "xl",
363
+ "type": "stack"
364
+ }
365
+ ],
366
+ "maxWidth": "md",
367
+ "padding": "lg",
368
+ "size": "md",
369
+ "type": "container"
370
+ }
371
+ ],
372
+ "dir": "@config.direction",
373
+ "fullWidth": true,
374
+ "paddingY": "2xl",
375
+ "type": "box"
376
+ },
377
+ "label": "Cover body",
378
+ "tier": "internal",
379
+ "type": "render-ui"
380
+ },
381
+ "coverImage": {
382
+ "default": "",
383
+ "description": "Cover image URL; empty hides it",
384
+ "label": "Cover image",
385
+ "tier": "presentation",
386
+ "type": "string"
387
+ },
388
+ "coverLabel": {
389
+ "default": "Cover",
390
+ "label": "Back-to-cover label",
391
+ "tier": "presentation",
392
+ "type": "string"
393
+ },
394
+ "direction": {
395
+ "default": "ltr",
396
+ "description": "rtl for Arabic, Hebrew and other right-to-left books",
397
+ "label": "Text direction",
398
+ "synonyms": "right to left, arabic book",
399
+ "tier": "presentation",
400
+ "type": "string",
401
+ "values": [
402
+ "ltr",
403
+ "rtl"
404
+ ]
405
+ },
406
+ "nextLabel": {
407
+ "default": "Next",
408
+ "label": "Next button label",
409
+ "tier": "presentation",
410
+ "type": "string"
411
+ },
412
+ "previousLabel": {
413
+ "default": "Previous",
414
+ "label": "Previous button label",
415
+ "tier": "presentation",
416
+ "type": "string"
417
+ },
418
+ "readingContent": {
419
+ "default": {
420
+ "children": [
421
+ {
422
+ "children": [
423
+ {
424
+ "children": [
425
+ {
426
+ "align": "start",
427
+ "children": [
428
+ {
429
+ "action": "BACK_TO_COVER",
430
+ "label": "@config.coverLabel",
431
+ "leftIcon": "book-open",
432
+ "type": "button",
433
+ "variant": "link"
434
+ },
435
+ {
436
+ "className": "pt-2",
437
+ "content": "@config.contentsLabel",
438
+ "type": "typography",
439
+ "variant": "label",
440
+ "weight": "semibold"
441
+ },
442
+ {
443
+ "align": "start",
444
+ "children": [
445
+ "array/map",
446
+ "@config.chapters",
447
+ [
448
+ "fn",
449
+ "chapter",
450
+ {
451
+ "action": "OPEN_CHAPTER",
452
+ "actionPayload": {
453
+ "index": "@index"
454
+ },
455
+ "className": [
456
+ "if",
457
+ [
458
+ "==",
459
+ "@index",
460
+ "@entity.chapterIndex"
461
+ ],
462
+ "text-foreground font-semibold",
463
+ ""
464
+ ],
465
+ "label": [
466
+ "object/get",
467
+ "@chapter",
468
+ "title",
469
+ ""
470
+ ],
471
+ "type": "button",
472
+ "variant": "link"
473
+ }
474
+ ]
475
+ ],
476
+ "direction": "vertical",
477
+ "gap": "none",
478
+ "type": "stack"
479
+ }
480
+ ],
481
+ "className": "lg:sticky lg:top-6 self-start",
482
+ "direction": "vertical",
483
+ "gap": "xs",
484
+ "type": "stack"
485
+ },
486
+ {
487
+ "children": [
488
+ {
489
+ "color": "muted",
490
+ "content": "@entity.progressLabel",
491
+ "type": "typography",
492
+ "variant": "caption"
493
+ },
494
+ {
495
+ "className": "tracking-tight",
496
+ "content": "@entity.chapterTitle",
497
+ "type": "typography",
498
+ "variant": "h2",
499
+ "weight": "bold"
500
+ },
501
+ {
502
+ "content": "@entity.chapterContent",
503
+ "direction": "@config.direction",
504
+ "type": "markdown-content"
505
+ },
506
+ {
507
+ "type": "divider"
508
+ },
509
+ {
510
+ "children": [
511
+ {
512
+ "action": "PREV_CHAPTER",
513
+ "disabled": "@entity.isFirst",
514
+ "label": "@config.previousLabel",
515
+ "leftIcon": [
516
+ "if",
517
+ [
518
+ "==",
519
+ "@config.direction",
520
+ "rtl"
521
+ ],
522
+ "chevron-right",
523
+ "chevron-left"
524
+ ],
525
+ "type": "button",
526
+ "variant": "secondary"
527
+ },
528
+ {
529
+ "action": "NEXT_CHAPTER",
530
+ "disabled": "@entity.isLast",
531
+ "label": "@config.nextLabel",
532
+ "rightIcon": [
533
+ "if",
534
+ [
535
+ "==",
536
+ "@config.direction",
537
+ "rtl"
538
+ ],
539
+ "chevron-left",
540
+ "chevron-right"
541
+ ],
542
+ "type": "button",
543
+ "variant": "primary"
544
+ }
545
+ ],
546
+ "direction": "horizontal",
547
+ "gap": "md",
548
+ "justify": "between",
549
+ "type": "stack"
550
+ }
551
+ ],
552
+ "direction": "vertical",
553
+ "gap": "lg",
554
+ "type": "stack"
555
+ }
556
+ ],
557
+ "gap": "xl",
558
+ "ratio": "1:3",
559
+ "type": "split"
560
+ }
561
+ ],
562
+ "maxWidth": "xl",
563
+ "padding": "lg",
564
+ "size": "xl",
565
+ "type": "container"
566
+ }
567
+ ],
568
+ "dir": "@config.direction",
569
+ "fullWidth": true,
570
+ "paddingY": "xl",
571
+ "type": "box"
572
+ },
573
+ "label": "Reading body",
574
+ "tier": "internal",
575
+ "type": "render-ui"
576
+ },
577
+ "startLabel": {
578
+ "default": "Start reading",
579
+ "label": "Start button label",
580
+ "tier": "presentation",
581
+ "type": "string"
582
+ },
583
+ "subtitle": {
584
+ "default": "",
585
+ "label": "Subtitle",
586
+ "tier": "presentation",
587
+ "type": "string"
588
+ },
589
+ "title": {
590
+ "default": "Untitled book",
591
+ "label": "Title",
592
+ "tier": "presentation",
593
+ "type": "string"
594
+ }
595
+ },
596
+ "effectRow": [
597
+ {
598
+ "kind": "emit",
599
+ "resource": "CHAPTER_OPENED"
600
+ },
601
+ {
602
+ "kind": "render-ui",
603
+ "resource": "main"
604
+ },
605
+ {
606
+ "kind": "set",
607
+ "resource": "@entity.chapterContent"
608
+ },
609
+ {
610
+ "kind": "set",
611
+ "resource": "@entity.chapterIndex"
612
+ },
613
+ {
614
+ "kind": "set",
615
+ "resource": "@entity.chapterTitle"
616
+ },
617
+ {
618
+ "kind": "set",
619
+ "resource": "@entity.isFirst"
620
+ },
621
+ {
622
+ "kind": "set",
623
+ "resource": "@entity.isLast"
624
+ },
625
+ {
626
+ "kind": "set",
627
+ "resource": "@entity.progressLabel"
628
+ }
629
+ ],
630
+ "emits": [
631
+ {
632
+ "description": "The reader moved to a chapter; carries its index and title.",
633
+ "event": "CHAPTER_OPENED",
634
+ "eventId": "evt_01M3B9EHG2AHYVJ47RZW3B40HK",
635
+ "payloadSchema": [
636
+ {
637
+ "name": "index",
638
+ "type": "number"
639
+ },
640
+ {
641
+ "name": "title",
642
+ "type": "string"
643
+ }
644
+ ],
645
+ "scope": "external",
646
+ "synonyms": "page turned, chapter changed, reading progress",
647
+ "tier": "domain"
648
+ }
649
+ ],
650
+ "entityContract": {
651
+ "provides": [
652
+ "chapterContent",
653
+ "chapterIndex",
654
+ "chapterTitle",
655
+ "isFirst",
656
+ "isLast",
657
+ "progressLabel"
658
+ ],
659
+ "requires": []
660
+ },
661
+ "entityRebindable": true,
662
+ "entityRefIds": {
663
+ "BookReaderView": "ent_01M3B9EHG2VZZ5YT90M5M37VQC"
664
+ },
665
+ "id": "trt_01M3B9EHG2NGP2RVNXSB2ZYXQH",
666
+ "linkedEntity": "BookReaderView",
667
+ "linkedEntityId": "ent_01M3B9EHG2VZZ5YT90M5M37VQC",
668
+ "name": "BookReaderRead",
669
+ "scope": "instance",
670
+ "stateMachine": {
671
+ "events": [
672
+ {
673
+ "id": "evt_01M3B9EHG2JYGWZ0NEKDDJ06CR",
674
+ "key": "INIT",
675
+ "name": "Initialize"
676
+ },
677
+ {
678
+ "id": "evt_01M3B9EHG27GQBR87HFQDZQMYJ",
679
+ "key": "START_READING",
680
+ "name": "Start Reading"
681
+ },
682
+ {
683
+ "description": "Jump to a chapter from the table of contents.",
684
+ "id": "evt_01M3B9EHG2Y1XCZAT8KX11T5PQ",
685
+ "key": "OPEN_CHAPTER",
686
+ "name": "Open Chapter",
687
+ "payloadSchema": [
688
+ {
689
+ "name": "index",
690
+ "required": true,
691
+ "type": "number"
692
+ }
693
+ ],
694
+ "tier": "internal"
695
+ },
696
+ {
697
+ "id": "evt_01M3B9EHG2AFZ6QJRB2GTYAZ2H",
698
+ "key": "NEXT_CHAPTER",
699
+ "name": "Next Chapter"
700
+ },
701
+ {
702
+ "id": "evt_01M3B9EHG2YR3VPKGM882TA46D",
703
+ "key": "PREV_CHAPTER",
704
+ "name": "Prev Chapter"
705
+ },
706
+ {
707
+ "id": "evt_01M3B9EHG28V4GG799SEAJCVFJ",
708
+ "key": "BACK_TO_COVER",
709
+ "name": "Back To Cover"
710
+ },
711
+ {
712
+ "description": "The reader moved to a chapter; carries its index and title.",
713
+ "id": "evt_01M3B9EHG2AHYVJ47RZW3B40HK",
714
+ "key": "CHAPTER_OPENED",
715
+ "name": "Chapter Opened",
716
+ "payloadSchema": [
717
+ {
718
+ "name": "index",
719
+ "type": "number"
720
+ },
721
+ {
722
+ "name": "title",
723
+ "type": "string"
724
+ }
725
+ ],
726
+ "synonyms": "page turned, chapter changed, reading progress",
727
+ "tier": "domain"
728
+ }
729
+ ],
730
+ "states": [
731
+ {
732
+ "isInitial": true,
733
+ "name": "cover"
734
+ },
735
+ {
736
+ "name": "reading"
737
+ }
738
+ ],
739
+ "transitions": [
740
+ {
741
+ "effects": [
742
+ [
743
+ "render-ui",
744
+ "main",
745
+ "@config.coverContent"
746
+ ]
747
+ ],
748
+ "event": "INIT",
749
+ "eventId": "evt_01M3B9EHG2JYGWZ0NEKDDJ06CR",
750
+ "from": "cover",
751
+ "to": "cover"
752
+ },
753
+ {
754
+ "effects": [
755
+ [
756
+ "set",
757
+ "@entity.chapterIndex",
758
+ 0.0
759
+ ],
760
+ [
761
+ "set",
762
+ "@entity.chapterTitle",
763
+ [
764
+ "object/get",
765
+ [
766
+ "array/nth",
767
+ "@config.chapters",
768
+ 0.0
769
+ ],
770
+ "title",
771
+ ""
772
+ ]
773
+ ],
774
+ [
775
+ "set",
776
+ "@entity.chapterContent",
777
+ [
778
+ "object/get",
779
+ [
780
+ "array/nth",
781
+ "@config.chapters",
782
+ 0.0
783
+ ],
784
+ "content",
785
+ ""
786
+ ]
787
+ ],
788
+ [
789
+ "set",
790
+ "@entity.isFirst",
791
+ true
792
+ ],
793
+ [
794
+ "set",
795
+ "@entity.isLast",
796
+ [
797
+ "<=",
798
+ [
799
+ "array/len",
800
+ "@config.chapters"
801
+ ],
802
+ 1.0
803
+ ]
804
+ ],
805
+ [
806
+ "set",
807
+ "@entity.progressLabel",
808
+ [
809
+ "str/concat",
810
+ "1 / ",
811
+ [
812
+ "array/len",
813
+ "@config.chapters"
814
+ ]
815
+ ]
816
+ ],
817
+ [
818
+ "render-ui",
819
+ "main",
820
+ "@config.readingContent"
821
+ ],
822
+ [
823
+ "emit",
824
+ "CHAPTER_OPENED",
825
+ {
826
+ "index": 0.0,
827
+ "title": "@entity.chapterTitle"
828
+ }
829
+ ]
830
+ ],
831
+ "event": "START_READING",
832
+ "eventId": "evt_01M3B9EHG27GQBR87HFQDZQMYJ",
833
+ "from": "cover",
834
+ "to": "reading"
835
+ },
836
+ {
837
+ "effects": [
838
+ [
839
+ "set",
840
+ "@entity.chapterIndex",
841
+ "@payload.index"
842
+ ],
843
+ [
844
+ "set",
845
+ "@entity.chapterTitle",
846
+ [
847
+ "object/get",
848
+ [
849
+ "array/nth",
850
+ "@config.chapters",
851
+ "@payload.index"
852
+ ],
853
+ "title",
854
+ ""
855
+ ]
856
+ ],
857
+ [
858
+ "set",
859
+ "@entity.chapterContent",
860
+ [
861
+ "object/get",
862
+ [
863
+ "array/nth",
864
+ "@config.chapters",
865
+ "@payload.index"
866
+ ],
867
+ "content",
868
+ ""
869
+ ]
870
+ ],
871
+ [
872
+ "set",
873
+ "@entity.isFirst",
874
+ [
875
+ "==",
876
+ "@payload.index",
877
+ 0.0
878
+ ]
879
+ ],
880
+ [
881
+ "set",
882
+ "@entity.isLast",
883
+ [
884
+ ">=",
885
+ "@payload.index",
886
+ [
887
+ "-",
888
+ [
889
+ "array/len",
890
+ "@config.chapters"
891
+ ],
892
+ 1.0
893
+ ]
894
+ ]
895
+ ],
896
+ [
897
+ "set",
898
+ "@entity.progressLabel",
899
+ [
900
+ "str/concat",
901
+ [
902
+ "+",
903
+ "@payload.index",
904
+ 1.0
905
+ ],
906
+ " / ",
907
+ [
908
+ "array/len",
909
+ "@config.chapters"
910
+ ]
911
+ ]
912
+ ],
913
+ [
914
+ "render-ui",
915
+ "main",
916
+ "@config.readingContent"
917
+ ],
918
+ [
919
+ "emit",
920
+ "CHAPTER_OPENED",
921
+ {
922
+ "index": "@payload.index",
923
+ "title": "@entity.chapterTitle"
924
+ }
925
+ ]
926
+ ],
927
+ "event": "OPEN_CHAPTER",
928
+ "eventId": "evt_01M3B9EHG2Y1XCZAT8KX11T5PQ",
929
+ "from": "cover",
930
+ "to": "reading"
931
+ },
932
+ {
933
+ "effects": [
934
+ [
935
+ "render-ui",
936
+ "main",
937
+ "@config.readingContent"
938
+ ]
939
+ ],
940
+ "event": "INIT",
941
+ "eventId": "evt_01M3B9EHG2JYGWZ0NEKDDJ06CR",
942
+ "from": "reading",
943
+ "to": "reading"
944
+ },
945
+ {
946
+ "effects": [
947
+ [
948
+ "set",
949
+ "@entity.chapterIndex",
950
+ "@payload.index"
951
+ ],
952
+ [
953
+ "set",
954
+ "@entity.chapterTitle",
955
+ [
956
+ "object/get",
957
+ [
958
+ "array/nth",
959
+ "@config.chapters",
960
+ "@payload.index"
961
+ ],
962
+ "title",
963
+ ""
964
+ ]
965
+ ],
966
+ [
967
+ "set",
968
+ "@entity.chapterContent",
969
+ [
970
+ "object/get",
971
+ [
972
+ "array/nth",
973
+ "@config.chapters",
974
+ "@payload.index"
975
+ ],
976
+ "content",
977
+ ""
978
+ ]
979
+ ],
980
+ [
981
+ "set",
982
+ "@entity.isFirst",
983
+ [
984
+ "==",
985
+ "@payload.index",
986
+ 0.0
987
+ ]
988
+ ],
989
+ [
990
+ "set",
991
+ "@entity.isLast",
992
+ [
993
+ ">=",
994
+ "@payload.index",
995
+ [
996
+ "-",
997
+ [
998
+ "array/len",
999
+ "@config.chapters"
1000
+ ],
1001
+ 1.0
1002
+ ]
1003
+ ]
1004
+ ],
1005
+ [
1006
+ "set",
1007
+ "@entity.progressLabel",
1008
+ [
1009
+ "str/concat",
1010
+ [
1011
+ "+",
1012
+ "@payload.index",
1013
+ 1.0
1014
+ ],
1015
+ " / ",
1016
+ [
1017
+ "array/len",
1018
+ "@config.chapters"
1019
+ ]
1020
+ ]
1021
+ ],
1022
+ [
1023
+ "render-ui",
1024
+ "main",
1025
+ "@config.readingContent"
1026
+ ],
1027
+ [
1028
+ "emit",
1029
+ "CHAPTER_OPENED",
1030
+ {
1031
+ "index": "@payload.index",
1032
+ "title": "@entity.chapterTitle"
1033
+ }
1034
+ ]
1035
+ ],
1036
+ "event": "OPEN_CHAPTER",
1037
+ "eventId": "evt_01M3B9EHG2Y1XCZAT8KX11T5PQ",
1038
+ "from": "reading",
1039
+ "to": "reading"
1040
+ },
1041
+ {
1042
+ "effects": [
1043
+ [
1044
+ "set",
1045
+ "@entity.chapterIndex",
1046
+ [
1047
+ "+",
1048
+ "@entity.chapterIndex",
1049
+ 1.0
1050
+ ]
1051
+ ],
1052
+ [
1053
+ "set",
1054
+ "@entity.chapterTitle",
1055
+ [
1056
+ "object/get",
1057
+ [
1058
+ "array/nth",
1059
+ "@config.chapters",
1060
+ "@entity.chapterIndex"
1061
+ ],
1062
+ "title",
1063
+ ""
1064
+ ]
1065
+ ],
1066
+ [
1067
+ "set",
1068
+ "@entity.chapterContent",
1069
+ [
1070
+ "object/get",
1071
+ [
1072
+ "array/nth",
1073
+ "@config.chapters",
1074
+ "@entity.chapterIndex"
1075
+ ],
1076
+ "content",
1077
+ ""
1078
+ ]
1079
+ ],
1080
+ [
1081
+ "set",
1082
+ "@entity.isFirst",
1083
+ false
1084
+ ],
1085
+ [
1086
+ "set",
1087
+ "@entity.isLast",
1088
+ [
1089
+ ">=",
1090
+ "@entity.chapterIndex",
1091
+ [
1092
+ "-",
1093
+ [
1094
+ "array/len",
1095
+ "@config.chapters"
1096
+ ],
1097
+ 1.0
1098
+ ]
1099
+ ]
1100
+ ],
1101
+ [
1102
+ "set",
1103
+ "@entity.progressLabel",
1104
+ [
1105
+ "str/concat",
1106
+ [
1107
+ "+",
1108
+ "@entity.chapterIndex",
1109
+ 1.0
1110
+ ],
1111
+ " / ",
1112
+ [
1113
+ "array/len",
1114
+ "@config.chapters"
1115
+ ]
1116
+ ]
1117
+ ],
1118
+ [
1119
+ "render-ui",
1120
+ "main",
1121
+ "@config.readingContent"
1122
+ ],
1123
+ [
1124
+ "emit",
1125
+ "CHAPTER_OPENED",
1126
+ {
1127
+ "index": "@entity.chapterIndex",
1128
+ "title": "@entity.chapterTitle"
1129
+ }
1130
+ ]
1131
+ ],
1132
+ "event": "NEXT_CHAPTER",
1133
+ "eventId": "evt_01M3B9EHG2AFZ6QJRB2GTYAZ2H",
1134
+ "from": "reading",
1135
+ "guard": [
1136
+ "not",
1137
+ "@entity.isLast"
1138
+ ],
1139
+ "to": "reading"
1140
+ },
1141
+ {
1142
+ "effects": [
1143
+ [
1144
+ "set",
1145
+ "@entity.chapterIndex",
1146
+ [
1147
+ "-",
1148
+ "@entity.chapterIndex",
1149
+ 1.0
1150
+ ]
1151
+ ],
1152
+ [
1153
+ "set",
1154
+ "@entity.chapterTitle",
1155
+ [
1156
+ "object/get",
1157
+ [
1158
+ "array/nth",
1159
+ "@config.chapters",
1160
+ "@entity.chapterIndex"
1161
+ ],
1162
+ "title",
1163
+ ""
1164
+ ]
1165
+ ],
1166
+ [
1167
+ "set",
1168
+ "@entity.chapterContent",
1169
+ [
1170
+ "object/get",
1171
+ [
1172
+ "array/nth",
1173
+ "@config.chapters",
1174
+ "@entity.chapterIndex"
1175
+ ],
1176
+ "content",
1177
+ ""
1178
+ ]
1179
+ ],
1180
+ [
1181
+ "set",
1182
+ "@entity.isFirst",
1183
+ [
1184
+ "==",
1185
+ "@entity.chapterIndex",
1186
+ 0.0
1187
+ ]
1188
+ ],
1189
+ [
1190
+ "set",
1191
+ "@entity.isLast",
1192
+ false
1193
+ ],
1194
+ [
1195
+ "set",
1196
+ "@entity.progressLabel",
1197
+ [
1198
+ "str/concat",
1199
+ [
1200
+ "+",
1201
+ "@entity.chapterIndex",
1202
+ 1.0
1203
+ ],
1204
+ " / ",
1205
+ [
1206
+ "array/len",
1207
+ "@config.chapters"
1208
+ ]
1209
+ ]
1210
+ ],
1211
+ [
1212
+ "render-ui",
1213
+ "main",
1214
+ "@config.readingContent"
1215
+ ],
1216
+ [
1217
+ "emit",
1218
+ "CHAPTER_OPENED",
1219
+ {
1220
+ "index": "@entity.chapterIndex",
1221
+ "title": "@entity.chapterTitle"
1222
+ }
1223
+ ]
1224
+ ],
1225
+ "event": "PREV_CHAPTER",
1226
+ "eventId": "evt_01M3B9EHG2YR3VPKGM882TA46D",
1227
+ "from": "reading",
1228
+ "guard": [
1229
+ "not",
1230
+ "@entity.isFirst"
1231
+ ],
1232
+ "to": "reading"
1233
+ },
1234
+ {
1235
+ "effects": [
1236
+ [
1237
+ "render-ui",
1238
+ "main",
1239
+ "@config.coverContent"
1240
+ ]
1241
+ ],
1242
+ "event": "BACK_TO_COVER",
1243
+ "eventId": "evt_01M3B9EHG28V4GG799SEAJCVFJ",
1244
+ "from": "reading",
1245
+ "to": "cover"
1246
+ }
1247
+ ]
1248
+ }
1249
+ }
1250
+ ],
1251
+ "types": {
1252
+ "BookChapter": [
1253
+ {
1254
+ "name": "title",
1255
+ "required": true,
1256
+ "type": "string"
1257
+ },
1258
+ {
1259
+ "name": "content",
1260
+ "required": true,
1261
+ "type": "string"
1262
+ }
1263
+ ]
1264
+ }
1265
+ }
1266
+ ],
1267
+ "schemaVersion": 1,
1268
+ "version": "1.0.0"
1269
+ }