@cyberskill/shared 2.16.0 → 2.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/react/apollo-client/apollo-client.module.scss.cjs +1 -0
- package/dist/react/apollo-client/apollo-client.module.scss.js +7 -0
- package/dist/react/apollo-client/apollo-client.util.cjs +1 -1
- package/dist/react/apollo-client/apollo-client.util.js +41 -40
- package/dist/react/apollo-client/index.cjs +1 -1
- package/dist/react/apollo-client/index.d.ts +1 -0
- package/dist/react/apollo-client/index.js +17 -15
- package/dist/react/apollo-error/apollo-error.component.cjs +1 -1
- package/dist/react/apollo-error/apollo-error.component.js +7 -6
- package/dist/react/apollo-error/apollo-error.module.scss.cjs +1 -1
- package/dist/react/apollo-error/apollo-error.module.scss.js +8 -8
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={"error-container":"_error-container_oofeh_1","error-details-button":"_error-details-button_oofeh_8"};exports.default=e;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@apollo/client/core"),p=require("@apollo/client/link"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@apollo/client/core"),p=require("@apollo/client/link"),_=require("@apollo/client/link/error"),y=require("@apollo/client/link/remove-typename"),q=require("@apollo/client/link/subscriptions"),h=require("graphql"),v=require("graphql-ws"),c=require("react"),E=require("rxjs"),m=require("./apollo-client.constant.cjs"),f=require("./apollo-client.module.scss.cjs"),b=require("./links/upload.cjs"),P=require("../apollo-error/apollo-error.util.cjs"),l=require("../log/log.util.cjs"),d=require("react-hot-toast");var A=Object.defineProperty,L=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,g=(e,r,o)=>r in e?A(e,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[r]=o,T=(e,r)=>{for(var o in r||(r={}))C.call(r,o)&&g(e,o,r[o]);if(L)for(var o of L(r))O.call(r,o)&&g(e,o,r[o]);return e};const N=new p.ApolloLink((e,r)=>(e.setContext({start:new Date}),r(e).pipe(E.tap(()=>{const o=new Date().getTime()-e.getContext().start;l.log.info(`Operation ${e.operationName} took ${o}ms to complete`)})))),$=new _.ErrorLink(({error:e,operation:r})=>{const o=(r==null?void 0:r.operationName)||"Unknown";let t="";a.CombinedGraphQLErrors.is(e)?e.errors.forEach(({message:n,locations:i,path:s},u)=>{u===0&&(t=n),l.log.error(`[GraphQL error] ${o}: ${n}, Location: ${JSON.stringify(i,null,4)}, Path: ${s}`)}):a.CombinedProtocolErrors.is(e)?e.errors.forEach(({message:n,extensions:i},s)=>{s===0&&(t=n),l.log.error(`[Protocol error]: ${n}, Extensions: ${JSON.stringify(i,null,4)}`)}):a.ServerError.is(e)?(t=e.message,l.log.error(`[Server error]: ${e.message}`)):(t=e.message,l.log.error(`[Network error]: ${e.message}`)),e&&t&&typeof window!="undefined"&&d.toast.error(n=>c.createElement("div",{className:f.default["error-container"]},t,c.createElement("button",{type:"button",className:f.default["error-details-button"],onClick:()=>{setTimeout(()=>{P.showGlobalApolloError(e)},0),d.toast.dismiss(n.id)}},"Error Details")))});function k(e){const{uri:r,wsUrl:o,customLinks:t}=e,n=new y.RemoveTypenameFromVariablesLink;r||l.log.warn(`[Apollo] No GraphQL URI provided — using "${m.GRAPHQL_URI_DEFAULT}" as default`);const i=b.createUploadLink({uri:r!=null?r:m.GRAPHQL_URI_DEFAULT,credentials:"include",headers:{"apollo-require-preflight":"true"}}),s=o?new q.GraphQLWsLink(v.createClient({url:o})):p.ApolloLink.empty(),u=o?p.ApolloLink.split(({operationType:w})=>w===h.OperationTypeNode.SUBSCRIPTION,s,i):i;return o&&u===i&&l.log.warn("[Apollo] WS URL is set, but subscriptions fallback to HTTP. Check your wsLink config."),[N,$,n,...t!=null?t:[],u]}function S(e){const r=p.ApolloLink.from(k(e));return new a.ApolloClient(T({link:r,cache:new a.InMemoryCache},e))}exports.createApolloLinks=k;exports.getClient=S;
|
|
@@ -1,85 +1,86 @@
|
|
|
1
|
-
import { ApolloClient as
|
|
1
|
+
import { ApolloClient as k, InMemoryCache as y, CombinedGraphQLErrors as g, CombinedProtocolErrors as h, ServerError as v } from "@apollo/client/core";
|
|
2
2
|
import { ApolloLink as m } from "@apollo/client/link";
|
|
3
|
-
import { ErrorLink as
|
|
3
|
+
import { ErrorLink as E } from "@apollo/client/link/error";
|
|
4
4
|
import { RemoveTypenameFromVariablesLink as _ } from "@apollo/client/link/remove-typename";
|
|
5
|
-
import { GraphQLWsLink as
|
|
6
|
-
import { OperationTypeNode as
|
|
7
|
-
import { createClient as
|
|
5
|
+
import { GraphQLWsLink as O } from "@apollo/client/link/subscriptions";
|
|
6
|
+
import { OperationTypeNode as P } from "graphql";
|
|
7
|
+
import { createClient as b } from "graphql-ws";
|
|
8
8
|
import p from "react";
|
|
9
|
-
import { tap as
|
|
9
|
+
import { tap as N } from "rxjs";
|
|
10
10
|
import { GRAPHQL_URI_DEFAULT as f } from "./apollo-client.constant.js";
|
|
11
|
+
import c from "./apollo-client.module.scss.js";
|
|
11
12
|
import { createUploadLink as C } from "./links/upload.js";
|
|
12
|
-
import { showGlobalApolloError as
|
|
13
|
-
import { log as
|
|
14
|
-
import { toast as
|
|
15
|
-
var
|
|
13
|
+
import { showGlobalApolloError as $ } from "../apollo-error/apollo-error.util.js";
|
|
14
|
+
import { log as s } from "../log/log.util.js";
|
|
15
|
+
import { toast as u } from "react-hot-toast";
|
|
16
|
+
var T = Object.defineProperty, d = Object.getOwnPropertySymbols, S = Object.prototype.hasOwnProperty, A = Object.prototype.propertyIsEnumerable, w = (r, e, o) => e in r ? T(r, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : r[e] = o, U = (r, e) => {
|
|
16
17
|
for (var o in e || (e = {}))
|
|
17
18
|
S.call(e, o) && w(r, o, e[o]);
|
|
18
|
-
if (
|
|
19
|
-
for (var o of
|
|
20
|
-
|
|
19
|
+
if (d)
|
|
20
|
+
for (var o of d(e))
|
|
21
|
+
A.call(e, o) && w(r, o, e[o]);
|
|
21
22
|
return r;
|
|
22
23
|
};
|
|
23
|
-
const
|
|
24
|
-
|
|
24
|
+
const I = new m((r, e) => (r.setContext({ start: /* @__PURE__ */ new Date() }), e(r).pipe(
|
|
25
|
+
N(() => {
|
|
25
26
|
const o = (/* @__PURE__ */ new Date()).getTime() - r.getContext().start;
|
|
26
|
-
|
|
27
|
+
s.info(`Operation ${r.operationName} took ${o}ms to complete`);
|
|
27
28
|
})
|
|
28
|
-
))),
|
|
29
|
+
))), R = new E(({ error: r, operation: e }) => {
|
|
29
30
|
const o = (e == null ? void 0 : e.operationName) || "Unknown";
|
|
30
31
|
let t = "";
|
|
31
|
-
|
|
32
|
-
a === 0 && (t = n),
|
|
33
|
-
`[GraphQL error] ${o}: ${n}, Location: ${JSON.stringify(i, null, 4)}, Path: ${
|
|
32
|
+
g.is(r) ? r.errors.forEach(({ message: n, locations: i, path: l }, a) => {
|
|
33
|
+
a === 0 && (t = n), s.error(
|
|
34
|
+
`[GraphQL error] ${o}: ${n}, Location: ${JSON.stringify(i, null, 4)}, Path: ${l}`
|
|
34
35
|
);
|
|
35
|
-
}) :
|
|
36
|
-
|
|
36
|
+
}) : h.is(r) ? r.errors.forEach(({ message: n, extensions: i }, l) => {
|
|
37
|
+
l === 0 && (t = n), s.error(
|
|
37
38
|
`[Protocol error]: ${n}, Extensions: ${JSON.stringify(i, null, 4)}`
|
|
38
39
|
);
|
|
39
|
-
}) :
|
|
40
|
+
}) : v.is(r) ? (t = r.message, s.error(`[Server error]: ${r.message}`)) : (t = r.message, s.error(`[Network error]: ${r.message}`)), r && t && typeof window != "undefined" && u.error((n) => /* @__PURE__ */ p.createElement("div", { className: c["error-container"] }, t, /* @__PURE__ */ p.createElement(
|
|
40
41
|
"button",
|
|
41
42
|
{
|
|
42
43
|
type: "button",
|
|
43
|
-
className: "
|
|
44
|
+
className: c["error-details-button"],
|
|
44
45
|
onClick: () => {
|
|
45
46
|
setTimeout(() => {
|
|
46
|
-
|
|
47
|
-
}, 0),
|
|
47
|
+
$(r);
|
|
48
|
+
}, 0), u.dismiss(n.id);
|
|
48
49
|
}
|
|
49
50
|
},
|
|
50
|
-
"
|
|
51
|
+
"Error Details"
|
|
51
52
|
)));
|
|
52
53
|
});
|
|
53
|
-
function
|
|
54
|
+
function G(r) {
|
|
54
55
|
const { uri: e, wsUrl: o, customLinks: t } = r, n = new _();
|
|
55
|
-
e ||
|
|
56
|
+
e || s.warn(`[Apollo] No GraphQL URI provided — using "${f}" as default`);
|
|
56
57
|
const i = C({
|
|
57
58
|
uri: e != null ? e : f,
|
|
58
59
|
credentials: "include",
|
|
59
60
|
headers: {
|
|
60
61
|
"apollo-require-preflight": "true"
|
|
61
62
|
}
|
|
62
|
-
}),
|
|
63
|
-
({ operationType:
|
|
64
|
-
|
|
63
|
+
}), l = o ? new O(b({ url: o })) : m.empty(), a = o ? m.split(
|
|
64
|
+
({ operationType: L }) => L === P.SUBSCRIPTION,
|
|
65
|
+
l,
|
|
65
66
|
i
|
|
66
67
|
) : i;
|
|
67
|
-
return o && a === i &&
|
|
68
|
-
U,
|
|
68
|
+
return o && a === i && s.warn("[Apollo] WS URL is set, but subscriptions fallback to HTTP. Check your wsLink config."), [
|
|
69
69
|
I,
|
|
70
|
+
R,
|
|
70
71
|
n,
|
|
71
72
|
...t != null ? t : [],
|
|
72
73
|
a
|
|
73
74
|
];
|
|
74
75
|
}
|
|
75
|
-
function
|
|
76
|
-
const e = m.from(
|
|
77
|
-
return new
|
|
76
|
+
function Y(r) {
|
|
77
|
+
const e = m.from(G(r));
|
|
78
|
+
return new k(U({
|
|
78
79
|
link: e,
|
|
79
|
-
cache: new
|
|
80
|
+
cache: new y()
|
|
80
81
|
}, r));
|
|
81
82
|
}
|
|
82
83
|
export {
|
|
83
|
-
|
|
84
|
-
|
|
84
|
+
G as createApolloLinks,
|
|
85
|
+
Y as getClient
|
|
85
86
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./apollo-client.component.cjs"),n=require("./apollo-client.constant.cjs"),r=require("./apollo-client.context.cjs"),t=require("./apollo-client.util.cjs"),o=require("@apollo/client/cache"),e=require("@apollo/client/react");exports.ApolloProvider=u.ApolloProvider;exports.GRAPHQL_URI_DEFAULT=n.GRAPHQL_URI_DEFAULT;exports.ApolloClientContext=r.ApolloClientContext;exports.ApolloClientProvider=r.ApolloClientProvider;exports.createApolloLinks=t.createApolloLinks;exports.getClient=t.getClient;Object.defineProperty(exports,"makeVar",{enumerable:!0,get:()=>o.makeVar});Object.defineProperty(exports,"useApolloClient",{enumerable:!0,get:()=>e.useApolloClient});Object.defineProperty(exports,"useBackgroundQuery",{enumerable:!0,get:()=>e.useBackgroundQuery});Object.defineProperty(exports,"useFragment",{enumerable:!0,get:()=>e.useFragment});Object.defineProperty(exports,"useLazyQuery",{enumerable:!0,get:()=>e.useLazyQuery});Object.defineProperty(exports,"useLoadableQuery",{enumerable:!0,get:()=>e.useLoadableQuery});Object.defineProperty(exports,"useMutation",{enumerable:!0,get:()=>e.useMutation});Object.defineProperty(exports,"useQuery",{enumerable:!0,get:()=>e.useQuery});Object.defineProperty(exports,"useQueryRefHandlers",{enumerable:!0,get:()=>e.useQueryRefHandlers});Object.defineProperty(exports,"useReactiveVar",{enumerable:!0,get:()=>e.useReactiveVar});Object.defineProperty(exports,"useReadQuery",{enumerable:!0,get:()=>e.useReadQuery});Object.defineProperty(exports,"useSubscription",{enumerable:!0,get:()=>e.useSubscription});Object.defineProperty(exports,"useSuspenseFragment",{enumerable:!0,get:()=>e.useSuspenseFragment});Object.defineProperty(exports,"useSuspenseQuery",{enumerable:!0,get:()=>e.useSuspenseQuery});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./apollo-client.component.cjs"),n=require("./apollo-client.constant.cjs"),r=require("./apollo-client.context.cjs"),t=require("./apollo-client.util.cjs"),o=require("@apollo/client/cache"),e=require("@apollo/client/react"),l=require("./links/upload.cjs");exports.ApolloProvider=u.ApolloProvider;exports.GRAPHQL_URI_DEFAULT=n.GRAPHQL_URI_DEFAULT;exports.ApolloClientContext=r.ApolloClientContext;exports.ApolloClientProvider=r.ApolloClientProvider;exports.createApolloLinks=t.createApolloLinks;exports.getClient=t.getClient;Object.defineProperty(exports,"makeVar",{enumerable:!0,get:()=>o.makeVar});Object.defineProperty(exports,"useApolloClient",{enumerable:!0,get:()=>e.useApolloClient});Object.defineProperty(exports,"useBackgroundQuery",{enumerable:!0,get:()=>e.useBackgroundQuery});Object.defineProperty(exports,"useFragment",{enumerable:!0,get:()=>e.useFragment});Object.defineProperty(exports,"useLazyQuery",{enumerable:!0,get:()=>e.useLazyQuery});Object.defineProperty(exports,"useLoadableQuery",{enumerable:!0,get:()=>e.useLoadableQuery});Object.defineProperty(exports,"useMutation",{enumerable:!0,get:()=>e.useMutation});Object.defineProperty(exports,"useQuery",{enumerable:!0,get:()=>e.useQuery});Object.defineProperty(exports,"useQueryRefHandlers",{enumerable:!0,get:()=>e.useQueryRefHandlers});Object.defineProperty(exports,"useReactiveVar",{enumerable:!0,get:()=>e.useReactiveVar});Object.defineProperty(exports,"useReadQuery",{enumerable:!0,get:()=>e.useReadQuery});Object.defineProperty(exports,"useSubscription",{enumerable:!0,get:()=>e.useSubscription});Object.defineProperty(exports,"useSuspenseFragment",{enumerable:!0,get:()=>e.useSuspenseFragment});Object.defineProperty(exports,"useSuspenseQuery",{enumerable:!0,get:()=>e.useSuspenseQuery});exports.createUploadLink=l.createUploadLink;
|
|
@@ -4,5 +4,6 @@ export * from './apollo-client.context.js';
|
|
|
4
4
|
export * from './apollo-client.hook.js';
|
|
5
5
|
export * from './apollo-client.type.js';
|
|
6
6
|
export * from './apollo-client.util.js';
|
|
7
|
+
export * from './links/index.js';
|
|
7
8
|
export { makeVar } from '@apollo/client/cache';
|
|
8
9
|
export { useApolloClient, useBackgroundQuery, useFragment, useLazyQuery, useLoadableQuery, useMutation, useQuery, useQueryRefHandlers, useReactiveVar, useReadQuery, useSubscription, useSuspenseFragment, useSuspenseQuery } from '@apollo/client/react';
|
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
import { ApolloProvider as o } from "./apollo-client.component.js";
|
|
2
|
-
import { GRAPHQL_URI_DEFAULT as
|
|
2
|
+
import { GRAPHQL_URI_DEFAULT as t } from "./apollo-client.constant.js";
|
|
3
3
|
import { ApolloClientContext as l, ApolloClientProvider as a } from "./apollo-client.context.js";
|
|
4
|
-
import { createApolloLinks as
|
|
5
|
-
import { makeVar as
|
|
6
|
-
import { useApolloClient as
|
|
4
|
+
import { createApolloLinks as n, getClient as i } from "./apollo-client.util.js";
|
|
5
|
+
import { makeVar as f } from "@apollo/client/cache";
|
|
6
|
+
import { useApolloClient as y, useBackgroundQuery as Q, useFragment as d, useLazyQuery as A, useLoadableQuery as L, useMutation as c, useQuery as C, useQueryRefHandlers as R, useReactiveVar as g, useReadQuery as k, useSubscription as v, useSuspenseFragment as F, useSuspenseQuery as P } from "@apollo/client/react";
|
|
7
|
+
import { createUploadLink as U } from "./links/upload.js";
|
|
7
8
|
export {
|
|
8
9
|
l as ApolloClientContext,
|
|
9
10
|
a as ApolloClientProvider,
|
|
10
11
|
o as ApolloProvider,
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
t as GRAPHQL_URI_DEFAULT,
|
|
13
|
+
n as createApolloLinks,
|
|
14
|
+
U as createUploadLink,
|
|
13
15
|
i as getClient,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
f as makeVar,
|
|
17
|
+
y as useApolloClient,
|
|
18
|
+
Q as useBackgroundQuery,
|
|
19
|
+
d as useFragment,
|
|
20
|
+
A as useLazyQuery,
|
|
21
|
+
L as useLoadableQuery,
|
|
22
|
+
c as useMutation,
|
|
23
|
+
C as useQuery,
|
|
24
|
+
R as useQueryRefHandlers,
|
|
23
25
|
g as useReactiveVar,
|
|
24
26
|
k as useReadQuery,
|
|
25
27
|
v as useSubscription,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),a=require("./apollo-error.context.cjs"),r=require("./apollo-error.module.scss.cjs");function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),a=require("../../util/validate/validate.util.cjs"),s=require("./apollo-error.context.cjs"),r=require("./apollo-error.module.scss.cjs");function i(){const l=t.use(s.ApolloErrorContext),e=l==null?void 0:l.error;if(!e)return null;const n="locations"in e||"path"in e||"extensions"in e,o="message"in e?e.message:"Unknown error occurred";return t.createElement("div",{className:r.default["modal-backdrop"]},t.createElement("div",{className:r.default["modal-content"]},t.createElement("button",{type:"button",className:r.default["btn-close"],onClick:l.hideError},"✕"),t.createElement("div",{className:r.default["error-title"]},t.createElement("button",{type:"button",className:r.default["btn-retry"],onClick:()=>window.location.reload()},"Reload")," ",!a.validate.isEmpty(e)&&o),t.createElement("div",{className:r.default["error-details"]},n&&"locations"in e&&e.locations&&t.createElement("pre",{className:"locations"},t.createElement("strong",null,"Locations:")," ",JSON.stringify(e.locations,null,4)),n&&"path"in e&&e.path&&t.createElement("pre",{className:"path"},t.createElement("strong",null,"Path:")," ",JSON.stringify(e.path,null,4)),n&&"extensions"in e&&e.extensions&&t.createElement("pre",{className:"extensions"},t.createElement("strong",null,"Extensions:")," ",JSON.stringify(e.extensions,null,4)),!n&&t.createElement("pre",{className:"error-details"},t.createElement("strong",null,"Error Details:")," ",a.validate.isEmpty(e)?o:JSON.stringify(e,null,4)))))}exports.ApolloErrorComponent=i;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import t, { use as
|
|
2
|
-
import {
|
|
1
|
+
import t, { use as a } from "react";
|
|
2
|
+
import { validate as s } from "../../util/validate/validate.util.js";
|
|
3
|
+
import { ApolloErrorContext as i } from "./apollo-error.context.js";
|
|
3
4
|
import n from "./apollo-error.module.scss.js";
|
|
4
|
-
function
|
|
5
|
-
const o =
|
|
5
|
+
function u() {
|
|
6
|
+
const o = a(i), e = o == null ? void 0 : o.error;
|
|
6
7
|
if (!e)
|
|
7
8
|
return null;
|
|
8
9
|
const r = "locations" in e || "path" in e || "extensions" in e, l = "message" in e ? e.message : "Unknown error occurred";
|
|
@@ -22,8 +23,8 @@ function p() {
|
|
|
22
23
|
onClick: () => window.location.reload()
|
|
23
24
|
},
|
|
24
25
|
"Reload"
|
|
25
|
-
), " ", l), /* @__PURE__ */ t.createElement("div", { className: n["error-details"] }, r && "locations" in e && e.locations && /* @__PURE__ */ t.createElement("pre", { className: "locations" }, /* @__PURE__ */ t.createElement("strong", null, "Locations:"), " ", JSON.stringify(e.locations, null, 4)), r && "path" in e && e.path && /* @__PURE__ */ t.createElement("pre", { className: "path" }, /* @__PURE__ */ t.createElement("strong", null, "Path:"), " ", JSON.stringify(e.path, null, 4)), r && "extensions" in e && e.extensions && /* @__PURE__ */ t.createElement("pre", { className: "extensions" }, /* @__PURE__ */ t.createElement("strong", null, "Extensions:"), " ", JSON.stringify(e.extensions, null, 4)), !r && /* @__PURE__ */ t.createElement("pre", { className: "error-details" }, /* @__PURE__ */ t.createElement("strong", null, "Error Details:"), " ", JSON.stringify(e, null, 4)))));
|
|
26
|
+
), " ", !s.isEmpty(e) && l), /* @__PURE__ */ t.createElement("div", { className: n["error-details"] }, r && "locations" in e && e.locations && /* @__PURE__ */ t.createElement("pre", { className: "locations" }, /* @__PURE__ */ t.createElement("strong", null, "Locations:"), " ", JSON.stringify(e.locations, null, 4)), r && "path" in e && e.path && /* @__PURE__ */ t.createElement("pre", { className: "path" }, /* @__PURE__ */ t.createElement("strong", null, "Path:"), " ", JSON.stringify(e.path, null, 4)), r && "extensions" in e && e.extensions && /* @__PURE__ */ t.createElement("pre", { className: "extensions" }, /* @__PURE__ */ t.createElement("strong", null, "Extensions:"), " ", JSON.stringify(e.extensions, null, 4)), !r && /* @__PURE__ */ t.createElement("pre", { className: "error-details" }, /* @__PURE__ */ t.createElement("strong", null, "Error Details:"), " ", s.isEmpty(e) ? l : JSON.stringify(e, null, 4)))));
|
|
26
27
|
}
|
|
27
28
|
export {
|
|
28
|
-
|
|
29
|
+
u as ApolloErrorComponent
|
|
29
30
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={"modal-backdrop":"_modal-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={"modal-backdrop":"_modal-backdrop_1i2kc_1","modal-content":"_modal-content_1i2kc_11","btn-close":"_btn-close_1i2kc_22","error-title":"_error-title_1i2kc_36","btn-retry":"_btn-retry_1i2kc_40","error-details":"_error-details_1i2kc_53"};exports.default=e;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
const
|
|
2
|
-
"modal-backdrop": "_modal-
|
|
3
|
-
"modal-content": "_modal-
|
|
4
|
-
"btn-close": "_btn-
|
|
5
|
-
"error-title": "_error-
|
|
6
|
-
"btn-retry": "_btn-
|
|
7
|
-
"error-details": "_error-
|
|
1
|
+
const t = {
|
|
2
|
+
"modal-backdrop": "_modal-backdrop_1i2kc_1",
|
|
3
|
+
"modal-content": "_modal-content_1i2kc_11",
|
|
4
|
+
"btn-close": "_btn-close_1i2kc_22",
|
|
5
|
+
"error-title": "_error-title_1i2kc_36",
|
|
6
|
+
"btn-retry": "_btn-retry_1i2kc_40",
|
|
7
|
+
"error-details": "_error-details_1i2kc_53"
|
|
8
8
|
};
|
|
9
9
|
export {
|
|
10
|
-
|
|
10
|
+
t as default
|
|
11
11
|
};
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._overlay_b1d9o_1,._full_b1d9o_1,._block_b1d9o_2{z-index:999999;background:linear-gradient(135deg,#ffffff59,#ffffffb3);backdrop-filter:blur(20px) saturate(200%);display:flex;justify-content:center;align-items:center;width:100%;height:100%;animation:_overlay-fade-in_b1d9o_1 .5s ease-out;border:1.5px solid rgba(255,255,255,.35);box-shadow:0 4px 32px #1f26872e,inset 0 1.5px 8px #ffffff40}._full_b1d9o_1,._block_b1d9o_2{pointer-events:none}._full_b1d9o_1{position:fixed;inset:0}._block_b1d9o_2{position:absolute;width:100%;height:100%;left:50%;top:50%;transform:translate(-50%,-50%);background:#ffffff1a;backdrop-filter:blur(4px)}._container_b1d9o_40{display:flex;flex-direction:column;justify-content:center;align-items:center;position:relative;padding:1rem;gap:1.5rem;text-align:center}._container_b1d9o_40 ._ring_b1d9o_50{width:clamp(60px,10vw,150px);height:clamp(60px,10vw,150px);border:2px solid transparent;border-radius:50%;position:absolute;transition:transform .3s ease}._container_b1d9o_40 ._ring_b1d9o_50:nth-child(1){border-bottom:8px solid hsl(315,90%,60%);animation:_rotate1_b1d9o_1 1s linear infinite}._container_b1d9o_40 ._ring_b1d9o_50:nth-child(2){border-bottom:8px solid hsl(345,90%,50%);animation:_rotate2_b1d9o_1 1s linear infinite}._container_b1d9o_40 ._ring_b1d9o_50:nth-child(3){border-bottom:8px solid hsl(180,80%,40%);animation:_rotate3_b1d9o_1 1s linear infinite}._container_b1d9o_40 ._ring_b1d9o_50:nth-child(4){border-bottom:8px solid hsl(40,100%,45%);animation:_rotate4_b1d9o_1 1s linear infinite}._container_b1d9o_40 ._message_b1d9o_74{font-weight:700;color:#2f2f37;text-shadow:0 1px 2px rgba(255,255,255,.8);animation:_text-fade_b1d9o_1 2s ease-in-out infinite alternate;word-break:break-word;hyphens:auto}@keyframes _rotate1_b1d9o_1{0%{transform:rotateX(50deg) rotate(110deg)}to{transform:rotateX(50deg) rotate(470deg)}}@keyframes _rotate2_b1d9o_1{0%{transform:rotateX(20deg) rotateY(50deg) rotate(20deg)}to{transform:rotateX(20deg) rotateY(50deg) rotate(380deg)}}@keyframes _rotate3_b1d9o_1{0%{transform:rotateX(40deg) rotateY(130deg) rotate(450deg)}to{transform:rotateX(40deg) rotateY(130deg) rotate(90deg)}}@keyframes _rotate4_b1d9o_1{0%{transform:rotateX(70deg) rotate(270deg)}to{transform:rotateX(70deg) rotate(630deg)}}@keyframes _text-fade_b1d9o_1{0%{opacity:.6}to{opacity:1}}@keyframes _overlay-fade-in_b1d9o_1{0%{opacity:0}to{opacity:1}}@media (prefers-reduced-motion: reduce){._ring_b1d9o_50,._message_b1d9o_74,._overlay_b1d9o_1,._full_b1d9o_1,._block_b1d9o_2{animation:none!important}}._modal-
|
|
1
|
+
._overlay_b1d9o_1,._full_b1d9o_1,._block_b1d9o_2{z-index:999999;background:linear-gradient(135deg,#ffffff59,#ffffffb3);backdrop-filter:blur(20px) saturate(200%);display:flex;justify-content:center;align-items:center;width:100%;height:100%;animation:_overlay-fade-in_b1d9o_1 .5s ease-out;border:1.5px solid rgba(255,255,255,.35);box-shadow:0 4px 32px #1f26872e,inset 0 1.5px 8px #ffffff40}._full_b1d9o_1,._block_b1d9o_2{pointer-events:none}._full_b1d9o_1{position:fixed;inset:0}._block_b1d9o_2{position:absolute;width:100%;height:100%;left:50%;top:50%;transform:translate(-50%,-50%);background:#ffffff1a;backdrop-filter:blur(4px)}._container_b1d9o_40{display:flex;flex-direction:column;justify-content:center;align-items:center;position:relative;padding:1rem;gap:1.5rem;text-align:center}._container_b1d9o_40 ._ring_b1d9o_50{width:clamp(60px,10vw,150px);height:clamp(60px,10vw,150px);border:2px solid transparent;border-radius:50%;position:absolute;transition:transform .3s ease}._container_b1d9o_40 ._ring_b1d9o_50:nth-child(1){border-bottom:8px solid hsl(315,90%,60%);animation:_rotate1_b1d9o_1 1s linear infinite}._container_b1d9o_40 ._ring_b1d9o_50:nth-child(2){border-bottom:8px solid hsl(345,90%,50%);animation:_rotate2_b1d9o_1 1s linear infinite}._container_b1d9o_40 ._ring_b1d9o_50:nth-child(3){border-bottom:8px solid hsl(180,80%,40%);animation:_rotate3_b1d9o_1 1s linear infinite}._container_b1d9o_40 ._ring_b1d9o_50:nth-child(4){border-bottom:8px solid hsl(40,100%,45%);animation:_rotate4_b1d9o_1 1s linear infinite}._container_b1d9o_40 ._message_b1d9o_74{font-weight:700;color:#2f2f37;text-shadow:0 1px 2px rgba(255,255,255,.8);animation:_text-fade_b1d9o_1 2s ease-in-out infinite alternate;word-break:break-word;hyphens:auto}@keyframes _rotate1_b1d9o_1{0%{transform:rotateX(50deg) rotate(110deg)}to{transform:rotateX(50deg) rotate(470deg)}}@keyframes _rotate2_b1d9o_1{0%{transform:rotateX(20deg) rotateY(50deg) rotate(20deg)}to{transform:rotateX(20deg) rotateY(50deg) rotate(380deg)}}@keyframes _rotate3_b1d9o_1{0%{transform:rotateX(40deg) rotateY(130deg) rotate(450deg)}to{transform:rotateX(40deg) rotateY(130deg) rotate(90deg)}}@keyframes _rotate4_b1d9o_1{0%{transform:rotateX(70deg) rotate(270deg)}to{transform:rotateX(70deg) rotate(630deg)}}@keyframes _text-fade_b1d9o_1{0%{opacity:.6}to{opacity:1}}@keyframes _overlay-fade-in_b1d9o_1{0%{opacity:0}to{opacity:1}}@media (prefers-reduced-motion: reduce){._ring_b1d9o_50,._message_b1d9o_74,._overlay_b1d9o_1,._full_b1d9o_1,._block_b1d9o_2{animation:none!important}}._modal-backdrop_1i2kc_1{position:fixed;inset:0;z-index:9999999;background-color:#0009;display:flex;align-items:center;justify-content:center;padding:1rem}._modal-backdrop_1i2kc_1 ._modal-content_1i2kc_11{position:relative;background-color:#0f172a;color:#fff;max-width:80vw;width:100%;border-radius:.75rem;box-shadow:0 10px 20px #00000080;overflow:hidden;padding:2rem}._modal-backdrop_1i2kc_1 ._modal-content_1i2kc_11 ._btn-close_1i2kc_22{position:absolute;top:.75rem;right:1rem;font-size:1.25rem;color:#fff;background:none;border:none;cursor:pointer;transition:color .2s}._modal-backdrop_1i2kc_1 ._modal-content_1i2kc_11 ._btn-close_1i2kc_22:hover{color:#f87171}._modal-backdrop_1i2kc_1 ._modal-content_1i2kc_11 ._error-title_1i2kc_36{font-weight:700;margin-bottom:1rem}._modal-backdrop_1i2kc_1 ._modal-content_1i2kc_11 ._error-title_1i2kc_36 ._btn-retry_1i2kc_40{background:linear-gradient(to right,#3b82f6,#06b6d4);color:#fff;font-weight:600;padding:.5rem 1.5rem;border-radius:.75rem;transition:background .3s ease;border:none;cursor:pointer}._modal-backdrop_1i2kc_1 ._modal-content_1i2kc_11 ._error-title_1i2kc_36 ._btn-retry_1i2kc_40:hover{background:linear-gradient(to right,#2563eb,#0891b2)}._modal-backdrop_1i2kc_1 ._modal-content_1i2kc_11 ._error-details_1i2kc_53{background-color:#1e293b;text-align:left;font-size:.875rem;border-radius:.5rem;padding:1rem;margin-bottom:1.5rem;max-height:50vh;overflow-y:auto;border:1px solid #334155;display:flex;flex-direction:column;gap:.5rem}._modal-backdrop_1i2kc_1 ._modal-content_1i2kc_11 ._error-details_1i2kc_53 pre{white-space:pre-wrap;word-break:break-word}._modal-backdrop_1i2kc_1 ._modal-content_1i2kc_11 ._error-details_1i2kc_53 pre._main_1i2kc_71{color:#fca5a5}._modal-backdrop_1i2kc_1 ._modal-content_1i2kc_11 ._error-details_1i2kc_53 pre._network_1i2kc_74{color:#fde68a}._modal-backdrop_1i2kc_1 ._modal-content_1i2kc_11 ._error-details_1i2kc_53 pre._extra_1i2kc_77{color:#67e8f9;overflow-x:auto;white-space:pre;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;background-color:#0f172a;padding:.5rem;border-radius:.375rem}._modal-backdrop_1i2kc_1 ._modal-content_1i2kc_11 ._error-details_1i2kc_53 ul{padding-left:1rem;color:#fda4af;list-style:disc}._error-container_oofeh_1{display:flex;align-items:center;justify-content:center;gap:.5rem}._error-details-button_oofeh_8{display:inline-flex;align-items:center;justify-content:center;padding:.5rem 1rem;background-color:#ef4444;color:#fff;border:2px solid #dc2626;border-radius:.5rem;font-size:.875rem;font-weight:500;cursor:pointer;transition:all .2s ease-in-out}._error-details-button_oofeh_8:hover{background-color:#dc2626;border-color:#b91c1c;transform:translateY(-1px);box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f}._error-details-button_oofeh_8:active{transform:translateY(0);box-shadow:0 1px 3px #0000001a,0 1px 2px #0000000f}._error-details-button_oofeh_8:focus{outline:none;ring:2px;ring-color:#fca5a5;ring-offset:2px}
|