naystack 1.4.32 → 1.4.33
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.
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
5
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
8
|
var __export = (target, all) => {
|
|
7
9
|
for (var name in all)
|
|
@@ -15,6 +17,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
17
|
}
|
|
16
18
|
return to;
|
|
17
19
|
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
18
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
29
|
|
|
20
30
|
// src/graphql/server.tsx
|
|
@@ -27,7 +37,8 @@ module.exports = __toCommonJS(server_exports);
|
|
|
27
37
|
var import_client = require("@apollo/client");
|
|
28
38
|
var import_client_integration_nextjs = require("@apollo/client-integration-nextjs");
|
|
29
39
|
var import_headers = require("next/headers");
|
|
30
|
-
var import_react = require("react");
|
|
40
|
+
var import_react = __toESM(require("react"));
|
|
41
|
+
var import_react2 = require("react");
|
|
31
42
|
|
|
32
43
|
// src/env.ts
|
|
33
44
|
var getEnvValue = (key) => {
|
|
@@ -84,7 +95,7 @@ function Injector({
|
|
|
84
95
|
Component,
|
|
85
96
|
props
|
|
86
97
|
}) {
|
|
87
|
-
return /* @__PURE__ */
|
|
98
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react2.Suspense, { fallback: /* @__PURE__ */ import_react.default.createElement(Component, { ...props || {}, loading: true }) }, /* @__PURE__ */ import_react.default.createElement(InjectorSuspensed, { Component, fetch, props }));
|
|
88
99
|
}
|
|
89
100
|
async function InjectorSuspensed({
|
|
90
101
|
fetch,
|
|
@@ -92,7 +103,7 @@ async function InjectorSuspensed({
|
|
|
92
103
|
props
|
|
93
104
|
}) {
|
|
94
105
|
const data = await fetch();
|
|
95
|
-
return /* @__PURE__ */
|
|
106
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react2.Suspense, { fallback: /* @__PURE__ */ import_react.default.createElement(Component, { ...props || {}, loading: true }) }, /* @__PURE__ */ import_react.default.createElement(Component, { loading: false, ...props || {}, data }));
|
|
96
107
|
}
|
|
97
108
|
var { query: gqlQuery } = (0, import_client_integration_nextjs.registerApolloClient)(() => {
|
|
98
109
|
return new import_client.ApolloClient({
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { FC } from 'react';
|
|
3
1
|
import { OperationVariables } from '@apollo/client';
|
|
4
2
|
import { TypedDocumentNode } from '@graphql-typed-document-node/core';
|
|
3
|
+
import React__default, { FC } from 'react';
|
|
5
4
|
|
|
6
5
|
type OmittedProps<Y> = Omit<Omit<Y, "loading">, "data">;
|
|
7
6
|
type ComponentProps<Y> = OmittedProps<Y> extends Record<string, never> ? {
|
|
@@ -15,7 +14,7 @@ declare function Injector<T, Y>({ fetch, Component, props, }: {
|
|
|
15
14
|
data?: T;
|
|
16
15
|
loading: boolean;
|
|
17
16
|
} & Y>;
|
|
18
|
-
} & ComponentProps<Y>):
|
|
17
|
+
} & ComponentProps<Y>): React__default.JSX.Element;
|
|
19
18
|
declare const query: <T, V extends OperationVariables>(_query: TypedDocumentNode<T, V>, options?: {
|
|
20
19
|
variables?: V;
|
|
21
20
|
revalidate?: number;
|
package/dist/graphql/server.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { FC } from 'react';
|
|
3
1
|
import { OperationVariables } from '@apollo/client';
|
|
4
2
|
import { TypedDocumentNode } from '@graphql-typed-document-node/core';
|
|
3
|
+
import React__default, { FC } from 'react';
|
|
5
4
|
|
|
6
5
|
type OmittedProps<Y> = Omit<Omit<Y, "loading">, "data">;
|
|
7
6
|
type ComponentProps<Y> = OmittedProps<Y> extends Record<string, never> ? {
|
|
@@ -15,7 +14,7 @@ declare function Injector<T, Y>({ fetch, Component, props, }: {
|
|
|
15
14
|
data?: T;
|
|
16
15
|
loading: boolean;
|
|
17
16
|
} & Y>;
|
|
18
|
-
} & ComponentProps<Y>):
|
|
17
|
+
} & ComponentProps<Y>): React__default.JSX.Element;
|
|
19
18
|
declare const query: <T, V extends OperationVariables>(_query: TypedDocumentNode<T, V>, options?: {
|
|
20
19
|
variables?: V;
|
|
21
20
|
revalidate?: number;
|