@websline/cms-view-utils 0.23.0 → 0.25.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@websline/cms-view-utils",
3
- "version": "0.23.0",
3
+ "version": "0.25.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./src/index.js"
@@ -8,10 +8,9 @@
8
8
  "files": [
9
9
  "src"
10
10
  ],
11
- "sideEffects": false,
12
11
  "peerDependencies": {
13
- "astro": "^5.9.0",
14
- "svelte": "^5.33.14"
12
+ "astro": "^5.9.2",
13
+ "svelte": "^5.34.1"
15
14
  },
16
15
  "scripts": {
17
16
  "bump:minor": "pnpm version minor --no-git-tag-version",
@@ -1,5 +1,6 @@
1
1
  ---
2
- const isPreviewMode = Astro.url.searchParams.get("editable") === "true";
2
+ const editToken = Astro.url.searchParams.get("edit_token") || null;
3
+ const isPreviewMode = editToken !== null && editToken !== "";
3
4
 
4
5
  const { class: classes, style } = Astro.props;
5
6
  ---
@@ -17,6 +17,7 @@
17
17
  }
18
18
 
19
19
  [data-edit-block] {
20
+ min-height: 40px;
20
21
  position: relative;
21
22
  user-select: none;
22
23
  }
@@ -183,7 +183,9 @@ class IframeDragHandler {
183
183
 
184
184
  commitDrop = (event) => {
185
185
  event.preventDefault();
186
- const dropPosition = event.target.getAttribute("data-drop-zone-index");
186
+ const dropPosition = parseInt(
187
+ event.target.getAttribute("data-drop-zone-index") || "0"
188
+ );
187
189
 
188
190
  this.sendParentMessage({
189
191
  owner: "iframe",