@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.
- package/README.md +1 -1
- package/docs/adoption-matrix.mdx +1 -1
- package/docs/link-preview.mdx +19 -2
- package/docs/tab-bar.mdx +1 -1
- package/lib/commonjs/index.js +102 -110
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/index.web.js +102 -110
- package/lib/commonjs/index.web.js.map +1 -1
- package/lib/commonjs/link-preview/LinkPreviewCard.js +25 -10
- package/lib/commonjs/link-preview/LinkPreviewCard.js.map +1 -1
- package/lib/module/index.js +5 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js +5 -2
- package/lib/module/index.web.js.map +1 -1
- package/lib/module/link-preview/LinkPreviewCard.js +27 -10
- package/lib/module/link-preview/LinkPreviewCard.js.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +0 -2
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.web.d.ts +0 -2
- package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/link-preview/LinkPreviewCard.d.ts +5 -4
- package/lib/typescript/commonjs/link-preview/LinkPreviewCard.d.ts.map +1 -1
- package/lib/typescript/commonjs/link-preview/index.d.ts +1 -1
- package/lib/typescript/commonjs/link-preview/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/link-preview/types.d.ts +16 -4
- package/lib/typescript/commonjs/link-preview/types.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +0 -2
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/index.web.d.ts +0 -2
- package/lib/typescript/module/index.web.d.ts.map +1 -1
- package/lib/typescript/module/link-preview/LinkPreviewCard.d.ts +5 -4
- package/lib/typescript/module/link-preview/LinkPreviewCard.d.ts.map +1 -1
- package/lib/typescript/module/link-preview/index.d.ts +1 -1
- package/lib/typescript/module/link-preview/index.d.ts.map +1 -1
- package/lib/typescript/module/link-preview/types.d.ts +16 -4
- package/lib/typescript/module/link-preview/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/__tests__/support/adoption-matrix.ts +695 -0
- package/src/__tests__/support/card-surface.ts +31 -0
- package/src/__tests__/support/collision-fixture-barrel.ts +20 -0
- package/src/__tests__/support/commerce-harness.tsx +97 -0
- package/src/__tests__/support/composite.ts +71 -0
- package/src/__tests__/support/constructed-style-sheets.ts +64 -0
- package/src/__tests__/support/messages-in.ts +10 -0
- package/src/__tests__/support/press-host.ts +30 -0
- package/src/__tests__/support/rendered-style.ts +99 -0
- package/src/__tests__/support/unread-hook-fixture.ts +33 -0
- package/src/__tests__/support/worklet-capture-fixture.tsx +34 -0
- package/src/__tests__/support/yoga-host-tree.ts +73 -0
- package/src/agent-avatar/__tests__/artwork-golden.json +774 -0
- package/src/agent-creator/__tests__/support/character-runtime-fixture.tsx +24 -0
- package/src/index.ts +4 -3
- package/src/index.web.ts +4 -3
- package/src/link-preview/LinkPreviewCard.tsx +31 -9
- package/src/link-preview/index.ts +1 -1
- package/src/link-preview/types.ts +17 -4
- package/src/theme/__tests__/__fixtures__/golden-resolved-tokens.json +9346 -0
- package/src/theme/__tests__/__fixtures__/tonal-glass-primary-failures.json +69 -0
- 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
|
|
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
|
---
|
package/docs/adoption-matrix.mdx
CHANGED
|
@@ -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`
|
|
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 | | | | |
|
package/docs/link-preview.mdx
CHANGED
|
@@ -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
|
|
49
|
+
## `image` is a URL — or the same image at several widths
|
|
50
50
|
|
|
51
|
-
|
|
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
|
|
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
|