@seamapi/react 5.1.1 → 5.2.1
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 +46 -3
- package/dist/ecosystem.js +11 -10
- package/dist/ecosystem.js.map +1 -1
- package/dist/elements.js +6569 -6496
- package/dist/elements.js.map +1 -1
- package/dist/index.css +13 -0
- package/dist/index.css.map +1 -1
- package/dist/index.min.css +1 -1
- package/dist/index.min.css.map +1 -1
- package/lib/seam/components/SupportedDevices/DeviceModelRow.js +18 -2
- package/lib/seam/components/SupportedDevices/DeviceModelRow.js.map +1 -1
- package/lib/seam/components/SupportedDevices/SupportedDevices.d.ts +3 -1
- package/lib/seam/components/SupportedDevices/SupportedDevices.js +5 -3
- package/lib/seam/components/SupportedDevices/SupportedDevices.js.map +1 -1
- package/lib/seam/components/SupportedDevices/device-models.d.ts +6 -2
- package/lib/seam/components/SupportedDevices/device-models.js +46 -3
- package/lib/seam/components/SupportedDevices/device-models.js.map +1 -1
- package/lib/seam/ecosystem/use-ecosystem-device-model-summaries.js +15 -4
- package/lib/seam/ecosystem/use-ecosystem-device-model-summaries.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/src/lib/seam/components/SupportedDevices/DeviceModelRow.tsx +35 -1
- package/src/lib/seam/components/SupportedDevices/SupportedDevices.element.ts +1 -0
- package/src/lib/seam/components/SupportedDevices/SupportedDevices.tsx +12 -2
- package/src/lib/seam/components/SupportedDevices/device-models.ts +72 -2
- package/src/lib/seam/ecosystem/use-ecosystem-device-model-summaries.ts +14 -6
- package/src/lib/version.ts +1 -1
- package/src/styles/_supported-devices.scss +16 -0
package/README.md
CHANGED
|
@@ -86,7 +86,7 @@ export function App() {
|
|
|
86
86
|
<seam-device-table publishable-key="your_publishable_key"></seam-device-table>
|
|
87
87
|
<script
|
|
88
88
|
type="module"
|
|
89
|
-
src="https://react.seam.co/v/5.
|
|
89
|
+
src="https://react.seam.co/v/5.2.1/dist/elements.js"
|
|
90
90
|
></script>
|
|
91
91
|
</body>
|
|
92
92
|
```
|
|
@@ -173,7 +173,7 @@ Load the lightweight `ecosystem.js` bundle, which only contains these two elemen
|
|
|
173
173
|
></seam-supported-devices>
|
|
174
174
|
<script
|
|
175
175
|
type="module"
|
|
176
|
-
src="https://react.seam.co/v/5.
|
|
176
|
+
src="https://react.seam.co/v/5.2.1/dist/ecosystem.js"
|
|
177
177
|
></script>
|
|
178
178
|
</body>
|
|
179
179
|
```
|
|
@@ -196,6 +196,7 @@ Load the lightweight `ecosystem.js` bundle, which only contains these two elemen
|
|
|
196
196
|
| Attribute | Description |
|
|
197
197
|
| -------------- | ------------------------------------------------------------------------------------- |
|
|
198
198
|
| `manufacturer` | DeviceDB manufacturer slug. Defaults to the manufacturer of a manufacturer embed key. |
|
|
199
|
+
| `provider` | Ecosystem provider slug, e.g., `oracode`. Scopes both models and capability badges. |
|
|
199
200
|
| `device-type` | DeviceDB device type slug, e.g., `smartlock` or `thermostat`. |
|
|
200
201
|
| `capability` | Only devices supporting this capability, e.g., `can_program_online_access_codes`. |
|
|
201
202
|
| `hide-search` | Hide the search field. |
|
|
@@ -232,6 +233,48 @@ The data is also available with the `useCompatiblePartners`, `useEcosystemDevice
|
|
|
232
233
|
|
|
233
234
|
[Seam Ecosystem]: https://ecosystem.seam.co/
|
|
234
235
|
|
|
236
|
+
### Hosted supported-device embed
|
|
237
|
+
|
|
238
|
+
The native React page at
|
|
239
|
+
`https://react.seam.co/examples/supported-devices` is designed for documentation
|
|
240
|
+
hosts such as Mintlify that cannot import an npm component. It composes
|
|
241
|
+
`EcosystemProvider` and `SupportedDevices`, reads the public production Ecosystem
|
|
242
|
+
catalog without an embed key, and never uses Storybook fixtures or Strapi.
|
|
243
|
+
|
|
244
|
+
The hosted page reads `/ecosystem/v1/device_models/summaries/list` and
|
|
245
|
+
`/ecosystem/v1/manufacturers/list` on its own origin. Vercel forwards these two
|
|
246
|
+
public routes to the production Ecosystem API, preserving query parameters.
|
|
247
|
+
This avoids browser local-network restrictions when a visitor's VPN or split DNS
|
|
248
|
+
resolves `ecosystem.seam.co` to a private address. Vite proxies the same paths
|
|
249
|
+
during local development. These routes do not expose admin or write endpoints.
|
|
250
|
+
|
|
251
|
+
Query parameters are `manufacturer`, `provider` (Ecosystem slugs, not Seam Connect
|
|
252
|
+
provider keys), `device_type`, `capability`, and `theme` (`light`, `dark`, `auto`).
|
|
253
|
+
For example, use `?manufacturer=dormakaba&provider=oracode` to avoid listing other
|
|
254
|
+
Dormakaba systems. Provider scoping applies to both models and capability badges.
|
|
255
|
+
Unavailable, planned, and stale capabilities are not advertised as supported;
|
|
256
|
+
beta capabilities are labelled, and conditional requirements can be expanded.
|
|
257
|
+
|
|
258
|
+
Embed the page in an iframe with `referrerpolicy="origin"`. Approved frame
|
|
259
|
+
ancestors are Seam's website/docs, Mintlify previews, and localhost development.
|
|
260
|
+
Other routes retain their existing frame restrictions. The host should always
|
|
261
|
+
provide a device catalog link outside the iframe, so it remains available if
|
|
262
|
+
scripts or the iframe fail to load.
|
|
263
|
+
|
|
264
|
+
The iframe posts `{ type: 'seam-supported-devices:resize', height }` to the exact
|
|
265
|
+
origin from `document.referrer` whenever its content height changes. The host
|
|
266
|
+
must check both `event.origin === 'https://react.seam.co'` and
|
|
267
|
+
`event.source === iframe.contentWindow`, then validate a finite positive height.
|
|
268
|
+
From that same parent window and origin, the page accepts
|
|
269
|
+
`{ type: 'seam-supported-devices:theme', theme: 'light' | 'dark' }` and
|
|
270
|
+
`{ type: 'seam-supported-devices:measure' }`. This lets docs follow their theme
|
|
271
|
+
toggle and request a fresh measurement after loading. Listeners and observers
|
|
272
|
+
are removed on unmount.
|
|
273
|
+
|
|
274
|
+
Deploy this React change before switching the docs snippet to the new URL.
|
|
275
|
+
The page uses the component built in the same deployment and hashed assets;
|
|
276
|
+
it does not load an unpinned npm package or CDN script at runtime.
|
|
277
|
+
|
|
235
278
|
### React Hooks
|
|
236
279
|
|
|
237
280
|
All components interact with the Seam API via a set of React Hooks.
|
|
@@ -306,7 +349,7 @@ or place the following in the `<head>` tag:
|
|
|
306
349
|
```html
|
|
307
350
|
<link
|
|
308
351
|
rel="stylesheet"
|
|
309
|
-
href="https://react.seam.co/v/5.
|
|
352
|
+
href="https://react.seam.co/v/5.2.1/dist/index.min.css"
|
|
310
353
|
/>
|
|
311
354
|
```
|
|
312
355
|
|