@pixelmatters/markup 1.18.1 → 1.18.3
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 -8
- package/dist/widget.js +12 -8
- package/dist/widget.js.map +1 -1
- package/package.json +7 -2
- package/skills/install-markup-widget/SKILL.md +221 -0
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.18.
|
|
40
|
+
import { init } from 'https://esm.sh/@pixelmatters/markup@1.18.3'
|
|
41
41
|
// or
|
|
42
|
-
// import { init } from 'https://esm.run/@pixelmatters/markup@1.18.
|
|
42
|
+
// import { init } from 'https://esm.run/@pixelmatters/markup@1.18.3'
|
|
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.18.
|
|
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.18.3`).
|
|
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.18.
|
|
60
|
+
src="https://esm.sh/@pixelmatters/markup@1.18.3"
|
|
61
61
|
data-markup-widget="true"
|
|
62
62
|
data-api-url="https://your-deployment.convex.site"
|
|
63
63
|
data-api-key="markup_..."
|
|
@@ -307,12 +307,24 @@ Signed-in authors render their profile picture — on their comments and on the
|
|
|
307
307
|
|
|
308
308
|
## AI prompt
|
|
309
309
|
|
|
310
|
-
|
|
310
|
+
This package ships its own Agent Skill — persistent install + troubleshooting guidance for your agent, instead of a prompt you paste once and lose. Install it rather than the prompt below where you can.
|
|
311
|
+
|
|
312
|
+
If `@pixelmatters/markup` is already a dependency, the skill is already on disk under `node_modules`, versioned with the release you installed. [TanStack Intent](https://tanstack.com/intent/latest) wires it into whatever agent config you use (`AGENTS.md`, `CLAUDE.md`, `.cursorrules`, …):
|
|
311
313
|
|
|
312
314
|
```bash
|
|
313
|
-
npx
|
|
315
|
+
npx @tanstack/intent@latest install
|
|
314
316
|
```
|
|
315
317
|
|
|
318
|
+
Re-run it when you add another Intent-enabled package. A `pnpm update` of this one is enough on its own — the skill travels with the tarball, so it refreshes in place.
|
|
319
|
+
|
|
320
|
+
If you'd rather pull it straight from the repo, or you're deciding whether to adopt the widget at all and haven't installed it yet, the [`skills`](https://www.npmjs.com/package/skills) CLI takes it by path:
|
|
321
|
+
|
|
322
|
+
```bash
|
|
323
|
+
npx skills add Pixelmatters/markup/packages/widget/skills/install-markup-widget
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
The path matters — it's where the skill lives in the repo, and without it the CLI picks up this repo's internal contributor skills instead.
|
|
327
|
+
|
|
316
328
|
Otherwise, paste the block below into Claude, ChatGPT, Cursor, or any other LLM and it'll wire the widget into your codebase end-to-end.
|
|
317
329
|
|
|
318
330
|
````markdown
|
|
@@ -358,7 +370,7 @@ For a `<script>` tag drop-in (no bundler), use the inline ESM form and **pin the
|
|
|
358
370
|
|
|
359
371
|
```html
|
|
360
372
|
<script type="module">
|
|
361
|
-
import { init } from 'https://esm.sh/@pixelmatters/markup@1.18.
|
|
373
|
+
import { init } from 'https://esm.sh/@pixelmatters/markup@1.18.3'
|
|
362
374
|
|
|
363
375
|
init({
|
|
364
376
|
apiUrl: '...',
|
|
@@ -374,7 +386,7 @@ If inline JS is disallowed (some CMS / page-builder editors), use the auto-init
|
|
|
374
386
|
```html
|
|
375
387
|
<script
|
|
376
388
|
type="module"
|
|
377
|
-
src="https://esm.sh/@pixelmatters/markup@1.18.
|
|
389
|
+
src="https://esm.sh/@pixelmatters/markup@1.18.3"
|
|
378
390
|
data-markup-widget="true"
|
|
379
391
|
data-api-url="..."
|
|
380
392
|
data-api-key="..."
|
package/dist/widget.js
CHANGED
|
@@ -3245,12 +3245,14 @@ async function ki(e, t) {
|
|
|
3245
3245
|
if (!(await fetch(`${n}/widget/auth/probe-set`, {
|
|
3246
3246
|
method: "POST",
|
|
3247
3247
|
credentials: "include",
|
|
3248
|
-
headers: r
|
|
3248
|
+
headers: r,
|
|
3249
|
+
signal: Ti(15e3)
|
|
3249
3250
|
})).ok) return !1;
|
|
3250
3251
|
let e = await fetch(`${n}/widget/auth/probe-check`, {
|
|
3251
3252
|
method: "POST",
|
|
3252
3253
|
credentials: "include",
|
|
3253
|
-
headers: r
|
|
3254
|
+
headers: r,
|
|
3255
|
+
signal: Ti(wi)
|
|
3254
3256
|
});
|
|
3255
3257
|
if (!e.ok) return !1;
|
|
3256
3258
|
let { supported: t } = await e.json(), i = t === !0;
|
|
@@ -3470,7 +3472,8 @@ async function Qi(e) {
|
|
|
3470
3472
|
"content-type": "application/json",
|
|
3471
3473
|
"x-markup-api-key": n
|
|
3472
3474
|
},
|
|
3473
|
-
body: "{}"
|
|
3475
|
+
body: "{}",
|
|
3476
|
+
signal: Ti(J)
|
|
3474
3477
|
});
|
|
3475
3478
|
if (!e.ok) throw Error(`popup-exchange responded with ${e.status}`);
|
|
3476
3479
|
let { code: r } = await e.json(), i = new URL("/widget/auth", t);
|
|
@@ -3545,7 +3548,8 @@ async function Qi(e) {
|
|
|
3545
3548
|
body: JSON.stringify({
|
|
3546
3549
|
accessToken: d.token,
|
|
3547
3550
|
refreshToken: d.refreshToken
|
|
3548
|
-
})
|
|
3551
|
+
}),
|
|
3552
|
+
signal: Ti(J)
|
|
3549
3553
|
});
|
|
3550
3554
|
if (!e.ok) {
|
|
3551
3555
|
let t = /* @__PURE__ */ Error(`Failed to install widget cookies (${e.status})`);
|
|
@@ -4188,7 +4192,7 @@ async function Lo(e) {
|
|
|
4188
4192
|
"content-type": "application/json",
|
|
4189
4193
|
"x-markup-api-key": e.apiKey
|
|
4190
4194
|
},
|
|
4191
|
-
signal: e.signal
|
|
4195
|
+
signal: Ti(J, e.signal)
|
|
4192
4196
|
};
|
|
4193
4197
|
if (e.mode === "cookies") t.credentials = "include", t.body = "{}";
|
|
4194
4198
|
else {
|
|
@@ -7495,7 +7499,7 @@ function Dc({ apiUrl: e, apiKey: t, position: n = "bottom-right", screenshots: r
|
|
|
7495
7499
|
onOpenPrivacy: () => C("privacy"),
|
|
7496
7500
|
onOpenShortcuts: () => C("shortcuts"),
|
|
7497
7501
|
onHideForSession: () => Ce({ type: "hide-with-toast" }),
|
|
7498
|
-
version: "1.18.
|
|
7502
|
+
version: "1.18.3",
|
|
7499
7503
|
dashboardUrl: i
|
|
7500
7504
|
})
|
|
7501
7505
|
}) : null,
|
|
@@ -7592,11 +7596,11 @@ function jc(e, t) {
|
|
|
7592
7596
|
a.className = "markup-shadow-root", r.appendChild(a), je({
|
|
7593
7597
|
apiUrl: t.apiUrl,
|
|
7594
7598
|
apiKey: t.apiKey,
|
|
7595
|
-
widgetVersion: "1.18.
|
|
7599
|
+
widgetVersion: "1.18.3"
|
|
7596
7600
|
}), be(t.analytics === !1 ? null : {
|
|
7597
7601
|
apiUrl: t.apiUrl,
|
|
7598
7602
|
apiKey: t.apiKey,
|
|
7599
|
-
widgetVersion: "1.18.
|
|
7603
|
+
widgetVersion: "1.18.3"
|
|
7600
7604
|
}), F("widget_loaded");
|
|
7601
7605
|
let { theme: o, analytics: s, ...c } = t;
|
|
7602
7606
|
return de(/* @__PURE__ */ Q(Ce, {
|