@factorialco/f0-react 3.1.0 → 3.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/{F0CanvasPanel-z8xqI8tX.js → F0CanvasPanel-C3fJQSVe.js} +5545 -5539
- package/dist/ai.js +2 -2
- package/dist/experimental.d.ts +45 -17
- package/dist/experimental.js +1345 -1344
- package/dist/f0.d.ts +23 -9
- package/dist/f0.js +6 -6
- package/dist/{useChatHistory-0yvpUg-H.js → useChatHistory-shjDpEO2.js} +1 -1
- package/dist/{useDataCollectionSource-D0BqJ0ux.js → useDataCollectionSource-T0eDBgbb.js} +1 -1
- package/package.json +1 -1
package/dist/ai.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as e, D as r, c as t, F as o, a as i, f as n, g as F, d as C, e as A, I as l, P as d, b as u, u as m } from "./F0CanvasPanel-
|
|
1
|
+
import { C as e, D as r, c as t, F as o, a as i, f as n, g as F, d as C, e as A, I as l, P as d, b as u, u as m } from "./F0CanvasPanel-C3fJQSVe.js";
|
|
2
2
|
import { defaultTranslations as c } from "./i18n-provider-defaults.js";
|
|
3
|
-
import { A as P, s as v, t as f, w as g, l as p, i as T, q as y, x as S, p as x, r as H, j as V, e as b, g as k, k as w, F as M, h as O, a as D, n as j, m as q, o as z, b as B, f as E, v as L, c as R, d as G, u as J } from "./useChatHistory-
|
|
3
|
+
import { A as P, s as v, t as f, w as g, l as p, i as T, q as y, x as S, p as x, r as H, j as V, e as b, g as k, k as w, F as M, h as O, a as D, n as j, m as q, o as z, b as B, f as E, v as L, c as R, d as G, u as J } from "./useChatHistory-shjDpEO2.js";
|
|
4
4
|
export {
|
|
5
5
|
P as AiChatTranslationsProvider,
|
|
6
6
|
e as ChatSpinner,
|
package/dist/experimental.d.ts
CHANGED
|
@@ -6270,20 +6270,26 @@ declare type NavigationItem = Pick<LinkProps, "href" | "exactMatch" | "onClick">
|
|
|
6270
6270
|
} & DataAttributes_2;
|
|
6271
6271
|
|
|
6272
6272
|
export declare type NavigationProps = {
|
|
6273
|
-
previous?:
|
|
6274
|
-
|
|
6275
|
-
title: string;
|
|
6276
|
-
};
|
|
6277
|
-
next?: {
|
|
6278
|
-
url: string;
|
|
6279
|
-
title: string;
|
|
6280
|
-
};
|
|
6273
|
+
previous?: NavigationTarget;
|
|
6274
|
+
next?: NavigationTarget;
|
|
6281
6275
|
counter?: {
|
|
6282
6276
|
current: number;
|
|
6283
6277
|
total: number;
|
|
6284
6278
|
};
|
|
6285
6279
|
};
|
|
6286
6280
|
|
|
6281
|
+
/**
|
|
6282
|
+
* One prev/next target. Carry a `url` for full-page detail navigation
|
|
6283
|
+
* (renders a link) OR an `onClick` for id-based navigation that swaps content
|
|
6284
|
+
* in place — a mounted sidepanel/dialog that never changes the URL (renders a
|
|
6285
|
+
* button). `onClick` wins when both are present.
|
|
6286
|
+
*/
|
|
6287
|
+
export declare type NavigationTarget = {
|
|
6288
|
+
title: string;
|
|
6289
|
+
url?: string;
|
|
6290
|
+
onClick?: () => void;
|
|
6291
|
+
};
|
|
6292
|
+
|
|
6287
6293
|
declare type NavTarget = HTMLAttributeAnchorTarget;
|
|
6288
6294
|
|
|
6289
6295
|
/**
|
|
@@ -7004,7 +7010,7 @@ export declare type PageBasedPaginatedResponse<TRecord> = BasePaginatedResponse<
|
|
|
7004
7010
|
|
|
7005
7011
|
export declare function PageHeader({ module, statusTag, breadcrumbs, actions, embedded, navigation, productUpdates, favorites, oneSwitchTooltip, oneSwitchAutoOpen, }: HeaderProps_2): JSX_2.Element;
|
|
7006
7012
|
|
|
7007
|
-
export declare type PageHeaderItemNavigationInput<R extends RecordType> = Pick<UseDataSourceItemNavigationReturn<R>, "previousItem" | "nextItem" | "previousItemUrl" | "nextItemUrl" | "absoluteIndex" | "totalItems" | "activeIndex">;
|
|
7013
|
+
export declare type PageHeaderItemNavigationInput<R extends RecordType> = Pick<UseDataSourceItemNavigationReturn<R>, "previousItem" | "nextItem" | "previousItemUrl" | "nextItemUrl" | "absoluteIndex" | "totalItems" | "activeIndex" | "hasPrevious" | "hasNext" | "goToPrevious" | "goToNext">;
|
|
7008
7014
|
|
|
7009
7015
|
export declare const PageHeaderNavigationContext: Context<NavigationProps | null>;
|
|
7010
7016
|
|
|
@@ -8655,6 +8661,16 @@ export declare interface UseDataCollectionItemNavigationProps<R extends RecordTy
|
|
|
8655
8661
|
* re-resolves neighbors; `undefined` keeps the persisted/definition state.
|
|
8656
8662
|
*/
|
|
8657
8663
|
currentFilters?: FiltersState<Filters>;
|
|
8664
|
+
/**
|
|
8665
|
+
* How the returned `navigation` arrows navigate:
|
|
8666
|
+
* - `"url"` (default): links to each item's `itemUrl` — for full-page
|
|
8667
|
+
* detail views where prev/next changes the route.
|
|
8668
|
+
* - `"callback"`: arrows call the controller's `goToPrevious`/`goToNext`,
|
|
8669
|
+
* swapping the active item in place with no URL change — for a mounted
|
|
8670
|
+
* sidepanel/dialog (drive `activeItemId` via `onActiveItemChange`).
|
|
8671
|
+
* @default "url"
|
|
8672
|
+
*/
|
|
8673
|
+
navigationMode?: "url" | "callback";
|
|
8658
8674
|
/**
|
|
8659
8675
|
* Forwarded to `useDataCollectionSource` for `dataAdapter` memoization,
|
|
8660
8676
|
* same convention as `useDataCollectionSource(source, deps)`.
|
|
@@ -8794,16 +8810,18 @@ export declare const useInfiniteScrollPagination: (paginationInfo: PaginationInf
|
|
|
8794
8810
|
|
|
8795
8811
|
/**
|
|
8796
8812
|
* Converts an item-navigation result into the `NavigationProps` shape that
|
|
8797
|
-
* `PageHeader`
|
|
8813
|
+
* `PageHeader` and `F0Dialog` accept (directly or via
|
|
8814
|
+
* `PageHeaderNavigationProvider`).
|
|
8798
8815
|
*
|
|
8799
|
-
*
|
|
8800
|
-
*
|
|
8801
|
-
*
|
|
8802
|
-
*
|
|
8816
|
+
* In `"url"` mode (default) the arrows are links to `previousItemUrl` /
|
|
8817
|
+
* `nextItemUrl` (computed from the hook's `itemUrl`); a null URL omits that
|
|
8818
|
+
* arrow. In `"callback"` mode the arrows call `goToPrevious`/`goToNext` and
|
|
8819
|
+
* presence is gated by `hasPrevious`/`hasNext` — for in-place navigation that
|
|
8820
|
+
* never touches the URL. The counter is included only when both the absolute
|
|
8821
|
+
* position and the total are known — never a misleading `0/n`.
|
|
8803
8822
|
*
|
|
8804
|
-
* Returns null when there is nothing useful to render
|
|
8805
|
-
*
|
|
8806
|
-
* passed straight to `PageHeaderNavigationProvider`.
|
|
8823
|
+
* Returns null when there is nothing useful to render, so it can be passed
|
|
8824
|
+
* straight to `PageHeaderNavigationProvider`.
|
|
8807
8825
|
*/
|
|
8808
8826
|
export declare function usePageHeaderItemNavigation<R extends RecordType>(nav: PageHeaderItemNavigationInput<R> | null, config?: UsePageHeaderItemNavigationConfig<R>): NavigationProps | null;
|
|
8809
8827
|
|
|
@@ -8813,6 +8831,16 @@ export declare interface UsePageHeaderItemNavigationConfig<R extends RecordType>
|
|
|
8813
8831
|
* accessible label on the prev/next buttons.
|
|
8814
8832
|
*/
|
|
8815
8833
|
getItemTitle?: (item: R) => string;
|
|
8834
|
+
/**
|
|
8835
|
+
* How the prev/next arrows navigate:
|
|
8836
|
+
* - `"url"` (default): each arrow is a link to the item's `itemUrl` — for
|
|
8837
|
+
* full-page detail views where navigation changes the route.
|
|
8838
|
+
* - `"callback"`: each arrow calls `goToPrevious`/`goToNext`, swapping the
|
|
8839
|
+
* active item in place — for a mounted sidepanel/dialog that never
|
|
8840
|
+
* changes the URL. Presence is gated by `hasPrevious`/`hasNext`.
|
|
8841
|
+
* @default "url"
|
|
8842
|
+
*/
|
|
8843
|
+
mode?: "url" | "callback";
|
|
8816
8844
|
}
|
|
8817
8845
|
|
|
8818
8846
|
/**
|