@oxy.so/bloom 23.6.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.
- package/NOTICE +28 -0
- package/android/src/main/java/so/oxy/bloom/BloomPackage.kt +3 -1
- package/android/src/main/java/so/oxy/bloom/icons/BloomIcon.kt +251 -0
- package/android/src/main/java/so/oxy/bloom/icons/IconPathParser.java +660 -0
- package/docs/adoption-matrix.mdx +1 -4
- package/docs/bloom-language-codemod.mdx +6 -2
- package/docs/bloom-language-modifiers.mdx +21 -5
- package/docs/bloom-language-nodes.mdx +3 -58
- package/docs/bloom-language.mdx +15 -36
- package/docs/empty-state.mdx +2 -3
- package/docs/icons.mdx +29 -1
- package/docs/public-parts.mdx +2 -7
- package/docs/task-catalog.json +1 -1
- package/docs/task-catalog.mdx +1 -1
- package/lib/commonjs/icons/TEMPLATE.js +25 -160
- package/lib/commonjs/icons/TEMPLATE.js.map +1 -1
- package/lib/commonjs/icons/glyph-svg.js +47 -0
- package/lib/commonjs/icons/glyph-svg.js.map +1 -0
- package/lib/commonjs/icons/glyph.js +29 -0
- package/lib/commonjs/icons/glyph.js.map +1 -0
- package/lib/commonjs/icons/glyph.native.js +112 -0
- package/lib/commonjs/icons/glyph.native.js.map +1 -0
- package/lib/commonjs/index.js +279 -485
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/index.web.js +279 -485
- package/lib/commonjs/index.web.js.map +1 -1
- package/lib/commonjs/locale/translations/ar.js +0 -39
- package/lib/commonjs/locale/translations/ar.js.map +1 -1
- package/lib/commonjs/locale/translations/bn.js +0 -34
- package/lib/commonjs/locale/translations/bn.js.map +1 -1
- package/lib/commonjs/locale/translations/ca.js +0 -35
- package/lib/commonjs/locale/translations/ca.js.map +1 -1
- package/lib/commonjs/locale/translations/de.js +0 -35
- package/lib/commonjs/locale/translations/de.js.map +1 -1
- package/lib/commonjs/locale/translations/es.js +0 -35
- package/lib/commonjs/locale/translations/es.js.map +1 -1
- package/lib/commonjs/locale/translations/fr.js +0 -35
- package/lib/commonjs/locale/translations/fr.js.map +1 -1
- package/lib/commonjs/locale/translations/hi.js +0 -35
- package/lib/commonjs/locale/translations/hi.js.map +1 -1
- package/lib/commonjs/locale/translations/id.js +0 -34
- package/lib/commonjs/locale/translations/id.js.map +1 -1
- package/lib/commonjs/locale/translations/it.js +0 -35
- package/lib/commonjs/locale/translations/it.js.map +1 -1
- package/lib/commonjs/locale/translations/ja.js +0 -34
- package/lib/commonjs/locale/translations/ja.js.map +1 -1
- package/lib/commonjs/locale/translations/pt.js +0 -35
- package/lib/commonjs/locale/translations/pt.js.map +1 -1
- package/lib/commonjs/locale/translations/ru.js +0 -37
- package/lib/commonjs/locale/translations/ru.js.map +1 -1
- package/lib/commonjs/locale/translations/tr.js +0 -34
- package/lib/commonjs/locale/translations/tr.js.map +1 -1
- package/lib/commonjs/locale/translations/zh.js +0 -34
- package/lib/commonjs/locale/translations/zh.js.map +1 -1
- package/lib/module/icons/TEMPLATE.js +25 -158
- package/lib/module/icons/TEMPLATE.js.map +1 -1
- package/lib/module/icons/glyph-svg.js +41 -0
- package/lib/module/icons/glyph-svg.js.map +1 -0
- package/lib/module/icons/glyph.js +25 -0
- package/lib/module/icons/glyph.js.map +1 -0
- package/lib/module/icons/glyph.native.js +108 -0
- package/lib/module/icons/glyph.native.js.map +1 -0
- package/lib/module/index.js +0 -14
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js +0 -14
- package/lib/module/index.web.js.map +1 -1
- package/lib/module/locale/translations/ar.js +0 -39
- package/lib/module/locale/translations/ar.js.map +1 -1
- package/lib/module/locale/translations/bn.js +0 -34
- package/lib/module/locale/translations/bn.js.map +1 -1
- package/lib/module/locale/translations/ca.js +0 -35
- package/lib/module/locale/translations/ca.js.map +1 -1
- package/lib/module/locale/translations/de.js +0 -35
- package/lib/module/locale/translations/de.js.map +1 -1
- package/lib/module/locale/translations/es.js +0 -35
- package/lib/module/locale/translations/es.js.map +1 -1
- package/lib/module/locale/translations/fr.js +0 -35
- package/lib/module/locale/translations/fr.js.map +1 -1
- package/lib/module/locale/translations/hi.js +0 -35
- package/lib/module/locale/translations/hi.js.map +1 -1
- package/lib/module/locale/translations/id.js +0 -34
- package/lib/module/locale/translations/id.js.map +1 -1
- package/lib/module/locale/translations/it.js +0 -35
- package/lib/module/locale/translations/it.js.map +1 -1
- package/lib/module/locale/translations/ja.js +0 -34
- package/lib/module/locale/translations/ja.js.map +1 -1
- package/lib/module/locale/translations/pt.js +0 -35
- package/lib/module/locale/translations/pt.js.map +1 -1
- package/lib/module/locale/translations/ru.js +0 -37
- package/lib/module/locale/translations/ru.js.map +1 -1
- package/lib/module/locale/translations/tr.js +0 -34
- package/lib/module/locale/translations/tr.js.map +1 -1
- package/lib/module/locale/translations/zh.js +0 -34
- package/lib/module/locale/translations/zh.js.map +1 -1
- package/lib/typescript/commonjs/icons/TEMPLATE.d.ts +1 -1
- package/lib/typescript/commonjs/icons/TEMPLATE.d.ts.map +1 -1
- package/lib/typescript/commonjs/icons/glyph-svg.d.ts +17 -0
- package/lib/typescript/commonjs/icons/glyph-svg.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/glyph.d.ts +11 -0
- package/lib/typescript/commonjs/icons/glyph.d.ts.map +1 -0
- package/lib/typescript/commonjs/icons/glyph.native.d.ts +20 -0
- package/lib/typescript/commonjs/icons/glyph.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/index.d.ts +0 -9
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.web.d.ts +0 -9
- package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/ar.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/bn.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/ca.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/de.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/es.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/fr.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/hi.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/id.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/it.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/ja.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/pt.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/ru.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/tr.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/types.d.ts +0 -6
- package/lib/typescript/commonjs/locale/translations/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/locale/translations/zh.d.ts.map +1 -1
- package/lib/typescript/module/icons/TEMPLATE.d.ts +1 -1
- package/lib/typescript/module/icons/TEMPLATE.d.ts.map +1 -1
- package/lib/typescript/module/icons/glyph-svg.d.ts +17 -0
- package/lib/typescript/module/icons/glyph-svg.d.ts.map +1 -0
- package/lib/typescript/module/icons/glyph.d.ts +11 -0
- package/lib/typescript/module/icons/glyph.d.ts.map +1 -0
- package/lib/typescript/module/icons/glyph.native.d.ts +20 -0
- package/lib/typescript/module/icons/glyph.native.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts +0 -9
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/index.web.d.ts +0 -9
- package/lib/typescript/module/index.web.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/ar.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/bn.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/ca.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/de.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/es.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/fr.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/hi.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/id.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/it.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/ja.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/pt.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/ru.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/tr.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/types.d.ts +0 -6
- package/lib/typescript/module/locale/translations/types.d.ts.map +1 -1
- package/lib/typescript/module/locale/translations/zh.d.ts.map +1 -1
- package/package.json +1 -52
- package/src/__tests__/support/public-part-classifications.json +0 -5
- package/src/icons/TEMPLATE.tsx +28 -49
- package/src/icons/glyph-svg.tsx +54 -0
- package/src/icons/glyph.native.tsx +138 -0
- package/src/icons/glyph.tsx +15 -0
- package/src/index.ts +0 -62
- package/src/index.web.ts +0 -62
- package/src/locale/translations/ar.ts +0 -36
- package/src/locale/translations/bn.ts +0 -36
- package/src/locale/translations/ca.ts +0 -36
- package/src/locale/translations/de.ts +0 -36
- package/src/locale/translations/es.ts +0 -36
- package/src/locale/translations/fr.ts +0 -36
- package/src/locale/translations/hi.ts +0 -36
- package/src/locale/translations/id.ts +0 -36
- package/src/locale/translations/it.ts +0 -36
- package/src/locale/translations/ja.ts +0 -36
- package/src/locale/translations/pt.ts +0 -36
- package/src/locale/translations/ru.ts +0 -36
- package/src/locale/translations/tr.ts +0 -36
- package/src/locale/translations/types.ts +0 -6
- package/src/locale/translations/zh.ts +0 -36
- package/docs/checkout-summary.mdx +0 -94
- package/docs/order-confirmation.mdx +0 -66
- package/docs/vendor-card.mdx +0 -83
- package/lib/commonjs/checkout-summary/CheckoutConfirm.js +0 -243
- package/lib/commonjs/checkout-summary/CheckoutConfirm.js.map +0 -1
- package/lib/commonjs/checkout-summary/CheckoutSummary.js +0 -432
- package/lib/commonjs/checkout-summary/CheckoutSummary.js.map +0 -1
- package/lib/commonjs/checkout-summary/CheckoutSummaryRow.js +0 -277
- package/lib/commonjs/checkout-summary/CheckoutSummaryRow.js.map +0 -1
- package/lib/commonjs/checkout-summary/constants.js +0 -66
- package/lib/commonjs/checkout-summary/constants.js.map +0 -1
- package/lib/commonjs/checkout-summary/index.js +0 -95
- package/lib/commonjs/checkout-summary/index.js.map +0 -1
- package/lib/commonjs/checkout-summary/messages.js +0 -23
- package/lib/commonjs/checkout-summary/messages.js.map +0 -1
- package/lib/commonjs/checkout-summary/shared.js +0 -43
- package/lib/commonjs/checkout-summary/shared.js.map +0 -1
- package/lib/commonjs/checkout-summary/types.js +0 -6
- package/lib/commonjs/checkout-summary/types.js.map +0 -1
- package/lib/commonjs/order-confirmation/OrderConfirmation.js +0 -305
- package/lib/commonjs/order-confirmation/OrderConfirmation.js.map +0 -1
- package/lib/commonjs/order-confirmation/constants.js +0 -26
- package/lib/commonjs/order-confirmation/constants.js.map +0 -1
- package/lib/commonjs/order-confirmation/index.js +0 -38
- package/lib/commonjs/order-confirmation/index.js.map +0 -1
- package/lib/commonjs/order-confirmation/messages.js +0 -18
- package/lib/commonjs/order-confirmation/messages.js.map +0 -1
- package/lib/commonjs/order-confirmation/types.js +0 -6
- package/lib/commonjs/order-confirmation/types.js.map +0 -1
- package/lib/commonjs/vendor-card/VendorCard.js +0 -1051
- package/lib/commonjs/vendor-card/VendorCard.js.map +0 -1
- package/lib/commonjs/vendor-card/constants.js +0 -54
- package/lib/commonjs/vendor-card/constants.js.map +0 -1
- package/lib/commonjs/vendor-card/index.js +0 -69
- package/lib/commonjs/vendor-card/index.js.map +0 -1
- package/lib/commonjs/vendor-card/message-helpers.js +0 -23
- package/lib/commonjs/vendor-card/message-helpers.js.map +0 -1
- package/lib/commonjs/vendor-card/messages.js +0 -32
- package/lib/commonjs/vendor-card/messages.js.map +0 -1
- package/lib/commonjs/vendor-card/shared.js +0 -116
- package/lib/commonjs/vendor-card/shared.js.map +0 -1
- package/lib/commonjs/vendor-card/types.js +0 -6
- package/lib/commonjs/vendor-card/types.js.map +0 -1
- package/lib/module/checkout-summary/CheckoutConfirm.js +0 -237
- package/lib/module/checkout-summary/CheckoutConfirm.js.map +0 -1
- package/lib/module/checkout-summary/CheckoutSummary.js +0 -426
- package/lib/module/checkout-summary/CheckoutSummary.js.map +0 -1
- package/lib/module/checkout-summary/CheckoutSummaryRow.js +0 -273
- package/lib/module/checkout-summary/CheckoutSummaryRow.js.map +0 -1
- package/lib/module/checkout-summary/constants.js +0 -63
- package/lib/module/checkout-summary/constants.js.map +0 -1
- package/lib/module/checkout-summary/index.js +0 -8
- package/lib/module/checkout-summary/index.js.map +0 -1
- package/lib/module/checkout-summary/messages.js +0 -20
- package/lib/module/checkout-summary/messages.js.map +0 -1
- package/lib/module/checkout-summary/shared.js +0 -36
- package/lib/module/checkout-summary/shared.js.map +0 -1
- package/lib/module/checkout-summary/types.js +0 -4
- package/lib/module/checkout-summary/types.js.map +0 -1
- package/lib/module/order-confirmation/OrderConfirmation.js +0 -299
- package/lib/module/order-confirmation/OrderConfirmation.js.map +0 -1
- package/lib/module/order-confirmation/constants.js +0 -23
- package/lib/module/order-confirmation/constants.js.map +0 -1
- package/lib/module/order-confirmation/index.js +0 -5
- package/lib/module/order-confirmation/index.js.map +0 -1
- package/lib/module/order-confirmation/messages.js +0 -15
- package/lib/module/order-confirmation/messages.js.map +0 -1
- package/lib/module/order-confirmation/types.js +0 -4
- package/lib/module/order-confirmation/types.js.map +0 -1
- package/lib/module/vendor-card/VendorCard.js +0 -1046
- package/lib/module/vendor-card/VendorCard.js.map +0 -1
- package/lib/module/vendor-card/constants.js +0 -50
- package/lib/module/vendor-card/constants.js.map +0 -1
- package/lib/module/vendor-card/index.js +0 -6
- package/lib/module/vendor-card/index.js.map +0 -1
- package/lib/module/vendor-card/message-helpers.js +0 -18
- package/lib/module/vendor-card/message-helpers.js.map +0 -1
- package/lib/module/vendor-card/messages.js +0 -29
- package/lib/module/vendor-card/messages.js.map +0 -1
- package/lib/module/vendor-card/shared.js +0 -107
- package/lib/module/vendor-card/shared.js.map +0 -1
- package/lib/module/vendor-card/types.js +0 -4
- package/lib/module/vendor-card/types.js.map +0 -1
- package/lib/typescript/commonjs/checkout-summary/CheckoutConfirm.d.ts +0 -40
- package/lib/typescript/commonjs/checkout-summary/CheckoutConfirm.d.ts.map +0 -1
- package/lib/typescript/commonjs/checkout-summary/CheckoutSummary.d.ts +0 -36
- package/lib/typescript/commonjs/checkout-summary/CheckoutSummary.d.ts.map +0 -1
- package/lib/typescript/commonjs/checkout-summary/CheckoutSummaryRow.d.ts +0 -29
- package/lib/typescript/commonjs/checkout-summary/CheckoutSummaryRow.d.ts.map +0 -1
- package/lib/typescript/commonjs/checkout-summary/constants.d.ts +0 -39
- package/lib/typescript/commonjs/checkout-summary/constants.d.ts.map +0 -1
- package/lib/typescript/commonjs/checkout-summary/index.d.ts +0 -8
- package/lib/typescript/commonjs/checkout-summary/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/checkout-summary/messages.d.ts +0 -23
- package/lib/typescript/commonjs/checkout-summary/messages.d.ts.map +0 -1
- package/lib/typescript/commonjs/checkout-summary/shared.d.ts +0 -27
- package/lib/typescript/commonjs/checkout-summary/shared.d.ts.map +0 -1
- package/lib/typescript/commonjs/checkout-summary/types.d.ts +0 -147
- package/lib/typescript/commonjs/checkout-summary/types.d.ts.map +0 -1
- package/lib/typescript/commonjs/order-confirmation/OrderConfirmation.d.ts +0 -40
- package/lib/typescript/commonjs/order-confirmation/OrderConfirmation.d.ts.map +0 -1
- package/lib/typescript/commonjs/order-confirmation/constants.d.ts +0 -17
- package/lib/typescript/commonjs/order-confirmation/constants.d.ts.map +0 -1
- package/lib/typescript/commonjs/order-confirmation/index.d.ts +0 -4
- package/lib/typescript/commonjs/order-confirmation/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/order-confirmation/messages.d.ts +0 -12
- package/lib/typescript/commonjs/order-confirmation/messages.d.ts.map +0 -1
- package/lib/typescript/commonjs/order-confirmation/types.d.ts +0 -88
- package/lib/typescript/commonjs/order-confirmation/types.d.ts.map +0 -1
- package/lib/typescript/commonjs/vendor-card/VendorCard.d.ts +0 -6
- package/lib/typescript/commonjs/vendor-card/VendorCard.d.ts.map +0 -1
- package/lib/typescript/commonjs/vendor-card/constants.d.ts +0 -30
- package/lib/typescript/commonjs/vendor-card/constants.d.ts.map +0 -1
- package/lib/typescript/commonjs/vendor-card/index.d.ts +0 -5
- package/lib/typescript/commonjs/vendor-card/index.d.ts.map +0 -1
- package/lib/typescript/commonjs/vendor-card/message-helpers.d.ts +0 -13
- package/lib/typescript/commonjs/vendor-card/message-helpers.d.ts.map +0 -1
- package/lib/typescript/commonjs/vendor-card/messages.d.ts +0 -22
- package/lib/typescript/commonjs/vendor-card/messages.d.ts.map +0 -1
- package/lib/typescript/commonjs/vendor-card/shared.d.ts +0 -24
- package/lib/typescript/commonjs/vendor-card/shared.d.ts.map +0 -1
- package/lib/typescript/commonjs/vendor-card/types.d.ts +0 -111
- package/lib/typescript/commonjs/vendor-card/types.d.ts.map +0 -1
- package/lib/typescript/module/checkout-summary/CheckoutConfirm.d.ts +0 -40
- package/lib/typescript/module/checkout-summary/CheckoutConfirm.d.ts.map +0 -1
- package/lib/typescript/module/checkout-summary/CheckoutSummary.d.ts +0 -36
- package/lib/typescript/module/checkout-summary/CheckoutSummary.d.ts.map +0 -1
- package/lib/typescript/module/checkout-summary/CheckoutSummaryRow.d.ts +0 -29
- package/lib/typescript/module/checkout-summary/CheckoutSummaryRow.d.ts.map +0 -1
- package/lib/typescript/module/checkout-summary/constants.d.ts +0 -39
- package/lib/typescript/module/checkout-summary/constants.d.ts.map +0 -1
- package/lib/typescript/module/checkout-summary/index.d.ts +0 -8
- package/lib/typescript/module/checkout-summary/index.d.ts.map +0 -1
- package/lib/typescript/module/checkout-summary/messages.d.ts +0 -23
- package/lib/typescript/module/checkout-summary/messages.d.ts.map +0 -1
- package/lib/typescript/module/checkout-summary/shared.d.ts +0 -27
- package/lib/typescript/module/checkout-summary/shared.d.ts.map +0 -1
- package/lib/typescript/module/checkout-summary/types.d.ts +0 -147
- package/lib/typescript/module/checkout-summary/types.d.ts.map +0 -1
- package/lib/typescript/module/order-confirmation/OrderConfirmation.d.ts +0 -40
- package/lib/typescript/module/order-confirmation/OrderConfirmation.d.ts.map +0 -1
- package/lib/typescript/module/order-confirmation/constants.d.ts +0 -17
- package/lib/typescript/module/order-confirmation/constants.d.ts.map +0 -1
- package/lib/typescript/module/order-confirmation/index.d.ts +0 -4
- package/lib/typescript/module/order-confirmation/index.d.ts.map +0 -1
- package/lib/typescript/module/order-confirmation/messages.d.ts +0 -12
- package/lib/typescript/module/order-confirmation/messages.d.ts.map +0 -1
- package/lib/typescript/module/order-confirmation/types.d.ts +0 -88
- package/lib/typescript/module/order-confirmation/types.d.ts.map +0 -1
- package/lib/typescript/module/vendor-card/VendorCard.d.ts +0 -6
- package/lib/typescript/module/vendor-card/VendorCard.d.ts.map +0 -1
- package/lib/typescript/module/vendor-card/constants.d.ts +0 -30
- package/lib/typescript/module/vendor-card/constants.d.ts.map +0 -1
- package/lib/typescript/module/vendor-card/index.d.ts +0 -5
- package/lib/typescript/module/vendor-card/index.d.ts.map +0 -1
- package/lib/typescript/module/vendor-card/message-helpers.d.ts +0 -13
- package/lib/typescript/module/vendor-card/message-helpers.d.ts.map +0 -1
- package/lib/typescript/module/vendor-card/messages.d.ts +0 -22
- package/lib/typescript/module/vendor-card/messages.d.ts.map +0 -1
- package/lib/typescript/module/vendor-card/shared.d.ts +0 -24
- package/lib/typescript/module/vendor-card/shared.d.ts.map +0 -1
- package/lib/typescript/module/vendor-card/types.d.ts +0 -111
- package/lib/typescript/module/vendor-card/types.d.ts.map +0 -1
- package/src/checkout-summary/CheckoutConfirm.tsx +0 -119
- package/src/checkout-summary/CheckoutSummary.tsx +0 -221
- package/src/checkout-summary/CheckoutSummaryRow.tsx +0 -172
- package/src/checkout-summary/constants.ts +0 -64
- package/src/checkout-summary/index.ts +0 -22
- package/src/checkout-summary/messages.ts +0 -33
- package/src/checkout-summary/shared.ts +0 -40
- package/src/checkout-summary/types.ts +0 -152
- package/src/order-confirmation/OrderConfirmation.tsx +0 -197
- package/src/order-confirmation/constants.ts +0 -20
- package/src/order-confirmation/index.ts +0 -12
- package/src/order-confirmation/messages.ts +0 -18
- package/src/order-confirmation/types.ts +0 -98
- package/src/vendor-card/VendorCard.tsx +0 -509
- package/src/vendor-card/constants.ts +0 -58
- package/src/vendor-card/index.ts +0 -15
- package/src/vendor-card/message-helpers.ts +0 -20
- package/src/vendor-card/messages.ts +0 -36
- package/src/vendor-card/shared.ts +0 -136
- 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
|
-
|
|
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
|
+
}
|