@noxickon/onyx 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/Button-BV4_pmoH.js +11054 -0
- package/dist/chunks/Button-CU-zvMVL.js +20 -0
- package/dist/chunks/Input-BraK4lDE.js +138 -0
- package/dist/chunks/Input-C5dK8VSu.js +1 -0
- package/dist/chunks/_commonjsHelpers-C6fGbg64.js +6 -0
- package/dist/chunks/_commonjsHelpers-DwGv2jUC.js +1 -0
- package/dist/chunks/constants-B1_n9ezb.js +1 -0
- package/dist/chunks/constants-CDXq37n6.js +4 -0
- package/dist/chunks/index-DGjVEo0G.js +22 -0
- package/dist/chunks/index-Dgwp7JKP.js +601 -0
- package/dist/chunks/index-DnVdNmco.js +2129 -0
- package/dist/chunks/index-rUH_mzKt.js +2 -0
- package/dist/chunks/isObject-BDHKUJKN.js +1 -0
- package/dist/chunks/isObject-vmP43YLW.js +6 -0
- package/dist/chunks/jsx-runtime--oOP9f8K.js +284 -0
- package/dist/chunks/jsx-runtime-CITbqOLs.js +22 -0
- package/dist/chunks/useAuth-BwjRd05B.js +10 -0
- package/dist/chunks/useAuth-CR3bAGqp.js +61 -0
- package/dist/chunks/useForm-BAbY8X4X.js +3085 -0
- package/dist/chunks/useForm-cxgyAiOs.js +26 -0
- package/dist/chunks/useQuery--6GP2-dN.js +2 -0
- package/dist/chunks/useQuery-mFRa2XuW.js +1481 -0
- package/dist/context/context.cjs.js +1 -0
- package/dist/context/context.es.js +6 -0
- package/dist/context.d.ts +44 -0
- package/dist/hooks/hooks.cjs.js +6 -0
- package/dist/hooks/hooks.es.js +1917 -0
- package/dist/hooks.d.ts +130 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +144 -110
- package/dist/layout/layout.cjs.js +1 -0
- package/dist/layout/layout.es.js +264 -0
- package/dist/layout.d.ts +89 -0
- package/dist/onyx.cjs.js +1 -0
- package/dist/onyx.es.js +1219 -9485
- package/dist/pages/pages.cjs.js +7 -0
- package/dist/pages/pages.es.js +93 -0
- package/dist/pages.d.ts +14 -0
- package/dist/shared.css +104 -0
- package/package.json +40 -16
- package/dist/onyx.umd.js +0 -42
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";const se=require("./_commonjsHelpers-DwGv2jUC.js"),ae=require("react");function le(t,e){for(var r=0;r<e.length;r++){const n=e[r];if(typeof n!="string"&&!Array.isArray(n)){for(const o in n)if(o!=="default"&&!(o in t)){const i=Object.getOwnPropertyDescriptor(n,o);i&&Object.defineProperty(t,o,i.get?i:{enumerable:!0,get:()=>n[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var N=function(t,e){return N=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},N(t,e)};function z(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");N(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}exports.__assign=function(){return exports.__assign=Object.assign||function(e){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},exports.__assign.apply(this,arguments)};function ce(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(t);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(t,n[o])&&(r[n[o]]=t[n[o]]);return r}function y(t,e,r){if(r||arguments.length===2)for(var n=0,o=e.length,i;n<o;n++)(i||!(n in e))&&(i||(i=Array.prototype.slice.call(e,0,n)),i[n]=e[n]);return t.concat(i||Array.prototype.slice.call(e))}var E="Invariant Violation",D=Object.setPrototypeOf,ue=D===void 0?function(t,e){return t.__proto__=e,t}:D,V=function(t){z(e,t);function e(r){r===void 0&&(r=E);var n=t.call(this,typeof r=="number"?E+": "+r+" (see https://github.com/apollographql/invariant-packages)":r)||this;return n.framesToPop=1,n.name=E,ue(n,e.prototype),n}return e}(Error);function p(t,e){if(!t)throw new V(e)}var $=["debug","log","warn","error","silent"],fe=$.indexOf("log");function _(t){return function(){if($.indexOf(t)>=fe){var e=console[t]||console.log;return e.apply(console,arguments)}}}(function(t){t.debug=_("debug"),t.log=_("log"),t.warn=_("warn"),t.error=_("error")})(p||(p={}));var B="3.13.8";function u(t){try{return t()}catch{}}const j=u(function(){return globalThis})||u(function(){return window})||u(function(){return self})||u(function(){return global})||u(function(){return u.constructor("return this")()});var I=new Map;function he(t){var e=I.get(t)||1;return I.set(t,e+1),"".concat(t,":").concat(e,":").concat(Math.random().toString(36).slice(2))}function pe(t,e){var r=he("stringifyForDisplay");return JSON.stringify(t,function(n,o){return o===void 0?r:o},e).split(JSON.stringify(r)).join("<undefined>")}function b(t){return function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(typeof e=="number"){var o=e;e=R(o),e||(e=M(o,r),r=[])}t.apply(void 0,[e].concat(r))}}var f=Object.assign(function(e,r){for(var n=[],o=2;o<arguments.length;o++)n[o-2]=arguments[o];e||p(e,R(r,n)||M(r,n))},{debug:b(p.debug),log:b(p.log),warn:b(p.warn),error:b(p.error)});function de(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];return new V(R(t,e)||M(t,e))}var L=Symbol.for("ApolloErrorMessageHandler_"+B);function J(t){if(typeof t=="string")return t;try{return pe(t,2).slice(0,1e3)}catch{return"<non-serializable>"}}function R(t,e){if(e===void 0&&(e=[]),!!t)return j[L]&&j[L](t,e.map(J))}function M(t,e){if(e===void 0&&(e=[]),!!t)return"An error occurred! For more details, see the full error text at https://go.apollo.dev/c/err#".concat(encodeURIComponent(JSON.stringify({version:B,message:t,args:e.map(J)})))}var ge=u(function(){return navigator.product})=="ReactNative",Y=typeof Symbol=="function"&&typeof Symbol.for=="function",X=typeof u(function(){return window.document.createElement})=="function",ye=u(function(){return navigator.userAgent.indexOf("jsdom")>=0})||!1,ve=(X||ge)&&!ye;function Z(t){return t!==null&&typeof t=="object"}function we(){}class U{constructor(e=1/0,r=we){this.max=e,this.dispose=r,this.map=new Map,this.newest=null,this.oldest=null}has(e){return this.map.has(e)}get(e){const r=this.getNode(e);return r&&r.value}get size(){return this.map.size}getNode(e){const r=this.map.get(e);if(r&&r!==this.newest){const{older:n,newer:o}=r;o&&(o.older=n),n&&(n.newer=o),r.older=this.newest,r.older.newer=r,r.newer=null,this.newest=r,r===this.oldest&&(this.oldest=o)}return r}set(e,r){let n=this.getNode(e);return n?n.value=r:(n={key:e,value:r,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.map.set(e,n),n.value)}clean(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)}delete(e){const r=this.map.get(e);return r?(r===this.newest&&(this.newest=r.older),r===this.oldest&&(this.oldest=r.newer),r.newer&&(r.newer.older=r.older),r.older&&(r.older.newer=r.newer),this.map.delete(e),this.dispose(r.value,e),!0):!1}}function k(){}const _e=k,be=typeof WeakRef<"u"?WeakRef:function(t){return{deref:()=>t}},me=typeof WeakMap<"u"?WeakMap:Map,Ee=typeof FinalizationRegistry<"u"?FinalizationRegistry:function(){return{register:k,unregister:k}},Oe=10024;class P{constructor(e=1/0,r=_e){this.max=e,this.dispose=r,this.map=new me,this.newest=null,this.oldest=null,this.unfinalizedNodes=new Set,this.finalizationScheduled=!1,this.size=0,this.finalize=()=>{const n=this.unfinalizedNodes.values();for(let o=0;o<Oe;o++){const i=n.next().value;if(!i)break;this.unfinalizedNodes.delete(i);const s=i.key;delete i.key,i.keyRef=new be(s),this.registry.register(s,i,i)}this.unfinalizedNodes.size>0?queueMicrotask(this.finalize):this.finalizationScheduled=!1},this.registry=new Ee(this.deleteNode.bind(this))}has(e){return this.map.has(e)}get(e){const r=this.getNode(e);return r&&r.value}getNode(e){const r=this.map.get(e);if(r&&r!==this.newest){const{older:n,newer:o}=r;o&&(o.older=n),n&&(n.newer=o),r.older=this.newest,r.older.newer=r,r.newer=null,this.newest=r,r===this.oldest&&(this.oldest=o)}return r}set(e,r){let n=this.getNode(e);return n?n.value=r:(n={key:e,value:r,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.scheduleFinalization(n),this.map.set(e,n),this.size++,n.value)}clean(){for(;this.oldest&&this.size>this.max;)this.deleteNode(this.oldest)}deleteNode(e){e===this.newest&&(this.newest=e.older),e===this.oldest&&(this.oldest=e.newer),e.newer&&(e.newer.older=e.older),e.older&&(e.older.newer=e.newer),this.size--;const r=e.key||e.keyRef&&e.keyRef.deref();this.dispose(e.value,r),e.keyRef?this.registry.unregister(e):this.unfinalizedNodes.delete(e),r&&this.map.delete(r)}delete(e){const r=this.map.get(e);return r?(this.deleteNode(r),!0):!1}scheduleFinalization(e){this.unfinalizedNodes.add(e),this.finalizationScheduled||(this.finalizationScheduled=!0,queueMicrotask(this.finalize))}}var O=new WeakSet;function ee(t){t.size<=(t.max||-1)||O.has(t)||(O.add(t),setTimeout(function(){t.clean(),O.delete(t)},100))}var Se=function(t,e){var r=new P(t,e);return r.set=function(n,o){var i=P.prototype.set.call(this,n,o);return ee(this),i},r},Ne=function(t,e){var r=new U(t,e);return r.set=function(n,o){var i=U.prototype.set.call(this,n,o);return ee(this),i},r},je=Symbol.for("apollo.cacheSize"),te=exports.__assign({},j[je]),ke={};function re(t,e){ke[t]=e}function A(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=Object.create(null);return t.forEach(function(n){n&&Object.keys(n).forEach(function(o){var i=n[o];i!==void 0&&(r[o]=i)})}),r}function Ae(t,e){return A(t,e,e.variables&&{variables:A(exports.__assign(exports.__assign({},t&&t.variables),e.variables))})}function Ce(t){return t.hasOwnProperty("graphQLErrors")}var xe=function(t){var e=y(y(y([],t.graphQLErrors,!0),t.clientErrors,!0),t.protocolErrors,!0);return t.networkError&&e.push(t.networkError),e.map(function(r){return Z(r)&&r.message||"Error message not found."}).join(`
|
|
2
|
+
`)},ze=function(t){z(e,t);function e(r){var n=r.graphQLErrors,o=r.protocolErrors,i=r.clientErrors,s=r.networkError,a=r.errorMessage,c=r.extraInfo,l=t.call(this,a)||this;return l.name="ApolloError",l.graphQLErrors=n||[],l.protocolErrors=o||[],l.clientErrors=i||[],l.networkError=s||null,l.message=a||xe(l),l.extraInfo=c,l.cause=y(y(y([s],n||[],!0),o||[],!0),i||[],!0).find(function(v){return!!v})||null,l.__proto__=e.prototype,l}return e}(Error);const{toString:F,hasOwnProperty:Re}=Object.prototype,q=Function.prototype.toString,C=new Map;function Me(t,e){try{return x(t,e)}finally{C.clear()}}function x(t,e){if(t===e)return!0;const r=F.call(t),n=F.call(e);if(r!==n)return!1;switch(r){case"[object Array]":if(t.length!==e.length)return!1;case"[object Object]":{if(Q(t,e))return!0;const o=W(t),i=W(e),s=o.length;if(s!==i.length)return!1;for(let a=0;a<s;++a)if(!Re.call(e,o[a]))return!1;for(let a=0;a<s;++a){const c=o[a];if(!x(t[c],e[c]))return!1}return!0}case"[object Error]":return t.name===e.name&&t.message===e.message;case"[object Number]":if(t!==t)return e!==e;case"[object Boolean]":case"[object Date]":return+t==+e;case"[object RegExp]":case"[object String]":return t==`${e}`;case"[object Map]":case"[object Set]":{if(t.size!==e.size)return!1;if(Q(t,e))return!0;const o=t.entries(),i=r==="[object Map]";for(;;){const s=o.next();if(s.done)break;const[a,c]=s.value;if(!e.has(a)||i&&!x(c,e.get(a)))return!1}return!0}case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":t=new Uint8Array(t),e=new Uint8Array(e);case"[object DataView]":{let o=t.byteLength;if(o===e.byteLength)for(;o--&&t[o]===e[o];);return o===-1}case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":{const o=q.call(t);return o!==q.call(e)?!1:!Ie(o,De)}}return!1}function W(t){return Object.keys(t).filter(Te,t)}function Te(t){return this[t]!==void 0}const De="{ [native code] }";function Ie(t,e){const r=t.length-e.length;return r>=0&&t.indexOf(e,r)===r}function Q(t,e){let r=C.get(t);if(r){if(r.has(e))return!0}else C.set(t,r=new Set);return r.add(e),!1}var S={exports:{}},G;function Le(){return G||(G=1,function(t){t.exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=void 0,t.exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=void 0,t.exports.__SERVER_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=void 0,Object.assign(t.exports,ae)}(S)),S.exports}var g=Le();const Ue=se.getDefaultExportFromCjs(g),ne=le({__proto__:null,default:Ue},[g]);var H=Y?Symbol.for("__APOLLO_CONTEXT__"):"__APOLLO_CONTEXT__";function oe(){f("createContext"in ne,54);var t=g.createContext[H];return t||(Object.defineProperty(g.createContext,H,{value:t=g.createContext({}),enumerable:!1,writable:!1,configurable:!0}),t.displayName="ApolloContext"),t}function Pe(t){var e=g.useContext(oe()),r=t||e.client;return f(!!r,58),r}exports.DocumentType=void 0;(function(t){t[t.Query=0]="Query",t[t.Mutation=1]="Mutation",t[t.Subscription=2]="Subscription"})(exports.DocumentType||(exports.DocumentType={}));var d;function K(t){var e;switch(t){case exports.DocumentType.Query:e="Query";break;case exports.DocumentType.Mutation:e="Mutation";break;case exports.DocumentType.Subscription:e="Subscription";break}return e}function ie(t){d||(d=new Se(te.parser||1e3));var e=d.get(t);if(e)return e;var r,n,o;f(!!t&&!!t.kind,70,t);for(var i=[],s=[],a=[],c=[],l=0,v=t.definitions;l<v.length;l++){var h=v[l];if(h.kind==="FragmentDefinition"){i.push(h);continue}if(h.kind==="OperationDefinition")switch(h.operation){case"query":s.push(h);break;case"mutation":a.push(h);break;case"subscription":c.push(h);break}}f(!i.length||s.length||a.length||c.length,71),f(s.length+a.length+c.length<=1,72,t,s.length,c.length,a.length),n=s.length?exports.DocumentType.Query:exports.DocumentType.Mutation,!s.length&&!a.length&&(n=exports.DocumentType.Subscription);var m=s.length?s:a.length?a:c;f(m.length===1,73,t,m.length);var w=m[0];r=w.variableDefinitions||[],w.name&&w.name.kind==="Name"?o=w.name.value:o="data";var T={name:o,type:n,variables:r};return d.set(t,T),T}ie.resetCache=function(){d=void 0};globalThis.__DEV__!==!1&&re("parser",function(){return d?d.size:0});function Fe(t,e){var r=ie(t),n=K(e),o=K(r.type);f(r.type===e,74,n,n,o)}exports.ApolloError=ze;exports.AutoCleanedStrongCache=Ne;exports.React=ne;exports.__extends=z;exports.__rest=ce;exports.cacheSizes=te;exports.canUseDOM=X;exports.canUseLayoutEffect=ve;exports.canUseSymbol=Y;exports.compact=A;exports.equal=Me;exports.getApolloContext=oe;exports.invariant=f;exports.isApolloError=Ce;exports.isNonNullObject=Z;exports.mergeOptions=Ae;exports.newInvariantError=de;exports.registerGlobalCache=re;exports.rehacktExports=g;exports.useApolloClient=Pe;exports.verifyDocumentType=Fe;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function c(t){return t!==null&&(typeof t=="object"||typeof t=="function")}exports.isObject=c;
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
import ee from "react";
|
|
2
|
+
var T = { exports: {} }, R = {};
|
|
3
|
+
/**
|
|
4
|
+
* @license React
|
|
5
|
+
* react-jsx-runtime.production.js
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the MIT license found in the
|
|
10
|
+
* LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/
|
|
12
|
+
var F;
|
|
13
|
+
function re() {
|
|
14
|
+
if (F) return R;
|
|
15
|
+
F = 1;
|
|
16
|
+
var l = Symbol.for("react.transitional.element"), _ = Symbol.for("react.fragment");
|
|
17
|
+
function f(m, a, s) {
|
|
18
|
+
var d = null;
|
|
19
|
+
if (s !== void 0 && (d = "" + s), a.key !== void 0 && (d = "" + a.key), "key" in a) {
|
|
20
|
+
s = {};
|
|
21
|
+
for (var E in a)
|
|
22
|
+
E !== "key" && (s[E] = a[E]);
|
|
23
|
+
} else s = a;
|
|
24
|
+
return a = s.ref, {
|
|
25
|
+
$$typeof: l,
|
|
26
|
+
type: m,
|
|
27
|
+
key: d,
|
|
28
|
+
ref: a !== void 0 ? a : null,
|
|
29
|
+
props: s
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
return R.Fragment = _, R.jsx = f, R.jsxs = f, R;
|
|
33
|
+
}
|
|
34
|
+
var b = {};
|
|
35
|
+
/**
|
|
36
|
+
* @license React
|
|
37
|
+
* react-jsx-runtime.development.js
|
|
38
|
+
*
|
|
39
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
40
|
+
*
|
|
41
|
+
* This source code is licensed under the MIT license found in the
|
|
42
|
+
* LICENSE file in the root directory of this source tree.
|
|
43
|
+
*/
|
|
44
|
+
var $;
|
|
45
|
+
function te() {
|
|
46
|
+
return $ || ($ = 1, process.env.NODE_ENV !== "production" && function() {
|
|
47
|
+
function l(e) {
|
|
48
|
+
if (e == null) return null;
|
|
49
|
+
if (typeof e == "function")
|
|
50
|
+
return e.$$typeof === Z ? null : e.displayName || e.name || null;
|
|
51
|
+
if (typeof e == "string") return e;
|
|
52
|
+
switch (e) {
|
|
53
|
+
case p:
|
|
54
|
+
return "Fragment";
|
|
55
|
+
case J:
|
|
56
|
+
return "Profiler";
|
|
57
|
+
case U:
|
|
58
|
+
return "StrictMode";
|
|
59
|
+
case G:
|
|
60
|
+
return "Suspense";
|
|
61
|
+
case X:
|
|
62
|
+
return "SuspenseList";
|
|
63
|
+
case H:
|
|
64
|
+
return "Activity";
|
|
65
|
+
}
|
|
66
|
+
if (typeof e == "object")
|
|
67
|
+
switch (typeof e.tag == "number" && console.error(
|
|
68
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
69
|
+
), e.$$typeof) {
|
|
70
|
+
case W:
|
|
71
|
+
return "Portal";
|
|
72
|
+
case z:
|
|
73
|
+
return (e.displayName || "Context") + ".Provider";
|
|
74
|
+
case q:
|
|
75
|
+
return (e._context.displayName || "Context") + ".Consumer";
|
|
76
|
+
case V:
|
|
77
|
+
var r = e.render;
|
|
78
|
+
return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
79
|
+
case B:
|
|
80
|
+
return r = e.displayName || null, r !== null ? r : l(e.type) || "Memo";
|
|
81
|
+
case g:
|
|
82
|
+
r = e._payload, e = e._init;
|
|
83
|
+
try {
|
|
84
|
+
return l(e(r));
|
|
85
|
+
} catch {
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
function _(e) {
|
|
91
|
+
return "" + e;
|
|
92
|
+
}
|
|
93
|
+
function f(e) {
|
|
94
|
+
try {
|
|
95
|
+
_(e);
|
|
96
|
+
var r = !1;
|
|
97
|
+
} catch {
|
|
98
|
+
r = !0;
|
|
99
|
+
}
|
|
100
|
+
if (r) {
|
|
101
|
+
r = console;
|
|
102
|
+
var t = r.error, n = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
103
|
+
return t.call(
|
|
104
|
+
r,
|
|
105
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
106
|
+
n
|
|
107
|
+
), _(e);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
function m(e) {
|
|
111
|
+
if (e === p) return "<>";
|
|
112
|
+
if (typeof e == "object" && e !== null && e.$$typeof === g)
|
|
113
|
+
return "<...>";
|
|
114
|
+
try {
|
|
115
|
+
var r = l(e);
|
|
116
|
+
return r ? "<" + r + ">" : "<...>";
|
|
117
|
+
} catch {
|
|
118
|
+
return "<...>";
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
function a() {
|
|
122
|
+
var e = k.A;
|
|
123
|
+
return e === null ? null : e.getOwner();
|
|
124
|
+
}
|
|
125
|
+
function s() {
|
|
126
|
+
return Error("react-stack-top-frame");
|
|
127
|
+
}
|
|
128
|
+
function d(e) {
|
|
129
|
+
if (h.call(e, "key")) {
|
|
130
|
+
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
131
|
+
if (r && r.isReactWarning) return !1;
|
|
132
|
+
}
|
|
133
|
+
return e.key !== void 0;
|
|
134
|
+
}
|
|
135
|
+
function E(e, r) {
|
|
136
|
+
function t() {
|
|
137
|
+
y || (y = !0, console.error(
|
|
138
|
+
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
139
|
+
r
|
|
140
|
+
));
|
|
141
|
+
}
|
|
142
|
+
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
143
|
+
get: t,
|
|
144
|
+
configurable: !0
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
function L() {
|
|
148
|
+
var e = l(this.type);
|
|
149
|
+
return N[e] || (N[e] = !0, console.error(
|
|
150
|
+
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
151
|
+
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
152
|
+
}
|
|
153
|
+
function M(e, r, t, n, c, u, A, S) {
|
|
154
|
+
return t = u.ref, e = {
|
|
155
|
+
$$typeof: x,
|
|
156
|
+
type: e,
|
|
157
|
+
key: r,
|
|
158
|
+
props: u,
|
|
159
|
+
_owner: c
|
|
160
|
+
}, (t !== void 0 ? t : null) !== null ? Object.defineProperty(e, "ref", {
|
|
161
|
+
enumerable: !1,
|
|
162
|
+
get: L
|
|
163
|
+
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
164
|
+
configurable: !1,
|
|
165
|
+
enumerable: !1,
|
|
166
|
+
writable: !0,
|
|
167
|
+
value: 0
|
|
168
|
+
}), Object.defineProperty(e, "_debugInfo", {
|
|
169
|
+
configurable: !1,
|
|
170
|
+
enumerable: !1,
|
|
171
|
+
writable: !0,
|
|
172
|
+
value: null
|
|
173
|
+
}), Object.defineProperty(e, "_debugStack", {
|
|
174
|
+
configurable: !1,
|
|
175
|
+
enumerable: !1,
|
|
176
|
+
writable: !0,
|
|
177
|
+
value: A
|
|
178
|
+
}), Object.defineProperty(e, "_debugTask", {
|
|
179
|
+
configurable: !1,
|
|
180
|
+
enumerable: !1,
|
|
181
|
+
writable: !0,
|
|
182
|
+
value: S
|
|
183
|
+
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
184
|
+
}
|
|
185
|
+
function j(e, r, t, n, c, u, A, S) {
|
|
186
|
+
var o = r.children;
|
|
187
|
+
if (o !== void 0)
|
|
188
|
+
if (n)
|
|
189
|
+
if (Q(o)) {
|
|
190
|
+
for (n = 0; n < o.length; n++)
|
|
191
|
+
w(o[n]);
|
|
192
|
+
Object.freeze && Object.freeze(o);
|
|
193
|
+
} else
|
|
194
|
+
console.error(
|
|
195
|
+
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
196
|
+
);
|
|
197
|
+
else w(o);
|
|
198
|
+
if (h.call(r, "key")) {
|
|
199
|
+
o = l(e);
|
|
200
|
+
var i = Object.keys(r).filter(function(K) {
|
|
201
|
+
return K !== "key";
|
|
202
|
+
});
|
|
203
|
+
n = 0 < i.length ? "{key: someKey, " + i.join(": ..., ") + ": ...}" : "{key: someKey}", I[o + n] || (i = 0 < i.length ? "{" + i.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
204
|
+
`A props object containing a "key" prop is being spread into JSX:
|
|
205
|
+
let props = %s;
|
|
206
|
+
<%s {...props} />
|
|
207
|
+
React keys must be passed directly to JSX without using spread:
|
|
208
|
+
let props = %s;
|
|
209
|
+
<%s key={someKey} {...props} />`,
|
|
210
|
+
n,
|
|
211
|
+
o,
|
|
212
|
+
i,
|
|
213
|
+
o
|
|
214
|
+
), I[o + n] = !0);
|
|
215
|
+
}
|
|
216
|
+
if (o = null, t !== void 0 && (f(t), o = "" + t), d(r) && (f(r.key), o = "" + r.key), "key" in r) {
|
|
217
|
+
t = {};
|
|
218
|
+
for (var P in r)
|
|
219
|
+
P !== "key" && (t[P] = r[P]);
|
|
220
|
+
} else t = r;
|
|
221
|
+
return o && E(
|
|
222
|
+
t,
|
|
223
|
+
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
224
|
+
), M(
|
|
225
|
+
e,
|
|
226
|
+
o,
|
|
227
|
+
u,
|
|
228
|
+
c,
|
|
229
|
+
a(),
|
|
230
|
+
t,
|
|
231
|
+
A,
|
|
232
|
+
S
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
function w(e) {
|
|
236
|
+
typeof e == "object" && e !== null && e.$$typeof === x && e._store && (e._store.validated = 1);
|
|
237
|
+
}
|
|
238
|
+
var v = ee, x = Symbol.for("react.transitional.element"), W = Symbol.for("react.portal"), p = Symbol.for("react.fragment"), U = Symbol.for("react.strict_mode"), J = Symbol.for("react.profiler"), q = Symbol.for("react.consumer"), z = Symbol.for("react.context"), V = Symbol.for("react.forward_ref"), G = Symbol.for("react.suspense"), X = Symbol.for("react.suspense_list"), B = Symbol.for("react.memo"), g = Symbol.for("react.lazy"), H = Symbol.for("react.activity"), Z = Symbol.for("react.client.reference"), k = v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, h = Object.prototype.hasOwnProperty, Q = Array.isArray, O = console.createTask ? console.createTask : function() {
|
|
239
|
+
return null;
|
|
240
|
+
};
|
|
241
|
+
v = {
|
|
242
|
+
"react-stack-bottom-frame": function(e) {
|
|
243
|
+
return e();
|
|
244
|
+
}
|
|
245
|
+
};
|
|
246
|
+
var y, N = {}, C = v["react-stack-bottom-frame"].bind(
|
|
247
|
+
v,
|
|
248
|
+
s
|
|
249
|
+
)(), Y = O(m(s)), I = {};
|
|
250
|
+
b.Fragment = p, b.jsx = function(e, r, t, n, c) {
|
|
251
|
+
var u = 1e4 > k.recentlyCreatedOwnerStacks++;
|
|
252
|
+
return j(
|
|
253
|
+
e,
|
|
254
|
+
r,
|
|
255
|
+
t,
|
|
256
|
+
!1,
|
|
257
|
+
n,
|
|
258
|
+
c,
|
|
259
|
+
u ? Error("react-stack-top-frame") : C,
|
|
260
|
+
u ? O(m(e)) : Y
|
|
261
|
+
);
|
|
262
|
+
}, b.jsxs = function(e, r, t, n, c) {
|
|
263
|
+
var u = 1e4 > k.recentlyCreatedOwnerStacks++;
|
|
264
|
+
return j(
|
|
265
|
+
e,
|
|
266
|
+
r,
|
|
267
|
+
t,
|
|
268
|
+
!0,
|
|
269
|
+
n,
|
|
270
|
+
c,
|
|
271
|
+
u ? Error("react-stack-top-frame") : C,
|
|
272
|
+
u ? O(m(e)) : Y
|
|
273
|
+
);
|
|
274
|
+
};
|
|
275
|
+
}()), b;
|
|
276
|
+
}
|
|
277
|
+
var D;
|
|
278
|
+
function ne() {
|
|
279
|
+
return D || (D = 1, process.env.NODE_ENV === "production" ? T.exports = re() : T.exports = te()), T.exports;
|
|
280
|
+
}
|
|
281
|
+
var ae = ne();
|
|
282
|
+
export {
|
|
283
|
+
ae as j
|
|
284
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";const ee=require("react");var T={exports:{}},R={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var F;function re(){if(F)return R;F=1;var l=Symbol.for("react.transitional.element"),_=Symbol.for("react.fragment");function f(d,a,s){var m=null;if(s!==void 0&&(m=""+s),a.key!==void 0&&(m=""+a.key),"key"in a){s={};for(var E in a)E!=="key"&&(s[E]=a[E])}else s=a;return a=s.ref,{$$typeof:l,type:d,key:m,ref:a!==void 0?a:null,props:s}}return R.Fragment=_,R.jsx=f,R.jsxs=f,R}var b={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.development.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var $;function te(){return $||($=1,process.env.NODE_ENV!=="production"&&function(){function l(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Z?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case p:return"Fragment";case q:return"Profiler";case U:return"StrictMode";case G:return"Suspense";case X:return"SuspenseList";case H:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case W:return"Portal";case z:return(e.displayName||"Context")+".Provider";case J:return(e._context.displayName||"Context")+".Consumer";case V:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case B:return r=e.displayName||null,r!==null?r:l(e.type)||"Memo";case g:r=e._payload,e=e._init;try{return l(e(r))}catch{}}return null}function _(e){return""+e}function f(e){try{_(e);var r=!1}catch{r=!0}if(r){r=console;var t=r.error,n=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",n),_(e)}}function d(e){if(e===p)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===g)return"<...>";try{var r=l(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function a(){var e=k.A;return e===null?null:e.getOwner()}function s(){return Error("react-stack-top-frame")}function m(e){if(h.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function E(e,r){function t(){y||(y=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r))}t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}function L(){var e=l(this.type);return N[e]||(N[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function M(e,r,t,n,c,u,A,S){return t=u.ref,e={$$typeof:x,type:e,key:r,props:u,_owner:c},(t!==void 0?t:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:L}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:A}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:S}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function j(e,r,t,n,c,u,A,S){var o=r.children;if(o!==void 0)if(n)if(Q(o)){for(n=0;n<o.length;n++)w(o[n]);Object.freeze&&Object.freeze(o)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else w(o);if(h.call(r,"key")){o=l(e);var i=Object.keys(r).filter(function(K){return K!=="key"});n=0<i.length?"{key: someKey, "+i.join(": ..., ")+": ...}":"{key: someKey}",I[o+n]||(i=0<i.length?"{"+i.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
|
+
let props = %s;
|
|
19
|
+
<%s {...props} />
|
|
20
|
+
React keys must be passed directly to JSX without using spread:
|
|
21
|
+
let props = %s;
|
|
22
|
+
<%s key={someKey} {...props} />`,n,o,i,o),I[o+n]=!0)}if(o=null,t!==void 0&&(f(t),o=""+t),m(r)&&(f(r.key),o=""+r.key),"key"in r){t={};for(var P in r)P!=="key"&&(t[P]=r[P])}else t=r;return o&&E(t,typeof e=="function"?e.displayName||e.name||"Unknown":e),M(e,o,u,c,a(),t,A,S)}function w(e){typeof e=="object"&&e!==null&&e.$$typeof===x&&e._store&&(e._store.validated=1)}var v=ee,x=Symbol.for("react.transitional.element"),W=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),q=Symbol.for("react.profiler"),J=Symbol.for("react.consumer"),z=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),G=Symbol.for("react.suspense"),X=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),H=Symbol.for("react.activity"),Z=Symbol.for("react.client.reference"),k=v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,h=Object.prototype.hasOwnProperty,Q=Array.isArray,O=console.createTask?console.createTask:function(){return null};v={"react-stack-bottom-frame":function(e){return e()}};var y,N={},C=v["react-stack-bottom-frame"].bind(v,s)(),Y=O(d(s)),I={};b.Fragment=p,b.jsx=function(e,r,t,n,c){var u=1e4>k.recentlyCreatedOwnerStacks++;return j(e,r,t,!1,n,c,u?Error("react-stack-top-frame"):C,u?O(d(e)):Y)},b.jsxs=function(e,r,t,n,c){var u=1e4>k.recentlyCreatedOwnerStacks++;return j(e,r,t,!0,n,c,u?Error("react-stack-top-frame"):C,u?O(d(e)):Y)}}()),b}var D;function ne(){return D||(D=1,process.env.NODE_ENV==="production"?T.exports=re():T.exports=te()),T.exports}var oe=ne();exports.jsxRuntimeExports=oe;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";const f=require("./jsx-runtime-CITbqOLs.js"),m=require("./index-DGjVEo0G.js"),A=require("./useQuery--6GP2-dN.js"),s=require("react"),n=s.createContext({user:null,loading:!1,error:null,isLoggedIn:!1,isAdmin:!1,refreshUser:async()=>Promise.resolve()}),g=m.gql`
|
|
2
|
+
query getCurrentUser {
|
|
3
|
+
me {
|
|
4
|
+
id
|
|
5
|
+
username
|
|
6
|
+
email
|
|
7
|
+
role
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
`;function P({adminRole:r="admin",children:o,getCurrentUserQuery:u=g,options:i={},pollInterval:c=5*60*1e3}){const{data:t,error:l,loading:x,refetch:h}=A.useQuery(u,{fetchPolicy:"cache-and-network",nextFetchPolicy:"cache-first",errorPolicy:"all",pollInterval:c,...i}),e=(t==null?void 0:t.me)||null,a=!!e,d=(e==null?void 0:e.role)===r;return f.jsxRuntimeExports.jsx(n.Provider,{value:{user:e,loading:x,error:l??null,isLoggedIn:a,isAdmin:d,refreshUser:h},children:o})}function y(){const r=s.useContext(n);if(!r)throw new Error("useOxAuth must be used within an AuthProvider");return r}exports.OxAuthContext=n;exports.OxAuthProvider=P;exports.useOxAuth=y;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { j as h } from "./jsx-runtime--oOP9f8K.js";
|
|
2
|
+
import { g as x } from "./index-DnVdNmco.js";
|
|
3
|
+
import { u as d } from "./useQuery-mFRa2XuW.js";
|
|
4
|
+
import { createContext as g, useContext as A } from "react";
|
|
5
|
+
const t = g({
|
|
6
|
+
user: null,
|
|
7
|
+
loading: !1,
|
|
8
|
+
error: null,
|
|
9
|
+
isLoggedIn: !1,
|
|
10
|
+
isAdmin: !1,
|
|
11
|
+
refreshUser: async () => Promise.resolve()
|
|
12
|
+
}), P = x`
|
|
13
|
+
query getCurrentUser {
|
|
14
|
+
me {
|
|
15
|
+
id
|
|
16
|
+
username
|
|
17
|
+
email
|
|
18
|
+
role
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
`;
|
|
22
|
+
function v({
|
|
23
|
+
adminRole: r = "admin",
|
|
24
|
+
children: s,
|
|
25
|
+
getCurrentUserQuery: n = P,
|
|
26
|
+
options: i = {},
|
|
27
|
+
pollInterval: u = 5 * 60 * 1e3
|
|
28
|
+
}) {
|
|
29
|
+
const { data: o, error: l, loading: c, refetch: a } = d(n, {
|
|
30
|
+
fetchPolicy: "cache-and-network",
|
|
31
|
+
nextFetchPolicy: "cache-first",
|
|
32
|
+
errorPolicy: "all",
|
|
33
|
+
pollInterval: u,
|
|
34
|
+
...i
|
|
35
|
+
}), e = (o == null ? void 0 : o.me) || null, m = !!e, f = (e == null ? void 0 : e.role) === r;
|
|
36
|
+
return /* @__PURE__ */ h.jsx(
|
|
37
|
+
t.Provider,
|
|
38
|
+
{
|
|
39
|
+
value: {
|
|
40
|
+
user: e,
|
|
41
|
+
loading: c,
|
|
42
|
+
error: l ?? null,
|
|
43
|
+
isLoggedIn: m,
|
|
44
|
+
isAdmin: f,
|
|
45
|
+
refreshUser: a
|
|
46
|
+
},
|
|
47
|
+
children: s
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
function C() {
|
|
52
|
+
const r = A(t);
|
|
53
|
+
if (!r)
|
|
54
|
+
throw new Error("useOxAuth must be used within an AuthProvider");
|
|
55
|
+
return r;
|
|
56
|
+
}
|
|
57
|
+
export {
|
|
58
|
+
v as O,
|
|
59
|
+
t as a,
|
|
60
|
+
C as u
|
|
61
|
+
};
|