@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.
- 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 +22 -6
- 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/commonjs/subtle-hover/SubtleHover.js +94 -31
- package/lib/commonjs/subtle-hover/SubtleHover.js.map +1 -1
- package/lib/commonjs/subtle-hover/index.js +7 -0
- package/lib/commonjs/subtle-hover/index.js.map +1 -1
- package/lib/commonjs/subtle-hover/use-press-highlight.js +95 -0
- package/lib/commonjs/subtle-hover/use-press-highlight.js.map +1 -0
- 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/module/subtle-hover/SubtleHover.js +95 -32
- package/lib/module/subtle-hover/SubtleHover.js.map +1 -1
- package/lib/module/subtle-hover/index.js +1 -0
- package/lib/module/subtle-hover/index.js.map +1 -1
- package/lib/module/subtle-hover/use-press-highlight.js +92 -0
- package/lib/module/subtle-hover/use-press-highlight.js.map +1 -0
- 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/commonjs/subtle-hover/SubtleHover.d.ts +4 -1
- package/lib/typescript/commonjs/subtle-hover/SubtleHover.d.ts.map +1 -1
- package/lib/typescript/commonjs/subtle-hover/index.d.ts +1 -0
- package/lib/typescript/commonjs/subtle-hover/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/subtle-hover/types.d.ts +6 -0
- package/lib/typescript/commonjs/subtle-hover/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/subtle-hover/use-press-highlight.d.ts +42 -0
- package/lib/typescript/commonjs/subtle-hover/use-press-highlight.d.ts.map +1 -0
- 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/lib/typescript/module/subtle-hover/SubtleHover.d.ts +4 -1
- package/lib/typescript/module/subtle-hover/SubtleHover.d.ts.map +1 -1
- package/lib/typescript/module/subtle-hover/index.d.ts +1 -0
- package/lib/typescript/module/subtle-hover/index.d.ts.map +1 -1
- package/lib/typescript/module/subtle-hover/types.d.ts +6 -0
- package/lib/typescript/module/subtle-hover/types.d.ts.map +1 -1
- package/lib/typescript/module/subtle-hover/use-press-highlight.d.ts +42 -0
- package/lib/typescript/module/subtle-hover/use-press-highlight.d.ts.map +1 -0
- 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/src/subtle-hover/SubtleHover.tsx +33 -2
- package/src/subtle-hover/index.ts +5 -0
- package/src/subtle-hover/types.ts +6 -0
- package/src/subtle-hover/use-press-highlight.ts +93 -0
- 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
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type PressableProps } from 'react-native';
|
|
2
|
+
import { type SharedValue } from 'react-native-reanimated';
|
|
3
|
+
/** The props a row's pressable host spreads for its press highlight. */
|
|
4
|
+
export interface PressHighlightHostProps {
|
|
5
|
+
/** Android: the platform ripple, bounded by the row. */
|
|
6
|
+
android_ripple?: PressableProps['android_ripple'];
|
|
7
|
+
/** iOS: lights `pressed`. Call it from the host's own `onPressIn` if it has one. */
|
|
8
|
+
onPressIn?: () => void;
|
|
9
|
+
/** iOS: fades `pressed` out. Call it from the host's own `onPressOut` if it has one. */
|
|
10
|
+
onPressOut?: () => void;
|
|
11
|
+
}
|
|
12
|
+
export interface PressHighlight {
|
|
13
|
+
/** Spread on the row's `Pressable`; nothing on the web. */
|
|
14
|
+
hostProps: PressHighlightHostProps;
|
|
15
|
+
/**
|
|
16
|
+
* iOS: hand it to the row's `SubtleHover` (`<SubtleHover pressed={…} />`),
|
|
17
|
+
* whose wash it drives on the UI thread. `undefined` elsewhere.
|
|
18
|
+
*/
|
|
19
|
+
pressed: SharedValue<number> | undefined;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* A pressable row's pressed state on native, in the wash `SubtleHover` paints:
|
|
23
|
+
* the theme's `contrast50`, the fill an unfilled Bloom control takes while
|
|
24
|
+
* held. Android draws its ripple; iOS lights the row's `SubtleHover`. The web
|
|
25
|
+
* has the pointer's hover wash and gets nothing here.
|
|
26
|
+
*
|
|
27
|
+
* Spread `hostProps` only on a row that takes a press: a `Pressable` without
|
|
28
|
+
* `onPress` still answers a touch.
|
|
29
|
+
*
|
|
30
|
+
* ```tsx
|
|
31
|
+
* const highlight = usePressHighlight();
|
|
32
|
+
* <Pressable onPress={open} {...highlight.hostProps}>
|
|
33
|
+
* <SubtleHover pressed={highlight.pressed} />
|
|
34
|
+
* …
|
|
35
|
+
* </Pressable>
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* A child that takes its own press (a button, a link) holds the touch, so the
|
|
39
|
+
* row does not light; a scroll that takes the touch releases it.
|
|
40
|
+
*/
|
|
41
|
+
export declare const usePressHighlight: () => PressHighlight;
|
|
42
|
+
//# sourceMappingURL=use-press-highlight.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-press-highlight.d.ts","sourceRoot":"","sources":["../../../../src/subtle-hover/use-press-highlight.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAU,KAAK,WAAW,EAA8B,MAAM,yBAAyB,CAAC;AAI/F,wEAAwE;AACxE,MAAM,WAAW,uBAAuB;IACtC,wDAAwD;IACxD,cAAc,CAAC,EAAE,cAAc,CAAC,gBAAgB,CAAC,CAAC;IAClD,oFAAoF;IACpF,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,wFAAwF;IACxF,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,cAAc;IAC7B,2DAA2D;IAC3D,SAAS,EAAE,uBAAuB,CAAC;IACnC;;;OAGG;IACH,OAAO,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,SAAS,CAAC;CAC1C;AA+CD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAAM,cAC6C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxy.so/bloom",
|
|
3
|
-
"version": "23.
|
|
3
|
+
"version": "23.7.0",
|
|
4
4
|
"packageManager": "bun@1.4.3",
|
|
5
5
|
"description": "Bloom UI — Oxy ecosystem component library for React Native + Expo + Web",
|
|
6
6
|
"main": "lib/commonjs/index.js",
|
|
@@ -3416,20 +3416,6 @@
|
|
|
3416
3416
|
"default": "./lib/commonjs/price-breakdown/index.js"
|
|
3417
3417
|
}
|
|
3418
3418
|
},
|
|
3419
|
-
"./checkout-summary": {
|
|
3420
|
-
"react-native": {
|
|
3421
|
-
"types": "./lib/typescript/module/checkout-summary/index.d.ts",
|
|
3422
|
-
"default": "./src/checkout-summary/index.ts"
|
|
3423
|
-
},
|
|
3424
|
-
"import": {
|
|
3425
|
-
"types": "./lib/typescript/module/checkout-summary/index.d.ts",
|
|
3426
|
-
"default": "./lib/module/checkout-summary/index.js"
|
|
3427
|
-
},
|
|
3428
|
-
"require": {
|
|
3429
|
-
"types": "./lib/typescript/commonjs/checkout-summary/index.d.ts",
|
|
3430
|
-
"default": "./lib/commonjs/checkout-summary/index.js"
|
|
3431
|
-
}
|
|
3432
|
-
},
|
|
3433
3419
|
"./checkout-sheet": {
|
|
3434
3420
|
"react-native": {
|
|
3435
3421
|
"types": "./lib/typescript/module/checkout-sheet/index.d.ts",
|
|
@@ -3458,34 +3444,6 @@
|
|
|
3458
3444
|
"default": "./lib/commonjs/checkout-sheet/model.js"
|
|
3459
3445
|
}
|
|
3460
3446
|
},
|
|
3461
|
-
"./order-confirmation": {
|
|
3462
|
-
"react-native": {
|
|
3463
|
-
"types": "./lib/typescript/module/order-confirmation/index.d.ts",
|
|
3464
|
-
"default": "./src/order-confirmation/index.ts"
|
|
3465
|
-
},
|
|
3466
|
-
"import": {
|
|
3467
|
-
"types": "./lib/typescript/module/order-confirmation/index.d.ts",
|
|
3468
|
-
"default": "./lib/module/order-confirmation/index.js"
|
|
3469
|
-
},
|
|
3470
|
-
"require": {
|
|
3471
|
-
"types": "./lib/typescript/commonjs/order-confirmation/index.d.ts",
|
|
3472
|
-
"default": "./lib/commonjs/order-confirmation/index.js"
|
|
3473
|
-
}
|
|
3474
|
-
},
|
|
3475
|
-
"./vendor-card": {
|
|
3476
|
-
"react-native": {
|
|
3477
|
-
"types": "./lib/typescript/module/vendor-card/index.d.ts",
|
|
3478
|
-
"default": "./src/vendor-card/index.ts"
|
|
3479
|
-
},
|
|
3480
|
-
"import": {
|
|
3481
|
-
"types": "./lib/typescript/module/vendor-card/index.d.ts",
|
|
3482
|
-
"default": "./lib/module/vendor-card/index.js"
|
|
3483
|
-
},
|
|
3484
|
-
"require": {
|
|
3485
|
-
"types": "./lib/typescript/commonjs/vendor-card/index.d.ts",
|
|
3486
|
-
"default": "./lib/commonjs/vendor-card/index.js"
|
|
3487
|
-
}
|
|
3488
|
-
},
|
|
3489
3447
|
"./menu-item": {
|
|
3490
3448
|
"react-native": {
|
|
3491
3449
|
"types": "./lib/typescript/module/menu-item/index.d.ts",
|
|
@@ -5297,21 +5255,12 @@
|
|
|
5297
5255
|
"price-breakdown": [
|
|
5298
5256
|
"./lib/typescript/module/price-breakdown/index.d.ts"
|
|
5299
5257
|
],
|
|
5300
|
-
"checkout-summary": [
|
|
5301
|
-
"./lib/typescript/module/checkout-summary/index.d.ts"
|
|
5302
|
-
],
|
|
5303
5258
|
"checkout-sheet": [
|
|
5304
5259
|
"./lib/typescript/module/checkout-sheet/index.d.ts"
|
|
5305
5260
|
],
|
|
5306
5261
|
"checkout-sheet/model": [
|
|
5307
5262
|
"./lib/typescript/module/checkout-sheet/model.d.ts"
|
|
5308
5263
|
],
|
|
5309
|
-
"order-confirmation": [
|
|
5310
|
-
"./lib/typescript/module/order-confirmation/index.d.ts"
|
|
5311
|
-
],
|
|
5312
|
-
"vendor-card": [
|
|
5313
|
-
"./lib/typescript/module/vendor-card/index.d.ts"
|
|
5314
|
-
],
|
|
5315
5264
|
"menu-item": [
|
|
5316
5265
|
"./lib/typescript/module/menu-item/index.d.ts"
|
|
5317
5266
|
],
|
|
@@ -996,9 +996,6 @@
|
|
|
996
996
|
"src/chat-screen/ScrollToBottomButton.tsx#ScrollToBottomButton",
|
|
997
997
|
"src/checkbox/CheckboxCard.tsx#CheckboxCard",
|
|
998
998
|
"src/checkout-sheet/CheckoutSheet.tsx#CheckoutSheet",
|
|
999
|
-
"src/checkout-summary/CheckoutConfirm.tsx#CheckoutConfirm",
|
|
1000
|
-
"src/checkout-summary/CheckoutSummary.tsx#CheckoutSummary",
|
|
1001
|
-
"src/checkout-summary/CheckoutSummaryRow.tsx#CheckoutSummaryRow",
|
|
1002
999
|
"src/chip/CappedChipRow.tsx#CappedChipRow",
|
|
1003
1000
|
"src/chip/ChipRow.tsx#ChipRow",
|
|
1004
1001
|
"src/choice-list/ChoiceList.tsx#ChoiceList",
|
|
@@ -1320,7 +1317,6 @@
|
|
|
1320
1317
|
"src/notification-center/NotificationCenter.tsx#NotificationCenter",
|
|
1321
1318
|
"src/notification/Notification.tsx#Notification",
|
|
1322
1319
|
"src/notification/Notification.tsx#NotificationStatusVisual",
|
|
1323
|
-
"src/order-confirmation/OrderConfirmation.tsx#OrderConfirmation",
|
|
1324
1320
|
"src/order-status/OrderStatusBar.tsx#OrderStatusBar",
|
|
1325
1321
|
"src/order-status/OrderStatusTimeline.tsx#OrderStatusTimeline",
|
|
1326
1322
|
"src/outline-nav/OutlineNav.tsx#OutlineNav",
|
|
@@ -1567,7 +1563,6 @@
|
|
|
1567
1563
|
"src/track-list/TrackRowSkeleton.tsx#TrackRowSkeleton",
|
|
1568
1564
|
"src/usage-card/UsageCard.tsx#UsageCard",
|
|
1569
1565
|
"src/user-hover-card/UserHoverCard.tsx#UserHoverCard",
|
|
1570
|
-
"src/vendor-card/VendorCard.tsx#VendorCard",
|
|
1571
1566
|
"src/video-playback/VideoPlaybackProvider.tsx#VideoPlaybackProvider",
|
|
1572
1567
|
"src/video-playback/VideoViewability.tsx#VideoViewabilityProvider",
|
|
1573
1568
|
"src/video-playback/VideoViewability.tsx#VideoViewabilityScope",
|
package/src/icons/TEMPLATE.tsx
CHANGED
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
import { forwardRef } from 'react';
|
|
2
|
-
import Svg
|
|
2
|
+
import type Svg from 'react-native-svg';
|
|
3
3
|
|
|
4
|
-
import { type
|
|
4
|
+
import { type GlyphSpec, useGlyph } from './glyph';
|
|
5
|
+
import type { Props } from './shared';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* The icon component of one glyph. What draws it is the platform's: inline SVG
|
|
9
|
+
* on the web, one native view per icon on native when the app's binary has it
|
|
10
|
+
* (`glyph.native.tsx`), react-native-svg otherwise.
|
|
11
|
+
*/
|
|
12
|
+
function iconComponent(glyph: GlyphSpec) {
|
|
13
|
+
return forwardRef<Svg, Props>(function IconImpl(props, ref) {
|
|
14
|
+
return useGlyph(glyph, props, ref);
|
|
15
|
+
});
|
|
16
|
+
}
|
|
5
17
|
|
|
6
18
|
export function createSinglePathSVG({
|
|
7
19
|
path,
|
|
@@ -16,56 +28,23 @@ export function createSinglePathSVG({
|
|
|
16
28
|
strokeLinecap?: 'butt' | 'round' | 'square';
|
|
17
29
|
strokeLinejoin?: 'miter' | 'round' | 'bevel';
|
|
18
30
|
}) {
|
|
19
|
-
return
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
fill="none"
|
|
27
|
-
{...rest}
|
|
28
|
-
ref={ref}
|
|
29
|
-
viewBox={viewBox || '0 0 24 24'}
|
|
30
|
-
width={size}
|
|
31
|
-
height={size}
|
|
32
|
-
style={[style]}
|
|
33
|
-
>
|
|
34
|
-
{gradient}
|
|
35
|
-
<Path
|
|
36
|
-
fill={hasStroke ? 'none' : fill}
|
|
37
|
-
stroke={hasStroke ? fill : 'none'}
|
|
38
|
-
strokeWidth={strokeWidth}
|
|
39
|
-
strokeLinecap={strokeLinecap}
|
|
40
|
-
strokeLinejoin={strokeLinejoin}
|
|
41
|
-
fillRule="evenodd"
|
|
42
|
-
clipRule="evenodd"
|
|
43
|
-
d={path}
|
|
44
|
-
/>
|
|
45
|
-
</Svg>
|
|
46
|
-
);
|
|
31
|
+
return iconComponent({
|
|
32
|
+
kind: 'single',
|
|
33
|
+
paths: [path],
|
|
34
|
+
viewBox: viewBox || '0 0 24 24',
|
|
35
|
+
strokeWidth,
|
|
36
|
+
strokeLinecap,
|
|
37
|
+
strokeLinejoin,
|
|
47
38
|
});
|
|
48
39
|
}
|
|
49
40
|
|
|
50
41
|
export function createMultiPathSVG({ paths, viewBox }: { paths: string[]; viewBox?: string }) {
|
|
51
|
-
return
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
ref={ref}
|
|
59
|
-
viewBox={viewBox || '0 0 24 24'}
|
|
60
|
-
width={size}
|
|
61
|
-
height={size}
|
|
62
|
-
style={[style]}
|
|
63
|
-
>
|
|
64
|
-
{gradient}
|
|
65
|
-
{paths.map((path, i) => (
|
|
66
|
-
<Path key={i} fill={fill} fillRule="evenodd" clipRule="evenodd" d={path} />
|
|
67
|
-
))}
|
|
68
|
-
</Svg>
|
|
69
|
-
);
|
|
42
|
+
return iconComponent({
|
|
43
|
+
kind: 'multi',
|
|
44
|
+
paths,
|
|
45
|
+
viewBox: viewBox || '0 0 24 24',
|
|
46
|
+
strokeWidth: 0,
|
|
47
|
+
strokeLinecap: 'butt',
|
|
48
|
+
strokeLinejoin: 'miter',
|
|
70
49
|
});
|
|
71
50
|
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { ForwardedRef } from 'react';
|
|
2
|
+
import Svg, { Path } from 'react-native-svg';
|
|
3
|
+
|
|
4
|
+
import type { CommonSVGProps } from './shared';
|
|
5
|
+
|
|
6
|
+
/** One glyph as its factory describes it: its path data and how it paints. */
|
|
7
|
+
export interface GlyphSpec {
|
|
8
|
+
/** `single` paths fill or stroke as `strokeWidth` says; `multi` paths always fill. */
|
|
9
|
+
kind: 'single' | 'multi';
|
|
10
|
+
paths: readonly string[];
|
|
11
|
+
viewBox: string;
|
|
12
|
+
/** 0 fills; a width (in viewBox units) strokes the path in the fill colour. */
|
|
13
|
+
strokeWidth: number;
|
|
14
|
+
strokeLinecap: 'butt' | 'round' | 'square';
|
|
15
|
+
strokeLinejoin: 'miter' | 'round' | 'bevel';
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** The glyph as react-native-svg (and, on the web, inline SVG) draws it. */
|
|
19
|
+
export function svgGlyph(
|
|
20
|
+
glyph: GlyphSpec,
|
|
21
|
+
{ fill, size, style, gradient, ...rest }: CommonSVGProps,
|
|
22
|
+
ref: ForwardedRef<Svg>,
|
|
23
|
+
) {
|
|
24
|
+
const hasStroke = glyph.strokeWidth > 0;
|
|
25
|
+
return (
|
|
26
|
+
<Svg
|
|
27
|
+
fill="none"
|
|
28
|
+
{...rest}
|
|
29
|
+
ref={ref}
|
|
30
|
+
viewBox={glyph.viewBox}
|
|
31
|
+
width={size}
|
|
32
|
+
height={size}
|
|
33
|
+
style={[style]}
|
|
34
|
+
>
|
|
35
|
+
{gradient}
|
|
36
|
+
{glyph.kind === 'single' ? (
|
|
37
|
+
<Path
|
|
38
|
+
fill={hasStroke ? 'none' : fill}
|
|
39
|
+
stroke={hasStroke ? fill : 'none'}
|
|
40
|
+
strokeWidth={glyph.strokeWidth}
|
|
41
|
+
strokeLinecap={glyph.strokeLinecap}
|
|
42
|
+
strokeLinejoin={glyph.strokeLinejoin}
|
|
43
|
+
fillRule="evenodd"
|
|
44
|
+
clipRule="evenodd"
|
|
45
|
+
d={glyph.paths[0]}
|
|
46
|
+
/>
|
|
47
|
+
) : (
|
|
48
|
+
glyph.paths.map((path, i) => (
|
|
49
|
+
<Path key={i} fill={fill} fillRule="evenodd" clipRule="evenodd" d={path} />
|
|
50
|
+
))
|
|
51
|
+
)}
|
|
52
|
+
</Svg>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import type { ForwardedRef } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
type ColorValue,
|
|
4
|
+
type HostComponent,
|
|
5
|
+
processColor,
|
|
6
|
+
requireNativeComponent,
|
|
7
|
+
UIManager,
|
|
8
|
+
type ViewProps,
|
|
9
|
+
type ViewStyle,
|
|
10
|
+
} from 'react-native';
|
|
11
|
+
import type Svg from 'react-native-svg';
|
|
12
|
+
|
|
13
|
+
import { gradients } from '../styles/tokens';
|
|
14
|
+
import { type GlyphSpec, svgGlyph } from './glyph-svg';
|
|
15
|
+
import { type Props, useCommonSVGProps } from './shared';
|
|
16
|
+
|
|
17
|
+
export type { GlyphSpec } from './glyph-svg';
|
|
18
|
+
|
|
19
|
+
/** `BloomIconV1` (`android/…/icons/BloomIcon.kt`): the versioned name is the prop contract. */
|
|
20
|
+
type NativeIconProps = ViewProps & {
|
|
21
|
+
paths: readonly string[];
|
|
22
|
+
viewBox: string;
|
|
23
|
+
fill: ColorValue | null;
|
|
24
|
+
strokeWidth: number;
|
|
25
|
+
strokeLinecap: GlyphSpec['strokeLinecap'];
|
|
26
|
+
strokeLinejoin: GlyphSpec['strokeLinejoin'];
|
|
27
|
+
/** react-native-svg's stop list: `[offset, ARGB, offset, ARGB, …]`. */
|
|
28
|
+
gradient: readonly number[] | null;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
let nativeIcon: HostComponent<NativeIconProps> | null | undefined;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The native icon view, when the app's binary has it. A JavaScript-only update
|
|
35
|
+
* (an OTA bundle on an older binary, Expo Go, iOS until it has the view) keeps
|
|
36
|
+
* react-native-svg, so every icon still draws.
|
|
37
|
+
*/
|
|
38
|
+
function loadNativeIcon() {
|
|
39
|
+
if (nativeIcon === undefined) {
|
|
40
|
+
try {
|
|
41
|
+
nativeIcon = UIManager.hasViewManagerConfig?.('BloomIconV1')
|
|
42
|
+
? requireNativeComponent<NativeIconProps>('BloomIconV1')
|
|
43
|
+
: null;
|
|
44
|
+
} catch {
|
|
45
|
+
nativeIcon = null;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return nativeIcon;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const stopLists = new Map<keyof typeof gradients, readonly number[]>();
|
|
52
|
+
|
|
53
|
+
/** A gradient token's stops, as react-native-svg's `extractGradient` sends them (opaque stops). */
|
|
54
|
+
function stopList(name: keyof typeof gradients): readonly number[] {
|
|
55
|
+
let list = stopLists.get(name);
|
|
56
|
+
if (list === undefined) {
|
|
57
|
+
list = gradients[name].values.flatMap(([offset, color]) => [
|
|
58
|
+
offset,
|
|
59
|
+
((processColor(color) as number) & 0x00ffffff) | (255 << 24),
|
|
60
|
+
]);
|
|
61
|
+
stopLists.set(name, list);
|
|
62
|
+
}
|
|
63
|
+
return list;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const boxes = new Map<number, ViewStyle>();
|
|
67
|
+
|
|
68
|
+
/** react-native-svg's root override for a sized `<Svg>`: the side, and `flex: 0`. */
|
|
69
|
+
function box(size: number): ViewStyle {
|
|
70
|
+
let style = boxes.get(size);
|
|
71
|
+
if (style === undefined) {
|
|
72
|
+
style = { width: size, height: size, flex: 0 };
|
|
73
|
+
boxes.set(size, style);
|
|
74
|
+
}
|
|
75
|
+
return style;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Draws a Bloom icon on native: ONE native view that draws the path on the
|
|
80
|
+
* hardware canvas, where react-native-svg mounts three views and rasterises
|
|
81
|
+
* the glyph in software. The paint is resolved exactly as for the SVG
|
|
82
|
+
* (`useCommonSVGProps`): `fill`, else `style.color`, else the theme's primary;
|
|
83
|
+
* a `gradient` token wins over the fill; `currentColor` is the `color` prop or
|
|
84
|
+
* `style.color`, black without either (react-native-svg's default).
|
|
85
|
+
*
|
|
86
|
+
* What the native view draws: fill, stroke, the gradient tokens and `opacity`,
|
|
87
|
+
* with every View prop (layout style, accessibility, testID, onLayout). SVG
|
|
88
|
+
* paint props an icon never needed (`fillOpacity`, `strokeDasharray`, an SVG
|
|
89
|
+
* `transform`…) are not drawn there.
|
|
90
|
+
*/
|
|
91
|
+
export function useGlyph(glyph: GlyphSpec, props: Props, ref: ForwardedRef<Svg>) {
|
|
92
|
+
const common = useCommonSVGProps(props);
|
|
93
|
+
const NativeIcon = loadNativeIcon();
|
|
94
|
+
if (NativeIcon === null) return svgGlyph(glyph, common, ref);
|
|
95
|
+
|
|
96
|
+
const {
|
|
97
|
+
fill,
|
|
98
|
+
size,
|
|
99
|
+
style,
|
|
100
|
+
gradient: _gradientDefs,
|
|
101
|
+
width: _width,
|
|
102
|
+
height: _height,
|
|
103
|
+
color,
|
|
104
|
+
opacity,
|
|
105
|
+
transform: _transform,
|
|
106
|
+
viewBox: _viewBox,
|
|
107
|
+
strokeWidth: _strokeWidth,
|
|
108
|
+
strokeLinecap: _strokeLinecap,
|
|
109
|
+
strokeLinejoin: _strokeLinejoin,
|
|
110
|
+
...rest
|
|
111
|
+
} = common;
|
|
112
|
+
const token = props.gradient && gradients[props.gradient] ? props.gradient : undefined;
|
|
113
|
+
let paint: ColorValue | null = null;
|
|
114
|
+
if (token === undefined && fill !== 'none' && fill != null) {
|
|
115
|
+
paint =
|
|
116
|
+
fill === 'currentColor'
|
|
117
|
+
? (color ?? (style as { color?: ColorValue } | null | undefined)?.color ?? 'black')
|
|
118
|
+
: fill;
|
|
119
|
+
}
|
|
120
|
+
const stroked = glyph.kind === 'single' && glyph.strokeWidth > 0;
|
|
121
|
+
|
|
122
|
+
return (
|
|
123
|
+
<NativeIcon
|
|
124
|
+
{...(rest as ViewProps)}
|
|
125
|
+
ref={ref as never}
|
|
126
|
+
style={
|
|
127
|
+
opacity == null ? [style, box(size)] : [style, box(size), { opacity: Number(opacity) }]
|
|
128
|
+
}
|
|
129
|
+
paths={glyph.paths}
|
|
130
|
+
viewBox={glyph.viewBox}
|
|
131
|
+
fill={paint}
|
|
132
|
+
strokeWidth={stroked ? glyph.strokeWidth : 0}
|
|
133
|
+
strokeLinecap={glyph.strokeLinecap}
|
|
134
|
+
strokeLinejoin={glyph.strokeLinejoin}
|
|
135
|
+
gradient={token === undefined ? null : stopList(token)}
|
|
136
|
+
/>
|
|
137
|
+
);
|
|
138
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ForwardedRef } from 'react';
|
|
2
|
+
import type Svg from 'react-native-svg';
|
|
3
|
+
|
|
4
|
+
import { type GlyphSpec, svgGlyph } from './glyph-svg';
|
|
5
|
+
import { type Props, useCommonSVGProps } from './shared';
|
|
6
|
+
|
|
7
|
+
export type { GlyphSpec } from './glyph-svg';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Draws a Bloom icon. Here (the web, and Node) it is inline SVG, which costs
|
|
11
|
+
* nothing extra in a browser; `glyph.native.tsx` is the native fork.
|
|
12
|
+
*/
|
|
13
|
+
export function useGlyph(glyph: GlyphSpec, props: Props, ref: ForwardedRef<Svg>) {
|
|
14
|
+
return svgGlyph(glyph, useCommonSVGProps(props), ref);
|
|
15
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -1597,29 +1597,6 @@ export type {
|
|
|
1597
1597
|
PriceSummaryProps,
|
|
1598
1598
|
PriceTotal,
|
|
1599
1599
|
} from './price-breakdown';
|
|
1600
|
-
|
|
1601
|
-
// Ordering food: who is cooking, what they cook, and what is in the basket.
|
|
1602
|
-
// Three families on top of the commerce four above — the vendor card is
|
|
1603
|
-
// `listing-card`'s card with a vendor's data in it, the basket's totals are
|
|
1604
|
-
// `PriceSummary`, and order tracking is `order-status`.
|
|
1605
|
-
export { VendorCard } from './vendor-card';
|
|
1606
|
-
export {
|
|
1607
|
-
VENDOR_AVAILABILITY_LABELS,
|
|
1608
|
-
VENDOR_FACT_ICON,
|
|
1609
|
-
VENDOR_FACT_LABELS,
|
|
1610
|
-
VENDOR_FACT_ORDER,
|
|
1611
|
-
VENDOR_PHOTO_ASPECT_RATIO,
|
|
1612
|
-
availabilityLabelFor,
|
|
1613
|
-
composeVendorName,
|
|
1614
|
-
vendorCuisines,
|
|
1615
|
-
vendorFacts,
|
|
1616
|
-
} from './vendor-card';
|
|
1617
|
-
export type {
|
|
1618
|
-
VendorAvailability,
|
|
1619
|
-
VendorCardDensity,
|
|
1620
|
-
VendorCardProps,
|
|
1621
|
-
VendorFactKey,
|
|
1622
|
-
} from './vendor-card';
|
|
1623
1600
|
export { MenuItemOptions, MenuItemRow } from './menu-item';
|
|
1624
1601
|
export {
|
|
1625
1602
|
MENU_ITEM_DIETS,
|
|
@@ -1727,45 +1704,6 @@ export type {
|
|
|
1727
1704
|
TransitLineColors,
|
|
1728
1705
|
} from './directions';
|
|
1729
1706
|
|
|
1730
|
-
// Checkout — the distance between "I want this" and "it is ordered": the
|
|
1731
|
-
// review a buyer confirms, the window they pick, and the screen that says it
|
|
1732
|
-
// happened. Built on the commerce block above — the totals ARE `PriceSummary`,
|
|
1733
|
-
// the address row IS `AddressRow`, and the tracking strip IS `OrderStatusBar`.
|
|
1734
|
-
export { CheckoutConfirm, CheckoutSummary, CheckoutSummaryRow } from './checkout-summary';
|
|
1735
|
-
export {
|
|
1736
|
-
CHECKOUT_AMOUNT_SEPARATOR,
|
|
1737
|
-
CHECKOUT_CONFIRM_BUSY_LABEL,
|
|
1738
|
-
CHECKOUT_CONFIRM_LABEL,
|
|
1739
|
-
CHECKOUT_GROUP_RADIUS,
|
|
1740
|
-
CHECKOUT_ROW_HINT,
|
|
1741
|
-
CHECKOUT_ROW_ICON,
|
|
1742
|
-
CHECKOUT_ROW_PLACEHOLDER,
|
|
1743
|
-
CHECKOUT_ROW_TILE,
|
|
1744
|
-
checkoutConfirmLabel,
|
|
1745
|
-
checkoutRowName,
|
|
1746
|
-
resolveCheckoutPaint,
|
|
1747
|
-
} from './checkout-summary';
|
|
1748
|
-
export type {
|
|
1749
|
-
CheckoutAddressSummary,
|
|
1750
|
-
CheckoutConfirmProps,
|
|
1751
|
-
CheckoutSummaryLine,
|
|
1752
|
-
CheckoutSummaryPaint,
|
|
1753
|
-
CheckoutSummaryProps,
|
|
1754
|
-
CheckoutSummaryRowProps,
|
|
1755
|
-
} from './checkout-summary';
|
|
1756
|
-
export { OrderConfirmation } from './order-confirmation';
|
|
1757
|
-
export {
|
|
1758
|
-
ORDER_CONFIRMATION_ITEMS_LABEL,
|
|
1759
|
-
ORDER_CONFIRMATION_MARK,
|
|
1760
|
-
ORDER_CONFIRMATION_REFERENCE_LABEL,
|
|
1761
|
-
ORDER_CONFIRMATION_TITLE,
|
|
1762
|
-
} from './order-confirmation';
|
|
1763
|
-
export type {
|
|
1764
|
-
OrderConfirmationAddress,
|
|
1765
|
-
OrderConfirmationFact,
|
|
1766
|
-
OrderConfirmationProps,
|
|
1767
|
-
} from './order-confirmation';
|
|
1768
|
-
|
|
1769
1707
|
// TAKING THE MONEY. `payment-method` is the saved way to pay, `card-form` is
|
|
1770
1708
|
// entering a new one, and `payment-status` is what happened afterwards. None of
|
|
1771
1709
|
// the three holds card data: the masked string, the value and the processor's
|
package/src/index.web.ts
CHANGED
|
@@ -1602,29 +1602,6 @@ export type {
|
|
|
1602
1602
|
PriceSummaryProps,
|
|
1603
1603
|
PriceTotal,
|
|
1604
1604
|
} from './price-breakdown';
|
|
1605
|
-
|
|
1606
|
-
// Ordering food: who is cooking, what they cook, and what is in the basket.
|
|
1607
|
-
// Three families on top of the commerce four above — the vendor card is
|
|
1608
|
-
// `listing-card`'s card with a vendor's data in it, the basket's totals are
|
|
1609
|
-
// `PriceSummary`, and order tracking is `order-status`.
|
|
1610
|
-
export { VendorCard } from './vendor-card';
|
|
1611
|
-
export {
|
|
1612
|
-
VENDOR_AVAILABILITY_LABELS,
|
|
1613
|
-
VENDOR_FACT_ICON,
|
|
1614
|
-
VENDOR_FACT_LABELS,
|
|
1615
|
-
VENDOR_FACT_ORDER,
|
|
1616
|
-
VENDOR_PHOTO_ASPECT_RATIO,
|
|
1617
|
-
availabilityLabelFor,
|
|
1618
|
-
composeVendorName,
|
|
1619
|
-
vendorCuisines,
|
|
1620
|
-
vendorFacts,
|
|
1621
|
-
} from './vendor-card';
|
|
1622
|
-
export type {
|
|
1623
|
-
VendorAvailability,
|
|
1624
|
-
VendorCardDensity,
|
|
1625
|
-
VendorCardProps,
|
|
1626
|
-
VendorFactKey,
|
|
1627
|
-
} from './vendor-card';
|
|
1628
1605
|
export { MenuItemOptions, MenuItemRow } from './menu-item';
|
|
1629
1606
|
export {
|
|
1630
1607
|
MENU_ITEM_DIETS,
|
|
@@ -1732,45 +1709,6 @@ export type {
|
|
|
1732
1709
|
TransitLineColors,
|
|
1733
1710
|
} from './directions';
|
|
1734
1711
|
|
|
1735
|
-
// Checkout — the distance between "I want this" and "it is ordered": the
|
|
1736
|
-
// review a buyer confirms, the window they pick, and the screen that says it
|
|
1737
|
-
// happened. Built on the commerce block above — the totals ARE `PriceSummary`,
|
|
1738
|
-
// the address row IS `AddressRow`, and the tracking strip IS `OrderStatusBar`.
|
|
1739
|
-
export { CheckoutConfirm, CheckoutSummary, CheckoutSummaryRow } from './checkout-summary';
|
|
1740
|
-
export {
|
|
1741
|
-
CHECKOUT_AMOUNT_SEPARATOR,
|
|
1742
|
-
CHECKOUT_CONFIRM_BUSY_LABEL,
|
|
1743
|
-
CHECKOUT_CONFIRM_LABEL,
|
|
1744
|
-
CHECKOUT_GROUP_RADIUS,
|
|
1745
|
-
CHECKOUT_ROW_HINT,
|
|
1746
|
-
CHECKOUT_ROW_ICON,
|
|
1747
|
-
CHECKOUT_ROW_PLACEHOLDER,
|
|
1748
|
-
CHECKOUT_ROW_TILE,
|
|
1749
|
-
checkoutConfirmLabel,
|
|
1750
|
-
checkoutRowName,
|
|
1751
|
-
resolveCheckoutPaint,
|
|
1752
|
-
} from './checkout-summary';
|
|
1753
|
-
export type {
|
|
1754
|
-
CheckoutAddressSummary,
|
|
1755
|
-
CheckoutConfirmProps,
|
|
1756
|
-
CheckoutSummaryLine,
|
|
1757
|
-
CheckoutSummaryPaint,
|
|
1758
|
-
CheckoutSummaryProps,
|
|
1759
|
-
CheckoutSummaryRowProps,
|
|
1760
|
-
} from './checkout-summary';
|
|
1761
|
-
export { OrderConfirmation } from './order-confirmation';
|
|
1762
|
-
export {
|
|
1763
|
-
ORDER_CONFIRMATION_ITEMS_LABEL,
|
|
1764
|
-
ORDER_CONFIRMATION_MARK,
|
|
1765
|
-
ORDER_CONFIRMATION_REFERENCE_LABEL,
|
|
1766
|
-
ORDER_CONFIRMATION_TITLE,
|
|
1767
|
-
} from './order-confirmation';
|
|
1768
|
-
export type {
|
|
1769
|
-
OrderConfirmationAddress,
|
|
1770
|
-
OrderConfirmationFact,
|
|
1771
|
-
OrderConfirmationProps,
|
|
1772
|
-
} from './order-confirmation';
|
|
1773
|
-
|
|
1774
1712
|
// TAKING THE MONEY. `payment-method` is the saved way to pay, `card-form` is
|
|
1775
1713
|
// entering a new one, and `payment-status` is what happened afterwards. None of
|
|
1776
1714
|
// the three holds card data: the masked string, the value and the processor's
|