@faasjs/ant-design 6.0.0 → 6.2.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/index.cjs CHANGED
@@ -214,7 +214,7 @@ function App(props) {
214
214
  children: /* @__PURE__ */ jsxRuntime.jsx(ConfigProvider, { ...props.faasConfigProviderProps, children: /* @__PURE__ */ jsxRuntime.jsx(ErrorBoundary, { ...props.errorBoundaryProps, children: /* @__PURE__ */ jsxRuntime.jsxs(
215
215
  react.OptionalWrapper,
216
216
  {
217
- condition: props.browserRouterProps !== false,
217
+ condition: typeof document !== "undefined" && props.browserRouterProps !== false,
218
218
  Wrapper: reactRouterDom.BrowserRouter,
219
219
  wrapperProps: props.browserRouterProps,
220
220
  children: [
package/dist/index.d.ts CHANGED
@@ -156,7 +156,9 @@ interface AppProps {
156
156
  /**
157
157
  * `false` to disable BrowserRouter.
158
158
  *
159
- * @see https://reactrouter.com/en/router-components/browser-router
159
+ * Auto disable when not in browser.
160
+ *
161
+ * @see https://api.reactrouter.com/v7/interfaces/react_router.BrowserRouterProps.html
160
162
  */
161
163
  browserRouterProps?: BrowserRouterProps | false;
162
164
  /** @see https://faasjs.com/doc/ant-design/#errorboundary */
@@ -179,7 +181,7 @@ interface useAppProps {
179
181
  * - Integrated Ant Design's [Message](https://ant.design/components/message/) and [Notification](https://ant.design/components/notification/).
180
182
  * - Based on FaasJS's [ConfigProvider](https://faasjs.com/doc/ant-design/#configprovider).
181
183
  * - Integrated FaasJS's [Modal](https://faasjs.com/doc/ant-design/#usemodal), [Drawer](https://faasjs.com/doc/ant-design/#usedrawer) and [ErrorBoundary](https://faasjs.com/doc/ant-design/#errorboundary).
182
- * - Integrated React Router's [BrowserRouter](https://reactrouter.com/en/router-components/browser-router).
184
+ * - Integrated React Router's [BrowserRouter](https://api.reactrouter.com/v7/interfaces/react_router.BrowserRouterProps.html).
183
185
  *
184
186
  * @example
185
187
  * ```tsx
@@ -190,7 +192,7 @@ interface useAppProps {
190
192
  * <App
191
193
  * styleProviderProps={{}} // https://ant.design/docs/react/compatible-style#styleprovider
192
194
  * configProviderProps={{}} // https://ant.design/components/config-provider/#API
193
- * browserRouterProps={{}} // https://reactrouter.com/en/router-components/browser-router
195
+ * browserRouterProps={{}} // https://api.reactrouter.com/v7/interfaces/react_router.BrowserRouterProps.html
194
196
  * errorBoundaryProps={{}} // https://faasjs.com/doc/ant-design/#errorboundary
195
197
  * faasConfigProviderProps={{}} // https://faasjs.com/doc/ant-design/#configprovider
196
198
  * >
package/dist/index.mjs CHANGED
@@ -210,7 +210,7 @@ function App(props) {
210
210
  children: /* @__PURE__ */ jsx(ConfigProvider, { ...props.faasConfigProviderProps, children: /* @__PURE__ */ jsx(ErrorBoundary, { ...props.errorBoundaryProps, children: /* @__PURE__ */ jsxs(
211
211
  OptionalWrapper,
212
212
  {
213
- condition: props.browserRouterProps !== false,
213
+ condition: typeof document !== "undefined" && props.browserRouterProps !== false,
214
214
  Wrapper: BrowserRouter,
215
215
  wrapperProps: props.browserRouterProps,
216
216
  children: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faasjs/ant-design",
3
- "version": "6.0.0",
3
+ "version": "6.2.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -30,7 +30,7 @@
30
30
  "dist"
31
31
  ],
32
32
  "peerDependencies": {
33
- "@faasjs/react": "6.0.0",
33
+ "@faasjs/react": "6.2.0",
34
34
  "antd": "*",
35
35
  "@ant-design/icons": "*",
36
36
  "lodash-es": "*",
@@ -40,7 +40,7 @@
40
40
  },
41
41
  "devDependencies": {
42
42
  "@types/lodash-es": "*",
43
- "@faasjs/react": "6.0.0",
43
+ "@faasjs/react": "6.2.0",
44
44
  "antd": "*",
45
45
  "@ant-design/icons": "*",
46
46
  "lodash-es": "*",