turbo_reflex 0.0.13 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -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 +1 -1
- data/lib/turbo_reflex/errors.rb +3 -0
- data/lib/turbo_reflex/state.rb +5 -1
- data/lib/turbo_reflex/state_manager.rb +21 -7
- data/lib/turbo_reflex/version.rb +1 -1
- data/package.json +1 -1
- data/tags +14 -14
- data/yarn.lock +132 -132
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2bed2011c7db30b2c923d1473c69a235b428011944f813fef7bddde52d99ccb
|
4
|
+
data.tar.gz: 37ac18b1b16cd3aab8b902b6bacb68fa5632fa650dc2fe34714c37b75045fb28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a34ddb298dde5aa151d2e7443ed05f735a63e9f560bbe4ef035b1e43cf1e6c7e7eeeb96b47648a190d373961d0d6e0ea33a1aeb11fbeeff40f5dba6b7f4629de
|
7
|
+
data.tar.gz: 5093e8c73a06c033fc59bec50fb0045152fc0cbeba56c7840e104b7743d5165dc28ce4236e5e19e5ee66cff89916513eb9ef8d571fe433010eb28757c3594414
|
data/Gemfile.lock
CHANGED
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-1115-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 L=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 L;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,S,me){return a(f.beforeStateChange,s.element,{state:x}),n[o]=g(S,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
|
1
|
+
var L=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 L;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,S,me){return a(f.beforeStateChange,s.element,{state:x}),n[o]=g(S,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 w,p,R,E;function O(){let e=atob(s.element.dataset.state);R={},w=p=H(JSON.parse(e))}function C(){E&&E.disconnect(),E=new MutationObserver(O),E.observe(s.element,{attributes:!0,attributeFilter:["data-state"]})}s.element?O():addEventListener("DOMContentLoaded",O);addEventListener("DOMContentLoaded",C);addEventListener("turbo:load",C);addEventListener("turbo:frame-load",C);addEventListener(f.beforeStateChange,e=>w=JSON.parse(JSON.stringify(p)));addEventListener(f.stateChange,e=>{R={};for(let[t,r]of Object.entries(p))w[t]!==r&&(R[t]=r);s.element.dataset.state=btoa(JSON.stringify(p))});var y={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 S=e.slice(e.indexOf(">",n)+1,o);document.documentElement.innerHTML=S}}function B(e){document.body.insertAdjacentHTML("beforeend",e)}var m={append:B,replaceDocument:V};var k={};function G(e){k[e.id]=e}function z(e){delete k[e]}var A={add:G,remove:z,get reflexes(){return[...Object.values(k)]},get length(){return Object.keys(k).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=>A.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}y.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 T={},F;function Q(e,t){T[e]=t,document.addEventListener(e,F,!0)}function W(e){return Object.keys(T).find(t=>!!T[t].find(r=>Array.from(document.querySelectorAll(r)).find(n=>n===e)))}function Y(e,t){return e===W(t)}var c={events:T,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),y.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()},A.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\naddEventListener('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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,CAAO,EACpBO,EAASC,EAAU,OAAO,MAAOT,EAASC,CAAO,EAE7C,CAAC,QAAS,QAAQ,EAAE,SAASG,EAAO,IAAI,GAAGL,EAAM,eAAe,EAEpEW,EAAK,KAAO,GACZ,WAAW,IAAOA,EAAK,KAAO,GAAQ,EAAE,EAEhCN,EAAO,KAAM,CACnB,IAAK,SACH,OAAOA,EAAO,aAAaJ,EAASC,CAAO,EAC7C,IAAK,OACH,OAAOG,EAAO,aAAaJ,EAASC,CAAO,EAC7C,IAAK,QACH,OAAOG,EAAO,aAAaA,EAAO,MAAOH,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\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,OAAAE,EACA,WAAY,GACZ,QAAS,EACX,CAAC,EACDD,EAAO,cAAcG,CAAK,CAC5B,OAASC,EAAP,CACA,GAAIF,EAAO,MAAME,EACjBN,EAASH,EAAgB,YAAaK,EAAQ,CAAE,MAAAI,EAAO,GAAGH,CAAO,EAAG,EAAI,CAC1E,CACF,CC1BA,IAAII,EAEJ,SAASC,EAAYC,EAAQC,EAAS,KAAM,CAC1C,GAAI,CAACD,GAAU,OAAOA,GAAW,SAAU,OAAOA,EAElD,IAAME,EAAQ,IAAI,MAAMF,EAAQ,CAC9B,eAAgB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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",
|
6
6
|
"names": ["Meta", "value", "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,7 +20,7 @@ function initObserver () {
|
|
20
20
|
})
|
21
21
|
}
|
22
22
|
|
23
|
-
addEventListener('DOMContentLoaded', loadState)
|
23
|
+
meta.element ? loadState() : addEventListener('DOMContentLoaded', loadState)
|
24
24
|
addEventListener('DOMContentLoaded', initObserver)
|
25
25
|
addEventListener('turbo:load', initObserver)
|
26
26
|
addEventListener('turbo:frame-load', initObserver)
|
data/lib/turbo_reflex/errors.rb
CHANGED
data/lib/turbo_reflex/state.rb
CHANGED
@@ -9,6 +9,8 @@ class TurboReflex::State
|
|
9
9
|
def deserialize_base64(string)
|
10
10
|
return {} if string.blank?
|
11
11
|
JSON.parse Base64.urlsafe_decode64(string)
|
12
|
+
rescue => error
|
13
|
+
raise TurboReflex::StateDeserializationError, "Unable to decode and parse Base64 string! \"#{string}\" #{error.message}"
|
12
14
|
end
|
13
15
|
|
14
16
|
def serialize(data)
|
@@ -22,6 +24,8 @@ class TurboReflex::State
|
|
22
24
|
decoded = Base64.urlsafe_decode64(string)
|
23
25
|
inflated = Zlib::Inflate.inflate(decoded)
|
24
26
|
Marshal.load inflated
|
27
|
+
rescue => error
|
28
|
+
raise TurboReflex::StateDeserializationError, "Unable to decode, inflate, and load Base64 string! \"#{string}\" #{error.message}"
|
25
29
|
end
|
26
30
|
end
|
27
31
|
|
@@ -38,7 +42,7 @@ class TurboReflex::State
|
|
38
42
|
delegate :include?, :has_key?, :key?, :member?, to: :internal_data
|
39
43
|
|
40
44
|
def cache_key
|
41
|
-
"turbo-reflex/ui-state/#{
|
45
|
+
"turbo-reflex/ui-state/#{Digest::SHA2.base64digest(payload)}"
|
42
46
|
end
|
43
47
|
|
44
48
|
def read(*keys, default: nil)
|
@@ -46,21 +46,35 @@ class TurboReflex::StateManager
|
|
46
46
|
|
47
47
|
def initialize(runner)
|
48
48
|
@runner = runner
|
49
|
-
|
49
|
+
|
50
|
+
begin
|
51
|
+
@state = TurboReflex::State.new(cookie) # server state as stored in the cookie
|
52
|
+
rescue => error
|
53
|
+
Rails.logger.error "Failed to construct TurboReflex::State! #{error.message}"
|
54
|
+
@state = TurboReflex::State.new
|
55
|
+
end
|
50
56
|
|
51
57
|
# Apply server state overrides (i.e. state stored in databases like Redis, Postgres, etc...)
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
58
|
+
begin
|
59
|
+
state_override_block = self.class.state_override_block(runner.controller)
|
60
|
+
if state_override_block
|
61
|
+
server_data = runner.controller.instance_eval(&state_override_block).with_indifferent_access
|
62
|
+
server_data.each { |key, val| self[key] = val }
|
63
|
+
end
|
64
|
+
rescue => error
|
65
|
+
Rails.logger.error "Failed to apply `state_override_block` configured in #{runner.controller.class.name} to TurboReflex::State! #{error.message}"
|
56
66
|
end
|
57
67
|
|
58
68
|
# Merge client state into server state (i.e. optimistic state)
|
59
69
|
# NOTE: Client state HTTP headers are only sent if/when state has changed on the client (only the changes are sent).
|
60
70
|
# This prevents race conditions (state mismatch) caused when frame and XHR requests emit immediately
|
61
71
|
# before the <meta id="turbo-reflex"> has been updated with the latest state from the server.
|
62
|
-
|
63
|
-
|
72
|
+
begin
|
73
|
+
client_data = TurboReflex::State.deserialize_base64(header).with_indifferent_access
|
74
|
+
client_data.each { |key, val| self[key] = val }
|
75
|
+
rescue => error
|
76
|
+
Rails.logger.error "Failed to apply client state from HTTP headers to TurboReflex::State! #{error.message}"
|
77
|
+
end
|
64
78
|
end
|
65
79
|
|
66
80
|
delegate :cache_key, :payload, to: :state
|
data/lib/turbo_reflex/version.rb
CHANGED
data/package.json
CHANGED
data/tags
CHANGED
@@ -89,7 +89,7 @@
|
|
89
89
|
#FF9119 node_modules/flowbite/dist/flowbite.min.css /^\/*! tailwindcss v3.1.6 | MIT License | https:\/\/tailwindcss.com*\/*,:after,:before{border:0 so/;" i
|
90
90
|
#ff2d20 node_modules/flowbite/dist/flowbite.css /^.text-\\[\\#ff2d20\\] {$/;" i
|
91
91
|
#ff2d20 node_modules/flowbite/dist/flowbite.min.css /^\/*! tailwindcss v3.1.6 | MIT License | https:\/\/tailwindcss.com*\/*,:after,:before{border:0 so/;" i
|
92
|
-
$ app/assets/builds/turbo_reflex.js /^var L=class{get element(){return document.querySelector('meta[name="turbo-reflex"]')}get token()/;" f
|
92
|
+
$ app/assets/builds/turbo_reflex.js /^var L=class{get element(){return document.querySelector('meta[name="turbo-reflex"]')}get token()/;" f class:V
|
93
93
|
$ node_modules/@popperjs/core/dist/umd/popper.min.js /^!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeo/;" v class:anonymousFunctiona1f41a370300.O
|
94
94
|
$ node_modules/diff/dist/diff.min.js /^!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeo/;" f
|
95
95
|
$ node_modules/flatted/cjs/index.js /^ const $ = replacer && typeof replacer === object ?$/;" C
|
@@ -177982,6 +177982,7 @@ ByteLengthQueuingStrategy node_modules/@types/node/ts4.8/stream/web.d.ts /^ i
|
|
177982
177982
|
ByteLengthQueuingStrategy node_modules/globals/globals.json /^ "ByteLengthQueuingStrategy": false,$/;" b object:browser
|
177983
177983
|
ByteLengthQueuingStrategy node_modules/prettier-standard/node_modules/globals/globals.json /^ "ByteLengthQueuingStrategy": false,$/;" b object:browser
|
177984
177984
|
ByteLengthQueuingStrategy node_modules/prettier-standard/src/vendor/node_modules/globals/globals.json /^ "ByteLengthQueuingStrategy": false,$/;" b object:browser
|
177985
|
+
C app/assets/builds/turbo_reflex.js /^var L=class{get element(){return document.querySelector('meta[name="turbo-reflex"]')}get token()/;" c
|
177985
177986
|
C node_modules/@angular/compiler/bundles/compiler.umd.min.js /^ *\/(e.styles,Ra,ka):e.styles).map(function(e){return Tt(e)});a.set("styles",xt(R))}else e.e/;" c function:vc
|
177986
177987
|
C node_modules/@angular/compiler/bundles/compiler.umd.min.js /^ *\/var E,S,x=new RegExp("(\\\\:not\\\\()|([-\\\\w]+)|(?:\\\\.([-\\\\w]+))|(?:\\\\[([-.\\\\w/;" c function:anonymousFunctionc5ef6f7d0400
|
177987
177988
|
C node_modules/@popperjs/core/dist/umd/popper-base.min.js /^!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeo/;" c function:anonymousFunction0c33551f0300.x
|
@@ -182082,7 +182083,6 @@ CustomPromisifySymbol node_modules/@types/node/util.d.ts /^ export interface
|
|
182082
182083
|
Customizing node_modules/prettier-standard/README.md /^## Customizing$/;" s chapter:![prettier-standard](https://i.imgur.com/F62GQUk.png)
|
182083
182084
|
Cycript node_modules/linguist-languages/lib/index.js /^ "Cycript": require("..\/data\/Cycript"),$/;" p property:module.exports
|
182084
182085
|
Cython node_modules/linguist-languages/lib/index.js /^ "Cython": require("..\/data\/Cython"),$/;" p property:module.exports
|
182085
|
-
D app/assets/builds/turbo_reflex.js /^var L=class{get element(){return document.querySelector('meta[name="turbo-reflex"]')}get token()/;" v class:V
|
182086
182086
|
D node_modules/@popperjs/core/dist/umd/popper-base.min.js /^!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeo/;" c function:anonymousFunction0c33551f0300.x
|
182087
182087
|
D node_modules/ajv/dist/ajv.min.js /^!function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"=/;" p variable:anonymousFunctionc18fd2a30200.anonymousObjectc18fd2a3ee05
|
182088
182088
|
D node_modules/ajv/dist/ajv.min.js /^!function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"=/;" p variable:anonymousFunctionc18fd2a30200.anonymousObjectc18fd2a3f105
|
@@ -189661,7 +189661,7 @@ Gx node_modules/flow-parser/flow_parser.js /^Gx(d){var$/;" c function:anonymousF
|
|
189661
189661
|
Gz node_modules/flow-parser/flow_parser.js /^Gz(c){var$/;" c function:anonymousFunction19d4a6e20100.a$y.lz.lA.bac.ke.a$F.Gl.bad
|
189662
189662
|
Gzip node_modules/@types/node/ts4.8/zlib.d.ts /^ interface Gzip extends stream.Transform, Zlib {}$/;" i
|
189663
189663
|
Gzip node_modules/@types/node/zlib.d.ts /^ interface Gzip extends stream.Transform, Zlib {}$/;" i
|
189664
|
-
H app/assets/builds/turbo_reflex.js /^var L=class{get element(){return document.querySelector('meta[name="turbo-reflex"]')}get token()/;"
|
189664
|
+
H app/assets/builds/turbo_reflex.js /^var L=class{get element(){return document.querySelector('meta[name="turbo-reflex"]')}get token()/;" v
|
189665
189665
|
H node_modules/@angular/compiler/bundles/compiler.umd.min.js /^var ud="@angular\/core",pd=\/^\\$.*\\$$\/,ld={__symbolic:"ignore"},cd=new Set(["useValue","useFa/;" c function:t.simplify.r.n
|
189666
189666
|
H node_modules/date-fns/format/index.js /^ 'H': function (date) {$/;" m variable:formatters
|
189667
189667
|
H node_modules/diff/dist/diff.min.js /^!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeo/;" c
|
@@ -199467,7 +199467,7 @@ MyObject node_modules/reusify/benchmarks/reuseNoCodeFunction.js /^function MyObj
|
|
199467
199467
|
MyObject node_modules/reusify/test.js /^ function MyObject () {$/;" c
|
199468
199468
|
MyObject node_modules/reusify/test.js /^ function MyObject () {$/;" c function:anonymousFunctionbd9d7a530200
|
199469
199469
|
Myghty node_modules/linguist-languages/lib/index.js /^ "Myghty": require("..\/data\/Myghty"),$/;" p property:module.exports
|
199470
|
-
N app/assets/builds/turbo_reflex.js /^var L=class{get element(){return document.querySelector('meta[name="turbo-reflex"]')}get token()/;"
|
199470
|
+
N app/assets/builds/turbo_reflex.js /^var L=class{get element(){return document.querySelector('meta[name="turbo-reflex"]')}get token()/;" v class:V
|
199471
199471
|
N node_modules/.bin/handlebars /^ 'N': {$/;" p variable:anonymousObject48f5327c0105
|
199472
199472
|
N node_modules/@glimmer/syntax/node_modules/.bin/handlebars /^ 'N': {$/;" p variable:anonymousObject93e11d3b0105
|
199473
199473
|
N node_modules/@popperjs/core/dist/umd/popper-base.min.js /^!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeo/;" v function:anonymousFunction0c33551f0300.x
|
@@ -201206,7 +201206,7 @@ NumericLiteralTypeAnnotation node_modules/prettier-standard/src/vendor/node_modu
|
|
201206
201206
|
NumericSeparatorInEscapeSequence node_modules/@babel/parser/lib/index.js /^ NumericSeparatorInEscapeSequence: "Numeric separators are not allowed inside unicode escape se/;" p variable:anonymousObjectec9d46fc3a05
|
201207
201207
|
NumericSeparatorInEscapeSequence node_modules/prettier-standard/src/vendor/node_modules/@babel/parser/lib/index.js /^ NumericSeparatorInEscapeSequence: "Numeric separators are not allowed inside unicode escape se/;" p variable:anonymousObject60515bb93a05
|
201208
201208
|
NumericToken node_modules/prettier-standard/src/vendor/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-estree.d.ts /^export interface NumericToken extends BaseToken {$/;" i
|
201209
|
-
O app/assets/builds/turbo_reflex.js /^var L=class{get element(){return document.querySelector('meta[name="turbo-reflex"]')}get token()/;"
|
201209
|
+
O app/assets/builds/turbo_reflex.js /^var L=class{get element(){return document.querySelector('meta[name="turbo-reflex"]')}get token()/;" c
|
201210
201210
|
O node_modules/.bin/uglifyjs /^ O: "output-opts",$/;" p variable:short_forms
|
201211
201211
|
O node_modules/@popperjs/core/dist/umd/popper-base.min.js /^!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeo/;" c function:anonymousFunction0c33551f0300.x
|
201212
201212
|
O node_modules/@popperjs/core/dist/umd/popper-lite.min.js /^!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeo/;" c function:anonymousFunctiond6a363b20300.x
|
@@ -210000,6 +210000,7 @@ State$1 node_modules/@eslint/eslintrc/node_modules/js-yaml/dist/js-yaml.js /^ f
|
|
210000
210000
|
State$1 node_modules/@eslint/eslintrc/node_modules/js-yaml/dist/js-yaml.mjs /^function State$1(input, options) {$/;" c
|
210001
210001
|
State$1 node_modules/eslint/node_modules/js-yaml/dist/js-yaml.js /^ function State$1(input, options) {$/;" c
|
210002
210002
|
State$1 node_modules/eslint/node_modules/js-yaml/dist/js-yaml.mjs /^function State$1(input, options) {$/;" c
|
210003
|
+
StateDeserializationError lib/turbo_reflex/errors.rb /^ class StateDeserializationError < StandardError$/;" c module:TurboReflex
|
210003
210004
|
StateManager lib/turbo_reflex/state_manager.rb /^class TurboReflex::StateManager$/;" c module:TurboReflex mixin:include:ActiveModel.Dirty
|
210004
210005
|
StateOffsets node_modules/@popperjs/core/lib/types.d.ts /^export declare type StateOffsets = {$/;" a
|
210005
210006
|
StateRects node_modules/@popperjs/core/lib/types.d.ts /^export declare type StateRects = {$/;" a
|
@@ -216621,7 +216622,7 @@ VDash node_modules/parse-srcset/tests/he.js /^ var decodeMap = {'Aacute':'\\xC1'
|
|
216621
216622
|
VDash node_modules/simple-html-tokenizer/dist/es6/index.js /^ Aacute: "Á", aacute: "á", Abreve: "Ă", abreve: "ă", ac: "∾", acd: "∿", acE: "∾̳",/;" p variable:namedCharRefs
|
216622
216623
|
VDash node_modules/simple-html-tokenizer/dist/simple-html-tokenizer.js /^ Aacute: "Á", aacute: "á", Abreve: "Ă", abreve: "ă", ac: "∾", acd: "∿", acE: "∾/;" p variable:anonymousFunction3825d8d70300.namedCharRefs
|
216623
216624
|
VDash node_modules/simple-html-tokenizer/dist/types/generated/html5-named-char-refs.d.ts /^ VDash: string;$/;" C
|
216624
|
-
VERSION lib/turbo_reflex/version.rb /^ VERSION = "0.0.
|
216625
|
+
VERSION lib/turbo_reflex/version.rb /^ VERSION = "0.0.14"$/;" C module:TurboReflex
|
216625
216626
|
VERSION node_modules/@angular/compiler/esm2015/src/output/source_map.js /^const VERSION = 3;$/;" C
|
216626
216627
|
VERSION node_modules/@angular/compiler/esm2015/src/version.js /^export const VERSION = new Version('8.2.14');$/;" C
|
216627
216628
|
VERSION node_modules/@angular/compiler/esm5/src/output/source_map.js /^var VERSION = 3;$/;" v
|
@@ -261217,7 +261218,7 @@ anonymousObject48fd2bc50705 app/assets/builds/turbo_reflex.js /^var L=class{get
|
|
261217
261218
|
anonymousObject48fd2bc50805 app/assets/builds/turbo_reflex.js /^var L=class{get element(){return document.querySelector('meta[name="turbo-reflex"]')}get token()/;" v method:g.anonymousObject48fd2bc50405.set
|
261218
261219
|
anonymousObject48fd2bc50905 app/assets/builds/turbo_reflex.js /^var L=class{get element(){return document.querySelector('meta[name="turbo-reflex"]')}get token()/;" v
|
261219
261220
|
anonymousObject48fd2bc51005 app/assets/builds/turbo_reflex.js /^var L=class{get element(){return document.querySelector('meta[name="turbo-reflex"]')}get token()/;" v function:V.ie
|
261220
|
-
anonymousObject48fd2bc51105 app/assets/builds/turbo_reflex.js /^var L=class{get element(){return document.querySelector('meta[name="turbo-reflex"]')}get token()/;" v
|
261221
|
+
anonymousObject48fd2bc51105 app/assets/builds/turbo_reflex.js /^var L=class{get element(){return document.querySelector('meta[name="turbo-reflex"]')}get token()/;" v function:V.$
|
261221
261222
|
anonymousObject48fd2bc51205 app/assets/builds/turbo_reflex.js /^var L=class{get element(){return document.querySelector('meta[name="turbo-reflex"]')}get token()/;" v class:V
|
261222
261223
|
anonymousObject48fd2bc51305 app/assets/builds/turbo_reflex.js /^var L=class{get element(){return document.querySelector('meta[name="turbo-reflex"]')}get token()/;" v
|
261223
261224
|
anonymousObject48fd2bc51405 app/assets/builds/turbo_reflex.js /^var L=class{get element(){return document.querySelector('meta[name="turbo-reflex"]')}get token()/;" v function:ce
|
@@ -302548,6 +302549,7 @@ cookie node_modules/@types/node/http.d.ts /^ cookie?: string | undefined;
|
|
302548
302549
|
cookie node_modules/@types/node/ts4.8/http.d.ts /^ cookie?: string | undefined;$/;" p interface:IncomingHttpHeaders
|
302549
302550
|
cookie_max_bytesize lib/turbo_reflex/state_manager.rb /^ def cookie_max_bytesize$/;" S class:StateManager
|
302550
302551
|
cookie_max_bytesize= lib/turbo_reflex/state_manager.rb /^ attr_writer :cookie_max_bytesize$/;" A class:StateManager
|
302552
|
+
cookies lib/turbo_reflex/runner.rb /^ def cookies$/;" f class:Runner
|
302551
302553
|
coordinates node_modules/ci-info/package.json /^ "coordinates": [$/;" a
|
302552
302554
|
coordinates node_modules/is-ci/package.json /^ "coordinates": [$/;" a
|
302553
302555
|
cop node_modules/character-entities/index.json /^ "cop": "©",$/;" s
|
@@ -353644,9 +353646,9 @@ invokePartialWrapper node_modules/handlebars/dist/handlebars.amd.js /^ functi
|
|
353644
353646
|
invokePartialWrapper node_modules/handlebars/dist/handlebars.runtime.amd.js /^ function invokePartialWrapper(partial, context, options) {$/;" f function:anonymousFunction9e3e54892f00.template
|
353645
353647
|
invokePartialWrapper node_modules/handlebars/lib/handlebars/runtime.js /^ function invokePartialWrapper(partial, context, options) {$/;" f function:template
|
353646
353648
|
invokeReflex app/assets/builds/turbo_reflex.js /^var L=class{get element(){return document.querySelector('meta[name="turbo-reflex"]')}get token()/;" p variable:P
|
353647
|
-
invokeReflex app/assets/builds/turbo_reflex.js /^var L=class{get element(){return document.querySelector('meta[name="turbo-reflex"]')}get token()/;" p variable:V.D
|
353648
353649
|
invokeReflex app/assets/builds/turbo_reflex.js /^var L=class{get element(){return document.querySelector('meta[name="turbo-reflex"]')}get token()/;" p variable:V.I
|
353649
353650
|
invokeReflex app/assets/builds/turbo_reflex.js /^var L=class{get element(){return document.querySelector('meta[name="turbo-reflex"]')}get token()/;" p variable:V.J
|
353651
|
+
invokeReflex app/assets/builds/turbo_reflex.js /^var L=class{get element(){return document.querySelector('meta[name="turbo-reflex"]')}get token()/;" p variable:V.N
|
353650
353652
|
invokeReflex app/assets/builds/turbo_reflex.js /^var L=class{get element(){return document.querySelector('meta[name="turbo-reflex"]')}get token()/;" p variable:anonymousObject48fd2bc51305
|
353651
353653
|
invokeReflex app/javascript/drivers/form.js /^function invokeReflex (form, payload = {}) {$/;" f
|
353652
353654
|
invokeReflex app/javascript/drivers/frame.js /^function invokeReflex (frame, payload) {$/;" f
|
@@ -415655,7 +415657,7 @@ pwd node_modules/prettier-standard/node_modules/globals/globals.json /^ "pwd":
|
|
415655
415657
|
pwd node_modules/prettier-standard/node_modules/globals/globals.json /^ "pwd": false,$/;" b object:shelljs
|
415656
415658
|
pwd node_modules/prettier-standard/src/vendor/node_modules/globals/globals.json /^ "pwd": false,$/;" b object:mongo
|
415657
415659
|
pwd node_modules/prettier-standard/src/vendor/node_modules/globals/globals.json /^ "pwd": false,$/;" b object:shelljs
|
415658
|
-
q app/assets/builds/turbo_reflex.js /^var L=class{get element(){return document.querySelector('meta[name="turbo-reflex"]')}get token()/;"
|
415660
|
+
q app/assets/builds/turbo_reflex.js /^var L=class{get element(){return document.querySelector('meta[name="turbo-reflex"]')}get token()/;" f
|
415659
415661
|
q node_modules/@popperjs/core/dist/umd/popper-lite.min.js /^!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeo/;" f function:anonymousFunctiond6a363b20300.x
|
415660
415662
|
q node_modules/@popperjs/core/dist/umd/popper.min.js /^!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeo/;" f class:anonymousFunctiona1f41a370300.O
|
415661
415663
|
q node_modules/braces/lib/expand.js /^ let q = parent.queue;$/;" v
|
@@ -449674,8 +449676,6 @@ turbo_ready package.json /^ "turbo_ready": ">= 0.1"$/;" s object:peerDependen
|
|
449674
449676
|
turbo_reflex app/controllers/concerns/turbo_reflex/controller.rb /^ def turbo_reflex$/;" f module:Controller
|
449675
449677
|
turbo_reflex turbo_reflex.gemspec /^ s.name = "turbo_reflex"$/;" g
|
449676
449678
|
turbo_reflex_state app/controllers/concerns/turbo_reflex/controller.rb /^ def turbo_reflex_state(&block)$/;" f module:Controller.ClassMethods
|
449677
|
-
turbo_reflex_state_cookie_max_bytesize app/controllers/concerns/turbo_reflex/controller.rb /^ def turbo_reflex_state_cookie_max_bytesize$/;" f module:Controller.ClassMethods
|
449678
|
-
turbo_reflex_state_cookie_max_bytesize= app/controllers/concerns/turbo_reflex/controller.rb /^ def turbo_reflex_state_cookie_max_bytesize=(value)$/;" f module:Controller.ClassMethods
|
449679
449679
|
turbo_stream lib/turbo_reflex/runner.rb /^ def turbo_stream$/;" f class:Runner
|
449680
449680
|
turbo_streams lib/turbo_reflex/base.rb /^ attr_reader :controller, :turbo_streams$/;" A class:Base
|
449681
449681
|
turkish node_modules/iconv-lite/encodings/sbcs-data.js /^ "turkish": "iso88599",$/;" p property:module.exports
|
@@ -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.13",$/;" 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
|
@@ -474843,7 +474843,7 @@ vzigzag node_modules/parse-srcset/tests/he.js /^ var decodeMap = {'Aacute':'\\xC
|
|
474843
474843
|
vzigzag node_modules/simple-html-tokenizer/dist/es6/index.js /^ Aacute: "Á", aacute: "á", Abreve: "Ă", abreve: "ă", ac: "∾", acd: "∿", acE: "∾̳",/;" p variable:namedCharRefs
|
474844
474844
|
vzigzag node_modules/simple-html-tokenizer/dist/simple-html-tokenizer.js /^ Aacute: "Á", aacute: "á", Abreve: "Ă", abreve: "ă", ac: "∾", acd: "∿", acE: "∾/;" p variable:anonymousFunction3825d8d70300.namedCharRefs
|
474845
474845
|
vzigzag node_modules/simple-html-tokenizer/dist/types/generated/html5-named-char-refs.d.ts /^ vzigzag: string;$/;" C
|
474846
|
-
w app/assets/builds/turbo_reflex.js /^var L=class{get element(){return document.querySelector('meta[name="turbo-reflex"]')}get token()/;"
|
474846
|
+
w app/assets/builds/turbo_reflex.js /^var L=class{get element(){return document.querySelector('meta[name="turbo-reflex"]')}get token()/;" v
|
474847
474847
|
w node_modules/@angular/compiler/bundles/compiler.umd.min.js /^ *\/(e.styles,Ra,ka):e.styles).map(function(e){return Tt(e)});a.set("styles",xt(R))}else e.e/;" f function:vc
|
474848
474848
|
w node_modules/@angular/compiler/bundles/compiler.umd.min.js /^ *\/var E,S,x=new RegExp("(\\\\:not\\\\()|([-\\\\w]+)|(?:\\\\.([-\\\\w]+))|(?:\\\\[([-.\\\\w/;" f function:anonymousFunctionc5ef6f7d0400.t.n
|
474849
474849
|
w node_modules/@eslint/eslintrc/node_modules/js-yaml/dist/js-yaml.min.js /^!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeo/;" f
|
@@ -477945,7 +477945,7 @@ xharr node_modules/parse-srcset/tests/he.js /^ var decodeMap = {'Aacute':'\\xC1'
|
|
477945
477945
|
xharr node_modules/simple-html-tokenizer/dist/es6/index.js /^ Aacute: "Á", aacute: "á", Abreve: "Ă", abreve: "ă", ac: "∾", acd: "∿", acE: "∾̳",/;" p variable:namedCharRefs
|
477946
477946
|
xharr node_modules/simple-html-tokenizer/dist/simple-html-tokenizer.js /^ Aacute: "Á", aacute: "á", Abreve: "Ă", abreve: "ă", ac: "∾", acd: "∿", acE: "∾/;" p variable:anonymousFunction3825d8d70300.namedCharRefs
|
477947
477947
|
xharr node_modules/simple-html-tokenizer/dist/types/generated/html5-named-char-refs.d.ts /^ xharr: string;$/;" C
|
477948
|
-
xhr app/assets/builds/turbo_reflex.js /^var L=class{get element(){return document.querySelector('meta[name="turbo-reflex"]')}get token()/;" p variable:V
|
477948
|
+
xhr app/assets/builds/turbo_reflex.js /^var L=class{get element(){return document.querySelector('meta[name="turbo-reflex"]')}get token()/;" p variable:V.$.anonymousObject48fd2bc51105
|
477949
477949
|
xhr app/assets/builds/turbo_reflex.js /^var L=class{get element(){return document.querySelector('meta[name="turbo-reflex"]')}get token()/;" p variable:V.ie.anonymousObject48fd2bc51005
|
477950
477950
|
xhr app/javascript/drivers/window.js /^ { xhr, ...event.detail, error },$/;" M variable:errored
|
477951
477951
|
xhr app/javascript/drivers/window.js /^ dispatch(lifecycle.events.abort, document, { xhr, ...event.detail })$/;" M variable:aborted
|
data/yarn.lock
CHANGED
@@ -49,15 +49,15 @@
|
|
49
49
|
dependencies:
|
50
50
|
regenerator-runtime "^0.13.10"
|
51
51
|
|
52
|
-
"@esbuild/android-arm@0.15.
|
53
|
-
version "0.15.
|
54
|
-
resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.15.
|
55
|
-
integrity sha512-
|
52
|
+
"@esbuild/android-arm@0.15.13":
|
53
|
+
version "0.15.13"
|
54
|
+
resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.15.13.tgz#ce11237a13ee76d5eae3908e47ba4ddd380af86a"
|
55
|
+
integrity sha512-RY2fVI8O0iFUNvZirXaQ1vMvK0xhCcl0gqRj74Z6yEiO1zAUa7hbsdwZM1kzqbxHK7LFyMizipfXT3JME+12Hw==
|
56
56
|
|
57
|
-
"@esbuild/linux-loong64@0.15.
|
58
|
-
version "0.15.
|
59
|
-
resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.15.
|
60
|
-
integrity sha512
|
57
|
+
"@esbuild/linux-loong64@0.15.13":
|
58
|
+
version "0.15.13"
|
59
|
+
resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.15.13.tgz#64e8825bf0ce769dac94ee39d92ebe6272020dfc"
|
60
|
+
integrity sha512-+BoyIm4I8uJmH/QDIH0fu7MG0AEx9OXEDXnqptXCwKOlOqZiS4iraH1Nr7/ObLMokW3sOCeBNyD68ATcV9b9Ag==
|
61
61
|
|
62
62
|
"@eslint/eslintrc@^1.3.3":
|
63
63
|
version "1.3.3"
|
@@ -677,133 +677,133 @@ error-ex@^1.3.1:
|
|
677
677
|
dependencies:
|
678
678
|
is-arrayish "^0.2.1"
|
679
679
|
|
680
|
-
esbuild-android-64@0.15.
|
681
|
-
version "0.15.
|
682
|
-
resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.15.
|
683
|
-
integrity sha512-
|
684
|
-
|
685
|
-
esbuild-android-arm64@0.15.
|
686
|
-
version "0.15.
|
687
|
-
resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.15.
|
688
|
-
integrity sha512-
|
689
|
-
|
690
|
-
esbuild-darwin-64@0.15.
|
691
|
-
version "0.15.
|
692
|
-
resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.15.
|
693
|
-
integrity sha512-
|
694
|
-
|
695
|
-
esbuild-darwin-arm64@0.15.
|
696
|
-
version "0.15.
|
697
|
-
resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.
|
698
|
-
integrity sha512-
|
699
|
-
|
700
|
-
esbuild-freebsd-64@0.15.
|
701
|
-
version "0.15.
|
702
|
-
resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.
|
703
|
-
integrity sha512-
|
704
|
-
|
705
|
-
esbuild-freebsd-arm64@0.15.
|
706
|
-
version "0.15.
|
707
|
-
resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.
|
708
|
-
integrity sha512-
|
709
|
-
|
710
|
-
esbuild-linux-32@0.15.
|
711
|
-
version "0.15.
|
712
|
-
resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.15.
|
713
|
-
integrity sha512-
|
714
|
-
|
715
|
-
esbuild-linux-64@0.15.
|
716
|
-
version "0.15.
|
717
|
-
resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.15.
|
718
|
-
integrity sha512-
|
719
|
-
|
720
|
-
esbuild-linux-arm64@0.15.
|
721
|
-
version "0.15.
|
722
|
-
resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.
|
723
|
-
integrity sha512-
|
724
|
-
|
725
|
-
esbuild-linux-arm@0.15.
|
726
|
-
version "0.15.
|
727
|
-
resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.15.
|
728
|
-
integrity sha512-
|
729
|
-
|
730
|
-
esbuild-linux-mips64le@0.15.
|
731
|
-
version "0.15.
|
732
|
-
resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.
|
733
|
-
integrity sha512-
|
734
|
-
|
735
|
-
esbuild-linux-ppc64le@0.15.
|
736
|
-
version "0.15.
|
737
|
-
resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.
|
738
|
-
integrity sha512-
|
739
|
-
|
740
|
-
esbuild-linux-riscv64@0.15.
|
741
|
-
version "0.15.
|
742
|
-
resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.
|
743
|
-
integrity sha512
|
744
|
-
|
745
|
-
esbuild-linux-s390x@0.15.
|
746
|
-
version "0.15.
|
747
|
-
resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.
|
748
|
-
integrity sha512-
|
749
|
-
|
750
|
-
esbuild-netbsd-64@0.15.
|
751
|
-
version "0.15.
|
752
|
-
resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.
|
753
|
-
integrity sha512-
|
754
|
-
|
755
|
-
esbuild-openbsd-64@0.15.
|
756
|
-
version "0.15.
|
757
|
-
resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.
|
758
|
-
integrity sha512-
|
759
|
-
|
760
|
-
esbuild-sunos-64@0.15.
|
761
|
-
version "0.15.
|
762
|
-
resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.15.
|
763
|
-
integrity sha512-
|
764
|
-
|
765
|
-
esbuild-windows-32@0.15.
|
766
|
-
version "0.15.
|
767
|
-
resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.15.
|
768
|
-
integrity sha512-
|
769
|
-
|
770
|
-
esbuild-windows-64@0.15.
|
771
|
-
version "0.15.
|
772
|
-
resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.15.
|
773
|
-
integrity sha512-
|
774
|
-
|
775
|
-
esbuild-windows-arm64@0.15.
|
776
|
-
version "0.15.
|
777
|
-
resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.
|
778
|
-
integrity sha512-
|
680
|
+
esbuild-android-64@0.15.13:
|
681
|
+
version "0.15.13"
|
682
|
+
resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.15.13.tgz#5f25864055dbd62e250f360b38b4c382224063af"
|
683
|
+
integrity sha512-yRorukXBlokwTip+Sy4MYskLhJsO0Kn0/Fj43s1krVblfwP+hMD37a4Wmg139GEsMLl+vh8WXp2mq/cTA9J97g==
|
684
|
+
|
685
|
+
esbuild-android-arm64@0.15.13:
|
686
|
+
version "0.15.13"
|
687
|
+
resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.15.13.tgz#d8820f999314efbe8e0f050653a99ff2da632b0f"
|
688
|
+
integrity sha512-TKzyymLD6PiVeyYa4c5wdPw87BeAiTXNtK6amWUcXZxkV51gOk5u5qzmDaYSwiWeecSNHamFsaFjLoi32QR5/w==
|
689
|
+
|
690
|
+
esbuild-darwin-64@0.15.13:
|
691
|
+
version "0.15.13"
|
692
|
+
resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.15.13.tgz#99ae7fdaa43947b06cd9d1a1c3c2c9f245d81fd0"
|
693
|
+
integrity sha512-WAx7c2DaOS6CrRcoYCgXgkXDliLnFv3pQLV6GeW1YcGEZq2Gnl8s9Pg7ahValZkpOa0iE/ojRVQ87sbUhF1Cbg==
|
694
|
+
|
695
|
+
esbuild-darwin-arm64@0.15.13:
|
696
|
+
version "0.15.13"
|
697
|
+
resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.13.tgz#bafa1814354ad1a47adcad73de416130ef7f55e3"
|
698
|
+
integrity sha512-U6jFsPfSSxC3V1CLiQqwvDuj3GGrtQNB3P3nNC3+q99EKf94UGpsG9l4CQ83zBs1NHrk1rtCSYT0+KfK5LsD8A==
|
699
|
+
|
700
|
+
esbuild-freebsd-64@0.15.13:
|
701
|
+
version "0.15.13"
|
702
|
+
resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.13.tgz#84ef85535c5cc38b627d1c5115623b088d1de161"
|
703
|
+
integrity sha512-whItJgDiOXaDG/idy75qqevIpZjnReZkMGCgQaBWZuKHoElDJC1rh7MpoUgupMcdfOd+PgdEwNQW9DAE6i8wyA==
|
704
|
+
|
705
|
+
esbuild-freebsd-arm64@0.15.13:
|
706
|
+
version "0.15.13"
|
707
|
+
resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.13.tgz#033f21de434ec8e0c478054b119af8056763c2d8"
|
708
|
+
integrity sha512-6pCSWt8mLUbPtygv7cufV0sZLeylaMwS5Fznj6Rsx9G2AJJsAjQ9ifA+0rQEIg7DwJmi9it+WjzNTEAzzdoM3Q==
|
709
|
+
|
710
|
+
esbuild-linux-32@0.15.13:
|
711
|
+
version "0.15.13"
|
712
|
+
resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.15.13.tgz#54290ea8035cba0faf1791ce9ae6693005512535"
|
713
|
+
integrity sha512-VbZdWOEdrJiYApm2kkxoTOgsoCO1krBZ3quHdYk3g3ivWaMwNIVPIfEE0f0XQQ0u5pJtBsnk2/7OPiCFIPOe/w==
|
714
|
+
|
715
|
+
esbuild-linux-64@0.15.13:
|
716
|
+
version "0.15.13"
|
717
|
+
resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.15.13.tgz#4264249281ea388ead948614b57fb1ddf7779a2c"
|
718
|
+
integrity sha512-rXmnArVNio6yANSqDQlIO4WiP+Cv7+9EuAHNnag7rByAqFVuRusLbGi2697A5dFPNXoO//IiogVwi3AdcfPC6A==
|
719
|
+
|
720
|
+
esbuild-linux-arm64@0.15.13:
|
721
|
+
version "0.15.13"
|
722
|
+
resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.13.tgz#9323c333924f97a02bdd2ae8912b36298acb312d"
|
723
|
+
integrity sha512-alEMGU4Z+d17U7KQQw2IV8tQycO6T+rOrgW8OS22Ua25x6kHxoG6Ngry6Aq6uranC+pNWNMB6aHFPh7aTQdORQ==
|
724
|
+
|
725
|
+
esbuild-linux-arm@0.15.13:
|
726
|
+
version "0.15.13"
|
727
|
+
resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.15.13.tgz#b407f47b3ae721fe4e00e19e9f19289bef87a111"
|
728
|
+
integrity sha512-Ac6LpfmJO8WhCMQmO253xX2IU2B3wPDbl4IvR0hnqcPrdfCaUa2j/lLMGTjmQ4W5JsJIdHEdW12dG8lFS0MbxQ==
|
729
|
+
|
730
|
+
esbuild-linux-mips64le@0.15.13:
|
731
|
+
version "0.15.13"
|
732
|
+
resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.13.tgz#bdf905aae5c0bcaa8f83567fe4c4c1bdc1f14447"
|
733
|
+
integrity sha512-47PgmyYEu+yN5rD/MbwS6DxP2FSGPo4Uxg5LwIdxTiyGC2XKwHhHyW7YYEDlSuXLQXEdTO7mYe8zQ74czP7W8A==
|
734
|
+
|
735
|
+
esbuild-linux-ppc64le@0.15.13:
|
736
|
+
version "0.15.13"
|
737
|
+
resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.13.tgz#2911eae1c90ff58a3bd3259cb557235df25aa3b4"
|
738
|
+
integrity sha512-z6n28h2+PC1Ayle9DjKoBRcx/4cxHoOa2e689e2aDJSaKug3jXcQw7mM+GLg+9ydYoNzj8QxNL8ihOv/OnezhA==
|
739
|
+
|
740
|
+
esbuild-linux-riscv64@0.15.13:
|
741
|
+
version "0.15.13"
|
742
|
+
resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.13.tgz#1837c660be12b1d20d2a29c7189ea703f93e9265"
|
743
|
+
integrity sha512-+Lu4zuuXuQhgLUGyZloWCqTslcCAjMZH1k3Xc9MSEJEpEFdpsSU0sRDXAnk18FKOfEjhu4YMGaykx9xjtpA6ow==
|
744
|
+
|
745
|
+
esbuild-linux-s390x@0.15.13:
|
746
|
+
version "0.15.13"
|
747
|
+
resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.13.tgz#d52880ece229d1bd10b2d936b792914ffb07c7fc"
|
748
|
+
integrity sha512-BMeXRljruf7J0TMxD5CIXS65y7puiZkAh+s4XFV9qy16SxOuMhxhVIXYLnbdfLrsYGFzx7U9mcdpFWkkvy/Uag==
|
749
|
+
|
750
|
+
esbuild-netbsd-64@0.15.13:
|
751
|
+
version "0.15.13"
|
752
|
+
resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.13.tgz#de14da46f1d20352b43e15d97a80a8788275e6ed"
|
753
|
+
integrity sha512-EHj9QZOTel581JPj7UO3xYbltFTYnHy+SIqJVq6yd3KkCrsHRbapiPb0Lx3EOOtybBEE9EyqbmfW1NlSDsSzvQ==
|
754
|
+
|
755
|
+
esbuild-openbsd-64@0.15.13:
|
756
|
+
version "0.15.13"
|
757
|
+
resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.13.tgz#45e8a5fd74d92ad8f732c43582369c7990f5a0ac"
|
758
|
+
integrity sha512-nkuDlIjF/sfUhfx8SKq0+U+Fgx5K9JcPq1mUodnxI0x4kBdCv46rOGWbuJ6eof2n3wdoCLccOoJAbg9ba/bT2w==
|
759
|
+
|
760
|
+
esbuild-sunos-64@0.15.13:
|
761
|
+
version "0.15.13"
|
762
|
+
resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.15.13.tgz#f646ac3da7aac521ee0fdbc192750c87da697806"
|
763
|
+
integrity sha512-jVeu2GfxZQ++6lRdY43CS0Tm/r4WuQQ0Pdsrxbw+aOrHQPHV0+LNOLnvbN28M7BSUGnJnHkHm2HozGgNGyeIRw==
|
764
|
+
|
765
|
+
esbuild-windows-32@0.15.13:
|
766
|
+
version "0.15.13"
|
767
|
+
resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.15.13.tgz#fb4fe77c7591418880b3c9b5900adc4c094f2401"
|
768
|
+
integrity sha512-XoF2iBf0wnqo16SDq+aDGi/+QbaLFpkiRarPVssMh9KYbFNCqPLlGAWwDvxEVz+ywX6Si37J2AKm+AXq1kC0JA==
|
769
|
+
|
770
|
+
esbuild-windows-64@0.15.13:
|
771
|
+
version "0.15.13"
|
772
|
+
resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.15.13.tgz#1fca8c654392c0c31bdaaed168becfea80e20660"
|
773
|
+
integrity sha512-Et6htEfGycjDrtqb2ng6nT+baesZPYQIW+HUEHK4D1ncggNrDNk3yoboYQ5KtiVrw/JaDMNttz8rrPubV/fvPQ==
|
774
|
+
|
775
|
+
esbuild-windows-arm64@0.15.13:
|
776
|
+
version "0.15.13"
|
777
|
+
resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.13.tgz#4ffd01b6b2888603f1584a2fe96b1f6a6f2b3dd8"
|
778
|
+
integrity sha512-3bv7tqntThQC9SWLRouMDmZnlOukBhOCTlkzNqzGCmrkCJI7io5LLjwJBOVY6kOUlIvdxbooNZwjtBvj+7uuVg==
|
779
779
|
|
780
780
|
esbuild@^0.15.7:
|
781
|
-
version "0.15.
|
782
|
-
resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.15.
|
783
|
-
integrity sha512-
|
781
|
+
version "0.15.13"
|
782
|
+
resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.15.13.tgz#7293480038feb2bafa91d3f6a20edab3ba6c108a"
|
783
|
+
integrity sha512-Cu3SC84oyzzhrK/YyN4iEVy2jZu5t2fz66HEOShHURcjSkOSAVL8C/gfUT+lDJxkVHpg8GZ10DD0rMHRPqMFaQ==
|
784
784
|
optionalDependencies:
|
785
|
-
"@esbuild/android-arm" "0.15.
|
786
|
-
"@esbuild/linux-loong64" "0.15.
|
787
|
-
esbuild-android-64 "0.15.
|
788
|
-
esbuild-android-arm64 "0.15.
|
789
|
-
esbuild-darwin-64 "0.15.
|
790
|
-
esbuild-darwin-arm64 "0.15.
|
791
|
-
esbuild-freebsd-64 "0.15.
|
792
|
-
esbuild-freebsd-arm64 "0.15.
|
793
|
-
esbuild-linux-32 "0.15.
|
794
|
-
esbuild-linux-64 "0.15.
|
795
|
-
esbuild-linux-arm "0.15.
|
796
|
-
esbuild-linux-arm64 "0.15.
|
797
|
-
esbuild-linux-mips64le "0.15.
|
798
|
-
esbuild-linux-ppc64le "0.15.
|
799
|
-
esbuild-linux-riscv64 "0.15.
|
800
|
-
esbuild-linux-s390x "0.15.
|
801
|
-
esbuild-netbsd-64 "0.15.
|
802
|
-
esbuild-openbsd-64 "0.15.
|
803
|
-
esbuild-sunos-64 "0.15.
|
804
|
-
esbuild-windows-32 "0.15.
|
805
|
-
esbuild-windows-64 "0.15.
|
806
|
-
esbuild-windows-arm64 "0.15.
|
785
|
+
"@esbuild/android-arm" "0.15.13"
|
786
|
+
"@esbuild/linux-loong64" "0.15.13"
|
787
|
+
esbuild-android-64 "0.15.13"
|
788
|
+
esbuild-android-arm64 "0.15.13"
|
789
|
+
esbuild-darwin-64 "0.15.13"
|
790
|
+
esbuild-darwin-arm64 "0.15.13"
|
791
|
+
esbuild-freebsd-64 "0.15.13"
|
792
|
+
esbuild-freebsd-arm64 "0.15.13"
|
793
|
+
esbuild-linux-32 "0.15.13"
|
794
|
+
esbuild-linux-64 "0.15.13"
|
795
|
+
esbuild-linux-arm "0.15.13"
|
796
|
+
esbuild-linux-arm64 "0.15.13"
|
797
|
+
esbuild-linux-mips64le "0.15.13"
|
798
|
+
esbuild-linux-ppc64le "0.15.13"
|
799
|
+
esbuild-linux-riscv64 "0.15.13"
|
800
|
+
esbuild-linux-s390x "0.15.13"
|
801
|
+
esbuild-netbsd-64 "0.15.13"
|
802
|
+
esbuild-openbsd-64 "0.15.13"
|
803
|
+
esbuild-sunos-64 "0.15.13"
|
804
|
+
esbuild-windows-32 "0.15.13"
|
805
|
+
esbuild-windows-64 "0.15.13"
|
806
|
+
esbuild-windows-arm64 "0.15.13"
|
807
807
|
|
808
808
|
escape-string-regexp@2.0.0:
|
809
809
|
version "2.0.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: turbo_reflex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nate Hopkins (hopsoft)
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-11-
|
11
|
+
date: 2022-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|