@pixelmatters/markup 1.16.1 → 1.17.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 +20 -13
- package/dist/widget.js +830 -573
- package/dist/widget.js.map +1 -1
- package/package.json +1 -1
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.
|
|
40
|
+
import { init } from 'https://esm.sh/@pixelmatters/markup@1.17.0'
|
|
41
41
|
// or
|
|
42
|
-
// import { init } from 'https://esm.run/@pixelmatters/markup@1.
|
|
42
|
+
// import { init } from 'https://esm.run/@pixelmatters/markup@1.17.0'
|
|
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 — a future major release will break your page silently. Always pin (`@pixelmatters/markup@1.
|
|
53
|
+
> **Why pin the version?** CDN URLs without a version (`@pixelmatters/markup`) resolve to whatever's `latest` on npm — a future major release will break your page silently. Always pin (`@pixelmatters/markup@1.17.0`).
|
|
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.
|
|
60
|
+
src="https://esm.sh/@pixelmatters/markup@1.17.0"
|
|
61
61
|
data-markup-widget="true"
|
|
62
62
|
data-api-url="https://your-deployment.convex.site"
|
|
63
63
|
data-api-key="markup_..."
|
|
@@ -185,16 +185,21 @@ Unmounts the widget and removes the host element. Safe to call when nothing is m
|
|
|
185
185
|
|
|
186
186
|
The widget mounts a single compact pill in the corner set by `position`:
|
|
187
187
|
|
|
188
|
-
| Control | What it does
|
|
189
|
-
| ------------------- |
|
|
190
|
-
| **Comment** | Arms placement — the next click on the page drops a pin. Flips to a cancel icon while armed.
|
|
191
|
-
| **Inbox** | Mention notifications for this project, with an unread badge. Signed-in users only; anonymous visitors don't get the button.
|
|
192
|
-
| **Pins** (eye) | Hides or shows every pin without hiding the toolbar.
|
|
193
|
-
| **Identity** | Avatar button. Anonymous: a sign-in prompt plus "Forget me on this site". Signed in: name, email, an **Account →** link when `dashboardUrl` is set, and **Sign out**.
|
|
194
|
-
| **Overflow** (`☰`) | **Appearance** (Light / Dark / Auto), **Position** (left / center / right), an **Auto-capture screenshots** toggle, **Hide for this session**, and the widget version. |
|
|
188
|
+
| Control | What it does |
|
|
189
|
+
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
190
|
+
| **Comment** | Arms placement — the next click on the page drops a pin. Flips to a cancel icon while armed. |
|
|
191
|
+
| **Inbox** | Mention notifications for this project, with an unread badge. Signed-in users only; anonymous visitors don't get the button. |
|
|
192
|
+
| **Pins** (eye) | Hides or shows every pin without hiding the toolbar. |
|
|
193
|
+
| **Identity** | Avatar button. Anonymous: a sign-in prompt plus "Forget me on this site". Signed in: name, email, an **Account →** link when `dashboardUrl` is set, and **Sign out**. |
|
|
194
|
+
| **Overflow** (`☰`) | **Appearance** (Light / Dark / Auto), **Position** (left / center / right), an **Auto-capture screenshots** toggle, **Privacy & data**, **Keyboard shortcuts**, **Hide for this session**, and the widget version. |
|
|
195
195
|
|
|
196
196
|
Appearance persists to the host page's `localStorage` (`markup:widget:theme`) and, once a user has set it, takes precedence over the `theme` option on every later `init()`. Position, pin visibility, and the auto-capture toggle are per-mount — they reset on reload, and `position` seeds the toolbar again.
|
|
197
197
|
|
|
198
|
+
The last two menu rows open panels anchored to the same corner as the toolbar:
|
|
199
|
+
|
|
200
|
+
- **Privacy & data** — a plain-language account of what the widget holds, generated from the live session rather than from a policy document: who you're posting as, what a comment sends, what sits in this site's storage, whether captures are on, and the single host the widget talks to. Anonymous visitors also get **Forget me on this site** here, with the same arm-then-confirm as the identity menu.
|
|
201
|
+
- **Keyboard shortcuts** — the table below, in the modifier vocabulary of the reader's platform. The menu is the only way in on purpose: a key binding for it (`?` being the conventional one) would compete with whatever your app already binds, and the widget can't see your handlers to know.
|
|
202
|
+
|
|
198
203
|
### Keyboard & mouse
|
|
199
204
|
|
|
200
205
|
| Shortcut | Action |
|
|
@@ -237,6 +242,8 @@ When a screenshot is attached in the composer, a chip shows how many fields were
|
|
|
237
242
|
|
|
238
243
|
Users can also switch capture off for themselves with **Auto-capture screenshots** in the toolbar's overflow menu. A host that set `screenshots.enabled: false` still wins — the row renders disabled and says so, rather than offering a control that does nothing.
|
|
239
244
|
|
|
245
|
+
The overflow menu's **Privacy & data** panel restates all of this for the person using the widget, and reflects whichever of the three capture states is live: captures on, switched off by the user, or disabled by the host.
|
|
246
|
+
|
|
240
247
|
### When a capture doesn't work out
|
|
241
248
|
|
|
242
249
|
Capture degrades instead of failing silently:
|
|
@@ -329,7 +336,7 @@ For a `<script>` tag drop-in (no bundler), use the inline ESM form and **pin the
|
|
|
329
336
|
|
|
330
337
|
```html
|
|
331
338
|
<script type="module">
|
|
332
|
-
import { init } from 'https://esm.sh/@pixelmatters/markup@1.
|
|
339
|
+
import { init } from 'https://esm.sh/@pixelmatters/markup@1.17.0'
|
|
333
340
|
|
|
334
341
|
init({
|
|
335
342
|
apiUrl: '...',
|
|
@@ -345,7 +352,7 @@ If inline JS is disallowed (some CMS / page-builder editors), use the auto-init
|
|
|
345
352
|
```html
|
|
346
353
|
<script
|
|
347
354
|
type="module"
|
|
348
|
-
src="https://esm.sh/@pixelmatters/markup@1.
|
|
355
|
+
src="https://esm.sh/@pixelmatters/markup@1.17.0"
|
|
349
356
|
data-markup-widget="true"
|
|
350
357
|
data-api-url="..."
|
|
351
358
|
data-api-key="..."
|