@pixelmatters/markup 1.34.2 → 1.34.4
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 +6 -6
- package/dist/widget.js +8 -8
- package/dist/widget.js.map +1 -1
- package/package.json +2 -2
- package/skills/install-markup-widget/SKILL.md +9 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixelmatters/markup",
|
|
3
|
-
"version": "1.34.
|
|
3
|
+
"version": "1.34.4",
|
|
4
4
|
"description": "Embeddable feedback widget for collecting visual bug reports, screenshots, and comments on live web apps.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"annotation",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"@playwright/test": "^1.63.0",
|
|
61
61
|
"@preact/preset-vite": "^2.10.6",
|
|
62
62
|
"@preact/signals": "^2.11.3",
|
|
63
|
-
"@tanstack/intent": "^0.
|
|
63
|
+
"@tanstack/intent": "^0.5.5",
|
|
64
64
|
"@types/react": "^19.3.0",
|
|
65
65
|
"@types/react-dom": "^19.3.0",
|
|
66
66
|
"convex": "^1.38.0",
|
|
@@ -7,7 +7,7 @@ sources:
|
|
|
7
7
|
- 'Pixelmatters/markup:packages/widget/src/widget.ts'
|
|
8
8
|
metadata:
|
|
9
9
|
library: pixelmatters-markup
|
|
10
|
-
library_version: '1.34.
|
|
10
|
+
library_version: '1.34.4'
|
|
11
11
|
---
|
|
12
12
|
|
|
13
13
|
`@pixelmatters/markup` is a Preact widget that runs inside a shadow DOM and talks to a hosted Convex backend at `https://<deployment>.convex.site`. The host page calls `init({ apiUrl, apiKey })` once at the app root and gets back a `destroy()` function. Everything else lives inside the widget bundle: pin anchoring, threads, mentions, identity, screenshots, real-time updates.
|
|
@@ -26,7 +26,7 @@ For a `<script>`-tag drop-in (no bundler / CMS / page-builder), use the inline E
|
|
|
26
26
|
|
|
27
27
|
```html
|
|
28
28
|
<script type="module">
|
|
29
|
-
import { init } from 'https://esm.sh/@pixelmatters/markup@1.34.
|
|
29
|
+
import { init } from 'https://esm.sh/@pixelmatters/markup@1.34.4'
|
|
30
30
|
init({ apiUrl: '…', apiKey: '…' })
|
|
31
31
|
</script>
|
|
32
32
|
```
|
|
@@ -36,7 +36,7 @@ If the host disallows inline JS, use the auto-init form. `data-markup-widget="tr
|
|
|
36
36
|
```html
|
|
37
37
|
<script
|
|
38
38
|
type="module"
|
|
39
|
-
src="https://esm.sh/@pixelmatters/markup@1.34.
|
|
39
|
+
src="https://esm.sh/@pixelmatters/markup@1.34.4"
|
|
40
40
|
data-markup-widget="true"
|
|
41
41
|
data-api-url="…"
|
|
42
42
|
data-api-key="…"
|
|
@@ -60,7 +60,10 @@ import { init, destroy } from '@pixelmatters/markup'
|
|
|
60
60
|
If `apiUrl` or `apiKey` is missing, `init` logs a `[markup]` console warning and returns a no-op `destroy` rather than mounting, which is worth knowing when debugging "nothing showed up."
|
|
61
61
|
|
|
62
62
|
```tsx
|
|
63
|
-
// React: render <Markup /> once near the root.
|
|
63
|
+
// React: render <Markup /> once near the root. Shown for Vite, whose templates
|
|
64
|
+
// already carry this reference in src/vite-env.d.ts. On Next.js App Router, add
|
|
65
|
+
// 'use client' and read process.env.NEXT_PUBLIC_MARKUP_API_URL / _API_KEY instead.
|
|
66
|
+
/// <reference types="vite/client" />
|
|
64
67
|
import { useMarkup } from '@pixelmatters/markup/react'
|
|
65
68
|
|
|
66
69
|
export function Markup() {
|
|
@@ -168,7 +171,7 @@ Optional, and worth suggesting on a component-based app:
|
|
|
168
171
|
|
|
169
172
|
## Mentions & inbox
|
|
170
173
|
|
|
171
|
-
Typing `@` in a composer opens a picker of project members and inserts a chip, and the stored `@[Display Name]
|
|
174
|
+
Typing `@` in a composer opens a picker of project members and inserts a chip, and the stored form, `@[Display Name]` followed by the member's id in parentheses, never reaches the screen. `↑`/`↓` move, `enter` or `tab` picks, `esc` dismisses. It works for anonymous visitors too; the member list is fetched with the API key when the visitor first starts a comment or opens a thread, not on page load, and a failed fetch degrades to "no picker, no chips" rather than blocking the widget.
|
|
172
175
|
|
|
173
176
|
Mentioned teammates get a notification. **Signed-in** users read those from the inbox button on the toolbar, which carries an unread badge; anonymous visitors don't get the button. A mention that doesn't highlight means nobody was notified: the target isn't a project member, has left, or is the author themselves.
|
|
174
177
|
|
|
@@ -216,7 +219,7 @@ Walk these in order when the widget is misbehaving:
|
|
|
216
219
|
- **Don't wrap in a provider component.** `init` is the whole public API.
|
|
217
220
|
- **Don't call `init` inside a route component.** Mount at the app root once.
|
|
218
221
|
- **Don't hardcode the API key.** Use env vars so rotations don't require a code change.
|
|
219
|
-
- **Don't ship CDN URLs without a version pin.** `@pixelmatters/markup@1.34.
|
|
222
|
+
- **Don't ship CDN URLs without a version pin.** `@pixelmatters/markup@1.34.4`, not `@pixelmatters/markup`.
|
|
220
223
|
- **Don't add `https://*.convex.site` to `connect-src` and assume that's the whole CSP story.** The deployment domain (`<your-deployment>.convex.site`) is what the widget hits over HTTP, and it must be listed explicitly. Live thread updates go to `wss://<your-deployment>.convex.cloud`, an origin the widget derives from `apiUrl`, so `connect-src` needs both. `img-src` needs `blob:`, `data:`, and the host serving profile pictures; `style-src` needs `'unsafe-inline'` only for Safari before 16.4 and Firefox before 101, where the widget falls back to a `<style>` element inside its shadow root; everywhere else it adopts a constructed stylesheet, which CSP doesn't block. Add `https://esm.sh` to `script-src` only if you took the CDN path.
|
|
221
224
|
|
|
222
225
|
## Versioning & releases
|