@faasjs/ant-design 8.0.0-beta.25 → 8.0.0-beta.27

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.d.ts CHANGED
@@ -18,22 +18,42 @@ import { MessageInstance } from "antd/es/message/interface.js";
18
18
  import { NotificationInstance } from "antd/es/notification/interface.js";
19
19
 
20
20
  //#region ../types/src/index.d.ts
21
+ /**
22
+ * Action Type definitions for FaasJS and cross backend and frontend.
23
+ *
24
+ * [![License: MIT](https://img.shields.io/npm/l/@faasjs/types.svg)](https://github.com/faasjs/faasjs/blob/main/packages/types/LICENSE)
25
+ * [![NPM Version](https://img.shields.io/npm/v/@faasjs/types.svg)](https://www.npmjs.com/package/@faasjs/types)
26
+ *
27
+ * ## Install
28
+ *
29
+ * Normally you don't need to install this package manually. It's a dependency of `@faasjs/core` and `@faasjs/react`.
30
+ *
31
+ * ## Usage
32
+ *
33
+ * ### TypeScript config presets
34
+ *
35
+ * `@faasjs/types` also provides shared TypeScript presets under `tsconfig/`:
36
+ *
37
+ * - `@faasjs/types/tsconfig/base.json`: strict base options for common TypeScript projects.
38
+ * - `@faasjs/types/tsconfig/react.json`: base options with `jsx: "react-jsx"` for React projects.
39
+ * - `@faasjs/types/tsconfig/build.json`: build-oriented options for Vite apps, packages, and workspace modules.
40
+ *
41
+ * In your tsconfig.json:
42
+ *
43
+ * ```json
44
+ * {
45
+ * "extends": "@faasjs/types/tsconfig/build.json"
46
+ * }
47
+ * ```
48
+ */
21
49
  /**
22
50
  * Interface for defining FaasJS actions.
23
51
  */
24
- interface FaasActions {
25
- /**
26
- * Internal placeholder to keep this interface visible in generated docs.
27
- */
28
- faasjsActionsPlaceholder?: {
29
- Params: Record<string, any>;
30
- Data: Record<string, any>;
31
- };
32
- }
52
+ interface FaasActions {}
33
53
  /**
34
- * Infer all action paths declared in {@link FaasActions}.
54
+ * Infer all declared action paths.
35
55
  */
36
- type FaasActionPaths = Exclude<Extract<keyof FaasActions, string>, 'faasjsActionsPlaceholder'>;
56
+ type FaasActionPaths = Extract<keyof FaasActions, string>;
37
57
  /**
38
58
  * Union type accepted by action helpers when callers pass either an action path or inferred data shape.
39
59
  */
@@ -48,7 +68,7 @@ type FaasActionUnionType = Record<string, any> | string;
48
68
  */
49
69
  type FaasAction<T = any> = T extends FaasActionPaths ? T : string;
50
70
  //#endregion
51
- //#region src/Loading.d.ts
71
+ //#region src/Loading/index.d.ts
52
72
  /**
53
73
  * Props for the {@link Loading} component.
54
74
  */
@@ -91,7 +111,7 @@ type LoadingProps = {
91
111
  */
92
112
  declare function Loading(props: LoadingProps): _$react_jsx_runtime0.JSX.Element;
93
113
  //#endregion
94
- //#region src/FaasDataWrapper.d.ts
114
+ //#region src/FaasDataWrapper/index.d.ts
95
115
  /**
96
116
  * Partial data injection exposed to wrapped Ant Design components.
97
117
  *
@@ -218,7 +238,7 @@ declare function FaasDataWrapper<T extends FaasActionUnionType = any>(props: Faa
218
238
  */
219
239
  declare function withFaasData<PathOrData extends FaasActionUnionType, TComponentProps extends Required<FaasDataInjection<PathOrData>> = Required<FaasDataInjection<PathOrData>>>(Component: React.FC<TComponentProps & Record<string, any>>, faasProps: FaasDataWrapperProps<PathOrData>): React.FC<Omit<TComponentProps, keyof FaasDataInjection<PathOrData>>>;
220
240
  //#endregion
221
- //#region src/Config.d.ts
241
+ //#region src/Config/index.d.ts
222
242
  /**
223
243
  * Fully resolved theme object consumed by `@faasjs/ant-design` components.
224
244
  */
@@ -403,7 +423,7 @@ declare function ConfigProvider(props: ConfigProviderProps): _$react_jsx_runtime
403
423
  */
404
424
  declare function useConfigContext(): ConfigContextValue;
405
425
  //#endregion
406
- //#region src/ErrorBoundary.d.ts
426
+ //#region src/ErrorBoundary/index.d.ts
407
427
  /**
408
428
  * Styled error boundary.
409
429
  *
@@ -427,7 +447,7 @@ declare function useConfigContext(): ConfigContextValue;
427
447
  */
428
448
  declare function ErrorBoundary(props: ErrorBoundaryProps): _$react_jsx_runtime0.JSX.Element;
429
449
  //#endregion
430
- //#region src/App.d.ts
450
+ //#region src/App/index.d.ts
431
451
  /**
432
452
  * Props for the root {@link App} shell.
433
453
  *
@@ -493,7 +513,7 @@ interface AppProps {
493
513
  */
494
514
  declare function App(props: AppProps): _$react_jsx_runtime0.JSX.Element;
495
515
  //#endregion
496
- //#region src/Blank.d.ts
516
+ //#region src/Blank/index.d.ts
497
517
  /**
498
518
  * Props for the {@link Blank} placeholder component.
499
519
  */
@@ -522,7 +542,7 @@ interface BlankProps {
522
542
  */
523
543
  declare function Blank(options?: BlankProps): JSX.Element;
524
544
  //#endregion
525
- //#region src/FormItem.d.ts
545
+ //#region src/FormItem/index.d.ts
526
546
  /**
527
547
  * Custom renderer registration for a form item type.
528
548
  *
@@ -633,7 +653,7 @@ declare namespace FormItem {
633
653
  };
634
654
  }
635
655
  //#endregion
636
- //#region src/Table.d.ts
656
+ //#region src/Table/index.d.ts
637
657
  /**
638
658
  * Column definition used by the FaasJS Ant Design {@link Table} component.
639
659
  *
@@ -754,7 +774,7 @@ type TableFaasDataResponse<T = any> = {
754
774
  */
755
775
  declare function Table<T extends Record<string, any>, ExtendTypes = any>(props: TableProps<T, ExtendTypes>): _$react_jsx_runtime0.JSX.Element;
756
776
  //#endregion
757
- //#region src/data.d.ts
777
+ //#region src/data/index.d.ts
758
778
  /**
759
779
  * Supported built-in field types shared by form, table, and description components.
760
780
  */
@@ -940,7 +960,7 @@ interface UnionFaasItemProps<Value = any, Values = any> extends FormItemProps, D
940
960
  */
941
961
  declare function cloneUnionFaasItemElement(element: UnionFaasItemElement, props: any): ReactElement<UnionFaasItemInjection<any, any>, string | _$react.JSXElementConstructor<any>>;
942
962
  //#endregion
943
- //#region src/Description.d.ts
963
+ //#region src/Description/index.d.ts
944
964
  /**
945
965
  * Custom renderer registration for a description item type.
946
966
  *
@@ -1048,7 +1068,7 @@ declare namespace Description {
1048
1068
  var displayName: string;
1049
1069
  }
1050
1070
  //#endregion
1051
- //#region src/Drawer.d.ts
1071
+ //#region src/Drawer/index.d.ts
1052
1072
  /**
1053
1073
  * Props accepted by the hook-managed drawer wrapper.
1054
1074
  */
@@ -1094,7 +1114,7 @@ declare function useDrawer(init?: DrawerProps): {
1094
1114
  setDrawerProps: setDrawerProps;
1095
1115
  };
1096
1116
  //#endregion
1097
- //#region src/Form.d.ts
1117
+ //#region src/Form/index.d.ts
1098
1118
  /**
1099
1119
  * Props for the built-in submit button rendered by {@link Form}.
1100
1120
  */
@@ -1199,7 +1219,7 @@ declare namespace Form {
1199
1219
  var Provider: _$react.FC<_$antd_es_form_context0.FormProviderProps>;
1200
1220
  }
1201
1221
  //#endregion
1202
- //#region src/Link.d.ts
1222
+ //#region src/Link/index.d.ts
1203
1223
  /**
1204
1224
  * Props for the navigation-aware {@link Link} component.
1205
1225
  */
@@ -1249,7 +1269,7 @@ interface LinkProps {
1249
1269
  */
1250
1270
  declare function Link(props: LinkProps): _$react_jsx_runtime0.JSX.Element;
1251
1271
  //#endregion
1252
- //#region src/Modal.d.ts
1272
+ //#region src/Modal/index.d.ts
1253
1273
  /**
1254
1274
  * Props accepted by the hook-managed modal wrapper.
1255
1275
  */
@@ -1295,7 +1315,7 @@ declare function useModal(init?: ModalProps): {
1295
1315
  setModalProps: setModalProps;
1296
1316
  };
1297
1317
  //#endregion
1298
- //#region src/Routers.d.ts
1318
+ //#region src/Routers/index.d.ts
1299
1319
  /**
1300
1320
  * Default 404 route element that uses the configured localized title.
1301
1321
  *
@@ -1358,7 +1378,7 @@ interface RoutesProps {
1358
1378
  */
1359
1379
  declare function Routes(props: RoutesProps): _$react_jsx_runtime0.JSX.Element;
1360
1380
  //#endregion
1361
- //#region src/Tabs.d.ts
1381
+ //#region src/Tabs/index.d.ts
1362
1382
  /**
1363
1383
  * Tab item accepted by the FaasJS Ant Design {@link Tabs} wrapper.
1364
1384
  */
@@ -1408,7 +1428,7 @@ interface TabsProps extends Omit<TabsProps$1, 'items'> {
1408
1428
  */
1409
1429
  declare function Tabs(props: TabsProps): _$react_jsx_runtime0.JSX.Element;
1410
1430
  //#endregion
1411
- //#region src/Title.d.ts
1431
+ //#region src/Title/index.d.ts
1412
1432
  /**
1413
1433
  * Props for the document-title helper component.
1414
1434
  */
@@ -1456,7 +1476,7 @@ interface TitleProps {
1456
1476
  */
1457
1477
  declare function Title(props: TitleProps): JSX.Element | null;
1458
1478
  //#endregion
1459
- //#region src/useApp.d.ts
1479
+ //#region src/useApp/index.d.ts
1460
1480
  /**
1461
1481
  * Shared app services exposed by {@link AppContext} and {@link useApp}.
1462
1482
  */
@@ -1521,7 +1541,7 @@ declare const AppContext: any;
1521
1541
  */
1522
1542
  declare function useApp<NewT extends useAppProps = useAppProps>(this: void): Readonly<NewT>;
1523
1543
  //#endregion
1524
- //#region src/useThemeToken.d.ts
1544
+ //#region src/useThemeToken/index.d.ts
1525
1545
  /**
1526
1546
  * Read the current Ant Design theme token.
1527
1547
  *
package/dist/index.mjs CHANGED
@@ -6,7 +6,7 @@ import { Suspense, cloneElement, createContext, createElement, isValidElement, l
6
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
7
  import { CheckOutlined, CloseOutlined, MinusCircleOutlined, PlusOutlined } from "@ant-design/icons";
8
8
  import dayjs from "dayjs";
9
- //#region src/Loading.tsx
9
+ //#region src/Loading/index.tsx
10
10
  /**
11
11
  * Render an Ant Design loading spinner with an optional content fallback.
12
12
  *
@@ -42,7 +42,7 @@ function Loading(props) {
42
42
  });
43
43
  }
44
44
  //#endregion
45
- //#region src/FaasDataWrapper.tsx
45
+ //#region src/FaasDataWrapper/index.tsx
46
46
  /**
47
47
  * Render the `@faasjs/react` data wrapper with an Ant Design loading fallback.
48
48
  *
@@ -162,7 +162,7 @@ function withFaasData(Component, faasProps) {
162
162
  });
163
163
  }
164
164
  //#endregion
165
- //#region src/Config.tsx
165
+ //#region src/Config/index.tsx
166
166
  const zh = {
167
167
  lang: "zh",
168
168
  blank: "空",
@@ -315,7 +315,7 @@ function useConfigContext() {
315
315
  return useContext(ConfigContext);
316
316
  }
317
317
  //#endregion
318
- //#region src/Drawer.tsx
318
+ //#region src/Drawer/index.tsx
319
319
  /**
320
320
  * Create a hook-managed Ant Design drawer instance.
321
321
  *
@@ -369,7 +369,7 @@ function useDrawer(init) {
369
369
  };
370
370
  }
371
371
  //#endregion
372
- //#region src/ErrorBoundary.tsx
372
+ //#region src/ErrorBoundary/index.tsx
373
373
  function ErrorChildren(props) {
374
374
  return /* @__PURE__ */ jsx(Alert, {
375
375
  type: "error",
@@ -411,7 +411,7 @@ function ErrorBoundary(props) {
411
411
  });
412
412
  }
413
413
  //#endregion
414
- //#region src/Modal.tsx
414
+ //#region src/Modal/index.tsx
415
415
  /**
416
416
  * Create a hook-managed Ant Design modal instance.
417
417
  *
@@ -465,7 +465,7 @@ function useModal(init) {
465
465
  };
466
466
  }
467
467
  //#endregion
468
- //#region src/useApp.ts
468
+ //#region src/useApp/index.ts
469
469
  /**
470
470
  * Shared context storing message, notification, modal, and drawer helpers.
471
471
  *
@@ -522,7 +522,7 @@ function useApp() {
522
522
  return AppContext.use();
523
523
  }
524
524
  //#endregion
525
- //#region src/App.tsx
525
+ //#region src/App/index.tsx
526
526
  function RoutesApp(props) {
527
527
  const location = useLocation();
528
528
  const { drawerProps, setDrawerProps, modalProps, setModalProps } = useApp();
@@ -608,7 +608,7 @@ function App(props) {
608
608
  });
609
609
  }
610
610
  //#endregion
611
- //#region src/Blank.tsx
611
+ //#region src/Blank/index.tsx
612
612
  /**
613
613
  * Render a disabled placeholder when a value is empty.
614
614
  *
@@ -634,7 +634,7 @@ function Blank(options) {
634
634
  }) : options.value;
635
635
  }
636
636
  //#endregion
637
- //#region src/data.ts
637
+ //#region src/data/index.ts
638
638
  /**
639
639
  * Convert a snake_case, kebab-case, or spaced identifier into a title-style label.
640
640
  *
@@ -748,7 +748,7 @@ function cloneUnionFaasItemElement(element, props) {
748
748
  return cloneElement(isValidElement(element) ? element : createElement(element), props);
749
749
  }
750
750
  //#endregion
751
- //#region src/Description.tsx
751
+ //#region src/Description/index.tsx
752
752
  function DescriptionItemContent(props) {
753
753
  const [computedProps, setComputedProps] = useState();
754
754
  useEqualEffect(() => {
@@ -894,7 +894,7 @@ function Description(props) {
894
894
  }
895
895
  Description.displayName = "Description";
896
896
  //#endregion
897
- //#region src/FormItem.tsx
897
+ //#region src/FormItem/index.tsx
898
898
  function isOptionsProps(item) {
899
899
  return item && Array.isArray(item.options);
900
900
  }
@@ -1197,7 +1197,7 @@ function FormItem(props) {
1197
1197
  }
1198
1198
  FormItem.useStatus = Form$1.Item.useStatus;
1199
1199
  //#endregion
1200
- //#region src/Form.tsx
1200
+ //#region src/Form/index.tsx
1201
1201
  function isFormItemProps(item) {
1202
1202
  return item.id !== void 0;
1203
1203
  }
@@ -1396,7 +1396,7 @@ Form.List = Form$1.List;
1396
1396
  Form.ErrorList = Form$1.ErrorList;
1397
1397
  Form.Provider = Form$1.Provider;
1398
1398
  //#endregion
1399
- //#region src/Link.tsx
1399
+ //#region src/Link/index.tsx
1400
1400
  /**
1401
1401
  * Render a navigation-aware link or button.
1402
1402
  *
@@ -1474,7 +1474,7 @@ function Link(props) {
1474
1474
  });
1475
1475
  }
1476
1476
  //#endregion
1477
- //#region src/Routers.tsx
1477
+ //#region src/Routers/index.tsx
1478
1478
  /**
1479
1479
  * Default 404 route element that uses the configured localized title.
1480
1480
  *
@@ -1547,7 +1547,7 @@ function Routes(props) {
1547
1547
  }, "*")] });
1548
1548
  }
1549
1549
  //#endregion
1550
- //#region src/Table.tsx
1550
+ //#region src/Table/index.tsx
1551
1551
  function processValue(item, value) {
1552
1552
  const itemType = item.type ?? "string";
1553
1553
  const transferred = transferValue(itemType, value);
@@ -1952,7 +1952,7 @@ function FaasDataTable({ props, columns, data, params, reload, loading }) {
1952
1952
  });
1953
1953
  }
1954
1954
  //#endregion
1955
- //#region src/Tabs.tsx
1955
+ //#region src/Tabs/index.tsx
1956
1956
  /**
1957
1957
  * Render an Ant Design tabs wrapper that accepts FaasJS-style tab definitions.
1958
1958
  *
@@ -1993,7 +1993,7 @@ function Tabs(props) {
1993
1993
  });
1994
1994
  }
1995
1995
  //#endregion
1996
- //#region src/Title.tsx
1996
+ //#region src/Title/index.tsx
1997
1997
  /**
1998
1998
  * Update `document.title` and optionally render the title inline.
1999
1999
  *
@@ -2034,7 +2034,7 @@ function Title(props) {
2034
2034
  return null;
2035
2035
  }
2036
2036
  //#endregion
2037
- //#region src/useThemeToken.ts
2037
+ //#region src/useThemeToken/index.ts
2038
2038
  /**
2039
2039
  * Read the current Ant Design theme token.
2040
2040
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faasjs/ant-design",
3
- "version": "8.0.0-beta.25",
3
+ "version": "8.0.0-beta.27",
4
4
  "homepage": "https://faasjs.com/doc/ant-design",
5
5
  "bugs": {
6
6
  "url": "https://github.com/faasjs/faasjs/issues"
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "devDependencies": {
29
29
  "@ant-design/icons": "*",
30
- "@faasjs/react": ">=8.0.0-beta.25",
30
+ "@faasjs/react": ">=8.0.0-beta.27",
31
31
  "@types/lodash-es": "*",
32
32
  "@types/react": "^19.0.0",
33
33
  "@types/react-dom": "^19.0.0",
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "peerDependencies": {
41
41
  "@ant-design/icons": "*",
42
- "@faasjs/react": ">=8.0.0-beta.25",
42
+ "@faasjs/react": ">=8.0.0-beta.27",
43
43
  "antd": "^6.0.0",
44
44
  "lodash-es": "*",
45
45
  "react": "^19.0.0",