@pixelmatters/markup 1.23.0 → 1.24.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 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.23.0'
40
+ import { init } from 'https://esm.sh/@pixelmatters/markup@1.24.0'
41
41
  // or
42
- // import { init } from 'https://esm.run/@pixelmatters/markup@1.23.0'
42
+ // import { init } from 'https://esm.run/@pixelmatters/markup@1.24.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, so a future major release will break your page with no warning. Always pin (`@pixelmatters/markup@1.23.0`).
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.24.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.23.0"
60
+ src="https://esm.sh/@pixelmatters/markup@1.24.0"
61
61
  data-markup-widget="true"
62
62
  data-api-url="https://your-deployment.convex.site"
63
63
  data-api-key="markup_..."
@@ -273,6 +273,7 @@ The overflow menu's **Privacy & data** panel restates all of this for the person
273
273
  Capture degrades instead of failing outright:
274
274
 
275
275
  - **An image the browser won't hand over** comes through blank, and the rest of the page still captures. A third-party avatar served without CORS headers is the usual culprit. It used to abort the whole screenshot.
276
+ - **Icons from an SVG sprite** are fetched and inlined before the capture. The capture renders your page as an SVG document, which is not allowed to load anything external, so a `<use href="/sprite.svg#icon">` would otherwise draw nothing — on a design system that ships its icons that way, every icon in the screenshot went missing. A sprite the widget can't read (cross-origin without CORS headers, or outside your `connect-src`) leaves those icons blank and the rest captures as before.
276
277
  - **An oversized capture** is re-encoded until it fits the server's 2 MB cap: quality drops first (0.85 → 0.6), then the raster shrinks (full → ¾ → ½), because a smaller sharp screenshot beats a full-size illegible one.
277
278
  - **If nothing works**, the composer reads _Screenshot unavailable_ and the comment posts without one. Previously the row just disappeared, which looked identical to screenshots being switched off for the project.
278
279
 
@@ -372,7 +373,7 @@ For a `<script>` tag drop-in (no bundler), use the inline ESM form and **pin the
372
373
 
373
374
  ```html
374
375
  <script type="module">
375
- import { init } from 'https://esm.sh/@pixelmatters/markup@1.23.0'
376
+ import { init } from 'https://esm.sh/@pixelmatters/markup@1.24.0'
376
377
 
377
378
  init({
378
379
  apiUrl: '...',
@@ -388,7 +389,7 @@ If inline JS is disallowed (some CMS / page-builder editors), use the auto-init
388
389
  ```html
389
390
  <script
390
391
  type="module"
391
- src="https://esm.sh/@pixelmatters/markup@1.23.0"
392
+ src="https://esm.sh/@pixelmatters/markup@1.24.0"
392
393
  data-markup-widget="true"
393
394
  data-api-url="..."
394
395
  data-api-key="..."
@@ -420,11 +421,12 @@ If the host page ships a CSP, the widget needs:
420
421
  | ------------- | -------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
421
422
  | `connect-src` | `https://<deployment>.convex.site` | threads, comments, identity, screenshot upload, error reports |
422
423
  | `connect-src` | `wss://<deployment>.convex.cloud` | live thread updates |
424
+ | `connect-src` | your own origin, if you serve icons from an SVG sprite | fetched so `<use href="/sprite.svg#icon">` icons aren't blank in screenshots |
423
425
  | `img-src` | wherever your team's profile pictures are hosted, plus `blob:` and `data:` | avatars, the screenshot preview thumbnail, and the capture pipeline |
424
426
  | `script-src` | `https://esm.sh` | CDN path only; a bundled install needs nothing here |
425
427
  | `style-src` | `'unsafe-inline'` | the widget appends its stylesheet as a `<style>` element inside its own shadow root |
426
428
 
427
- Only `img-src` degrades gracefully: a blocked avatar falls back to initials, and a blocked image in a capture comes through blank. A missing `connect-src` entry stops the widget working at all, and a missing `style-src` one leaves it unstyled.
429
+ Only `img-src` and the sprite entry degrade gracefully: a blocked avatar falls back to initials, and a blocked image or sprite in a capture comes through blank. A missing `connect-src` entry stops the widget working at all, and a missing `style-src` one leaves it unstyled.
428
430
 
429
431
  ## Browser support
430
432