naystack 1.2.23 → 1.2.24

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,4 +1,5 @@
1
1
  "use strict";
2
+ "use client";
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  // src/auth/email/client.tsx
2
4
  import {
3
5
  createContext,
@@ -1,10 +1,8 @@
1
1
  "use strict";
2
2
  "use client";
3
- var __create = Object.create;
4
3
  var __defProp = Object.defineProperty;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf;
8
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
7
  var __export = (target, all) => {
10
8
  for (var name in all)
@@ -18,14 +16,6 @@ var __copyProps = (to, from, except, desc) => {
18
16
  }
19
17
  return to;
20
18
  };
21
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
- // If the importer is in node compatibility mode or this is not an ESM
23
- // file that has been converted to a CommonJS file using a Babel-
24
- // compatible transform (i.e. "__esModule" has not been set), then set
25
- // "default" to the CommonJS "module.exports" for node compatibility.
26
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
- mod
28
- ));
29
19
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
20
 
31
21
  // src/graphql/client.tsx
@@ -40,7 +30,7 @@ module.exports = __toCommonJS(client_exports);
40
30
  var import_client = require("@apollo/client");
41
31
  var import_client_integration_nextjs = require("@apollo/client-integration-nextjs");
42
32
  var import_client2 = require("naystack/auth/email/client");
43
- var import_react = __toESM(require("react"));
33
+ var import_react = require("react");
44
34
  var getApolloWrapper = (endpoint, options) => {
45
35
  function makeClient() {
46
36
  return new import_client_integration_nextjs.ApolloClient({
@@ -51,7 +41,7 @@ var getApolloWrapper = (endpoint, options) => {
51
41
  });
52
42
  }
53
43
  return ({ children }) => {
54
- return /* @__PURE__ */ import_react.default.createElement(import_client_integration_nextjs.ApolloNextAppProvider, { makeClient }, children);
44
+ return /* @__PURE__ */ React.createElement(import_client_integration_nextjs.ApolloNextAppProvider, { makeClient }, children);
55
45
  };
56
46
  };
57
47
  var tokenContext = (token) => {
@@ -1,11 +1,12 @@
1
1
  import * as _apollo_client from '@apollo/client';
2
2
  import { InMemoryCacheConfig, OperationVariables, MutationHookOptions } from '@apollo/client';
3
+ import * as react from 'react';
4
+ import { PropsWithChildren } from 'react';
3
5
  import { TypedDocumentNode } from '@graphql-typed-document-node/core';
4
- import react__default, { PropsWithChildren } from 'react';
5
6
 
6
7
  declare const getApolloWrapper: (endpoint: string, options?: {
7
8
  cacheConfig?: InMemoryCacheConfig;
8
- }) => ({ children }: PropsWithChildren) => react__default.JSX.Element;
9
+ }) => ({ children }: PropsWithChildren) => react.JSX.Element;
9
10
  declare const tokenContext: (token?: string | null) => {
10
11
  headers: {
11
12
  authorization: string;
@@ -1,11 +1,12 @@
1
1
  import * as _apollo_client from '@apollo/client';
2
2
  import { InMemoryCacheConfig, OperationVariables, MutationHookOptions } from '@apollo/client';
3
+ import * as react from 'react';
4
+ import { PropsWithChildren } from 'react';
3
5
  import { TypedDocumentNode } from '@graphql-typed-document-node/core';
4
- import react__default, { PropsWithChildren } from 'react';
5
6
 
6
7
  declare const getApolloWrapper: (endpoint: string, options?: {
7
8
  cacheConfig?: InMemoryCacheConfig;
8
- }) => ({ children }: PropsWithChildren) => react__default.JSX.Element;
9
+ }) => ({ children }: PropsWithChildren) => react.JSX.Element;
9
10
  declare const tokenContext: (token?: string | null) => {
10
11
  headers: {
11
12
  authorization: string;
@@ -12,11 +12,7 @@ import {
12
12
  InMemoryCache
13
13
  } from "@apollo/client-integration-nextjs";
14
14
  import { useToken } from "naystack/auth/email/client";
15
- import React, {
16
- useCallback,
17
- useEffect,
18
- useState
19
- } from "react";
15
+ import { useCallback, useEffect, useState } from "react";
20
16
  var getApolloWrapper = (endpoint, options) => {
21
17
  function makeClient() {
22
18
  return new ApolloClient({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "naystack",
3
- "version": "1.2.23",
3
+ "version": "1.2.24",
4
4
  "description": "A stack built with Next + GraphQL + S3 + Auth",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",