@pixelmatters/markup 1.34.1 → 1.34.3
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 +7 -7
- package/dist/widget.js +8 -8
- package/dist/widget.js.map +1 -1
- package/package.json +1 -1
- package/skills/install-markup-widget/SKILL.md +5 -5
package/README.md
CHANGED
|
@@ -37,9 +37,9 @@ CDN drop-in, no build step. Paste this just before `</body>`:
|
|
|
37
37
|
```html
|
|
38
38
|
<script type="module">
|
|
39
39
|
// Pin the exact version; esm.sh resolves it from npm
|
|
40
|
-
import { init } from 'https://esm.sh/@pixelmatters/markup@1.34.
|
|
40
|
+
import { init } from 'https://esm.sh/@pixelmatters/markup@1.34.3'
|
|
41
41
|
// or
|
|
42
|
-
// import { init } from 'https://esm.run/@pixelmatters/markup@1.34.
|
|
42
|
+
// import { init } from 'https://esm.run/@pixelmatters/markup@1.34.3'
|
|
43
43
|
|
|
44
44
|
init({
|
|
45
45
|
apiUrl: 'https://your-deployment.convex.site',
|
|
@@ -50,14 +50,14 @@ CDN drop-in, no build step. Paste this just before `</body>`:
|
|
|
50
50
|
</script>
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
> **Why pin the version?** CDN URLs without a version (`@pixelmatters/markup`) resolve to whatever's `latest` on npm, so a future major release will break your page with no warning. Always pin (`@pixelmatters/markup@1.34.
|
|
53
|
+
> **Why pin the version?** CDN URLs without a version (`@pixelmatters/markup`) resolve to whatever's `latest` on npm, so a future major release will break your page with no warning. Always pin (`@pixelmatters/markup@1.34.3`).
|
|
54
54
|
|
|
55
55
|
If your platform doesn't allow inline JS (some CMS / page-builder editors), use the auto-init form instead. Point a `<script src=…>` at the bundle and pass config via `data-*` attributes:
|
|
56
56
|
|
|
57
57
|
```html
|
|
58
58
|
<script
|
|
59
59
|
type="module"
|
|
60
|
-
src="https://esm.sh/@pixelmatters/markup@1.34.
|
|
60
|
+
src="https://esm.sh/@pixelmatters/markup@1.34.3"
|
|
61
61
|
data-markup-widget="true"
|
|
62
62
|
data-api-url="https://your-deployment.convex.site"
|
|
63
63
|
data-api-key="markup_..."
|
|
@@ -442,7 +442,7 @@ to start from `anchorSource` and confirm it, not to trust it blindly.
|
|
|
442
442
|
|
|
443
443
|
Anonymous by default, with two opt-in upgrade paths:
|
|
444
444
|
|
|
445
|
-
- **Sign in with Markup.** The widget POSTs to `/widget/popup-exchange` with the apiKey + Origin gate, gets back a single-use
|
|
445
|
+
- **Sign in with Markup.** The click opens a blank popup straight away, so the browser doesn't block it. The widget then POSTs to `/widget/popup-exchange` with the apiKey + Origin gate, gets back a single-use code that lapses after five minutes, and sends the popup to `${apiUrl}/widget/auth?code=…`. Because the popup is first-party to the deployment origin, the better-auth session cookie is sent normally (sidestepping third-party cookie blocks). The popup `postMessage`s a verified identity plus a short-lived server-signed `Bearer` JWT back to the host page, which attaches it as `Authorization: Bearer` on subsequent writes. Where partitioned (CHIPS) cookies are available the tokens are held in `HttpOnly` cookies and the session refreshes for up to 7 days; where they aren't, the widget falls back to `markup.identity` in the host page's `localStorage` and the session is capped at 24 hours, since a token stored there is readable by any script on the page. Whether they are is checked once per tab, when a sign-in looks likely (the pointer on the avatar, its menu open, or a sign-in prompt shown), not on every page load. The apiKey never appears in the popup URL.
|
|
446
446
|
- **Continue as a guest.** Name and optional email, stored alongside the server-issued anonymous `clientId` and JWT minted on first load.
|
|
447
447
|
|
|
448
448
|
The popup origin is validated against the project's `allowedDomains` before any identity is returned, so only embeds on approved domains can resolve dashboard sessions. Verified JWTs can be invalidated before their TTL via the dashboard's "Sign out everywhere" action.
|
|
@@ -525,7 +525,7 @@ For a `<script>` tag drop-in (no bundler), use the inline ESM form and **pin the
|
|
|
525
525
|
|
|
526
526
|
```html
|
|
527
527
|
<script type="module">
|
|
528
|
-
import { init } from 'https://esm.sh/@pixelmatters/markup@1.34.
|
|
528
|
+
import { init } from 'https://esm.sh/@pixelmatters/markup@1.34.3'
|
|
529
529
|
|
|
530
530
|
init({
|
|
531
531
|
apiUrl: '...',
|
|
@@ -541,7 +541,7 @@ If inline JS is disallowed (some CMS / page-builder editors), use the auto-init
|
|
|
541
541
|
```html
|
|
542
542
|
<script
|
|
543
543
|
type="module"
|
|
544
|
-
src="https://esm.sh/@pixelmatters/markup@1.34.
|
|
544
|
+
src="https://esm.sh/@pixelmatters/markup@1.34.3"
|
|
545
545
|
data-markup-widget="true"
|
|
546
546
|
data-api-url="..."
|
|
547
547
|
data-api-key="..."
|