@webority/ui-elements 0.191.3 → 0.192.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/{WuiCodeBlock-C4GqrGyO.js → WuiCodeBlock-BnRpTBm_.js} +1 -1
- package/dist/{WuiDataTable-DKfTPdsn.js → WuiDataTable-D_9TWU-r.js} +1 -1
- package/dist/{WuiDatePicker-gZUfaTkZ.js → WuiDatePicker-B77M2_E7.js} +1 -1
- package/dist/{WuiDateRange-CNDyrPUT.js → WuiDateRange-BQ1GH9Mu.js} +1 -1
- package/dist/{WuiGantt-iEbrAdTQ.js → WuiGantt-wx8VSXiZ.js} +1 -1
- package/dist/WuiImageCrop-Cl97BHN4.js +1 -0
- package/dist/{WuiLightbox-DqAm2n8s.js → WuiLightbox-DFaHN2Fb.js} +1 -1
- package/dist/{WuiPhone-9dBrkfZf.js → WuiPhone-qw_6W3Q2.js} +1 -1
- package/dist/{WuiSelect-bvcpSY50.js → WuiSelect-DqHu2OW_.js} +1 -1
- package/dist/{WuiTimePicker-BIuLkZqU.js → WuiTimePicker-Bl3GcIS_.js} +1 -1
- package/dist/{WuiTour-CFRs1xE-.js → WuiTour-BS7Jd1Tt.js} +1 -1
- package/dist/{WuiTree-MMiIcWOJ.js → WuiTree-Qno7SM6z.js} +1 -1
- package/dist/{WuiTreePicker-CCkoPctd.js → WuiTreePicker-DWCLntLz.js} +1 -1
- package/dist/{WuiWizardStep-Cnc0DYg1.js → WuiWizardStep-CSS4B8g4.js} +1 -1
- package/dist/a.g-BUrXZ0Qj.js +1 -0
- package/dist/b.g-c7AZ9uVu.js +1 -0
- package/dist/c.g-1tKnlc4e.js +1 -0
- package/dist/{chips-DZpPt2SC.js → chips-DCkeuEvb.js} +1 -1
- package/dist/d.g-Cl1m1hN-.js +1 -0
- package/dist/{drawerDiscard-BsVbaCgB.js → drawerDiscard-mFYviRfI.js} +1 -1
- package/dist/e.g-BvqbeKNX.js +1 -0
- package/dist/elements/code-block.js +1 -1
- package/dist/elements/data-table.js +1 -1
- package/dist/elements/date-range.js +1 -1
- package/dist/elements/datepicker.js +1 -1
- package/dist/elements/gantt.js +1 -1
- package/dist/elements/image-crop.js +1 -1
- package/dist/elements/lightbox.js +1 -1
- package/dist/elements/phone.js +1 -1
- package/dist/elements/select.js +1 -1
- package/dist/elements/status-icon.js +1 -1
- package/dist/elements/timepicker.js +1 -1
- package/dist/elements/tour.js +1 -1
- package/dist/elements/tree-picker.js +1 -1
- package/dist/elements/tree.js +1 -1
- package/dist/elements/wizard.js +1 -1
- package/dist/f.g-CNmxMCET.js +1 -0
- package/dist/fileViewer.g-DnuE1_o9.js +1 -0
- package/dist/{fileViewerImage-DnzDd-rQ.js → fileViewerImage-BxvHyZ4w.js} +1 -1
- package/dist/{fileViewerMedia-Dm99qAjY.js → fileViewerMedia-I9wn32xJ.js} +1 -1
- package/dist/{fileViewerPdf-BET_tiP6.js → fileViewerPdf-COm4n8i7.js} +1 -1
- package/dist/g.g-B-tbDuHa.js +1 -0
- package/dist/h.g-D63tQoPL.js +1 -0
- package/dist/helpers.js +1 -1
- package/dist/i.g-DRCcFvgj.js +1 -0
- package/dist/iconGlyphs.g-DRNDTVOs.js +1 -0
- package/dist/j.g-6OVN_siI.js +1 -0
- package/dist/k.g-BWqvhE7s.js +1 -0
- package/dist/l.g-BHoPnVck.js +1 -0
- package/dist/loader-sSdQNOg6.js +1 -0
- package/dist/m.g-BVQq45TF.js +1 -0
- package/dist/n.g-CFb-ps6H.js +1 -0
- package/dist/o.g-CGJASwcf.js +1 -0
- package/dist/{optionLabel-wbpl8OTJ.js → optionLabel-CuShfg_A.js} +1 -1
- package/dist/p.g-DRXC-OFe.js +1 -0
- package/dist/q.g-CIah8JGo.js +1 -0
- package/dist/r.g-BlQw7Aox.js +1 -0
- package/dist/s.g-DwIkkKgS.js +1 -0
- package/dist/{search-BtwgxJ0e.js → search-OPWGeniZ.js} +1 -1
- package/dist/server.js +1 -1
- package/dist/statusIcons-DISKRFbg.js +1 -0
- package/dist/{svgNodes-CyPS2oFH.js → svgNodes-CaPMDvv7.js} +1 -1
- package/dist/t.g-045-l40U.js +1 -0
- package/dist/u.g-CK8fmXKY.js +1 -0
- package/dist/ui-elements/calendar-views.global.js +1 -1
- package/dist/ui-elements/carousel.global.js +1 -1
- package/dist/ui-elements/code-block.global.js +1 -1
- package/dist/ui-elements/command-palette.global.js +1 -1
- package/dist/ui-elements/comment-thread.global.js +1 -1
- package/dist/ui-elements/consent-banner.global.js +1 -1
- package/dist/ui-elements/context-menu.global.js +1 -1
- package/dist/ui-elements/dashboard-grid.global.js +1 -1
- package/dist/ui-elements/data-table.global.js +1 -1
- package/dist/ui-elements/date-range.global.js +1 -1
- package/dist/ui-elements/date-time.global.js +1 -1
- package/dist/ui-elements/datepicker.global.js +1 -1
- package/dist/ui-elements/dock.global.js +1 -1
- package/dist/ui-elements/drawer.global.js +1 -1
- package/dist/ui-elements/dropdown.global.js +1 -1
- package/dist/ui-elements/entry-grid.global.js +1 -1
- package/dist/ui-elements/gantt.global.js +1 -1
- package/dist/ui-elements/glyphs-a.global.js +1 -0
- package/dist/ui-elements/glyphs-b.global.js +1 -0
- package/dist/ui-elements/glyphs-c.global.js +1 -0
- package/dist/ui-elements/glyphs-d.global.js +1 -0
- package/dist/ui-elements/glyphs-e.global.js +1 -0
- package/dist/ui-elements/glyphs-f.global.js +1 -0
- package/dist/ui-elements/glyphs-g.global.js +1 -0
- package/dist/ui-elements/glyphs-h.global.js +1 -0
- package/dist/ui-elements/glyphs-i.global.js +1 -0
- package/dist/ui-elements/glyphs-j.global.js +1 -0
- package/dist/ui-elements/glyphs-k.global.js +1 -0
- package/dist/ui-elements/glyphs-l.global.js +1 -0
- package/dist/ui-elements/glyphs-m.global.js +1 -0
- package/dist/ui-elements/glyphs-n.global.js +1 -0
- package/dist/ui-elements/glyphs-o.global.js +1 -0
- package/dist/ui-elements/glyphs-p.global.js +1 -0
- package/dist/ui-elements/glyphs-q.global.js +1 -0
- package/dist/ui-elements/glyphs-r.global.js +1 -0
- package/dist/ui-elements/glyphs-s.global.js +1 -0
- package/dist/ui-elements/glyphs-t.global.js +1 -0
- package/dist/ui-elements/glyphs-u.global.js +1 -0
- package/dist/ui-elements/glyphs-v.global.js +1 -0
- package/dist/ui-elements/glyphs-w.global.js +1 -0
- package/dist/ui-elements/glyphs-x.global.js +1 -0
- package/dist/ui-elements/glyphs-z.global.js +1 -0
- package/dist/ui-elements/glyphs.global.js +1 -1
- package/dist/ui-elements/hover-card.global.js +1 -1
- package/dist/ui-elements/image-crop.global.js +1 -1
- package/dist/ui-elements/inline-edit.global.js +1 -1
- package/dist/ui-elements/kanban.global.js +1 -1
- package/dist/ui-elements/lead-popup.global.js +1 -1
- package/dist/ui-elements/lightbox.global.js +1 -1
- package/dist/ui-elements/markdown.global.js +1 -1
- package/dist/ui-elements/mini-calendar.global.js +1 -1
- package/dist/ui-elements/navigation-menu.global.js +1 -1
- package/dist/ui-elements/notification-center.global.js +1 -1
- package/dist/ui-elements/offline-banner.global.js +1 -1
- package/dist/ui-elements/onboarding-checklist.global.js +1 -1
- package/dist/ui-elements/org-tree.global.js +1 -1
- package/dist/ui-elements/otp.global.js +1 -1
- package/dist/ui-elements/overflow.global.js +1 -1
- package/dist/ui-elements/phone.global.js +1 -1
- package/dist/ui-elements/popover.global.js +1 -1
- package/dist/ui-elements/rating.global.js +1 -1
- package/dist/ui-elements/record-pager.global.js +1 -1
- package/dist/ui-elements/relative-time.global.js +1 -1
- package/dist/ui-elements/saved-views.global.js +1 -1
- package/dist/ui-elements/select-chips.global.js +1 -1
- package/dist/ui-elements/select-recents.global.js +1 -1
- package/dist/ui-elements/select-search.global.js +1 -1
- package/dist/ui-elements/select-window.global.js +1 -1
- package/dist/ui-elements/server.global.js +1 -1
- package/dist/ui-elements/shell.global.js +1 -1
- package/dist/ui-elements/shortcuts.global.js +1 -1
- package/dist/ui-elements/show-more.global.js +1 -1
- package/dist/ui-elements/slider.global.js +1 -1
- package/dist/ui-elements/sortable.global.js +1 -1
- package/dist/ui-elements/status-icon.global.js +1 -1
- package/dist/ui-elements/table-export.global.js +1 -1
- package/dist/ui-elements/timepicker.global.js +1 -1
- package/dist/ui-elements/tour.global.js +1 -1
- package/dist/ui-elements/tree-picker.global.js +1 -1
- package/dist/ui-elements/tree.global.js +1 -1
- package/dist/ui-elements/truncate.global.js +1 -1
- package/dist/ui-elements/whats-new.global.js +1 -1
- package/dist/ui-elements/wizard.global.js +1 -1
- package/dist/ui-elements.global.js +1 -1
- package/dist/ui-elements.js +1 -1
- package/dist/ui-file-viewer.global.js +10 -10
- package/dist/ui-file-viewer.js +1 -1
- package/dist/v.g-BpLD1c9M.js +1 -0
- package/dist/w.g-CDqV9dT6.js +1 -0
- package/dist/x.g-T5k9qAoo.js +1 -0
- package/dist/z.g-B8smtOck.js +1 -0
- package/package.json +5 -5
- package/types/global/glyphChunks.g.d.ts +1 -0
- package/types/global/glyphs.d.ts +9 -12
- package/types/global/parts/glyphs-a.g.d.ts +1 -0
- package/types/global/parts/glyphs-b.g.d.ts +1 -0
- package/types/global/parts/glyphs-c.g.d.ts +1 -0
- package/types/global/parts/glyphs-d.g.d.ts +1 -0
- package/types/global/parts/glyphs-e.g.d.ts +1 -0
- package/types/global/parts/glyphs-f.g.d.ts +1 -0
- package/types/global/parts/glyphs-g.g.d.ts +1 -0
- package/types/global/parts/glyphs-h.g.d.ts +1 -0
- package/types/global/parts/glyphs-i.g.d.ts +1 -0
- package/types/global/parts/glyphs-j.g.d.ts +1 -0
- package/types/global/parts/glyphs-k.g.d.ts +1 -0
- package/types/global/parts/glyphs-l.g.d.ts +1 -0
- package/types/global/parts/glyphs-m.g.d.ts +1 -0
- package/types/global/parts/glyphs-n.g.d.ts +1 -0
- package/types/global/parts/glyphs-o.g.d.ts +1 -0
- package/types/global/parts/glyphs-p.g.d.ts +1 -0
- package/types/global/parts/glyphs-q.g.d.ts +1 -0
- package/types/global/parts/glyphs-r.g.d.ts +1 -0
- package/types/global/parts/glyphs-s.g.d.ts +1 -0
- package/types/global/parts/glyphs-t.g.d.ts +1 -0
- package/types/global/parts/glyphs-u.g.d.ts +1 -0
- package/types/global/parts/glyphs-v.g.d.ts +1 -0
- package/types/global/parts/glyphs-w.g.d.ts +1 -0
- package/types/global/parts/glyphs-x.g.d.ts +1 -0
- package/types/global/parts/glyphs-z.g.d.ts +1 -0
- package/types/glyphTable.d.ts +23 -0
- package/types/iconCatalog/a.g.d.ts +2 -0
- package/types/iconCatalog/b.g.d.ts +2 -0
- package/types/iconCatalog/c.g.d.ts +2 -0
- package/types/iconCatalog/d.g.d.ts +2 -0
- package/types/iconCatalog/e.g.d.ts +2 -0
- package/types/iconCatalog/f.g.d.ts +2 -0
- package/types/iconCatalog/g.g.d.ts +2 -0
- package/types/iconCatalog/h.g.d.ts +2 -0
- package/types/iconCatalog/i.g.d.ts +2 -0
- package/types/iconCatalog/j.g.d.ts +2 -0
- package/types/iconCatalog/k.g.d.ts +2 -0
- package/types/iconCatalog/l.g.d.ts +2 -0
- package/types/iconCatalog/m.g.d.ts +2 -0
- package/types/iconCatalog/n.g.d.ts +2 -0
- package/types/iconCatalog/o.g.d.ts +2 -0
- package/types/iconCatalog/p.g.d.ts +2 -0
- package/types/iconCatalog/q.g.d.ts +2 -0
- package/types/iconCatalog/r.g.d.ts +2 -0
- package/types/iconCatalog/s.g.d.ts +2 -0
- package/types/iconCatalog/t.g.d.ts +2 -0
- package/types/iconCatalog/u.g.d.ts +2 -0
- package/types/iconCatalog/v.g.d.ts +2 -0
- package/types/iconCatalog/w.g.d.ts +2 -0
- package/types/iconCatalog/x.g.d.ts +2 -0
- package/types/iconCatalog/z.g.d.ts +2 -0
- package/types/iconCatalogNames.g.d.ts +1 -0
- package/types/iconGlyphs.g.d.ts +3 -6
- package/dist/WuiImageCrop-97d50aEw.js +0 -1
- package/dist/fileViewer.g-D_zLw_p-.js +0 -1
- package/dist/iconGlyphs.g-a9FtjPXh.js +0 -1
- package/dist/loader-X2uBXCDm.js +0 -1
- package/dist/statusIcons-Cd3GJcBR.js +0 -1
package/dist/ui-file-viewer.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as e,f as t,i as n,l as r,o as i,r as a,s as o,t as s}from"./fileViewer.g-D_zLw_p-.js";function c(e,t){if(typeof customElements>`u`||customElements.get(e))return;let n=[];if(typeof document<`u`)for(let r of document.querySelectorAll(e))for(let i of Object.keys(r)){let a=Object.getOwnPropertyDescriptor(t.prototype,i);if(a&&(a.set||a.get)&&(n.push([r,i,Reflect.get(r,i)]),!Reflect.deleteProperty(r,i)))throw Error(`defineElement: could not clear the early "${i}" property on <${e}>.`)}customElements.define(e,t);for(let[t,r,i]of n)if(!Reflect.set(t,r,i))throw Error(`defineElement: could not restore the "${r}" property on <${e}>.`)}var l=`AppButton`,u=/* @__PURE__ */ new Set([`primary`,`success`,`warning`,`danger`,`info`,`neutral`]),d={solid:e=>`btn-${e}`,soft:e=>`btn-soft-${e}`,outline:e=>`btn-outline-${e}`,ghost:e=>`btn-ghost-${e}`,link:e=>`btn-link-${e}`,glass:()=>`btn-glass`};function f(e){return t(d,e)}function p(e=`primary`,t=`solid`,n=`md`){if(!u.has(e))throw RangeError(`buttonClass: unknown tone "${e}"`);if(!f(t))throw RangeError(`buttonClass: unknown variant "${t}"`);let r=d[t](e);return n===`md`?`btn ${r}`:`btn ${r} btn-${n}`}var m=`@webority/ui-elements needs a browser DOM; import its types or helpers entry on the server`;if(typeof HTMLElement>`u`)throw Error(m);var h=HTMLElement,g=()=>a(`fileViewer`,s),_={pdf:`pdf`,jpg:`image`,jpeg:`image`,png:`image`,webp:`image`,gif:`image`,avif:`image`,bmp:`image`,svg:`image`,mp4:`video`,m4v:`video`,webm:`video`,ogv:`video`,mp3:`audio`,m4a:`audio`,aac:`audio`,wav:`audio`,ogg:`audio`,oga:`audio`,opus:`audio`,flac:`audio`},v={"application/pdf":`pdf`,"image/jpeg":`image`,"image/png":`image`,"image/webp":`image`,"image/gif":`image`,"image/avif":`image`,"image/bmp":`image`,"image/svg+xml":`image`,"video/mp4":`video`,"video/webm":`video`,"video/ogg":`video`,"audio/mpeg":`audio`,"audio/mp4":`audio`,"audio/aac":`audio`,"audio/wav":`audio`,"audio/x-wav":`audio`,"audio/ogg":`audio`,"audio/opus":`audio`,"audio/webm":`audio`,"audio/flac":`audio`},y=`wui-file-viewer:load`,b=`wui-file-viewer:error`,x=`wui-file-viewer:prefs-change`;function S(e,t){let n=(String(e??``).split(`;`)[0]??``).trim().toLowerCase();if(n)return v[n]??null;let r=String(t??``).split(/[?#]/)[0]??``;return _[r.includes(`.`)?(r.split(`.`).pop()??``).toLowerCase():``]??null}function C(e){let t=(String(e??``).split(/[?#]/)[0]??``).split(`/`).filter(Boolean).pop()??``;try{return decodeURIComponent(t)}catch{return t}}var w={pdf:()=>import(`./fileViewerPdf-BET_tiP6.js`).then(e=>e.PdfView),image:()=>import(`./fileViewerImage-DnzDd-rQ.js`).then(e=>e.ImageView),video:()=>import(`./fileViewerMedia-Dm99qAjY.js`).then(e=>e.MediaView),audio:()=>import(`./fileViewerMedia-Dm99qAjY.js`).then(e=>e.MediaView)},T=`--wui-file-viewer-fill-height`,E=420,D=0,O=class a extends h{static defaultAssetBase=``;static get observedAttributes(){return[`src`,`name`,`type`,`download`,`fill`,`print`,`worker-src`,`asset-base`,`captions`]}uid;_prefs;_hostPrefs;_onFullscreen;_onFill;_fillWatch;_view;_loadId;_actionsBox;constructor(){super(),D+=1,this.uid=`wui-file-viewer-${D}`,this._prefs={},this._onFullscreen=()=>this._syncFullscreen(),this._onFill=()=>{requestAnimationFrame(()=>this._fitFill())}}get src(){return this.getAttribute(`src`)??``}set src(e){this.setAttribute(`src`,String(e??``))}get name(){return this.getAttribute(`name`)??``}set name(e){this.setAttribute(`name`,String(e??``))}get type(){return this.getAttribute(`type`)??``}set type(e){this.setAttribute(`type`,String(e??``))}get viewKey(){return this.getAttribute(`view-key`)??``}set viewKey(e){this.setAttribute(`view-key`,String(e??``))}get download(){return this.hasAttribute(`download`)}set download(e){this.toggleAttribute(`download`,e===!0||e===``||e===`true`)}get fill(){return this.hasAttribute(`fill`)}set fill(e){this.toggleAttribute(`fill`,e===!0||e===``||e===`true`)}get print(){return this.getAttribute(`print`)!==`false`}set print(e){this.setAttribute(`print`,e===!1||e===`false`?`false`:`true`)}get workerSrc(){return this.getAttribute(`worker-src`)??``}set workerSrc(e){this.setAttribute(`worker-src`,String(e??``))}get captions(){return this.getAttribute(`captions`)??``}set captions(e){this.setAttribute(`captions`,String(e??``))}get assetBase(){return this.getAttribute(`asset-base`)??``}set assetBase(e){this.setAttribute(`asset-base`,String(e??``))}get prefs(){return{...this._prefs}}set prefs(e){this._hostPrefs=!0,this._prefs=e&&typeof e==`object`?{...e}:{}}get actionsContainer(){return this._actionsBox??null}seekTo(e){if(typeof e!=`number`||!Number.isFinite(e))throw TypeError(`[wui-file-viewer] seekTo takes a number of seconds; got ${String(e)}.`);return this._view?.seekTo?(this._view.seekTo(e),!0):!1}displayName(){return this.name||C(this.src)||g().documentLabel}connectedCallback(){if(t(this,`prefs`)){let e=this.prefs;Reflect.deleteProperty(this,`prefs`),this.prefs=e}document.addEventListener(`fullscreenchange`,this._onFullscreen),this._syncFill(),this._open()}disconnectedCallback(){document.removeEventListener(`fullscreenchange`,this._onFullscreen),this._unwatchFill(),this._close()}attributeChangedCallback(e,t,n){e===`fill`?this._syncFill():this.isConnected&&this._parts&&t!==n&&(e===`name`?this._parts.name.textContent=this.displayName():e===`download`?this._syncDownload():e===`print`?this._syncPrint():this._open())}_syncFill(){!this.fill||!this.isConnected?this._unwatchFill():(window.addEventListener(`resize`,this._onFill),typeof ResizeObserver<`u`&&(this._fillWatch??=new ResizeObserver(this._onFill),this._fillWatch.observe(document.body)),this._fitFill())}_unwatchFill(){window.removeEventListener(`resize`,this._onFill),this._fillWatch?.disconnect(),this._fillWatch=void 0,this.style.removeProperty(T)}_fitFill(){if(!this.fill||!this.isConnected)return;let e=this.getBoundingClientRect().top;this.style.setProperty(T,`${Math.max(E,window.innerHeight-e)}px`)}_close(){this._view?.destroy(),this._view=null,this._loadId=(this._loadId??0)+1}async _open(){this._close();let e=this._loadId;this._render(),this._prefs=this._readPrefs();let t=S(this.type,this.name||this.src);if(!this.src){this._settle(g().noFileText);return}if(!t){this._settle(g().unsupportedFileText,{offerDownload:!0});return}this._status(g().loadingText);let n;try{n=await w[t]()}catch(t){e===this._loadId&&this._fail(t);return}e===this._loadId&&(this._view=new n(this._shell(e),{src:this.src,kind:t,captions:this.captions,workerSrc:this.workerSrc,assetBase:A(this.assetBase||a.defaultAssetBase)}),this._view.load())}_shell(e){let t=()=>e===this._loadId,n=this._parts;return{host:this,start:n.start,center:n.center,end:n.viewEnd,search:n.search,body:n.body,prefs:{...this._prefs},name:()=>this.displayName(),print:()=>this.print,savePrefs:e=>{t()&&this._savePrefs(e)},loaded:e=>{t()&&(n.body.removeAttribute(`aria-busy`),this.dispatchEvent(new CustomEvent(y,{bubbles:!0,detail:e})))},fail:e=>{t()&&this._fail(e)}}}_render(){let e=r(`div`,{class:`wui-file-viewer-toolbar`}),t=r(`div`,{class:`wui-file-viewer-group wui-file-viewer-start`}),a=r(`span`,{class:`wui-file-viewer-name`});a.textContent=this.displayName(),a.title=this.displayName(),t.append(a);let s=r(`div`,{class:`wui-file-viewer-group wui-file-viewer-center`}),c=r(`div`,{class:`wui-file-viewer-group wui-file-viewer-end`}),l=r(`div`,{class:`wui-file-viewer-group wui-file-viewer-view-end`}),u=document.createElement(`a`);u.className=`u-action wui-file-viewer-download`,u.style.setProperty(`--wui-action-size`,`32px`),i(u,`download`),o(u,g().downloadLabel);let d=n(`maximize-4`,g().fullScreenLabel,{className:`wui-file-viewer-fullscreen`});d.addEventListener(`click`,()=>this.toggleFullscreen()),d.hidden=!document.fullscreenEnabled,this._actionsBox??=r(`div`,{class:`wui-file-viewer-actions`});let f=this._actionsBox;f.append(...this.querySelectorAll(`:scope > [slot="actions"]`)),c.append(l,u,d,f);let p=r(`search`,{class:`wui-file-viewer-search`});p.hidden=!0,e.append(t,s,c,p);let m=r(`div`,{class:`wui-file-viewer-body`,"aria-busy":`true`});this.replaceChildren(e,m),this._parts={toolbar:e,start:t,name:a,center:s,end:c,viewEnd:l,downloadLink:u,fullscreen:d,actionsBox:f,search:p,body:m},this._syncDownload(),this._syncFullscreen()}_syncDownload(){let e=this._parts.downloadLink;e.hidden=!this.download||!this.src,e.href=this.src,e.setAttribute(`download`,this.displayName())}_syncPrint(){for(let e of this._parts.toolbar.querySelectorAll(`.wui-file-viewer-print`))e instanceof HTMLElement&&(e.hidden=!this.print)}_status(e,{offerDownload:t=!1}={}){let n=document.createElement(`div`);n.className=`wui-file-viewer-status`;let r=document.createElement(`p`);if(r.textContent=e,n.append(r),t&&this.src){let e=document.createElement(`a`);e.className=p(`neutral`,`outline`,`sm`),e.dataset.wui=l,e.href=this.src,e.setAttribute(`download`,this.displayName()),e.textContent=g().downloadLabel,n.append(e)}this._parts.body.replaceChildren(n)}_settle(e,t){this._parts.body.removeAttribute(`aria-busy`),this._status(e,t)}_fail(e){this._view?.destroy(),this._view=null,this._settle(g().openFailedText,{offerDownload:!0});let t=typeof e==`object`&&e&&`message`in e?e.message:void 0;this.dispatchEvent(new CustomEvent(b,{bubbles:!0,detail:{message:t??String(e)}}))}toggleFullscreen(){document.fullscreenElement?document.exitFullscreen():this.requestFullscreen().catch(t=>{e(`[wui-file-viewer] full screen refused:`,t?.message)})}_syncFullscreen(){if(!this._parts)return;let e=document.fullscreenElement===this,t=this._parts.fullscreen;i(t,e?`x`:`maximize-4`),o(t,e?g().exitFullScreenLabel:g().fullScreenLabel),this._parts.actionsBox.hidden=e}_readPrefs(){if(this._hostPrefs||!this.viewKey)return{...this._prefs};try{let e=JSON.parse(window.localStorage.getItem(`wui-view:${this.viewKey}`)??`{}`);return k(e)?e:{}}catch{return{}}}_savePrefs(e){if(this._prefs={...this._prefs,...e},this.dispatchEvent(new CustomEvent(x,{bubbles:!0,detail:{...this._prefs}})),!this._hostPrefs&&this.viewKey)try{window.localStorage.setItem(`wui-view:${this.viewKey}`,JSON.stringify(this._prefs))}catch(e){if(!(e instanceof DOMException))throw e}}};function k(e){return typeof e==`object`&&!!e}function A(e){return e&&new URL(e,document.baseURI).href}var j=typeof document>`u`?null:document.currentScript;j instanceof HTMLScriptElement&&j.src&&(O.defaultAssetBase=new URL(`pdfjs/`,j.src).href),c(`wui-file-viewer`,O);var M=(e,t)=>import(`./fileViewerPdf-BET_tiP6.js`).then(n=>n.renderFirstPage(e,{assetBase:O.defaultAssetBase||void 0,...t}));export{O as WuiFileViewer,S as fileKind,C as fileNameFromUrl,M as renderPdfFirstPage};
|
|
1
|
+
import{d as e,f as t,i as n,l as r,o as i,r as a,s as o,t as s}from"./fileViewer.g-DnuE1_o9.js";function c(e,t){if(typeof customElements>`u`||customElements.get(e))return;let n=[];if(typeof document<`u`)for(let r of document.querySelectorAll(e))for(let i of Object.keys(r)){let a=Object.getOwnPropertyDescriptor(t.prototype,i);if(a&&(a.set||a.get)&&(n.push([r,i,Reflect.get(r,i)]),!Reflect.deleteProperty(r,i)))throw Error(`defineElement: could not clear the early "${i}" property on <${e}>.`)}customElements.define(e,t);for(let[t,r,i]of n)if(!Reflect.set(t,r,i))throw Error(`defineElement: could not restore the "${r}" property on <${e}>.`)}var l=`AppButton`,u=/* @__PURE__ */ new Set([`primary`,`success`,`warning`,`danger`,`info`,`neutral`]),d={solid:e=>`btn-${e}`,soft:e=>`btn-soft-${e}`,outline:e=>`btn-outline-${e}`,ghost:e=>`btn-ghost-${e}`,link:e=>`btn-link-${e}`,glass:()=>`btn-glass`};function f(e){return t(d,e)}function p(e=`primary`,t=`solid`,n=`md`){if(!u.has(e))throw RangeError(`buttonClass: unknown tone "${e}"`);if(!f(t))throw RangeError(`buttonClass: unknown variant "${t}"`);let r=d[t](e);return n===`md`?`btn ${r}`:`btn ${r} btn-${n}`}var m=`@webority/ui-elements needs a browser DOM; import its types or helpers entry on the server`;if(typeof HTMLElement>`u`)throw Error(m);var h=HTMLElement,g=()=>a(`fileViewer`,s),_={pdf:`pdf`,jpg:`image`,jpeg:`image`,png:`image`,webp:`image`,gif:`image`,avif:`image`,bmp:`image`,svg:`image`,mp4:`video`,m4v:`video`,webm:`video`,ogv:`video`,mp3:`audio`,m4a:`audio`,aac:`audio`,wav:`audio`,ogg:`audio`,oga:`audio`,opus:`audio`,flac:`audio`},v={"application/pdf":`pdf`,"image/jpeg":`image`,"image/png":`image`,"image/webp":`image`,"image/gif":`image`,"image/avif":`image`,"image/bmp":`image`,"image/svg+xml":`image`,"video/mp4":`video`,"video/webm":`video`,"video/ogg":`video`,"audio/mpeg":`audio`,"audio/mp4":`audio`,"audio/aac":`audio`,"audio/wav":`audio`,"audio/x-wav":`audio`,"audio/ogg":`audio`,"audio/opus":`audio`,"audio/webm":`audio`,"audio/flac":`audio`},y=`wui-file-viewer:load`,b=`wui-file-viewer:error`,x=`wui-file-viewer:prefs-change`;function S(e,t){let n=(String(e??``).split(`;`)[0]??``).trim().toLowerCase();if(n)return v[n]??null;let r=String(t??``).split(/[?#]/)[0]??``;return _[r.includes(`.`)?(r.split(`.`).pop()??``).toLowerCase():``]??null}function C(e){let t=(String(e??``).split(/[?#]/)[0]??``).split(`/`).filter(Boolean).pop()??``;try{return decodeURIComponent(t)}catch{return t}}var w={pdf:()=>import(`./fileViewerPdf-COm4n8i7.js`).then(e=>e.PdfView),image:()=>import(`./fileViewerImage-BxvHyZ4w.js`).then(e=>e.ImageView),video:()=>import(`./fileViewerMedia-I9wn32xJ.js`).then(e=>e.MediaView),audio:()=>import(`./fileViewerMedia-I9wn32xJ.js`).then(e=>e.MediaView)},T=`--wui-file-viewer-fill-height`,E=420,D=0,O=class a extends h{static defaultAssetBase=``;static get observedAttributes(){return[`src`,`name`,`type`,`download`,`fill`,`print`,`worker-src`,`asset-base`,`captions`]}uid;_prefs;_hostPrefs;_onFullscreen;_onFill;_fillWatch;_view;_loadId;_actionsBox;constructor(){super(),D+=1,this.uid=`wui-file-viewer-${D}`,this._prefs={},this._onFullscreen=()=>this._syncFullscreen(),this._onFill=()=>{requestAnimationFrame(()=>this._fitFill())}}get src(){return this.getAttribute(`src`)??``}set src(e){this.setAttribute(`src`,String(e??``))}get name(){return this.getAttribute(`name`)??``}set name(e){this.setAttribute(`name`,String(e??``))}get type(){return this.getAttribute(`type`)??``}set type(e){this.setAttribute(`type`,String(e??``))}get viewKey(){return this.getAttribute(`view-key`)??``}set viewKey(e){this.setAttribute(`view-key`,String(e??``))}get download(){return this.hasAttribute(`download`)}set download(e){this.toggleAttribute(`download`,e===!0||e===``||e===`true`)}get fill(){return this.hasAttribute(`fill`)}set fill(e){this.toggleAttribute(`fill`,e===!0||e===``||e===`true`)}get print(){return this.getAttribute(`print`)!==`false`}set print(e){this.setAttribute(`print`,e===!1||e===`false`?`false`:`true`)}get workerSrc(){return this.getAttribute(`worker-src`)??``}set workerSrc(e){this.setAttribute(`worker-src`,String(e??``))}get captions(){return this.getAttribute(`captions`)??``}set captions(e){this.setAttribute(`captions`,String(e??``))}get assetBase(){return this.getAttribute(`asset-base`)??``}set assetBase(e){this.setAttribute(`asset-base`,String(e??``))}get prefs(){return{...this._prefs}}set prefs(e){this._hostPrefs=!0,this._prefs=e&&typeof e==`object`?{...e}:{}}get actionsContainer(){return this._actionsBox??null}seekTo(e){if(typeof e!=`number`||!Number.isFinite(e))throw TypeError(`[wui-file-viewer] seekTo takes a number of seconds; got ${String(e)}.`);return this._view?.seekTo?(this._view.seekTo(e),!0):!1}displayName(){return this.name||C(this.src)||g().documentLabel}connectedCallback(){if(t(this,`prefs`)){let e=this.prefs;Reflect.deleteProperty(this,`prefs`),this.prefs=e}document.addEventListener(`fullscreenchange`,this._onFullscreen),this._syncFill(),this._open()}disconnectedCallback(){document.removeEventListener(`fullscreenchange`,this._onFullscreen),this._unwatchFill(),this._close()}attributeChangedCallback(e,t,n){e===`fill`?this._syncFill():this.isConnected&&this._parts&&t!==n&&(e===`name`?this._parts.name.textContent=this.displayName():e===`download`?this._syncDownload():e===`print`?this._syncPrint():this._open())}_syncFill(){!this.fill||!this.isConnected?this._unwatchFill():(window.addEventListener(`resize`,this._onFill),typeof ResizeObserver<`u`&&(this._fillWatch??=new ResizeObserver(this._onFill),this._fillWatch.observe(document.body)),this._fitFill())}_unwatchFill(){window.removeEventListener(`resize`,this._onFill),this._fillWatch?.disconnect(),this._fillWatch=void 0,this.style.removeProperty(T)}_fitFill(){if(!this.fill||!this.isConnected)return;let e=this.getBoundingClientRect().top;this.style.setProperty(T,`${Math.max(E,window.innerHeight-e)}px`)}_close(){this._view?.destroy(),this._view=null,this._loadId=(this._loadId??0)+1}async _open(){this._close();let e=this._loadId;this._render(),this._prefs=this._readPrefs();let t=S(this.type,this.name||this.src);if(!this.src){this._settle(g().noFileText);return}if(!t){this._settle(g().unsupportedFileText,{offerDownload:!0});return}this._status(g().loadingText);let n;try{n=await w[t]()}catch(t){e===this._loadId&&this._fail(t);return}e===this._loadId&&(this._view=new n(this._shell(e),{src:this.src,kind:t,captions:this.captions,workerSrc:this.workerSrc,assetBase:A(this.assetBase||a.defaultAssetBase)}),this._view.load())}_shell(e){let t=()=>e===this._loadId,n=this._parts;return{host:this,start:n.start,center:n.center,end:n.viewEnd,search:n.search,body:n.body,prefs:{...this._prefs},name:()=>this.displayName(),print:()=>this.print,savePrefs:e=>{t()&&this._savePrefs(e)},loaded:e=>{t()&&(n.body.removeAttribute(`aria-busy`),this.dispatchEvent(new CustomEvent(y,{bubbles:!0,detail:e})))},fail:e=>{t()&&this._fail(e)}}}_render(){let e=r(`div`,{class:`wui-file-viewer-toolbar`}),t=r(`div`,{class:`wui-file-viewer-group wui-file-viewer-start`}),a=r(`span`,{class:`wui-file-viewer-name`});a.textContent=this.displayName(),a.title=this.displayName(),t.append(a);let s=r(`div`,{class:`wui-file-viewer-group wui-file-viewer-center`}),c=r(`div`,{class:`wui-file-viewer-group wui-file-viewer-end`}),l=r(`div`,{class:`wui-file-viewer-group wui-file-viewer-view-end`}),u=document.createElement(`a`);u.className=`u-action wui-file-viewer-download`,u.style.setProperty(`--wui-action-size`,`32px`),i(u,`download`),o(u,g().downloadLabel);let d=n(`maximize-4`,g().fullScreenLabel,{className:`wui-file-viewer-fullscreen`});d.addEventListener(`click`,()=>this.toggleFullscreen()),d.hidden=!document.fullscreenEnabled,this._actionsBox??=r(`div`,{class:`wui-file-viewer-actions`});let f=this._actionsBox;f.append(...this.querySelectorAll(`:scope > [slot="actions"]`)),c.append(l,u,d,f);let p=r(`search`,{class:`wui-file-viewer-search`});p.hidden=!0,e.append(t,s,c,p);let m=r(`div`,{class:`wui-file-viewer-body`,"aria-busy":`true`});this.replaceChildren(e,m),this._parts={toolbar:e,start:t,name:a,center:s,end:c,viewEnd:l,downloadLink:u,fullscreen:d,actionsBox:f,search:p,body:m},this._syncDownload(),this._syncFullscreen()}_syncDownload(){let e=this._parts.downloadLink;e.hidden=!this.download||!this.src,e.href=this.src,e.setAttribute(`download`,this.displayName())}_syncPrint(){for(let e of this._parts.toolbar.querySelectorAll(`.wui-file-viewer-print`))e instanceof HTMLElement&&(e.hidden=!this.print)}_status(e,{offerDownload:t=!1}={}){let n=document.createElement(`div`);n.className=`wui-file-viewer-status`;let r=document.createElement(`p`);if(r.textContent=e,n.append(r),t&&this.src){let e=document.createElement(`a`);e.className=p(`neutral`,`outline`,`sm`),e.dataset.wui=l,e.href=this.src,e.setAttribute(`download`,this.displayName()),e.textContent=g().downloadLabel,n.append(e)}this._parts.body.replaceChildren(n)}_settle(e,t){this._parts.body.removeAttribute(`aria-busy`),this._status(e,t)}_fail(e){this._view?.destroy(),this._view=null,this._settle(g().openFailedText,{offerDownload:!0});let t=typeof e==`object`&&e&&`message`in e?e.message:void 0;this.dispatchEvent(new CustomEvent(b,{bubbles:!0,detail:{message:t??String(e)}}))}toggleFullscreen(){document.fullscreenElement?document.exitFullscreen():this.requestFullscreen().catch(t=>{e(`[wui-file-viewer] full screen refused:`,t?.message)})}_syncFullscreen(){if(!this._parts)return;let e=document.fullscreenElement===this,t=this._parts.fullscreen;i(t,e?`x`:`maximize-4`),o(t,e?g().exitFullScreenLabel:g().fullScreenLabel),this._parts.actionsBox.hidden=e}_readPrefs(){if(this._hostPrefs||!this.viewKey)return{...this._prefs};try{let e=JSON.parse(window.localStorage.getItem(`wui-view:${this.viewKey}`)??`{}`);return k(e)?e:{}}catch{return{}}}_savePrefs(e){if(this._prefs={...this._prefs,...e},this.dispatchEvent(new CustomEvent(x,{bubbles:!0,detail:{...this._prefs}})),!this._hostPrefs&&this.viewKey)try{window.localStorage.setItem(`wui-view:${this.viewKey}`,JSON.stringify(this._prefs))}catch(e){if(!(e instanceof DOMException))throw e}}};function k(e){return typeof e==`object`&&!!e}function A(e){return e&&new URL(e,document.baseURI).href}var j=typeof document>`u`?null:document.currentScript;j instanceof HTMLScriptElement&&j.src&&(O.defaultAssetBase=new URL(`pdfjs/`,j.src).href),c(`wui-file-viewer`,O);var M=(e,t)=>import(`./fileViewerPdf-COm4n8i7.js`).then(n=>n.renderFirstPage(e,{assetBase:O.defaultAssetBase||void 0,...t}));export{O as WuiFileViewer,S as fileKind,C as fileNameFromUrl,M as renderPdfFirstPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={velas:[[`path`,{d:`M2 3h20M4 6.4h16c.9 0 1.4 1 .9 1.7l-8 12.4c-.4.7-1.4.7-1.9 0L3 8.1c-.4-.8.2-1.7 1-1.7Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],verify:[[`path`,{d:`m8.38 12 2.41 2.42 4.83-4.84`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M10.75 2.45c.69-.59 1.82-.59 2.52 0l1.58 1.36c.3.26.86.47 1.26.47h1.7c1.06 0 1.93.87 1.93 1.93v1.7c0 .39.21.96.47 1.26l1.36 1.58c.59.69.59 1.82 0 2.52l-1.36 1.58c-.26.3-.47.86-.47 1.26v1.7c0 1.06-.87 1.93-1.93 1.93h-1.7c-.39 0-.96.21-1.26.47l-1.58 1.36c-.69.59-1.82.59-2.52 0l-1.58-1.36c-.3-.26-.86-.47-1.26-.47H6.18c-1.06 0-1.93-.87-1.93-1.93V16.1c0-.39-.21-.95-.46-1.25l-1.35-1.59c-.58-.69-.58-1.81 0-2.5l1.35-1.59c.25-.3.46-.86.46-1.25V6.2c0-1.06.87-1.93 1.93-1.93h1.73c.39 0 .96-.21 1.26-.47l1.58-1.35Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],vibe:[[`path`,{d:`m9.5 8.5 2.5 3.4 2.5-3.4h-5Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`}],[`path`,{d:`m17 10-5 7-5-7`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],video:[[`path`,{d:`M12.53 20.42H6.21c-3.16 0-4.21-2.1-4.21-4.21V7.79c0-3.16 1.05-4.21 4.21-4.21h6.32c3.16 0 4.21 1.05 4.21 4.21v8.42c0 3.16-1.06 4.21-4.21 4.21Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`m19.52 17.1-2.78-1.95V8.84l2.78-1.95c1.36-.95 2.48-.37 2.48 1.3v7.62c0 1.67-1.12 2.25-2.48 1.29ZM11.5 11a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"video-add":[[`path`,{d:`M22 9v6c0 .23 0 .45-.02.67-.04-.06-.09-.12-.14-.17-.01-.01-.02-.03-.03-.04-.81-.9-2-1.46-3.31-1.46-1.26 0-2.41.52-3.23 1.36a4.5 4.5 0 0 0-.62 5.46c.22.37.5.71.82.99.02.01.03.02.04.03.05.05.1.09.16.14-.21.02-.44.02-.67.02H9c-5 0-7-2-7-7V9c0-5 2-7 7-7h6c5 0 7 2 7 7ZM2.52 7.11h18.96M8.52 2.11v4.86M15.48 2.11v4.41`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M23 18.5c0 .36-.04.71-.13 1.05-.11.45-.29.88-.52 1.27A4.487 4.487 0 0 1 18.5 23a4.35 4.35 0 0 1-2.82-1.02h-.01c-.06-.05-.11-.09-.16-.14a.138.138 0 0 0-.04-.03c-.32-.28-.6-.62-.82-.99a4.5 4.5 0 0 1 .62-5.46c.82-.84 1.97-1.36 3.23-1.36 1.31 0 2.5.56 3.31 1.46.01.01.02.03.03.04.05.05.1.11.14.17.64.77 1.02 1.76 1.02 2.83ZM20.18 18.48h-3.36M18.5 16.84v3.36`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"video-circle":[[`path`,{d:`M9.1 12v-1.48c0-1.91 1.35-2.68 3-1.73l1.28.74 1.28.74c1.65.95 1.65 2.51 0 3.46l-1.28.74-1.28.74c-1.65.95-3 .17-3-1.73V12Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"video-horizontal":[[`path`,{d:`M22 15V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7h6c5 0 7-2 7-7ZM2.52 17.11h18.96M2.52 7.11h18.96M6.97 17.11v4.35M12 17.11v4.86M16.97 17.11v4.41M6.97 2.11v4.35M12 2.11v4.86M12 7.03v11M16.97 2.11v4.41`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"video-octagon":[[`path`,{d:`M21.08 8.58v6.84c0 1.12-.6 2.16-1.57 2.73l-5.94 3.43c-.97.56-2.17.56-3.15 0l-5.94-3.43a3.15 3.15 0 0 1-1.57-2.73V8.58c0-1.12.6-2.16 1.57-2.73l5.94-3.43c.97-.56 2.17-.56 3.15 0l5.94 3.43c.97.57 1.57 1.6 1.57 2.73Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M9.75 12v-1.2c0-1.54 1.09-2.17 2.42-1.4l1.04.6 1.04.6c1.33.77 1.33 2.03 0 2.8l-1.04.6-1.04.6c-1.33.77-2.42.14-2.42-1.4V12Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"video-play":[[`path`,{d:`M22 15V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7h6c5 0 7-2 7-7ZM2.52 7.11h18.96M8.52 2.11v4.86M15.48 2.11v4.41`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M9.75 14.45v-1.2c0-1.54 1.09-2.17 2.42-1.4l1.04.6 1.04.6c1.33.77 1.33 2.03 0 2.8l-1.04.6-1.04.6c-1.33.77-2.42.14-2.42-1.4v-1.2 0Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"video-remove":[[`path`,{d:`M22 9v6c0 .23 0 .45-.02.67-.04-.06-.09-.12-.14-.17-.81-.93-2.01-1.5-3.34-1.5-1.26 0-2.41.52-3.23 1.36a4.5 4.5 0 0 0-.62 5.46c.23.38.52.73.86 1.02.05.05.1.09.16.14-.21.02-.44.02-.67.02H9c-5 0-7-2-7-7V9c0-5 2-7 7-7h6c5 0 7 2 7 7ZM2.52 7.11h18.96M8.52 2.11v4.86M15.48 2.11v4.41`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M23 18.5c0 .36-.04.71-.13 1.05-.11.45-.29.88-.52 1.27A4.487 4.487 0 0 1 18.5 23a4.35 4.35 0 0 1-2.82-1.02h-.01c-.06-.05-.11-.09-.16-.14-.34-.29-.63-.64-.86-1.02a4.5 4.5 0 0 1 .62-5.46c.82-.84 1.97-1.36 3.23-1.36 1.33 0 2.53.57 3.34 1.5.05.05.1.11.14.17.64.77 1.02 1.76 1.02 2.83ZM19.7 19.68l-2.38-2.38M19.68 17.32 17.3 19.7`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"video-slash":[[`path`,{d:`M16.63 7.58s.03-.95 0-1.26c-.17-2.04-1.5-2.74-4.11-2.74H6.21C3.05 3.58 2 4.63 2 7.79v8.42c0 1.26.38 2.53 1.37 3.34L4 20M16.74 10.95v5.26c0 3.16-1.05 4.21-4.21 4.21H7.26M22 6.74v9.07c0 1.67-1.12 2.25-2.48 1.29l-2.78-1.95M22.02 2.19l-20 20`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"video-square":[[`path`,{d:`M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M9.1 12v-1.48c0-1.91 1.35-2.68 3-1.73l1.28.74 1.28.74c1.65.95 1.65 2.51 0 3.46l-1.28.74-1.28.74c-1.65.95-3 .17-3-1.73V12Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"video-tick":[[`path`,{d:`M22 9v6c0 .22 0 .44-.02.65A4.46 4.46 0 0 0 18.5 14c-1.06 0-2.04.37-2.81.99A4.448 4.448 0 0 0 14 18.5a4.5 4.5 0 0 0 1.66 3.48c-.21.02-.43.02-.66.02H9c-5 0-7-2-7-7V9c0-5 2-7 7-7h6c5 0 7 2 7 7ZM2.52 7.11h18.96M8.52 2.11v4.86M15.48 2.11v4.41`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M23 18.5a4.5 4.5 0 0 1-1.54 3.38c-.79.7-1.82 1.12-2.96 1.12-1.07 0-2.06-.38-2.83-1.02h-.01A4.5 4.5 0 0 1 14 18.5c0-1.42.65-2.69 1.69-3.51A4.47 4.47 0 0 1 18.5 14c1.41 0 2.66.64 3.48 1.65.64.77 1.02 1.77 1.02 2.85Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`m16.75 18.5 1.11 1.11 2.4-2.22`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"video-time":[[`path`,{d:`M22 9v6c0 .22 0 .44-.02.65A4.46 4.46 0 0 0 18.5 14c-1.06 0-2.04.37-2.81.99A4.448 4.448 0 0 0 14 18.5c0 1.41.64 2.66 1.65 3.48-.21.02-.43.02-.65.02H9c-5 0-7-2-7-7V9c0-5 2-7 7-7h6c5 0 7 2 7 7ZM2.52 7.11h18.96M8.52 2.11v4.86M15.48 2.11v4.41`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M23 18.5c0 1.35-.6 2.55-1.53 3.38-.8.69-1.83 1.12-2.97 1.12-1.08 0-2.08-.38-2.85-1.02A4.46 4.46 0 0 1 14 18.5c0-1.42.65-2.69 1.69-3.51A4.47 4.47 0 0 1 18.5 14c1.41 0 2.66.64 3.48 1.65.64.77 1.02 1.77 1.02 2.85Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M18.78 17.09v1.69l-1.4.84`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"video-vertical":[[`path`,{d:`M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7ZM6.89 2.52v18.96M16.89 2.52v18.96M6.89 6.97H2.54M6.89 12H2.03M6.89 16.97H2.48M21.89 6.97h-4.35M21.89 12h-4.86M16.97 12h-11M21.89 16.97h-4.41`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"voice-circle":[[`path`,{d:`M6 9.86v4.29M9 8.43v7.14M12 7v10M15 8.43v7.14M18 9.86v4.29M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"voice-cricle":[[`path`,{d:`M6 9.86v4.29M9 8.43v7.14M12 7v10M15 8.43v7.14M18 9.86v4.29M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"voice-square":[[`path`,{d:`M6 9.86v4.29M9 8.43v7.14M12 7v10M15 8.43v7.14M18 9.86v4.29M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],volume:[[`path`,{d:`M15.72 9.69a5.25 5.25 0 0 1 0 7.44 5.251 5.251 0 0 1-7.44 0 5.25 5.25 0 0 1 0-7.44 5.251 5.251 0 0 1 7.44 0ZM12 13.41 10.41 15`,stroke:`currentColor`,"stroke-width":`1.509`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M19.07 6.34c.15.15.15.4 0 .56-.15.15-.4.15-.56 0-.16-.15-.15-.4 0-.56.15-.16.41-.16.56 0Z`,stroke:`currentColor`,"stroke-miterlimit":`10`}],[`path`,{d:`M19.07 6.34c.15.15.15.4 0 .56-.15.15-.4.15-.56 0-.16-.15-.15-.4 0-.56.15-.16.41-.16.56 0Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M5.49 19.92c.15.15.15.4 0 .56-.15.16-.4.15-.56 0a.405.405 0 0 1 0-.56c.15-.16.41-.16.56 0Z`,stroke:`currentColor`,"stroke-miterlimit":`10`}],[`path`,{d:`M5.49 19.92c.15.15.15.4 0 .56-.15.16-.4.15-.56 0a.405.405 0 0 1 0-.56c.15-.16.41-.16.56 0Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M21.88 13.13c.15.15.15.4 0 .56-.15.15-.4.15-.56 0-.16-.15-.15-.4 0-.56.15-.16.41-.16.56 0Z`,stroke:`currentColor`,"stroke-miterlimit":`10`}],[`path`,{d:`M21.88 13.13c.15.15.15.4 0 .56-.15.15-.4.15-.56 0-.16-.15-.15-.4 0-.56.15-.16.41-.16.56 0Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M2.67 13.13c.15.15.15.4 0 .56-.15.16-.4.15-.56 0a.405.405 0 0 1 0-.56c.16-.16.41-.16.56 0Z`,stroke:`currentColor`,"stroke-miterlimit":`10`}],[`path`,{d:`M2.67 13.13c.15.15.15.4 0 .56-.15.16-.4.15-.56 0a.405.405 0 0 1 0-.56c.16-.16.41-.16.56 0Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M19.07 19.92c.15.15.15.4 0 .56-.15.15-.4.15-.56 0-.16-.15-.15-.4 0-.56.16-.16.41-.16.56 0Z`,stroke:`currentColor`,"stroke-miterlimit":`10`}],[`path`,{d:`M19.07 19.92c.15.15.15.4 0 .56-.15.15-.4.15-.56 0-.16-.15-.15-.4 0-.56.16-.16.41-.16.56 0Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M5.49 6.34c.15.15.15.4 0 .56-.15.16-.4.15-.56 0a.405.405 0 0 1 0-.56c.15-.16.41-.16.56 0Z`,stroke:`currentColor`,"stroke-miterlimit":`10`}],[`path`,{d:`M5.49 6.34c.15.15.15.4 0 .56-.15.16-.4.15-.56 0a.405.405 0 0 1 0-.56c.15-.16.41-.16.56 0Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M12.28 3.52c.15.15.15.4 0 .56-.15.16-.4.15-.56 0-.16-.15-.15-.4 0-.56.15-.16.41-.15.56 0Z`,stroke:`currentColor`,"stroke-miterlimit":`10`}],[`path`,{d:`M12.28 3.52c.15.15.15.4 0 .56-.15.16-.4.15-.56 0-.16-.15-.15-.4 0-.56.15-.16.41-.15.56 0Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"volume-cross":[[`path`,{d:`M2 10.16v4c0 2 1 3 3 3h1.43c.37 0 .74.11 1.06.3l2.92 1.83c2.52 1.58 4.59.43 4.59-2.54V7.57c0-2.98-2.07-4.12-4.59-2.54L7.49 6.86c-.32.19-.69.3-1.06.3H5c-2 0-3 1-3 3Z`,stroke:`currentColor`,"stroke-width":`1.5`}],[`path`,{d:`m22 14.12-3.96-3.96M21.96 10.2 18 14.16`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"volume-low":[[`path`,{d:`M2 9.96v4.08c0 2.04 1.02 3.06 3.06 3.06h1.46c.38 0 .76.11 1.08.31l2.98 1.86c2.58 1.61 4.68.44 4.68-2.6V7.32c0-3.04-2.11-4.21-4.68-2.6L7.6 6.59c-.33.2-.7.31-1.08.31H5.06C3.02 6.9 2 7.92 2 9.96Z`,stroke:`currentColor`,"stroke-width":`1.5`}],[`path`,{d:`M18 12h4`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"volume-low-1":[[`path`,{d:`M3.33 10v4c0 2 1 3 3 3h1.43c.37 0 .74.11 1.06.3l2.92 1.83c2.52 1.58 4.59.43 4.59-2.54V7.41c0-2.98-2.07-4.12-4.59-2.54L8.82 6.7c-.32.19-.69.3-1.06.3H6.33c-2 0-3 1-3 3Z`,stroke:`currentColor`,"stroke-width":`1.5`}],[`path`,{d:`M19.33 8a6.66 6.66 0 0 1 0 8`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"volume-up":[[`path`,{d:`M2 9.96v4.08c0 2.04 1.02 3.06 3.06 3.06h1.46c.38 0 .76.11 1.08.31l2.98 1.86c2.58 1.61 4.68.44 4.68-2.6V7.32c0-3.04-2.11-4.21-4.68-2.6L7.6 6.59c-.33.2-.7.31-1.08.31H5.06C3.02 6.9 2 7.92 2 9.96Z`,stroke:`currentColor`,"stroke-width":`1.5`}],[`path`,{d:`M18 12h4M20 14v-4`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]]};export{e as GLYPHS};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={wallet:[[`path`,{d:`M22 12v5c0 3-2 5-5 5H7c-3 0-5-2-5-5v-5c0-2.72 1.64-4.62 4.19-4.94.26-.04.53-.06.81-.06h10c.26 0 .51.01.75.05C20.33 7.35 22 9.26 22 12Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M17.751 7.05c-.24-.04-.49-.05-.75-.05h-10c-.28 0-.55.02-.81.06.14-.28.34-.54.58-.78l3.25-3.26a3.525 3.525 0 0 1 4.96 0l1.75 1.77c.64.63.98 1.43 1.02 2.26ZM22 12.5h-3c-1.1 0-2 .9-2 2s.9 2 2 2h3`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"wallet-1":[[`path`,{d:`m12.66 2.518-.03.07-2.9 6.73H6.88c-.68 0-1.33.14-1.92.39l1.75-4.18.04-.1.07-.16c.02-.06.04-.12.07-.17 1.31-3.03 2.79-3.72 5.77-2.58Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M18.05 9.518c-.45-.14-.93-.2-1.41-.2H9.73l2.9-6.73.03-.07c.15.05.29.12.44.18l2.21.93c1.23.51 2.09 1.04 2.61 1.68.1.12.18.23.25.36.09.14.16.28.2.43.04.09.07.18.09.26.27.84.11 1.87-.41 3.16Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M21.522 14.198v1.95c0 .2-.01.4-.02.6-.19 3.49-2.14 5.25-5.84 5.25h-7.8c-.24 0-.48-.02-.71-.05-3.18-.21-4.88-1.91-5.09-5.09-.03-.23-.05-.47-.05-.71v-1.95c0-2.01 1.22-3.74 2.96-4.49.6-.25 1.24-.39 1.92-.39h9.76c.49 0 .97.07 1.41.2 1.99.61 3.46 2.47 3.46 4.68Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`m6.71 5.528-1.75 4.18A4.894 4.894 0 0 0 2 14.198v-2.93c0-2.84 2.02-5.21 4.71-5.74ZM21.519 11.268v2.93c0-2.2-1.46-4.07-3.46-4.67.52-1.3.67-2.32.42-3.17-.02-.09-.05-.18-.09-.26 1.86.96 3.13 2.93 3.13 5.17Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"wallet-2":[[`path`,{d:`M13 9H7M22 10.97v2.06c0 .55-.44 1-1 1.02h-1.96c-1.08 0-2.07-.79-2.16-1.87-.06-.63.18-1.22.6-1.63.37-.38.88-.6 1.44-.6H21c.56.02 1 .47 1 1.02Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M17.48 10.55c-.42.41-.66 1-.6 1.63.09 1.08 1.08 1.87 2.16 1.87H21v1.45c0 3-2 5-5 5H7c-3 0-5-2-5-5v-7c0-2.72 1.64-4.62 4.19-4.94.26-.04.53-.06.81-.06h9c.26 0 .51.01.75.05C19.33 3.85 21 5.76 21 8.5v1.45h-2.08c-.56 0-1.07.22-1.44.6Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"wallet-3":[[`path`,{d:`M13 11.15H7M2 11.15V6.53c0-2.04 1.65-3.69 3.69-3.69h5.62c2.04 0 3.69 1.27 3.69 3.31`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M17.48 12.2c-.5.48-.74 1.22-.54 1.98.25.93 1.17 1.52 2.13 1.52H20v1.45c0 2.21-1.79 4-4 4H6c-2.21 0-4-1.79-4-4v-7c0-2.21 1.79-4 4-4h10c2.2 0 4 1.8 4 4v1.45h-1.08c-.56 0-1.07.22-1.44.6Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M22 12.62v2.06c0 .56-.46 1.02-1.03 1.02h-1.93c-1.08 0-2.07-.79-2.16-1.87-.06-.63.18-1.22.6-1.63.37-.38.88-.6 1.44-.6h2.05c.57 0 1.03.46 1.03 1.02Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"wallet-add":[[`path`,{d:`M17.751 7.05c-.24-.04-.49-.05-.75-.05h-10c-.28 0-.55.02-.81.06.14-.28.34-.54.58-.78l3.25-3.26a3.525 3.525 0 0 1 4.96 0l1.75 1.77c.64.63.98 1.43 1.02 2.26Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M9 19c0 .75-.21 1.46-.58 2.06A3.97 3.97 0 0 1 5 23a3.97 3.97 0 0 1-3.42-1.94A3.92 3.92 0 0 1 1 19c0-2.21 1.79-4 4-4s4 1.79 4 4ZM6.492 18.98h-2.98M5 17.52v2.99`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M22 12v5c0 3-2 5-5 5H7.63c.31-.26.58-.58.79-.94.37-.6.58-1.31.58-2.06 0-2.21-1.79-4-4-4-1.2 0-2.27.53-3 1.36V12c0-2.72 1.64-4.62 4.19-4.94.26-.04.53-.06.81-.06h10c.26 0 .51.01.75.05C20.33 7.35 22 9.26 22 12Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M22 12.5h-3c-1.1 0-2 .9-2 2s.9 2 2 2h3`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"wallet-add-1":[[`path`,{d:`M14.262 15.438h-5M11.762 12.998v5`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`m12.66 2.518-.03.07-2.9 6.73H6.88c-.68 0-1.33.14-1.92.39l1.75-4.18.04-.1.07-.16c.02-.06.04-.12.07-.17 1.31-3.03 2.79-3.72 5.77-2.58Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M18.05 9.518c-.45-.14-.93-.2-1.41-.2H9.73l2.9-6.73.03-.07c.15.05.29.12.44.18l2.21.93c1.23.51 2.09 1.04 2.61 1.68.1.12.18.23.25.36.09.14.16.28.2.43.04.09.07.18.09.26.27.84.11 1.87-.41 3.16Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M21.522 14.198v1.95c0 .2-.01.4-.02.6-.19 3.49-2.14 5.25-5.84 5.25h-7.8c-.24 0-.48-.02-.71-.05-3.18-.21-4.88-1.91-5.09-5.09-.03-.23-.05-.47-.05-.71v-1.95c0-2.01 1.22-3.74 2.96-4.49.6-.25 1.24-.39 1.92-.39h9.76c.49 0 .97.07 1.41.2 1.99.61 3.46 2.47 3.46 4.68Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`m6.71 5.528-1.75 4.18A4.894 4.894 0 0 0 2 14.198v-2.93c0-2.84 2.02-5.21 4.71-5.74ZM21.519 11.268v2.93c0-2.2-1.46-4.07-3.46-4.67.52-1.3.67-2.32.42-3.17-.02-.09-.05-.18-.09-.26 1.86.96 3.13 2.93 3.13 5.17Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"wallet-check":[[`path`,{d:`M9 19c0 .75-.21 1.46-.58 2.06A3.97 3.97 0 0 1 5 23a3.97 3.97 0 0 1-3.42-1.94A3.92 3.92 0 0 1 1 19c0-2.21 1.79-4 4-4s4 1.79 4 4Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`m3.441 19 .99.99 2.13-1.97M17.751 7.05c-.24-.04-.49-.05-.75-.05h-10c-.28 0-.55.02-.81.06.14-.28.34-.54.58-.78l3.25-3.26a3.525 3.525 0 0 1 4.96 0l1.75 1.77c.64.63.98 1.43 1.02 2.26Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M22 12v5c0 3-2 5-5 5H7.63c.31-.26.58-.58.79-.94.37-.6.58-1.31.58-2.06 0-2.21-1.79-4-4-4-1.2 0-2.27.53-3 1.36V12c0-2.72 1.64-4.62 4.19-4.94.26-.04.53-.06.81-.06h10c.26 0 .51.01.75.05C20.33 7.35 22 9.26 22 12Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M22 12.5h-3c-1.1 0-2 .9-2 2s.9 2 2 2h3`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"wallet-minus":[[`path`,{d:`M14.262 15.998h-5`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`m12.66 2.518-.03.07-2.9 6.73H6.88c-.68 0-1.33.14-1.92.39l1.75-4.18.04-.1.07-.16c.02-.06.04-.12.07-.17 1.31-3.03 2.79-3.72 5.77-2.58Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M18.05 9.518c-.45-.14-.93-.2-1.41-.2H9.73l2.9-6.73.03-.07c.15.05.29.12.44.18l2.21.93c1.23.51 2.09 1.04 2.61 1.68.1.12.18.23.25.36.09.14.16.28.2.43.04.09.07.18.09.26.27.84.11 1.87-.41 3.16Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M21.522 14.198v1.95c0 .2-.01.4-.02.6-.19 3.49-2.14 5.25-5.84 5.25h-7.8c-.24 0-.48-.02-.71-.05-3.18-.21-4.88-1.91-5.09-5.09-.03-.23-.05-.47-.05-.71v-1.95c0-2.01 1.22-3.74 2.96-4.49.6-.25 1.24-.39 1.92-.39h9.76c.49 0 .97.07 1.41.2 1.99.61 3.46 2.47 3.46 4.68Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`m6.71 5.528-1.75 4.18A4.894 4.894 0 0 0 2 14.198v-2.93c0-2.84 2.02-5.21 4.71-5.74ZM21.519 11.268v2.93c0-2.2-1.46-4.07-3.46-4.67.52-1.3.67-2.32.42-3.17-.02-.09-.05-.18-.09-.26 1.86.96 3.13 2.93 3.13 5.17Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"wallet-money":[[`path`,{d:`M10.752 16.86v2.03c0 1.72-1.6 3.11-3.57 3.11-1.97 0-3.58-1.39-3.58-3.11v-2.03c0 1.72 1.6 2.94 3.58 2.94 1.97 0 3.57-1.23 3.57-2.94Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M10.75 14.11c0 .5-.14.96-.38 1.36-.59.97-1.8 1.58-3.2 1.58-1.4 0-2.61-.62-3.2-1.58-.24-.4-.38-.86-.38-1.36 0-.86.4-1.63 1.04-2.19.65-.57 1.54-.91 2.53-.91.99 0 1.88.35 2.53.91.66.55 1.06 1.33 1.06 2.19Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M10.752 14.11v2.75c0 1.72-1.6 2.94-3.57 2.94-1.97 0-3.58-1.23-3.58-2.94v-2.75c0-1.72 1.6-3.11 3.58-3.11.99 0 1.88.35 2.53.91.64.56 1.04 1.34 1.04 2.2ZM22 10.97v2.06c0 .55-.44 1-1 1.02h-1.96c-1.08 0-2.07-.79-2.16-1.87-.06-.63.18-1.22.6-1.63.37-.38.88-.6 1.44-.6H21c.56.02 1 .47 1 1.02Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M2 10.5v-2c0-2.72 1.64-4.62 4.19-4.94.26-.04.53-.06.81-.06h9c.26 0 .51.01.75.05C19.33 3.85 21 5.76 21 8.5v1.45h-2.08c-.56 0-1.07.22-1.44.6-.42.41-.66 1-.6 1.63.09 1.08 1.08 1.87 2.16 1.87H21v1.45c0 3-2 5-5 5h-2.5`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"wallet-remove":[[`path`,{d:`M22 12v5c0 3-2 5-5 5H7.63c.31-.26.58-.58.79-.94.37-.6.58-1.31.58-2.06 0-2.21-1.79-4-4-4-1.2 0-2.27.53-3 1.36V12c0-2.72 1.64-4.62 4.19-4.94.26-.04.53-.06.81-.06h10c.26 0 .51.01.75.05C20.33 7.35 22 9.26 22 12Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M17.751 7.05c-.24-.04-.49-.05-.75-.05h-10c-.28 0-.55.02-.81.06.14-.28.34-.54.58-.78l3.25-3.26a3.525 3.525 0 0 1 4.96 0l1.75 1.77c.64.63.98 1.43 1.02 2.26ZM22 12.5h-3c-1.1 0-2 .9-2 2s.9 2 2 2h3`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M9 19c0 .75-.21 1.46-.58 2.06-.21.36-.48.68-.79.94-.7.63-1.62 1-2.63 1a3.97 3.97 0 0 1-3.42-1.94A3.92 3.92 0 0 1 1 19a4 4 0 0 1 1-2.64C2.73 15.53 3.8 15 5 15c2.21 0 4 1.79 4 4ZM6.071 20.04l-2.11-2.11M6.04 17.96l-2.11 2.11`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"wallet-search":[[`path`,{d:`M12 22h5c3 0 5-2 5-5v-5c0-2.7-1.7-4.7-4.2-5H7c-.3 0-.5 0-.8.1C3.6 7.4 2 9.3 2 12v1`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M17.8 7H7c-.3 0-.5 0-.8.1.1-.3.3-.5.6-.8L10 3c1.4-1.4 3.6-1.4 5 0l1.8 1.8c.6.6.9 1.4 1 2.2ZM22 12.5h-3c-1.1 0-2 .9-2 2s.9 2 2 2h3M5.802 21.4c1.77 0 3.2-1.43 3.2-3.2 0-1.77-1.43-3.2-3.2-3.2-1.77 0-3.2 1.43-3.2 3.2 0 1.77 1.43 3.2 3.2 3.2ZM2 22l1-1`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],wanchain:[[`path`,{d:`M16.5 8.9 12 6.2 7.5 8.9M7.5 9v6.1l4.5-2.7 4.5 2.7V9M14.2 16.2 12 17.7l-2.2-1.5`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"wanchain-1":[[`path`,{d:`M15.7 3H8.9c-.4 0-.7.4-.5.8L11.5 9H5.3c-.2 0-.4.1-.4.2l-3.7 5.5c-.1.2-.1.4 0 .6l3.4 5.1c.2.3.7.3.8 0l2.5-4.2c.2-.3.6-.3.8 0l3.1 4.7c.1.1.2.2.4.2h6.5c.2 0 .3-.1.4-.2l3.7-5.5c.1-.2.1-.4 0-.5L16.1 3.2c0-.1-.2-.2-.4-.2ZM8.5 15l3.2-5.6 2.8 4.8c.2.3 0 .8-.4.8H8.5Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`}]],watch:[[`path`,{d:`M8.5 19h7c2.33 0 3.5-1.17 3.5-3.5v-7C19 6.17 17.83 5 15.5 5h-7C6.17 5 5 6.17 5 8.5v7C5 17.83 6.17 19 8.5 19ZM16 2H8M16 22H8`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M11.5 9.5v3h3`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"watch-status":[[`path`,{d:`M8.5 19h7c2.33 0 3.5-1.17 3.5-3.5v-7C19 6.17 17.83 5 15.5 5h-7C6.17 5 5 6.17 5 8.5v7C5 17.83 6.17 19 8.5 19ZM16 2H8M16 22H8`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M12 14v-4M15 14v-2M9 14v-1`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],weight:[[`path`,{d:`M17.18 18c2.4 0 3-1.35 3-3V9c0-1.65-.6-3-3-3s-3 1.35-3 3v6c0 1.65.6 3 3 3ZM6.82 18c-2.4 0-3-1.35-3-3V9c0-1.65.6-3 3-3s3 1.35 3 3v6c0 1.65-.6 3-3 3ZM9.82 12h4.36M22.5 14.5v-5M1.5 14.5v-5`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"weight-meter":[[`path`,{d:`M10 22h4c5 0 7-2 7-7V9c0-5-2-7-7-7h-4C5 2 3 4 3 9v6c0 5 2 7 7 7Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M17.25 8.29a7.905 7.905 0 0 0-10.5 0l2.18 3.5a4.613 4.613 0 0 1 6.14 0l2.18-3.5Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],wifi:[[`path`,{d:`M4.91 11.84c4.3-3.32 9.89-3.32 14.19 0M2 8.36c6.06-4.68 13.94-4.68 20 0M6.79 15.49c3.15-2.44 7.26-2.44 10.41 0M9.4 19.15c1.58-1.22 3.63-1.22 5.21 0`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"wifi-square":[[`path`,{d:`M6 9.96c3.63-2.81 8.37-2.81 12 0M7.6 13.05c2.67-2.06 6.14-2.06 8.81 0M9.8 16.14c1.33-1.03 3.07-1.03 4.4 0`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M9 22h6c5 0 7-2 7-7V9c0-5-2-7-7-7H9C4 2 2 4 2 9v6c0 5 2 7 7 7Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],wind:[[`path`,{d:`M2 15h16.5c1.93 0 3.5 1.57 3.5 3.5S20.43 22 18.5 22 15 20.43 15 18.5V18M2 12h16.5c1.92 0 3.5-1.57 3.5-3.5C22 6.58 20.42 5 18.5 5A3.51 3.51 0 0 0 15 8.5V9`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M2 9h7.31a2.69 2.69 0 1 0-2.69-2.69v.38`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"wind-2":[[`path`,{d:`m2 13.1 2.5-1.5c1.54-.92 3.46-.92 5 0s3.46.92 5 0 3.46-.92 5 0l2.5 1.5M2 3.9l2.5 1.5c1.54.92 3.46.92 5 0s3.46-.92 5 0 3.46.92 5 0L22 3.9M2 20.1l2.5-1.5c1.54-.92 3.46-.92 5 0s3.46.92 5 0 3.46-.92 5 0l2.5 1.5`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],windows:[[`path`,{"clip-rule":`evenodd`,d:`M22 2 12 4v7h10V2ZM22 22l-10-2v-7h10v9ZM10 4.3 2 6v5h8V4.3ZM10 19.7 2 18v-5h8v6.7Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],wing:[[`path`,{d:`M16 5h3.5l2.7 4.7L17 19l-1.9-3.1 3.6-6.2L16 5ZM9 5h3.5l2.7 4.7L10 19l-1.9-3.1 3.6-6.2L9 5ZM1.8 5h3.5L8 9.8l-1.7 2.9L1.8 5Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],woman:[[`path`,{d:`M12 16a7 7 0 1 0 0-14 7 7 0 0 0 0 14ZM12 16v6M15 19H9`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],"wrist-clock":[[`path`,{d:`M12 9.66v2.79l1.4 1.4`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M5.5 12a6.5 6.5 0 1 1 13 0c0 2.08-.98 3.94-2.5 5.13h-.01c-1.1.86-2.48 1.37-3.99 1.37-1.49 0-2.86-.5-3.96-1.35h-.01A6.486 6.486 0 0 1 5.5 12Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M8.03 17.15h.01c1.1.85 2.47 1.35 3.96 1.35 1.51 0 2.89-.51 3.99-1.37H16l-.51 2.47C15 21.5 13.9 22 12.55 22h-1.09c-1.35 0-2.46-.5-2.94-2.41l-.49-2.44ZM8.03 6.85h.01C9.14 6 10.51 5.5 12 5.5c1.51 0 2.89.51 3.99 1.37H16l-.51-2.47C15 2.5 13.9 2 12.55 2h-1.09C10.11 2 9 2.5 8.52 4.41l-.49 2.44Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]]};export{e as GLYPHS};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={xd:[[`path`,{d:`M15 22H9c-5 0-7-2-7-7V9c0-5 2-7 7-7h6c5 0 7 2 7 7v6c0 5-2 7-7 7Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M18 8.5v7.1h-1.8c-1 0-1.8-.8-1.8-1.8s.8-1.8 1.8-1.8H18M6 8.5l5.7 7M11.7 8.5l-5.7 7`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]],xiaomi:[[`path`,{d:`M7.5 15V9h4c1.1 0 2 .9 2 2v4M10.5 15v-3M16.5 15V9`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`}]],xrp:[[`path`,{d:`M5.5 2H4.1c-1 0-1.5 1.1-.8 1.8L9 9.5c1.6 1.6 4.3 1.6 5.9 0l5.7-5.7c.8-.7.3-1.8-.7-1.8h-1.4c-.8 0-1.6.3-2.2.9l-3.6 3.6c-.4.4-1.1.4-1.5 0L7.7 2.9C7.1 2.3 6.3 2 5.5 2ZM5.5 22H4.1c-.9 0-1.4-1.1-.7-1.8L9 14.5c1.6-1.6 4.3-1.6 5.9 0l5.7 5.7c.7.7.2 1.8-.7 1.8h-1.4c-.8 0-1.6-.3-2.2-.9l-3.6-3.6c-.4-.4-1.1-.4-1.5 0l-3.6 3.6c-.5.5-1.3.9-2.1.9Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}]]};export{e as GLYPHS};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={zel:[[`path`,{d:`M10.5 11.5v2.8L8 15.8l-2.5-1.5v-2.8L8 10l1.2.7 1.3.8ZM18.5 11.5v2.8L16 15.8l-2.5-1.5v-2.8l1.3-.8L16 10l2.5 1.5Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linejoin":`round`}],[`path`,{d:`M14.8 9.3v1.4l-1.3.8v1.7l-1.5.9-1.5-.9v-1.7l-1.3-.8V9.3L12 7.8l2.8 1.5Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linejoin":`round`}],[`path`,{d:`M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linejoin":`round`}]],zoom:[[`path`,{"clip-rule":`evenodd`,d:`M6 9.7v2.8c0 1.5 1.3 2.8 2.8 2.8h3.7c.5 0 .9-.4.9-.9v-2.8c0-1.5-1.2-2.8-2.8-2.8H6.9c-.5 0-.9.4-.9.9Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`}],[`path`,{"clip-rule":`evenodd`,d:`M18 9.2v5.6l-2.8-1.9v-1.8L18 9.2Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`,"stroke-linecap":`round`,"stroke-linejoin":`round`}],[`path`,{d:`M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z`,stroke:`currentColor`,"stroke-width":`1.5`,"stroke-miterlimit":`10`}]]};export{e as GLYPHS};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webority/ui-elements",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.192.0",
|
|
4
4
|
"description": "Webority framework-agnostic UI custom elements (<wui-*>): the single implementation of the interactive components, styled by @webority/theme. Used natively in Razor and wrapped by @webority/ui-react.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"type": "module",
|
|
@@ -295,10 +295,10 @@
|
|
|
295
295
|
"@tiptap/starter-kit": "3.31.4",
|
|
296
296
|
"@types/node": "25.6.0",
|
|
297
297
|
"@vitest/coverage-v8": "5.1.0",
|
|
298
|
-
"@webority/biome-config": "0.
|
|
299
|
-
"@webority/markdown-core": "0.
|
|
300
|
-
"@webority/theme": "0.
|
|
301
|
-
"@webority/web-core": "0.
|
|
298
|
+
"@webority/biome-config": "0.192.0",
|
|
299
|
+
"@webority/markdown-core": "0.192.0",
|
|
300
|
+
"@webority/theme": "0.192.0",
|
|
301
|
+
"@webority/web-core": "0.192.0",
|
|
302
302
|
"echarts": "6.1.0",
|
|
303
303
|
"jsdom": "30.1.1",
|
|
304
304
|
"libphonenumber-js": "^1.13.9",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const GLYPH_SHARD_KEYS: readonly string[];
|
package/types/global/glyphs.d.ts
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type GlyphBodies, type GlyphTable } from "../glyphTable.ts";
|
|
2
|
+
export { GLYPH_PENDING_ATTRIBUTE } from "../glyphTable.ts";
|
|
2
3
|
export declare const GLYPH_CHUNK = "glyphs";
|
|
3
|
-
|
|
4
|
-
export declare const
|
|
5
|
-
/**
|
|
6
|
-
export declare function
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
/** True once registerGlyphs has run with the lazy glyphs, so the glyphs chunk has handed them over. */
|
|
11
|
-
export declare function lazyGlyphsRegistered(): boolean;
|
|
12
|
-
/** Adds the glyphs the chunk carries and fills every glyph written before they arrived. */
|
|
13
|
-
export declare function registerGlyphs(glyphs: Readonly<Record<string, readonly SvgNode[]>>): void;
|
|
4
|
+
export declare const glyphNode: GlyphTable["glyphNode"];
|
|
5
|
+
export declare const lazyGlyphsRegistered: GlyphTable["curatedRegistered"];
|
|
6
|
+
/** Adds the curated glyphs the glyphs chunk carries and fills every glyph written before they arrived. */
|
|
7
|
+
export declare function registerGlyphs(glyphs: GlyphBodies): void;
|
|
8
|
+
/** Adds one catalogue shard's glyphs; the shard chunk calls this when it loads. */
|
|
9
|
+
export declare function registerCatalogueGlyphs(key: string, glyphs: GlyphBodies): void;
|
|
10
|
+
export declare function catalogueShardRegistered(key: string): boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type SvgNode } from "./svgNodes.ts";
|
|
2
|
+
export declare const GLYPH_PENDING_ATTRIBUTE = "data-wui-glyph-pending";
|
|
3
|
+
export type GlyphBodies = Readonly<Record<string, readonly SvgNode[]>>;
|
|
4
|
+
export type GlyphPart = "curated" | {
|
|
5
|
+
shard: string;
|
|
6
|
+
};
|
|
7
|
+
export interface GlyphTableOptions {
|
|
8
|
+
/** Starts the curated chunk, which registers its own glyphs. Absent when the initial table holds the curated set. */
|
|
9
|
+
loadCurated?: () => Promise<void>;
|
|
10
|
+
/** Starts one shard. Resolves to its glyphs, or to undefined when the shard registers itself. */
|
|
11
|
+
loadShard: (key: string) => Promise<GlyphBodies | undefined>;
|
|
12
|
+
shardKeys: readonly string[];
|
|
13
|
+
}
|
|
14
|
+
export interface GlyphTable {
|
|
15
|
+
glyphNode: (name: string, options?: {
|
|
16
|
+
size?: number;
|
|
17
|
+
className?: string;
|
|
18
|
+
}) => SVGSVGElement | null;
|
|
19
|
+
register: (glyphs: GlyphBodies, which: GlyphPart) => void;
|
|
20
|
+
shardRegistered: (key: string) => boolean;
|
|
21
|
+
curatedRegistered: () => boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare function createGlyphTable(initial: GlyphBodies, options: GlyphTableOptions): GlyphTable;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ICON_NAMES: readonly string[];
|
package/types/iconGlyphs.g.d.ts
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type GlyphTable } from "./glyphTable.ts";
|
|
2
|
+
import type { SvgNode } from "./svgNodes.ts";
|
|
2
3
|
export declare const GLYPHS: Record<string, readonly SvgNode[]>;
|
|
3
4
|
export declare const iconNames: string[];
|
|
4
|
-
|
|
5
|
-
export declare function glyphNode(name: string, { size, className }?: {
|
|
6
|
-
size?: number;
|
|
7
|
-
className?: string;
|
|
8
|
-
}): SVGSVGElement | null;
|
|
5
|
+
export declare const glyphNode: GlyphTable["glyphNode"];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./dom-DMQu--xV.js";import{t}from"./elementBase-Cxeyx0tU.js";import{t as n}from"./svgNodes-CyPS2oFH.js";import{r,t as i}from"./textStore-Dh5iyZSR.js";import{t as a}from"./imageCrop.g-BnbAeH2Q.js";var o=4096,s=[.92,.8,.65,.5],c=.8,l=8;function u(e){if(e==null||e===``||e===`free`)return null;let t=typeof e==`number`?e:Number(e);return Number.isFinite(t)&&t>0?t:null}function d(e,t,n){if(!n)return{x:0,y:0,w:e,h:t};let r=e,i=r/n;return i>t&&(i=t,r=i*n),{x:(e-r)/2,y:(t-i)/2,w:r,h:i}}function f(e,t,n){return{...e,x:Math.min(Math.max(e.x,0),Math.max(t-e.w,0)),y:Math.min(Math.max(e.y,0),Math.max(n-e.h,0))}}function p(e,t,n,r,i){return f({...e,x:e.x+t,y:e.y+n},r,i)}function m(e,t){return Math.min(32,e,t)}function h(e,t){return t.w/e.w}function g(e,t){return Math.max(4,h(e,t))}function _(e,t,n,r,i){let a=Math.min(Math.max(n,1),g(e,t)),o=e.h/e.w,s=Math.min(r,i/o),c=Math.min(Math.max(m(r,i),m(r,i)/o),s),l=Math.min(Math.max(t.w/a,c),s),u=l*o,d=e.x+e.w/2,p=e.y+e.h/2;return f({x:d-l/2,y:p-u/2,w:l,h:u},r,i)}var v=[`nw`,`ne`,`sw`,`se`];function y(e,t,n,r,i,a){let o=m(i,a),s=t.endsWith(`w`),c=t.startsWith(`n`),l=s?e.x+e.w:e.x,u=c?e.y+e.h:e.y,d=Math.min(Math.max(n,0),i),f=Math.min(Math.max(r,0),a);return d=s?Math.min(d,l-o):Math.max(d,l+o),f=c?Math.min(f,u-o):Math.max(f,u+o),{x:Math.min(d,l),y:Math.min(f,u),w:Math.abs(d-l),h:Math.abs(f-u)}}function b(e,t=o){let n=Math.min(1,t/Math.max(e.w,e.h));return{width:Math.max(1,Math.round(e.w*n)),height:Math.max(1,Math.round(e.h*n))}}function x(e,t){let n=t/Math.max(e.w,e.h);return{width:Math.max(1,Math.round(e.w*n)),height:Math.max(1,Math.round(e.h*n))}}function S(e,t,n){return n%180==0?{w:e,h:t}:{w:t,h:e}}function C(e,t,n){return f({x:n-(e.y+e.h),y:e.x,w:e.h,h:e.w},n,t)}function w(e){return String(e||``).split(/[\s,]+/).map(Number).filter(e=>Number.isInteger(e)&&e>0)}var T=[`image/png`,`image/jpeg`,`image/webp`],E={"image/png":`.png`,"image/jpeg":`.jpg`,"image/webp":`.webp`};function D(e){let t=String(e||``).toLowerCase();return T.includes(t)?t:`image/png`}function O(e,t){let n=String(e||`image`),r=E[t];if(r===void 0)throw Error(`No file extension for ${t}`);return(t===`image/jpeg`?/\.jpe?g$/i.test(n):n.toLowerCase().endsWith(r))?n:`${n.replace(/\.[^./\\]+$/,``)||`image`}${r}`}async function k(e,{width:t,height:n,type:r,maxBytes:i}){let a=r,o=t,u=n,d=null;for(let t=0;t<=l;t++){let n=a===`image/png`?[void 0]:t===0?s:[s[1]];for(let t of n){if(d=await e(o,u,a,t),!d||(d.type&&d.type!==a&&(a=d.type),!(i>0)||d.size<=i))return d;if(a===`image/png`)break}o=Math.max(1,Math.round(o*c)),u=Math.max(1,Math.round(u*c))}return d}var A=.05,j=.2,M={w:320,h:240},N={nw:`topLeftLabel`,ne:`topRightLabel`,sw:`bottomLeftLabel`,se:`bottomRightLabel`},P=()=>r(`imageCrop`,a),F=e=>{let t=N[e];return t?P()[t]:e};function I(e,t=!1){return n({width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`,...t?{"stroke-linejoin":`round`}:{},"aria-hidden":`true`},e.map(e=>[`path`,{d:e}]))}var L=(e,t)=>Math.hypot(e.x-t.x,e.y-t.y);function R(e){let[t,n]=[...e.values()];if(!t||!n)throw Error(`two pointers missing`);return[t,n]}function z(e,t){if(e===null)throw Error(`${t} missing`);return e}function B(e,t,n){let r=e.querySelector(t);if(!(r instanceof n))throw Error(`${t} missing`);return r}function V(e){if(e===null)throw Error(`event target missing`);if(!(e instanceof Element))return null;let t=e.closest(`.wui-crop-handle`);return t instanceof HTMLElement?t:null}var H=class extends t{_rect;_base;_natural;_source;_rotation;_drag;_pointers;_pinch;_previewPending;_resizeObserver;_rendered;_stageEl;_imgEl;_frameEl;_sliderEl;_toolsEl;_previewBoxEl;_liveEl;static get observedAttributes(){return[`src`,`aspect`,`round`,`rotatable`,`previews`]}constructor(){super(),this._rect=null,this._base=null,this._natural=null,this._source=null,this._rotation=0,this._drag=null,this._pointers=/* @__PURE__ */ new Map,this._pinch=null,this._previewPending=!1,this._resizeObserver=null,this._stageEl=null,this._imgEl=null,this._frameEl=null,this._sliderEl=null,this._toolsEl=null,this._previewBoxEl=null,this._liveEl=null}get _stage(){return z(this._stageEl,`stage`)}get _img(){return z(this._imgEl,`image`)}get _frame(){return z(this._frameEl,`frame`)}get _slider(){return z(this._sliderEl,`zoom slider`)}get _tools(){return z(this._toolsEl,`tools`)}get _previewBox(){return z(this._previewBoxEl,`previews`)}get _live(){return z(this._liveEl,`live region`)}get src(){return this.getAttribute(`src`)||``}set src(e){e==null||e===``?this.removeAttribute(`src`):this.setAttribute(`src`,String(e))}get aspect(){return u(this.getAttribute(`aspect`))}set aspect(e){e==null||e===``?this.removeAttribute(`aspect`):this.setAttribute(`aspect`,String(e))}get round(){return this.hasAttribute(`round`)}set round(e){this.toggleAttribute(`round`,!!e)}get rotatable(){return this.hasAttribute(`rotatable`)}set rotatable(e){this.toggleAttribute(`rotatable`,!!e)}get previews(){return this.getAttribute(`previews`)||``}set previews(e){e==null||e===``?this.removeAttribute(`previews`):this.setAttribute(`previews`,Array.isArray(e)?e.join(` `):String(e))}get rect(){return this._rect?{...this._rect}:null}get rotation(){return this._rotation}set rotation(e){if(!this._rect)return;let t=(Math.round(Number(e)/90)*90%360+360)%360;if(!Number.isNaN(t))for(;this._rotation!==t;)this.rotate()}get zoom(){return this._rect?h(this._rect,z(this._base,`base frame`)):1}set zoom(e){if(!this._rect)return;let t=z(this._natural,`natural size`);this._rect=_(this._rect,z(this._base,`base frame`),Number(e)||1,t.w,t.h),this._paint(),this._announce()}connectedCallback(){this._rendered?this._observe():this.render()}disconnectedCallback(){this._resizeObserver?.disconnect(),this._resizeObserver=null}attributeChangedCallback(e){this._rendered&&(e===`src`?this._loadImage():e===`aspect`?(this._rebuildHandles(),this._resetRect()):e===`rotatable`?this._tools.hidden=!this.rotatable:e===`previews`?this._renderPreviews():this._applyRound())}render(){this.replaceChildren(e(`div`,null,e(`div`,{class:`wui-crop-stage`,tabindex:`0`,role:`group`,"aria-label":P().cropAreaText},e(`img`,{class:`wui-crop-img`,alt:``,draggable:`false`}),e(`div`,{class:`wui-crop-frame`})),e(`div`,{class:`wui-crop-controls`},e(`button`,{type:`button`,class:`wui-crop-zoombtn`,"data-zoom":`out`,"aria-label":P().zoomOutLabel},I([`M5 12h14`])),e(`input`,{type:`range`,class:`form-range wui-crop-zoom`,min:1,max:4,step:`0.01`,value:1,"aria-label":P().zoomLabel}),e(`button`,{type:`button`,class:`wui-crop-zoombtn`,"data-zoom":`in`,"aria-label":P().zoomInLabel},I([`M5 12h14M12 5v14`]))),e(`div`,{class:`wui-crop-tools`,hidden:!0},e(`button`,{type:`button`,class:`wui-crop-toolbtn`,"data-crop-action":`rotate`,"aria-label":P().rotateClockwiseLabel},I([`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,`M21 3v5h-5`],!0),e(`span`,null,P().rotateLabel)),e(`button`,{type:`button`,class:`wui-crop-toolbtn`,"data-crop-action":`reset`,"aria-label":P().resetCropLabel},I([`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,`M3 3v5h5`],!0),e(`span`,null,P().resetLabel))),e(`div`,{class:`wui-crop-previews`,"aria-hidden":`true`,hidden:!0}),e(`div`,{class:`visually-hidden`,"data-wui-crop-live":!0,"aria-live":`polite`}))),this._stageEl=B(this,`.wui-crop-stage`,HTMLElement),this._imgEl=B(this,`.wui-crop-img`,HTMLImageElement),this._frameEl=B(this,`.wui-crop-frame`,HTMLElement),this._sliderEl=B(this,`.wui-crop-zoom`,HTMLInputElement),this._toolsEl=B(this,`.wui-crop-tools`,HTMLElement),this._previewBoxEl=B(this,`.wui-crop-previews`,HTMLElement),this._liveEl=B(this,`[data-wui-crop-live]`,HTMLElement),this._rendered=!0,this._tools.hidden=!this.rotatable,this._applyRound(),this._rebuildHandles(),this._renderPreviews(),this._wire(),this._observe(),this._loadImage()}_applyRound(){this._frame.classList.toggle(`wui-crop-frame--round`,this.round),this._previewBox.classList.toggle(`wui-crop-previews--round`,this.round)}_rebuildHandles(){for(let e of this._frame.querySelectorAll(`.wui-crop-handle`))e.remove();if(!this.aspect)for(let e of v){let t=document.createElement(`button`);t.type=`button`,t.className=`wui-crop-handle wui-crop-handle--${e}`,t.dataset.handle=e,t.setAttribute(`aria-label`,i(P().resizeCornerText,{corner:F(e)})),this._frame.appendChild(t)}}_renderPreviews(){let e=w(this.previews);this._previewBox.replaceChildren(),this._previewBox.hidden=e.length===0;for(let t of e){let e=document.createElement(`canvas`);e.className=`wui-crop-preview`,e.dataset.size=String(t),e.style.width=`${t}px`,e.style.height=`${t}px`,this._previewBox.appendChild(e)}this._schedulePreviews()}_loadImage(){this._rect=null,this._natural=null,this._source=null,this._rotation=0,this._drag=null,this._pinch=null,this._pointers.clear();let e=this.src;this._img.hidden=!e,this._frame.hidden=!0,e&&(this._img.onload=()=>{this._source={w:this._img.naturalWidth,h:this._img.naturalHeight},this._natural={...this._source},this._resetRect(),this.dispatchEvent(new Event(`load`))},this._img.onerror=()=>{this._frame.hidden=!0,this.dispatchEvent(new Event(`error`))},this._img.src=e)}_resetRect(){this._natural&&(this._base=d(this._natural.w,this._natural.h,this.aspect),this._rect={...this._base},this._frame.hidden=!1,this._paint())}_observe(){typeof ResizeObserver>`u`||this._resizeObserver||(this._resizeObserver=new ResizeObserver(()=>this._paint()),this._resizeObserver.observe(this._stage))}_view(){let e=z(this._natural,`natural size`),t=this._stage.clientWidth||M.w,n=this._stage.clientHeight||M.h,r=Math.min(t/e.w,n/e.h),i=e.w*r,a=e.h*r;return{scale:r,left:(t-i)/2,top:(n-a)/2,iw:i,ih:a}}_paint(){if(!this._rect)return;let e=this._view(),t=this._rotation%180!=0,n=t?e.ih:e.iw,r=t?e.iw:e.ih;Object.assign(this._img.style,{left:`${e.left+(e.iw-n)/2}px`,top:`${e.top+(e.ih-r)/2}px`,width:`${n}px`,height:`${r}px`,transform:this._rotation?`rotate(${this._rotation}deg)`:``});let i=this._rect;Object.assign(this._frame.style,{left:`${e.left+i.x*e.scale}px`,top:`${e.top+i.y*e.scale}px`,width:`${i.w*e.scale}px`,height:`${i.h*e.scale}px`});let a=z(this._base,`base frame`),o=h(i,a),s=g(i,a);this._slider.max=String(s),this._slider.value=String(Math.min(Math.max(o,1),s)),this._slider.setAttribute(`aria-valuetext`,`${Math.round(o*100)}%`),this._schedulePreviews()}_schedulePreviews(){if(!this._rect||this._previewBox.hidden||this._previewPending)return;this._previewPending=!0;let e=()=>{this._previewPending=!1,this._drawPreviews()};typeof requestAnimationFrame==`function`?requestAnimationFrame(e):e()}_drawPreviews(){if(!this._rect)return;let e=z(this._natural,`natural size`),t=f(this._rect,e.w,e.h),n=typeof window<`u`&&window.devicePixelRatio||1;for(let e of this._previewBox.children){if(!(e instanceof HTMLCanvasElement))throw Error(`Preview box holds a non-canvas child`);let r=e,i=Number(r.dataset.size),a=Math.max(1,Math.round(i*t.h/t.w));r.style.width=`${i}px`,r.style.height=`${a}px`,r.width=Math.round(i*n),r.height=Math.round(a*n);let o=r.getContext(`2d`);o&&this._drawCrop(o,t,r.width,r.height)}}_drawCrop(e,t,n,r){if(!this._rotation){e.drawImage(this._img,t.x,t.y,t.w,t.h,0,0,n,r);return}let i=z(this._source,`source size`),a=z(this._natural,`natural size`);e.save(),e.scale(n/t.w,r/t.h),e.translate(-t.x,-t.y),e.translate(a.w/2,a.h/2),e.rotate(this._rotation*Math.PI/180),e.drawImage(this._img,-i.w/2,-i.h/2,i.w,i.h),e.restore()}_announce(){this.dispatchEvent(new CustomEvent(`change`,{bubbles:!0,detail:this.rect}))}_say(){let e=z(this._rect,`frame`),t=this._rotation?i(P().turnedText,{rotation:this._rotation}):``,n=i(P().frameText,{width:Math.round(e.w),height:Math.round(e.h),left:Math.round(e.x),top:Math.round(e.y),zoom:Math.round(h(e,z(this._base,`base frame`))*100),turned:t});this._live.textContent=n===this._live.textContent?`${n} `:n}rotate(){if(!this._rect)return;let e=z(this._natural,`natural size`),t=C(this._rect,e.w,e.h);this._rotation=(this._rotation+90)%360;let n=z(this._source,`source size`);this._natural=S(n.w,n.h,this._rotation),this._base=d(this._natural.w,this._natural.h,this.aspect);let r=this.aspect;this._rect=r&&r!==1?{...this._base}:t,this._paint(),this._announce()}reset(){this._source&&(this._rotation=0,this._natural={...this._source},this._resetRect(),this._announce())}_wire(){let e=this._stage;e.addEventListener(`pointerdown`,t=>{if(!this._rect||t.button>0)return;if(this._pointers.set(t.pointerId,{x:t.clientX,y:t.clientY}),e.setPointerCapture?.(t.pointerId),this._pointers.size===2){let[e,n]=R(this._pointers);this._drag=null,this._pinch={distance:L(e,n)||1,zoom:this.zoom,done:!1},t.preventDefault();return}if(this._pinch)return;let n=V(t.target);this._drag={id:t.pointerId,corner:n?n.dataset.handle:null,x:t.clientX,y:t.clientY,start:{...this._rect}},n||e.focus(),t.preventDefault()}),e.addEventListener(`pointermove`,t=>{if(this._pointers.has(t.pointerId)&&this._pointers.set(t.pointerId,{x:t.clientX,y:t.clientY}),this._pinch){if(this._pinch.done||this._pointers.size<2||!this._pointers.has(t.pointerId))return;let[e,n]=R(this._pointers),r=this._pinch.zoom*L(e,n)/this._pinch.distance,i=z(this._natural,`natural size`);this._rect=_(z(this._rect,`frame`),z(this._base,`base frame`),r,i.w,i.h),this._paint();return}let n=this._drag;if(!n||n.id!==t.pointerId)return;let r=this._view(),{w:i,h:a}=z(this._natural,`natural size`);if(n.corner){let o=e.getBoundingClientRect(),s=(t.clientX-o.left-e.clientLeft-r.left)/r.scale,c=(t.clientY-o.top-e.clientTop-r.top)/r.scale;this._rect=y(z(this._rect,`frame`),n.corner,s,c,i,a)}else this._rect=p(n.start,(t.clientX-n.x)/r.scale,(t.clientY-n.y)/r.scale,i,a);this._paint()});let t=t=>{if(this._pointers.delete(t.pointerId)&&e.releasePointerCapture?.(t.pointerId),this._pinch){!this._pinch.done&&this._pointers.size<2&&(this._pinch.done=!0,this._announce()),this._pointers.size===0&&(this._pinch=null);return}let n=this._drag;n&&n.id===t.pointerId&&(this._drag=null,this._announce())};e.addEventListener(`pointerup`,t),e.addEventListener(`pointercancel`,t),e.addEventListener(`keydown`,e=>this._onKey(e)),e.addEventListener(`wheel`,e=>{this._rect&&this.contains(document.activeElement)&&(e.preventDefault(),this.zoom*=e.deltaY<0?1.1:1/1.1)},{passive:!1});for(let e of[`input`,`change`])this._slider.addEventListener(e,e=>e.stopPropagation());this._slider.addEventListener(`input`,()=>{this.zoom=Number(this._slider.value)});for(let e of this.querySelectorAll(`.wui-crop-zoombtn`)){if(!(e instanceof HTMLButtonElement))throw Error(`zoom button missing`);e.addEventListener(`click`,()=>{this.zoom*=e.dataset.zoom===`in`?1.25:.8})}B(this,`[data-crop-action="rotate"]`,HTMLButtonElement).addEventListener(`click`,()=>this.rotate()),B(this,`[data-crop-action="reset"]`,HTMLButtonElement).addEventListener(`click`,()=>this.reset())}_onKey(e){if(!this._rect||e.altKey||e.ctrlKey||e.metaKey)return;let{w:t,h:n}=z(this._natural,`natural size`);if(e.key===`+`||e.key===`=`)this.zoom*=1.25,this._say();else if(e.key===`-`||e.key===`_`)this.zoom*=.8,this._say();else if((e.key===`r`||e.key===`R`)&&this.rotatable)this.rotate(),this._say();else if(e.key.startsWith(`Arrow`)){let r=e.shiftKey?j:A,i=e.key===`ArrowRight`?1:e.key===`ArrowLeft`?-1:0,a=e.key===`ArrowDown`?1:e.key===`ArrowUp`?-1:0,o=V(e.target)?.dataset.handle;if(o){let e=this._rect,s=(o.endsWith(`w`)?e.x:e.x+e.w)+i*r*e.w,c=(o.startsWith(`n`)?e.y:e.y+e.h)+a*r*e.h;this._rect=y(e,o,s,c,t,n)}else this._rect=p(this._rect,i*r*this._rect.w,a*r*this._rect.h,t,n);this._paint(),this._announce(),this._say()}else return;e.preventDefault()}async toBlob({type:e,maxBytes:t=0,size:n=0}={}){if(!this._rect)return null;let r=D(e),i=z(this._natural,`natural size`),a=f(this._rect,i.w,i.h),{width:o,height:s}=n>0?x(a,n):b(a);return k((e,t,n,r)=>new Promise(i=>{let o=document.createElement(`canvas`);o.width=e,o.height=t;let s=o.getContext(`2d`);s?(n===`image/jpeg`&&(s.fillStyle=`#fff`,s.fillRect(0,0,e,t)),this._drawCrop(s,a,e,t),o.toBlob(i,n,r)):i(null)}),{width:o,height:s,type:r,maxBytes:t})}async toFile({name:e,type:t,maxBytes:n=0,size:r=0}={}){let i=await this.toBlob({type:t,maxBytes:n,size:r});return i?new File([i],O(e,i.type),{type:i.type}):null}};export{H as t};
|