@tesouro/embedded-components-react 0.11.201 → 0.11.202
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
|
@@ -95,7 +95,9 @@ docs specifies its claims and encryption. Your route returns the same
|
|
|
95
95
|
shortly before `exp`, and shares the signed-in scope with every widget inside
|
|
96
96
|
it. It runs in the browser, so in the App Router it goes in a Client Component
|
|
97
97
|
that your root layout renders, such as `app/providers.tsx`. Import the
|
|
98
|
-
stylesheet there too: widgets render unstyled without it.
|
|
98
|
+
stylesheet there too: widgets render unstyled without it. If you load the
|
|
99
|
+
widgets from the CDN instead, skip this import; see
|
|
100
|
+
[About the stylesheet](#about-the-stylesheet).
|
|
99
101
|
|
|
100
102
|
```tsx
|
|
101
103
|
'use client';
|
|
@@ -148,13 +150,13 @@ them inline.
|
|
|
148
150
|
|
|
149
151
|
### Entry points
|
|
150
152
|
|
|
151
|
-
| Import path | What you get
|
|
152
|
-
| ------------------------------------------------------- |
|
|
153
|
-
| `@tesouro/embedded-components-react` | All widgets, `WidgetSuite`, and the providers, including `RefreshingRootWidgetProvider`.
|
|
154
|
-
| `@tesouro/embedded-components-react/styles.css` | The widget stylesheet. See [About the stylesheet](#about-the-stylesheet).
|
|
155
|
-
| `@tesouro/embedded-components-react/pdf.worker.min.mjs` | The pdf.js worker, to self-host with `configureCsp()` under a strict CSP. Nothing imports it.
|
|
156
|
-
| `@tesouro/embedded-components-react/core` | Framework-agnostic token utilities (`createWidgetTokenManager`).
|
|
157
|
-
| `@tesouro/embedded-components-react/experimental` | Work in progress, with no compatibility promise. See [below](#experimental-entry-point).
|
|
153
|
+
| Import path | What you get |
|
|
154
|
+
| ------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
|
|
155
|
+
| `@tesouro/embedded-components-react` | All widgets, `WidgetSuite`, and the providers, including `RefreshingRootWidgetProvider`. |
|
|
156
|
+
| `@tesouro/embedded-components-react/styles.css` | The widget stylesheet, for the bundled install. See [About the stylesheet](#about-the-stylesheet). |
|
|
157
|
+
| `@tesouro/embedded-components-react/pdf.worker.min.mjs` | The pdf.js worker, to self-host with `configureCsp()` under a strict CSP. Nothing imports it. |
|
|
158
|
+
| `@tesouro/embedded-components-react/core` | Framework-agnostic token utilities (`createWidgetTokenManager`). |
|
|
159
|
+
| `@tesouro/embedded-components-react/experimental` | Work in progress, with no compatibility promise. See [below](#experimental-entry-point). |
|
|
158
160
|
|
|
159
161
|
### Experimental entry point
|
|
160
162
|
|
|
@@ -165,6 +167,18 @@ here. Use it only if we point you at a specific module, and pin an exact version
|
|
|
165
167
|
|
|
166
168
|
### About the stylesheet
|
|
167
169
|
|
|
170
|
+
How the stylesheet reaches the page depends on how you install:
|
|
171
|
+
|
|
172
|
+
- **Bundled from npm**, as in the steps above: import
|
|
173
|
+
`@tesouro/embedded-components-react/styles.css` yourself. The package's
|
|
174
|
+
JavaScript never imports it.
|
|
175
|
+
- **Hosted build through `@tesouro/embedded-components-loader`**: do not import
|
|
176
|
+
`styles.css`. The loader adds the hosted build's stylesheet from the Tesouro
|
|
177
|
+
CDN itself, so importing it too loads the stylesheet twice, and from two
|
|
178
|
+
different versions once your npm install and the hosted version drift apart.
|
|
179
|
+
Your `style-src` then needs the CDN origin; see
|
|
180
|
+
[Load from the Tesouro CDN](https://components.tesouro.com/components/load-from-cdn).
|
|
181
|
+
|
|
168
182
|
The stylesheet won't restyle your host page. It ships no global CSS reset (the
|
|
169
183
|
reset is scoped under the `.tesouro-embedded` wrapper every widget renders), and
|
|
170
184
|
all utilities are `ttw`-prefixed, so it won't collide with your own Tailwind.
|
|
@@ -177,6 +191,11 @@ The widgets run inside your page, so your Content Security Policy has to allow
|
|
|
177
191
|
the origins they reach. Each is first-party Tesouro infrastructure or a URL you
|
|
178
192
|
pass in; nothing is loaded from a third-party CDN.
|
|
179
193
|
|
|
194
|
+
This section covers the bundled install. For the hosted build, follow the
|
|
195
|
+
loader guide's
|
|
196
|
+
[Content Security Policy](https://components.tesouro.com/components/load-from-cdn#content-security-policy)
|
|
197
|
+
instead.
|
|
198
|
+
|
|
180
199
|
| Origin | Directive | What for |
|
|
181
200
|
| ---------------------------------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
182
201
|
| Your `baseUrl`, e.g. `https://api.tesouro.com` | `connect-src` | Every API call. Use `https://api.sandbox.tesouro.com` in sandbox. |
|
|
@@ -219,16 +238,11 @@ needs no `widgets.tesouro.com` entry and no `blob:`.
|
|
|
219
238
|
Copy the file rather than importing it with a bundler `?url` suffix: a library
|
|
220
239
|
build inlines that as base64, which puts the worker back in your bundle.
|
|
221
240
|
|
|
222
|
-
**Styles.** The widget styles are all in `styles.css
|
|
223
|
-
added at run time
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
If it is blocked, dialogs still open but the page behind them can scroll.
|
|
228
|
-
- **Toasts.** The toast library ([sonner](https://sonner.emilkowal.ski)) adds
|
|
229
|
-
its stylesheet when the package loads and cannot take a nonce. A strict
|
|
230
|
-
`style-src` blocks it, so toasts render without their positioning. Allow it
|
|
231
|
-
with `'unsafe-inline'` until this is fixed.
|
|
241
|
+
**Styles.** The widget styles, toast styles included, are all in `styles.css`,
|
|
242
|
+
which you serve from your own origin. One `<style>` tag is added at run time,
|
|
243
|
+
for the dialog scroll lock. It carries your page's nonce, found as above when
|
|
244
|
+
the first dialog opens, so a strict `style-src` needs no `'unsafe-inline'` for
|
|
245
|
+
it. If it is blocked, dialogs still open but the page behind them can scroll.
|
|
232
246
|
|
|
233
247
|
If your policy blocks one of these, only that feature is affected: a PDF
|
|
234
248
|
preview reports a load error, analytics is dropped. The rest of the widget
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
|
|
2
|
-
var e = "@tesouro/embedded-components-react", t = "0.11.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.11.202", n = "d933bf53ea81d7279ad8f9536a723b6d196c6444", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|