@factorialco/f0-react 14.16.1 → 14.18.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/{ArchiveThumbnail-COsawOBr.js → ArchiveThumbnail-Dj23fTU2.js} +3 -3
- package/dist/{ArchiveViewer-ah7lBRU5.js → ArchiveViewer-C9Z1RX74.js} +5 -5
- package/dist/{ChatPostComposerDialog-DSIpJQ7c.js → ChatPostComposerDialog-BztXuihb.js} +3 -3
- package/dist/{CoachmarkProvider-B8jp2NdH.js → CoachmarkProvider-wHJ1fNtv.js} +21873 -21707
- package/dist/{CodeThumbnail-_y-kDD-q.js → CodeThumbnail-C8kuBnUv.js} +1 -1
- package/dist/{CodeViewer-r5tyxLSt.js → CodeViewer-othGwd2k.js} +8 -8
- package/dist/{DocumentToolbar-DvXvTDh4.js → DocumentToolbar-Dx1trDu_.js} +5 -5
- package/dist/{DocxViewer-CPMbiE5a.js → DocxViewer-C33rqSqK.js} +3 -3
- package/dist/{F0AiProcessingOverlay-aDAdrNce.js → F0AiProcessingOverlay-2MFEG-x3.js} +435 -435
- package/dist/{F0Alert-DBQeR0cM.js → F0Alert-EuqVV5XC.js} +12 -12
- package/dist/F0AudioPlayer-fmgmAwIs.js +2 -0
- package/dist/{F0Button-CVBX4mpV.js → F0Button-DEQjTtQQ.js} +3424 -3339
- package/dist/{F0CanvasPanel-DOsB2n3S.js → F0CanvasPanel-DOjVevQN.js} +18 -18
- package/dist/{F0DocumentViewer-ZJcQEhGA.js → F0DocumentViewer-CN32kEGx.js} +4 -4
- package/dist/{F0DocumentViewer-C1o_L8VI.js → F0DocumentViewer-DlnbQXJy.js} +1 -1
- package/dist/{F0Icon-1popYub0.js → F0Icon-yYYIXayJ.js} +1 -1
- package/dist/{F0Map-BReBnzyX.js → F0Map-DZ_8bKFy.js} +16 -16
- package/dist/{F0Select-1hIMxh-o.js → F0Select-BDp-zH6t.js} +8 -8
- package/dist/{F0Text-BJF7W4yd.js → F0Text-CdAHlkuW.js} +2 -2
- package/dist/{F0VideoPlayer-DQ2BzdKP.js → F0VideoPlayer-BwxyRTls.js} +22 -22
- package/dist/F0VideoPlayer-buv3Ng9D.js +1 -0
- package/dist/{HtmlThumbnail-DLtk8JYr.js → HtmlThumbnail-s_oajO_b.js} +1 -1
- package/dist/{HtmlViewer-9ilcTnKa.js → HtmlViewer-BzBp0hjD.js} +9 -9
- package/dist/{LayoutGroup-Ctdx3KAT.js → LayoutGroup-Ca-XZBlO.js} +1 -1
- package/dist/{Map-BdBVSbou.js → Map-BZU8gY2T.js} +10 -10
- package/dist/{PdfThumbnail-DhPj5b9N.js → PdfThumbnail-DlwsrdaB.js} +1 -1
- package/dist/{PdfViewer-BZwgAyV2.js → PdfViewer-C4fR5F7k.js} +10 -10
- package/dist/{SandboxedHtmlFrame-U-V8AeTu.js → SandboxedHtmlFrame-CF-4NPOg.js} +2 -2
- package/dist/{SheetViewer-FblPSdbq.js → SheetViewer-BxaAH-7B.js} +5 -5
- package/dist/{TextViewer-itfREx_P.js → TextViewer-BKMQ_8Xx.js} +4 -4
- package/dist/ai.d.ts +2 -2
- package/dist/ai.js +3 -3
- package/dist/component-status.js +3 -3
- package/dist/{dist-mXRQ3ead.js → dist-B0p9HtOX.js} +4 -4
- package/dist/{dist-Cdt-yhbF.js → dist-L1PI_yN8.js} +1 -1
- package/dist/{dist-CEaJ2V1g.js → dist-z-guLZkn.js} +1 -1
- package/dist/experimental.d.ts +215 -31
- package/dist/experimental.js +2773 -2414
- package/dist/{exports-CqUFRi14.d.ts → exports-CsooheN0.d.ts} +1 -1
- package/dist/f0.d.ts +11 -3
- package/dist/f0.js +159 -157
- package/dist/{highlight-hOG6cDzB.js → highlight-CSF4P5Fv.js} +1 -1
- package/dist/{i18n-provider-CJrQqAyn.js → i18n-provider-DBzM2kq0.js} +33 -29
- package/dist/{index-CWG70Tzs.d.ts → index-Bp-nOH1C.d.ts} +47 -4
- package/dist/{maplibre-BT9XMUNs.js → maplibre-DS72SypK.js} +1 -1
- package/dist/{pdfWorker-B8z9bBca.js → pdfWorker-pOyip4YO.js} +1 -1
- package/dist/{popover--syRPfsv.js → popover-Qp4DqBn0.js} +1 -1
- package/dist/{scrollarea-LZjvVdDY.js → scrollarea-_MxU-d6t.js} +3 -3
- package/dist/{skeleton-BKBf76U9.js → skeleton-AiUxUDj1.js} +1 -1
- package/dist/styles.css +1 -1
- package/dist/{toolbarStyles-DWH5y0G7.js → toolbarStyles-BQgoBBND.js} +1 -1
- package/dist/{types-fb-NjbfH.d.ts → types-vsDe9Lim.d.ts} +64 -14
- package/dist/{useData-y9LqXE8Q.js → useData-Cp4u3Mch.js} +6 -6
- package/package.json +1 -1
- package/dist/F0AudioPlayer-DtbtzMRe.js +0 -2
- package/dist/F0VideoPlayer-DJCGorxe.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Qt as e, Ut as t, Zt as n } from "./F0CanvasPanel-
|
|
1
|
+
import { Qt as e, Ut as t, Zt as n } from "./F0CanvasPanel-DOjVevQN.js";
|
|
2
2
|
import { t as r } from "./purify.es-ZpfdAuNV.js";
|
|
3
3
|
import { t as i } from "./ownValue-D4uSXt0d.js";
|
|
4
4
|
//#region src/addons/documents/lib/codeLanguages.ts
|
|
@@ -20,17 +20,18 @@ var l = async () => {
|
|
|
20
20
|
case /android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini/i.test(e): return "mobile";
|
|
21
21
|
default: return "unknown";
|
|
22
22
|
}
|
|
23
|
-
}, u = t(null), d = ({ children: e, platform: t, isDev: n = !1, showExperimentalWarnings: r = !1, renderDataTestIdAttribute: i = !1, hourCycle: o }) => {
|
|
24
|
-
let [
|
|
23
|
+
}, u = t(null), d = ({ children: e, platform: t, isDev: n = !1, showExperimentalWarnings: r = !1, renderDataTestIdAttribute: i = !1, hourCycle: o, newButtonStyles: d = !1 }) => {
|
|
24
|
+
let [f, p] = s(t ?? "unknown");
|
|
25
25
|
return a(() => {
|
|
26
|
-
t === void 0 && l().then(
|
|
26
|
+
t === void 0 && l().then(p);
|
|
27
27
|
}, [t]), /* @__PURE__ */ c(u.Provider, {
|
|
28
28
|
value: {
|
|
29
|
-
platform:
|
|
29
|
+
platform: f,
|
|
30
30
|
isDev: n,
|
|
31
31
|
showExperimentalWarnings: r,
|
|
32
32
|
renderDataTestIdAttribute: i,
|
|
33
|
-
hourCycle: o
|
|
33
|
+
hourCycle: o,
|
|
34
|
+
newButtonStyles: d
|
|
34
35
|
},
|
|
35
36
|
children: e
|
|
36
37
|
});
|
|
@@ -54,32 +55,35 @@ function h() {
|
|
|
54
55
|
function g() {
|
|
55
56
|
return i(u)?.hourCycle;
|
|
56
57
|
}
|
|
58
|
+
function _() {
|
|
59
|
+
return i(u)?.newButtonStyles ?? !1;
|
|
60
|
+
}
|
|
57
61
|
//#endregion
|
|
58
62
|
//#region src/elements/lib/data-testid/data-testid.tsx
|
|
59
|
-
var
|
|
63
|
+
var v = /* @__PURE__ */ new Set([
|
|
60
64
|
"prototype",
|
|
61
65
|
"length",
|
|
62
66
|
"name",
|
|
63
67
|
"$$typeof",
|
|
64
68
|
"render"
|
|
65
|
-
]),
|
|
69
|
+
]), y = (e, t) => {
|
|
66
70
|
let n = [...Object.getOwnPropertyNames(e), ...Object.getOwnPropertySymbols(e)];
|
|
67
|
-
for (let r of n) if (!
|
|
71
|
+
for (let r of n) if (!v.has(r)) try {
|
|
68
72
|
let n = Object.getOwnPropertyDescriptor(e, r);
|
|
69
73
|
n && Object.defineProperty(t, r, n);
|
|
70
74
|
} catch {}
|
|
71
|
-
},
|
|
75
|
+
}, b = ({ dataTestId: e, children: t }) => {
|
|
72
76
|
let n = m();
|
|
73
77
|
return !e || !n ? t : /* @__PURE__ */ c("div", {
|
|
74
78
|
"data-testid": e,
|
|
75
79
|
className: "contents",
|
|
76
80
|
children: t
|
|
77
81
|
});
|
|
78
|
-
},
|
|
82
|
+
}, x = (e) => {
|
|
79
83
|
if (e.$$typeof === Symbol.for("react.forward_ref")) {
|
|
80
84
|
let t = e, r = n((e, n) => {
|
|
81
85
|
let { dataTestId: r, ...i } = e;
|
|
82
|
-
return /* @__PURE__ */ c(
|
|
86
|
+
return /* @__PURE__ */ c(b, {
|
|
83
87
|
dataTestId: r,
|
|
84
88
|
children: /* @__PURE__ */ c(t, {
|
|
85
89
|
...i,
|
|
@@ -87,15 +91,15 @@ var _ = /* @__PURE__ */ new Set([
|
|
|
87
91
|
})
|
|
88
92
|
});
|
|
89
93
|
});
|
|
90
|
-
return
|
|
94
|
+
return y(e, r), r.displayName ||= e.displayName || e.name || e.render?.name || "Component", r;
|
|
91
95
|
}
|
|
92
96
|
if (e.$$typeof === Symbol.for("react.memo")) {
|
|
93
|
-
let t = e.type, n = e.compare, i =
|
|
94
|
-
return
|
|
97
|
+
let t = e.type, n = e.compare, i = x(t), a = r(i, n);
|
|
98
|
+
return y(e, a), a.displayName ||= e.displayName || e.name || e.type?.displayName || "Component", a;
|
|
95
99
|
}
|
|
96
100
|
let t = n((t, n) => {
|
|
97
101
|
let { dataTestId: r, ...i } = t;
|
|
98
|
-
return /* @__PURE__ */ c(
|
|
102
|
+
return /* @__PURE__ */ c(b, {
|
|
99
103
|
dataTestId: r,
|
|
100
104
|
children: /* @__PURE__ */ c(e, {
|
|
101
105
|
...i,
|
|
@@ -103,29 +107,29 @@ var _ = /* @__PURE__ */ new Set([
|
|
|
103
107
|
})
|
|
104
108
|
});
|
|
105
109
|
});
|
|
106
|
-
return
|
|
107
|
-
},
|
|
110
|
+
return y(e, t), t.displayName ||= e.displayName || e.name || "Component", t;
|
|
111
|
+
}, S = t(null), C = (e, t) => {
|
|
108
112
|
let n = e.split("."), r = t;
|
|
109
113
|
for (let e of n) if (r && typeof r == "object" && e in r) r = r[e];
|
|
110
114
|
else return;
|
|
111
115
|
return typeof r == "string" ? r : void 0;
|
|
112
|
-
},
|
|
116
|
+
}, w = (e) => typeof e == "object" && !!e && !Array.isArray(e), T = (e, t) => {
|
|
113
117
|
let n = { ...e };
|
|
114
118
|
for (let [e, r] of Object.entries(t)) {
|
|
115
119
|
if (r === void 0) continue;
|
|
116
120
|
let t = n[e];
|
|
117
|
-
n[e] =
|
|
121
|
+
n[e] = w(r) && w(t) ? T(t, r) : r;
|
|
118
122
|
}
|
|
119
123
|
return n;
|
|
120
124
|
};
|
|
121
|
-
function
|
|
122
|
-
let r = o(() =>
|
|
123
|
-
let n =
|
|
125
|
+
function E({ children: t, translations: n }) {
|
|
126
|
+
let r = o(() => T(e, n), [n]), i = (e, t = {}) => {
|
|
127
|
+
let n = C(e, r);
|
|
124
128
|
if (n === void 0) return console.warn(`Translation key ${e} not found`), e;
|
|
125
129
|
for (let [e, r] of Object.entries(t)) n = n.replace(`{{${e}}}`, r.toString());
|
|
126
130
|
return n;
|
|
127
131
|
};
|
|
128
|
-
return /* @__PURE__ */ c(
|
|
132
|
+
return /* @__PURE__ */ c(S.Provider, {
|
|
129
133
|
value: {
|
|
130
134
|
...r,
|
|
131
135
|
t: i
|
|
@@ -133,18 +137,18 @@ function T({ children: t, translations: n }) {
|
|
|
133
137
|
children: t
|
|
134
138
|
});
|
|
135
139
|
}
|
|
136
|
-
var
|
|
140
|
+
var D = {
|
|
137
141
|
...e,
|
|
138
142
|
t: (t, n = {}) => {
|
|
139
|
-
let r =
|
|
143
|
+
let r = C(t, e);
|
|
140
144
|
if (r === void 0) return t;
|
|
141
145
|
for (let [e, t] of Object.entries(n)) r = r.replace(`{{${e}}}`, t.toString());
|
|
142
146
|
return r;
|
|
143
147
|
}
|
|
144
148
|
};
|
|
145
|
-
function
|
|
146
|
-
return i(
|
|
149
|
+
function O() {
|
|
150
|
+
return i(S) ?? D;
|
|
147
151
|
}
|
|
148
|
-
var
|
|
152
|
+
var k = (e) => e;
|
|
149
153
|
//#endregion
|
|
150
|
-
export {
|
|
154
|
+
export { x as a, f as c, p as d, b as i, _ as l, k as n, d as o, O as r, g as s, E as t, h as u };
|
|
@@ -1667,11 +1667,32 @@ interface ExpenseProfile {
|
|
|
1667
1667
|
}
|
|
1668
1668
|
//#endregion
|
|
1669
1669
|
//#region src/elements/Action/types.d.ts
|
|
1670
|
-
declare const actionButtonVariants: readonly [
|
|
1670
|
+
declare const actionButtonVariants: readonly [
|
|
1671
|
+
/** The brand red, for the single standout action on a surface. */
|
|
1672
|
+
"hero",
|
|
1673
|
+
/** The everyday main action, in the ink colour. */
|
|
1674
|
+
"primary",
|
|
1675
|
+
/** The alternative next to a primary: a light field with a border. */
|
|
1676
|
+
"secondary",
|
|
1677
|
+
/** The quietest filled button, on a light grey fill. */
|
|
1678
|
+
"tertiary",
|
|
1679
|
+
/** @deprecated Use `hero`. An alias that renders the same button. */
|
|
1680
|
+
"default",
|
|
1681
|
+
/** @deprecated Use `secondary`. An alias that renders the same button. */
|
|
1682
|
+
"outline", "critical",
|
|
1683
|
+
/** @deprecated Use `tertiary`. An alias that renders the same button. */
|
|
1684
|
+
"neutral", "ghost",
|
|
1685
|
+
/**
|
|
1686
|
+
* Upsell: the secondary button with its icon painted in the promote yellow.
|
|
1687
|
+
* Pair it with the `Upsell` icon (a lightning bolt).
|
|
1688
|
+
*/
|
|
1689
|
+
"promote",
|
|
1690
|
+
/** @deprecated Use `promote`. An alias that renders the same button. */
|
|
1691
|
+
"outlinePromote", "ai"];
|
|
1671
1692
|
type ActionButtonVariant = (typeof actionButtonVariants)[number];
|
|
1672
1693
|
declare const actionLinkVariants: readonly ["link", "unstyled", "mention"];
|
|
1673
1694
|
type ActionLinkVariant = (typeof actionLinkVariants)[number];
|
|
1674
|
-
declare const actionVariants: readonly ["default", "outline", "critical", "neutral", "ghost", "promote", "outlinePromote", "ai", "link", "unstyled", "mention"];
|
|
1695
|
+
declare const actionVariants: readonly ["hero", "primary", "secondary", "tertiary", "default", "outline", "critical", "neutral", "ghost", "promote", "outlinePromote", "ai", "link", "unstyled", "mention"];
|
|
1675
1696
|
type ActionVariant = (typeof actionVariants)[number];
|
|
1676
1697
|
declare const actionSizes: readonly ["sm", "md", "lg"];
|
|
1677
1698
|
type ActionSize = (typeof actionSizes)[number];
|
|
@@ -1822,7 +1843,7 @@ declare const useEmojiConfetti: () => {
|
|
|
1822
1843
|
};
|
|
1823
1844
|
//#endregion
|
|
1824
1845
|
//#region src/elements/F0Button/types.d.ts
|
|
1825
|
-
declare const buttonVariants: ("critical" | "default" | "ghost" | "neutral" | "outline" | "outlinePromote" | "promote")[];
|
|
1846
|
+
declare const buttonVariants: ("critical" | "default" | "ghost" | "hero" | "neutral" | "outline" | "outlinePromote" | "primary" | "promote" | "secondary" | "tertiary")[];
|
|
1826
1847
|
type ButtonVariant = Exclude<(typeof actionButtonVariants)[number], "ai">;
|
|
1827
1848
|
declare const buttonSizes: readonly ["sm", "md", "lg"];
|
|
1828
1849
|
type ButtonSize = (typeof buttonSizes)[number];
|
|
@@ -1861,7 +1882,24 @@ type F0ButtonProps = {
|
|
|
1861
1882
|
* loading state.
|
|
1862
1883
|
*/
|
|
1863
1884
|
onClick?: (event: React.MouseEvent<HTMLElement>) => void | Promise<unknown>;
|
|
1864
|
-
/**
|
|
1885
|
+
/**
|
|
1886
|
+
* The variant of the button, from loudest to quietest:
|
|
1887
|
+
*
|
|
1888
|
+
* - `"hero"`: the brand red. The single standout action on a surface; use it
|
|
1889
|
+
* sparingly.
|
|
1890
|
+
* - `"primary"`: the everyday main action, in the ink colour.
|
|
1891
|
+
* - `"secondary"`: the alternative next to a primary, with a border.
|
|
1892
|
+
* - `"tertiary"`: the quietest filled button, on a light grey fill.
|
|
1893
|
+
* - `"ghost"`: no fill or border, for icon-only buttons.
|
|
1894
|
+
*
|
|
1895
|
+
* `"critical"` marks destructive actions with a solid amber field.
|
|
1896
|
+
* `"promote"` marks upsell actions: the secondary button with its icon in
|
|
1897
|
+
* the promote yellow. Pair it with the `Upsell` icon.
|
|
1898
|
+
*
|
|
1899
|
+
* Deprecated: `"default"`, `"outline"`, `"neutral"` and `"outlinePromote"`
|
|
1900
|
+
* are aliases of `"hero"`, `"secondary"`, `"tertiary"` and `"promote"`. A
|
|
1901
|
+
* button with no variant still renders the hero.
|
|
1902
|
+
*/
|
|
1865
1903
|
variant?: ButtonVariant;
|
|
1866
1904
|
/**
|
|
1867
1905
|
* Sets the button size. 'lg' for mobile, 'md' for desktop, 'sm' for
|
|
@@ -1877,6 +1915,11 @@ type F0ButtonProps = {
|
|
|
1877
1915
|
icon?: IconType;
|
|
1878
1916
|
/** Sets the side of the label the icon is placed on. Defaults to "left". */
|
|
1879
1917
|
iconPosition?: "left" | "right";
|
|
1918
|
+
/**
|
|
1919
|
+
* Paints the icon in one of the icon colour tokens (for example
|
|
1920
|
+
* `"positive"` or `"promote"`) instead of the variant's own icon colour.
|
|
1921
|
+
*/
|
|
1922
|
+
iconColor?: IconColor;
|
|
1880
1923
|
/** If true, the button rotates the icon while the button is hovered. */
|
|
1881
1924
|
iconRotate?: boolean;
|
|
1882
1925
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { o as e } from "./rolldown-runtime-BItFwnF5.js";
|
|
2
2
|
import { t } from "./dist-Cuwaibqg.js";
|
|
3
|
-
import { s as n } from "./F0Map-
|
|
3
|
+
import { s as n } from "./F0Map-DZ_8bKFy.js";
|
|
4
4
|
import './maplibre-gl.css';import './maplibre.css';/* empty css */
|
|
5
5
|
import { t as r } from "./maplibre-gl-DVldSYfz.js";
|
|
6
6
|
//#region ../../node_modules/.pnpm/@mapbox+mapbox-gl-rtl-text@0.2.3_mapbox-gl@1.13.3/node_modules/@mapbox/mapbox-gl-rtl-text/mapbox-gl-rtl-text.js?url
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { o as e, r as t, t as n } from "./rolldown-runtime-BItFwnF5.js";
|
|
2
2
|
import { z as r } from "./tooltip-BX4dSfeL.js";
|
|
3
|
-
import { ya as i } from "./F0CanvasPanel-
|
|
3
|
+
import { ya as i } from "./F0CanvasPanel-DOjVevQN.js";
|
|
4
4
|
import { t as a } from "./dist-Dt-cTb6D.js";
|
|
5
5
|
import { n as o, r as s } from "./pdfWorkerConfig-BwllKt1K.js";
|
|
6
6
|
import { createContext as c, forwardRef as l, useCallback as u, useContext as d, useEffect as f, useImperativeHandle as p, useLayoutEffect as m, useMemo as h, useReducer as g, useRef as _ } from "react";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { L as e, s as t } from "./tooltip-BX4dSfeL.js";
|
|
2
|
-
import { n } from "./F0Icon-
|
|
2
|
+
import { n } from "./F0Icon-yYYIXayJ.js";
|
|
3
3
|
import * as r from "react";
|
|
4
4
|
import i, { createElement as a, forwardRef as o, useEffect as s, useLayoutEffect as c, useState as l } from "react";
|
|
5
5
|
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { L as e } from "./tooltip-BX4dSfeL.js";
|
|
2
|
-
import { i as t, r as n } from "./F0Button-
|
|
3
|
-
import { o as r } from "./F0Icon-
|
|
4
|
-
import { E as i, O as a, T as o, b as s, p as c, w as l, y as u } from "./popover
|
|
2
|
+
import { i as t, r as n } from "./F0Button-DEQjTtQQ.js";
|
|
3
|
+
import { o as r } from "./F0Icon-yYYIXayJ.js";
|
|
4
|
+
import { E as i, O as a, T as o, b as s, p as c, w as l, y as u } from "./popover-Qp4DqBn0.js";
|
|
5
5
|
import * as d from "react";
|
|
6
6
|
import { createElement as f, forwardRef as p, useEffect as m, useRef as h } from "react";
|
|
7
7
|
import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
|