turbo_reflex 0.0.14 → 0.0.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -1
- data/README.md +1 -1
- data/app/assets/builds/turbo_reflex.js +1 -1
- data/app/assets/builds/turbo_reflex.js.map +2 -2
- data/app/javascript/state/index.js +7 -2
- data/lib/turbo_reflex/version.rb +1 -1
- data/package.json +1 -1
- data/tags +33 -33
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c905291f587468ae7cc5085377b24bb801a9f08eb9c5e0bc80cb4c7904cf8c18
|
4
|
+
data.tar.gz: a74ae6feef512cfc8102f34112ad4b3a52fea89658d5f133617477f3caca8ffa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dbc5e406ecc20322b2c40889d0509d263cd6bdb0d52d9403c28a1bd20099de5dd2f05d0a80861725996f03abb10362c3c0345f20a26af1b8ae4fcbf8f0b956e0
|
7
|
+
data.tar.gz: 42ffe84928f3dcfa5047dea39e58ec1277b5eafe2462949cc52cc97316d9b66aa1bf636ef38d5f9210b87de0b8c651dbc74e02ce0fa956ba34e0d4a86186909b
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
turbo_reflex (0.0.
|
4
|
+
turbo_reflex (0.0.15)
|
5
5
|
rails (>= 6.1)
|
6
6
|
turbo-rails (>= 1.1)
|
7
7
|
turbo_ready (>= 0.1)
|
@@ -222,6 +222,7 @@ GEM
|
|
222
222
|
actionpack (>= 5.2)
|
223
223
|
activesupport (>= 5.2)
|
224
224
|
sprockets (>= 3.0.0)
|
225
|
+
sqlite3 (1.5.3-aarch64-linux)
|
225
226
|
sqlite3 (1.5.3-arm64-darwin)
|
226
227
|
standard (1.16.1)
|
227
228
|
rubocop (= 1.35.1)
|
data/README.md
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
</h1>
|
9
9
|
<p align="center">
|
10
10
|
<a href="http://blog.codinghorror.com/the-best-code-is-no-code-at-all/">
|
11
|
-
<img alt="Lines of Code" src="https://img.shields.io/badge/loc-
|
11
|
+
<img alt="Lines of Code" src="https://img.shields.io/badge/loc-1120-47d299.svg" />
|
12
12
|
</a>
|
13
13
|
<a href="https://codeclimate.com/github/hopsoft/turbo_reflex/maintainability">
|
14
14
|
<img src="https://api.codeclimate.com/v1/badges/fe1162a742fe83a4fdfd/maintainability" />
|
@@ -1,2 +1,2 @@
|
|
1
|
-
var
|
1
|
+
var O=class{get element(){return document.querySelector('meta[name="turbo-reflex"]')}get token(){return this.element.getAttribute("content")}get busy(){return this.element.dataset.busy==="true"}set busy(t){return this.element.dataset.busy=!!t}},s=new O;var d={start:"turbo-reflex:start",success:"turbo-reflex:success",finish:"turbo-reflex:finish",abort:"turbo-reflex:abort",clientError:"turbo-reflex:client-error",serverError:"turbo-reflex:server-error"},f={beforeStateChange:"turbo-reflex:before-state-change",stateChange:"turbo-reflex:state-change"},l={...d,...f};function a(e,t=document,r={},n=!1){try{t=t||document;let o=new CustomEvent(e,{detail:r,cancelable:!1,bubbles:!0});t.dispatchEvent(o)}catch(o){if(n)throw o;a(d.clientError,t,{error:o,...r},!0)}}var x;function g(e,t=null){if(!e||typeof e!="object")return e;let r=new Proxy(e,{deleteProperty(n,o){return a(f.beforeStateChange,s.element,{state:x}),delete n[o],a(f.stateChange,s.element,{state:x}),!0},set(n,o,L,me){return a(f.beforeStateChange,s.element,{state:x}),n[o]=g(L,this),a(f.stateChange,s.element,{state:x}),!0}});if(Array.isArray(e))e.forEach((n,o)=>e[o]=g(n,r));else if(typeof e=="object")for(let[n,o]of Object.entries(e))e[n]=g(o,r);return t||(x=r),r}var H=g;var C,p,R,E;function w(){let e=atob(s.element.dataset.state);R={},C=p=H(JSON.parse(e))}function y(){E&&E.disconnect(),E=new MutationObserver(w),E.observe(s.element,{attributes:!0,attributeFilter:["data-state"]})}s.element?(w(),y()):(addEventListener("DOMContentLoaded",w),addEventListener("DOMContentLoaded",y));addEventListener("turbo:load",y);addEventListener("turbo:frame-load",y);addEventListener(f.beforeStateChange,e=>C=JSON.parse(JSON.stringify(p)));addEventListener(f.stateChange,e=>{R={};for(let[t,r]of Object.entries(p))C[t]!==r&&(R[t]=r);s.element.dataset.state=btoa(JSON.stringify(p))});var k={events:f,get payloadChunks(){return btoa(JSON.stringify(R)).match(/.{1,2000}/g)}};function V(e){let t="<html",r="</html",n=e.indexOf(t),o=e.lastIndexOf(r);if(n>=0&&o>=0){let L=e.slice(e.indexOf(">",n)+1,o);document.documentElement.innerHTML=L}}function B(e){document.body.insertAdjacentHTML("beforeend",e)}var m={append:B,replaceDocument:V};var A={};function G(e){A[e.id]=e}function z(e){delete A[e]}var T={add:G,remove:z,get reflexes(){return[...Object.values(A)]},get length(){return Object.keys(A).length}};function X(e){e.detail.endedAt=new Date().getTime(),e.detail.milliseconds=e.detail.endedAt-e.detail.startedAt,setTimeout(()=>a(d.finish,e.target,e.detail),20)}addEventListener(d.serverError,X);addEventListener(d.success,X);addEventListener(d.finish,e=>T.remove(e.detail.id),!0);var u={events:d};var D={};addEventListener("turbo:before-fetch-request",e=>{let t=e.target.closest("turbo-frame"),{fetchOptions:r}=e.detail;if(s.busy){let n=["text/vnd.turbo-reflex.html",r.headers.Accept];n=n.filter(o=>o&&o.trim().length>0).join(", "),r.headers.Accept=n,r.headers["TurboReflex-Token"]=s.token}k.payloadChunks.forEach((n,o)=>r.headers[`TurboReflex-State-${o.toString().padStart(4,"0")}`]=n)});addEventListener("turbo:before-fetch-response",e=>{let t=e.target.closest("turbo-frame"),{fetchResponse:r}=e.detail;if(t&&(D[t.id]=t.src),r.header("TurboReflex")){if(r.statusCode<200||r.statusCode>399){let n=`Server returned a ${r.statusCode} status code! TurboReflex requires 2XX-3XX status codes.`;a(u.events.clientError,document,{...e.detail,error:n},!0)}r.header("TurboReflex")==="Append"&&(e.preventDefault(),r.responseText.then(n=>m.append(n)))}});addEventListener("turbo:frame-load",e=>{let t=e.target.closest("turbo-frame");t.dataset.turboReflexSrc=D[t.id]||t.src||t.dataset.turboReflexSrc,delete D[t.id]});var K={frameAttribute:"data-turbo-frame",methodAttribute:"data-turbo-method",reflexAttribute:"data-turbo-reflex"},i={...K};var S={},F;function Q(e,t){S[e]=t,document.addEventListener(e,F,!0)}function W(e){return Object.keys(S).find(t=>!!S[t].find(r=>Array.from(document.querySelectorAll(r)).find(n=>n===e)))}function Y(e,t){return e===W(t)}var c={events:S,register:Q,isRegisteredForElement:Y,set handler(e){F=e}};function Z(e){return e.closest(`[${i.reflexAttribute}]`)}function ee(e){return e.closest("turbo-frame")}function te(e,t={}){if(e.tagName.toLowerCase()!=="select")return t.value=e.value||null;if(!e.multiple)return t.value=e.options[e.selectedIndex].value;t.values=Array.from(e.options).reduce((r,n)=>(n.selected&&r.push(n.value),r),[])}function re(e){let t=Array.from(e.attributes).reduce((r,n)=>{let o=n.value;return r[n.name]=o,r},{});return t.tag=e.tagName,t.checked=!!e.checked,t.disabled=!!e.disabled,te(e,t),delete t.class,delete t.action,delete t.href,delete t[i.reflexAttribute],delete t[i.frameAttribute],t}var v={buildAttributePayload:re,findClosestReflex:Z,findClosestFrame:ee};function ne(e,t={}){t.token=s.token;let r=document.createElement("input");r.type="hidden",r.name="turbo_reflex",r.value=JSON.stringify(t),e.appendChild(r)}var I={invokeReflex:ne};function oe(e,t={}){let r=document.createElement("a");r.href=e;let n=new URL(r);return n.searchParams.set("turbo_reflex",JSON.stringify(t)),n}var b={build:oe};function se(e,t){let r=t.src;t={...t},delete t.src,e.src=b.build(r,t)}var N={invokeReflex:se};function ae(e,t={}){let r=t.src;t={...t},delete t.src,delete t.href,e.setAttribute("href",b.build(r,t))}var J={invokeReflex:ae};function ie(e){let t=e.target;a(u.events.abort,document,{xhr:t,...e.detail})}function $(e){let t=e.target;t.getResponseHeader("TurboReflex")==="Append"?m.append(t.responseText):m.replaceDocument(t.responseText);let r=`Server returned a ${t.status} status code! TurboReflex requires 2XX-3XX status codes.`;a(u.events.clientError,document,{xhr:t,...e.detail,error:r},!0)}function fe(e){let t=e.target;if(t.status<200||t.status>399)return $(e);let r=t.responseText;t.getResponseHeader("TurboReflex")==="Append"?m.append(t.responseText):m.replaceDocument(t.responseText)}function le(e){let t=e.src;e={...e},delete e.src;try{let r=new XMLHttpRequest;r.open("GET",b.build(t,e),!0),r.setRequestHeader("Accept","text/vnd.turbo-reflex.html, text/html, application/xhtml+xml"),r.setRequestHeader("TurboReflex-Token",s.token),k.payloadChunks.forEach((n,o)=>r.setRequestHeader(`TurboReflex-State-${o.toString().padStart(4,"0")}`,n)),r.addEventListener("abort",ie),r.addEventListener("error",$),r.addEventListener("load",fe),r.send()}catch(r){let n=`Unexpected error sending HTTP request! ${r.message}`;$(r,{detail:{message:n}})}}var P={invokeReflex:le};function q(e,t){return t=t||{dataset:{}},e.href||t.src||t.dataset.turboReflexSrc||location.href}function ue(e){let t=v.findClosestFrame(e),{turboFrame:r,turboMethod:n}=e.dataset;return e.tagName.toLowerCase()==="form"?{name:"form",reason:"Element is a form.",frame:t,src:e.action,invokeReflex:I.invokeReflex}:n&&n.length>0?{name:"method",reason:"Element defines data-turbo-method.",frame:t,src:e.href,invokeReflex:J.invokeReflex}:r&&r!=="_self"?(t=document.getElementById(r),{name:"frame",reason:"element targets a frame that is not _self",frame:t,src:q(e,t),invokeReflex:N.invokeReflex}):(!r||r==="_self")&&t?{name:"frame",reason:"element does NOT target a frame or targets _self and is contained by a frame",frame:t,src:q(e,t),invokeReflex:N.invokeReflex}:{name:"window",reason:"element matches one or more of the following conditions (targets _top, does NOT target a frame, is NOT contained by a frame)",frame:null,src:q(e),invokeReflex:P.invokeReflex}}var _={find:ue};var h="unknown",j={debug:Object.values(l),info:Object.values(l),warn:[l.abort,l.clientError,l.serverError],error:[l.clientError,l.serverError],unknown:[]};Object.values(l).forEach(e=>{addEventListener(e,t=>{j[h].includes(t.type)&&console[h==="debug"?"log":h](t.type,t.detail)})});var M={get level(){return h},set level(e){return Object.keys(j).includes(e)||(e="unknown"),h=e}};function de(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,e=>(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16))}var U={v4:de};function ce(e){let t,r={};try{if(t=v.findClosestReflex(e.target),!t||!c.isRegisteredForElement(e.type,t))return;let n=_.find(t);switch(r={id:`reflex-${U.v4()}`,name:t.dataset.turboReflex,driver:n.name,src:n.src,frameId:n.frame?n.frame.id:null,elementId:t.id.length>0?t.id:null,elementAttributes:v.buildAttributePayload(t),startedAt:new Date().getTime()},T.add(r),a(u.events.start,t,r),["frame","window"].includes(n.name)&&e.preventDefault(),s.busy=!0,setTimeout(()=>s.busy=!1,10),n.name){case"method":return n.invokeReflex(t,r);case"form":return n.invokeReflex(t,r);case"frame":return n.invokeReflex(n.frame,r);case"window":return n.invokeReflex(r)}}catch(n){a(u.events.clientError,t,{error:n,...r})}}c.handler=ce;c.register("change",[`input[${i.reflexAttribute}]`,`select[${i.reflexAttribute}]`,`textarea[${i.reflexAttribute}]`]);c.register("submit",[`form[${i.reflexAttribute}]`]);c.register("click",[`[${i.reflexAttribute}]`]);var yt=self.TurboReflex={logger:M,schema:i,registerEventDelegate:c.register,get eventDelegates(){return{...c.events}},get lifecycleEvents(){return[...Object.values(u.events)]},get state(){return p}};export{yt as default};
|
2
2
|
//# sourceMappingURL=turbo_reflex.js.map
|
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../javascript/meta.js", "../../javascript/events.js", "../../javascript/state/observable.js", "../../javascript/state/index.js", "../../javascript/renderer.js", "../../javascript/activity.js", "../../javascript/lifecycle.js", "../../javascript/turbo.js", "../../javascript/schema.js", "../../javascript/delegates.js", "../../javascript/elements.js", "../../javascript/drivers/form.js", "../../javascript/urls.js", "../../javascript/drivers/frame.js", "../../javascript/drivers/method.js", "../../javascript/drivers/window.js", "../../javascript/drivers/index.js", "../../javascript/logger.js", "../../javascript/uuids.js", "../../javascript/index.js"],
|
4
|
-
"sourcesContent": ["class Meta {\n get element () {\n return document.querySelector('meta[name=\"turbo-reflex\"]')\n }\n\n get token () {\n return this.element.getAttribute('content')\n }\n\n get busy () {\n return this.element.dataset.busy === 'true'\n }\n\n set busy (value) {\n return (this.element.dataset.busy = !!value)\n }\n}\n\nexport default new Meta()\n", "export const lifecycleEvents = {\n start: 'turbo-reflex:start',\n success: 'turbo-reflex:success',\n finish: 'turbo-reflex:finish',\n abort: 'turbo-reflex:abort',\n clientError: 'turbo-reflex:client-error',\n serverError: 'turbo-reflex:server-error'\n}\n\nexport const stateEvents = {\n beforeStateChange: 'turbo-reflex:before-state-change',\n stateChange: 'turbo-reflex:state-change'\n}\n\nexport const allEvents = { ...lifecycleEvents, ...stateEvents }\n\nexport function dispatch (name, target = document, detail = {}, raise = false) {\n try {\n target = target || document\n const event = new CustomEvent(name, {\n detail,\n cancelable: false,\n bubbles: true\n })\n target.dispatchEvent(event)\n } catch (error) {\n if (raise) throw error\n dispatch(lifecycleEvents.clientError, target, { error, ...detail }, true)\n }\n}\n", "import meta from '../meta'\nimport { dispatch, stateEvents as events } from '../events'\n\nlet head\n\nfunction observable (object, parent = null) {\n if (!object || typeof object !== 'object') return object\n\n const proxy = new Proxy(object, {\n deleteProperty (target, key) {\n dispatch(events.beforeStateChange, meta.element, { state: head })\n delete target[key]\n dispatch(events.stateChange, meta.element, { state: head })\n return true\n },\n\n set (target, key, value, receiver) {\n dispatch(events.beforeStateChange, meta.element, { state: head })\n target[key] = observable(value, this)\n dispatch(events.stateChange, meta.element, { state: head })\n return true\n }\n })\n\n if (Array.isArray(object)) {\n object.forEach((value, index) => (object[index] = observable(value, proxy)))\n } else if (typeof object === 'object') {\n for (const [key, value] of Object.entries(object))\n object[key] = observable(value, proxy)\n }\n\n if (!parent) head = proxy\n return proxy\n}\n\nexport default observable\n", "import meta from '../meta'\nimport observable from './observable'\nimport { stateEvents as events } from '../events'\n\nlet oldState, state, changedState\nlet observer\n\nfunction loadState () {\n const json = atob(meta.element.dataset.state)\n changedState = {}\n oldState = state = observable(JSON.parse(json))\n}\n\nfunction initObserver () {\n if (observer) observer.disconnect()\n observer = new MutationObserver(loadState)\n observer.observe(meta.element, {\n attributes: true,\n attributeFilter: ['data-state']\n })\n}\n\nmeta.element ? loadState() : addEventListener('DOMContentLoaded', loadState)\naddEventListener('DOMContentLoaded', initObserver)\naddEventListener('turbo:load', initObserver)\naddEventListener('turbo:frame-load', initObserver)\n\naddEventListener(\n events.beforeStateChange,\n event => (oldState = JSON.parse(JSON.stringify(state)))\n)\n\naddEventListener(events.stateChange, event => {\n changedState = {}\n for (const [key, value] of Object.entries(state))\n if (oldState[key] !== value) changedState[key] = value\n meta.element.dataset.state = btoa(JSON.stringify(state))\n})\n\nexport { state }\nexport default {\n events,\n\n // The UI state changes are split into chunks and sent to the server in an HTTP request header.\n // Max size for an HTTP header is around 4k or 4,000 bytes.\n // A Base64 character is an 8-bit-padded ASCII character... or 1 byte\n //\n // SEE: lib/state.rb - for info on how `state` is serialized/deserialized\n get payloadChunks () {\n return btoa(JSON.stringify(changedState)).match(/.{1,2000}/g)\n }\n}\n", "function replaceDocument (content) {\n const head = '<html'\n const tail = '</html'\n const headIndex = content.indexOf(head)\n const tailIndex = content.lastIndexOf(tail)\n if (headIndex >= 0 && tailIndex >= 0) {\n const html = content.slice(content.indexOf('>', headIndex) + 1, tailIndex)\n document.documentElement.innerHTML = html\n }\n}\n\nfunction append (content) {\n document.body.insertAdjacentHTML('beforeend', content)\n}\n\nexport default { append, replaceDocument }\n", "const active = {}\n\nfunction add (payload) {\n active[payload.id] = payload\n}\n\nfunction remove (id) {\n delete active[id]\n}\n\nexport default {\n add,\n remove,\n get reflexes () {\n return [...Object.values(active)]\n },\n get length () {\n return Object.keys(active).length\n }\n}\n", "import activity from './activity'\nimport { dispatch, lifecycleEvents as events } from './events'\n\nfunction finish (event) {\n event.detail.endedAt = new Date().getTime()\n event.detail.milliseconds = event.detail.endedAt - event.detail.startedAt\n setTimeout(() => dispatch(events.finish, event.target, event.detail), 20)\n}\n\naddEventListener(events.serverError, finish)\naddEventListener(events.success, finish)\naddEventListener(events.finish, event => activity.remove(event.detail.id), true)\n\nexport default { events }\n", "import meta from './meta'\nimport state from './state'\nimport renderer from './renderer'\nimport { dispatch } from './events'\nimport lifecycle from './lifecycle'\n\nconst frameSources = {}\n\n// fires before making a turbo HTTP request\naddEventListener('turbo:before-fetch-request', event => {\n const frame = event.target.closest('turbo-frame')\n const { fetchOptions } = event.detail\n\n // reflex invoked and busy\n if (meta.busy) {\n let acceptHeaders = [\n 'text/vnd.turbo-reflex.html',\n fetchOptions.headers['Accept']\n ]\n acceptHeaders = acceptHeaders\n .filter(entry => entry && entry.trim().length > 0)\n .join(', ')\n fetchOptions.headers['Accept'] = acceptHeaders\n fetchOptions.headers['TurboReflex-Token'] = meta.token\n }\n\n // always send state\n state.payloadChunks.forEach(\n (chunk, i) =>\n (fetchOptions.headers[\n `TurboReflex-State-${i.toString().padStart(4, '0')}`\n ] = chunk)\n )\n})\n\n// fires after receiving a turbo HTTP response\naddEventListener('turbo:before-fetch-response', event => {\n const frame = event.target.closest('turbo-frame')\n const { fetchResponse: response } = event.detail\n\n if (frame) frameSources[frame.id] = frame.src\n\n if (response.header('TurboReflex')) {\n if (response.statusCode < 200 || response.statusCode > 399) {\n const error = `Server returned a ${response.statusCode} status code! TurboReflex requires 2XX-3XX status codes.`\n dispatch(\n lifecycle.events.clientError,\n document,\n { ...event.detail, error },\n true\n )\n }\n\n if (response.header('TurboReflex') === 'Append') {\n event.preventDefault()\n response.responseText.then(content => renderer.append(content))\n }\n }\n})\n\n// fires when a frame element is navigated and finishes loading\naddEventListener('turbo:frame-load', event => {\n const frame = event.target.closest('turbo-frame')\n frame.dataset.turboReflexSrc =\n frameSources[frame.id] || frame.src || frame.dataset.turboReflexSrc\n delete frameSources[frame.id]\n})\n", "const schema = {\n frameAttribute: 'data-turbo-frame',\n methodAttribute: 'data-turbo-method',\n reflexAttribute: 'data-turbo-reflex'\n}\n\nexport default { ...schema }\n", "const events = {}\nlet eventListener\n\nfunction register (eventName, selectors) {\n events[eventName] = selectors\n document.addEventListener(eventName, eventListener, true)\n}\n\nfunction getRegisteredEventNameForElement (element) {\n return Object.keys(events).find(eventName => {\n return !!events[eventName].find(selector =>\n Array.from(document.querySelectorAll(selector)).find(el => el === element)\n )\n })\n}\n\nfunction isRegisteredForElement (eventName, element) {\n return eventName === getRegisteredEventNameForElement(element)\n}\n\nexport default {\n events,\n register,\n isRegisteredForElement,\n set handler (fn) {\n eventListener = fn\n }\n}\n", "import schema from './schema'\nimport lifecycle from './lifecycle'\n\nfunction findClosestReflex (element) {\n return element.closest(`[${schema.reflexAttribute}]`)\n}\n\nfunction findClosestFrame (element) {\n return element.closest('turbo-frame')\n}\n\nfunction assignElementValueToPayload (element, payload = {}) {\n if (element.tagName.toLowerCase() !== 'select')\n return (payload.value = element.value || null)\n\n if (!element.multiple)\n return (payload.value = element.options[element.selectedIndex].value)\n\n payload.values = Array.from(element.options).reduce((memo, option) => {\n if (option.selected) memo.push(option.value)\n return memo\n }, [])\n}\n\nfunction buildAttributePayload (element) {\n const payload = Array.from(element.attributes).reduce((memo, attr) => {\n let value = attr.value\n memo[attr.name] = value\n return memo\n }, {})\n\n payload.tag = element.tagName\n payload.checked = !!element.checked\n payload.disabled = !!element.disabled\n assignElementValueToPayload(element, payload)\n\n // reduce payload size to keep URL length smaller\n delete payload.class\n delete payload.action\n delete payload.href\n delete payload[schema.reflexAttribute]\n delete payload[schema.frameAttribute]\n\n return payload\n}\n\nexport default {\n buildAttributePayload,\n findClosestReflex,\n findClosestFrame\n}\n", "import meta from '../meta'\n\nfunction invokeReflex (form, payload = {}) {\n payload.token = meta.token\n const input = document.createElement('input')\n input.type = 'hidden'\n input.name = 'turbo_reflex'\n input.value = JSON.stringify(payload)\n form.appendChild(input)\n}\n\nexport default { invokeReflex }\n", "function build (urlString, payload = {}) {\n const a = document.createElement('a')\n a.href = urlString\n const url = new URL(a)\n url.searchParams.set('turbo_reflex', JSON.stringify(payload))\n return url\n}\n\nexport default { build }\n", "import urls from '../urls'\n\nfunction invokeReflex (frame, payload) {\n const src = payload.src\n payload = { ...payload }\n delete payload.src\n frame.src = urls.build(src, payload)\n}\n\nexport default { invokeReflex }\n", "import urls from '../urls'\n\nfunction invokeReflex (element, payload = {}) {\n const src = payload.src\n payload = { ...payload }\n delete payload.src\n delete payload.href\n element.setAttribute('href', urls.build(src, payload))\n}\n\nexport default { invokeReflex }\n", "import meta from '../meta'\nimport state from '../state'\nimport { dispatch } from '../events'\nimport lifecycle from '../lifecycle'\nimport urls from '../urls'\nimport renderer from '../renderer'\n\nfunction aborted (event) {\n const xhr = event.target\n dispatch(lifecycle.events.abort, document, { xhr, ...event.detail })\n}\n\nfunction errored (event) {\n const xhr = event.target\n\n xhr.getResponseHeader('TurboReflex') === 'Append'\n ? renderer.append(xhr.responseText)\n : renderer.replaceDocument(xhr.responseText)\n\n const error = `Server returned a ${xhr.status} status code! TurboReflex requires 2XX-3XX status codes.`\n\n dispatch(\n lifecycle.events.clientError,\n document,\n { xhr, ...event.detail, error },\n true\n )\n}\n\nfunction loaded (event) {\n const xhr = event.target\n if (xhr.status < 200 || xhr.status > 399) return errored(event)\n const content = xhr.responseText\n xhr.getResponseHeader('TurboReflex') === 'Append'\n ? renderer.append(xhr.responseText)\n : renderer.replaceDocument(xhr.responseText)\n}\n\nfunction invokeReflex (payload) {\n const src = payload.src\n payload = { ...payload }\n delete payload.src\n\n try {\n const xhr = new XMLHttpRequest()\n xhr.open('GET', urls.build(src, payload), true)\n xhr.setRequestHeader(\n 'Accept',\n 'text/vnd.turbo-reflex.html, text/html, application/xhtml+xml'\n )\n xhr.setRequestHeader('TurboReflex-Token', meta.token)\n state.payloadChunks.forEach((chunk, i) =>\n xhr.setRequestHeader(\n `TurboReflex-State-${i.toString().padStart(4, '0')}`,\n chunk\n )\n )\n\n xhr.addEventListener('abort', aborted)\n xhr.addEventListener('error', errored)\n xhr.addEventListener('load', loaded)\n xhr.send()\n } catch (ex) {\n const message = `Unexpected error sending HTTP request! ${ex.message}`\n errored(ex, { detail: { message } })\n }\n}\n\nexport default { invokeReflex }\n", "import elements from '../elements'\nimport formDriver from './form'\nimport frameDriver from './frame'\nimport methodDriver from './method'\nimport windowDriver from './window'\n\nfunction src (element, frame) {\n frame = frame || { dataset: {} }\n return (\n element.href || frame.src || frame.dataset.turboReflexSrc || location.href\n )\n}\n\nfunction find (element) {\n let frame = elements.findClosestFrame(element)\n const { turboFrame, turboMethod } = element.dataset\n\n if (element.tagName.toLowerCase() === 'form')\n return {\n name: 'form',\n reason: 'Element is a form.',\n frame,\n src: element.action,\n invokeReflex: formDriver.invokeReflex\n }\n\n if (turboMethod && turboMethod.length > 0)\n return {\n name: 'method',\n reason: 'Element defines data-turbo-method.',\n frame,\n src: element.href,\n invokeReflex: methodDriver.invokeReflex\n }\n\n // element targets a frame that is not _self\n if (turboFrame && turboFrame !== '_self') {\n frame = document.getElementById(turboFrame)\n return {\n name: 'frame',\n reason: 'element targets a frame that is not _self',\n frame,\n src: src(element, frame),\n invokeReflex: frameDriver.invokeReflex\n }\n }\n\n // element does NOT target a frame or targets _self and is contained by a frame\n if ((!turboFrame || turboFrame === '_self') && frame)\n return {\n name: 'frame',\n reason:\n 'element does NOT target a frame or targets _self and is contained by a frame',\n frame,\n src: src(element, frame),\n invokeReflex: frameDriver.invokeReflex\n }\n\n // element matches one or more of the following conditions\n // - targets _top\n // - does NOT target a frame\n // - is NOT contained by a frame\n return {\n name: 'window',\n reason:\n 'element matches one or more of the following conditions (targets _top, does NOT target a frame, is NOT contained by a frame)',\n frame: null,\n src: src(element),\n invokeReflex: windowDriver.invokeReflex\n }\n}\n\nexport default { find }\n", "import { allEvents as events } from './events'\n\nlet currentLevel = 'unknown'\n\nconst logLevels = {\n debug: Object.values(events),\n info: Object.values(events),\n warn: [events.abort, events.clientError, events.serverError],\n error: [events.clientError, events.serverError],\n unknown: []\n}\n\nObject.values(events).forEach(name => {\n addEventListener(name, event => {\n if (logLevels[currentLevel].includes(event.type)) {\n const level = currentLevel === 'debug' ? 'log' : currentLevel\n console[level](event.type, event.detail)\n }\n })\n})\n\nexport default {\n get level () {\n return currentLevel\n },\n set level (value) {\n if (!Object.keys(logLevels).includes(value)) value = 'unknown'\n return (currentLevel = value)\n }\n}\n", "function v4 () {\n return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c =>\n (\n c ^\n (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))\n ).toString(16)\n )\n}\n\nexport default { v4 }\n", "import './turbo'\nimport schema from './schema'\nimport { dispatch } from './events'\nimport activity from './activity'\nimport delegates from './delegates'\nimport drivers from './drivers'\nimport meta from './meta'\nimport elements from './elements'\nimport lifecycle from './lifecycle'\nimport logger from './logger'\nimport { state } from './state'\nimport urls from './urls'\nimport uuids from './uuids'\n\nfunction invokeReflex (event) {\n let element\n let payload = {}\n\n try {\n element = elements.findClosestReflex(event.target)\n if (!element) return\n if (!delegates.isRegisteredForElement(event.type, element)) return\n\n const driver = drivers.find(element)\n\n // payload sent to server (also used for lifecycle event.detail)\n payload = {\n id: `reflex-${uuids.v4()}`,\n name: element.dataset.turboReflex,\n driver: driver.name,\n src: driver.src,\n frameId: driver.frame ? driver.frame.id : null,\n elementId: element.id.length > 0 ? element.id : null,\n elementAttributes: elements.buildAttributePayload(element),\n startedAt: new Date().getTime()\n }\n\n activity.add(payload)\n dispatch(lifecycle.events.start, element, payload)\n\n if (['frame', 'window'].includes(driver.name)) event.preventDefault()\n\n meta.busy = true\n setTimeout(() => (meta.busy = false), 10)\n\n switch (driver.name) {\n case 'method':\n return driver.invokeReflex(element, payload)\n case 'form':\n return driver.invokeReflex(element, payload)\n case 'frame':\n return driver.invokeReflex(driver.frame, payload)\n case 'window':\n return driver.invokeReflex(payload)\n }\n } catch (error) {\n dispatch(lifecycle.events.clientError, element, {\n error,\n ...payload\n })\n }\n}\n\n// wire things up and setup defaults for event delegation\ndelegates.handler = invokeReflex\ndelegates.register('change', [\n `input[${schema.reflexAttribute}]`,\n `select[${schema.reflexAttribute}]`,\n `textarea[${schema.reflexAttribute}]`\n])\n// delegates.register('mousedown', [\n// `[${schema.reflexAttribute}][${schema.methodAttribute}]`\n// ])\ndelegates.register('submit', [`form[${schema.reflexAttribute}]`])\ndelegates.register('click', [`[${schema.reflexAttribute}]`])\n\nexport default self.TurboReflex = {\n logger,\n schema,\n registerEventDelegate: delegates.register,\n get eventDelegates () {\n return { ...delegates.events }\n },\n get lifecycleEvents () {\n return [...Object.values(lifecycle.events)]\n },\n get state () {\n return state\n }\n}\n"],
|
5
|
-
"mappings": "AAAA,IAAMA,EAAN,KAAW,CACT,IAAI,SAAW,CACb,OAAO,SAAS,cAAc,2BAA2B,CAC3D,CAEA,IAAI,OAAS,CACX,OAAO,KAAK,QAAQ,aAAa,SAAS,CAC5C,CAEA,IAAI,MAAQ,CACV,OAAO,KAAK,QAAQ,QAAQ,OAAS,MACvC,CAEA,IAAI,KAAMC,EAAO,CACf,OAAQ,KAAK,QAAQ,QAAQ,KAAO,CAAC,CAACA,CACxC,CACF,EAEOC,EAAQ,IAAIF,EClBZ,IAAMG,EAAkB,CAC7B,MAAO,qBACP,QAAS,uBACT,OAAQ,sBACR,MAAO,qBACP,YAAa,4BACb,YAAa,2BACf,EAEaC,EAAc,CACzB,kBAAmB,mCACnB,YAAa,2BACf,EAEaC,EAAY,CAAE,GAAGF,EAAiB,GAAGC,CAAY,EAEvD,SAASE,EAAUC,EAAMC,EAAS,SAAUC,EAAS,CAAC,EAAGC,EAAQ,GAAO,CAC7E,GAAI,CACFF,EAASA,GAAU,SACnB,IAAMG,EAAQ,IAAI,YAAYJ,EAAM,CAClC,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CAAO,EAClD,IAAK,SACH,OAAOG,EAAO,aAAaH,CAAO,CACtC,CACF,OAASU,EAAP,CACAH,EAASC,EAAU,OAAO,YAAaT,EAAS,CAC9C,MAAAW,EACA,GAAGV,CACL,CAAC,CACH,CACF,CAGAE,EAAU,QAAUL,GACpBK,EAAU,SAAS,SAAU,CAC3B,SAASS,EAAO,mBAChB,UAAUA,EAAO,mBACjB,YAAYA,EAAO,kBACrB,CAAC,EAIDT,EAAU,SAAS,SAAU,CAAC,QAAQS,EAAO,kBAAkB,CAAC,EAChET,EAAU,SAAS,QAAS,CAAC,IAAIS,EAAO,kBAAkB,CAAC,EAE3D,IAAOC,GAAQ,KAAK,YAAc,CAChC,OAAAC,EACA,OAAAF,EACA,sBAAuBT,EAAU,SACjC,IAAI,gBAAkB,CACpB,MAAO,CAAE,GAAGA,EAAU,MAAO,CAC/B,EACA,IAAI,iBAAmB,CACrB,MAAO,CAAC,GAAG,OAAO,OAAOM,EAAU,MAAM,CAAC,CAC5C,EACA,IAAI,OAAS,CACX,OAAOM,CACT,CACF",
|
4
|
+
"sourcesContent": ["class Meta {\n get element () {\n return document.querySelector('meta[name=\"turbo-reflex\"]')\n }\n\n get token () {\n return this.element.getAttribute('content')\n }\n\n get busy () {\n return this.element.dataset.busy === 'true'\n }\n\n set busy (value) {\n return (this.element.dataset.busy = !!value)\n }\n}\n\nexport default new Meta()\n", "export const lifecycleEvents = {\n start: 'turbo-reflex:start',\n success: 'turbo-reflex:success',\n finish: 'turbo-reflex:finish',\n abort: 'turbo-reflex:abort',\n clientError: 'turbo-reflex:client-error',\n serverError: 'turbo-reflex:server-error'\n}\n\nexport const stateEvents = {\n beforeStateChange: 'turbo-reflex:before-state-change',\n stateChange: 'turbo-reflex:state-change'\n}\n\nexport const allEvents = { ...lifecycleEvents, ...stateEvents }\n\nexport function dispatch (name, target = document, detail = {}, raise = false) {\n try {\n target = target || document\n const event = new CustomEvent(name, {\n detail,\n cancelable: false,\n bubbles: true\n })\n target.dispatchEvent(event)\n } catch (error) {\n if (raise) throw error\n dispatch(lifecycleEvents.clientError, target, { error, ...detail }, true)\n }\n}\n", "import meta from '../meta'\nimport { dispatch, stateEvents as events } from '../events'\n\nlet head\n\nfunction observable (object, parent = null) {\n if (!object || typeof object !== 'object') return object\n\n const proxy = new Proxy(object, {\n deleteProperty (target, key) {\n dispatch(events.beforeStateChange, meta.element, { state: head })\n delete target[key]\n dispatch(events.stateChange, meta.element, { state: head })\n return true\n },\n\n set (target, key, value, receiver) {\n dispatch(events.beforeStateChange, meta.element, { state: head })\n target[key] = observable(value, this)\n dispatch(events.stateChange, meta.element, { state: head })\n return true\n }\n })\n\n if (Array.isArray(object)) {\n object.forEach((value, index) => (object[index] = observable(value, proxy)))\n } else if (typeof object === 'object') {\n for (const [key, value] of Object.entries(object))\n object[key] = observable(value, proxy)\n }\n\n if (!parent) head = proxy\n return proxy\n}\n\nexport default observable\n", "import meta from '../meta'\nimport observable from './observable'\nimport { stateEvents as events } from '../events'\n\nlet oldState, state, changedState\nlet observer\n\nfunction loadState () {\n const json = atob(meta.element.dataset.state)\n changedState = {}\n oldState = state = observable(JSON.parse(json))\n}\n\nfunction initObserver () {\n if (observer) observer.disconnect()\n observer = new MutationObserver(loadState)\n observer.observe(meta.element, {\n attributes: true,\n attributeFilter: ['data-state']\n })\n}\n\nif (meta.element) {\n loadState()\n initObserver()\n} else {\n addEventListener('DOMContentLoaded', loadState)\n addEventListener('DOMContentLoaded', initObserver)\n}\naddEventListener('turbo:load', initObserver)\naddEventListener('turbo:frame-load', initObserver)\n\naddEventListener(\n events.beforeStateChange,\n event => (oldState = JSON.parse(JSON.stringify(state)))\n)\n\naddEventListener(events.stateChange, event => {\n changedState = {}\n for (const [key, value] of Object.entries(state))\n if (oldState[key] !== value) changedState[key] = value\n meta.element.dataset.state = btoa(JSON.stringify(state))\n})\n\nexport { state }\nexport default {\n events,\n\n // The UI state changes are split into chunks and sent to the server in an HTTP request header.\n // Max size for an HTTP header is around 4k or 4,000 bytes.\n // A Base64 character is an 8-bit-padded ASCII character... or 1 byte\n //\n // SEE: lib/state.rb - for info on how `state` is serialized/deserialized\n get payloadChunks () {\n return btoa(JSON.stringify(changedState)).match(/.{1,2000}/g)\n }\n}\n", "function replaceDocument (content) {\n const head = '<html'\n const tail = '</html'\n const headIndex = content.indexOf(head)\n const tailIndex = content.lastIndexOf(tail)\n if (headIndex >= 0 && tailIndex >= 0) {\n const html = content.slice(content.indexOf('>', headIndex) + 1, tailIndex)\n document.documentElement.innerHTML = html\n }\n}\n\nfunction append (content) {\n document.body.insertAdjacentHTML('beforeend', content)\n}\n\nexport default { append, replaceDocument }\n", "const active = {}\n\nfunction add (payload) {\n active[payload.id] = payload\n}\n\nfunction remove (id) {\n delete active[id]\n}\n\nexport default {\n add,\n remove,\n get reflexes () {\n return [...Object.values(active)]\n },\n get length () {\n return Object.keys(active).length\n }\n}\n", "import activity from './activity'\nimport { dispatch, lifecycleEvents as events } from './events'\n\nfunction finish (event) {\n event.detail.endedAt = new Date().getTime()\n event.detail.milliseconds = event.detail.endedAt - event.detail.startedAt\n setTimeout(() => dispatch(events.finish, event.target, event.detail), 20)\n}\n\naddEventListener(events.serverError, finish)\naddEventListener(events.success, finish)\naddEventListener(events.finish, event => activity.remove(event.detail.id), true)\n\nexport default { events }\n", "import meta from './meta'\nimport state from './state'\nimport renderer from './renderer'\nimport { dispatch } from './events'\nimport lifecycle from './lifecycle'\n\nconst frameSources = {}\n\n// fires before making a turbo HTTP request\naddEventListener('turbo:before-fetch-request', event => {\n const frame = event.target.closest('turbo-frame')\n const { fetchOptions } = event.detail\n\n // reflex invoked and busy\n if (meta.busy) {\n let acceptHeaders = [\n 'text/vnd.turbo-reflex.html',\n fetchOptions.headers['Accept']\n ]\n acceptHeaders = acceptHeaders\n .filter(entry => entry && entry.trim().length > 0)\n .join(', ')\n fetchOptions.headers['Accept'] = acceptHeaders\n fetchOptions.headers['TurboReflex-Token'] = meta.token\n }\n\n // always send state\n state.payloadChunks.forEach(\n (chunk, i) =>\n (fetchOptions.headers[\n `TurboReflex-State-${i.toString().padStart(4, '0')}`\n ] = chunk)\n )\n})\n\n// fires after receiving a turbo HTTP response\naddEventListener('turbo:before-fetch-response', event => {\n const frame = event.target.closest('turbo-frame')\n const { fetchResponse: response } = event.detail\n\n if (frame) frameSources[frame.id] = frame.src\n\n if (response.header('TurboReflex')) {\n if (response.statusCode < 200 || response.statusCode > 399) {\n const error = `Server returned a ${response.statusCode} status code! TurboReflex requires 2XX-3XX status codes.`\n dispatch(\n lifecycle.events.clientError,\n document,\n { ...event.detail, error },\n true\n )\n }\n\n if (response.header('TurboReflex') === 'Append') {\n event.preventDefault()\n response.responseText.then(content => renderer.append(content))\n }\n }\n})\n\n// fires when a frame element is navigated and finishes loading\naddEventListener('turbo:frame-load', event => {\n const frame = event.target.closest('turbo-frame')\n frame.dataset.turboReflexSrc =\n frameSources[frame.id] || frame.src || frame.dataset.turboReflexSrc\n delete frameSources[frame.id]\n})\n", "const schema = {\n frameAttribute: 'data-turbo-frame',\n methodAttribute: 'data-turbo-method',\n reflexAttribute: 'data-turbo-reflex'\n}\n\nexport default { ...schema }\n", "const events = {}\nlet eventListener\n\nfunction register (eventName, selectors) {\n events[eventName] = selectors\n document.addEventListener(eventName, eventListener, true)\n}\n\nfunction getRegisteredEventNameForElement (element) {\n return Object.keys(events).find(eventName => {\n return !!events[eventName].find(selector =>\n Array.from(document.querySelectorAll(selector)).find(el => el === element)\n )\n })\n}\n\nfunction isRegisteredForElement (eventName, element) {\n return eventName === getRegisteredEventNameForElement(element)\n}\n\nexport default {\n events,\n register,\n isRegisteredForElement,\n set handler (fn) {\n eventListener = fn\n }\n}\n", "import schema from './schema'\nimport lifecycle from './lifecycle'\n\nfunction findClosestReflex (element) {\n return element.closest(`[${schema.reflexAttribute}]`)\n}\n\nfunction findClosestFrame (element) {\n return element.closest('turbo-frame')\n}\n\nfunction assignElementValueToPayload (element, payload = {}) {\n if (element.tagName.toLowerCase() !== 'select')\n return (payload.value = element.value || null)\n\n if (!element.multiple)\n return (payload.value = element.options[element.selectedIndex].value)\n\n payload.values = Array.from(element.options).reduce((memo, option) => {\n if (option.selected) memo.push(option.value)\n return memo\n }, [])\n}\n\nfunction buildAttributePayload (element) {\n const payload = Array.from(element.attributes).reduce((memo, attr) => {\n let value = attr.value\n memo[attr.name] = value\n return memo\n }, {})\n\n payload.tag = element.tagName\n payload.checked = !!element.checked\n payload.disabled = !!element.disabled\n assignElementValueToPayload(element, payload)\n\n // reduce payload size to keep URL length smaller\n delete payload.class\n delete payload.action\n delete payload.href\n delete payload[schema.reflexAttribute]\n delete payload[schema.frameAttribute]\n\n return payload\n}\n\nexport default {\n buildAttributePayload,\n findClosestReflex,\n findClosestFrame\n}\n", "import meta from '../meta'\n\nfunction invokeReflex (form, payload = {}) {\n payload.token = meta.token\n const input = document.createElement('input')\n input.type = 'hidden'\n input.name = 'turbo_reflex'\n input.value = JSON.stringify(payload)\n form.appendChild(input)\n}\n\nexport default { invokeReflex }\n", "function build (urlString, payload = {}) {\n const a = document.createElement('a')\n a.href = urlString\n const url = new URL(a)\n url.searchParams.set('turbo_reflex', JSON.stringify(payload))\n return url\n}\n\nexport default { build }\n", "import urls from '../urls'\n\nfunction invokeReflex (frame, payload) {\n const src = payload.src\n payload = { ...payload }\n delete payload.src\n frame.src = urls.build(src, payload)\n}\n\nexport default { invokeReflex }\n", "import urls from '../urls'\n\nfunction invokeReflex (element, payload = {}) {\n const src = payload.src\n payload = { ...payload }\n delete payload.src\n delete payload.href\n element.setAttribute('href', urls.build(src, payload))\n}\n\nexport default { invokeReflex }\n", "import meta from '../meta'\nimport state from '../state'\nimport { dispatch } from '../events'\nimport lifecycle from '../lifecycle'\nimport urls from '../urls'\nimport renderer from '../renderer'\n\nfunction aborted (event) {\n const xhr = event.target\n dispatch(lifecycle.events.abort, document, { xhr, ...event.detail })\n}\n\nfunction errored (event) {\n const xhr = event.target\n\n xhr.getResponseHeader('TurboReflex') === 'Append'\n ? renderer.append(xhr.responseText)\n : renderer.replaceDocument(xhr.responseText)\n\n const error = `Server returned a ${xhr.status} status code! TurboReflex requires 2XX-3XX status codes.`\n\n dispatch(\n lifecycle.events.clientError,\n document,\n { xhr, ...event.detail, error },\n true\n )\n}\n\nfunction loaded (event) {\n const xhr = event.target\n if (xhr.status < 200 || xhr.status > 399) return errored(event)\n const content = xhr.responseText\n xhr.getResponseHeader('TurboReflex') === 'Append'\n ? renderer.append(xhr.responseText)\n : renderer.replaceDocument(xhr.responseText)\n}\n\nfunction invokeReflex (payload) {\n const src = payload.src\n payload = { ...payload }\n delete payload.src\n\n try {\n const xhr = new XMLHttpRequest()\n xhr.open('GET', urls.build(src, payload), true)\n xhr.setRequestHeader(\n 'Accept',\n 'text/vnd.turbo-reflex.html, text/html, application/xhtml+xml'\n )\n xhr.setRequestHeader('TurboReflex-Token', meta.token)\n state.payloadChunks.forEach((chunk, i) =>\n xhr.setRequestHeader(\n `TurboReflex-State-${i.toString().padStart(4, '0')}`,\n chunk\n )\n )\n\n xhr.addEventListener('abort', aborted)\n xhr.addEventListener('error', errored)\n xhr.addEventListener('load', loaded)\n xhr.send()\n } catch (ex) {\n const message = `Unexpected error sending HTTP request! ${ex.message}`\n errored(ex, { detail: { message } })\n }\n}\n\nexport default { invokeReflex }\n", "import elements from '../elements'\nimport formDriver from './form'\nimport frameDriver from './frame'\nimport methodDriver from './method'\nimport windowDriver from './window'\n\nfunction src (element, frame) {\n frame = frame || { dataset: {} }\n return (\n element.href || frame.src || frame.dataset.turboReflexSrc || location.href\n )\n}\n\nfunction find (element) {\n let frame = elements.findClosestFrame(element)\n const { turboFrame, turboMethod } = element.dataset\n\n if (element.tagName.toLowerCase() === 'form')\n return {\n name: 'form',\n reason: 'Element is a form.',\n frame,\n src: element.action,\n invokeReflex: formDriver.invokeReflex\n }\n\n if (turboMethod && turboMethod.length > 0)\n return {\n name: 'method',\n reason: 'Element defines data-turbo-method.',\n frame,\n src: element.href,\n invokeReflex: methodDriver.invokeReflex\n }\n\n // element targets a frame that is not _self\n if (turboFrame && turboFrame !== '_self') {\n frame = document.getElementById(turboFrame)\n return {\n name: 'frame',\n reason: 'element targets a frame that is not _self',\n frame,\n src: src(element, frame),\n invokeReflex: frameDriver.invokeReflex\n }\n }\n\n // element does NOT target a frame or targets _self and is contained by a frame\n if ((!turboFrame || turboFrame === '_self') && frame)\n return {\n name: 'frame',\n reason:\n 'element does NOT target a frame or targets _self and is contained by a frame',\n frame,\n src: src(element, frame),\n invokeReflex: frameDriver.invokeReflex\n }\n\n // element matches one or more of the following conditions\n // - targets _top\n // - does NOT target a frame\n // - is NOT contained by a frame\n return {\n name: 'window',\n reason:\n 'element matches one or more of the following conditions (targets _top, does NOT target a frame, is NOT contained by a frame)',\n frame: null,\n src: src(element),\n invokeReflex: windowDriver.invokeReflex\n }\n}\n\nexport default { find }\n", "import { allEvents as events } from './events'\n\nlet currentLevel = 'unknown'\n\nconst logLevels = {\n debug: Object.values(events),\n info: Object.values(events),\n warn: [events.abort, events.clientError, events.serverError],\n error: [events.clientError, events.serverError],\n unknown: []\n}\n\nObject.values(events).forEach(name => {\n addEventListener(name, event => {\n if (logLevels[currentLevel].includes(event.type)) {\n const level = currentLevel === 'debug' ? 'log' : currentLevel\n console[level](event.type, event.detail)\n }\n })\n})\n\nexport default {\n get level () {\n return currentLevel\n },\n set level (value) {\n if (!Object.keys(logLevels).includes(value)) value = 'unknown'\n return (currentLevel = value)\n }\n}\n", "function v4 () {\n return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c =>\n (\n c ^\n (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))\n ).toString(16)\n )\n}\n\nexport default { v4 }\n", "import './turbo'\nimport schema from './schema'\nimport { dispatch } from './events'\nimport activity from './activity'\nimport delegates from './delegates'\nimport drivers from './drivers'\nimport meta from './meta'\nimport elements from './elements'\nimport lifecycle from './lifecycle'\nimport logger from './logger'\nimport { state } from './state'\nimport urls from './urls'\nimport uuids from './uuids'\n\nfunction invokeReflex (event) {\n let element\n let payload = {}\n\n try {\n element = elements.findClosestReflex(event.target)\n if (!element) return\n if (!delegates.isRegisteredForElement(event.type, element)) return\n\n const driver = drivers.find(element)\n\n // payload sent to server (also used for lifecycle event.detail)\n payload = {\n id: `reflex-${uuids.v4()}`,\n name: element.dataset.turboReflex,\n driver: driver.name,\n src: driver.src,\n frameId: driver.frame ? driver.frame.id : null,\n elementId: element.id.length > 0 ? element.id : null,\n elementAttributes: elements.buildAttributePayload(element),\n startedAt: new Date().getTime()\n }\n\n activity.add(payload)\n dispatch(lifecycle.events.start, element, payload)\n\n if (['frame', 'window'].includes(driver.name)) event.preventDefault()\n\n meta.busy = true\n setTimeout(() => (meta.busy = false), 10)\n\n switch (driver.name) {\n case 'method':\n return driver.invokeReflex(element, payload)\n case 'form':\n return driver.invokeReflex(element, payload)\n case 'frame':\n return driver.invokeReflex(driver.frame, payload)\n case 'window':\n return driver.invokeReflex(payload)\n }\n } catch (error) {\n dispatch(lifecycle.events.clientError, element, {\n error,\n ...payload\n })\n }\n}\n\n// wire things up and setup defaults for event delegation\ndelegates.handler = invokeReflex\ndelegates.register('change', [\n `input[${schema.reflexAttribute}]`,\n `select[${schema.reflexAttribute}]`,\n `textarea[${schema.reflexAttribute}]`\n])\n// delegates.register('mousedown', [\n// `[${schema.reflexAttribute}][${schema.methodAttribute}]`\n// ])\ndelegates.register('submit', [`form[${schema.reflexAttribute}]`])\ndelegates.register('click', [`[${schema.reflexAttribute}]`])\n\nexport default self.TurboReflex = {\n logger,\n schema,\n registerEventDelegate: delegates.register,\n get eventDelegates () {\n return { ...delegates.events }\n },\n get lifecycleEvents () {\n return [...Object.values(lifecycle.events)]\n },\n get state () {\n return state\n }\n}\n"],
|
5
|
+
"mappings": "AAAA,IAAMA,EAAN,KAAW,CACT,IAAI,SAAW,CACb,OAAO,SAAS,cAAc,2BAA2B,CAC3D,CAEA,IAAI,OAAS,CACX,OAAO,KAAK,QAAQ,aA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meta_default", "lifecycleEvents", "stateEvents", "allEvents", "dispatch", "name", "target", "detail", "raise", "event", "error", "head", "observable", "object", "parent", "proxy", "target", "key", "dispatch", "stateEvents", "meta_default", "value", "receiver", "index", "observable_default", "oldState", "state", "changedState", "observer", "loadState", "json", "meta_default", "observable_default", "initObserver", "stateEvents", "event", "key", "value", "state_default", "stateEvents", "changedState", "replaceDocument", "content", "head", "tail", "headIndex", "tailIndex", "html", "append", "renderer_default", "active", "add", "payload", "remove", "id", "activity_default", "finish", "event", "dispatch", "lifecycleEvents", "activity_default", "lifecycle_default", "frameSources", "event", "frame", "fetchOptions", "meta_default", "acceptHeaders", "entry", "state_default", "chunk", "i", "response", "error", "dispatch", "lifecycle_default", "content", "renderer_default", "schema", "schema_default", "events", "eventListener", "register", "eventName", "selectors", "getRegisteredEventNameForElement", "element", "selector", "el", "isRegisteredForElement", "delegates_default", "fn", "findClosestReflex", "element", "schema_default", "findClosestFrame", "assignElementValueToPayload", "payload", "memo", "option", "buildAttributePayload", "attr", "value", "elements_default", "invokeReflex", "form", "payload", "meta_default", "input", "form_default", "build", "urlString", "payload", "a", "url", "urls_default", "invokeReflex", "frame", "payload", "src", "urls_default", "frame_default", "invokeReflex", "element", "payload", "src", "urls_default", "method_default", "aborted", "event", "xhr", "dispatch", "lifecycle_default", "errored", "renderer_default", "error", "loaded", "content", "invokeReflex", "payload", "src", "urls_default", "meta_default", "state_default", "chunk", "i", "ex", "message", "window_default", "src", "element", "frame", "find", "elements_default", "turboFrame", "turboMethod", "form_default", "method_default", "frame_default", "window_default", "drivers_default", "currentLevel", "logLevels", "allEvents", "name", "event", "logger_default", "value", "v4", "c", "uuids_default", "invokeReflex", "event", "element", "payload", "elements_default", "delegates_default", "driver", "drivers_default", "uuids_default", "activity_default", "dispatch", "lifecycle_default", "meta_default", "error", "schema_default", "javascript_default", "logger_default", "state"]
|
7
7
|
}
|
@@ -20,8 +20,13 @@ function initObserver () {
|
|
20
20
|
})
|
21
21
|
}
|
22
22
|
|
23
|
-
meta.element
|
24
|
-
|
23
|
+
if (meta.element) {
|
24
|
+
loadState()
|
25
|
+
initObserver()
|
26
|
+
} else {
|
27
|
+
addEventListener('DOMContentLoaded', loadState)
|
28
|
+
addEventListener('DOMContentLoaded', initObserver)
|
29
|
+
}
|
25
30
|
addEventListener('turbo:load', initObserver)
|
26
31
|
addEventListener('turbo:frame-load', initObserver)
|
27
32
|
|
data/lib/turbo_reflex/version.rb
CHANGED
data/package.json
CHANGED
data/tags
CHANGED
@@ -172992,8 +172992,8 @@ $z node_modules/angular-html-parser/lib/compiler/src/chars.d.ts /^export declare
|
|
172992
172992
|
@es-shims/api node_modules/prettier-standard/src/vendor/node_modules/string.prototype.trimleft/package.json /^ "@es-shims\/api": "^2.1.2",$/;" s object:devDependencies
|
172993
172993
|
@es-shims/api node_modules/prettier-standard/src/vendor/node_modules/string.prototype.trimright/package.json /^ "@es-shims\/api": "^2.1.2",$/;" s object:devDependencies
|
172994
172994
|
@es-shims/api node_modules/prettier-standard/src/vendor/node_modules/string.prototype.trimstart/package.json /^ "@es-shims\/api": "^2.1.2",$/;" s object:devDependencies
|
172995
|
-
@esbuild/android-arm node_modules/esbuild/package.json /^ "@esbuild\/android-arm": "0.15.
|
172996
|
-
@esbuild/linux-loong64 node_modules/esbuild/package.json /^ "@esbuild\/linux-loong64": "0.15.
|
172995
|
+
@esbuild/android-arm node_modules/esbuild/package.json /^ "@esbuild\/android-arm": "0.15.13",$/;" s object:optionalDependencies
|
172996
|
+
@esbuild/linux-loong64 node_modules/esbuild/package.json /^ "@esbuild\/linux-loong64": "0.15.13",$/;" s object:optionalDependencies
|
172997
172997
|
@eslint/eslintrc node_modules/eslint/package.json /^ "@eslint\/eslintrc": "^1.3.3",$/;" s object:dependencies
|
172998
172998
|
@eslint/import-test-order-redirect-scoped node_modules/prettier-standard/src/vendor/node_modules/eslint-plugin-import/package.json /^ "@eslint\/import-test-order-redirect-scoped": "file:.\/tests\/files\/order-redirect-scoped",$/;" s object:devDependencies
|
172999
172999
|
@fezvrasta/tsc-silent node_modules/@popperjs/core/package.json /^ "@fezvrasta\/tsc-silent": "^1.3.0",$/;" s object:devDependencies
|
@@ -216622,7 +216622,7 @@ VDash node_modules/parse-srcset/tests/he.js /^ var decodeMap = {'Aacute':'\\xC1'
|
|
216622
216622
|
VDash node_modules/simple-html-tokenizer/dist/es6/index.js /^ Aacute: "Á", aacute: "á", Abreve: "Ă", abreve: "ă", ac: "∾", acd: "∿", acE: "∾̳",/;" p variable:namedCharRefs
|
216623
216623
|
VDash node_modules/simple-html-tokenizer/dist/simple-html-tokenizer.js /^ Aacute: "Á", aacute: "á", Abreve: "Ă", abreve: "ă", ac: "∾", acd: "∿", acE: "∾/;" p variable:anonymousFunction3825d8d70300.namedCharRefs
|
216624
216624
|
VDash node_modules/simple-html-tokenizer/dist/types/generated/html5-named-char-refs.d.ts /^ VDash: string;$/;" C
|
216625
|
-
VERSION lib/turbo_reflex/version.rb /^ VERSION = "0.0.
|
216625
|
+
VERSION lib/turbo_reflex/version.rb /^ VERSION = "0.0.15"$/;" C module:TurboReflex
|
216626
216626
|
VERSION node_modules/@angular/compiler/esm2015/src/output/source_map.js /^const VERSION = 3;$/;" C
|
216627
216627
|
VERSION node_modules/@angular/compiler/esm2015/src/version.js /^export const VERSION = new Version('8.2.14');$/;" C
|
216628
216628
|
VERSION node_modules/@angular/compiler/esm5/src/output/source_map.js /^var VERSION = 3;$/;" v
|
@@ -262560,7 +262560,7 @@ anonymousObject5e1c9d3f2605 node_modules/esbuild/lib/main.js /^ runServiceSync(
|
|
262560
262560
|
anonymousObject5e1c9d3f2705 node_modules/esbuild/lib/main.js /^ runServiceSync((service) => service.transform({$/;" v
|
262561
262561
|
anonymousObject5e1c9d3f2805 node_modules/esbuild/lib/main.js /^ runServiceSync((service) => service.formatMessages({$/;" v
|
262562
262562
|
anonymousObject5e1c9d3f2905 node_modules/esbuild/lib/main.js /^ runServiceSync((service) => service.analyzeMetafile({$/;" v
|
262563
|
-
anonymousObject5e1c9d3f2b05 node_modules/esbuild/lib/main.js /^ let child = child_process.spawn(command, args.concat(`--service=${"0.15.
|
262563
|
+
anonymousObject5e1c9d3f2b05 node_modules/esbuild/lib/main.js /^ let child = child_process.spawn(command, args.concat(`--service=${"0.15.13"}`, "--ping"), {$/;" v
|
262564
262564
|
anonymousObject5e1c9d3f2c05 node_modules/esbuild/lib/main.js /^ let { readFromStdout, afterClose, service } = createChannel({$/;" v
|
262565
262565
|
anonymousObject5e1c9d3f2d05 node_modules/esbuild/lib/main.js /^ service.buildOrServe({$/;" v
|
262566
262566
|
anonymousObject5e1c9d3f2e05 node_modules/esbuild/lib/main.js /^ return new Promise((resolve, reject) => service.buildOrServe({$/;" v method:longLivedService.serve
|
@@ -262568,7 +262568,7 @@ anonymousObject5e1c9d3f2f05 node_modules/esbuild/lib/main.js /^ return new
|
|
262568
262568
|
anonymousObject5e1c9d3f3005 node_modules/esbuild/lib/main.js /^ return new Promise((resolve, reject) => service.formatMessages({$/;" v method:longLivedService.formatMessages
|
262569
262569
|
anonymousObject5e1c9d3f3105 node_modules/esbuild/lib/main.js /^ return new Promise((resolve, reject) => service.analyzeMetafile({$/;" v method:longLivedService.analyzeMetafile
|
262570
262570
|
anonymousObject5e1c9d3f3205 node_modules/esbuild/lib/main.js /^ let { readFromStdout, afterClose, service } = createChannel({$/;" v
|
262571
|
-
anonymousObject5e1c9d3f3305 node_modules/esbuild/lib/main.js /^ let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.15.
|
262571
|
+
anonymousObject5e1c9d3f3305 node_modules/esbuild/lib/main.js /^ let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.15.13"}`), {$/;" v
|
262572
262572
|
anonymousObject5e1c9d3f3405 node_modules/esbuild/lib/main.js /^ let worker = new worker_threads2.Worker(__filename, {$/;" v
|
262573
262573
|
anonymousObject5e1c9d3f3505 node_modules/esbuild/lib/main.js /^ let errors = [{ id: "", pluginName: "", text, location: null, notes: [], detail: void 0 }];$/;" v
|
262574
262574
|
anonymousObject5e33048c0105 node_modules/rxjs/operators/switchAll.js /^Object.defineProperty(exports, "__esModule", { value: true });$/;" v
|
@@ -291904,7 +291904,7 @@ child node_modules/@glimmer/interfaces/dist/types/lib/runtime/environment.d.ts /
|
|
291904
291904
|
child node_modules/@glimmer/interfaces/dist/types/lib/runtime/scope.d.ts /^ child(): Scope<C>;$/;" m interface:Scope
|
291905
291905
|
child node_modules/@glimmer/syntax/dist/types/lib/types/nodes.d.ts /^ child(locals: string[]): BlockSymbols;$/;" m interface:Symbols
|
291906
291906
|
child node_modules/braces/lib/expand.js /^ let child = node.nodes[i];$/;" v
|
291907
|
-
child node_modules/esbuild/lib/main.js /^ let child = child_process.spawn(command, args.concat(`--service=${"0.15.
|
291907
|
+
child node_modules/esbuild/lib/main.js /^ let child = child_process.spawn(command, args.concat(`--service=${"0.15.13"}`, "--ping"), {$/;" v
|
291908
291908
|
child node_modules/esquery/dist/esquery.esm.js /^ child.prototype = new ctor();$/;" c
|
291909
291909
|
child node_modules/esquery/dist/esquery.js /^ child.prototype = new ctor();$/;" c
|
291910
291910
|
child node_modules/esquery/dist/esquery.lite.js /^ child.prototype = new ctor();$/;" c
|
@@ -325141,27 +325141,27 @@ esbuild node_modules/esbuild/lib/main.js /^ esbuild: node_exports$/;" p varia
|
|
325141
325141
|
esbuild node_modules/esbuild/package.json /^ "esbuild": "bin\/esbuild"$/;" s object:bin
|
325142
325142
|
esbuild node_modules/lines-and-columns/package.json /^ "esbuild": "^0.13.15",$/;" s object:devDependencies
|
325143
325143
|
esbuild package.json /^ "esbuild": "^0.15.7",$/;" s object:devDependencies
|
325144
|
-
esbuild-android-64 node_modules/esbuild/package.json /^ "esbuild-android-64": "0.15.
|
325145
|
-
esbuild-android-arm64 node_modules/esbuild/package.json /^ "esbuild-android-arm64": "0.15.
|
325146
|
-
esbuild-darwin-64 node_modules/esbuild/package.json /^ "esbuild-darwin-64": "0.15.
|
325147
|
-
esbuild-darwin-arm64 node_modules/esbuild/package.json /^ "esbuild-darwin-arm64": "0.15.
|
325148
|
-
esbuild-freebsd-64 node_modules/esbuild/package.json /^ "esbuild-freebsd-64": "0.15.
|
325149
|
-
esbuild-freebsd-arm64 node_modules/esbuild/package.json /^ "esbuild-freebsd-arm64": "0.15.
|
325150
|
-
esbuild-linux-32 node_modules/esbuild/package.json /^ "esbuild-linux-32": "0.15.
|
325151
|
-
esbuild-linux-64 node_modules/esbuild/package.json /^ "esbuild-linux-64": "0.15.
|
325152
|
-
esbuild-linux-arm node_modules/esbuild/package.json /^ "esbuild-linux-arm": "0.15.
|
325153
|
-
esbuild-linux-arm64 node_modules/esbuild/package.json /^ "esbuild-linux-arm64": "0.15.
|
325154
|
-
esbuild-linux-mips64le node_modules/esbuild/package.json /^ "esbuild-linux-mips64le": "0.15.
|
325155
|
-
esbuild-linux-ppc64le node_modules/esbuild/package.json /^ "esbuild-linux-ppc64le": "0.15.
|
325156
|
-
esbuild-linux-riscv64 node_modules/esbuild/package.json /^ "esbuild-linux-riscv64": "0.15.
|
325157
|
-
esbuild-linux-s390x node_modules/esbuild/package.json /^ "esbuild-linux-s390x": "0.15.
|
325158
|
-
esbuild-netbsd-64 node_modules/esbuild/package.json /^ "esbuild-netbsd-64": "0.15.
|
325159
|
-
esbuild-openbsd-64 node_modules/esbuild/package.json /^ "esbuild-openbsd-64": "0.15.
|
325144
|
+
esbuild-android-64 node_modules/esbuild/package.json /^ "esbuild-android-64": "0.15.13",$/;" s object:optionalDependencies
|
325145
|
+
esbuild-android-arm64 node_modules/esbuild/package.json /^ "esbuild-android-arm64": "0.15.13",$/;" s object:optionalDependencies
|
325146
|
+
esbuild-darwin-64 node_modules/esbuild/package.json /^ "esbuild-darwin-64": "0.15.13",$/;" s object:optionalDependencies
|
325147
|
+
esbuild-darwin-arm64 node_modules/esbuild/package.json /^ "esbuild-darwin-arm64": "0.15.13",$/;" s object:optionalDependencies
|
325148
|
+
esbuild-freebsd-64 node_modules/esbuild/package.json /^ "esbuild-freebsd-64": "0.15.13",$/;" s object:optionalDependencies
|
325149
|
+
esbuild-freebsd-arm64 node_modules/esbuild/package.json /^ "esbuild-freebsd-arm64": "0.15.13",$/;" s object:optionalDependencies
|
325150
|
+
esbuild-linux-32 node_modules/esbuild/package.json /^ "esbuild-linux-32": "0.15.13",$/;" s object:optionalDependencies
|
325151
|
+
esbuild-linux-64 node_modules/esbuild/package.json /^ "esbuild-linux-64": "0.15.13",$/;" s object:optionalDependencies
|
325152
|
+
esbuild-linux-arm node_modules/esbuild/package.json /^ "esbuild-linux-arm": "0.15.13",$/;" s object:optionalDependencies
|
325153
|
+
esbuild-linux-arm64 node_modules/esbuild/package.json /^ "esbuild-linux-arm64": "0.15.13",$/;" s object:optionalDependencies
|
325154
|
+
esbuild-linux-mips64le node_modules/esbuild/package.json /^ "esbuild-linux-mips64le": "0.15.13",$/;" s object:optionalDependencies
|
325155
|
+
esbuild-linux-ppc64le node_modules/esbuild/package.json /^ "esbuild-linux-ppc64le": "0.15.13",$/;" s object:optionalDependencies
|
325156
|
+
esbuild-linux-riscv64 node_modules/esbuild/package.json /^ "esbuild-linux-riscv64": "0.15.13",$/;" s object:optionalDependencies
|
325157
|
+
esbuild-linux-s390x node_modules/esbuild/package.json /^ "esbuild-linux-s390x": "0.15.13",$/;" s object:optionalDependencies
|
325158
|
+
esbuild-netbsd-64 node_modules/esbuild/package.json /^ "esbuild-netbsd-64": "0.15.13",$/;" s object:optionalDependencies
|
325159
|
+
esbuild-openbsd-64 node_modules/esbuild/package.json /^ "esbuild-openbsd-64": "0.15.13",$/;" s object:optionalDependencies
|
325160
325160
|
esbuild-runner node_modules/lines-and-columns/package.json /^ "esbuild-runner": "^2.2.1",$/;" s object:devDependencies
|
325161
|
-
esbuild-sunos-64 node_modules/esbuild/package.json /^ "esbuild-sunos-64": "0.15.
|
325162
|
-
esbuild-windows-32 node_modules/esbuild/package.json /^ "esbuild-windows-32": "0.15.
|
325163
|
-
esbuild-windows-64 node_modules/esbuild/package.json /^ "esbuild-windows-64": "0.15.
|
325164
|
-
esbuild-windows-arm64 node_modules/esbuild/package.json /^ "esbuild-windows-arm64": "0.15.
|
325161
|
+
esbuild-sunos-64 node_modules/esbuild/package.json /^ "esbuild-sunos-64": "0.15.13",$/;" s object:optionalDependencies
|
325162
|
+
esbuild-windows-32 node_modules/esbuild/package.json /^ "esbuild-windows-32": "0.15.13",$/;" s object:optionalDependencies
|
325163
|
+
esbuild-windows-64 node_modules/esbuild/package.json /^ "esbuild-windows-64": "0.15.13",$/;" s object:optionalDependencies
|
325164
|
+
esbuild-windows-arm64 node_modules/esbuild/package.json /^ "esbuild-windows-arm64": "0.15.13"$/;" s object:optionalDependencies
|
325165
325165
|
esbuildCommandAndArgs node_modules/esbuild/lib/main.js /^var esbuildCommandAndArgs = () => {$/;" f
|
325166
325166
|
esc node_modules/@babel/helper-validator-identifier/scripts/generate-identifier-regex.js /^function esc(code) {$/;" f
|
325167
325167
|
esc node_modules/prettier-standard/src/vendor/node_modules/@babel/helper-validator-identifier/scripts/generate-identifier-regex.js /^function esc(code) {$/;" f
|
@@ -437562,7 +437562,7 @@ stdout node_modules/@types/node/wasi.d.ts /^ stdout?: number | undefined;
|
|
437562
437562
|
stdout node_modules/chalk/node_modules/supports-color/browser.js /^ stdout: false,$/;" p property:module.exports
|
437563
437563
|
stdout node_modules/chalk/node_modules/supports-color/index.js /^ stdout: getSupportLevel(process.stdout),$/;" p property:module.exports
|
437564
437564
|
stdout node_modules/esbuild/lib/main.js /^ const stdout = child.stdout;$/;" C
|
437565
|
-
stdout node_modules/esbuild/lib/main.js /^ let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.15.
|
437565
|
+
stdout node_modules/esbuild/lib/main.js /^ let stdout = child_process.execFileSync(command, args.concat(`--service=${"0.15.13"}`), {$/;" v
|
437566
437566
|
stdout node_modules/execa/index.d.ts /^ readonly stdout?: StdioOption;$/;" p interface:execa.CommonOptions
|
437567
437567
|
stdout node_modules/execa/index.d.ts /^ stdout: StdoutStderrType;$/;" p interface:execa.ExecaReturnBase
|
437568
437568
|
stdout node_modules/execa/index.js /^ const stdout = handleOutput(parsed.options, stdoutResult);$/;" C
|
@@ -467784,10 +467784,10 @@ version node_modules/elegant-spinner/package.json /^ "version": "1.0.1",$/;" s
|
|
467784
467784
|
version node_modules/emoji-regex/package.json /^ "version": "8.0.0",$/;" s
|
467785
467785
|
version node_modules/end-of-stream/package.json /^ "version": "1.4.4",$/;" s
|
467786
467786
|
version node_modules/error-ex/package.json /^ "version": "1.3.2",$/;" s
|
467787
|
-
version node_modules/esbuild-darwin-arm64/package.json /^ "version": "0.15.
|
467787
|
+
version node_modules/esbuild-darwin-arm64/package.json /^ "version": "0.15.13",$/;" s
|
467788
467788
|
version node_modules/esbuild/lib/main.d.ts /^export let version: string;$/;" v
|
467789
|
-
version node_modules/esbuild/lib/main.js /^var version = "0.15.
|
467790
|
-
version node_modules/esbuild/package.json /^ "version": "0.15.
|
467789
|
+
version node_modules/esbuild/lib/main.js /^var version = "0.15.13";$/;" v
|
467790
|
+
version node_modules/esbuild/package.json /^ "version": "0.15.13",$/;" s
|
467791
467791
|
version node_modules/escape-string-regexp/package.json /^ "version": "1.0.5",$/;" s
|
467792
467792
|
version node_modules/eslint-scope/lib/version.js /^const version = "7.1.1";$/;" C
|
467793
467793
|
version node_modules/eslint-scope/package.json /^ "version": "7.1.1",$/;" s
|
@@ -468394,7 +468394,7 @@ version node_modules/yaml/dist/index.js /^ version: '1.2'$/;" p variable:defaul
|
|
468394
468394
|
version node_modules/yaml/dist/test-events.js /^ version: '1.2'$/;" p variable:testEvents.anonymousObjecta2b129440205
|
468395
468395
|
version node_modules/yaml/package.json /^ "version": "1.8.3",$/;" s
|
468396
468396
|
version node_modules/yocto-queue/package.json /^ "version": "0.1.0",$/;" s
|
468397
|
-
version package.json /^ "version": "0.0.
|
468397
|
+
version package.json /^ "version": "0.0.14",$/;" s
|
468398
468398
|
versionIncluded node_modules/prettier-standard/src/vendor/node_modules/resolve/lib/core.js /^function versionIncluded(specifierValue) {$/;" f
|
468399
468399
|
versionIncluded node_modules/resolve/lib/core.js /^function versionIncluded(specifierValue) {$/;" f
|
468400
468400
|
versionInfo node_modules/graphql/version.d.ts /^export const versionInfo: {$/;" C
|
@@ -476084,12 +476084,12 @@ worker node_modules/prettier-standard/node_modules/globals/globals.json /^ "work
|
|
476084
476084
|
worker node_modules/prettier-standard/src/vendor/node_modules/globals/globals.json /^ "worker": {$/;" o
|
476085
476085
|
workerData node_modules/@types/node/ts4.8/worker_threads.d.ts /^ const workerData: any;$/;" C
|
476086
476086
|
workerData node_modules/@types/node/worker_threads.d.ts /^ const workerData: any;$/;" C
|
476087
|
-
workerData node_modules/esbuild/lib/main.js /^ workerData: { workerPort, defaultWD, esbuildVersion: "0.15.
|
476087
|
+
workerData node_modules/esbuild/lib/main.js /^ workerData: { workerPort, defaultWD, esbuildVersion: "0.15.13" },$/;" p variable:anonymousObject5e1c9d3f3405
|
476088
476088
|
workerId node_modules/@types/node/inspector.d.ts /^ workerId: WorkerID;$/;" p interface:NodeWorker.WorkerInfo
|
476089
476089
|
workerId node_modules/@types/node/ts4.8/inspector.d.ts /^ workerId: WorkerID;$/;" p interface:NodeWorker.WorkerInfo
|
476090
476090
|
workerInfo node_modules/@types/node/inspector.d.ts /^ workerInfo: WorkerInfo;$/;" p interface:NodeWorker.AttachedToWorkerEventDataType
|
476091
476091
|
workerInfo node_modules/@types/node/ts4.8/inspector.d.ts /^ workerInfo: WorkerInfo;$/;" p interface:NodeWorker.AttachedToWorkerEventDataType
|
476092
|
-
workerPort node_modules/esbuild/lib/main.js /^ workerData: { workerPort, defaultWD, esbuildVersion: "0.15.
|
476092
|
+
workerPort node_modules/esbuild/lib/main.js /^ workerData: { workerPort, defaultWD, esbuildVersion: "0.15.13" },$/;" M property:anonymousObject5e1c9d3f3405.workerData
|
476093
476093
|
workerPort node_modules/esbuild/lib/main.js /^ let workerPort = worker_threads.workerData.workerPort;$/;" v
|
476094
476094
|
workerThreadService node_modules/esbuild/lib/main.js /^var workerThreadService = null;$/;" v
|
476095
476095
|
worker_threads node_modules/esbuild/lib/main.js /^var worker_threads;$/;" v
|