@factorialco/f0-react 16.29.0 → 16.31.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-DYIMptq3.js → ArchiveThumbnail-snnCL51c.js} +5 -5
- package/dist/{ArchiveViewer-BrPp0CA3.js → ArchiveViewer-qrPGzl45.js} +12 -12
- package/dist/{ChatPostComposerDialog-BYmkWYzK.js → ChatPostComposerDialog-C7FQ5zej.js} +2 -2
- package/dist/{CoachmarkProvider-BAA3qCPM.js → CoachmarkProvider-CqkPfWAF.js} +19840 -19840
- package/dist/{CodeThumbnail-B3oQLXMY.js → CodeThumbnail-jrNjbGFK.js} +1 -1
- package/dist/{CodeViewer-D-taZc0E.js → CodeViewer-rskCF-XU.js} +4 -4
- package/dist/{DocumentToolbar-CrMaDP1Y.js → DocumentToolbar-C7f4MplQ.js} +3 -3
- package/dist/{DocxViewer-CWPqezrV.js → DocxViewer-Md9lijeE.js} +1 -1
- package/dist/{F0AiProcessingOverlay-2ur7x9yV.js → F0AiProcessingOverlay-Bz5bf3ZA.js} +499 -499
- package/dist/{F0Alert-DfoQ6QNW.js → F0Alert-Ctib1gD6.js} +6 -6
- package/dist/F0AudioPlayer-B4YvRRgo.js +2 -0
- package/dist/{F0CanvasPanel-Dsy1XGQ8.js → F0CanvasPanel-CZKTFPP7.js} +11044 -11030
- package/dist/{F0DocumentViewer-CBBIWsop.js → F0DocumentViewer-BgIPKW21.js} +1 -1
- package/dist/{F0DocumentViewer-6RmJDdEF.js → F0DocumentViewer-D9HXGXr_.js} +2 -2
- package/dist/{F0Map-CtZ50EMs.js → F0Map-C4p4mly7.js} +640 -624
- package/dist/{F0Select-v7_pmIe-.js → F0Select-D6mxgb1s.js} +3 -3
- package/dist/{F0Text-CUCHaP9i.js → F0Text-CcpTiEit.js} +1 -1
- package/dist/{F0VideoPlayer-C-6enHNl.js → F0VideoPlayer-D6cgKhcQ.js} +11 -11
- package/dist/F0VideoPlayer-DV84zT9b.js +1 -0
- package/dist/{HtmlViewer-DqpsDfeO.js → HtmlViewer-BVitdvD6.js} +4 -4
- package/dist/{Map-BwQhTxJl.js → Map-ZXcjPt4S.js} +9 -9
- package/dist/{PdfThumbnail-GoDwcO2G.js → PdfThumbnail-CwkqbqHx.js} +1 -1
- package/dist/{PdfViewer-CjC40poY.js → PdfViewer-Cytnm1Ks.js} +6 -6
- package/dist/{SheetViewer-nZ9BbsVs.js → SheetViewer-DFLeOh69.js} +11 -11
- package/dist/{TextViewer-Cce_dy1w.js → TextViewer-C9Ds2dE7.js} +1 -1
- package/dist/ai.js +3 -3
- package/dist/component-status.js +1 -1
- package/dist/{dist-DZ9FjbuM.js → dist-BwlC-i6M.js} +1 -1
- package/dist/{dist-DmFbkLx6.js → dist-C691Abhf.js} +4 -4
- package/dist/{dist-Dlesu-9k.js → dist-CiC2ZqiK.js} +7 -8
- package/dist/{dist-C2ihEjaT.js → dist-DN0nDQy0.js} +1 -1
- package/dist/{dist-swS4bqxy.js → dist-_ts6SUAW.js} +1 -1
- package/dist/experimental.d.ts +28 -3
- package/dist/experimental.js +5810 -5713
- package/dist/f0.js +175 -175
- package/dist/{highlight-B9V0OIph.js → highlight-CT0Gl0kj.js} +4 -4
- package/dist/{maplibre-BFcRQVjt.js → maplibre-B3l6Byv4.js} +1 -1
- package/dist/{pdfWorker-Cp3pKYAZ.js → pdfWorker-BwmWYP-K.js} +1 -1
- package/dist/styles.css +1 -1
- package/dist/{useData-3UiKD6C0.js → useData-XExWuz7o.js} +1 -1
- package/package.json +1 -1
- package/tailwind.config.ts +137 -0
- package/dist/F0AudioPlayer-DQng2ypK.js +0 -2
- package/dist/F0VideoPlayer-oiKJ6HiF.js +0 -1
|
@@ -5,7 +5,7 @@ import { L as o, R as s } from "./tooltip-NXXT56H4.js";
|
|
|
5
5
|
import { C as c, I as l, K as u, f as d, t as f, v as p } from "./F0Button-DVbQTicD.js";
|
|
6
6
|
import { a as m, s as h, t as g, u as _ } from "./createIcon-B-z7hPQg.js";
|
|
7
7
|
import { a as v, d as y, f as b, i as x, m as S, t as C, w } from "./popover-BgQJIZoe.js";
|
|
8
|
-
import { _ as T, d as E, g as D, i as ee, r as O, v as te } from "./dist-
|
|
8
|
+
import { _ as T, d as E, g as D, i as ee, r as O, v as te } from "./dist-CiC2ZqiK.js";
|
|
9
9
|
import { t as ne } from "./dist-DMTFO2gF.js";
|
|
10
10
|
import { t as k } from "./ownValue-D4uSXt0d.js";
|
|
11
11
|
import * as A from "react";
|
package/package.json
CHANGED
package/tailwind.config.ts
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
import {
|
|
2
|
+
absoluteSpacing as coreAbsoluteSpacing,
|
|
3
|
+
borderRadius,
|
|
4
|
+
boxShadow,
|
|
5
|
+
f1Colors,
|
|
6
|
+
pageSpacing as corePageSpacing,
|
|
7
|
+
relativeSpacing as coreRelativeSpacing,
|
|
8
|
+
} from "@factorialco/f0-core"
|
|
1
9
|
import { baseConfig } from "@factorialco/f0-core/tailwind"
|
|
2
10
|
import type { Config } from "tailwindcss"
|
|
3
11
|
import plugin from "tailwindcss/plugin"
|
|
@@ -5,6 +13,116 @@ import type { PluginUtils } from "tailwindcss/types/config"
|
|
|
5
13
|
import { chartColorTokens } from "./src/elements/lib/charts/data-chart-colors"
|
|
6
14
|
import { internalAvatarColors } from "./src/elements/primitives/Avatar/types"
|
|
7
15
|
|
|
16
|
+
// Core types its scales as Tailwind theme values, which may be functions;
|
|
17
|
+
// they are plain records.
|
|
18
|
+
type Scale = Record<string, string>
|
|
19
|
+
const absoluteSpacing = coreAbsoluteSpacing as Scale
|
|
20
|
+
const relativeSpacing = coreRelativeSpacing as Scale
|
|
21
|
+
const pageSpacing = corePageSpacing as Scale
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* The measures `ApplicationFrame` owns around the page and its navigation.
|
|
25
|
+
* Each token reads a variable with today's value as its fallback; the flush
|
|
26
|
+
* surface sets the variables once, on the frame (`navigation-surface-flush`),
|
|
27
|
+
* so the parts that use a token never know which surface they are on.
|
|
28
|
+
*/
|
|
29
|
+
const frameMeasures = {
|
|
30
|
+
// Room above the navigation's headers, so their titles line up with the
|
|
31
|
+
// page header's: an inset frame insets the page 4px from the window's top.
|
|
32
|
+
"nav-head": ["--f0-nav-head", absoluteSpacing[2], absoluteSpacing[0]],
|
|
33
|
+
// The secondary sidebar's header: the room above its title row and the
|
|
34
|
+
// row's height. Inset keeps a 60px header with its title at 36px; flush
|
|
35
|
+
// drops the room, and the 56px row puts the title at 28px.
|
|
36
|
+
"nav-panel-room": [
|
|
37
|
+
"--f0-nav-panel-room",
|
|
38
|
+
absoluteSpacing[3],
|
|
39
|
+
absoluteSpacing[0],
|
|
40
|
+
],
|
|
41
|
+
"nav-panel-head": [
|
|
42
|
+
"--f0-nav-panel-head",
|
|
43
|
+
absoluteSpacing[12],
|
|
44
|
+
absoluteSpacing[14],
|
|
45
|
+
],
|
|
46
|
+
// The sidebar menu: side inset, gap between categories, room after each
|
|
47
|
+
// group.
|
|
48
|
+
"nav-inset": ["--f0-nav-inset", absoluteSpacing[3], absoluteSpacing[2]],
|
|
49
|
+
"nav-gap": ["--f0-nav-gap", absoluteSpacing[3], absoluteSpacing[2.5]],
|
|
50
|
+
"nav-end": ["--f0-nav-end", absoluteSpacing[0], absoluteSpacing[2.5]],
|
|
51
|
+
// A tab panel's gap between groups.
|
|
52
|
+
"nav-panel-gap": [
|
|
53
|
+
"--f0-nav-panel-gap",
|
|
54
|
+
absoluteSpacing[4],
|
|
55
|
+
absoluteSpacing[2.5],
|
|
56
|
+
],
|
|
57
|
+
// A section title's leading padding, in line with the panel's title.
|
|
58
|
+
"nav-label": ["--f0-nav-label", absoluteSpacing[1.5], absoluteSpacing[2]],
|
|
59
|
+
// The page header's sides, shared by the tabs hanging from it.
|
|
60
|
+
"page-header": [
|
|
61
|
+
"--f0-page-header-inline",
|
|
62
|
+
pageSpacing.page,
|
|
63
|
+
absoluteSpacing[4],
|
|
64
|
+
],
|
|
65
|
+
} as const
|
|
66
|
+
|
|
67
|
+
const frameMeasure = (name: keyof typeof frameMeasures) => {
|
|
68
|
+
const [variable, fallback] = frameMeasures[name]
|
|
69
|
+
return `var(${variable}, ${fallback})`
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const frameSpacing = Object.fromEntries(
|
|
73
|
+
Object.keys(frameMeasures).map((name) => [
|
|
74
|
+
name,
|
|
75
|
+
frameMeasure(name as keyof typeof frameMeasures),
|
|
76
|
+
])
|
|
77
|
+
)
|
|
78
|
+
|
|
79
|
+
/** On flush the frame's card draws the page's edge, so the page draws none. */
|
|
80
|
+
const flushSurface = {
|
|
81
|
+
...Object.fromEntries(
|
|
82
|
+
Object.values(frameMeasures).map(([variable, , flush]) => [variable, flush])
|
|
83
|
+
),
|
|
84
|
+
"--f0-page-header-height": relativeSpacing[14],
|
|
85
|
+
"--f0-page-radius": borderRadius.none,
|
|
86
|
+
"--f0-page-edge": "transparent",
|
|
87
|
+
"--f0-page-shadow": "none",
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* A sidebar panel's top scroll shadow follows its scroller through a named
|
|
92
|
+
* scroll timeline, so it is right on the first frame (an IntersectionObserver
|
|
93
|
+
* reports a frame late). Browsers without scroll-driven animations keep the
|
|
94
|
+
* observer's opacity.
|
|
95
|
+
*/
|
|
96
|
+
const panelScrollTimeline = plugin(function panelScrollTimeline({
|
|
97
|
+
addBase,
|
|
98
|
+
addUtilities,
|
|
99
|
+
}) {
|
|
100
|
+
addBase({
|
|
101
|
+
"@keyframes f0-scroll-shadow-in": {
|
|
102
|
+
from: { opacity: "0" },
|
|
103
|
+
to: { opacity: "0.5" },
|
|
104
|
+
},
|
|
105
|
+
})
|
|
106
|
+
addUtilities({
|
|
107
|
+
".timeline-scope-panel": { "timeline-scope": "--f0-panel-scroll" },
|
|
108
|
+
".scroll-timeline-panel": { "scroll-timeline": "--f0-panel-scroll y" },
|
|
109
|
+
".animate-panel-scroll-shadow": {
|
|
110
|
+
"@supports (animation-timeline: scroll())": {
|
|
111
|
+
// The timeline sets the progress; `auto` lets it own the duration.
|
|
112
|
+
animation: "f0-scroll-shadow-in auto linear both",
|
|
113
|
+
"animation-timeline": "--f0-panel-scroll",
|
|
114
|
+
"animation-range": "0 16px",
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
})
|
|
118
|
+
})
|
|
119
|
+
|
|
120
|
+
const navigationSurfaces = plugin(function navigationSurfaces({
|
|
121
|
+
addComponents,
|
|
122
|
+
}) {
|
|
123
|
+
addComponents({ ".navigation-surface-flush": flushSurface })
|
|
124
|
+
})
|
|
125
|
+
|
|
8
126
|
/**
|
|
9
127
|
* Each avatar colour's soft tone: its lightest tint under initials in its
|
|
10
128
|
* darkest shade (`bg-avatar-soft-viridian text-avatar-soft-viridian`). Every
|
|
@@ -109,6 +227,23 @@ export default {
|
|
|
109
227
|
// The `grid-rows-collapsed` ⇄ `grid-rows-expanded` swap and the margin
|
|
110
228
|
// that goes with it.
|
|
111
229
|
collapse: "grid-template-rows,margin-top",
|
|
230
|
+
// The secondary sidebar opens and closes by its width.
|
|
231
|
+
width: "width",
|
|
232
|
+
},
|
|
233
|
+
spacing: frameSpacing,
|
|
234
|
+
height: {
|
|
235
|
+
...baseConfig.theme?.extend?.height,
|
|
236
|
+
"page-header": `var(--f0-page-header-height, ${relativeSpacing[16]})`,
|
|
237
|
+
},
|
|
238
|
+
borderRadius: { page: `var(--f0-page-radius, ${borderRadius.xl})` },
|
|
239
|
+
// The page's own edge: `border-secondary`, or none when the frame's
|
|
240
|
+
// card draws it.
|
|
241
|
+
colors: {
|
|
242
|
+
...baseConfig.theme?.extend?.colors,
|
|
243
|
+
"page-edge": `var(--f0-page-edge, ${f1Colors.border.secondary})`,
|
|
244
|
+
},
|
|
245
|
+
boxShadow: {
|
|
246
|
+
page: `var(--f0-page-shadow, ${boxShadow.DEFAULT})`,
|
|
112
247
|
},
|
|
113
248
|
keyframes: {
|
|
114
249
|
...baseConfig.theme?.extend?.keyframes,
|
|
@@ -171,6 +306,8 @@ export default {
|
|
|
171
306
|
},
|
|
172
307
|
plugins: [
|
|
173
308
|
...(baseConfig.plugins ?? []),
|
|
309
|
+
panelScrollTimeline,
|
|
310
|
+
navigationSurfaces,
|
|
174
311
|
// Text set top → bottom, e.g. the title of a vertical axis: a rotate alone
|
|
175
312
|
// keeps the horizontal width.
|
|
176
313
|
plugin(({ addUtilities }) => {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { t as F0VideoPlayer } from "./F0VideoPlayer-C-6enHNl.js";
|