@akanjs/ui 0.9.47 → 0.9.48

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/System/CSR.d.ts CHANGED
@@ -5,7 +5,7 @@ export declare const CSR: {
5
5
  ({ children }: {
6
6
  children: any;
7
7
  }): import("react/jsx-runtime").JSX.Element;
8
- Provider: ({ className, appName, params, head, env, theme, prefix, usePage, fetch, children, gaTrackingId, fonts, layoutStyle, of, fetchPing, fetchMe, fetchSelf, }: CSRProviderProps) => import("react/jsx-runtime").JSX.Element;
8
+ Provider: ({ className, appName, params, head, env, theme, prefix, fetch, children, gaTrackingId, fonts, layoutStyle, reconnect, of, fetchPing, fetchMe, fetchSelf, }: CSRProviderProps) => import("react/jsx-runtime").JSX.Element;
9
9
  Wrapper: ({ children, lang, head, fonts, appName, className, prefix, layoutStyle, }: CSRWrapperProps) => import("react/jsx-runtime").JSX.Element;
10
10
  Inner: () => import("react/jsx-runtime").JSX.Element;
11
11
  Bridge: ({ lang, prefix }: CSRBridgeProps) => null;
@@ -13,7 +13,7 @@ export declare const CSR: {
13
13
  export type CSRProviderProps = ProviderProps & {
14
14
  fonts: ReactFont[];
15
15
  };
16
- declare const CSRProvider: ({ className, appName, params, head, env, theme, prefix, usePage, fetch, children, gaTrackingId, fonts, layoutStyle, of, fetchPing, fetchMe, fetchSelf, }: CSRProviderProps) => import("react/jsx-runtime").JSX.Element;
16
+ declare const CSRProvider: ({ className, appName, params, head, env, theme, prefix, fetch, children, gaTrackingId, fonts, layoutStyle, reconnect, of, fetchPing, fetchMe, fetchSelf, }: CSRProviderProps) => import("react/jsx-runtime").JSX.Element;
17
17
  interface CSRWrapperProps {
18
18
  className?: string;
19
19
  appName: string;
@@ -3,7 +3,7 @@ import { type Location, type TransitionStyle } from "@akanjs/client";
3
3
  import { HTMLAttributes, RefObject } from "react";
4
4
  export declare const Client: {
5
5
  (): import("react/jsx-runtime").JSX.Element;
6
- Wrapper: ({ children, theme, lang, dictionary }: ClientWrapperProps) => import("react/jsx-runtime").JSX.Element;
6
+ Wrapper: ({ children, theme, lang, dictionary, reconnect, }: ClientWrapperProps) => import("react/jsx-runtime").JSX.Element;
7
7
  Bridge: ({ env, lang, mePromise, selfPromise, theme, prefix, gaTrackingId }: ClientBridgeProps) => "" | import("react/jsx-runtime").JSX.Element | undefined;
8
8
  Inner: () => import("react/jsx-runtime").JSX.Element;
9
9
  NextBridge: ({ lang, prefix }: ClientNextBridgeProps) => null;
@@ -17,8 +17,9 @@ interface ClientWrapperProps {
17
17
  [key: string]: string;
18
18
  };
19
19
  };
20
+ reconnect?: boolean;
20
21
  }
21
- export declare const ClientWrapper: ({ children, theme, lang, dictionary }: ClientWrapperProps) => import("react/jsx-runtime").JSX.Element;
22
+ export declare const ClientWrapper: ({ children, theme, lang, dictionary, reconnect, }: ClientWrapperProps) => import("react/jsx-runtime").JSX.Element;
22
23
  interface ClientPathWrapperProps extends Omit<HTMLAttributes<HTMLDivElement>, "style"> {
23
24
  bind?: () => any;
24
25
  wrapperRef?: RefObject<HTMLDivElement | null> | null;
@@ -10,11 +10,11 @@ export interface ProviderProps {
10
10
  env: BaseClientEnv;
11
11
  theme?: string;
12
12
  prefix?: string;
13
- usePage?: any;
14
13
  fetch: any;
15
14
  children: ReactNode | ReactNode[];
16
15
  gaTrackingId?: string;
17
16
  layoutStyle?: "mobile" | "web";
17
+ reconnect?: boolean;
18
18
  of: (props: any) => ReactNode | null;
19
19
  fetchPing?: () => Promise<any>;
20
20
  fetchMe?: (props: {
package/System/SSR.d.ts CHANGED
@@ -2,13 +2,13 @@ import { ReactNode } from "react";
2
2
  import { type ProviderProps } from "./Common";
3
3
  export declare const SSR: {
4
4
  (): import("react/jsx-runtime").JSX.Element;
5
- Provider: ({ className, appName, params, head, env, gaTrackingId, fetch, children, theme, prefix, fonts, layoutStyle, of, fetchPing, fetchMe, fetchSelf, }: SSRProviderProps) => import("react/jsx-runtime").JSX.Element;
5
+ Provider: ({ className, appName, params, head, env, gaTrackingId, fetch, children, theme, prefix, fonts, layoutStyle, reconnect, of, fetchPing, fetchMe, fetchSelf, }: SSRProviderProps) => import("react/jsx-runtime").JSX.Element;
6
6
  Wrapper: ({ children, lang, head, fonts, appName, className, prefix, layoutStyle, }: SSRWrapperProps) => import("react/jsx-runtime").JSX.Element;
7
7
  };
8
8
  export type SSRProviderProps = ProviderProps & {
9
9
  fonts?: NextFont[];
10
10
  };
11
- declare const SSRProvider: ({ className, appName, params, head, env, gaTrackingId, fetch, children, theme, prefix, fonts, layoutStyle, of, fetchPing, fetchMe, fetchSelf, }: SSRProviderProps) => import("react/jsx-runtime").JSX.Element;
11
+ declare const SSRProvider: ({ className, appName, params, head, env, gaTrackingId, fetch, children, theme, prefix, fonts, layoutStyle, reconnect, of, fetchPing, fetchMe, fetchSelf, }: SSRProviderProps) => import("react/jsx-runtime").JSX.Element;
12
12
  export interface NextFont {
13
13
  className: string;
14
14
  variable: string;
package/cjs/System/CSR.js CHANGED
@@ -45,12 +45,12 @@ const CSRProvider = ({
45
45
  env,
46
46
  theme,
47
47
  prefix,
48
- usePage,
49
48
  fetch,
50
49
  children,
51
50
  gaTrackingId,
52
51
  fonts,
53
52
  layoutStyle = "web",
53
+ reconnect,
54
54
  of,
55
55
  fetchPing,
56
56
  fetchMe,
@@ -66,7 +66,7 @@ const CSRProvider = ({
66
66
  return { lang, dictionary };
67
67
  },
68
68
  render: ({ lang, dictionary }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
69
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Client.Client.Wrapper, { theme, lang, dictionary, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
69
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Client.Client.Wrapper, { theme, lang, dictionary, reconnect, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
70
70
  CSRWrapper,
71
71
  {
72
72
  className,
@@ -44,7 +44,13 @@ var import_Reconnect = require("./Reconnect");
44
44
  const Client = () => {
45
45
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, {});
46
46
  };
47
- const ClientWrapper = ({ children, theme, lang = "en", dictionary = {} }) => {
47
+ const ClientWrapper = ({
48
+ children,
49
+ theme,
50
+ lang = "en",
51
+ dictionary = {},
52
+ reconnect = true
53
+ }) => {
48
54
  if (!import_dictionary.serverTranslator.hasTranslator(lang))
49
55
  import_dictionary.serverTranslator.setTranslator(lang, dictionary);
50
56
  (0, import_react.useEffect)(() => {
@@ -52,7 +58,7 @@ const ClientWrapper = ({ children, theme, lang = "en", dictionary = {} }) => {
52
58
  }, []);
53
59
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_next_themes.ThemeProvider, { defaultTheme: theme, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_client.dictionaryContext.Provider, { value: dictionary, children: [
54
60
  children,
55
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Reconnect.Reconnect, {})
61
+ reconnect ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Reconnect.Reconnect, {}) : null
56
62
  ] }) });
57
63
  };
58
64
  Client.Wrapper = ClientWrapper;
package/cjs/System/SSR.js CHANGED
@@ -44,6 +44,7 @@ const SSRProvider = ({
44
44
  prefix,
45
45
  fonts,
46
46
  layoutStyle = "web",
47
+ reconnect,
47
48
  of,
48
49
  fetchPing,
49
50
  fetchMe,
@@ -79,7 +80,7 @@ const SSRProvider = ({
79
80
  fonts,
80
81
  prefix,
81
82
  layoutStyle,
82
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_Client.ClientWrapper, { theme, lang, dictionary, children: [
83
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_Client.ClientWrapper, { theme, lang, dictionary, reconnect, children: [
83
84
  children,
84
85
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react.Suspense, { fallback: null, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Client.ClientInner, {}) }),
85
86
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react.Suspense, { fallback: null, children: [
package/esm/System/CSR.js CHANGED
@@ -22,12 +22,12 @@ const CSRProvider = ({
22
22
  env,
23
23
  theme,
24
24
  prefix,
25
- usePage,
26
25
  fetch,
27
26
  children,
28
27
  gaTrackingId,
29
28
  fonts,
30
29
  layoutStyle = "web",
30
+ reconnect,
31
31
  of,
32
32
  fetchPing,
33
33
  fetchMe,
@@ -43,7 +43,7 @@ const CSRProvider = ({
43
43
  return { lang, dictionary };
44
44
  },
45
45
  render: ({ lang, dictionary }) => /* @__PURE__ */ jsxs(Fragment, { children: [
46
- /* @__PURE__ */ jsx(Client.Wrapper, { theme, lang, dictionary, children: /* @__PURE__ */ jsx(
46
+ /* @__PURE__ */ jsx(Client.Wrapper, { theme, lang, dictionary, reconnect, children: /* @__PURE__ */ jsx(
47
47
  CSRWrapper,
48
48
  {
49
49
  className,
@@ -28,7 +28,13 @@ import { Reconnect } from "./Reconnect";
28
28
  const Client = () => {
29
29
  return /* @__PURE__ */ jsx(Fragment, {});
30
30
  };
31
- const ClientWrapper = ({ children, theme, lang = "en", dictionary = {} }) => {
31
+ const ClientWrapper = ({
32
+ children,
33
+ theme,
34
+ lang = "en",
35
+ dictionary = {},
36
+ reconnect = true
37
+ }) => {
32
38
  if (!serverTranslator.hasTranslator(lang))
33
39
  serverTranslator.setTranslator(lang, dictionary);
34
40
  useEffect(() => {
@@ -36,7 +42,7 @@ const ClientWrapper = ({ children, theme, lang = "en", dictionary = {} }) => {
36
42
  }, []);
37
43
  return /* @__PURE__ */ jsx(ThemeProvider, { defaultTheme: theme, children: /* @__PURE__ */ jsxs(dictionaryContext.Provider, { value: dictionary, children: [
38
44
  children,
39
- /* @__PURE__ */ jsx(Reconnect, {})
45
+ reconnect ? /* @__PURE__ */ jsx(Reconnect, {}) : null
40
46
  ] }) });
41
47
  };
42
48
  Client.Wrapper = ClientWrapper;
package/esm/System/SSR.js CHANGED
@@ -21,6 +21,7 @@ const SSRProvider = ({
21
21
  prefix,
22
22
  fonts,
23
23
  layoutStyle = "web",
24
+ reconnect,
24
25
  of,
25
26
  fetchPing,
26
27
  fetchMe,
@@ -56,7 +57,7 @@ const SSRProvider = ({
56
57
  fonts,
57
58
  prefix,
58
59
  layoutStyle,
59
- children: /* @__PURE__ */ jsxs(ClientWrapper, { theme, lang, dictionary, children: [
60
+ children: /* @__PURE__ */ jsxs(ClientWrapper, { theme, lang, dictionary, reconnect, children: [
60
61
  children,
61
62
  /* @__PURE__ */ jsx(Suspense, { fallback: null, children: /* @__PURE__ */ jsx(ClientInner, {}) }),
62
63
  /* @__PURE__ */ jsxs(Suspense, { fallback: null, children: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akanjs/ui",
3
- "version": "0.9.47",
3
+ "version": "0.9.48",
4
4
  "sourceType": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"