@0xchain/providers 1.1.0-beta.38 → 1.1.0-beta.39

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.
@@ -0,0 +1,17 @@
1
+ import { AbstractIntlMessages } from '../packages/i18n/src/react.ts';
2
+ import { ReactNode } from 'react';
3
+ export type ChainAppProvidersProps = {
4
+ locale: string;
5
+ messages: AbstractIntlMessages;
6
+ children: ReactNode;
7
+ /** 是否挂载登录弹层(Chaindigg 等站点可关闭) */
8
+ login?: boolean;
9
+ themeStorageKey?: string;
10
+ themeCookieDomain?: string;
11
+ };
12
+ /**
13
+ * 官方 Provider 顺序:Intl → Theme → Login(可选)→ children
14
+ * 与 explorer-web / ai-web / learn-web 现有结构一致,可渐进替换手写拼装。
15
+ */
16
+ export declare function ChainAppProviders({ locale, messages, children, login, themeStorageKey, themeCookieDomain, }: ChainAppProvidersProps): import("react/jsx-runtime").JSX.Element;
17
+ //# sourceMappingURL=app-shell.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-shell.d.ts","sourceRoot":"","sources":["../src/app-shell.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAGhE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,QAAQ,EAAE,SAAS,CAAC;IACpB,iCAAiC;IACjC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,KAAY,EACZ,eAAe,EACf,iBAAiB,GAClB,EAAE,sBAAsB,2CAiBxB"}
@@ -0,0 +1,26 @@
1
+ 'use client';
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { NextIntlClientProvider } from "@0xchain/i18n/react";
4
+ import { LoginProvider } from "@0xchain/with-login";
5
+ import ThemeProviderWrapper from "./theme.js";
6
+ function ChainAppProviders({
7
+ locale,
8
+ messages,
9
+ children,
10
+ login = true,
11
+ themeStorageKey,
12
+ themeCookieDomain
13
+ }) {
14
+ const content = login ? /* @__PURE__ */ jsx(LoginProvider, { locale, children }) : children;
15
+ return /* @__PURE__ */ jsx(NextIntlClientProvider, { locale, messages, children: /* @__PURE__ */ jsx(
16
+ ThemeProviderWrapper,
17
+ {
18
+ storageKey: themeStorageKey,
19
+ cookieOptions: themeCookieDomain ? { domain: themeCookieDomain } : void 0,
20
+ children: content
21
+ }
22
+ ) });
23
+ }
24
+ export {
25
+ ChainAppProviders
26
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@0xchain/providers",
3
- "version": "1.1.0-beta.38",
3
+ "version": "1.1.0-beta.39",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -21,6 +21,11 @@
21
21
  "types": "./dist/theme.d.ts",
22
22
  "import": "./dist/theme.js",
23
23
  "default": "./dist/theme.js"
24
+ },
25
+ "./app-shell": {
26
+ "types": "./dist/app-shell.d.ts",
27
+ "import": "./dist/app-shell.js",
28
+ "default": "./dist/app-shell.js"
24
29
  }
25
30
  },
26
31
  "files": [
@@ -29,8 +34,11 @@
29
34
  ],
30
35
  "peerDependencies": {
31
36
  "next": "16.1.6",
37
+ "next-intl": "4.13.0",
32
38
  "react": "19.1.1",
33
- "tailwind-merge": "3.3.1"
39
+ "tailwind-merge": "3.3.1",
40
+ "@0xchain/i18n": "1.1.0-beta.39",
41
+ "@0xchain/with-login": "1.1.0-beta.39"
34
42
  },
35
43
  "devDependencies": {
36
44
  "next": "16.1.6",
@@ -39,7 +47,9 @@
39
47
  "tailwind-merge": "3.3.1"
40
48
  },
41
49
  "dependencies": {
42
- "@0xchain/next-themes": "1.0.0"
50
+ "@0xchain/next-themes": "1.0.0",
51
+ "@0xchain/i18n": "1.1.0-beta.39",
52
+ "@0xchain/with-login": "1.1.0-beta.39"
43
53
  },
44
54
  "nx": {
45
55
  "tags": [