@seamapi/react 1.8.0 → 1.9.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 CHANGED
@@ -1,19 +1,27 @@
1
- # Seam React Components
1
+ # Seam Components
2
2
 
3
3
  [![npm](https://img.shields.io/npm/v/@seamapi/react.svg)](https://www.npmjs.com/package/@seamapi/react)
4
4
  [![GitHub Actions](https://github.com/seamapi/react/actions/workflows/check.yml/badge.svg)](https://github.com/seamapi/react/actions/workflows/check.yml)
5
5
 
6
- Seam React component library.
6
+ > Seam Components are implemented in React, but may be used in **any** web application as native **[⚡Web Components ⚡](#with-native-web-components)**
7
7
 
8
8
  ## Description
9
9
 
10
- Zero-backend beautiful drop-in pre-built components
11
- with everything you need to get started with [Seam].
10
+ > [See our official announcement!](https://www.seam.co/blog/Introducing-Seam-Components_ce7e8985-2fe6-4780-8c60-055b34daee55) 🎉
12
11
 
13
- Play with them live in the [Storybook]!
12
+ Seam Components are a set of white-labeled UI elements that can be added to your applications in seconds.
13
+ With these components, you can offer advanced device management features to your users without needing to develop complex logic for managing device state,
14
+ refreshing data, and performing actions.
14
15
 
15
- [Seam]: https://www.seam.co/
16
- [Storybook]: https://react.seam.co/
16
+ ### Resources to Get Started
17
+
18
+ - [Get started with Seam](https://www.seam.co/).
19
+ - [Get started with React and Client Session Tokens](https://docs.seam.co/latest/seam-components/get-started-with-react-components-and-client-session-tokens).
20
+ - [Make a Supported Devices Page with React](https://docs.seam.co/latest/seam-components/make-a-supported-devices-page-with-react).
21
+ - Reference the [Component API](https://docs.seam.co/latest/seam-components/react-components).
22
+ - Find developer specific technical documentation in the [README](https://github.com/seamapi/react/).
23
+ - Play with the components live in the interactive [Storybook](https://react.seam.co/)!
24
+ - See how the components work with a real Seam sandbox workspace in this [live example app](https://react.seam.co/examples/basic/).
17
25
 
18
26
  ## Installation
19
27
 
@@ -27,11 +35,13 @@ $ npm install @seamapi/react
27
35
 
28
36
  ## Usage
29
37
 
30
- > Check out the [full example apps](./examples)!
38
+ ### With React
39
+
40
+ > Check out the [basic example app](./examples/basic)!
31
41
 
32
42
  1. Obtain a publishable key from the [Seam Console].
33
- 2. Wrap your app with the `SeamProvider`.
34
- 3. Drop in Seam components.
43
+ 2. Wrap your React app with the `SeamProvider`.
44
+ 3. Drop in Seam Components.
35
45
 
36
46
  ```ts
37
47
  import { SeamProvider, DeviceTable } from '@seamapi/react'
@@ -50,6 +60,27 @@ export const App = () => {
50
60
 
51
61
  [Seam Console]: https://console.seam.co/
52
62
 
63
+ ### With Native Web Components
64
+
65
+ > Check out the [web component example app](./examples/web-components)!
66
+
67
+ 1. Obtain a publishable key from the [Seam Console].
68
+ 2. Add the `<script>` tag to your page and drop in Seam Components.
69
+
70
+ ```html
71
+ <body>
72
+ <seam-device-table publishable-key="your_publishable_key"></seam-device-table>
73
+ <script
74
+ type="module"
75
+ src="https://react.seam.co/v/1.7.0/dist/elements.js"
76
+ ></script>
77
+ </body>
78
+ ```
79
+
80
+ > Update the version in the script tag above with the exact version of this package you would like to use.
81
+
82
+ [Seam Console]: https://console.seam.co/
83
+
53
84
  ### Styles
54
85
 
55
86
  > CSS is automatically included unless using `<SeamProvider disableCssInjection />`.
@@ -71,7 +102,7 @@ or place the following in the `<head>` tag:
71
102
  > You must match the version string below with the exact version of this package used by your application.
72
103
 
73
104
  ```html
74
- <link rel="stylesheet" href="https://react.seam.co/v/1.0.0/index.min.css" />
105
+ <link rel="stylesheet" href="https://react.seam.co/v/1.7.0/index.min.css" />
75
106
  ```
76
107
 
77
108
  #### Customizing Styles
package/dist/elements.js CHANGED
@@ -8077,7 +8077,7 @@ const mm = "https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;60
8077
8077
  const n = globalThis.document.createElement("link");
8078
8078
  n.rel = "stylesheet", n.type = "text/css", n.href = mm, globalThis.document.head.appendChild(n);
8079
8079
  }, [t]);
8080
- }, NE = "1.8.0", HE = "https://react.seam.co", DE = ({
8080
+ }, NE = "1.9.1", HE = "https://react.seam.co", DE = ({
8081
8081
  disabled: t = !1,
8082
8082
  unminified: e = !1
8083
8083
  }) => {
@@ -24308,7 +24308,8 @@ const On = {
24308
24308
  end: "End"
24309
24309
  }, YM = "seam-access-code-details", JM = {
24310
24310
  accessCodeId: "string",
24311
- onBack: "function"
24311
+ onBack: "function",
24312
+ className: "string"
24312
24313
  }, XM = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
24313
24314
  __proto__: null,
24314
24315
  Component: k1,
@@ -24316,7 +24317,8 @@ const On = {
24316
24317
  props: JM
24317
24318
  }, Symbol.toStringTag, { value: "Module" })), eT = "seam-access-code-table", tT = {
24318
24319
  deviceId: "string",
24319
- onBack: "function"
24320
+ onBack: "function",
24321
+ className: "string"
24320
24322
  }, nT = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
24321
24323
  __proto__: null,
24322
24324
  Component: P1,
@@ -24324,7 +24326,8 @@ const On = {
24324
24326
  props: tT
24325
24327
  }, Symbol.toStringTag, { value: "Module" })), rT = "seam-device-details", iT = {
24326
24328
  deviceId: "string",
24327
- onBack: "function"
24329
+ onBack: "function",
24330
+ className: "string"
24328
24331
  }, oT = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
24329
24332
  __proto__: null,
24330
24333
  Component: Wf,
@@ -24590,7 +24593,7 @@ function yT(t) {
24590
24593
  function gT({
24591
24594
  onBack: t,
24592
24595
  className: e
24593
- }) {
24596
+ } = {}) {
24594
24597
  const { devices: n, isLoading: r, isError: i, error: o } = yT(), [s, l] = k.useState(null), [c, a] = k.useState("");
24595
24598
  if (s != null)
24596
24599
  return /* @__PURE__ */ v.jsx(
@@ -24665,7 +24668,8 @@ const N1 = {
24665
24668
  unknownLock: "Unknown Lock",
24666
24669
  noDevicesMessage: "Sorry, no devices were found"
24667
24670
  }, bT = "seam-device-table", ST = {
24668
- onBack: "function"
24671
+ onBack: "function",
24672
+ className: "string"
24669
24673
  }, AT = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
24670
24674
  __proto__: null,
24671
24675
  Component: gT,
@@ -24977,7 +24981,7 @@ const RT = (t) => {
24977
24981
  function _T({
24978
24982
  cannotFilter: t = !1,
24979
24983
  className: e
24980
- }) {
24984
+ } = {}) {
24981
24985
  const [n, r] = k.useState(""), [i, o] = k.useState({
24982
24986
  supportedOnly: !1,
24983
24987
  category: null,
@@ -25015,7 +25019,8 @@ function _T({
25015
25019
  );
25016
25020
  }
25017
25021
  const kT = "seam-supported-device-table", NT = {
25018
- cannotFilter: "boolean"
25022
+ cannotFilter: "boolean",
25023
+ className: "string"
25019
25024
  }, HT = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
25020
25025
  __proto__: null,
25021
25026
  Component: _T,