@crewlethq/ui 0.24.0 → 0.26.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/README.md +85 -3
- package/dist/ArrangeList/index.js +2 -2
- package/dist/ArtifactCover/ArtifactCover.d.ts +37 -0
- package/dist/ArtifactCover/DashboardCover.d.ts +46 -0
- package/dist/ArtifactCover/index.d.ts +6 -0
- package/dist/ArtifactCover/index.js +14 -0
- package/dist/ArtifactCover-D4MBEJ5H.css +67 -0
- package/dist/ArtifactIcon/ArtifactIcon.d.ts +29 -0
- package/dist/ArtifactIcon/index.d.ts +2 -0
- package/dist/ArtifactIcon/index.js +13 -0
- package/dist/AvatarPicker/index.js +6 -6
- package/dist/Canvas/Canvas.d.ts +13 -2
- package/dist/Canvas/index.js +1 -1
- package/dist/CanvasBoard/CanvasBoard.d.ts +117 -0
- package/dist/CanvasBoard/budget.d.ts +38 -0
- package/dist/CanvasBoard/index.d.ts +5 -0
- package/dist/CanvasBoard/index.js +10 -0
- package/dist/CanvasBoard-ZLPDINSM.css +236 -0
- package/dist/CanvasSchematic/CanvasSchematic.d.ts +31 -0
- package/dist/CanvasSchematic/index.d.ts +3 -0
- package/dist/CanvasSchematic/index.js +2 -0
- package/dist/CanvasSchematic-PLB3N46J.css +36 -0
- package/dist/ChangeMark/index.js +3 -3
- package/dist/CharacterPicker/index.js +2 -2
- package/dist/Checkbox/Checkbox.d.ts +6 -0
- package/dist/Checkbox/index.js +1 -1
- package/dist/{Checkbox-KT7RS6QQ.css → Checkbox-5UORUG3F.css} +16 -0
- package/dist/CommentThread/index.js +2 -2
- package/dist/DashboardCover-RMINBODB.css +143 -0
- package/dist/DataTable/index.js +3 -3
- package/dist/DataView/index.js +5 -5
- package/dist/DatasetSource/DatasetSource.d.ts +83 -0
- package/dist/DatasetSource/index.d.ts +3 -0
- package/dist/DatasetSource/index.js +7 -0
- package/dist/DatasetSource-47LBDMPR.css +129 -0
- package/dist/DocTabsEditor/DocTabsEditor.d.ts +60 -0
- package/dist/DocTabsEditor/index.d.ts +3 -0
- package/dist/DocTabsEditor/index.js +9 -0
- package/dist/DocTabsEditor-RCOWHX5J.css +78 -0
- package/dist/DownloadButton/index.js +2 -2
- package/dist/HuePicker/index.js +4 -4
- package/dist/LinkInterstitial/index.js +2 -2
- package/dist/MarkdownEditor/index.js +5 -5
- package/dist/MergeConflicts/MergeConflicts.d.ts +51 -0
- package/dist/MergeConflicts/index.d.ts +3 -0
- package/dist/MergeConflicts/index.js +9 -0
- package/dist/MergeConflicts-O44ESH4T.css +77 -0
- package/dist/Meter/index.js +1 -1
- package/dist/{Meter-5VCSFMZW.css → Meter-ZZRFUEOH.css} +15 -0
- package/dist/ObjectHeader/ObjectHeader.d.ts +7 -1
- package/dist/ObjectHeader/index.js +1 -1
- package/dist/{ObjectHeader-UNVYM2KD.css → ObjectHeader-D7GU7QNI.css} +15 -0
- package/dist/PeopleRail/index.js +2 -2
- package/dist/PresenceModel/index.d.ts +1 -1
- package/dist/PresenceModel/index.js +1 -1
- package/dist/PresenceModel/presence.d.ts +10 -2
- package/dist/PresenceStack/index.js +2 -2
- package/dist/PresenterView/PresenterView.d.ts +52 -0
- package/dist/PresenterView/index.d.ts +3 -0
- package/dist/PresenterView/index.js +8 -0
- package/dist/PresenterView-T2C6ZZ3N.css +103 -0
- package/dist/Section/index.js +1 -1
- package/dist/{Section-QRUPRIQ2.css → Section-QR3ILQVK.css} +4 -1
- package/dist/SegmentedControl/SegmentedControl.d.ts +17 -0
- package/dist/SegmentedControl/index.js +4 -4
- package/dist/{SegmentedControl-PKBLJVSA.css → SegmentedControl-FLI45IOW.css} +13 -0
- package/dist/ShareDialog/index.js +3 -3
- package/dist/SheetGrid/SheetGrid.d.ts +24 -2
- package/dist/SheetGrid/index.js +10 -6
- package/dist/{SheetGrid-4HOXDVIB.css → SheetGrid-J3TKKXZL.css} +87 -17
- package/dist/SheetModel/edits.d.ts +7 -1
- package/dist/SheetModel/index.js +2 -2
- package/dist/SheetModel/labels.d.ts +9 -0
- package/dist/SheetModel/types.d.ts +6 -0
- package/dist/SlideCompare/SlideCompare.d.ts +52 -0
- package/dist/SlideCompare/index.d.ts +3 -0
- package/dist/SlideCompare/index.js +7 -0
- package/dist/SlideCompare-MGM3U2ME.css +80 -0
- package/dist/SlideFilmstrip/SlideFilmstrip.d.ts +50 -0
- package/dist/SlideFilmstrip/index.d.ts +3 -0
- package/dist/SlideFilmstrip/index.js +8 -0
- package/dist/SlideFilmstrip-BCLNAHFX.css +108 -0
- package/dist/SlideGrid/SlideGrid.d.ts +32 -0
- package/dist/SlideGrid/index.d.ts +3 -0
- package/dist/SlideGrid/index.js +5 -0
- package/dist/SlideGrid-RT6QEQEE.css +82 -0
- package/dist/SlideStage/SlideStage.d.ts +47 -0
- package/dist/SlideStage/index.d.ts +5 -0
- package/dist/SlideStage/index.js +4 -0
- package/dist/SlideStage/useSlideKeys.d.ts +21 -0
- package/dist/SlideStage-XIOTMMRU.css +32 -0
- package/dist/Switcher/index.js +2 -2
- package/dist/TableCells/index.js +2 -2
- package/dist/Tabs/index.js +2 -2
- package/dist/Tabs/roving.d.ts +1 -0
- package/dist/TagGroup/TagGroup.d.ts +16 -1
- package/dist/TagGroup/index.js +1 -1
- package/dist/{TagGroup-BCQZD7ZD.css → TagGroup-NAXTJHDS.css} +22 -0
- package/dist/ThemeGallery/index.js +2 -2
- package/dist/ThemeSwitcher/index.js +5 -5
- package/dist/TreeCanvas/index.js +2 -2
- package/dist/VersionCompare/VersionCompare.d.ts +8 -1
- package/dist/VersionCompare/index.js +5 -5
- package/dist/VersionTimeline/index.js +1 -1
- package/dist/{VersionTimeline-EBJ6MIPJ.css → VersionTimeline-6KRXEEOO.css} +7 -7
- package/dist/WidgetFrame/WidgetFrame.d.ts +73 -0
- package/dist/WidgetFrame/index.d.ts +3 -0
- package/dist/WidgetFrame/index.js +6 -0
- package/dist/WidgetFrame-4EFJOJMW.css +127 -0
- package/dist/chunk-3D7PSL2L.js +438 -0
- package/dist/{chunk-SJCKMSQK.js → chunk-5LUI3WQP.js} +1 -1
- package/dist/{chunk-IASV5UCP.js → chunk-7T42VQQT.js} +3 -1
- package/dist/{chunk-BJCFNRGH.js → chunk-BEHFTRMZ.js} +1 -1
- package/dist/chunk-BQYQWJPK.js +80 -0
- package/dist/{chunk-KLIEPFEZ.js → chunk-C2FRTWKO.js} +1 -1
- package/dist/{chunk-APS747CR.js → chunk-EHQTPVV4.js} +5 -3
- package/dist/{chunk-A2UXBCLO.js → chunk-FAQGGX2Z.js} +1 -1
- package/dist/chunk-FQCLKD7U.js +2 -0
- package/dist/{chunk-J4OKGJQ6.js → chunk-FVLCTCMV.js} +1 -1
- package/dist/{chunk-XJFOOXCF.js → chunk-HJEVSQN6.js} +1 -1
- package/dist/chunk-HONZQ4UR.js +107 -0
- package/dist/{chunk-5PSXBL73.js → chunk-HVIX5ECM.js} +1 -1
- package/dist/{chunk-36CWC2NH.js → chunk-INTEH4F3.js} +271 -143
- package/dist/{chunk-F6NZOVWL.js → chunk-IW55G7XG.js} +6 -2
- package/dist/chunk-KNLJL3VP.js +101 -0
- package/dist/chunk-KSSSFLE2.js +105 -0
- package/dist/{chunk-TXAFKH2A.js → chunk-KZOGQXSP.js} +6 -0
- package/dist/{chunk-CS65QSIJ.js → chunk-LZHLSQYK.js} +2 -2
- package/dist/chunk-MQEEQVG6.js +62 -0
- package/dist/chunk-NBWNLYWZ.js +62 -0
- package/dist/{chunk-YYZRLLLY.js → chunk-NHBP2XS5.js} +19 -3
- package/dist/chunk-O2EGEONV.js +90 -0
- package/dist/{chunk-YM3GJHGW.js → chunk-ODT5H4MN.js} +1 -1
- package/dist/{chunk-JCSXFAXG.js → chunk-OJRDEVHV.js} +1 -1
- package/dist/{chunk-U63Y5OCW.js → chunk-PRNX5AFE.js} +2 -2
- package/dist/chunk-Q4A5CGUB.js +43 -0
- package/dist/{chunk-7QL2OFP6.js → chunk-RCQXUT5K.js} +25 -9
- package/dist/{chunk-CBOICT64.js → chunk-RKKO7QHH.js} +2 -0
- package/dist/{chunk-TBIZSQHB.js → chunk-RSC7UJCR.js} +1 -1
- package/dist/chunk-RWA4H2TV.js +73 -0
- package/dist/{chunk-OQT7GSKJ.js → chunk-SGIQCI6Y.js} +1 -1
- package/dist/{chunk-35UKQ33X.js → chunk-SVW3VG72.js} +2 -2
- package/dist/{chunk-4PZ6FJKW.js → chunk-UGNUUVRI.js} +2 -2
- package/dist/chunk-UOR7TOAU.js +191 -0
- package/dist/{chunk-XMGB3ZAT.js → chunk-URUGEAFB.js} +3 -2
- package/dist/chunk-UZ7ZUSLH.js +179 -0
- package/dist/chunk-V2Z24W2Z.js +75 -0
- package/dist/{chunk-I7WXZOWA.js → chunk-VGE3G3T4.js} +3 -1
- package/dist/{chunk-UNZ7TVV5.js → chunk-W4XYY73O.js} +7 -9
- package/dist/{chunk-IPM2E6UI.js → chunk-WJDQ7XQA.js} +1 -1
- package/dist/{chunk-PPAQFGS2.js → chunk-YEKYVJQR.js} +1 -1
- package/dist/chunk-Z54BPRL6.js +74 -0
- package/dist/{chunk-S35G6PNC.js → chunk-Z7JYG5TF.js} +5 -4
- package/dist/chunk-ZZDY4XL7.js +112 -0
- package/dist/generated/index.d.ts +13 -0
- package/dist/generated/index.js +84 -71
- package/dist/index.js +84 -71
- package/dist/styles.css +1644 -153
- package/dist/utils/csv.d.ts +18 -0
- package/dist/utils/elementToPng.d.ts +49 -0
- package/dist/utils/index.d.ts +4 -1
- package/dist/utils/index.js +2 -2
- package/dist/utils/useDownload.d.ts +14 -4
- package/package.json +3 -3
- package/dist/chunk-E6UWRXNM.js +0 -52
- package/dist/chunk-M54K52ZU.js +0 -2
- package/dist/chunk-U5LQ2AS5.js +0 -1
- package/dist/{chunk-KG6XRG5Z.js → chunk-5OY4LJFH.js} +1 -1
- package/dist/{chunk-ZM7HLFOA.js → chunk-L2OQRPXJ.js} +1 -1
- package/dist/{chunk-MUGM7SEG.js → chunk-LFNUH4GY.js} +1 -1
- package/dist/{chunk-PBNP7H2C.js → chunk-M2VJGNCD.js} +1 -1
- /package/dist/{chunk-MSSZHDZI.js → chunk-SLRKS5PF.js} +0 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { SlideStage } from './chunk-KNLJL3VP.js';
|
|
2
|
+
import { Button } from './chunk-OG6CL3EB.js';
|
|
3
|
+
import { IconButton } from './chunk-4FQT6ZAY.js';
|
|
4
|
+
import { cx } from './chunk-ODEQTPFM.js';
|
|
5
|
+
import './PresenterView-T2C6ZZ3N.css';
|
|
6
|
+
import { useRef, useState, useEffect } from 'react';
|
|
7
|
+
import { ChevronLeftGlyph, ChevronRightGlyph } from '@crewlethq/icons/glyphs';
|
|
8
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
9
|
+
|
|
10
|
+
var LABELS = {
|
|
11
|
+
current: (position, total, title) => `Slide ${position} of ${total}, ${title}`,
|
|
12
|
+
next: (title) => `Next, ${title}`,
|
|
13
|
+
end: "End of the deck",
|
|
14
|
+
notes: "Speaker notes",
|
|
15
|
+
noNotes: "No notes for this slide.",
|
|
16
|
+
timer: "Time presenting",
|
|
17
|
+
pause: "Pause",
|
|
18
|
+
resume: "Resume",
|
|
19
|
+
reset: "Reset",
|
|
20
|
+
previous: "Previous slide",
|
|
21
|
+
forward: "Next slide",
|
|
22
|
+
position: (position, total) => `${position} of ${total}`
|
|
23
|
+
};
|
|
24
|
+
function formatStopwatch(ms) {
|
|
25
|
+
const total = Math.max(0, Math.floor(ms / 1e3));
|
|
26
|
+
const h = Math.floor(total / 3600);
|
|
27
|
+
const m = Math.floor(total % 3600 / 60);
|
|
28
|
+
const s = total % 60;
|
|
29
|
+
const ss = String(s).padStart(2, "0");
|
|
30
|
+
return h > 0 ? `${h}:${String(m).padStart(2, "0")}:${ss}` : `${m}:${ss}`;
|
|
31
|
+
}
|
|
32
|
+
function PresenterView({
|
|
33
|
+
current,
|
|
34
|
+
currentTitle,
|
|
35
|
+
next,
|
|
36
|
+
nextTitle = "",
|
|
37
|
+
notes,
|
|
38
|
+
position,
|
|
39
|
+
total,
|
|
40
|
+
onNext,
|
|
41
|
+
onPrevious,
|
|
42
|
+
now = Date.now,
|
|
43
|
+
className,
|
|
44
|
+
labels
|
|
45
|
+
}) {
|
|
46
|
+
const text = { ...LABELS, ...labels };
|
|
47
|
+
const clock = useRef(now);
|
|
48
|
+
clock.current = now;
|
|
49
|
+
const [banked, setBanked] = useState(0);
|
|
50
|
+
const [runningSince, setRunningSince] = useState(() => now());
|
|
51
|
+
const [tick, setTick] = useState(0);
|
|
52
|
+
useEffect(() => {
|
|
53
|
+
if (runningSince === null) return void 0;
|
|
54
|
+
const id = setInterval(() => setTick((t) => t + 1), 1e3);
|
|
55
|
+
return () => clearInterval(id);
|
|
56
|
+
}, [runningSince]);
|
|
57
|
+
const elapsed = banked + (runningSince === null ? 0 : clock.current() - runningSince);
|
|
58
|
+
const pause = () => {
|
|
59
|
+
if (runningSince === null) {
|
|
60
|
+
setRunningSince(clock.current());
|
|
61
|
+
} else {
|
|
62
|
+
setBanked(elapsed);
|
|
63
|
+
setRunningSince(null);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
const reset = () => {
|
|
67
|
+
setBanked(0);
|
|
68
|
+
setRunningSince(runningSince === null ? null : clock.current());
|
|
69
|
+
};
|
|
70
|
+
return /* @__PURE__ */ jsxs("div", { className: cx("crewlet-presenter", className), children: [
|
|
71
|
+
/* @__PURE__ */ jsxs("div", { className: "crewlet-presenter__main", children: [
|
|
72
|
+
/* @__PURE__ */ jsx(SlideStage, { label: text.current(position, total, currentTitle), fit: "contain", children: current }),
|
|
73
|
+
/* @__PURE__ */ jsxs("div", { className: "crewlet-presenter__controls", children: [
|
|
74
|
+
/* @__PURE__ */ jsx(
|
|
75
|
+
IconButton,
|
|
76
|
+
{
|
|
77
|
+
label: text.previous,
|
|
78
|
+
icon: /* @__PURE__ */ jsx(ChevronLeftGlyph, {}),
|
|
79
|
+
onClick: onPrevious,
|
|
80
|
+
disabledReason: position <= 1 ? text.previous : void 0
|
|
81
|
+
}
|
|
82
|
+
),
|
|
83
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-presenter__position", "aria-live": "polite", children: text.position(position, total) }),
|
|
84
|
+
/* @__PURE__ */ jsx(
|
|
85
|
+
IconButton,
|
|
86
|
+
{
|
|
87
|
+
label: text.forward,
|
|
88
|
+
icon: /* @__PURE__ */ jsx(ChevronRightGlyph, {}),
|
|
89
|
+
onClick: onNext,
|
|
90
|
+
disabledReason: position >= total ? text.end : void 0
|
|
91
|
+
}
|
|
92
|
+
)
|
|
93
|
+
] })
|
|
94
|
+
] }),
|
|
95
|
+
/* @__PURE__ */ jsxs("aside", { className: "crewlet-presenter__side", children: [
|
|
96
|
+
/* @__PURE__ */ jsx("div", { className: "crewlet-presenter__next", children: next ? /* @__PURE__ */ jsx(SlideStage, { label: text.next(nextTitle), children: next }) : /* @__PURE__ */ jsx("p", { className: "crewlet-presenter__end", children: text.end }) }),
|
|
97
|
+
/* @__PURE__ */ jsxs("div", { className: "crewlet-presenter__timer", children: [
|
|
98
|
+
/* @__PURE__ */ jsx("span", { role: "timer", "aria-label": text.timer, className: "crewlet-presenter__elapsed", children: formatStopwatch(elapsed) }),
|
|
99
|
+
/* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", onClick: pause, children: runningSince === null ? text.resume : text.pause }),
|
|
100
|
+
/* @__PURE__ */ jsx(Button, { size: "small", variant: "ghost", onClick: reset, children: text.reset })
|
|
101
|
+
] }),
|
|
102
|
+
/* @__PURE__ */ jsx("section", { className: "crewlet-presenter__notes", "aria-label": text.notes, children: notes ? /* @__PURE__ */ jsx("p", { children: notes }) : /* @__PURE__ */ jsx("p", { className: "crewlet-presenter__empty", children: text.noNotes }) })
|
|
103
|
+
] })
|
|
104
|
+
] });
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export { PresenterView, formatStopwatch };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useRoving, tabStop } from './chunk-
|
|
1
|
+
import { useRoving, tabStop } from './chunk-RKKO7QHH.js';
|
|
2
2
|
import { Avatar } from './chunk-5OM447RW.js';
|
|
3
3
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
4
4
|
import { CREWLET_CHARACTERS, CREWLET_CHARACTER_GEOMETRY } from '@crewlethq/icons/characters';
|