@oxy.so/bloom 23.5.0 → 23.7.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 (388) hide show
  1. package/NOTICE +28 -0
  2. package/android/src/main/java/so/oxy/bloom/BloomPackage.kt +3 -1
  3. package/android/src/main/java/so/oxy/bloom/icons/BloomIcon.kt +251 -0
  4. package/android/src/main/java/so/oxy/bloom/icons/IconPathParser.java +660 -0
  5. package/docs/adoption-matrix.mdx +1 -4
  6. package/docs/bloom-language-codemod.mdx +6 -2
  7. package/docs/bloom-language-modifiers.mdx +22 -6
  8. package/docs/bloom-language-nodes.mdx +3 -58
  9. package/docs/bloom-language.mdx +15 -36
  10. package/docs/empty-state.mdx +2 -3
  11. package/docs/icons.mdx +29 -1
  12. package/docs/public-parts.mdx +2 -7
  13. package/docs/task-catalog.json +1 -1
  14. package/docs/task-catalog.mdx +1 -1
  15. package/lib/commonjs/icons/TEMPLATE.js +25 -160
  16. package/lib/commonjs/icons/TEMPLATE.js.map +1 -1
  17. package/lib/commonjs/icons/glyph-svg.js +47 -0
  18. package/lib/commonjs/icons/glyph-svg.js.map +1 -0
  19. package/lib/commonjs/icons/glyph.js +29 -0
  20. package/lib/commonjs/icons/glyph.js.map +1 -0
  21. package/lib/commonjs/icons/glyph.native.js +112 -0
  22. package/lib/commonjs/icons/glyph.native.js.map +1 -0
  23. package/lib/commonjs/index.js +279 -485
  24. package/lib/commonjs/index.js.map +1 -1
  25. package/lib/commonjs/index.web.js +279 -485
  26. package/lib/commonjs/index.web.js.map +1 -1
  27. package/lib/commonjs/locale/translations/ar.js +0 -39
  28. package/lib/commonjs/locale/translations/ar.js.map +1 -1
  29. package/lib/commonjs/locale/translations/bn.js +0 -34
  30. package/lib/commonjs/locale/translations/bn.js.map +1 -1
  31. package/lib/commonjs/locale/translations/ca.js +0 -35
  32. package/lib/commonjs/locale/translations/ca.js.map +1 -1
  33. package/lib/commonjs/locale/translations/de.js +0 -35
  34. package/lib/commonjs/locale/translations/de.js.map +1 -1
  35. package/lib/commonjs/locale/translations/es.js +0 -35
  36. package/lib/commonjs/locale/translations/es.js.map +1 -1
  37. package/lib/commonjs/locale/translations/fr.js +0 -35
  38. package/lib/commonjs/locale/translations/fr.js.map +1 -1
  39. package/lib/commonjs/locale/translations/hi.js +0 -35
  40. package/lib/commonjs/locale/translations/hi.js.map +1 -1
  41. package/lib/commonjs/locale/translations/id.js +0 -34
  42. package/lib/commonjs/locale/translations/id.js.map +1 -1
  43. package/lib/commonjs/locale/translations/it.js +0 -35
  44. package/lib/commonjs/locale/translations/it.js.map +1 -1
  45. package/lib/commonjs/locale/translations/ja.js +0 -34
  46. package/lib/commonjs/locale/translations/ja.js.map +1 -1
  47. package/lib/commonjs/locale/translations/pt.js +0 -35
  48. package/lib/commonjs/locale/translations/pt.js.map +1 -1
  49. package/lib/commonjs/locale/translations/ru.js +0 -37
  50. package/lib/commonjs/locale/translations/ru.js.map +1 -1
  51. package/lib/commonjs/locale/translations/tr.js +0 -34
  52. package/lib/commonjs/locale/translations/tr.js.map +1 -1
  53. package/lib/commonjs/locale/translations/zh.js +0 -34
  54. package/lib/commonjs/locale/translations/zh.js.map +1 -1
  55. package/lib/commonjs/subtle-hover/SubtleHover.js +94 -31
  56. package/lib/commonjs/subtle-hover/SubtleHover.js.map +1 -1
  57. package/lib/commonjs/subtle-hover/index.js +7 -0
  58. package/lib/commonjs/subtle-hover/index.js.map +1 -1
  59. package/lib/commonjs/subtle-hover/use-press-highlight.js +95 -0
  60. package/lib/commonjs/subtle-hover/use-press-highlight.js.map +1 -0
  61. package/lib/module/icons/TEMPLATE.js +25 -158
  62. package/lib/module/icons/TEMPLATE.js.map +1 -1
  63. package/lib/module/icons/glyph-svg.js +41 -0
  64. package/lib/module/icons/glyph-svg.js.map +1 -0
  65. package/lib/module/icons/glyph.js +25 -0
  66. package/lib/module/icons/glyph.js.map +1 -0
  67. package/lib/module/icons/glyph.native.js +108 -0
  68. package/lib/module/icons/glyph.native.js.map +1 -0
  69. package/lib/module/index.js +0 -14
  70. package/lib/module/index.js.map +1 -1
  71. package/lib/module/index.web.js +0 -14
  72. package/lib/module/index.web.js.map +1 -1
  73. package/lib/module/locale/translations/ar.js +0 -39
  74. package/lib/module/locale/translations/ar.js.map +1 -1
  75. package/lib/module/locale/translations/bn.js +0 -34
  76. package/lib/module/locale/translations/bn.js.map +1 -1
  77. package/lib/module/locale/translations/ca.js +0 -35
  78. package/lib/module/locale/translations/ca.js.map +1 -1
  79. package/lib/module/locale/translations/de.js +0 -35
  80. package/lib/module/locale/translations/de.js.map +1 -1
  81. package/lib/module/locale/translations/es.js +0 -35
  82. package/lib/module/locale/translations/es.js.map +1 -1
  83. package/lib/module/locale/translations/fr.js +0 -35
  84. package/lib/module/locale/translations/fr.js.map +1 -1
  85. package/lib/module/locale/translations/hi.js +0 -35
  86. package/lib/module/locale/translations/hi.js.map +1 -1
  87. package/lib/module/locale/translations/id.js +0 -34
  88. package/lib/module/locale/translations/id.js.map +1 -1
  89. package/lib/module/locale/translations/it.js +0 -35
  90. package/lib/module/locale/translations/it.js.map +1 -1
  91. package/lib/module/locale/translations/ja.js +0 -34
  92. package/lib/module/locale/translations/ja.js.map +1 -1
  93. package/lib/module/locale/translations/pt.js +0 -35
  94. package/lib/module/locale/translations/pt.js.map +1 -1
  95. package/lib/module/locale/translations/ru.js +0 -37
  96. package/lib/module/locale/translations/ru.js.map +1 -1
  97. package/lib/module/locale/translations/tr.js +0 -34
  98. package/lib/module/locale/translations/tr.js.map +1 -1
  99. package/lib/module/locale/translations/zh.js +0 -34
  100. package/lib/module/locale/translations/zh.js.map +1 -1
  101. package/lib/module/subtle-hover/SubtleHover.js +95 -32
  102. package/lib/module/subtle-hover/SubtleHover.js.map +1 -1
  103. package/lib/module/subtle-hover/index.js +1 -0
  104. package/lib/module/subtle-hover/index.js.map +1 -1
  105. package/lib/module/subtle-hover/use-press-highlight.js +92 -0
  106. package/lib/module/subtle-hover/use-press-highlight.js.map +1 -0
  107. package/lib/typescript/commonjs/icons/TEMPLATE.d.ts +1 -1
  108. package/lib/typescript/commonjs/icons/TEMPLATE.d.ts.map +1 -1
  109. package/lib/typescript/commonjs/icons/glyph-svg.d.ts +17 -0
  110. package/lib/typescript/commonjs/icons/glyph-svg.d.ts.map +1 -0
  111. package/lib/typescript/commonjs/icons/glyph.d.ts +11 -0
  112. package/lib/typescript/commonjs/icons/glyph.d.ts.map +1 -0
  113. package/lib/typescript/commonjs/icons/glyph.native.d.ts +20 -0
  114. package/lib/typescript/commonjs/icons/glyph.native.d.ts.map +1 -0
  115. package/lib/typescript/commonjs/index.d.ts +0 -9
  116. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  117. package/lib/typescript/commonjs/index.web.d.ts +0 -9
  118. package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
  119. package/lib/typescript/commonjs/locale/translations/ar.d.ts.map +1 -1
  120. package/lib/typescript/commonjs/locale/translations/bn.d.ts.map +1 -1
  121. package/lib/typescript/commonjs/locale/translations/ca.d.ts.map +1 -1
  122. package/lib/typescript/commonjs/locale/translations/de.d.ts.map +1 -1
  123. package/lib/typescript/commonjs/locale/translations/es.d.ts.map +1 -1
  124. package/lib/typescript/commonjs/locale/translations/fr.d.ts.map +1 -1
  125. package/lib/typescript/commonjs/locale/translations/hi.d.ts.map +1 -1
  126. package/lib/typescript/commonjs/locale/translations/id.d.ts.map +1 -1
  127. package/lib/typescript/commonjs/locale/translations/it.d.ts.map +1 -1
  128. package/lib/typescript/commonjs/locale/translations/ja.d.ts.map +1 -1
  129. package/lib/typescript/commonjs/locale/translations/pt.d.ts.map +1 -1
  130. package/lib/typescript/commonjs/locale/translations/ru.d.ts.map +1 -1
  131. package/lib/typescript/commonjs/locale/translations/tr.d.ts.map +1 -1
  132. package/lib/typescript/commonjs/locale/translations/types.d.ts +0 -6
  133. package/lib/typescript/commonjs/locale/translations/types.d.ts.map +1 -1
  134. package/lib/typescript/commonjs/locale/translations/zh.d.ts.map +1 -1
  135. package/lib/typescript/commonjs/subtle-hover/SubtleHover.d.ts +4 -1
  136. package/lib/typescript/commonjs/subtle-hover/SubtleHover.d.ts.map +1 -1
  137. package/lib/typescript/commonjs/subtle-hover/index.d.ts +1 -0
  138. package/lib/typescript/commonjs/subtle-hover/index.d.ts.map +1 -1
  139. package/lib/typescript/commonjs/subtle-hover/types.d.ts +6 -0
  140. package/lib/typescript/commonjs/subtle-hover/types.d.ts.map +1 -1
  141. package/lib/typescript/commonjs/subtle-hover/use-press-highlight.d.ts +42 -0
  142. package/lib/typescript/commonjs/subtle-hover/use-press-highlight.d.ts.map +1 -0
  143. package/lib/typescript/module/icons/TEMPLATE.d.ts +1 -1
  144. package/lib/typescript/module/icons/TEMPLATE.d.ts.map +1 -1
  145. package/lib/typescript/module/icons/glyph-svg.d.ts +17 -0
  146. package/lib/typescript/module/icons/glyph-svg.d.ts.map +1 -0
  147. package/lib/typescript/module/icons/glyph.d.ts +11 -0
  148. package/lib/typescript/module/icons/glyph.d.ts.map +1 -0
  149. package/lib/typescript/module/icons/glyph.native.d.ts +20 -0
  150. package/lib/typescript/module/icons/glyph.native.d.ts.map +1 -0
  151. package/lib/typescript/module/index.d.ts +0 -9
  152. package/lib/typescript/module/index.d.ts.map +1 -1
  153. package/lib/typescript/module/index.web.d.ts +0 -9
  154. package/lib/typescript/module/index.web.d.ts.map +1 -1
  155. package/lib/typescript/module/locale/translations/ar.d.ts.map +1 -1
  156. package/lib/typescript/module/locale/translations/bn.d.ts.map +1 -1
  157. package/lib/typescript/module/locale/translations/ca.d.ts.map +1 -1
  158. package/lib/typescript/module/locale/translations/de.d.ts.map +1 -1
  159. package/lib/typescript/module/locale/translations/es.d.ts.map +1 -1
  160. package/lib/typescript/module/locale/translations/fr.d.ts.map +1 -1
  161. package/lib/typescript/module/locale/translations/hi.d.ts.map +1 -1
  162. package/lib/typescript/module/locale/translations/id.d.ts.map +1 -1
  163. package/lib/typescript/module/locale/translations/it.d.ts.map +1 -1
  164. package/lib/typescript/module/locale/translations/ja.d.ts.map +1 -1
  165. package/lib/typescript/module/locale/translations/pt.d.ts.map +1 -1
  166. package/lib/typescript/module/locale/translations/ru.d.ts.map +1 -1
  167. package/lib/typescript/module/locale/translations/tr.d.ts.map +1 -1
  168. package/lib/typescript/module/locale/translations/types.d.ts +0 -6
  169. package/lib/typescript/module/locale/translations/types.d.ts.map +1 -1
  170. package/lib/typescript/module/locale/translations/zh.d.ts.map +1 -1
  171. package/lib/typescript/module/subtle-hover/SubtleHover.d.ts +4 -1
  172. package/lib/typescript/module/subtle-hover/SubtleHover.d.ts.map +1 -1
  173. package/lib/typescript/module/subtle-hover/index.d.ts +1 -0
  174. package/lib/typescript/module/subtle-hover/index.d.ts.map +1 -1
  175. package/lib/typescript/module/subtle-hover/types.d.ts +6 -0
  176. package/lib/typescript/module/subtle-hover/types.d.ts.map +1 -1
  177. package/lib/typescript/module/subtle-hover/use-press-highlight.d.ts +42 -0
  178. package/lib/typescript/module/subtle-hover/use-press-highlight.d.ts.map +1 -0
  179. package/package.json +1 -52
  180. package/src/__tests__/support/public-part-classifications.json +0 -5
  181. package/src/icons/TEMPLATE.tsx +28 -49
  182. package/src/icons/glyph-svg.tsx +54 -0
  183. package/src/icons/glyph.native.tsx +138 -0
  184. package/src/icons/glyph.tsx +15 -0
  185. package/src/index.ts +0 -62
  186. package/src/index.web.ts +0 -62
  187. package/src/locale/translations/ar.ts +0 -36
  188. package/src/locale/translations/bn.ts +0 -36
  189. package/src/locale/translations/ca.ts +0 -36
  190. package/src/locale/translations/de.ts +0 -36
  191. package/src/locale/translations/es.ts +0 -36
  192. package/src/locale/translations/fr.ts +0 -36
  193. package/src/locale/translations/hi.ts +0 -36
  194. package/src/locale/translations/id.ts +0 -36
  195. package/src/locale/translations/it.ts +0 -36
  196. package/src/locale/translations/ja.ts +0 -36
  197. package/src/locale/translations/pt.ts +0 -36
  198. package/src/locale/translations/ru.ts +0 -36
  199. package/src/locale/translations/tr.ts +0 -36
  200. package/src/locale/translations/types.ts +0 -6
  201. package/src/locale/translations/zh.ts +0 -36
  202. package/src/subtle-hover/SubtleHover.tsx +33 -2
  203. package/src/subtle-hover/index.ts +5 -0
  204. package/src/subtle-hover/types.ts +6 -0
  205. package/src/subtle-hover/use-press-highlight.ts +93 -0
  206. package/docs/checkout-summary.mdx +0 -94
  207. package/docs/order-confirmation.mdx +0 -66
  208. package/docs/vendor-card.mdx +0 -83
  209. package/lib/commonjs/checkout-summary/CheckoutConfirm.js +0 -243
  210. package/lib/commonjs/checkout-summary/CheckoutConfirm.js.map +0 -1
  211. package/lib/commonjs/checkout-summary/CheckoutSummary.js +0 -432
  212. package/lib/commonjs/checkout-summary/CheckoutSummary.js.map +0 -1
  213. package/lib/commonjs/checkout-summary/CheckoutSummaryRow.js +0 -277
  214. package/lib/commonjs/checkout-summary/CheckoutSummaryRow.js.map +0 -1
  215. package/lib/commonjs/checkout-summary/constants.js +0 -66
  216. package/lib/commonjs/checkout-summary/constants.js.map +0 -1
  217. package/lib/commonjs/checkout-summary/index.js +0 -95
  218. package/lib/commonjs/checkout-summary/index.js.map +0 -1
  219. package/lib/commonjs/checkout-summary/messages.js +0 -23
  220. package/lib/commonjs/checkout-summary/messages.js.map +0 -1
  221. package/lib/commonjs/checkout-summary/shared.js +0 -43
  222. package/lib/commonjs/checkout-summary/shared.js.map +0 -1
  223. package/lib/commonjs/checkout-summary/types.js +0 -6
  224. package/lib/commonjs/checkout-summary/types.js.map +0 -1
  225. package/lib/commonjs/order-confirmation/OrderConfirmation.js +0 -305
  226. package/lib/commonjs/order-confirmation/OrderConfirmation.js.map +0 -1
  227. package/lib/commonjs/order-confirmation/constants.js +0 -26
  228. package/lib/commonjs/order-confirmation/constants.js.map +0 -1
  229. package/lib/commonjs/order-confirmation/index.js +0 -38
  230. package/lib/commonjs/order-confirmation/index.js.map +0 -1
  231. package/lib/commonjs/order-confirmation/messages.js +0 -18
  232. package/lib/commonjs/order-confirmation/messages.js.map +0 -1
  233. package/lib/commonjs/order-confirmation/types.js +0 -6
  234. package/lib/commonjs/order-confirmation/types.js.map +0 -1
  235. package/lib/commonjs/vendor-card/VendorCard.js +0 -1051
  236. package/lib/commonjs/vendor-card/VendorCard.js.map +0 -1
  237. package/lib/commonjs/vendor-card/constants.js +0 -54
  238. package/lib/commonjs/vendor-card/constants.js.map +0 -1
  239. package/lib/commonjs/vendor-card/index.js +0 -69
  240. package/lib/commonjs/vendor-card/index.js.map +0 -1
  241. package/lib/commonjs/vendor-card/message-helpers.js +0 -23
  242. package/lib/commonjs/vendor-card/message-helpers.js.map +0 -1
  243. package/lib/commonjs/vendor-card/messages.js +0 -32
  244. package/lib/commonjs/vendor-card/messages.js.map +0 -1
  245. package/lib/commonjs/vendor-card/shared.js +0 -116
  246. package/lib/commonjs/vendor-card/shared.js.map +0 -1
  247. package/lib/commonjs/vendor-card/types.js +0 -6
  248. package/lib/commonjs/vendor-card/types.js.map +0 -1
  249. package/lib/module/checkout-summary/CheckoutConfirm.js +0 -237
  250. package/lib/module/checkout-summary/CheckoutConfirm.js.map +0 -1
  251. package/lib/module/checkout-summary/CheckoutSummary.js +0 -426
  252. package/lib/module/checkout-summary/CheckoutSummary.js.map +0 -1
  253. package/lib/module/checkout-summary/CheckoutSummaryRow.js +0 -273
  254. package/lib/module/checkout-summary/CheckoutSummaryRow.js.map +0 -1
  255. package/lib/module/checkout-summary/constants.js +0 -63
  256. package/lib/module/checkout-summary/constants.js.map +0 -1
  257. package/lib/module/checkout-summary/index.js +0 -8
  258. package/lib/module/checkout-summary/index.js.map +0 -1
  259. package/lib/module/checkout-summary/messages.js +0 -20
  260. package/lib/module/checkout-summary/messages.js.map +0 -1
  261. package/lib/module/checkout-summary/shared.js +0 -36
  262. package/lib/module/checkout-summary/shared.js.map +0 -1
  263. package/lib/module/checkout-summary/types.js +0 -4
  264. package/lib/module/checkout-summary/types.js.map +0 -1
  265. package/lib/module/order-confirmation/OrderConfirmation.js +0 -299
  266. package/lib/module/order-confirmation/OrderConfirmation.js.map +0 -1
  267. package/lib/module/order-confirmation/constants.js +0 -23
  268. package/lib/module/order-confirmation/constants.js.map +0 -1
  269. package/lib/module/order-confirmation/index.js +0 -5
  270. package/lib/module/order-confirmation/index.js.map +0 -1
  271. package/lib/module/order-confirmation/messages.js +0 -15
  272. package/lib/module/order-confirmation/messages.js.map +0 -1
  273. package/lib/module/order-confirmation/types.js +0 -4
  274. package/lib/module/order-confirmation/types.js.map +0 -1
  275. package/lib/module/vendor-card/VendorCard.js +0 -1046
  276. package/lib/module/vendor-card/VendorCard.js.map +0 -1
  277. package/lib/module/vendor-card/constants.js +0 -50
  278. package/lib/module/vendor-card/constants.js.map +0 -1
  279. package/lib/module/vendor-card/index.js +0 -6
  280. package/lib/module/vendor-card/index.js.map +0 -1
  281. package/lib/module/vendor-card/message-helpers.js +0 -18
  282. package/lib/module/vendor-card/message-helpers.js.map +0 -1
  283. package/lib/module/vendor-card/messages.js +0 -29
  284. package/lib/module/vendor-card/messages.js.map +0 -1
  285. package/lib/module/vendor-card/shared.js +0 -107
  286. package/lib/module/vendor-card/shared.js.map +0 -1
  287. package/lib/module/vendor-card/types.js +0 -4
  288. package/lib/module/vendor-card/types.js.map +0 -1
  289. package/lib/typescript/commonjs/checkout-summary/CheckoutConfirm.d.ts +0 -40
  290. package/lib/typescript/commonjs/checkout-summary/CheckoutConfirm.d.ts.map +0 -1
  291. package/lib/typescript/commonjs/checkout-summary/CheckoutSummary.d.ts +0 -36
  292. package/lib/typescript/commonjs/checkout-summary/CheckoutSummary.d.ts.map +0 -1
  293. package/lib/typescript/commonjs/checkout-summary/CheckoutSummaryRow.d.ts +0 -29
  294. package/lib/typescript/commonjs/checkout-summary/CheckoutSummaryRow.d.ts.map +0 -1
  295. package/lib/typescript/commonjs/checkout-summary/constants.d.ts +0 -39
  296. package/lib/typescript/commonjs/checkout-summary/constants.d.ts.map +0 -1
  297. package/lib/typescript/commonjs/checkout-summary/index.d.ts +0 -8
  298. package/lib/typescript/commonjs/checkout-summary/index.d.ts.map +0 -1
  299. package/lib/typescript/commonjs/checkout-summary/messages.d.ts +0 -23
  300. package/lib/typescript/commonjs/checkout-summary/messages.d.ts.map +0 -1
  301. package/lib/typescript/commonjs/checkout-summary/shared.d.ts +0 -27
  302. package/lib/typescript/commonjs/checkout-summary/shared.d.ts.map +0 -1
  303. package/lib/typescript/commonjs/checkout-summary/types.d.ts +0 -147
  304. package/lib/typescript/commonjs/checkout-summary/types.d.ts.map +0 -1
  305. package/lib/typescript/commonjs/order-confirmation/OrderConfirmation.d.ts +0 -40
  306. package/lib/typescript/commonjs/order-confirmation/OrderConfirmation.d.ts.map +0 -1
  307. package/lib/typescript/commonjs/order-confirmation/constants.d.ts +0 -17
  308. package/lib/typescript/commonjs/order-confirmation/constants.d.ts.map +0 -1
  309. package/lib/typescript/commonjs/order-confirmation/index.d.ts +0 -4
  310. package/lib/typescript/commonjs/order-confirmation/index.d.ts.map +0 -1
  311. package/lib/typescript/commonjs/order-confirmation/messages.d.ts +0 -12
  312. package/lib/typescript/commonjs/order-confirmation/messages.d.ts.map +0 -1
  313. package/lib/typescript/commonjs/order-confirmation/types.d.ts +0 -88
  314. package/lib/typescript/commonjs/order-confirmation/types.d.ts.map +0 -1
  315. package/lib/typescript/commonjs/vendor-card/VendorCard.d.ts +0 -6
  316. package/lib/typescript/commonjs/vendor-card/VendorCard.d.ts.map +0 -1
  317. package/lib/typescript/commonjs/vendor-card/constants.d.ts +0 -30
  318. package/lib/typescript/commonjs/vendor-card/constants.d.ts.map +0 -1
  319. package/lib/typescript/commonjs/vendor-card/index.d.ts +0 -5
  320. package/lib/typescript/commonjs/vendor-card/index.d.ts.map +0 -1
  321. package/lib/typescript/commonjs/vendor-card/message-helpers.d.ts +0 -13
  322. package/lib/typescript/commonjs/vendor-card/message-helpers.d.ts.map +0 -1
  323. package/lib/typescript/commonjs/vendor-card/messages.d.ts +0 -22
  324. package/lib/typescript/commonjs/vendor-card/messages.d.ts.map +0 -1
  325. package/lib/typescript/commonjs/vendor-card/shared.d.ts +0 -24
  326. package/lib/typescript/commonjs/vendor-card/shared.d.ts.map +0 -1
  327. package/lib/typescript/commonjs/vendor-card/types.d.ts +0 -111
  328. package/lib/typescript/commonjs/vendor-card/types.d.ts.map +0 -1
  329. package/lib/typescript/module/checkout-summary/CheckoutConfirm.d.ts +0 -40
  330. package/lib/typescript/module/checkout-summary/CheckoutConfirm.d.ts.map +0 -1
  331. package/lib/typescript/module/checkout-summary/CheckoutSummary.d.ts +0 -36
  332. package/lib/typescript/module/checkout-summary/CheckoutSummary.d.ts.map +0 -1
  333. package/lib/typescript/module/checkout-summary/CheckoutSummaryRow.d.ts +0 -29
  334. package/lib/typescript/module/checkout-summary/CheckoutSummaryRow.d.ts.map +0 -1
  335. package/lib/typescript/module/checkout-summary/constants.d.ts +0 -39
  336. package/lib/typescript/module/checkout-summary/constants.d.ts.map +0 -1
  337. package/lib/typescript/module/checkout-summary/index.d.ts +0 -8
  338. package/lib/typescript/module/checkout-summary/index.d.ts.map +0 -1
  339. package/lib/typescript/module/checkout-summary/messages.d.ts +0 -23
  340. package/lib/typescript/module/checkout-summary/messages.d.ts.map +0 -1
  341. package/lib/typescript/module/checkout-summary/shared.d.ts +0 -27
  342. package/lib/typescript/module/checkout-summary/shared.d.ts.map +0 -1
  343. package/lib/typescript/module/checkout-summary/types.d.ts +0 -147
  344. package/lib/typescript/module/checkout-summary/types.d.ts.map +0 -1
  345. package/lib/typescript/module/order-confirmation/OrderConfirmation.d.ts +0 -40
  346. package/lib/typescript/module/order-confirmation/OrderConfirmation.d.ts.map +0 -1
  347. package/lib/typescript/module/order-confirmation/constants.d.ts +0 -17
  348. package/lib/typescript/module/order-confirmation/constants.d.ts.map +0 -1
  349. package/lib/typescript/module/order-confirmation/index.d.ts +0 -4
  350. package/lib/typescript/module/order-confirmation/index.d.ts.map +0 -1
  351. package/lib/typescript/module/order-confirmation/messages.d.ts +0 -12
  352. package/lib/typescript/module/order-confirmation/messages.d.ts.map +0 -1
  353. package/lib/typescript/module/order-confirmation/types.d.ts +0 -88
  354. package/lib/typescript/module/order-confirmation/types.d.ts.map +0 -1
  355. package/lib/typescript/module/vendor-card/VendorCard.d.ts +0 -6
  356. package/lib/typescript/module/vendor-card/VendorCard.d.ts.map +0 -1
  357. package/lib/typescript/module/vendor-card/constants.d.ts +0 -30
  358. package/lib/typescript/module/vendor-card/constants.d.ts.map +0 -1
  359. package/lib/typescript/module/vendor-card/index.d.ts +0 -5
  360. package/lib/typescript/module/vendor-card/index.d.ts.map +0 -1
  361. package/lib/typescript/module/vendor-card/message-helpers.d.ts +0 -13
  362. package/lib/typescript/module/vendor-card/message-helpers.d.ts.map +0 -1
  363. package/lib/typescript/module/vendor-card/messages.d.ts +0 -22
  364. package/lib/typescript/module/vendor-card/messages.d.ts.map +0 -1
  365. package/lib/typescript/module/vendor-card/shared.d.ts +0 -24
  366. package/lib/typescript/module/vendor-card/shared.d.ts.map +0 -1
  367. package/lib/typescript/module/vendor-card/types.d.ts +0 -111
  368. package/lib/typescript/module/vendor-card/types.d.ts.map +0 -1
  369. package/src/checkout-summary/CheckoutConfirm.tsx +0 -119
  370. package/src/checkout-summary/CheckoutSummary.tsx +0 -221
  371. package/src/checkout-summary/CheckoutSummaryRow.tsx +0 -172
  372. package/src/checkout-summary/constants.ts +0 -64
  373. package/src/checkout-summary/index.ts +0 -22
  374. package/src/checkout-summary/messages.ts +0 -33
  375. package/src/checkout-summary/shared.ts +0 -40
  376. package/src/checkout-summary/types.ts +0 -152
  377. package/src/order-confirmation/OrderConfirmation.tsx +0 -197
  378. package/src/order-confirmation/constants.ts +0 -20
  379. package/src/order-confirmation/index.ts +0 -12
  380. package/src/order-confirmation/messages.ts +0 -18
  381. package/src/order-confirmation/types.ts +0 -98
  382. package/src/vendor-card/VendorCard.tsx +0 -509
  383. package/src/vendor-card/constants.ts +0 -58
  384. package/src/vendor-card/index.ts +0 -15
  385. package/src/vendor-card/message-helpers.ts +0 -20
  386. package/src/vendor-card/messages.ts +0 -36
  387. package/src/vendor-card/shared.ts +0 -136
  388. package/src/vendor-card/types.ts +0 -115
package/NOTICE CHANGED
@@ -23,6 +23,8 @@ derived source file names its origin in its header.
23
23
  ---------------------------- ------------------- ---------------------------
24
24
  react-native-teleport 1.2.0 MIT src/media-flight/
25
25
  sonner-native 0.26.4 MIT src/toast/
26
+ react-native-svg 15.16.0 MIT android/src/main/java/
27
+ so/oxy/bloom/icons/
26
28
  expo-glass-tabs 0.1.1 MIT src/tab-bar/,
27
29
  src/progressive-blur/
28
30
  Bluesky social-app MIT src/motion/,
@@ -97,6 +99,32 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
97
99
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
98
100
  SOFTWARE.
99
101
 
102
+ ----------------------------------------------------------------------------
103
+ react-native-svg — https://github.com/software-mansion/react-native-svg
104
+ ----------------------------------------------------------------------------
105
+
106
+ The MIT License (MIT)
107
+
108
+ Copyright (c) [2015-2016] [Horcrux]
109
+
110
+ Permission is hereby granted, free of charge, to any person obtaining a copy
111
+ of this software and associated documentation files (the "Software"), to deal
112
+ in the Software without restriction, including without limitation the rights
113
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
114
+ copies of the Software, and to permit persons to whom the Software is
115
+ furnished to do so, subject to the following conditions:
116
+
117
+ The above copyright notice and this permission notice shall be included in all
118
+ copies or substantial portions of the Software.
119
+
120
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
121
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
122
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
123
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
124
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
125
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
126
+ SOFTWARE.
127
+
100
128
  ----------------------------------------------------------------------------
101
129
  expo-glass-tabs — https://github.com/davidmokos/expo-glass-tabs
102
130
  ----------------------------------------------------------------------------
@@ -5,10 +5,12 @@ import com.facebook.react.ReactPackage
5
5
  import com.facebook.react.bridge.NativeModule
6
6
  import com.facebook.react.bridge.ReactApplicationContext
7
7
  import com.facebook.react.uimanager.ViewManager
8
+ import so.oxy.bloom.icons.BloomIconManager
8
9
 
9
10
  class BloomPackage : ReactPackage {
10
11
  override fun createNativeModules(context: ReactApplicationContext): List<NativeModule> = emptyList()
11
12
  override fun createViewManagers(context: ReactApplicationContext): List<ViewManager<*, *>> =
12
- PredictiveBackManagers.create() +
13
+ listOf<ViewManager<*, *>>(BloomIconManager()) +
14
+ PredictiveBackManagers.create() +
13
15
  if (Build.VERSION.SDK_INT >= 31) listOf(ComposerLightManager()) else emptyList()
14
16
  }
@@ -0,0 +1,251 @@
1
+ package so.oxy.bloom.icons
2
+
3
+ import android.content.Context
4
+ import android.graphics.Bitmap
5
+ import android.graphics.Canvas
6
+ import android.graphics.LinearGradient
7
+ import android.graphics.Matrix
8
+ import android.graphics.Paint
9
+ import android.graphics.Path
10
+ import android.graphics.RectF
11
+ import android.graphics.Shader
12
+ import android.util.LruCache
13
+ import android.view.View
14
+ import com.facebook.react.bridge.ReadableArray
15
+ import com.facebook.react.uimanager.SimpleViewManager
16
+ import com.facebook.react.uimanager.ThemedReactContext
17
+ import com.facebook.react.uimanager.annotations.ReactProp
18
+
19
+ /**
20
+ * A Bloom icon as ONE native view, drawn on its own hardware canvas.
21
+ *
22
+ * react-native-svg draws the same glyph as three views (`SvgView`, a group and
23
+ * the path) and rasterises it in software into a fresh bitmap on the UI thread
24
+ * every time the view draws. This view rasterises a glyph once per size and
25
+ * paint for the whole process ([Raster]) and records one `drawBitmap` per draw.
26
+ *
27
+ * Why a raster and not `Canvas.drawPath` on the hardware canvas: the GPU's
28
+ * anti-aliasing is not the CPU rasteriser's. Measured on a Pixel 8a over all 589
29
+ * glyphs (16, 20 and 24dp, solid, translucent, gradient and currentColor
30
+ * paints), hardware paths differed from react-native-svg at the edge of every
31
+ * glyph, about a third of its inked pixels, by up to 131 of 255 levels; this
32
+ * raster is react-native-svg's own, so the pixels are the same.
33
+ *
34
+ * The drawing is react-native-svg's, step for step: the path parsed at the
35
+ * screen density by its own parser ([IconPathParser]), an ARGB bitmap the size
36
+ * of the view, the `xMidYMid meet` viewBox transform, the even-odd fill rule,
37
+ * its paint flags, its stroke miter (4 x density), the one gradient Bloom icons
38
+ * draw (`useCommonSVGProps`: x1 0, y1 0, x2 100%, y2 0 of each path's bounds,
39
+ * `rotate(45)`), and its bitmap paint. The JS contract is
40
+ * `src/icons/glyph.native.tsx`.
41
+ */
42
+ class BloomIconManager : SimpleViewManager<BloomIcon>() {
43
+ override fun getName() = "BloomIconV1"
44
+ override fun createViewInstance(context: ThemedReactContext) = BloomIcon(context)
45
+
46
+ @ReactProp(name = "paths")
47
+ fun paths(view: BloomIcon, values: ReadableArray?) {
48
+ view.sources = if (values == null) emptyList() else (0 until values.size()).map { values.getString(it) ?: "" }
49
+ }
50
+
51
+ /** The glyph's `viewBox` attribute, `minX minY width height`, split as react-native-svg's `extractViewBox`. */
52
+ @ReactProp(name = "viewBox")
53
+ fun viewBox(view: BloomIcon, value: String?) {
54
+ val parts = value?.trim()?.split(VIEW_BOX_SEPARATOR)?.mapNotNull { it.toFloatOrNull() }
55
+ view.viewBox = if (parts == null || parts.size != 4) DEFAULT_VIEW_BOX else parts.toFloatArray()
56
+ view.invalidate()
57
+ }
58
+
59
+ /** The paint's colour; null draws nothing (`fill="none"`). */
60
+ @ReactProp(name = "fill", customType = "Color")
61
+ fun fill(view: BloomIcon, color: Int?) {
62
+ view.color = color
63
+ view.invalidate()
64
+ }
65
+
66
+ /** 0 fills the path; a width strokes it, in viewBox units. */
67
+ @ReactProp(name = "strokeWidth", defaultDouble = 0.0)
68
+ fun strokeWidth(view: BloomIcon, value: Double) {
69
+ view.strokeWidth = value
70
+ view.invalidate()
71
+ }
72
+
73
+ @ReactProp(name = "strokeLinecap")
74
+ fun strokeLinecap(view: BloomIcon, value: String?) {
75
+ view.cap = when (value) { "round" -> Paint.Cap.ROUND; "square" -> Paint.Cap.SQUARE; else -> Paint.Cap.BUTT }
76
+ view.invalidate()
77
+ }
78
+
79
+ @ReactProp(name = "strokeLinejoin")
80
+ fun strokeLinejoin(view: BloomIcon, value: String?) {
81
+ view.join = when (value) { "round" -> Paint.Join.ROUND; "bevel" -> Paint.Join.BEVEL; else -> Paint.Join.MITER }
82
+ view.invalidate()
83
+ }
84
+
85
+ /** `[offset, colour, offset, colour, …]`, react-native-svg's stop list; null paints [fill]. */
86
+ @ReactProp(name = "gradient")
87
+ fun gradient(view: BloomIcon, values: ReadableArray?) {
88
+ if (values == null || values.size() < 2) {
89
+ view.stops = null
90
+ view.stopColors = null
91
+ } else {
92
+ val count = values.size() / 2
93
+ var stops = FloatArray(count) { values.getDouble(it * 2).toFloat() }
94
+ var colors = IntArray(count) { values.getDouble(it * 2 + 1).toLong().toInt() }
95
+ // react-native-svg's Brush: a single stop paints as two at the same spot.
96
+ if (count == 1) {
97
+ stops = floatArrayOf(stops[0], stops[0])
98
+ colors = intArrayOf(colors[0], colors[0])
99
+ }
100
+ view.stops = stops
101
+ view.stopColors = colors
102
+ }
103
+ view.invalidate()
104
+ }
105
+
106
+ companion object {
107
+ val DEFAULT_VIEW_BOX = floatArrayOf(0f, 0f, 24f, 24f)
108
+ private val VIEW_BOX_SEPARATOR = Regex("\\s*,\\s*|\\s+")
109
+ }
110
+ }
111
+
112
+ class BloomIcon(context: Context) : View(context) {
113
+ private val scale = resources.displayMetrics.density
114
+ private val paint = Paint()
115
+ private val transform = Matrix()
116
+ // react-native-svg's flags for drawing its bitmap onto the view's canvas.
117
+ private val bitmapPaint = Paint(
118
+ Paint.ANTI_ALIAS_FLAG or Paint.DEV_KERN_TEXT_FLAG or Paint.SUBPIXEL_TEXT_FLAG or Paint.FILTER_BITMAP_FLAG,
119
+ )
120
+ // react-native-svg's `rotate(45)`: cos and sin of 45 degrees in double, then float.
121
+ private val gradientMatrix = Matrix().apply {
122
+ val c = Math.cos(Math.PI / 180 * 45).toFloat()
123
+ val s = Math.sin(Math.PI / 180 * 45).toFloat()
124
+ setValues(floatArrayOf(c, -s, 0f, s, c, 0f, 0f, 0f, 1f))
125
+ }
126
+ private var glyph: Glyph? = null
127
+
128
+ var sources: List<String> = emptyList()
129
+ set(value) {
130
+ if (field != value) {
131
+ field = value
132
+ glyph = null
133
+ invalidate()
134
+ }
135
+ }
136
+ var viewBox = BloomIconManager.DEFAULT_VIEW_BOX
137
+ var color: Int? = null
138
+ var strokeWidth = 0.0
139
+ var cap = Paint.Cap.BUTT
140
+ var join = Paint.Join.MITER
141
+ var stops: FloatArray? = null
142
+ var stopColors: IntArray? = null
143
+
144
+ override fun onDraw(canvas: Canvas) {
145
+ val w = width
146
+ val h = height
147
+ if (w < 1 || h < 1) return
148
+ val color = color
149
+ if (color == null && stops == null) return
150
+ val glyph = glyph ?: Glyph.of(sources, scale)?.also { glyph = it } ?: return
151
+ val key = rasterKey(glyph, w, h, color)
152
+ val raster = Raster.get(key) ?: rasterise(glyph, w, h, color).also { Raster.put(key, it) }
153
+ canvas.drawBitmap(raster, 0f, 0f, bitmapPaint)
154
+ }
155
+
156
+ private fun rasterKey(glyph: Glyph, w: Int, h: Int, color: Int?): String =
157
+ "${glyph.key}|${viewBox.joinToString(",")}|${w}x$h|$color|$strokeWidth|$cap|$join|" +
158
+ "${stops?.joinToString(",")}|${stopColors?.joinToString(",")}"
159
+
160
+ /**
161
+ * The glyph as react-native-svg's `SvgView.drawOutput` rasterises it: an ARGB
162
+ * bitmap the size of the view, the viewBox transform, then each path.
163
+ */
164
+ private fun rasterise(glyph: Glyph, w: Int, h: Int, color: Int?): Bitmap {
165
+ val bitmap = Bitmap.createBitmap(w, h, Bitmap.Config.ARGB_8888)
166
+ val canvas = Canvas(bitmap)
167
+ viewBoxTransform(w.toFloat(), h.toFloat())
168
+ canvas.concat(transform)
169
+ val stops = stops
170
+ val stopColors = stopColors
171
+ for (index in glyph.paths.indices) {
172
+ paint.reset()
173
+ paint.flags = Paint.ANTI_ALIAS_FLAG or Paint.DEV_KERN_TEXT_FLAG or Paint.SUBPIXEL_TEXT_FLAG
174
+ if (strokeWidth > 0.0) {
175
+ paint.style = Paint.Style.STROKE
176
+ paint.strokeCap = cap
177
+ paint.strokeJoin = join
178
+ paint.strokeMiter = 4f * scale
179
+ paint.strokeWidth = (strokeWidth * scale).toFloat()
180
+ } else {
181
+ paint.style = Paint.Style.FILL
182
+ }
183
+ if (stops != null && stopColors != null) {
184
+ val box = glyph.bounds[index]
185
+ val shader = LinearGradient(box.left, box.top, box.left + box.width(), box.top, stopColors, stops, Shader.TileMode.CLAMP)
186
+ shader.setLocalMatrix(gradientMatrix)
187
+ paint.shader = shader
188
+ } else if (color != null) {
189
+ paint.color = color
190
+ }
191
+ canvas.drawPath(glyph.paths[index], paint)
192
+ }
193
+ return bitmap
194
+ }
195
+
196
+ /** react-native-svg's `ViewBox.getTransform` for `xMidYMid meet`, in its order and precision. */
197
+ private fun viewBoxTransform(width: Float, height: Float) {
198
+ val vbX = (viewBox[0] * scale).toDouble()
199
+ val vbY = (viewBox[1] * scale).toDouble()
200
+ val vbWidth = ((viewBox[0] + viewBox[2]) * scale - viewBox[0] * scale).toDouble()
201
+ val vbHeight = ((viewBox[1] + viewBox[3]) * scale - viewBox[1] * scale).toDouble()
202
+ val s = minOf(width / vbWidth, height / vbHeight)
203
+ val translateX = -(vbX * s) + (width - vbWidth * s) / 2.0
204
+ val translateY = -(vbY * s) + (height - vbHeight * s) / 2.0
205
+ transform.reset()
206
+ transform.postTranslate(translateX.toFloat(), translateY.toFloat())
207
+ transform.preScale(s.toFloat(), s.toFloat())
208
+ }
209
+ }
210
+
211
+ /** A glyph's subpaths at one density, parsed once per process and shared by every view. */
212
+ internal class Glyph private constructor(val key: String, val paths: Array<Path>, val bounds: Array<RectF>) {
213
+ companion object {
214
+ private val cache = HashMap<String, Glyph>()
215
+
216
+ fun of(sources: List<String>, scale: Float): Glyph? {
217
+ if (sources.isEmpty()) return null
218
+ val key = scale.toString() + '|' + sources.joinToString("|")
219
+ cache[key]?.let { return it }
220
+ val paths = try {
221
+ Array(sources.size) { IconPathParser.parse(sources[it], scale).apply { fillType = Path.FillType.EVEN_ODD } }
222
+ } catch (error: IllegalArgumentException) {
223
+ return null
224
+ } catch (error: IndexOutOfBoundsException) {
225
+ return null
226
+ }
227
+ val bounds = Array(paths.size) { RectF().also { box -> paths[it].computeBounds(box, true) } }
228
+ return Glyph(key, paths, bounds).also { cache[key] = it }
229
+ }
230
+ }
231
+ }
232
+
233
+ /**
234
+ * Every view's rasters, shared: one bitmap per glyph, size and paint for the
235
+ * whole process, so a glyph is rasterised once however many views draw it, and
236
+ * the hardware canvas uploads it once. Never recycled here: a display list may
237
+ * still hold an evicted bitmap, and the GC frees it after.
238
+ */
239
+ internal object Raster {
240
+ private val cache = object : LruCache<String, Bitmap>(8 * 1024 * 1024) {
241
+ override fun sizeOf(key: String, value: Bitmap) = value.byteCount
242
+ }
243
+
244
+ fun get(key: String): Bitmap? = cache.get(key)
245
+
246
+ fun put(key: String, bitmap: Bitmap) {
247
+ cache.put(key, bitmap)
248
+ }
249
+
250
+ fun count(): Int = cache.snapshot().size
251
+ }