@pixelmatters/markup 1.3.8 → 1.3.9
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 +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,9 +35,9 @@ CDN drop-in (no build step) — paste this just before `</body>`:
|
|
|
35
35
|
```html
|
|
36
36
|
<script type="module">
|
|
37
37
|
// Pin the exact version — esm.sh resolves it from npm
|
|
38
|
-
import { init } from 'https://esm.sh/@pixelmatters/markup@1.3.
|
|
38
|
+
import { init } from 'https://esm.sh/@pixelmatters/markup@1.3.9'
|
|
39
39
|
// or
|
|
40
|
-
// import { init } from 'https://esm.run/@pixelmatters/markup@1.3.
|
|
40
|
+
// import { init } from 'https://esm.run/@pixelmatters/markup@1.3.9'
|
|
41
41
|
|
|
42
42
|
init({
|
|
43
43
|
apiUrl: 'https://your-deployment.convex.site',
|
|
@@ -48,14 +48,14 @@ CDN drop-in (no build step) — paste this just before `</body>`:
|
|
|
48
48
|
</script>
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
> **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.3.
|
|
51
|
+
> **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.3.9`).
|
|
52
52
|
|
|
53
53
|
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:
|
|
54
54
|
|
|
55
55
|
```html
|
|
56
56
|
<script
|
|
57
57
|
type="module"
|
|
58
|
-
src="https://esm.sh/@pixelmatters/markup@1.3.
|
|
58
|
+
src="https://esm.sh/@pixelmatters/markup@1.3.9"
|
|
59
59
|
data-markup-widget="true"
|
|
60
60
|
data-api-url="https://your-deployment.convex.site"
|
|
61
61
|
data-api-key="markup_..."
|
|
@@ -231,7 +231,7 @@ For a `<script>` tag drop-in (no bundler), use the inline ESM form and **pin the
|
|
|
231
231
|
|
|
232
232
|
```html
|
|
233
233
|
<script type="module">
|
|
234
|
-
import { init } from 'https://esm.sh/@pixelmatters/markup@1.3.
|
|
234
|
+
import { init } from 'https://esm.sh/@pixelmatters/markup@1.3.9'
|
|
235
235
|
|
|
236
236
|
init({
|
|
237
237
|
apiUrl: '...',
|
|
@@ -247,7 +247,7 @@ If inline JS is disallowed (some CMS / page-builder editors), use the auto-init
|
|
|
247
247
|
```html
|
|
248
248
|
<script
|
|
249
249
|
type="module"
|
|
250
|
-
src="https://esm.sh/@pixelmatters/markup@1.3.
|
|
250
|
+
src="https://esm.sh/@pixelmatters/markup@1.3.9"
|
|
251
251
|
data-markup-widget="true"
|
|
252
252
|
data-api-url="..."
|
|
253
253
|
data-api-key="..."
|
package/dist/widget.js
CHANGED
|
@@ -3482,7 +3482,7 @@ function sa(e) {
|
|
|
3482
3482
|
return {
|
|
3483
3483
|
onPointerDown: V((e) => {
|
|
3484
3484
|
let n = t.current;
|
|
3485
|
-
if (n.stopPropagation && e.stopPropagation(), e.button !== 0 || n.shouldStart && !n.shouldStart(e)) return;
|
|
3485
|
+
if (n.preventDefault && e.preventDefault(), n.stopPropagation && e.stopPropagation(), e.button !== 0 || n.shouldStart && !n.shouldStart(e)) return;
|
|
3486
3486
|
let a = e.currentTarget;
|
|
3487
3487
|
if (!a) return;
|
|
3488
3488
|
let o = (n.targetRef?.current ?? a).getBoundingClientRect(), s = e.clientX, c = e.clientY, l = o.left, u = o.top, d = o.width, f = o.height, p = n.threshold ?? 4, m = n.margin ?? 8, h = e.pointerId, g = !1, _ = null;
|
|
@@ -3632,6 +3632,7 @@ function ga({ size: e = 16 }) {
|
|
|
3632
3632
|
//#region src/runtime/ui/fab.tsx
|
|
3633
3633
|
function _a({ active: e, onToggle: t, onHide: n, position: r = "bottom-right", onPositionChange: i }) {
|
|
3634
3634
|
let a = r === "bottom-left" ? "markup-fab-left" : "markup-fab-right", [o, s] = R(null), { onPointerDown: c, isDragging: l, consumeClickIfDragged: u } = sa({
|
|
3635
|
+
preventDefault: !0,
|
|
3635
3636
|
stopPropagation: !0,
|
|
3636
3637
|
onMove: s,
|
|
3637
3638
|
onEnd: (e, t) => {
|