@pixelmatters/markup 1.25.1 → 1.26.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.25.1'
40
+ import { init } from 'https://esm.sh/@pixelmatters/markup@1.26.0'
41
41
  // or
42
- // import { init } from 'https://esm.run/@pixelmatters/markup@1.25.1'
42
+ // import { init } from 'https://esm.run/@pixelmatters/markup@1.26.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.25.1`).
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.26.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.25.1"
60
+ src="https://esm.sh/@pixelmatters/markup@1.26.0"
61
61
  data-markup-widget="true"
62
62
  data-api-url="https://your-deployment.convex.site"
63
63
  data-api-key="markup_..."
@@ -240,7 +240,7 @@ close.
240
240
 
241
241
  ## Screenshots & privacy
242
242
 
243
- By default, the widget captures the visible viewport as a JPEG before you submit a thread. Sensitive fields are blacked out **before** the image is produced. The live DOM is mutated only for the duration of the capture, then restored. No image content leaves the browser until the user explicitly attaches the screenshot and posts.
243
+ By default, the widget captures the visible viewport as a WebP image before you submit a thread (JPEG on browsers that can't encode WebP). Sensitive fields are blacked out **before** the image is produced. The live DOM is mutated only for the duration of the capture, then restored. No image content leaves the browser until the user explicitly attaches the screenshot and posts.
244
244
 
245
245
  **Auto-scrubbed (zero config):**
246
246
 
@@ -276,7 +276,7 @@ Capture degrades instead of failing outright:
276
276
 
277
277
  - **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.
278
278
  - **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.
279
- - **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.
279
+ - **Captures are sized for storage, not for zooming.** The raster is capped at 1.5x device pixel ratio, so a 2x or 3x display doesn't bank detail nobody looks at in a lightbox. The image is then encoded down a ladder — quality drops first (0.85 → 0.6), then the raster shrinks (full → ¾ → ½) — until it lands under roughly 400 KB. A page that can't get there at any rung keeps the sharpest version that still fits the server's 2 MB hard cap, because a smaller sharp screenshot beats a full-size illegible one but not by any margin.
280
280
  - **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.
281
281
 
282
282
  ## How it works
@@ -375,7 +375,7 @@ For a `<script>` tag drop-in (no bundler), use the inline ESM form and **pin the
375
375
 
376
376
  ```html
377
377
  <script type="module">
378
- import { init } from 'https://esm.sh/@pixelmatters/markup@1.25.1'
378
+ import { init } from 'https://esm.sh/@pixelmatters/markup@1.26.0'
379
379
 
380
380
  init({
381
381
  apiUrl: '...',
@@ -391,7 +391,7 @@ If inline JS is disallowed (some CMS / page-builder editors), use the auto-init
391
391
  ```html
392
392
  <script
393
393
  type="module"
394
- src="https://esm.sh/@pixelmatters/markup@1.25.1"
394
+ src="https://esm.sh/@pixelmatters/markup@1.26.0"
395
395
  data-markup-widget="true"
396
396
  data-api-url="..."
397
397
  data-api-key="..."