@oxy.so/bloom 7.33.1 → 8.0.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 (59) hide show
  1. package/README.md +1 -1
  2. package/docs/adoption-matrix.mdx +1 -1
  3. package/docs/link-preview.mdx +19 -2
  4. package/docs/tab-bar.mdx +1 -1
  5. package/lib/commonjs/index.js +102 -110
  6. package/lib/commonjs/index.js.map +1 -1
  7. package/lib/commonjs/index.web.js +102 -110
  8. package/lib/commonjs/index.web.js.map +1 -1
  9. package/lib/commonjs/link-preview/LinkPreviewCard.js +25 -10
  10. package/lib/commonjs/link-preview/LinkPreviewCard.js.map +1 -1
  11. package/lib/module/index.js +5 -2
  12. package/lib/module/index.js.map +1 -1
  13. package/lib/module/index.web.js +5 -2
  14. package/lib/module/index.web.js.map +1 -1
  15. package/lib/module/link-preview/LinkPreviewCard.js +27 -10
  16. package/lib/module/link-preview/LinkPreviewCard.js.map +1 -1
  17. package/lib/typescript/commonjs/index.d.ts +0 -2
  18. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  19. package/lib/typescript/commonjs/index.web.d.ts +0 -2
  20. package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
  21. package/lib/typescript/commonjs/link-preview/LinkPreviewCard.d.ts +5 -4
  22. package/lib/typescript/commonjs/link-preview/LinkPreviewCard.d.ts.map +1 -1
  23. package/lib/typescript/commonjs/link-preview/index.d.ts +1 -1
  24. package/lib/typescript/commonjs/link-preview/index.d.ts.map +1 -1
  25. package/lib/typescript/commonjs/link-preview/types.d.ts +16 -4
  26. package/lib/typescript/commonjs/link-preview/types.d.ts.map +1 -1
  27. package/lib/typescript/module/index.d.ts +0 -2
  28. package/lib/typescript/module/index.d.ts.map +1 -1
  29. package/lib/typescript/module/index.web.d.ts +0 -2
  30. package/lib/typescript/module/index.web.d.ts.map +1 -1
  31. package/lib/typescript/module/link-preview/LinkPreviewCard.d.ts +5 -4
  32. package/lib/typescript/module/link-preview/LinkPreviewCard.d.ts.map +1 -1
  33. package/lib/typescript/module/link-preview/index.d.ts +1 -1
  34. package/lib/typescript/module/link-preview/index.d.ts.map +1 -1
  35. package/lib/typescript/module/link-preview/types.d.ts +16 -4
  36. package/lib/typescript/module/link-preview/types.d.ts.map +1 -1
  37. package/package.json +2 -2
  38. package/src/__tests__/support/adoption-matrix.ts +695 -0
  39. package/src/__tests__/support/card-surface.ts +31 -0
  40. package/src/__tests__/support/collision-fixture-barrel.ts +20 -0
  41. package/src/__tests__/support/commerce-harness.tsx +97 -0
  42. package/src/__tests__/support/composite.ts +71 -0
  43. package/src/__tests__/support/constructed-style-sheets.ts +64 -0
  44. package/src/__tests__/support/messages-in.ts +10 -0
  45. package/src/__tests__/support/press-host.ts +30 -0
  46. package/src/__tests__/support/rendered-style.ts +99 -0
  47. package/src/__tests__/support/unread-hook-fixture.ts +33 -0
  48. package/src/__tests__/support/worklet-capture-fixture.tsx +34 -0
  49. package/src/__tests__/support/yoga-host-tree.ts +73 -0
  50. package/src/agent-avatar/__tests__/artwork-golden.json +774 -0
  51. package/src/agent-creator/__tests__/support/character-runtime-fixture.tsx +24 -0
  52. package/src/index.ts +4 -3
  53. package/src/index.web.ts +4 -3
  54. package/src/link-preview/LinkPreviewCard.tsx +31 -9
  55. package/src/link-preview/index.ts +1 -1
  56. package/src/link-preview/types.ts +17 -4
  57. package/src/theme/__tests__/__fixtures__/golden-resolved-tokens.json +9346 -0
  58. package/src/theme/__tests__/__fixtures__/tonal-glass-primary-failures.json +69 -0
  59. package/src/theme/__tests__/fixtures/color-engine-golden.json +1 -0
package/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
  <img alt="React Native" src="https://img.shields.io/badge/React%20Native-0.73%2B-61DAFB?style=flat-square&logo=react&logoColor=black">
10
10
  <img alt="Expo" src="https://img.shields.io/badge/Expo-supported-000020?style=flat-square&logo=expo&logoColor=white">
11
11
  <img alt="TypeScript" src="https://img.shields.io/badge/TypeScript-3178C6?style=flat-square&logo=typescript&logoColor=white">
12
- <img alt="Bun" src="https://img.shields.io/badge/Bun-1.3.14-000000?style=flat-square&logo=bun&logoColor=white">
12
+ <img alt="Bun" src="https://img.shields.io/badge/Bun-1.4.3-000000?style=flat-square&logo=bun&logoColor=white">
13
13
  </p>
14
14
 
15
15
  ---
@@ -205,7 +205,7 @@ The classification is an EQUALITY in `src/__tests__/adoption-matrix.test.ts`, no
205
205
  | `label` | `@oxy.so/bloom/label` + barrel | universal | `label.mdx` | yes | 2 | | reads | | |
206
206
  | `layout` | `@oxy.so/bloom/layout` + barrel | universal | `layout.mdx` | yes | 14 | | | | |
207
207
  | `lead-score` | `@oxy.so/bloom/lead-score` + barrel | universal | `lead-score.mdx` | yes | 1 | | | | |
208
- | `link-preview` | `@oxy.so/bloom/link-preview` + barrel | universal | `link-preview.mdx` | yes | 3 | | | | |
208
+ | `link-preview` | `@oxy.so/bloom/link-preview` | universal | `link-preview.mdx` | yes | 3 | | | | |
209
209
  | `list` | `@oxy.so/bloom/list` + barrel | web fork | `list.mdx` | yes | 2 | | | | |
210
210
  | `listing-actions` | `@oxy.so/bloom/listing-actions` + barrel | universal | `listing-actions.mdx` | yes | 3 | **adaptation** | | | reads |
211
211
  | `listing-card` | `@oxy.so/bloom/listing-card` + barrel | universal | `listing-card.mdx` | yes | 6 | | | | |
@@ -46,9 +46,26 @@ The props mirror the platform's `LinkPreview` DTO but are declared
46
46
  independently, so Bloom does not depend on `@oxy.so/contracts`. If the DTO gains
47
47
  a field, map it at the call site.
48
48
 
49
- ## `image` is a plain URL, not a file id
49
+ ## `image` is a URL — or the same image at several widths
50
50
 
51
- It is rendered directly with the RN `Image` primitive, **not** through
51
+ Pass one absolute URL, or every rendition the image host serves, each with its
52
+ pixel width:
53
+
54
+ ```tsx
55
+ import { contentImageSources } from '@oxy.so/utils/image';
56
+
57
+ <LinkPreviewCard url={doc.url} title={doc.title} image={contentImageSources(doc.imageUrl)} />
58
+ ```
59
+
60
+ The cover is an `expo-image`, which loads the smallest rendition that covers
61
+ the space the card is laid out in — a `srcset` on web, the view's size times
62
+ the pixel ratio on native. So the same card loads a 640px rendition in a
63
+ 280px-wide row and a 1280px one at full width, without the caller measuring
64
+ anything. That is also why the card is only on its own subpath
65
+ (`@oxy.so/bloom/link-preview`): `expo-image` must stay out of the root barrel's
66
+ module graph.
67
+
68
+ It is rendered directly, **not** through
52
69
  [`ImageResolver`](/docs/bloom/main/image-resolver) — an OG image comes from
53
70
  whatever host the linked page uses, so there is no Oxy file id to resolve.
54
71
 
package/docs/tab-bar.mdx CHANGED
@@ -31,7 +31,7 @@ The bar also uses Bloom's existing `expo-blur`, `react-native-reanimated`, `reac
31
31
 
32
32
  Both are nonetheless declared as **required** peers, deliberately. They are static imports, so omitting them from a native build that imports the tab bar does not degrade to anything — Metro fails to resolve the specifier and the build dies. The only thing marking them optional would buy is silencing the one warning that says so in advance. That applies on Android too: the native module there is Apple-only (`"platforms": ["apple"]`), but the JS package still has to be installed for the bundle to resolve.
33
33
 
34
- That degrade-to-nothing only follows once you import the tab bar. An app that never imports `@oxy.so/bloom/tab-bar` at all — on native or web — never reaches these files, so leaving the peer unmet costs nothing; don't install two Apple-only packages just to quiet a warning about a surface you don't use. In practice bun 1.3.14 doesn't even print that warning, so the gap is silent regardless of whether you use the tab bar.
34
+ That degrade-to-nothing only follows once you import the tab bar. An app that never imports `@oxy.so/bloom/tab-bar` at all — on native or web — never reaches these files, so leaving the peer unmet costs nothing; don't install two Apple-only packages just to quiet a warning about a surface you don't use. In practice bun never shows the gap: it installs a required peer itself, so both packages land in the lockfile of an app that does not list them, with no warning either way (measured on bun 1.4.3).
35
35
  </Callout>
36
36
 
37
37
  ## Usage without a router