@companix/utils-browser 0.0.10 → 0.0.11

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.
@@ -1 +1 @@
1
- "use strict";const e=(t,o)=>{if(o(t),t.children)for(const s of Array.from(t.children))"DIV"===s.tagName&&e(s,o)},t="undefined"!=typeof window&&!!window.document&&!!window.document.createElement,o=t&&!!window.addEventListener;function s(e){e||(e=t?navigator.userAgent:"");const o=m(e=e.toLowerCase()),s=o||e.includes("ipad"),i=!s&&-1!==e.search(/iphone|ipod/),n=i||s;let r=n&&e.match(/os ([\d_]+) like mac os x/i),a=0,c=0;o?(a=13,c=0):r&&(r=r[1].split("_"),a=+r[0],c=+r[1]),r=null;const h=a<13&&!(11===a&&c<3),d=n&&function(e){if(!t)return!1;const o=window.webkit;if(o&&o.messageHandlers)return!0;const s=/constructor/i.test(String(window.HTMLElement)),i=!!window.indexedDB;if(e.includes("safari")&&e.includes("version")&&!navigator.standalone);else if(!i&&s||!window.statusbar||!window.statusbar.visible);else if(!s||i)return!0;return!1}(e);let u=!1;t&&(u=n&&375===window.screen.width&&812===window.screen.height&&3===window.devicePixelRatio);return{isIPad:s,isIPhone:i,isIOS:n,isIPadOS:o,iosMajor:a,iosMinor:c,isWKWebView:d,isScrollBasedViewport:h,isIPhoneX:u,isIOSChrome:-1!==e.search(/crios/i)}}const i=s(),n=i.isIPad,r=i.isIPhone,a=i.isIOS,c=i.isIPadOS,h=i.iosMajor,d=i.iosMinor,u=i.isWKWebView,p=i.isScrollBasedViewport,l=i.isIPhoneX,x=i.isIOSChrome;function m(e){if(!t)return!1;const o=!/ipPad|iPhone|iPod/i.test(e),s=/Mac OS/i.test(e);return o&&s&&"ontouchend"in document}const w=(()=>{const e={hasMouse:!1,hasTouchEvents:!1,hasHover:!1,hasTouch:!1};if(!t)return e;if(a&&!c)e.hasMouse=!1,e.hasHover=!1,e.hasTouchEvents=!0,e.hasTouch=!0;else if(e.hasTouchEvents="ontouchstart"in document,e.hasTouch=e.hasTouchEvents||"maxTouchPoints"in navigator&&navigator.maxTouchPoints>0,e.hasTouch){const t=!/android|mobile|tablet/i.test(navigator.userAgent);e.hasMouse="function"==typeof window.matchMedia&&window.matchMedia("(pointer)").matches?matchMedia("(pointer: fine)").matches:t,e.hasHover=e.hasMouse&&("function"==typeof window.matchMedia&&window.matchMedia("(hover)").matches?matchMedia("(hover: hover)").matches:t)}else e.hasMouse=!0,e.hasHover=!0;return e})(),f=w.hasMouse,O=w.hasHover,v=w.hasTouchEvents,E=w.hasTouch;exports.Download=async(e,t)=>{const o=document.createElement("a"),s=URL.createObjectURL(e);o.href=s,o.setAttribute("download",t),o.click(),URL.revokeObjectURL(s)},exports.IOS_NO_KEYBOARD_ALLOWED_OFFSET=70,exports.IPHONE_KEYBOARD_REJECT_OFFSET=180,exports.IPHONE_SAFARI_BOTTOM_BAR=45,exports.IPHONE_X_SAFARI_BOTTOM_BAR=85,exports.attr=e=>e?"":void 0,exports.backgroundImage=e=>({backgroundImage:`url("${e}")`}),exports.box=(e=48,t)=>(t||(t=e),{width:t,minWidth:t,minHeight:e,height:e}),exports.callMultiple=(...e)=>(...t)=>e.filter(e=>"function"==typeof e).forEach(e=>e(...t)),exports.canUseDOM=t,exports.canUseEventListeners=o,exports.checkIPadOS=m,exports.clamp=(e,t,o)=>Math.max(t,Math.min(e,o)),exports.contains=(e,t)=>!(!e||!t)&&e.contains(t),exports.customCSS=e=>e,exports.detectIOS=s,exports.generatePreview=e=>{const t=URL.createObjectURL(e);return{url:t,cleanup:()=>{URL.revokeObjectURL(t)}}},exports.getActiveElementByAnotherElement=e=>e?e.ownerDocument.activeElement:null,exports.getContainers=e,exports.getFiles=e=>Array.from(e),exports.hasHover=O,exports.hasMouse=f,exports.hasTouch=E,exports.hasTouchEvents=v,exports.height=e=>({height:e,minHeight:e,maxHeight:e}),exports.iosMajor=h,exports.iosMinor=d,exports.isHTMLElement=e=>e.nodeType===Node.ELEMENT_NODE,exports.isIOS=a,exports.isIOSChrome=x,exports.isIPad=n,exports.isIPadOS=c,exports.isIPhone=r,exports.isIPhoneX=l,exports.isLandscapePhone=function(){return 90===Math.abs(window.orientation)&&!n},exports.isRetina=function(){return window.devicePixelRatio>=2},exports.isScrollBasedViewport=p,exports.isWKWebView=u,exports.onDOMLoaded=e=>{"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",e)},exports.pc=e=>`${e}%`,exports.px=e=>`${e}px`,exports.setCssVariable=(e,t)=>{document.documentElement.style.setProperty(e,t)},exports.transport=e=>{const t=new FormData;return t.append("file",e),t.append("type","file"),t},exports.width=e=>({width:e,minWidth:e,maxWidth:e});
1
+ "use strict";const e=(t,o)=>{if(o(t),t.children)for(const s of Array.from(t.children))"DIV"===s.tagName&&e(s,o)},t="undefined"!=typeof window&&!!window.document&&!!window.document.createElement,o=t&&!!window.addEventListener;function s(e){return e?e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1"):""}class n{regexp;map;constructor(e){this.map=e}build(){if(this.regexp)return;const e=`(?:${Object.keys(this.map).map(s).sort((e,t)=>t.length-e.length).join("|")})`;this.regexp=new RegExp(e,"g")}replace(e){return e?(this.build(),e.replace(this.regexp,e=>this.map[e])):""}}const i=new n({"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"}),r=new n({"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"'});function a(e){e||(e=t?navigator.userAgent:"");const o=g(e=e.toLowerCase()),s=o||e.includes("ipad"),n=!s&&-1!==e.search(/iphone|ipod/),i=n||s;let r=i&&e.match(/os ([\d_]+) like mac os x/i),a=0,c=0;o?(a=13,c=0):r&&(r=r[1].split("_"),a=+r[0],c=+r[1]),r=null;const h=a<13&&!(11===a&&c<3),d=i&&function(e){if(!t)return!1;const o=window.webkit;if(o&&o.messageHandlers)return!0;const s=/constructor/i.test(String(window.HTMLElement)),n=!!window.indexedDB;if(e.includes("safari")&&e.includes("version")&&!navigator.standalone);else if(!n&&s||!window.statusbar||!window.statusbar.visible);else if(!s||n)return!0;return!1}(e);let p=!1;t&&(p=i&&375===window.screen.width&&812===window.screen.height&&3===window.devicePixelRatio);return{isIPad:s,isIPhone:n,isIOS:i,isIPadOS:o,iosMajor:a,iosMinor:c,isWKWebView:d,isScrollBasedViewport:h,isIPhoneX:p,isIOSChrome:-1!==e.search(/crios/i)}}const c=a(),h=c.isIPad,d=c.isIPhone,p=c.isIOS,u=c.isIPadOS,l=c.iosMajor,x=c.iosMinor,m=c.isWKWebView,w=c.isScrollBasedViewport,E=c.isIPhoneX,f=c.isIOSChrome;function g(e){if(!t)return!1;const o=!/ipPad|iPhone|iPod/i.test(e),s=/Mac OS/i.test(e);return o&&s&&"ontouchend"in document}const O=(()=>{const e={hasMouse:!1,hasTouchEvents:!1,hasHover:!1,hasTouch:!1};if(!t)return e;if(p&&!u)e.hasMouse=!1,e.hasHover=!1,e.hasTouchEvents=!0,e.hasTouch=!0;else if(e.hasTouchEvents="ontouchstart"in document,e.hasTouch=e.hasTouchEvents||"maxTouchPoints"in navigator&&navigator.maxTouchPoints>0,e.hasTouch){const t=!/android|mobile|tablet/i.test(navigator.userAgent);e.hasMouse="function"==typeof window.matchMedia&&window.matchMedia("(pointer)").matches?matchMedia("(pointer: fine)").matches:t,e.hasHover=e.hasMouse&&("function"==typeof window.matchMedia&&window.matchMedia("(hover)").matches?matchMedia("(hover: hover)").matches:t)}else e.hasMouse=!0,e.hasHover=!0;return e})(),v=O.hasMouse,M=O.hasHover,T=O.hasTouchEvents,I=O.hasTouch;exports.Download=async(e,t)=>{const o=document.createElement("a"),s=URL.createObjectURL(e);o.href=s,o.setAttribute("download",t),o.click(),URL.revokeObjectURL(s)},exports.IOS_NO_KEYBOARD_ALLOWED_OFFSET=70,exports.IPHONE_KEYBOARD_REJECT_OFFSET=180,exports.IPHONE_SAFARI_BOTTOM_BAR=45,exports.IPHONE_X_SAFARI_BOTTOM_BAR=85,exports.attr=e=>e?"":void 0,exports.backgroundImage=e=>({backgroundImage:`url("${e}")`}),exports.box=(e=48,t)=>(t||(t=e),{width:t,minWidth:t,minHeight:e,height:e}),exports.callMultiple=(...e)=>(...t)=>e.filter(e=>"function"==typeof e).forEach(e=>e(...t)),exports.canUseDOM=t,exports.canUseEventListeners=o,exports.checkIPadOS=g,exports.clamp=(e,t,o)=>Math.max(t,Math.min(e,o)),exports.contains=(e,t)=>!(!e||!t)&&e.contains(t),exports.customCSS=e=>e,exports.detectIOS=a,exports.escape=function(e){return i.replace(e)},exports.generatePreview=e=>{const t=URL.createObjectURL(e);return{url:t,cleanup:()=>{URL.revokeObjectURL(t)}}},exports.getActiveElementByAnotherElement=e=>e?e.ownerDocument.activeElement:null,exports.getContainers=e,exports.getFiles=e=>Array.from(e),exports.hasHover=M,exports.hasMouse=v,exports.hasTouch=I,exports.hasTouchEvents=T,exports.height=e=>({height:e,minHeight:e,maxHeight:e}),exports.iosMajor=l,exports.iosMinor=x,exports.isElementNode=e=>e.nodeType===Node.ELEMENT_NODE,exports.isHTMLElement=e=>e.nodeType===Node.ELEMENT_NODE,exports.isIOS=p,exports.isIOSChrome=f,exports.isIPad=h,exports.isIPadOS=u,exports.isIPhone=d,exports.isIPhoneX=E,exports.isLandscapePhone=function(){return 90===Math.abs(window.orientation)&&!h},exports.isRetina=function(){return window.devicePixelRatio>=2},exports.isScrollBasedViewport=w,exports.isTextNode=e=>e.nodeType===Node.TEXT_NODE,exports.isWKWebView=m,exports.onDOMLoaded=e=>{"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",e)},exports.pc=e=>`${e}%`,exports.px=e=>`${e}px`,exports.setCssVariable=(e,t)=>{document.documentElement.style.setProperty(e,t)},exports.transport=e=>{const t=new FormData;return t.append("file",e),t.append("type","file"),t},exports.unescape=function(e){return r.replace(e)},exports.width=e=>({width:e,minWidth:e,maxWidth:e});
@@ -1 +1 @@
1
- const e=e=>`${e}%`,t=e=>`${e}px`,n=e=>({width:e,minWidth:e,maxWidth:e}),o=e=>({height:e,minHeight:e,maxHeight:e}),i=(e=48,t)=>(t||(t=e),{width:t,minWidth:t,minHeight:e,height:e}),s=e=>({backgroundImage:`url("${e}")`}),a=(e,t)=>{document.documentElement.style.setProperty(e,t)},r=e=>e,c=e=>e?"":void 0,d=(e,t)=>{if(t(e),e.children)for(const n of Array.from(e.children))"DIV"===n.tagName&&d(n,t)},h="undefined"!=typeof window&&!!window.document&&!!window.document.createElement,u=h&&!!window.addEventListener,w=e=>{"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",e)},m=(...e)=>(...t)=>e.filter(e=>"function"==typeof e).forEach(e=>e(...t)),l=e=>e?e.ownerDocument.activeElement:null,f=(e,t)=>!(!e||!t)&&e.contains(t),v=e=>e.nodeType===Node.ELEMENT_NODE,p=(e,t,n)=>Math.max(t,Math.min(e,n)),M=45,g=85,E=180,P=70;function b(e){e||(e=h?navigator.userAgent:"");const t=k(e=e.toLowerCase()),n=t||e.includes("ipad"),o=!n&&-1!==e.search(/iphone|ipod/),i=o||n;let s=i&&e.match(/os ([\d_]+) like mac os x/i),a=0,r=0;t?(a=13,r=0):s&&(s=s[1].split("_"),a=+s[0],r=+s[1]),s=null;const c=a<13&&!(11===a&&r<3),d=i&&function(e){if(!h)return!1;const t=window.webkit;if(t&&t.messageHandlers)return!0;const n=/constructor/i.test(String(window.HTMLElement)),o=!!window.indexedDB;if(e.includes("safari")&&e.includes("version")&&!navigator.standalone);else if(!o&&n||!window.statusbar||!window.statusbar.visible);else if(!n||o)return!0;return!1}(e);let u=!1;h&&(u=i&&375===window.screen.width&&812===window.screen.height&&3===window.devicePixelRatio);return{isIPad:n,isIPhone:o,isIOS:i,isIPadOS:t,iosMajor:a,iosMinor:r,isWKWebView:d,isScrollBasedViewport:c,isIPhoneX:u,isIOSChrome:-1!==e.search(/crios/i)}}const T=b(),I=T.isIPad,L=T.isIPhone,O=T.isIOS,y=T.isIPadOS,x=T.iosMajor,S=T.iosMinor,H=T.isWKWebView,R=T.isScrollBasedViewport,U=T.isIPhoneX,W=T.isIOSChrome;function j(){return 90===Math.abs(window.orientation)&&!I}function k(e){if(!h)return!1;const t=!/ipPad|iPhone|iPod/i.test(e),n=/Mac OS/i.test(e);return t&&n&&"ontouchend"in document}const D=(()=>{const e={hasMouse:!1,hasTouchEvents:!1,hasHover:!1,hasTouch:!1};if(!h)return e;if(O&&!y)e.hasMouse=!1,e.hasHover=!1,e.hasTouchEvents=!0,e.hasTouch=!0;else if(e.hasTouchEvents="ontouchstart"in document,e.hasTouch=e.hasTouchEvents||"maxTouchPoints"in navigator&&navigator.maxTouchPoints>0,e.hasTouch){const t=!/android|mobile|tablet/i.test(navigator.userAgent);e.hasMouse="function"==typeof window.matchMedia&&window.matchMedia("(pointer)").matches?matchMedia("(pointer: fine)").matches:t,e.hasHover=e.hasMouse&&("function"==typeof window.matchMedia&&window.matchMedia("(hover)").matches?matchMedia("(hover: hover)").matches:t)}else e.hasMouse=!0,e.hasHover=!0;return e})(),A=D.hasMouse,V=D.hasHover,C=D.hasTouchEvents,N=D.hasTouch;function B(){return window.devicePixelRatio>=2}const $=async(e,t)=>{const n=document.createElement("a"),o=URL.createObjectURL(e);n.href=o,n.setAttribute("download",t),n.click(),URL.revokeObjectURL(o)},_=e=>{const t=new FormData;return t.append("file",e),t.append("type","file"),t},K=e=>{const t=URL.createObjectURL(e);return{url:t,cleanup:()=>{URL.revokeObjectURL(t)}}},X=e=>Array.from(e);export{$ as Download,P as IOS_NO_KEYBOARD_ALLOWED_OFFSET,E as IPHONE_KEYBOARD_REJECT_OFFSET,M as IPHONE_SAFARI_BOTTOM_BAR,g as IPHONE_X_SAFARI_BOTTOM_BAR,c as attr,s as backgroundImage,i as box,m as callMultiple,h as canUseDOM,u as canUseEventListeners,k as checkIPadOS,p as clamp,f as contains,r as customCSS,b as detectIOS,K as generatePreview,l as getActiveElementByAnotherElement,d as getContainers,X as getFiles,V as hasHover,A as hasMouse,N as hasTouch,C as hasTouchEvents,o as height,x as iosMajor,S as iosMinor,v as isHTMLElement,O as isIOS,W as isIOSChrome,I as isIPad,y as isIPadOS,L as isIPhone,U as isIPhoneX,j as isLandscapePhone,B as isRetina,R as isScrollBasedViewport,H as isWKWebView,w as onDOMLoaded,e as pc,t as px,a as setCssVariable,_ as transport,n as width};
1
+ const e=e=>`${e}%`,t=e=>`${e}px`,n=e=>({width:e,minWidth:e,maxWidth:e}),o=e=>({height:e,minHeight:e,maxHeight:e}),i=(e=48,t)=>(t||(t=e),{width:t,minWidth:t,minHeight:e,height:e}),s=e=>({backgroundImage:`url("${e}")`}),a=(e,t)=>{document.documentElement.style.setProperty(e,t)},r=e=>e,c=e=>e?"":void 0,h=(e,t)=>{if(t(e),e.children)for(const n of Array.from(e.children))"DIV"===n.tagName&&h(n,t)},d="undefined"!=typeof window&&!!window.document&&!!window.document.createElement,u=d&&!!window.addEventListener,l=e=>{"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",e)},m=(...e)=>(...t)=>e.filter(e=>"function"==typeof e).forEach(e=>e(...t)),w=e=>e?e.ownerDocument.activeElement:null,p=(e,t)=>!(!e||!t)&&e.contains(t),f=e=>e.nodeType===Node.ELEMENT_NODE,g=e=>e.nodeType===Node.TEXT_NODE,v=e=>e.nodeType===Node.ELEMENT_NODE,E=(e,t,n)=>Math.max(t,Math.min(e,n));function M(e){return e?e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1"):""}class T{regexp;map;constructor(e){this.map=e}build(){if(this.regexp)return;const e=`(?:${Object.keys(this.map).map(M).sort((e,t)=>t.length-e.length).join("|")})`;this.regexp=new RegExp(e,"g")}replace(e){return e?(this.build(),e.replace(this.regexp,e=>this.map[e])):""}}const b=new T({"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"}),x=new T({"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"'});function O(e){return b.replace(e)}function P(e){return x.replace(e)}const y=45,L=85,I=180,R=70;function S(e){e||(e=d?navigator.userAgent:"");const t=B(e=e.toLowerCase()),n=t||e.includes("ipad"),o=!n&&-1!==e.search(/iphone|ipod/),i=o||n;let s=i&&e.match(/os ([\d_]+) like mac os x/i),a=0,r=0;t?(a=13,r=0):s&&(s=s[1].split("_"),a=+s[0],r=+s[1]),s=null;const c=a<13&&!(11===a&&r<3),h=i&&function(e){if(!d)return!1;const t=window.webkit;if(t&&t.messageHandlers)return!0;const n=/constructor/i.test(String(window.HTMLElement)),o=!!window.indexedDB;if(e.includes("safari")&&e.includes("version")&&!navigator.standalone);else if(!o&&n||!window.statusbar||!window.statusbar.visible);else if(!n||o)return!0;return!1}(e);let u=!1;d&&(u=i&&375===window.screen.width&&812===window.screen.height&&3===window.devicePixelRatio);return{isIPad:n,isIPhone:o,isIOS:i,isIPadOS:t,iosMajor:a,iosMinor:r,isWKWebView:h,isScrollBasedViewport:c,isIPhoneX:u,isIOSChrome:-1!==e.search(/crios/i)}}const H=S(),N=H.isIPad,j=H.isIPhone,D=H.isIOS,U=H.isIPadOS,k=H.iosMajor,W=H.iosMinor,$=H.isWKWebView,A=H.isScrollBasedViewport,V=H.isIPhoneX,_=H.isIOSChrome;function C(){return 90===Math.abs(window.orientation)&&!N}function B(e){if(!d)return!1;const t=!/ipPad|iPhone|iPod/i.test(e),n=/Mac OS/i.test(e);return t&&n&&"ontouchend"in document}const X=(()=>{const e={hasMouse:!1,hasTouchEvents:!1,hasHover:!1,hasTouch:!1};if(!d)return e;if(D&&!U)e.hasMouse=!1,e.hasHover=!1,e.hasTouchEvents=!0,e.hasTouch=!0;else if(e.hasTouchEvents="ontouchstart"in document,e.hasTouch=e.hasTouchEvents||"maxTouchPoints"in navigator&&navigator.maxTouchPoints>0,e.hasTouch){const t=!/android|mobile|tablet/i.test(navigator.userAgent);e.hasMouse="function"==typeof window.matchMedia&&window.matchMedia("(pointer)").matches?matchMedia("(pointer: fine)").matches:t,e.hasHover=e.hasMouse&&("function"==typeof window.matchMedia&&window.matchMedia("(hover)").matches?matchMedia("(hover: hover)").matches:t)}else e.hasMouse=!0,e.hasHover=!0;return e})(),q=X.hasMouse,K=X.hasHover,F=X.hasTouchEvents,z=X.hasTouch;function G(){return window.devicePixelRatio>=2}const J=async(e,t)=>{const n=document.createElement("a"),o=URL.createObjectURL(e);n.href=o,n.setAttribute("download",t),n.click(),URL.revokeObjectURL(o)},Q=e=>{const t=new FormData;return t.append("file",e),t.append("type","file"),t},Y=e=>{const t=URL.createObjectURL(e);return{url:t,cleanup:()=>{URL.revokeObjectURL(t)}}},Z=e=>Array.from(e);export{J as Download,R as IOS_NO_KEYBOARD_ALLOWED_OFFSET,I as IPHONE_KEYBOARD_REJECT_OFFSET,y as IPHONE_SAFARI_BOTTOM_BAR,L as IPHONE_X_SAFARI_BOTTOM_BAR,c as attr,s as backgroundImage,i as box,m as callMultiple,d as canUseDOM,u as canUseEventListeners,B as checkIPadOS,E as clamp,p as contains,r as customCSS,S as detectIOS,O as escape,Y as generatePreview,w as getActiveElementByAnotherElement,h as getContainers,Z as getFiles,K as hasHover,q as hasMouse,z as hasTouch,F as hasTouchEvents,o as height,k as iosMajor,W as iosMinor,v as isElementNode,f as isHTMLElement,D as isIOS,_ as isIOSChrome,N as isIPad,U as isIPadOS,j as isIPhone,V as isIPhoneX,C as isLandscapePhone,G as isRetina,A as isScrollBasedViewport,g as isTextNode,$ as isWKWebView,l as onDOMLoaded,e as pc,t as px,a as setCssVariable,Q as transport,P as unescape,n as width};
@@ -6,4 +6,6 @@ export declare const callMultiple: (...fns: any[]) => (...args: any[]) => void;
6
6
  export declare const getActiveElementByAnotherElement: (el: Element | null) => Element | null;
7
7
  export declare const contains: (parent?: Element | null, child?: Element | null) => boolean;
8
8
  export declare const isHTMLElement: (value: any) => value is HTMLElement;
9
+ export declare const isTextNode: (node: Node) => node is Text;
10
+ export declare const isElementNode: (node: Node) => node is Element;
9
11
  export declare const clamp: (value: number, min: number, max: number) => number;
@@ -0,0 +1,2 @@
1
+ export declare function escape(input: string): string;
2
+ export declare function unescape(input: string): string;
@@ -0,0 +1,2 @@
1
+ export * from './dom';
2
+ export * from './escape';
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export * from './css';
2
- export * from './dom';
2
+ export * from './html/index';
3
3
  export * from './device/index';
4
4
  export * from './download';
@@ -0,0 +1,7 @@
1
+ export declare class Replacer {
2
+ private regexp;
3
+ private readonly map;
4
+ constructor(map: Record<string, string>);
5
+ private build;
6
+ replace(string: string): string;
7
+ }
@@ -0,0 +1 @@
1
+ export declare function escapeRegExp(string: string): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@companix/utils-browser",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "main": "dist/bundle.cjs.js",
5
5
  "module": "dist/bundle.esm.js",
6
6
  "types": "./dist/index.d.ts",