@nuasite/cms 0.34.0 → 0.35.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/dist/editor.js
CHANGED
|
@@ -381,7 +381,7 @@ function PS(t, e) {
|
|
|
381
381
|
function LS(t, e) {
|
|
382
382
|
return typeof e == "function" ? e(t) : e;
|
|
383
383
|
}
|
|
384
|
-
const o3 = "0.
|
|
384
|
+
const o3 = "0.35.0", a3 = o3, nt = {
|
|
385
385
|
/** Highlight overlay for hovered elements */
|
|
386
386
|
HIGHLIGHT: 2147483644,
|
|
387
387
|
/** Hover outline for elements/components */
|
package/package.json
CHANGED
|
@@ -1499,16 +1499,21 @@ export function inferCollectionFromAstroImageUrl(
|
|
|
1499
1499
|
}
|
|
1500
1500
|
|
|
1501
1501
|
/**
|
|
1502
|
-
* Extract the original image path from
|
|
1503
|
-
*
|
|
1504
|
-
*
|
|
1502
|
+
* Extract the original image path from a dev-mode optimized image URL.
|
|
1503
|
+
* Recognizes:
|
|
1504
|
+
* - Astro's `<Image>`: `/_image?href=%2Fpath.jpg&w=...` → `href` param
|
|
1505
|
+
* - astro-imagetools / vite-imagetools: `/@image/<hash>.<ext>?f=<abs-path>&...` → `f` param
|
|
1505
1506
|
*/
|
|
1506
1507
|
export function extractAstroImageOriginalUrl(src: string): string | undefined {
|
|
1507
1508
|
try {
|
|
1508
1509
|
const url = new URL(src, 'http://localhost')
|
|
1509
1510
|
if (url.pathname === '/_image' || url.pathname.startsWith('/_image/')) {
|
|
1510
1511
|
const href = url.searchParams.get('href')
|
|
1511
|
-
if (href
|
|
1512
|
+
if (href) return href
|
|
1513
|
+
}
|
|
1514
|
+
if (url.pathname.startsWith('/@image/')) {
|
|
1515
|
+
const f = url.searchParams.get('f')
|
|
1516
|
+
if (f) return f
|
|
1512
1517
|
}
|
|
1513
1518
|
} catch {
|
|
1514
1519
|
// Not a valid URL
|