phoenix_duskmoon 9.16.15 → 10.0.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.
@@ -0,0 +1 @@
1
+ {"entries":{"app.css":{"assets":["app.css"],"file":"app.css","src":"app.css"}},"manifest_version":1}
@@ -0,0 +1 @@
1
+ {"entries":{"phoenix_duskmoon.js":{"file":"phoenix_duskmoon.js","imports":[],"css":[],"src":"phoenix_duskmoon.js","assets":[],"isEntry":true,"dynamicImports":[]}},"manifest_version":1}
@@ -1 +1 @@
1
- {"entries":{"phoenix_duskmoon.js":{"file":"phoenix_duskmoon.js","imports":[],"css":[],"assets":[],"src":"phoenix_duskmoon.js","isEntry":true,"dynamicImports":[]}},"manifest_version":1}
1
+ {"entries":{"phoenix_duskmoon.js":{"file":"phoenix_duskmoon.js","imports":[],"css":[],"src":"phoenix_duskmoon.js","assets":[],"isEntry":true,"dynamicImports":[]}},"manifest_version":1}
@@ -0,0 +1 @@
1
+ const e=[`dm-click`,`dm-change`,`dm-input`,`dm-focus`,`dm-blur`,`dm-submit`,`dm-select`,`dm-close`,`dm-open`,`dm-toggle`],t=Symbol.for(`phoenix-duskmoon.dialog-behavior-listeners`),n={mounted(){this._sendListeners=[],this._setupEventBridging(),this._setupAutomaticForwarding()},updated(){this._setupAutomaticForwarding()},destroyed(){this._sendListeners&&(this._sendListeners.forEach(({event:e,listener:t})=>{this.el.removeEventListener(e,t)}),this._sendListeners=null),e.forEach(e=>{let t=`_dm_listener_${e}`;this[t]&&(this.el.removeEventListener(e,this[t]),this[t]=null)})},_setupEventBridging(){let e=this.el.attributes,t=this.el.getAttribute(`phx-target`),n=(e,n,r)=>{t?this.pushEventTo(t,e,n,r):this.pushEvent(e,n,r)};for(let t=0;t<e.length;t++){let r=e[t];if(/^duskmoon-send-/.test(r.name)){let e=r.name.replace(/^duskmoon-send-/,``),[t,i]=r.value.split(`;`),a=({detail:r})=>{n(t,r||{},t=>{i&&typeof this[i]==`function`&&this[i](t,r,e)})};this.el.addEventListener(e,a),this._sendListeners.push({event:e,listener:a})}if(/^duskmoon-receive-/.test(r.name)){let e=r.name.replace(/^duskmoon-receive-/,``),t=r.value;this.handleEvent(e,n=>{t&&typeof this.el[t]==`function`?this.el[t](n):this.el.dispatchEvent(new CustomEvent(e,{detail:n,bubbles:!0,composed:!0}))})}if(r.name===`duskmoon-receive`){let[e,t]=r.value.split(`;`);this.handleEvent(e,e=>{typeof this.el[t]==`function`&&this.el[t](e)})}}},_setupAutomaticForwarding(){let t=this.el.getAttribute(`phx-target`);e.forEach(e=>{let n=`phx-`+e.replace(`dm-`,``),r=this.el.getAttribute(n);if(r){let n=`_dm_listener_${e}`;this[n]&&this.el.removeEventListener(e,this[n]),this[n]=e=>{let n={...e.detail||{},value:this.el.value,name:this.el.name,checked:this.el.checked};t?this.pushEventTo(t,r,n):this.pushEvent(r,n)},this.el.addEventListener(e,this[n])}})}},r={...n,mounted(){n.mounted.call(this),this._setupFormIntegration()},_setupFormIntegration(){let e=this.el.getAttribute(`name`),t=this.el.getAttribute(`phx-feedback-for`)||e;t&&this._setupFeedbackObserver(t)},destroyed(){n.destroyed.call(this),this._feedbackObserver&&(this._feedbackObserver.disconnect(),this._feedbackObserver=null)},_setupFeedbackObserver(e){let t=this.el.closest(`form`);t&&(this._feedbackObserver=new MutationObserver(n=>{n.forEach(n=>{if(n.attributeName===`class`){let n=t.classList.contains(`phx-no-feedback`);this.el.dispatchEvent(new CustomEvent(`dm-feedback-change`,{detail:{showFeedback:!n,field:e}}))}})}),this._feedbackObserver.observe(t,{attributes:!0,attributeFilter:[`class`]}))}};function i(e){let t=e.composedPath?.()??[],n=t.find(e=>e.matches?.(`[data-dm-confirm-action="true"]`)),r=t.find(e=>e.matches?.(`dialog[data-dm-confirm-dialog="true"]`));n&&r?.open&&r.close()}function a(e=globalThis.document){!e?.addEventListener||e[t]||(e.addEventListener(`click`,i,!0),e[t]=i)}a(),typeof window<`u`&&(window.__WebComponentHook__=n,window.__FormElementHook__=r);export{r as FormElementHook,n as WebComponentHook,i as handleDialogConfirmClick,a as installDialogBehavior};
@@ -1 +1 @@
1
- const e=[`dm-click`,`dm-change`,`dm-input`,`dm-focus`,`dm-blur`,`dm-submit`,`dm-select`,`dm-close`,`dm-open`,`dm-toggle`],t=Symbol.for(`phoenix-duskmoon.copy-listener`),n=Symbol.for(`phoenix-duskmoon.dialog-behavior-listeners`),r=new WeakMap,i={mounted(){this._sendListeners=[],this._setupEventBridging(),this._setupAutomaticForwarding()},updated(){this._setupAutomaticForwarding()},destroyed(){this._sendListeners&&(this._sendListeners.forEach(({event:e,listener:t})=>{this.el.removeEventListener(e,t)}),this._sendListeners=null),e.forEach(e=>{let t=`_dm_listener_${e}`;this[t]&&(this.el.removeEventListener(e,this[t]),this[t]=null)})},_setupEventBridging(){let e=this.el.attributes,t=this.el.getAttribute(`phx-target`),n=(e,n,r)=>{t?this.pushEventTo(t,e,n,r):this.pushEvent(e,n,r)};for(let t=0;t<e.length;t++){let r=e[t];if(/^duskmoon-send-/.test(r.name)){let e=r.name.replace(/^duskmoon-send-/,``),[t,i]=r.value.split(`;`),a=({detail:r})=>{n(t,r||{},t=>{i&&typeof this[i]==`function`&&this[i](t,r,e)})};this.el.addEventListener(e,a),this._sendListeners.push({event:e,listener:a})}if(/^duskmoon-receive-/.test(r.name)){let e=r.name.replace(/^duskmoon-receive-/,``),t=r.value;this.handleEvent(e,n=>{t&&typeof this.el[t]==`function`?this.el[t](n):this.el.dispatchEvent(new CustomEvent(e,{detail:n,bubbles:!0,composed:!0}))})}if(r.name===`duskmoon-receive`){let[e,t]=r.value.split(`;`);this.handleEvent(e,e=>{typeof this.el[t]==`function`&&this.el[t](e)})}}},_setupAutomaticForwarding(){let t=this.el.getAttribute(`phx-target`);e.forEach(e=>{let n=`phx-`+e.replace(`dm-`,``),r=this.el.getAttribute(n);if(r){let n=`_dm_listener_${e}`;this[n]&&this.el.removeEventListener(e,this[n]),this[n]=e=>{let n={...e.detail||{},value:this.el.value,name:this.el.name,checked:this.el.checked};t?this.pushEventTo(t,r,n):this.pushEvent(r,n)},this.el.addEventListener(e,this[n])}})}},a={...i,mounted(){i.mounted.call(this),this._setupFormIntegration()},_setupFormIntegration(){let e=this.el.getAttribute(`name`),t=this.el.getAttribute(`phx-feedback-for`)||e;t&&this._setupFeedbackObserver(t)},destroyed(){i.destroyed.call(this),this._feedbackObserver&&(this._feedbackObserver.disconnect(),this._feedbackObserver=null)},_setupFeedbackObserver(e){let t=this.el.closest(`form`);t&&(this._feedbackObserver=new MutationObserver(n=>{n.forEach(n=>{if(n.attributeName===`class`){let n=t.classList.contains(`phx-no-feedback`);this.el.dispatchEvent(new CustomEvent(`dm-feedback-change`,{detail:{showFeedback:!n,field:e}}))}})}),this._feedbackObserver.observe(t,{attributes:!0,attributeFilter:[`class`]}))}};async function o(e,t=globalThis){let n=t.navigator?.clipboard;if(typeof n?.writeText==`function`){await n.writeText(e);return}let r=t.document;if(!r?.body||typeof r.execCommand!=`function`)throw Error(`Clipboard API is unavailable`);let i=r.createElement(`textarea`),a=r.activeElement;i.value=e,i.setAttribute(`readonly`,``),i.style.position=`fixed`,i.style.opacity=`0`,r.body.appendChild(i);try{if(i.focus(),i.select(),!r.execCommand(`copy`))throw Error(`Clipboard copy command failed`)}finally{r.body.removeChild(i),a?.focus?.()}}function s(e){let t=e.nextElementSibling;return t?.matches?.(`[data-copy-status]`)?t:e.parentElement?.querySelector?.(`[data-copy-status]`)??null}function c(e,t,n,i){let a=e.querySelector?.(`[data-copy-label]`),o=s(e),c=r.get(e),l=i.cancelReset??globalThis.clearTimeout,u=i.scheduleReset??globalThis.setTimeout;c?.timer!==void 0&&l(c.timer);let d=c?.originalLabel??a?.textContent??`Copy`;a&&(a.textContent=t),o&&(o.textContent=t),e.dataset.copyState=n;let f=u(()=>{a&&(a.textContent=d),o&&(o.textContent=``),delete e.dataset.copyState,r.delete(e)},2e3);r.set(e,{originalLabel:d,timer:f})}async function l(e,t={}){let n=e.target?.closest?.(`[data-copy-value]`);if(!n||n.disabled||n.getAttribute?.(`aria-disabled`)===`true`)return;let r=t.copy??o;try{await r(n.dataset.copyValue),c(n,n.dataset.copySuccess??`Copied`,`success`,t)}catch{c(n,n.dataset.copyFailure??`Copy failed`,`error`,t)}}function u(e=globalThis.document,n={}){if(!e?.addEventListener||e[t])return;let r=e=>l(e,n);e.addEventListener(`click`,r),e[t]=r}function d(e){let t=e.composedPath?.()??[],n=t.find(e=>e.matches?.(`[data-dm-confirm-action="true"]`)),r=t.find(e=>e.matches?.(`dialog[data-dm-confirm-dialog="true"]`));n&&r?.open&&r.close()}function f(e=globalThis.document){!e?.addEventListener||e[n]||(e.addEventListener(`click`,d,!0),e[n]=d)}u(),f(),typeof window<`u`&&(window.__WebComponentHook__=i,window.__FormElementHook__=a);export{a as FormElementHook,i as WebComponentHook,o as copyTextToClipboard,l as handleClipboardClick,d as handleDialogConfirmClick,u as installClipboardBehavior,f as installDialogBehavior};
1
+ const e=[`dm-click`,`dm-change`,`dm-input`,`dm-focus`,`dm-blur`,`dm-submit`,`dm-select`,`dm-close`,`dm-open`,`dm-toggle`],t=Symbol.for(`phoenix-duskmoon.dialog-behavior-listeners`),n={mounted(){this._sendListeners=[],this._setupEventBridging(),this._setupAutomaticForwarding()},updated(){this._setupAutomaticForwarding()},destroyed(){this._sendListeners&&(this._sendListeners.forEach(({event:e,listener:t})=>{this.el.removeEventListener(e,t)}),this._sendListeners=null),e.forEach(e=>{let t=`_dm_listener_${e}`;this[t]&&(this.el.removeEventListener(e,this[t]),this[t]=null)})},_setupEventBridging(){let e=this.el.attributes,t=this.el.getAttribute(`phx-target`),n=(e,n,r)=>{t?this.pushEventTo(t,e,n,r):this.pushEvent(e,n,r)};for(let t=0;t<e.length;t++){let r=e[t];if(/^duskmoon-send-/.test(r.name)){let e=r.name.replace(/^duskmoon-send-/,``),[t,i]=r.value.split(`;`),a=({detail:r})=>{n(t,r||{},t=>{i&&typeof this[i]==`function`&&this[i](t,r,e)})};this.el.addEventListener(e,a),this._sendListeners.push({event:e,listener:a})}if(/^duskmoon-receive-/.test(r.name)){let e=r.name.replace(/^duskmoon-receive-/,``),t=r.value;this.handleEvent(e,n=>{t&&typeof this.el[t]==`function`?this.el[t](n):this.el.dispatchEvent(new CustomEvent(e,{detail:n,bubbles:!0,composed:!0}))})}if(r.name===`duskmoon-receive`){let[e,t]=r.value.split(`;`);this.handleEvent(e,e=>{typeof this.el[t]==`function`&&this.el[t](e)})}}},_setupAutomaticForwarding(){let t=this.el.getAttribute(`phx-target`);e.forEach(e=>{let n=`phx-`+e.replace(`dm-`,``),r=this.el.getAttribute(n);if(r){let n=`_dm_listener_${e}`;this[n]&&this.el.removeEventListener(e,this[n]),this[n]=e=>{let n={...e.detail||{},value:this.el.value,name:this.el.name,checked:this.el.checked};t?this.pushEventTo(t,r,n):this.pushEvent(r,n)},this.el.addEventListener(e,this[n])}})}},r={...n,mounted(){n.mounted.call(this),this._setupFormIntegration()},_setupFormIntegration(){let e=this.el.getAttribute(`name`),t=this.el.getAttribute(`phx-feedback-for`)||e;t&&this._setupFeedbackObserver(t)},destroyed(){n.destroyed.call(this),this._feedbackObserver&&(this._feedbackObserver.disconnect(),this._feedbackObserver=null)},_setupFeedbackObserver(e){let t=this.el.closest(`form`);t&&(this._feedbackObserver=new MutationObserver(n=>{n.forEach(n=>{if(n.attributeName===`class`){let n=t.classList.contains(`phx-no-feedback`);this.el.dispatchEvent(new CustomEvent(`dm-feedback-change`,{detail:{showFeedback:!n,field:e}}))}})}),this._feedbackObserver.observe(t,{attributes:!0,attributeFilter:[`class`]}))}};function i(e){let t=e.composedPath?.()??[],n=t.find(e=>e.matches?.(`[data-dm-confirm-action="true"]`)),r=t.find(e=>e.matches?.(`dialog[data-dm-confirm-dialog="true"]`));n&&r?.open&&r.close()}function a(e=globalThis.document){!e?.addEventListener||e[t]||(e.addEventListener(`click`,i,!0),e[t]=i)}a(),typeof window<`u`&&(window.__WebComponentHook__=n,window.__FormElementHook__=r);export{r as FormElementHook,n as WebComponentHook,i as handleDialogConfirmClick,a as installDialogBehavior};
@@ -0,0 +1,6 @@
1
+ {
2
+ "!comment!":"This file was auto-generated by `mix phx.digest`. Remove it and all generated artefacts with `mix phx.digest.clean --all`",
3
+ "version":1,
4
+ "latest":{"assets/css/app.css":"assets/css/app-49d183cdbcc6cccb6e9eadbec4fff01c.css","assets/css/manifest.json":"assets/css/manifest-771fd8eaae673c76a85c29e7b1106af0.json","assets/js/manifest.json":"assets/js/manifest-b1cb13d0ed943a03c54da6dd727c4ea5.json","assets/js/phoenix_duskmoon.js":"assets/js/phoenix_duskmoon-1d3f4951080405842d72f20baa38d4e9.js"},
5
+ "digests":{"assets/css/app-49d183cdbcc6cccb6e9eadbec4fff01c.css":{"size":796141,"sha512":"lv4URo+6Ap3QtJW1LVWmcU0eJjpB22falsF3U18HI5fa4NlA6E81TG2oCu1+9CaII+DEHkAwSSY0w84DGQrFTg==","mtime":63959172060,"digest":"49d183cdbcc6cccb6e9eadbec4fff01c","logical_path":"assets/css/app.css"},"assets/css/manifest-771fd8eaae673c76a85c29e7b1106af0.json":{"size":100,"sha512":"MNvnqDa/IgJZPGOqVMw/HbfH7xdXVKmJCtAxN2+C/85JfkoFIhxgJ/V+gUJcvHhBnBVTB1M9fU87FJzyAXPhyQ==","mtime":63959172060,"digest":"771fd8eaae673c76a85c29e7b1106af0","logical_path":"assets/css/manifest.json"},"assets/js/manifest-b1cb13d0ed943a03c54da6dd727c4ea5.json":{"size":184,"sha512":"BTfsrl88Ai6yWI57UhqJvF3SqXrV1dN60XQFdeHHv+kTdGuYz5jp6xBcK9STo9jdaW9JPVGAI8BjAImgxkGJdw==","mtime":63959172060,"digest":"b1cb13d0ed943a03c54da6dd727c4ea5","logical_path":"assets/js/manifest.json"},"assets/js/phoenix_duskmoon-1d3f4951080405842d72f20baa38d4e9.js":{"size":3005,"sha512":"YHfZAjNyxI37EHOVAYMaZPkKSxyBrCH4KZUb67lMYzAuv/XKzLlirAuehC30Z38zirmxoHfIE88UXePi/yjgtA==","mtime":63959172060,"digest":"1d3f4951080405842d72f20baa38d4e9","logical_path":"assets/js/phoenix_duskmoon.js"}}
6
+ }