@fractal-io-technology/spec 0.0.0-stage → 2.2.2

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 (323) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +165 -2
  3. package/conformance/1.0/action-cases.json +227 -0
  4. package/conformance/1.0/bind-cases.json +768 -0
  5. package/conformance/1.0/cases.json +25139 -0
  6. package/conformance/1.0/layout/01-onboarding-start.json +95 -0
  7. package/conformance/1.0/layout/02-home-discover.json +177 -0
  8. package/conformance/1.0/layout/03-filters.json +186 -0
  9. package/conformance/1.0/layout/README.md +145 -0
  10. package/conformance/1.0/layout/REPORT.md +222 -0
  11. package/conformance/1.0/layout/alert.json +22 -0
  12. package/conformance/1.0/layout/iphone-14-15-pro-107.json +272 -0
  13. package/conformance/1.0/layout/live_status_on_its_way_4.ios.json +100 -0
  14. package/conformance/1.0/layout/lucy-booking-mobile.json +261 -0
  15. package/conformance/1.0/layout/lucy-booking-tablet.json +817 -0
  16. package/conformance/1.0/layout/lucy-booking.json +185 -0
  17. package/conformance/1.0/layout/lucy-header.json +84 -0
  18. package/conformance/1.0/layout/lucy-welcome-pin-mobile.json +31 -0
  19. package/conformance/1.0/layout/lucy-welcome-pin.json +31 -0
  20. package/conformance/1.0/layout/measured/android/01-onboarding-start.json +95 -0
  21. package/conformance/1.0/layout/measured/android/02-home-discover.json +177 -0
  22. package/conformance/1.0/layout/measured/android/03-filters.json +186 -0
  23. package/conformance/1.0/layout/measured/android/alert.json +22 -0
  24. package/conformance/1.0/layout/measured/android/iphone-14-15-pro-107.json +272 -0
  25. package/conformance/1.0/layout/measured/android/live_status_on_its_way_4.ios.json +100 -0
  26. package/conformance/1.0/layout/measured/android/lucy-booking-mobile.json +261 -0
  27. package/conformance/1.0/layout/measured/android/lucy-booking-tablet.json +817 -0
  28. package/conformance/1.0/layout/measured/android/lucy-booking.json +185 -0
  29. package/conformance/1.0/layout/measured/android/lucy-header.json +84 -0
  30. package/conformance/1.0/layout/measured/android/lucy-welcome-pin-mobile.json +31 -0
  31. package/conformance/1.0/layout/measured/android/lucy-welcome-pin.json +31 -0
  32. package/conformance/1.0/layout/measured/android/navigation-bar.json +46 -0
  33. package/conformance/1.0/layout/measured/android/probe-alert-banner-flutter.json +37 -0
  34. package/conformance/1.0/layout/measured/android/probe-alert-banner-regression-flutter.json +51 -0
  35. package/conformance/1.0/layout/measured/android/probe-alert-banner-stack-flutter.json +29 -0
  36. package/conformance/1.0/layout/measured/android/probe-card.json +35 -0
  37. package/conformance/1.0/layout/measured/android/probe-check-box-flutter.json +20 -0
  38. package/conformance/1.0/layout/measured/android/probe-container-height.json +21 -0
  39. package/conformance/1.0/layout/measured/android/probe-divider.json +55 -0
  40. package/conformance/1.0/layout/measured/android/probe-dropdown-menu-flutter.json +24 -0
  41. package/conformance/1.0/layout/measured/android/probe-dropdown-menu-max-lines.json +11 -0
  42. package/conformance/1.0/layout/measured/android/probe-expanded.json +31 -0
  43. package/conformance/1.0/layout/measured/android/probe-failed-decode.json +11 -0
  44. package/conformance/1.0/layout/measured/android/probe-flex.json +43 -0
  45. package/conformance/1.0/layout/measured/android/probe-grid-flutter.json +78 -0
  46. package/conformance/1.0/layout/measured/android/probe-grid.json +29 -0
  47. package/conformance/1.0/layout/measured/android/probe-icon-button-flutter.json +25 -0
  48. package/conformance/1.0/layout/measured/android/probe-icon-flutter.json +19 -0
  49. package/conformance/1.0/layout/measured/android/probe-icon-sizing.json +36 -0
  50. package/conformance/1.0/layout/measured/android/probe-image-flutter.json +24 -0
  51. package/conformance/1.0/layout/measured/android/probe-list-flutter.json +79 -0
  52. package/conformance/1.0/layout/measured/android/probe-list-regression-flutter.json +94 -0
  53. package/conformance/1.0/layout/measured/android/probe-list-row-flutter.json +86 -0
  54. package/conformance/1.0/layout/measured/android/probe-list-styles.json +45 -0
  55. package/conformance/1.0/layout/measured/android/probe-pin-input-parity.json +18 -0
  56. package/conformance/1.0/layout/measured/android/probe-progress-track-flutter.json +41 -0
  57. package/conformance/1.0/layout/measured/android/probe-progress-track-regression-flutter.json +57 -0
  58. package/conformance/1.0/layout/measured/android/probe-row-column.json +84 -0
  59. package/conformance/1.0/layout/measured/android/probe-scroll.json +54 -0
  60. package/conformance/1.0/layout/measured/android/probe-search-flutter.json +22 -0
  61. package/conformance/1.0/layout/measured/android/probe-size-constraints.json +20 -0
  62. package/conformance/1.0/layout/measured/android/probe-spacer.json +43 -0
  63. package/conformance/1.0/layout/measured/android/probe-stat-progress-track.json +14 -0
  64. package/conformance/1.0/layout/measured/android/probe-text-button-flutter.json +27 -0
  65. package/conformance/1.0/layout/measured/android/probe-text-field-flutter.json +28 -0
  66. package/conformance/1.0/layout/measured/android/probe-text.json +30 -0
  67. package/conformance/1.0/layout/measured/android/wallet-home.json +127 -0
  68. package/conformance/1.0/layout/measured/web/01-onboarding-start.json +95 -0
  69. package/conformance/1.0/layout/measured/web/02-home-discover.json +177 -0
  70. package/conformance/1.0/layout/measured/web/03-filters.json +186 -0
  71. package/conformance/1.0/layout/measured/web/alert.json +22 -0
  72. package/conformance/1.0/layout/measured/web/iphone-14-15-pro-107.json +272 -0
  73. package/conformance/1.0/layout/measured/web/live_status_on_its_way_4.ios.json +100 -0
  74. package/conformance/1.0/layout/measured/web/lucy-booking-mobile.json +261 -0
  75. package/conformance/1.0/layout/measured/web/lucy-booking-tablet.json +817 -0
  76. package/conformance/1.0/layout/measured/web/lucy-booking.json +185 -0
  77. package/conformance/1.0/layout/measured/web/lucy-header.json +84 -0
  78. package/conformance/1.0/layout/measured/web/lucy-welcome-pin-mobile.json +31 -0
  79. package/conformance/1.0/layout/measured/web/lucy-welcome-pin.json +31 -0
  80. package/conformance/1.0/layout/measured/web/navigation-bar.json +46 -0
  81. package/conformance/1.0/layout/measured/web/probe-alert-banner-flutter.json +37 -0
  82. package/conformance/1.0/layout/measured/web/probe-alert-banner-regression-flutter.json +51 -0
  83. package/conformance/1.0/layout/measured/web/probe-alert-banner-stack-flutter.json +29 -0
  84. package/conformance/1.0/layout/measured/web/probe-card.json +35 -0
  85. package/conformance/1.0/layout/measured/web/probe-check-box-flutter.json +20 -0
  86. package/conformance/1.0/layout/measured/web/probe-container-height.json +21 -0
  87. package/conformance/1.0/layout/measured/web/probe-divider.json +55 -0
  88. package/conformance/1.0/layout/measured/web/probe-dropdown-menu-flutter.json +24 -0
  89. package/conformance/1.0/layout/measured/web/probe-dropdown-menu-max-lines.json +11 -0
  90. package/conformance/1.0/layout/measured/web/probe-expanded.json +31 -0
  91. package/conformance/1.0/layout/measured/web/probe-failed-decode.json +15 -0
  92. package/conformance/1.0/layout/measured/web/probe-flex.json +43 -0
  93. package/conformance/1.0/layout/measured/web/probe-grid-flutter.json +78 -0
  94. package/conformance/1.0/layout/measured/web/probe-grid.json +29 -0
  95. package/conformance/1.0/layout/measured/web/probe-icon-button-flutter.json +25 -0
  96. package/conformance/1.0/layout/measured/web/probe-icon-flutter.json +19 -0
  97. package/conformance/1.0/layout/measured/web/probe-icon-sizing.json +36 -0
  98. package/conformance/1.0/layout/measured/web/probe-image-flutter.json +24 -0
  99. package/conformance/1.0/layout/measured/web/probe-list-flutter.json +79 -0
  100. package/conformance/1.0/layout/measured/web/probe-list-regression-flutter.json +94 -0
  101. package/conformance/1.0/layout/measured/web/probe-list-row-flutter.json +86 -0
  102. package/conformance/1.0/layout/measured/web/probe-list-styles.json +45 -0
  103. package/conformance/1.0/layout/measured/web/probe-pin-input-parity.json +18 -0
  104. package/conformance/1.0/layout/measured/web/probe-progress-track-flutter.json +41 -0
  105. package/conformance/1.0/layout/measured/web/probe-progress-track-regression-flutter.json +57 -0
  106. package/conformance/1.0/layout/measured/web/probe-row-column.json +84 -0
  107. package/conformance/1.0/layout/measured/web/probe-scroll.json +54 -0
  108. package/conformance/1.0/layout/measured/web/probe-search-flutter.json +22 -0
  109. package/conformance/1.0/layout/measured/web/probe-size-constraints.json +20 -0
  110. package/conformance/1.0/layout/measured/web/probe-spacer.json +43 -0
  111. package/conformance/1.0/layout/measured/web/probe-stat-progress-track.json +14 -0
  112. package/conformance/1.0/layout/measured/web/probe-text-button-flutter.json +27 -0
  113. package/conformance/1.0/layout/measured/web/probe-text-field-flutter.json +28 -0
  114. package/conformance/1.0/layout/measured/web/probe-text.json +30 -0
  115. package/conformance/1.0/layout/measured/web/wallet-home.json +127 -0
  116. package/conformance/1.0/layout/navigation-bar.json +46 -0
  117. package/conformance/1.0/layout/probe-alert-banner-flutter.json +37 -0
  118. package/conformance/1.0/layout/probe-alert-banner-regression-flutter.json +51 -0
  119. package/conformance/1.0/layout/probe-alert-banner-stack-flutter.json +29 -0
  120. package/conformance/1.0/layout/probe-card.json +35 -0
  121. package/conformance/1.0/layout/probe-check-box-flutter.json +20 -0
  122. package/conformance/1.0/layout/probe-container-height.json +21 -0
  123. package/conformance/1.0/layout/probe-divider.json +55 -0
  124. package/conformance/1.0/layout/probe-dropdown-menu-flutter.json +24 -0
  125. package/conformance/1.0/layout/probe-dropdown-menu-max-lines.json +11 -0
  126. package/conformance/1.0/layout/probe-expanded.json +31 -0
  127. package/conformance/1.0/layout/probe-failed-decode.json +13 -0
  128. package/conformance/1.0/layout/probe-flex.json +43 -0
  129. package/conformance/1.0/layout/probe-grid-flutter.json +78 -0
  130. package/conformance/1.0/layout/probe-grid.json +29 -0
  131. package/conformance/1.0/layout/probe-icon-button-flutter.json +25 -0
  132. package/conformance/1.0/layout/probe-icon-flutter.json +19 -0
  133. package/conformance/1.0/layout/probe-icon-sizing.json +36 -0
  134. package/conformance/1.0/layout/probe-image-flutter.json +24 -0
  135. package/conformance/1.0/layout/probe-list-flutter.json +79 -0
  136. package/conformance/1.0/layout/probe-list-regression-flutter.json +94 -0
  137. package/conformance/1.0/layout/probe-list-row-flutter.json +86 -0
  138. package/conformance/1.0/layout/probe-list-styles.json +45 -0
  139. package/conformance/1.0/layout/probe-pin-input-parity.json +18 -0
  140. package/conformance/1.0/layout/probe-progress-track-flutter.json +41 -0
  141. package/conformance/1.0/layout/probe-progress-track-regression-flutter.json +57 -0
  142. package/conformance/1.0/layout/probe-row-column.json +84 -0
  143. package/conformance/1.0/layout/probe-scroll.json +54 -0
  144. package/conformance/1.0/layout/probe-search-flutter.json +22 -0
  145. package/conformance/1.0/layout/probe-size-constraints.json +20 -0
  146. package/conformance/1.0/layout/probe-spacer.json +43 -0
  147. package/conformance/1.0/layout/probe-stat-progress-track.json +14 -0
  148. package/conformance/1.0/layout/probe-text-button-flutter.json +27 -0
  149. package/conformance/1.0/layout/probe-text-field-flutter.json +28 -0
  150. package/conformance/1.0/layout/probe-text.json +30 -0
  151. package/conformance/1.0/layout/probes/probe-alert-banner-flutter.json +296 -0
  152. package/conformance/1.0/layout/probes/probe-alert-banner-regression-flutter.json +1 -0
  153. package/conformance/1.0/layout/probes/probe-alert-banner-stack-flutter.json +219 -0
  154. package/conformance/1.0/layout/probes/probe-card.json +252 -0
  155. package/conformance/1.0/layout/probes/probe-check-box-flutter.json +86 -0
  156. package/conformance/1.0/layout/probes/probe-container-height.json +147 -0
  157. package/conformance/1.0/layout/probes/probe-divider.json +469 -0
  158. package/conformance/1.0/layout/probes/probe-dropdown-menu-flutter.json +293 -0
  159. package/conformance/1.0/layout/probes/probe-dropdown-menu-max-lines.json +54 -0
  160. package/conformance/1.0/layout/probes/probe-expanded.json +208 -0
  161. package/conformance/1.0/layout/probes/probe-failed-decode.json +96 -0
  162. package/conformance/1.0/layout/probes/probe-flex.json +353 -0
  163. package/conformance/1.0/layout/probes/probe-grid-flutter.json +584 -0
  164. package/conformance/1.0/layout/probes/probe-grid.json +209 -0
  165. package/conformance/1.0/layout/probes/probe-icon-button-flutter.json +143 -0
  166. package/conformance/1.0/layout/probes/probe-icon-flutter.json +89 -0
  167. package/conformance/1.0/layout/probes/probe-icon-sizing.json +219 -0
  168. package/conformance/1.0/layout/probes/probe-image-flutter.json +130 -0
  169. package/conformance/1.0/layout/probes/probe-list-flutter.json +732 -0
  170. package/conformance/1.0/layout/probes/probe-list-regression-flutter.json +815 -0
  171. package/conformance/1.0/layout/probes/probe-list-row-flutter.json +734 -0
  172. package/conformance/1.0/layout/probes/probe-list-styles.json +332 -0
  173. package/conformance/1.0/layout/probes/probe-pin-input-parity.json +87 -0
  174. package/conformance/1.0/layout/probes/probe-progress-track-flutter.json +298 -0
  175. package/conformance/1.0/layout/probes/probe-progress-track-regression-flutter.json +525 -0
  176. package/conformance/1.0/layout/probes/probe-row-column.json +784 -0
  177. package/conformance/1.0/layout/probes/probe-scroll.json +378 -0
  178. package/conformance/1.0/layout/probes/probe-search-flutter.json +138 -0
  179. package/conformance/1.0/layout/probes/probe-size-constraints.json +157 -0
  180. package/conformance/1.0/layout/probes/probe-spacer.json +291 -0
  181. package/conformance/1.0/layout/probes/probe-stat-progress-track.json +87 -0
  182. package/conformance/1.0/layout/probes/probe-text-button-flutter.json +163 -0
  183. package/conformance/1.0/layout/probes/probe-text-field-flutter.json +170 -0
  184. package/conformance/1.0/layout/probes/probe-text.json +202 -0
  185. package/conformance/1.0/layout/report/01-onboarding-start.md +49 -0
  186. package/conformance/1.0/layout/report/02-home-discover.md +98 -0
  187. package/conformance/1.0/layout/report/03-filters.md +85 -0
  188. package/conformance/1.0/layout/report/alert.md +27 -0
  189. package/conformance/1.0/layout/report/iphone-14-15-pro-107.md +47 -0
  190. package/conformance/1.0/layout/report/live_status_on_its_way_4.ios.md +60 -0
  191. package/conformance/1.0/layout/report/lucy-booking-mobile.md +81 -0
  192. package/conformance/1.0/layout/report/lucy-booking-tablet.md +279 -0
  193. package/conformance/1.0/layout/report/lucy-booking.md +117 -0
  194. package/conformance/1.0/layout/report/lucy-header.md +64 -0
  195. package/conformance/1.0/layout/report/lucy-welcome-pin-mobile.md +15 -0
  196. package/conformance/1.0/layout/report/lucy-welcome-pin.md +11 -0
  197. package/conformance/1.0/layout/report/navigation-bar.md +23 -0
  198. package/conformance/1.0/layout/report/probe-alert-banner-flutter.md +11 -0
  199. package/conformance/1.0/layout/report/probe-alert-banner-regression-flutter.md +27 -0
  200. package/conformance/1.0/layout/report/probe-alert-banner-stack-flutter.md +11 -0
  201. package/conformance/1.0/layout/report/probe-card.md +11 -0
  202. package/conformance/1.0/layout/report/probe-check-box-flutter.md +17 -0
  203. package/conformance/1.0/layout/report/probe-divider.md +11 -0
  204. package/conformance/1.0/layout/report/probe-dropdown-menu-flutter.md +15 -0
  205. package/conformance/1.0/layout/report/probe-dropdown-menu-max-lines.md +15 -0
  206. package/conformance/1.0/layout/report/probe-flex.md +23 -0
  207. package/conformance/1.0/layout/report/probe-grid-flutter.md +11 -0
  208. package/conformance/1.0/layout/report/probe-icon-button-flutter.md +11 -0
  209. package/conformance/1.0/layout/report/probe-icon-flutter.md +11 -0
  210. package/conformance/1.0/layout/report/probe-image-flutter.md +11 -0
  211. package/conformance/1.0/layout/report/probe-list-flutter.md +11 -0
  212. package/conformance/1.0/layout/report/probe-list-regression-flutter.md +27 -0
  213. package/conformance/1.0/layout/report/probe-list-row-flutter.md +11 -0
  214. package/conformance/1.0/layout/report/probe-pin-input-parity.md +11 -0
  215. package/conformance/1.0/layout/report/probe-progress-track-flutter.md +11 -0
  216. package/conformance/1.0/layout/report/probe-progress-track-regression-flutter.md +20 -0
  217. package/conformance/1.0/layout/report/probe-row-column.md +20 -0
  218. package/conformance/1.0/layout/report/probe-scroll.md +11 -0
  219. package/conformance/1.0/layout/report/probe-search-flutter.md +11 -0
  220. package/conformance/1.0/layout/report/probe-spacer.md +11 -0
  221. package/conformance/1.0/layout/report/probe-text-button-flutter.md +22 -0
  222. package/conformance/1.0/layout/report/probe-text-field-flutter.md +11 -0
  223. package/conformance/1.0/layout/report/probe-text.md +31 -0
  224. package/conformance/1.0/layout/report/wallet-home.md +35 -0
  225. package/conformance/1.0/layout/tolerance.json +12 -0
  226. package/conformance/1.0/layout/wallet-home.json +127 -0
  227. package/conformance/1.0/response-cases.json +228 -0
  228. package/conformance/1.0/screen-cases.json +198 -0
  229. package/conformance/1.0/screens/01-onboarding-start.json +994 -0
  230. package/conformance/1.0/screens/02-home-discover.json +2165 -0
  231. package/conformance/1.0/screens/03-filters.json +2290 -0
  232. package/conformance/1.0/screens/alert.json +231 -0
  233. package/conformance/1.0/screens/iphone-14-15-pro-107.json +3149 -0
  234. package/conformance/1.0/screens/live_status_on_its_way_4.ios.json +1313 -0
  235. package/conformance/1.0/screens/lucy-booking-mobile.json +3063 -0
  236. package/conformance/1.0/screens/lucy-booking-tablet.json +10371 -0
  237. package/conformance/1.0/screens/lucy-booking.json +2130 -0
  238. package/conformance/1.0/screens/lucy-header.json +1201 -0
  239. package/conformance/1.0/screens/lucy-welcome-pin-mobile.json +417 -0
  240. package/conformance/1.0/screens/lucy-welcome-pin.json +409 -0
  241. package/conformance/1.0/screens/navigation-bar.json +542 -0
  242. package/conformance/1.0/screens/wallet-home.json +1585 -0
  243. package/dist/action.d.ts +10616 -0
  244. package/dist/action.d.ts.map +1 -0
  245. package/dist/action.js +92 -0
  246. package/dist/action.js.map +1 -0
  247. package/dist/bind.d.ts +32 -0
  248. package/dist/bind.d.ts.map +1 -0
  249. package/dist/bind.js +102 -0
  250. package/dist/bind.js.map +1 -0
  251. package/dist/block-ref.d.ts +17 -0
  252. package/dist/block-ref.d.ts.map +1 -0
  253. package/dist/block-ref.js +17 -0
  254. package/dist/block-ref.js.map +1 -0
  255. package/dist/block-types.d.ts +26 -0
  256. package/dist/block-types.d.ts.map +1 -0
  257. package/dist/block-types.js +39 -0
  258. package/dist/block-types.js.map +1 -0
  259. package/dist/block.d.ts +20908 -0
  260. package/dist/block.d.ts.map +1 -0
  261. package/dist/block.js +81 -0
  262. package/dist/block.js.map +1 -0
  263. package/dist/blocks/display.d.ts +1915 -0
  264. package/dist/blocks/display.d.ts.map +1 -0
  265. package/dist/blocks/display.js +433 -0
  266. package/dist/blocks/display.js.map +1 -0
  267. package/dist/blocks/input.d.ts +7148 -0
  268. package/dist/blocks/input.d.ts.map +1 -0
  269. package/dist/blocks/input.js +855 -0
  270. package/dist/blocks/input.js.map +1 -0
  271. package/dist/blocks/layout.d.ts +2482 -0
  272. package/dist/blocks/layout.d.ts.map +1 -0
  273. package/dist/blocks/layout.js +266 -0
  274. package/dist/blocks/layout.js.map +1 -0
  275. package/dist/blocks/list.d.ts +980 -0
  276. package/dist/blocks/list.d.ts.map +1 -0
  277. package/dist/blocks/list.js +286 -0
  278. package/dist/blocks/list.js.map +1 -0
  279. package/dist/common.d.ts +958 -0
  280. package/dist/common.d.ts.map +1 -0
  281. package/dist/common.js +108 -0
  282. package/dist/common.js.map +1 -0
  283. package/dist/deprecated.d.ts +11 -0
  284. package/dist/deprecated.d.ts.map +1 -0
  285. package/dist/deprecated.js +26 -0
  286. package/dist/deprecated.js.map +1 -0
  287. package/dist/index.d.ts +20 -0
  288. package/dist/index.d.ts.map +1 -0
  289. package/dist/index.js +15 -0
  290. package/dist/index.js.map +1 -0
  291. package/dist/layout.d.ts +103 -0
  292. package/dist/layout.d.ts.map +1 -0
  293. package/dist/layout.js +113 -0
  294. package/dist/layout.js.map +1 -0
  295. package/dist/properties.d.ts +787 -0
  296. package/dist/properties.d.ts.map +1 -0
  297. package/dist/properties.js +447 -0
  298. package/dist/properties.js.map +1 -0
  299. package/dist/screen.d.ts +10494 -0
  300. package/dist/screen.d.ts.map +1 -0
  301. package/dist/screen.js +32 -0
  302. package/dist/screen.js.map +1 -0
  303. package/package.json +57 -4
  304. package/schema/1.0/action.json +109 -0
  305. package/schema/1.0/block.json +5886 -0
  306. package/schema/1.0/response.json +91 -0
  307. package/schema/1.0/screen.json +22 -0
  308. package/src/README.md +135 -0
  309. package/src/action.ts +119 -0
  310. package/src/bind.ts +114 -0
  311. package/src/block-ref.ts +18 -0
  312. package/src/block-types.ts +55 -0
  313. package/src/block.ts +116 -0
  314. package/src/blocks/display.ts +543 -0
  315. package/src/blocks/input.ts +1031 -0
  316. package/src/blocks/layout.ts +322 -0
  317. package/src/blocks/list.ts +355 -0
  318. package/src/common.ts +133 -0
  319. package/src/deprecated.ts +40 -0
  320. package/src/index.ts +31 -0
  321. package/src/layout.ts +194 -0
  322. package/src/properties.ts +516 -0
  323. package/src/screen.ts +39 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAcrD;;;;;;;;;;;;;GAaG;AAEH,gGAAgG;AAChG,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAajC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAI3B,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,WAAW,EAAE,MAAM,GAAG,CAAC,CAEjF;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,GAAG,MAAM,EAC3F,KAAK,EAAE,CAAC,EACR,IAAI,EAAE,SAAS,CAAC,EAAE,EAClB,I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Schema, backgroundImageSchema, colorSchema, crossAxisAlignmentSchema, eventSchema, gradientSchema, overlaySchema, paddingEntrySchema, shapeSchema, sizeSchema, } from "./properties.js";
3
+ /**
4
+ * Shapes shared by the block `data` schemas, as plain objects so each block can
5
+ * spread them into its own `z.strictObject({...})`.
6
+ *
7
+ * iOS builds them as a class hierarchy; the layers below match it:
8
+ *
9
+ * FIOCoreCommonBlockProperties -> commonPropertiesShape
10
+ * FIOCoreCommonDataBlock -> commonDataShape (adds id, events)
11
+ * FIOCoreCommonSingleChildBlockData -> singleChildShape (adds child)
12
+ * FIOCoreCommonMultiChildDataBlock -> multiChildShape (adds children, ...)
13
+ *
14
+ * `divider` sits outside that hierarchy and decodes only its own keys (it
15
+ * extends `FIOCoreGenericBlockData`).
16
+ */
17
+ /** Swift: FIOCoreCommonBlockProperties (Sources/Commons/FIOCoreCommonBlockProperties.swift). */
18
+ export const commonPropertiesShape = {
19
+ background_color: colorSchema.optional(),
20
+ foreground_color: colorSchema.optional(),
21
+ padding: z.array(paddingEntrySchema).optional(),
22
+ size: sizeSchema.optional(),
23
+ alignment_geometry: alignmentSchema.optional(),
24
+ margin: z.array(paddingEntrySchema).optional(),
25
+ shape: shapeSchema.optional(),
26
+ corner_radius: z.number().optional(),
27
+ gradient: gradientSchema.optional(),
28
+ fixed_size: z.boolean().optional(),
29
+ background_image: backgroundImageSchema.optional(),
30
+ background_overlays: z.array(overlaySchema).optional(),
31
+ };
32
+ /**
33
+ * Swift: FIOCoreCommonDataBlock (Sources/Blocks/Commons/FIOCoreCommonDataBlock.swift).
34
+ *
35
+ * `id` also accepts `null`: `decodeIfPresent` treats a null as absent, and the
36
+ * real sample screens (02-home-discover.json) carry `"id": null` on anonymous
37
+ * blocks. It is the only key that tolerates null; every other optional key
38
+ * must be omitted instead, so the converter never emits nulls on purpose.
39
+ */
40
+ export const commonDataShape = {
41
+ ...commonPropertiesShape,
42
+ id: z.string().nullish(),
43
+ events: z.array(eventSchema).optional(),
44
+ };
45
+ /**
46
+ * Marks a key as deprecated: `description` says what the key was and what replaces it (or that
47
+ * it is ignored), and the key carries `deprecated: true` metadata, which `npm run schema` exports
48
+ * as JSON Schema `deprecated: true` and `isDeprecatedSchema` reads. The schema itself is cloned, so
49
+ * the shared instances (`blockRef`, `colorSchema`, `paddingEntrySchema`, ...) stay unwrapped one
50
+ * level down: `deprecated(colorSchema.optional(), ...)` still unwraps to `colorSchema`.
51
+ */
52
+ export function deprecated(schema, description) {
53
+ return schema.describe(description).meta({ deprecated: true });
54
+ }
55
+ /**
56
+ * Marks every key of `shape` named in `keys` as deprecated (see `deprecated`), with the
57
+ * description `note(key)`, keeping its schema. Spread it after `shape` so each key keeps its place.
58
+ */
59
+ export function deprecateKeys(shape, keys, note) {
60
+ const marked = {};
61
+ for (const key of keys)
62
+ marked[key] = deprecated(shape[key], note(key));
63
+ return marked;
64
+ }
65
+ /**
66
+ * "Deprecated on `<block>` since 2.0 and ignored (<spec>); `<key>` stays valid so saved 1.x <saved>
67
+ * decode." (no parenthesis when `spec` is empty).
68
+ */
69
+ export const ignoredOn = (block, spec, saved) => (key) => `Deprecated on \`${block}\` since 2.0 and ignored${spec === "" ? "" : ` (${spec})`}; \`${key}\` stays valid so saved 1.x ${saved} decode.`;
70
+ /** Every key of `commonPropertiesShape` (the style keys), in order. */
71
+ export const COMMON_PROPERTY_KEYS = Object.keys(commonPropertiesShape);
72
+ /**
73
+ * Swift: FIOCoreCommonSingleChildBlockData (Sources/Blocks/Commons/FIOCoreCommonSingleChildDataBlock.swift).
74
+ * `child` is optional: a container without a child is valid.
75
+ *
76
+ * The block schema is injected because block schemas are mutually recursive;
77
+ * see `block-ref.ts`.
78
+ */
79
+ export function singleChildShape(block) {
80
+ return { ...commonDataShape, child: block.optional() };
81
+ }
82
+ /**
83
+ * Swift: `distribution` is a free `String` in FIOCoreCommonMultiChildDataBlock, but
84
+ * `getDistribution()` only recognises these four values and falls back to
85
+ * `fill` (Sources/Commons/FIOCoreCommonBlockStackViewModel.swift).
86
+ */
87
+ export const distributionSchema = z.enum([
88
+ "fill_equally",
89
+ "fill",
90
+ "fill_proportionally",
91
+ "equal_centering",
92
+ ]);
93
+ /**
94
+ * Swift: FIOCoreCommonMultiChildDataBlock (Sources/Commons/FIOCoreCommonMultiChildDataBlock.swift).
95
+ * `children` is required (it may be empty); the other fields are optional.
96
+ * `alignment` is the cross-axis alignment (`start`, `center`, `end`), read by
97
+ * `row` and `column`.
98
+ */
99
+ export function multiChildShape(block) {
100
+ return {
101
+ ...commonDataShape,
102
+ children: z.array(block),
103
+ distribution: distributionSchema.optional(),
104
+ alignment: crossAxisAlignmentSchema.optional(),
105
+ spacing: z.number().optional(),
106
+ };
107
+ }
108
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,WAAW,EACX,wBAAwB,EACxB,WAAW,EACX,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,WAAW,EACX,UAAU,GACX,MAAM,iBAAiB,CAAC;AAEzB;;;;;;;;;;;;;GAaG;AAEH,gGAAgG;AAChG,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,gBAAgB,EAAE,WAAW,CAAC,QAAQ,EAAE;IACxC,gBAAgB,EAAE,WAAW,CAAC,QAAQ,EAAE;IACxC,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,QAAQ,EAAE;IAC/C,IAAI,EAAE,UAAU,CAAC,QAAQ,EAAE;IAC3B,kBAAkB,EAAE,eAAe,CAAC,QAAQ,EAAE;IAC9C,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC,QAAQ,EAAE;IAC9C,KAAK,EAAE,WAAW,CAAC,QAAQ,EAAE;IAC7B,aAAa,EAAE,CAAC,CA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,+BAA+B,KAAK,UAAU,CAAC;AAE7I,uEAAuE;AACvE,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC,IAAI,CAAC,qBAAqB,CAA2C,CAAC;AAEjH;;;;;;GAMG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAA8B;IAC7D,OAAO,EAAE,GAAG,eAAe,EAAE,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,CAAC;AACzD,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,IAAI,CAAC;IACvC,cAAc;IACd,MAAM;IACN,qBAAqB;IACrB,iBAAiB;CAClB,CAAC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,KAA8B;IAC5D,OAAO;QACL,GAAG,eAAe;QAClB,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC;QACxB,YAAY,EAAE,kBAAkB,CAAC,QAAQ,EAAE;QAC3C,SAAS,EAAE,wBAAwB,CAAC,QAAQ,EAAE;QAC9C,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;KAC/B,CAAC;AACJ,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { z } from "zod";
2
+ import type { IosBlockType } from "./block-types.ts";
3
+ /**
4
+ * True when `schema` carries `deprecated: true` metadata, looking through the wrappers a key adds
5
+ * (`optional`, `nullable`, `default`, `readonly`), so `isDeprecatedSchema(shape.key)` works on any
6
+ * object key, nested ones included (`text_field.decoration.focus_color`, `style.line_height`).
7
+ */
8
+ export declare function isDeprecatedSchema(schema: z.ZodType): boolean;
9
+ /** The top-level `data` keys of block `type` that are deprecated, in schema order (empty when none). */
10
+ export declare function deprecatedKeysOf(type: IosBlockType): string[];
11
+ //# sourceMappingURL=deprecated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deprecated.d.ts","sourceRoot":"","sources":["../src/deprecated.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAerD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,GAAG,OAAO,CAS7D;AAED,wGAAwG;AACxG,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,YAAY,GAAG,MAAM,EAAE,CAK7D"}
@@ -0,0 +1,26 @@
1
+ import { z } from "zod";
2
+ import { iosBlockDataSchemas } from "./block.js";
3
+ /**
4
+ * True when `schema` carries `deprecated: true` metadata, looking through the wrappers a key adds
5
+ * (`optional`, `nullable`, `default`, `readonly`), so `isDeprecatedSchema(shape.key)` works on any
6
+ * object key, nested ones included (`text_field.decoration.focus_color`, `style.line_height`).
7
+ */
8
+ export function isDeprecatedSchema(schema) {
9
+ let current = schema;
10
+ while (current !== undefined) {
11
+ if (z.globalRegistry.get(current)?.deprecated === true)
12
+ return true;
13
+ const def = current._zod.def;
14
+ const wrapper = def.type === "optional" || def.type === "nullable" || def.type === "default" || def.type === "readonly";
15
+ current = wrapper ? def.innerType : undefined;
16
+ }
17
+ return false;
18
+ }
19
+ /** The top-level `data` keys of block `type` that are deprecated, in schema order (empty when none). */
20
+ export function deprecatedKeysOf(type) {
21
+ const shape = iosBlockDataSchemas[type].shape;
22
+ return Object.entries(shape)
23
+ .filter(([, schema]) => isDeprecatedSchema(schema))
24
+ .map(([key]) => key);
25
+ }
26
+ //# sourceMappingURL=deprecated.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deprecated.js","sourceRoot":"","sources":["../src/deprecated.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAgBjD;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,MAAiB;IAClD,IAAI,OAAO,GAA0B,MAAM,CAAC;IAC5C,OAAO,OAAO,KAAK,SAAS,EAAE,CAAC;QAC7B,IAAI,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,UAAU,KAAK,IAAI;YAAE,OAAO,IAAI,CAAC;QACpE,MAAM,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,GAAiB,CAAC;QAC3C,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,KAAK,UAAU,IAAI,GAAG,CAAC,IAAI,KAAK,UAAU,IAAI,GAAG,CAAC,IAAI,KAAK,SAAS,IAAI,GAAG,CAAC,IAAI,KAAK,UAAU,CAAC;QACxH,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;IAChD,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,wGAAwG;AACxG,MAAM,UAAU,gBAAgB,CAAC,IAAkB;IACjD,MAAM,KAAK,GAAI,mBAAmB,CAAC,IAAI,CAA4B,CAAC,KAAkC,CAAC;IACvG,OAAO,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;SACzB,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC;SAClD,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Fractal IO protocol, version 1.0: the Zod contract every implementation
3
+ * conforms to. `schema/1.0/*.json` is generated from it (`npm run schema`) and is
4
+ * the published, normative artifact for non-TypeScript implementations.
5
+ */
6
+ export { IOS_BLOCK_TYPES } from "./block-types.ts";
7
+ export type { IosBlockNode, IosBlockType } from "./block-types.ts";
8
+ export { iosBlockDataSchemas, iosBlockSchema } from "./block.ts";
9
+ export type { IosBlock, IosBlockData } from "./block.ts";
10
+ export { blockRef } from "./block-ref.ts";
11
+ export { deprecatedKeysOf, isDeprecatedSchema } from "./deprecated.ts";
12
+ export { FRACTAL_PROTOCOL_VERSION, fractalVersionSchema, screenSchema } from "./screen.ts";
13
+ export type { Screen } from "./screen.ts";
14
+ export { actionMessageSchema, responseSchema } from "./action.ts";
15
+ export type { ActionMessage, ResponseDocument } from "./action.ts";
16
+ export { BIND_ERROR_CODES, BIND_KEY, resolve, substituteBindings } from "./bind.ts";
17
+ export type { BindError, BindErrorCode, ResolveResult, SubstituteResult } from "./bind.ts";
18
+ export * from "./properties.ts";
19
+ export { commonDataShape, commonPropertiesShape, distributionSchema, multiChildShape, singleChildShape, } from "./common.ts";
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEnE,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjE,YAAY,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAEvE,OAAO,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3F,YAAY,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClE,YAAY,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEnE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AACpF,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE3F,cAAc,iBAAiB,CAAC;AAChC,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,kBAAkB,EAClB,eAAe,EACf,gBAAgB,GACjB,MAAM,aAAa,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Fractal IO protocol, version 1.0: the Zod contract every implementation
3
+ * conforms to. `schema/1.0/*.json` is generated from it (`npm run schema`) and is
4
+ * the published, normative artifact for non-TypeScript implementations.
5
+ */
6
+ export { IOS_BLOCK_TYPES } from "./block-types.js";
7
+ export { iosBlockDataSchemas, iosBlockSchema } from "./block.js";
8
+ export { blockRef } from "./block-ref.js";
9
+ export { deprecatedKeysOf, isDeprecatedSchema } from "./deprecated.js";
10
+ export { FRACTAL_PROTOCOL_VERSION, fractalVersionSchema, screenSchema } from "./screen.js";
11
+ export { actionMessageSchema, responseSchema } from "./action.js";
12
+ export { BIND_ERROR_CODES, BIND_KEY, resolve, substituteBindings } from "./bind.js";
13
+ export * from "./properties.js";
14
+ export { commonDataShape, commonPropertiesShape, distributionSchema, multiChildShape, singleChildShape, } from "./common.js";
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGnD,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjE,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAEvE,OAAO,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3F,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAGlE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAGpF,cAAc,iBAAiB,CAAC;AAChC,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,kBAAkB,EAClB,eAAe,EACf,gBAAgB,GACjB,MAAM,aAAa,CAAC"}
@@ -0,0 +1,103 @@
1
+ /**
2
+ * Layout conformance: the format of the golden frame files in
3
+ * `conformance/<version>/layout/` and the comparison every renderer harness runs
4
+ * against them. Zod-free, so a harness can import it without the contract.
5
+ *
6
+ * A block path names a block by the keys that lead to it from the screen's root
7
+ * block: `root` is the root itself, and every other path joins the nested-block
8
+ * keys under each block's `data` with dots, array entries by index
9
+ * (`child.children.0.start_block`). The root's own key is not part of the path.
10
+ */
11
+ /** Keys under a block's `data` that hold nested blocks (single block or array of blocks). */
12
+ export declare const NESTED_BLOCK_KEYS: readonly ["child", "children", "start_block", "title_block", "subtitle_block", "end_block", "leading", "content", "actions"];
13
+ /** The path of the screen's root block. */
14
+ export declare const ROOT_BLOCK_PATH = "root";
15
+ /** A block's frame in points, relative to the top-left corner of the device canvas. */
16
+ export interface LayoutFrame {
17
+ /** The block's `type`, so a reader can tell which tolerance applies and spot a decode mismatch. */
18
+ type: string;
19
+ x: number;
20
+ y: number;
21
+ width: number;
22
+ height: number;
23
+ }
24
+ /** The device a layout file was measured on. */
25
+ export interface LayoutDevice {
26
+ width: number;
27
+ height: number;
28
+ colorScheme: "light" | "dark";
29
+ }
30
+ /**
31
+ * A golden or measured layout file: every block path the renderer laid out, with its frame.
32
+ * Goldens are measured on the reference renderer (`renderer: "ios"`); other harnesses write
33
+ * the same shape with their own `renderer`.
34
+ */
35
+ export interface LayoutDocument {
36
+ /** Protocol version of the screen. */
37
+ fractal: string;
38
+ /** File name of the screen under `conformance/<version>/screens/`. */
39
+ screen: string;
40
+ /** Which renderer measured the frames: `ios`, `android`, `web`. */
41
+ renderer: string;
42
+ device: LayoutDevice;
43
+ frames: Record<string, LayoutFrame>;
44
+ }
45
+ /** One tolerance class: how far a measured frame may be from the golden and still match. */
46
+ export interface ToleranceClass {
47
+ /** Block types in this class. The `default` class has none: it covers every other type. */
48
+ types?: string[];
49
+ /** Allowed absolute difference of `x` and `y`, in points. */
50
+ position: number;
51
+ /** Allowed absolute difference of `width` and `height`, in points. */
52
+ size: number;
53
+ /** Allowed relative difference of `width` and `height` (of the golden value); the larger of `size` and this wins. */
54
+ sizeRatio?: number;
55
+ }
56
+ /** `conformance/<version>/layout/tolerance.json`. */
57
+ export interface LayoutTolerance {
58
+ default: ToleranceClass;
59
+ text: ToleranceClass;
60
+ }
61
+ /** The kind of a difference between a golden and a measured layout. */
62
+ export type LayoutDifferenceKind =
63
+ /** The golden has the block, the renderer did not lay it out. */
64
+ "missing"
65
+ /** The renderer laid out a block the golden does not have. */
66
+ | "extra"
67
+ /** Both have the path, with a different block type. */
68
+ | "type"
69
+ /** Both have the block, its frame is outside the tolerance. */
70
+ | "frame";
71
+ export interface LayoutDifference {
72
+ path: string;
73
+ kind: LayoutDifferenceKind;
74
+ type: string;
75
+ golden?: LayoutFrame;
76
+ measured?: LayoutFrame;
77
+ /** `measured - golden` per field, for `frame` differences. */
78
+ delta?: {
79
+ x: number;
80
+ y: number;
81
+ width: number;
82
+ height: number;
83
+ };
84
+ }
85
+ /** Joins a parent path and a key the way block paths are written. */
86
+ export declare function childPath(parent: string, key: string | number): string;
87
+ /**
88
+ * Lists every block of a screen document (or of a bare root block) with its path and type,
89
+ * in depth-first document order.
90
+ */
91
+ export declare function blockPaths(screenOrBlock: unknown): Map<string, string>;
92
+ /** The tolerance class that applies to a block type. */
93
+ export declare function toleranceFor(type: string, tolerance: LayoutTolerance): ToleranceClass;
94
+ /** Whether `measured` is within the tolerance of `golden`. */
95
+ export declare function frameMatches(golden: LayoutFrame, measured: LayoutFrame, tolerance: ToleranceClass): boolean;
96
+ /**
97
+ * Compares a measured layout with the golden, in golden path order followed by the extra
98
+ * measured paths. An empty list means the renderer matches.
99
+ */
100
+ export declare function compareLayout(golden: LayoutDocument, measured: LayoutDocument, tolerance: LayoutTolerance): LayoutDifference[];
101
+ /** Rounds a frame to 0.01pt, the precision layout files are written with. */
102
+ export declare function roundFrame(frame: LayoutFrame): LayoutFrame;
103
+ //# sourceMappingURL=layout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../src/layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,6FAA6F;AAC7F,eAAO,MAAM,iBAAiB,8HAWpB,CAAC;AAEX,2CAA2C;AAC3C,eAAO,MAAM,eAAe,SAAS,CAAC;AAEtC,uFAAuF;AACvF,MAAM,WAAW,WAAW;IAC1B,mGAAmG;IACnG,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,gDAAgD;AAChD,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,OAAO,GAAG,MAAM,CAAC;CAC/B;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,sCAAsC;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,sEAAsE;IACtE,MAAM,EAAE,MAAM,CAAC;IACf,mEAAmE;IACnE,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,YAAY,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;CACrC;AAED,4FAA4F;AAC5F,MAAM,WAAW,cAAc;IAC7B,2FAA2F;IAC3F,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,6DAA6D;IAC7D,QAAQ,EAAE,MAAM,CAAC;IACjB,sEAAsE;I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EAAE,cAAc,EAAE,SAAS,EAAE,eAAe,GAAG,gBAAgB,EAAE,CA4B9H;AAED,6EAA6E;AAC7E,wBAAgB,UAAU,CAAC,KAAK,EAAE,WAAW,GAAG,WAAW,CAE1D"}
package/dist/layout.js ADDED
@@ -0,0 +1,113 @@
1
+ /**
2
+ * Layout conformance: the format of the golden frame files in
3
+ * `conformance/<version>/layout/` and the comparison every renderer harness runs
4
+ * against them. Zod-free, so a harness can import it without the contract.
5
+ *
6
+ * A block path names a block by the keys that lead to it from the screen's root
7
+ * block: `root` is the root itself, and every other path joins the nested-block
8
+ * keys under each block's `data` with dots, array entries by index
9
+ * (`child.children.0.start_block`). The root's own key is not part of the path.
10
+ */
11
+ /** Keys under a block's `data` that hold nested blocks (single block or array of blocks). */
12
+ export const NESTED_BLOCK_KEYS = [
13
+ "child",
14
+ "children",
15
+ "start_block",
16
+ "title_block",
17
+ "subtitle_block",
18
+ "end_block",
19
+ // alert_banner slots, in the order the renderers record them.
20
+ "leading",
21
+ "content",
22
+ "actions",
23
+ ];
24
+ /** The path of the screen's root block. */
25
+ export const ROOT_BLOCK_PATH = "root";
26
+ function isBlock(value) {
27
+ return typeof value === "object" && value !== null && typeof value.type === "string";
28
+ }
29
+ /** Joins a parent path and a key the way block paths are written. */
30
+ export function childPath(parent, key) {
31
+ return parent === ROOT_BLOCK_PATH ? String(key) : `${parent}.${key}`;
32
+ }
33
+ /**
34
+ * Lists every block of a screen document (or of a bare root block) with its path and type,
35
+ * in depth-first document order.
36
+ */
37
+ export function blockPaths(screenOrBlock) {
38
+ const root = isBlock(screenOrBlock) ? screenOrBlock : screenOrBlock?.data;
39
+ const paths = new Map();
40
+ const visit = (block, path) => {
41
+ if (!isBlock(block))
42
+ return;
43
+ paths.set(path, block.type);
44
+ const data = block.data;
45
+ if (typeof data !== "object" || data === null)
46
+ return;
47
+ for (const key of NESTED_BLOCK_KEYS) {
48
+ const value = data[key];
49
+ if (Array.isArray(value))
50
+ value.forEach((entry, index) => visit(entry, childPath(childPath(path, key), index)));
51
+ else if (value !== undefined)
52
+ visit(value, childPath(path, key));
53
+ }
54
+ };
55
+ visit(root, ROOT_BLOCK_PATH);
56
+ return paths;
57
+ }
58
+ /** The tolerance class that applies to a block type. */
59
+ export function toleranceFor(type, tolerance) {
60
+ return tolerance.text.types?.includes(type) ? tolerance.text : tolerance.default;
61
+ }
62
+ const round = (value) => Math.round(value * 100) / 100;
63
+ /** Whether `measured` is within the tolerance of `golden`. */
64
+ export function frameMatches(golden, measured, tolerance) {
65
+ // The limit is rounded like the deltas, so 10% of 42.3 is 4.23, not 4.2299999.
66
+ const sizeLimit = (value) => round(Math.max(tolerance.size, (tolerance.sizeRatio ?? 0) * Math.abs(value)));
67
+ // Rounding to 0.01pt keeps a frame written at the limit (1.0 vs 1.0000001) inside it.
68
+ return (round(Math.abs(measured.x - golden.x)) <= tolerance.position &&
69
+ round(Math.abs(measured.y - golden.y)) <= tolerance.position &&
70
+ round(Math.abs(measured.width - golden.width)) <= sizeLimit(golden.width) &&
71
+ round(Math.abs(measured.height - golden.height)) <= sizeLimit(golden.height));
72
+ }
73
+ /**
74
+ * Compares a measured layout with the golden, in golden path order followed by the extra
75
+ * measured paths. An empty list means the renderer matches.
76
+ */
77
+ export function compareLayout(golden, measured, tolerance) {
78
+ const differences = [];
79
+ for (const [path, frame] of Object.entries(golden.frames)) {
80
+ const other = measured.frames[path];
81
+ if (!other) {
82
+ differences.push({ path, kind: "missing", type: frame.type, golden: frame });
83
+ }
84
+ else if (other.type !== frame.type) {
85
+ differences.push({ path, kind: "type", type: frame.type, golden: frame, measured: other });
86
+ }
87
+ else if (!frameMatches(frame, other, toleranceFor(frame.type, tolerance))) {
88
+ differences.push({
89
+ path,
90
+ kind: "frame",
91
+ type: frame.type,
92
+ golden: frame,
93
+ measured: other,
94
+ delta: {
95
+ x: round(other.x - frame.x),
96
+ y: round(other.y - frame.y),
97
+ width: round(other.width - frame.width),
98
+ height: round(other.height - frame.height),
99
+ },
100
+ });
101
+ }
102
+ }
103
+ for (const [path, frame] of Object.entries(measured.frames)) {
104
+ if (!(path in golden.frames))
105
+ differences.push({ path, kind: "extra", type: frame.type, measured: frame });
106
+ }
107
+ return differences;
108
+ }
109
+ /** Rounds a frame to 0.01pt, the precision layout files are written with. */
110
+ export function roundFrame(frame) {
111
+ return { type: frame.type, x: round(frame.x), y: round(frame.y), width: round(frame.width), height: round(frame.height) };
112
+ }
113
+ //# sourceMappingURL=layout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.js","sourceRoot":"","sources":["../src/layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,6FAA6F;AAC7F,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,OAAO;IACP,UAAU;IACV,aAAa;IACb,aAAa;IACb,gBAAgB;IAChB,WAAW;IACX,8DAA8D;IAC9D,SAAS;IACT,SAAS;IACT,SAAS;CACD,CAAC;AAEX,2CAA2C;AAC3C,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC;AA+EtC,SAAS,OAAO,CAAC,KAAc;IAC7B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,OAAQ,KAAmB,CAAC,IAAI,KAAK,QAAQ,CAAC;AACtG,CAAC;AAED,qEAAqE;AACrE,MAAM,UAAU,SAAS,CAAC,MAAc,EAAE,GAAoB;IAC5D,OAAO,MAAM,KAAK,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,IAAI,GAAG,EAAE,CAAC;AACvE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,aAAsB;IAC/C,MAAM,IAAI,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAE,aAA2C,EAAE,IAAI,CAAC;IACzG,MAAM,KAAK,GAAG,IAAI,GAAG,EAAkB,CAAC;IACxC,MAAM,KAA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