tecitheme 1.2.2 → 1.2.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/dist/utils.d.ts +1 -0
- package/dist/utils.js +8 -2
- package/package.json +1 -1
package/dist/utils.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ export function makeIdString(text: any): string;
|
|
|
46
46
|
* Converts a simplified image source string in to the proper TECi Image src. If imageSrc is an absolute url (starts with http) it is returned unchanged
|
|
47
47
|
* @param {*} imageSrc The image source string
|
|
48
48
|
* @param {*} site ('www' or 'support') TECi image folder to pull from
|
|
49
|
+
* @param {*} params A list of image transformation parameters to pass to the image CDN (https://developers.cloudflare.com/images/transform-images/transform-via-url/)
|
|
49
50
|
*/
|
|
50
51
|
export function getTeciImageURL(imageSrc: any, site: any, params: any): any;
|
|
51
52
|
/**
|
package/dist/utils.js
CHANGED
|
@@ -526,12 +526,18 @@ export function makeIdString(text) {
|
|
|
526
526
|
* Converts a simplified image source string in to the proper TECi Image src. If imageSrc is an absolute url (starts with http) it is returned unchanged
|
|
527
527
|
* @param {*} imageSrc The image source string
|
|
528
528
|
* @param {*} site ('www' or 'support') TECi image folder to pull from
|
|
529
|
+
* @param {*} params A list of image transformation parameters to pass to the image CDN (https://developers.cloudflare.com/images/transform-images/transform-via-url/)
|
|
529
530
|
*/
|
|
530
531
|
export function getTeciImageURL(imageSrc, site = "www", params) {
|
|
531
|
-
|
|
532
|
+
if (imageSrc.startsWith("http")) {
|
|
533
|
+
return imageSrc
|
|
534
|
+
} else if (imageSrc.includes('.gif')) {
|
|
535
|
+
return imageSrc.startsWith("http") ? imageSrc : `https://media.thunderheadeng.net/${site}/images/${imageSrc}`
|
|
536
|
+
} else {
|
|
537
|
+
return imageSrc.startsWith("http") ? imageSrc : `https://media.thunderheadeng.net/cdn-cgi/image/${params??''}/${site}/images/${imageSrc}`
|
|
538
|
+
}
|
|
532
539
|
}
|
|
533
540
|
|
|
534
|
-
|
|
535
541
|
/**
|
|
536
542
|
* Convenience function that sets the state of a Svelte Store to true when an element is visible on the screen. Useful for triggering animations.
|
|
537
543
|
*
|