Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@plasmicapp/query

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@plasmicapp/query - npm Package Compare versions

Comparing version 0.1.65 to 0.1.66

2

dist/query-data.d.ts

@@ -5,3 +5,3 @@ import React, { PropsWithChildren } from 'react';

export type { SWRResponse } from 'swr';
export declare const mutateAllKeys: () => void;
export declare const mutateKeys: (invalidateKey?: string | undefined) => void;
/**

@@ -8,0 +8,0 @@ * Fetches data asynchronously. This data should be considered immutable for the

@@ -715,3 +715,3 @@ 'use client';'use strict';

var __SWRConfig = undefined;
var mutateAllKeys = function mutateAllKeys() {
var mutateKeys = function mutateKeys(invalidateKey) {
if (__SWRConfig) {

@@ -721,3 +721,3 @@ var _SWRConfig = __SWRConfig,

mutate = _SWRConfig.mutate;
Array.from(cache.keys()).forEach(function (key) {
(invalidateKey != null ? [invalidateKey] : Array.from(cache.keys())).forEach(function (key) {
mutate(key);

@@ -954,6 +954,6 @@ });

var maybeExistingMutateAllKeys = root.__SWRMutateAllKeys;
root.__SWRMutateAllKeys = function () {
mutateAllKeys();
root.__SWRMutateAllKeys = function (invalidateKey) {
mutateKeys(invalidateKey);
if (typeof maybeExistingMutateAllKeys === 'function') {
maybeExistingMutateAllKeys();
maybeExistingMutateAllKeys(invalidateKey);
}

@@ -960,0 +960,0 @@ };

@@ -1,2 +0,2 @@

'use client';"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t.default:t}Object.defineProperty(exports,"__esModule",{value:!0});var e=t(require("react")),r=require("swr"),n=t(r);function o(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function i(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function u(t){o(a,n,i,u,c,"next",t)}function c(t){o(a,n,i,u,c,"throw",t)}u(void 0)}))}}function a(){return(a=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function u(t,e){return t(e={exports:{}},e.exports),e.exports}var c=u((function(t){var e=function(t){var e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var o=Object.create((e&&e.prototype instanceof l?e:l).prototype),i=new L(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=x(a,r);if(u){if(u===f)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=s(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(t,r,i),o}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function l(){}function h(){}function p(){}var v={};u(v,o,(function(){return this}));var d=Object.getPrototypeOf,y=d&&d(d(_([])));y&&y!==e&&r.call(y,o)&&(v=y);var g=p.prototype=l.prototype=Object.create(v);function m(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){var n;this._invoke=function(o,i){function a(){return new e((function(n,a){!function n(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var f=c.arg,l=f.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}(o,i,n,a)}))}return n=n?n.then(a,a):a()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,u(g,"constructor",p),u(p,"constructor",h),h.displayName=u(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,u(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(w.prototype),u(w.prototype,i,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(c(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),u(g,a,"Generator"),u(g,o,(function(){return this})),u(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}})),s=void 0,f=e.createContext(!1),l=0,h=[];function p(t){return i(c.mark((function e(){var r,n=arguments;return c.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0===l&&h.forEach((function(t){return t(!0)})),l+=1,e.prev=2,!v(r=t.apply(void 0,n))){e.next=10;break}return e.next=7,r;case 7:e.t0=e.sent,e.next=11;break;case 10:e.t0=r;case 11:return e.abrupt("return",e.t0);case 12:return e.prev=12,0==(l-=1)&&h.forEach((function(t){return t(!1)})),e.finish(12);case 16:case"end":return e.stop()}}),e,null,[[2,,12,16]])})))}function v(t){return!!t&&"object"==typeof t&&"then"in t&&"function"==typeof t.then}if("undefined"!=typeof window){var d=window,y=d.__SWRMutateAllKeys;d.__SWRMutateAllKeys=function(){!function(){if(s){var t=s.mutate;Array.from(s.cache.keys()).forEach((function(e){t(e)}))}}(),"function"==typeof y&&y()}}Object.defineProperty(exports,"useSWRConfig",{enumerable:!0,get:function(){return r.useSWRConfig}}),exports.PlasmicPrepassContext=function(t){var n=t.cache;return e.createElement(f.Provider,{value:!0},e.createElement(r.SWRConfig,{value:{provider:function(){return n},suspense:!0,fallback:{}}},t.children))},exports.PlasmicQueryDataProvider=function(t){var n=t.children,o=t.suspense,i=t.prefetchedCache;return e.useContext(f)?e.createElement(e.Fragment,null,n):e.createElement(r.SWRConfig,{value:{fallback:null!=i?i:{},suspense:o}},n)},exports.addLoadingStateListener=function(t,e){return h.push(t),null!=e&&e.immediate&&t(l>0),function(){h.splice(h.indexOf(t),1)}},exports.isPlasmicPrepass=function(){var t,r,n;return!(null==(t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||null==(r=t.ReactCurrentDispatcher)||null==(n=r.current)||!n.isPlasmicPrepass)},exports.useMutablePlasmicQueryData=function(t,o,u){var l=e.useContext(f),h=a({},{revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1},u);l&&(h.suspense=!0);var v=r.useSWRConfig();e.useEffect((function(){s=v}),[v]);var d=e.useState(!1),y=d[0],g=d[1],m=e.useCallback(i(c.mark((function t(){var e=arguments;return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return g(!0),t.prev=1,t.next=4,p(o).apply(void 0,e);case 4:return t.abrupt("return",t.sent);case 5:return t.prev=5,g(!1),t.finish(5);case 8:case"end":return t.stop()}}),t,null,[[1,,5,8]])}))),[o]),w=n(t,m,h),x=w.isValidating,b=w.mutate,E=w.data,L=w.error;return e.useMemo((function(){return a({isValidating:x,mutate:b,isLoading:void 0===E&&void 0===L||y},void 0!==E?{data:E}:{},void 0!==L?{error:L}:{})}),[x,b,E,L,y])},exports.usePlasmicDataConfig=function(){return r.useSWRConfig()},exports.usePlasmicQueryData=function(t,o){var i={revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1};e.useContext(f)&&(i.suspense=!0);var a=r.useSWRConfig();e.useEffect((function(){s=a}),[a]);var u=e.useMemo((function(){return p(o)}),[o]),c=n(t,u,i);return void 0!==c.data?{data:c.data}:c.error?{error:c.error}:{isLoading:!0}},exports.wrapLoadingFetcher=p;
'use client';"use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t.default:t}Object.defineProperty(exports,"__esModule",{value:!0});var e=t(require("react")),r=require("swr"),n=t(r);function o(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,o)}function i(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function u(t){o(a,n,i,u,c,"next",t)}function c(t){o(a,n,i,u,c,"throw",t)}u(void 0)}))}}function a(){return(a=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t}).apply(this,arguments)}function u(t,e){return t(e={exports:{}},e.exports),e.exports}var c=u((function(t){var e=function(t){var e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,r){return t[e]=r}}function c(t,e,r,n){var o=Object.create((e&&e.prototype instanceof l?e:l).prototype),i=new L(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(o,i){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw i;return{value:void 0,done:!0}}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=x(a,r);if(u){if(u===f)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=s(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===f)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}(t,r,i),o}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f={};function l(){}function h(){}function p(){}var v={};u(v,o,(function(){return this}));var d=Object.getPrototypeOf,y=d&&d(d(_([])));y&&y!==e&&r.call(y,o)&&(v=y);var g=p.prototype=l.prototype=Object.create(v);function m(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function w(t,e){var n;this._invoke=function(o,i){function a(){return new e((function(n,a){!function n(o,i,a,u){var c=s(t[o],t,i);if("throw"!==c.type){var f=c.arg,l=f.value;return l&&"object"==typeof l&&r.call(l,"__await")?e.resolve(l.__await).then((function(t){n("next",t,a,u)}),(function(t){n("throw",t,a,u)})):e.resolve(l).then((function(t){f.value=t,a(f)}),(function(t){return n("throw",t,a,u)}))}u(c.arg)}(o,i,n,a)}))}return n=n?n.then(a,a):a()}}function x(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,x(t,e),"throw"===e.method))return f;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var n=s(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,f;var o=n.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,f):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,f)}function b(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this.reset(!0)}function _(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n<t.length;)if(r.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return h.prototype=p,u(g,"constructor",p),u(p,"constructor",h),h.displayName=u(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,u(t,a,"GeneratorFunction")),t.prototype=Object.create(g),t},t.awrap=function(t){return{__await:t}},m(w.prototype),u(w.prototype,i,(function(){return this})),t.AsyncIterator=w,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new w(c(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},m(g),u(g,a,"Generator"),u(g,o,(function(){return this})),u(g,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=_,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var u=r.call(i,"catchLoc"),c=r.call(i,"finallyLoc");if(u&&c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),f},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;E(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:_(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}})),s=void 0,f=e.createContext(!1),l=0,h=[];function p(t){return i(c.mark((function e(){var r,n=arguments;return c.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0===l&&h.forEach((function(t){return t(!0)})),l+=1,e.prev=2,!v(r=t.apply(void 0,n))){e.next=10;break}return e.next=7,r;case 7:e.t0=e.sent,e.next=11;break;case 10:e.t0=r;case 11:return e.abrupt("return",e.t0);case 12:return e.prev=12,0==(l-=1)&&h.forEach((function(t){return t(!1)})),e.finish(12);case 16:case"end":return e.stop()}}),e,null,[[2,,12,16]])})))}function v(t){return!!t&&"object"==typeof t&&"then"in t&&"function"==typeof t.then}if("undefined"!=typeof window){var d=window,y=d.__SWRMutateAllKeys;d.__SWRMutateAllKeys=function(t){!function(t){if(s){var e=s.mutate;(null!=t?[t]:Array.from(s.cache.keys())).forEach((function(t){e(t)}))}}(t),"function"==typeof y&&y(t)}}Object.defineProperty(exports,"useSWRConfig",{enumerable:!0,get:function(){return r.useSWRConfig}}),exports.PlasmicPrepassContext=function(t){var n=t.cache;return e.createElement(f.Provider,{value:!0},e.createElement(r.SWRConfig,{value:{provider:function(){return n},suspense:!0,fallback:{}}},t.children))},exports.PlasmicQueryDataProvider=function(t){var n=t.children,o=t.suspense,i=t.prefetchedCache;return e.useContext(f)?e.createElement(e.Fragment,null,n):e.createElement(r.SWRConfig,{value:{fallback:null!=i?i:{},suspense:o}},n)},exports.addLoadingStateListener=function(t,e){return h.push(t),null!=e&&e.immediate&&t(l>0),function(){h.splice(h.indexOf(t),1)}},exports.isPlasmicPrepass=function(){var t,r,n;return!(null==(t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)||null==(r=t.ReactCurrentDispatcher)||null==(n=r.current)||!n.isPlasmicPrepass)},exports.useMutablePlasmicQueryData=function(t,o,u){var l=e.useContext(f),h=a({},{revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1},u);l&&(h.suspense=!0);var v=r.useSWRConfig();e.useEffect((function(){s=v}),[v]);var d=e.useState(!1),y=d[0],g=d[1],m=e.useCallback(i(c.mark((function t(){var e=arguments;return c.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return g(!0),t.prev=1,t.next=4,p(o).apply(void 0,e);case 4:return t.abrupt("return",t.sent);case 5:return t.prev=5,g(!1),t.finish(5);case 8:case"end":return t.stop()}}),t,null,[[1,,5,8]])}))),[o]),w=n(t,m,h),x=w.isValidating,b=w.mutate,E=w.data,L=w.error;return e.useMemo((function(){return a({isValidating:x,mutate:b,isLoading:void 0===E&&void 0===L||y},void 0!==E?{data:E}:{},void 0!==L?{error:L}:{})}),[x,b,E,L,y])},exports.usePlasmicDataConfig=function(){return r.useSWRConfig()},exports.usePlasmicQueryData=function(t,o){var i={revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1};e.useContext(f)&&(i.suspense=!0);var a=r.useSWRConfig();e.useEffect((function(){s=a}),[a]);var u=e.useMemo((function(){return p(o)}),[o]),c=n(t,u,i);return void 0!==c.data?{data:c.data}:c.error?{error:c.error}:{isLoading:!0}},exports.wrapLoadingFetcher=p;
//# sourceMappingURL=query.cjs.production.min.js.map

@@ -709,3 +709,3 @@ 'use client';import React from 'react';

var __SWRConfig = undefined;
var mutateAllKeys = function mutateAllKeys() {
var mutateKeys = function mutateKeys(invalidateKey) {
if (__SWRConfig) {

@@ -715,3 +715,3 @@ var _SWRConfig = __SWRConfig,

mutate = _SWRConfig.mutate;
Array.from(cache.keys()).forEach(function (key) {
(invalidateKey != null ? [invalidateKey] : Array.from(cache.keys())).forEach(function (key) {
mutate(key);

@@ -948,6 +948,6 @@ });

var maybeExistingMutateAllKeys = root.__SWRMutateAllKeys;
root.__SWRMutateAllKeys = function () {
mutateAllKeys();
root.__SWRMutateAllKeys = function (invalidateKey) {
mutateKeys(invalidateKey);
if (typeof maybeExistingMutateAllKeys === 'function') {
maybeExistingMutateAllKeys();
maybeExistingMutateAllKeys(invalidateKey);
}

@@ -954,0 +954,0 @@ };

{
"version": "0.1.65",
"version": "0.1.66",
"license": "MIT",

@@ -63,3 +63,3 @@ "main": "dist/index.js",

},
"gitHead": "fa865641d9193b8b0b6cf7f073688d9801d2e59c"
"gitHead": "17f506e9daa212a8cc408c3af4b1c51cf65eb2ea"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc