@pixelmatters/markup 1.32.3 → 1.32.5
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 +9 -9
- package/dist/widget.js.map +1 -1
- package/package.json +1 -1
- package/skills/install-markup-widget/SKILL.md +4 -4
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.32.
|
|
40
|
+
import { init } from 'https://esm.sh/@pixelmatters/markup@1.32.5'
|
|
41
41
|
// or
|
|
42
|
-
// import { init } from 'https://esm.run/@pixelmatters/markup@1.32.
|
|
42
|
+
// import { init } from 'https://esm.run/@pixelmatters/markup@1.32.5'
|
|
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.32.
|
|
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.32.5`).
|
|
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.32.
|
|
60
|
+
src="https://esm.sh/@pixelmatters/markup@1.32.5"
|
|
61
61
|
data-markup-widget="true"
|
|
62
62
|
data-api-url="https://your-deployment.convex.site"
|
|
63
63
|
data-api-key="markup_..."
|
|
@@ -406,7 +406,7 @@ to start from `anchorSource` and confirm it, not to trust it blindly.
|
|
|
406
406
|
|
|
407
407
|
## How it works
|
|
408
408
|
|
|
409
|
-
- The widget mounts `<div id="markup-widget">` on `document.body` and attaches an open shadow root. It does so once the page is idle, or 2 s after `init()` on a page that never is, so `init()` returns before the element exists.
|
|
409
|
+
- The widget mounts `<div id="markup-widget">` on `document.body` and attaches an open shadow root. It does so once the page is idle, or 2 s after `init()` on a page that never is, so `init()` returns before the element exists. The requests it needs before it can show pins, for the live-update credential and, on a first visit, an anonymous identity, go out from `init()` itself, so they overlap that wait.
|
|
410
410
|
- All UI lives in that shadow root, with `:host { all: initial }` blocking style inheritance.
|
|
411
411
|
- The host element is `position: fixed; inset: 0; pointer-events: none`, so the widget paints over the entire viewport without blocking the host's clicks; only the toolbar and active popovers opt back in to pointer events.
|
|
412
412
|
- A modal on your page, such as a Radix or Base UI dialog, doesn't lock the widget out. Focus, wheel and touch events inside the widget are not passed on to your page, so a focus trap or scroll lock never sees them. A field of yours still gets its `focusout` when focus moves into the widget, without a `relatedTarget`. The widget also removes the `aria-hidden` or `inert` a modal puts on it, so screen readers can reach it. A Base UI popup that allows presses outside it still closes on a click in the widget, and a native `<dialog>` opened with `showModal()` makes the widget inert.
|
|
@@ -501,7 +501,7 @@ For a `<script>` tag drop-in (no bundler), use the inline ESM form and **pin the
|
|
|
501
501
|
|
|
502
502
|
```html
|
|
503
503
|
<script type="module">
|
|
504
|
-
import { init } from 'https://esm.sh/@pixelmatters/markup@1.32.
|
|
504
|
+
import { init } from 'https://esm.sh/@pixelmatters/markup@1.32.5'
|
|
505
505
|
|
|
506
506
|
init({
|
|
507
507
|
apiUrl: '...',
|
|
@@ -517,7 +517,7 @@ If inline JS is disallowed (some CMS / page-builder editors), use the auto-init
|
|
|
517
517
|
```html
|
|
518
518
|
<script
|
|
519
519
|
type="module"
|
|
520
|
-
src="https://esm.sh/@pixelmatters/markup@1.32.
|
|
520
|
+
src="https://esm.sh/@pixelmatters/markup@1.32.5"
|
|
521
521
|
data-markup-widget="true"
|
|
522
522
|
data-api-url="..."
|
|
523
523
|
data-api-key="..."
|