efficient-shell 7.46.0 → 7.48.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.
Files changed (45) hide show
  1. package/README.md +33 -0
  2. package/dist/{Browser-VNDS2FSD.js → Browser-UT2IGWAE.js} +14 -14
  3. package/dist/Calculator-OOOCLV6P.js +29 -0
  4. package/dist/{CurrencyConverter-PH75TBDL.js → CurrencyConverter-JVLPDM3W.js} +8 -8
  5. package/dist/{Documents-KSO66MP3.js → Documents-GQAJOOSA.js} +5 -5
  6. package/dist/Files-VHEFGFCF.js +87 -0
  7. package/dist/{Notepad-OUMZHB2S.js → Notepad-BGZE5IHL.js} +10 -10
  8. package/dist/{PomodoroTimer-BUKDNFPJ.js → PomodoroTimer-HM5JMNCY.js} +21 -21
  9. package/dist/{Preview-SGYKP5VY.js → Preview-WLSGFEQ7.js} +24 -24
  10. package/dist/{Sidebar-A3UG662D.js → Sidebar-NPUUCGOX.js} +30 -30
  11. package/dist/{Spreadsheet-OVBIGF7S.js → Spreadsheet-LJ2QTQ5O.js} +13 -13
  12. package/dist/{Stock-FB5VIBVY.js → Stock-HIAMQQAS.js} +3 -3
  13. package/dist/{Weather-2MOP5LTK.js → Weather-6TWM5VKQ.js} +16 -16
  14. package/dist/{WorldClock-KMMKBE4B.js → WorldClock-T52IUVFJ.js} +6 -6
  15. package/dist/ai/index.js +11 -11
  16. package/dist/apps/index.js +1 -1
  17. package/dist/bin/ui-check.js +1 -1
  18. package/dist/brand.css +1 -1
  19. package/dist/{chunk-FBXOKW33.js → chunk-6ETDY7FF.js} +1 -1
  20. package/dist/chunk-DELNCIUK.js +2 -0
  21. package/dist/{chunk-RWNNFCSA.js → chunk-EU4BCXGA.js} +1 -1
  22. package/dist/{chunk-ZELMENOO.js → chunk-JBXRDB6H.js} +6 -6
  23. package/dist/{chunk-MMLU5ZHI.js → chunk-K73JEGD5.js} +3 -3
  24. package/dist/{chunk-XGOXX466.js → chunk-KEEMPTXF.js} +252 -252
  25. package/dist/{chunk-BMYURA2N.js → chunk-LCYFQYIH.js} +1 -1
  26. package/dist/{chunk-G32MW4IF.js → chunk-MWETOFH3.js} +1 -1
  27. package/dist/{chunk-RNPURBKT.js → chunk-NUFNQMXA.js} +2 -2
  28. package/dist/{chunk-AHN2BTZR.js → chunk-NZBX24NL.js} +1 -1
  29. package/dist/{chunk-3E27HV76.js → chunk-RDLWLATO.js} +2 -2
  30. package/dist/{chunk-JFZLYYAN.js → chunk-SLQ3OID3.js} +1 -1
  31. package/dist/chunk-TLXCOFPD.js +1 -0
  32. package/dist/{chunk-EZTEOTUD.js → chunk-VM6JV77G.js} +46 -46
  33. package/dist/{chunk-BFJRKFOH.js → chunk-Z2NDEA5B.js} +8 -8
  34. package/dist/image-copies/index.d.ts +37 -0
  35. package/dist/image-copies/index.js +1 -0
  36. package/dist/index.js +206 -206
  37. package/dist/map/index.js +7 -7
  38. package/dist/page-tabs/index.js +5 -5
  39. package/dist/telemetry/index.js +1 -1
  40. package/dist/ui/index.js +1 -1
  41. package/package.json +6 -1
  42. package/dist/Calculator-YGJ7I5VT.js +0 -29
  43. package/dist/Files-TGXFG2JF.js +0 -87
  44. package/dist/chunk-G5GERM76.js +0 -2
  45. package/dist/chunk-KRAJDKZC.js +0 -1
@@ -0,0 +1,37 @@
1
+ type ImageCopyFormat = 'webp' | 'jpg' | 'png';
2
+ /** The copy widths, smallest first: 320 … 2560. */
3
+ declare const IMAGE_WIDTHS: readonly number[];
4
+ /** The copies host from the contract, or null before the service exists. */
5
+ declare const IMAGE_COPIES_HOST: string | null;
6
+ /** The copy width a request for `width` px is served from: round up to a step, cap at the top. */
7
+ declare function imageWidthFor(width: number): number;
8
+ /**
9
+ * The copies-bucket key of `src` at `width` px (rounded up to a step), or null
10
+ * when the service does not copy that file. The same answer as the Lambda's
11
+ * `copy_for_url` for every case in contract-cases.json.
12
+ */
13
+ declare function imageCopyKey(src: string, width: number, format?: ImageCopyFormat): string | null;
14
+ interface ImageCopyOptions {
15
+ /** `webp` for pages (default); `jpg` or `png` for email, which cannot rely on WebP. */
16
+ format?: ImageCopyFormat;
17
+ /** The copies host. Defaults to the contract's; null hands every URL back. */
18
+ host?: string | null;
19
+ }
20
+ /**
21
+ * The URL of a copy of `src` at least `width` px wide — or `src` itself,
22
+ * unchanged, when the service does not copy that file (an SVG, a foreign host,
23
+ * a URL with a query string) or no copies host is configured.
24
+ */
25
+ declare function imageCopyUrl(src: string, width: number, options?: ImageCopyOptions): string;
26
+ interface ImageSrcSetOptions extends ImageCopyOptions {
27
+ /** Leave out steps above the one serving this width (the widest the image can ever be drawn, at 3x). */
28
+ maxWidth?: number;
29
+ }
30
+ /**
31
+ * A `srcset` of every copy step (`"…/w320.webp 320w, …"`), for a plain `<img>`
32
+ * with a `sizes` that says how wide it is drawn. Undefined when the file is
33
+ * not copied, so `<img srcSet={…}>` simply has none.
34
+ */
35
+ declare function imageSrcSet(src: string, options?: ImageSrcSetOptions): string | undefined;
36
+
37
+ export { IMAGE_COPIES_HOST, IMAGE_WIDTHS, type ImageCopyFormat, type ImageCopyOptions, type ImageSrcSetOptions, imageCopyKey, imageCopyUrl, imageSrcSet, imageWidthFor };
@@ -0,0 +1 @@
1
+ var e={widths:[320,640,960,1280,1600,1920,2560],page_format:"webp",email_formats:["jpg","png"],copy_key:"{source}/{key}/w{width}.{format}",copies_host:null,raster_extensions:["png","jpg","jpeg","webp","gif","tif","tiff","bmp"],sources:{dealer:{bucket:"inovit-dealer-portal-assets",hosts:["d201q0i87q901p.cloudfront.net"],key_pattern:"^marketing/"},media:{bucket:"regis-media-production",hosts:["media.regis.design","d21nnr9ivf9hcc.cloudfront.net"],key_pattern:"^[a-z0-9_]+/storefront/(?!uploads/thumbs/)"},site:{bucket:"inovit-ecommerce-media",hosts:["cdn.inovit.com","dhxlibd8r3td0.cloudfront.net"],key_pattern:"^images/"}}},t=Object.freeze([...e.widths]),n=e.copies_host,r=[e.page_format,...e.email_formats],o=new Set(e.raster_extensions),s=e.sources,i=Object.fromEntries(Object.entries(s).map(([e,t])=>[e,new RegExp(t.key_pattern)])),c=new Map(Object.entries(s).flatMap(([e,t])=>t.hosts.map(t=>[t,e])));function a(e){for(const n of t)if(n>=e)return n;return t[t.length-1]}function p(e){try{return decodeURIComponent(e)}catch{return e.replace(/%[0-9A-Fa-f]{2}/g,e=>{try{return decodeURIComponent(e)}catch{return e}})}}function u(e){const t=/^https:\/\/([^/?#]+)(\/[^?#]*)$/.exec(e);if(!t)return null;const n=c.get(t[1]);if(!n)return null;const r=t[2].slice(1).split("/").map(p).join("/");return function(e,t){const n=i[e];if(!n||!t||t.includes("\0")||t.startsWith("/"))return!1;if(t.split("/").some(e=>""===e||"."===e||".."===e))return!1;if(!n.test(t))return!1;const r=t.slice(t.lastIndexOf("/")+1),s=r.lastIndexOf(".");return-1!==s&&o.has(r.slice(s+1).toLowerCase())}(n,r)?[n,r]:null}function f(t,n,o="webp"){if(!r.includes(o))return null;const s=u(t);if(!s)return null;const[i,c]=s;return e.copy_key.replace("{source}",i).replace("{key}",c).replace("{width}",String(a(n))).replace("{format}",o)}function l(e,t,r={}){const o=void 0===r.host?n:r.host;if(!o)return e;const s=f(e,t,r.format??"webp");return s?`https://${o}/${s.split("/").map(encodeURIComponent).join("/")}`:e}function d(e,n={}){const r=void 0===n.maxWidth?1/0:a(n.maxWidth),o=t.filter(e=>e<=r),s=o.map(t=>l(e,t,n));if(0!==s.length&&s[0]!==e)return o.map((e,t)=>`${s[t]} ${e}w`).join(", ")}export{n as IMAGE_COPIES_HOST,t as IMAGE_WIDTHS,f as imageCopyKey,l as imageCopyUrl,d as imageSrcSet,a as imageWidthFor};