@softistx/pulsarix-widget 0.4.0 → 0.5.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 +3 -3
- package/dist/index.js +24 -24
- package/dist/types/mount.d.ts +6 -0
- package/docs/integration.md +81 -6
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -138,7 +138,7 @@ Server helper: `@softistx/pulsarix-widget/server` exports `signPulsarixIdentity`
|
|
|
138
138
|
| `identity` | `string \| null` | none: today's form only (see "Identified reporters") |
|
|
139
139
|
| `target` | `Element` | `document.body` |
|
|
140
140
|
|
|
141
|
-
`WidgetHandle`: `open()`, `close()`, `setLauncherVisible(visible)`, `destroy()`, `identify(token \| null)`, `setTheme(theme)`, `setLocale(locale)`,
|
|
141
|
+
`WidgetHandle`: `open()`, `close()`, `setLauncherVisible(visible)`, `holdLauncher()` (returns a release function), `destroy()`, `identify(token \| null)`, `setTheme(theme)`, `setLocale(locale)`,
|
|
142
142
|
`setMetadata(metadata \| null)` (see "Changing theme, locale and metadata at run time"), `on(name, callback)` (returns the function that
|
|
143
143
|
unsubscribes) and `element`, the `<pulsarix-widget>` (`element.isOpen`, `element.config`).
|
|
144
144
|
|
|
@@ -184,7 +184,7 @@ works, and its limits: [docs/integration.md](docs/integration.md#9-inheriting-th
|
|
|
184
184
|
`launcher: "auto"` (default) shows a 48 px round icon button below 640 px of viewport width and the text
|
|
185
185
|
pill above, switching live. `"pill"` and `"icon"` force one, `false` removes it. To clear a sticky bar,
|
|
186
186
|
`offset: { bottom: 88 }` (or `--pulsarix-launcher-bottom` / `--pulsarix-launcher-side` in your own CSS), and
|
|
187
|
-
`setLauncherVisible(false)` hides only the launcher, never an open dialog; with the script tag it is
|
|
187
|
+
`setLauncherVisible(false)` hides only the launcher, never an open dialog, and `holdLauncher()` hides it the same way while a host's own sticky bar is up (ref-counted, call the returned function to release); with the script tag it is
|
|
188
188
|
`window.PulsarixWidget.setLauncherVisible(false)`. A negative or malformed offset is ignored. Details and examples:
|
|
189
189
|
[docs/integration.md](docs/integration.md).
|
|
190
190
|
|
|
@@ -307,7 +307,7 @@ export async function loader({ request }: Route.LoaderArgs) {
|
|
|
307
307
|
return {
|
|
308
308
|
pulsarixIdentity: signPulsarixIdentity({
|
|
309
309
|
secret: process.env.PULSARIX_IDENTITY_SECRET as string,
|
|
310
|
-
publicKey: process.env.
|
|
310
|
+
publicKey: process.env.PULSARIX_PROJECT_KEY as string,
|
|
311
311
|
sub: user.id,
|
|
312
312
|
email: user.email,
|
|
313
313
|
name: user.name,
|