@open-slide/core 1.14.0 → 1.15.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/{build-Dx-qTg82.js → build-BsaslS8C.js} +1 -1
- package/dist/cli/bin.js +3 -3
- package/dist/{config-DvRA48y9.js → config-BOc3-oDV.js} +1 -1
- package/dist/{dev-BGXWqVUZ.js → dev-BU7OY0ai.js} +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/{preview-CdQnIB39.js → preview-DbL7Wt77.js} +1 -1
- package/dist/vite/index.js +1 -1
- package/package.json +2 -2
- package/src/app/components/asset-view.tsx +29 -10
- package/src/app/components/inspector/image-crop-dialog.tsx +3 -3
- package/src/app/components/inspector/inspect-overlay.tsx +44 -32
- package/src/app/components/inspector/inspector-panel.tsx +31 -26
- package/src/app/components/language-toggle.tsx +1 -1
- package/src/app/components/overview-grid.tsx +14 -12
- package/src/app/components/present/control-bar.tsx +24 -21
- package/src/app/components/present/progress-bar.tsx +1 -1
- package/src/app/components/sidebar/folder-item.tsx +26 -22
- package/src/app/components/sidebar/icon-picker.tsx +8 -8
- package/src/app/components/sidebar/sidebar-footer.tsx +2 -2
- package/src/app/components/sidebar/sidebar.tsx +22 -18
- package/src/app/components/style-panel/style-panel.tsx +8 -4
- package/src/app/components/theme-toggle.tsx +3 -3
- package/src/app/components/themes/theme-detail.tsx +2 -2
- package/src/app/components/themes/themes-gallery.tsx +1 -1
- package/src/app/components/thumbnail-rail.tsx +67 -63
- package/src/app/components/ui/badge.tsx +16 -13
- package/src/app/components/ui/button.tsx +4 -10
- package/src/app/components/ui/context-menu.tsx +46 -36
- package/src/app/components/ui/dialog.tsx +11 -13
- package/src/app/components/ui/dropdown-menu.tsx +59 -37
- package/src/app/components/ui/label.tsx +2 -5
- package/src/app/components/ui/popover.tsx +25 -18
- package/src/app/components/ui/progress.tsx +8 -6
- package/src/app/components/ui/scroll-area.tsx +5 -5
- package/src/app/components/ui/select.tsx +40 -41
- package/src/app/components/ui/separator.tsx +3 -5
- package/src/app/components/ui/slider.tsx +25 -18
- package/src/app/components/ui/tabs.tsx +8 -8
- package/src/app/components/ui/toggle-group.tsx +8 -7
- package/src/app/components/ui/toggle.tsx +5 -5
- package/src/app/components/ui/tooltip.tsx +39 -22
- package/src/app/routes/home-shell.tsx +24 -20
- package/src/app/routes/home.tsx +48 -42
- package/src/app/routes/presenter.tsx +1 -1
- package/src/app/routes/slide.tsx +54 -47
- package/src/app/styles.css +86 -110
package/dist/cli/bin.js
CHANGED
|
@@ -57,15 +57,15 @@ async function run(argv) {
|
|
|
57
57
|
program.name("open-slide").description("Author slides — we handle the Vite/React stack.").version(version, "-v, --version", "print version").helpOption("-h, --help", "show help").showHelpAfterError(chalk.dim("(run `open-slide --help` for usage)"));
|
|
58
58
|
program.command("dev").description("Start the dev server").addOption(new Option("-p, --port <port>", "port to listen on").argParser(parsePort)).addOption(new Option("--host [host]", "expose on the network (optional host)")).option("--open", "open the browser on start").option("--no-skills-check", "skip the built-in skills drift check").action(async (flags) => {
|
|
59
59
|
if (flags.skillsCheck !== false) await runSkillsDriftCheck(resolveBuiltinSkillsDir());
|
|
60
|
-
const { dev } = await import("../dev-
|
|
60
|
+
const { dev } = await import("../dev-BU7OY0ai.js");
|
|
61
61
|
await dev(flags);
|
|
62
62
|
});
|
|
63
63
|
program.command("build").description("Build a static site").option("--out-dir <dir>", "output directory (defaults to `dist`)").action(async (flags) => {
|
|
64
|
-
const { build } = await import("../build-
|
|
64
|
+
const { build } = await import("../build-BsaslS8C.js");
|
|
65
65
|
await build(flags);
|
|
66
66
|
});
|
|
67
67
|
program.command("preview").description("Preview the production build").addOption(new Option("-p, --port <port>", "port to listen on").argParser(parsePort)).addOption(new Option("--host [host]", "expose on the network (optional host)")).option("--open", "open the browser on start").action(async (flags) => {
|
|
68
|
-
const { preview } = await import("../preview-
|
|
68
|
+
const { preview } = await import("../preview-DbL7Wt77.js");
|
|
69
69
|
await preview(flags);
|
|
70
70
|
});
|
|
71
71
|
program.command("sync:skills").description("Sync built-in skills from @open-slide/core into this workspace").option("--dry-run", "show what would change without writing").action(async (flags) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./design-cpzS8aud.js";
|
|
2
|
-
import { DEV_SUPERVISED_ENV, RESTART_EXIT_CODE, createViteConfig } from "./config-
|
|
2
|
+
import { DEV_SUPERVISED_ENV, RESTART_EXIT_CODE, createViteConfig } from "./config-BOc3-oDV.js";
|
|
3
3
|
import chalk from "chalk";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { existsSync } from "node:fs";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Locale, Plural } from "./types-GA4ekcYB.js";
|
|
2
2
|
import { OpenSlideConfig } from "./config-CE2sKgqH.js";
|
|
3
3
|
import { CSSProperties, ComponentType, HTMLAttributes, PropsWithChildren, ReactNode } from "react";
|
|
4
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
|
+
import * as react_jsx_runtime2 from "react/jsx-runtime";
|
|
4
6
|
import * as react_jsx_runtime4 from "react/jsx-runtime";
|
|
5
7
|
import * as react_jsx_runtime5 from "react/jsx-runtime";
|
|
6
|
-
import * as react_jsx_runtime2 from "react/jsx-runtime";
|
|
7
|
-
import * as react_jsx_runtime3 from "react/jsx-runtime";
|
|
8
8
|
|
|
9
9
|
//#region src/app/components/image-placeholder.d.ts
|
|
10
10
|
type ImagePlaceholderProps = {
|
|
@@ -21,7 +21,7 @@ declare function ImagePlaceholder({
|
|
|
21
21
|
style,
|
|
22
22
|
className,
|
|
23
23
|
...rest
|
|
24
|
-
}: ImagePlaceholderProps):
|
|
24
|
+
}: ImagePlaceholderProps): react_jsx_runtime0.JSX.Element;
|
|
25
25
|
|
|
26
26
|
//#endregion
|
|
27
27
|
//#region src/app/components/shared-element.d.ts
|
|
@@ -36,7 +36,7 @@ declare function unstable_SharedElement({
|
|
|
36
36
|
children,
|
|
37
37
|
className,
|
|
38
38
|
style
|
|
39
|
-
}: unstable_SharedElementProps):
|
|
39
|
+
}: unstable_SharedElementProps): react_jsx_runtime2.JSX.Element;
|
|
40
40
|
|
|
41
41
|
//#endregion
|
|
42
42
|
//#region src/app/lib/design.d.ts
|
|
@@ -117,7 +117,7 @@ declare const CANVAS_HEIGHT = 1080;
|
|
|
117
117
|
type StepsProps = PropsWithChildren;
|
|
118
118
|
declare function Steps({
|
|
119
119
|
children
|
|
120
|
-
}: StepsProps):
|
|
120
|
+
}: StepsProps): react_jsx_runtime4.JSX.Element;
|
|
121
121
|
type StepProps = PropsWithChildren<{
|
|
122
122
|
duration?: number;
|
|
123
123
|
}>;
|
|
@@ -128,7 +128,7 @@ declare function Step({
|
|
|
128
128
|
children,
|
|
129
129
|
duration,
|
|
130
130
|
_revealed
|
|
131
|
-
}: InternalStepProps):
|
|
131
|
+
}: InternalStepProps): react_jsx_runtime5.JSX.Element;
|
|
132
132
|
|
|
133
133
|
//#endregion
|
|
134
134
|
export { CANVAS_HEIGHT, CANVAS_WIDTH, DesignFonts, DesignPalette, DesignSystem, DesignTypeScale, ImagePlaceholder, ImagePlaceholderProps, Locale, OpenSlideConfig, Page, Plural, SharedElementTransition, SlideMeta, SlideModule, SlideTransition, Step, StepProps, Steps, StepsProps, TransitionPhase, cssVarsToString, defaultDesign, designToCssVars, unstable_SharedElement, unstable_SharedElementProps, useSlidePageNumber };
|
package/dist/vite/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-slide/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.15.0",
|
|
4
4
|
"description": "Runtime and CLI for open-slide — write slides in slides/, we handle the rest.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@babel/parser": "^7.29.2",
|
|
63
63
|
"@babel/types": "^7.29.0",
|
|
64
|
+
"@base-ui/react": "1.6.0",
|
|
64
65
|
"@dnd-kit/core": "^6.3.1",
|
|
65
66
|
"@dnd-kit/sortable": "^10.0.0",
|
|
66
67
|
"@dnd-kit/utilities": "^3.2.2",
|
|
@@ -77,7 +78,6 @@
|
|
|
77
78
|
"html-to-image": "^1.11.13",
|
|
78
79
|
"lucide-react": "^1.8.0",
|
|
79
80
|
"next-themes": "^0.4.6",
|
|
80
|
-
"radix-ui": "^1.4.3",
|
|
81
81
|
"react": "^18.3.1",
|
|
82
82
|
"react-dom": "^18.3.1",
|
|
83
83
|
"react-image-crop": "^11.0.10",
|
|
@@ -413,6 +413,11 @@ export function AssetView({ slideId }: Props) {
|
|
|
413
413
|
</div>
|
|
414
414
|
|
|
415
415
|
<Select
|
|
416
|
+
items={{
|
|
417
|
+
all: t.asset.usageAll,
|
|
418
|
+
used: t.asset.usageUsed,
|
|
419
|
+
unused: t.asset.usageUnused,
|
|
420
|
+
}}
|
|
416
421
|
value={usageFilter}
|
|
417
422
|
onValueChange={(next) => setUsageFilter(next as AssetUsageFilter)}
|
|
418
423
|
>
|
|
@@ -426,7 +431,17 @@ export function AssetView({ slideId }: Props) {
|
|
|
426
431
|
</SelectContent>
|
|
427
432
|
</Select>
|
|
428
433
|
|
|
429
|
-
<Select
|
|
434
|
+
<Select
|
|
435
|
+
items={{
|
|
436
|
+
all: t.asset.typeAll,
|
|
437
|
+
image: t.asset.typeImage,
|
|
438
|
+
font: t.asset.typeFont,
|
|
439
|
+
video: t.asset.typeVideo,
|
|
440
|
+
other: t.asset.typeOther,
|
|
441
|
+
}}
|
|
442
|
+
value={typeFilter}
|
|
443
|
+
onValueChange={(next) => setTypeFilter(next as AssetTypeFilter)}
|
|
444
|
+
>
|
|
430
445
|
<SelectTrigger aria-label={t.asset.typeFilterAria} className="h-8 min-w-[108px]">
|
|
431
446
|
<SelectValue />
|
|
432
447
|
</SelectTrigger>
|
|
@@ -450,9 +465,9 @@ export function AssetView({ slideId }: Props) {
|
|
|
450
465
|
<GridColumnsControl value={gridColumns} onChange={setGridColumns} />
|
|
451
466
|
) : null}
|
|
452
467
|
<ToggleGroup
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
468
|
+
value={[viewMode]}
|
|
469
|
+
onValueChange={(value) => {
|
|
470
|
+
const next = value[0];
|
|
456
471
|
if (next) setViewMode(next as ViewMode);
|
|
457
472
|
}}
|
|
458
473
|
variant="outline"
|
|
@@ -683,7 +698,7 @@ function GridColumnsControl({
|
|
|
683
698
|
max={MAX_GRID_COLUMNS}
|
|
684
699
|
step={1}
|
|
685
700
|
value={[value]}
|
|
686
|
-
onValueChange={(
|
|
701
|
+
onValueChange={(v) => onChange((Array.isArray(v) ? v[0] : v) ?? value)}
|
|
687
702
|
/>
|
|
688
703
|
</div>
|
|
689
704
|
<output className="w-4 text-right font-mono text-[10.5px] tabular-nums text-muted-foreground">
|
|
@@ -723,7 +738,11 @@ function AssetSortControl({
|
|
|
723
738
|
|
|
724
739
|
return (
|
|
725
740
|
<div className="flex items-center gap-1">
|
|
726
|
-
<Select
|
|
741
|
+
<Select
|
|
742
|
+
items={labels}
|
|
743
|
+
value={sort.key}
|
|
744
|
+
onValueChange={(next) => onKeyChange(next as AssetSortKey)}
|
|
745
|
+
>
|
|
727
746
|
<SelectTrigger aria-label={t.asset.sortAria} className="h-8 min-w-[116px]">
|
|
728
747
|
<ArrowUpDown className="size-3.5" aria-hidden />
|
|
729
748
|
<SelectValue />
|
|
@@ -804,7 +823,7 @@ function AssetListHeader({
|
|
|
804
823
|
}) {
|
|
805
824
|
const t = useLocale();
|
|
806
825
|
return (
|
|
807
|
-
<div className="hidden items-center gap-3 px-2 pb-1 text-[
|
|
826
|
+
<div className="hidden items-center gap-3 px-2 pb-1 text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground/70 sm:flex">
|
|
808
827
|
<SortableColumnHeader
|
|
809
828
|
label={t.asset.nameColumn}
|
|
810
829
|
sortKey="name"
|
|
@@ -999,15 +1018,15 @@ function AssetActions({
|
|
|
999
1018
|
<MoreVertical />
|
|
1000
1019
|
</DropdownMenuTrigger>
|
|
1001
1020
|
<DropdownMenuContent align="end" className="min-w-[160px]">
|
|
1002
|
-
<DropdownMenuItem
|
|
1021
|
+
<DropdownMenuItem onClick={onPreview}>
|
|
1003
1022
|
<ImageIcon />
|
|
1004
1023
|
{t.asset.previewMenuItem}
|
|
1005
1024
|
</DropdownMenuItem>
|
|
1006
|
-
<DropdownMenuItem
|
|
1025
|
+
<DropdownMenuItem onClick={onRename}>
|
|
1007
1026
|
<Pencil />
|
|
1008
1027
|
{t.asset.renameMenuItem}
|
|
1009
1028
|
</DropdownMenuItem>
|
|
1010
|
-
<DropdownMenuItem
|
|
1029
|
+
<DropdownMenuItem onClick={onDelete}>
|
|
1011
1030
|
<Trash2 />
|
|
1012
1031
|
{t.asset.deleteMenuItem}
|
|
1013
1032
|
</DropdownMenuItem>
|
|
@@ -79,9 +79,9 @@ export function ImageCropDialog({
|
|
|
79
79
|
</DialogHeader>
|
|
80
80
|
<div className="flex justify-center">
|
|
81
81
|
<ToggleGroup
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
value={[fit]}
|
|
83
|
+
onValueChange={(value) => {
|
|
84
|
+
const v = value[0];
|
|
85
85
|
if (v === 'cover' || v === 'contain') setFit(v);
|
|
86
86
|
}}
|
|
87
87
|
variant="outline"
|
|
@@ -35,9 +35,7 @@ export function InspectOverlay() {
|
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
const onMove = (e: PointerEvent) => {
|
|
38
|
-
if (e.target
|
|
39
|
-
return setHover(null);
|
|
40
|
-
}
|
|
38
|
+
if (!isInspectableEventTarget(e.target)) return setHover(null);
|
|
41
39
|
const el = pickInspectorTarget(pickElement(e.clientX, e.clientY));
|
|
42
40
|
if (!el) return setHover(null);
|
|
43
41
|
const hit = findSlideSource(el, slideId, { hostOnly: true });
|
|
@@ -46,7 +44,7 @@ export function InspectOverlay() {
|
|
|
46
44
|
};
|
|
47
45
|
|
|
48
46
|
const onClick = (e: MouseEvent) => {
|
|
49
|
-
if (e.target
|
|
47
|
+
if (!isInspectableEventTarget(e.target)) return;
|
|
50
48
|
const el = pickInspectorTarget(pickElement(e.clientX, e.clientY));
|
|
51
49
|
if (!el) return;
|
|
52
50
|
const hit = findSlideSource(el, slideId, { hostOnly: true });
|
|
@@ -58,7 +56,7 @@ export function InspectOverlay() {
|
|
|
58
56
|
};
|
|
59
57
|
|
|
60
58
|
const onDblClick = (e: MouseEvent) => {
|
|
61
|
-
if (e.target
|
|
59
|
+
if (!isInspectableEventTarget(e.target)) return;
|
|
62
60
|
const el = pickInspectorTarget(pickElement(e.clientX, e.clientY));
|
|
63
61
|
if (!el) return;
|
|
64
62
|
const hit = findSlideSource(el, slideId, { hostOnly: true });
|
|
@@ -243,7 +241,7 @@ function ImageActionPanel({
|
|
|
243
241
|
const { openCrop, openReplace } = useInspector();
|
|
244
242
|
const t = useLocale();
|
|
245
243
|
return (
|
|
246
|
-
<TooltipProvider
|
|
244
|
+
<TooltipProvider delay={200}>
|
|
247
245
|
<div
|
|
248
246
|
className={cn(
|
|
249
247
|
'absolute flex items-center gap-0.5 rounded-[8px] border border-border bg-popover p-1 text-popover-foreground shadow-floating',
|
|
@@ -258,37 +256,41 @@ function ImageActionPanel({
|
|
|
258
256
|
}}
|
|
259
257
|
>
|
|
260
258
|
<Tooltip>
|
|
261
|
-
<TooltipTrigger
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
e
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
259
|
+
<TooltipTrigger
|
|
260
|
+
render={
|
|
261
|
+
<button
|
|
262
|
+
type="button"
|
|
263
|
+
aria-label={t.inspector.replace}
|
|
264
|
+
onClick={(e) => {
|
|
265
|
+
e.stopPropagation();
|
|
266
|
+
openReplace(anchor);
|
|
267
|
+
}}
|
|
268
|
+
className="inline-flex size-7 items-center justify-center rounded-[5px] text-foreground/85 transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40"
|
|
269
|
+
>
|
|
270
|
+
<ImageIcon className="size-3.5" />
|
|
271
|
+
</button>
|
|
272
|
+
}
|
|
273
|
+
/>
|
|
274
274
|
<TooltipContent side="bottom" data-inspector-ui>
|
|
275
275
|
{t.inspector.replace}
|
|
276
276
|
</TooltipContent>
|
|
277
277
|
</Tooltip>
|
|
278
278
|
<Tooltip>
|
|
279
|
-
<TooltipTrigger
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
e
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
279
|
+
<TooltipTrigger
|
|
280
|
+
render={
|
|
281
|
+
<button
|
|
282
|
+
type="button"
|
|
283
|
+
aria-label={t.inspector.crop}
|
|
284
|
+
onClick={(e) => {
|
|
285
|
+
e.stopPropagation();
|
|
286
|
+
openCrop(anchor as HTMLImageElement);
|
|
287
|
+
}}
|
|
288
|
+
className="inline-flex size-7 items-center justify-center rounded-[5px] text-foreground/85 transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40"
|
|
289
|
+
>
|
|
290
|
+
<Crop className="size-3.5" />
|
|
291
|
+
</button>
|
|
292
|
+
}
|
|
293
|
+
/>
|
|
292
294
|
<TooltipContent side="bottom" data-inspector-ui>
|
|
293
295
|
{t.inspector.crop}
|
|
294
296
|
</TooltipContent>
|
|
@@ -308,6 +310,16 @@ function sameRect(a: RelRect | null, b: RelRect): boolean {
|
|
|
308
310
|
);
|
|
309
311
|
}
|
|
310
312
|
|
|
313
|
+
// Only inspect events that originate inside the slide root. Portaled UI
|
|
314
|
+
// (dialogs, tooltips, toasts) mounts on `document.body`, outside the root;
|
|
315
|
+
// without this guard the capture-phase window listeners swallow clicks
|
|
316
|
+
// meant for a dialog and select the slide element behind it instead.
|
|
317
|
+
function isInspectableEventTarget(target: EventTarget | null): boolean {
|
|
318
|
+
if (!(target instanceof Element)) return false;
|
|
319
|
+
if (target.closest('[data-inspector-ui]')) return false;
|
|
320
|
+
return !!target.closest('[data-inspector-root]');
|
|
321
|
+
}
|
|
322
|
+
|
|
311
323
|
function pickElement(x: number, y: number): HTMLElement | null {
|
|
312
324
|
const stack = document.elementsFromPoint(x, y);
|
|
313
325
|
for (const el of stack) {
|
|
@@ -449,7 +449,7 @@ function FontSizeField({
|
|
|
449
449
|
max={200}
|
|
450
450
|
step={1}
|
|
451
451
|
value={[snapshot.fontSize]}
|
|
452
|
-
onValueChange={(
|
|
452
|
+
onValueChange={(v) => set((Array.isArray(v) ? v[0] : v) ?? snapshot.fontSize)}
|
|
453
453
|
className="flex-1"
|
|
454
454
|
/>
|
|
455
455
|
<NumberField
|
|
@@ -486,6 +486,7 @@ function FontWeightField({
|
|
|
486
486
|
return (
|
|
487
487
|
<Field label={t.inspector.weightLabel}>
|
|
488
488
|
<Select
|
|
489
|
+
items={Object.fromEntries(weightOptions.map((opt) => [opt.value, opt.label]))}
|
|
489
490
|
value={String(snapshot.fontWeight)}
|
|
490
491
|
onValueChange={(value) => {
|
|
491
492
|
const n = Number(value);
|
|
@@ -568,7 +569,7 @@ function LineHeightField({
|
|
|
568
569
|
max={3}
|
|
569
570
|
step={0.05}
|
|
570
571
|
value={[v]}
|
|
571
|
-
onValueChange={(
|
|
572
|
+
onValueChange={(next) => set((Array.isArray(next) ? next[0] : next) ?? v)}
|
|
572
573
|
className="flex-1"
|
|
573
574
|
/>
|
|
574
575
|
<NumberField value={round2(v)} onChange={set} step={0.05} min={0.5} max={5} />
|
|
@@ -600,7 +601,9 @@ function LetterSpacingField({
|
|
|
600
601
|
max={20}
|
|
601
602
|
step={0.1}
|
|
602
603
|
value={[snapshot.letterSpacing]}
|
|
603
|
-
onValueChange={(
|
|
604
|
+
onValueChange={(next) =>
|
|
605
|
+
set((Array.isArray(next) ? next[0] : next) ?? snapshot.letterSpacing)
|
|
606
|
+
}
|
|
604
607
|
className="flex-1"
|
|
605
608
|
/>
|
|
606
609
|
<NumberField
|
|
@@ -633,17 +636,17 @@ function TextAlignField({
|
|
|
633
636
|
return (
|
|
634
637
|
<Field label={t.inspector.alignLabel}>
|
|
635
638
|
<ToggleGroup
|
|
636
|
-
type="single"
|
|
637
639
|
size="sm"
|
|
638
640
|
variant="outline"
|
|
639
|
-
value={snapshot.textAlign}
|
|
641
|
+
value={[snapshot.textAlign]}
|
|
640
642
|
onValueChange={(value) => {
|
|
641
|
-
|
|
643
|
+
const next = value[0];
|
|
644
|
+
if (!next) return;
|
|
642
645
|
apply([
|
|
643
646
|
{
|
|
644
647
|
kind: 'set-style',
|
|
645
648
|
key: 'textAlign',
|
|
646
|
-
value:
|
|
649
|
+
value: next === 'left' ? null : next,
|
|
647
650
|
},
|
|
648
651
|
]);
|
|
649
652
|
}}
|
|
@@ -842,26 +845,28 @@ function AgentWatchingBadge() {
|
|
|
842
845
|
const t = useLocale();
|
|
843
846
|
const connected = useAgentSocketConnected();
|
|
844
847
|
return (
|
|
845
|
-
<TooltipProvider
|
|
848
|
+
<TooltipProvider delay={200}>
|
|
846
849
|
<Tooltip>
|
|
847
|
-
<TooltipTrigger
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
850
|
+
<TooltipTrigger
|
|
851
|
+
render={
|
|
852
|
+
<button
|
|
853
|
+
type="button"
|
|
854
|
+
className="flex shrink-0 cursor-help items-center gap-1.5 rounded-[3px] border border-hairline bg-card px-1.5 py-px text-[10.5px] text-foreground/85 outline-none focus-visible:ring-2 focus-visible:ring-ring/30"
|
|
855
|
+
>
|
|
856
|
+
<span aria-hidden className="relative flex size-1.5 items-center justify-center">
|
|
857
|
+
{connected ? (
|
|
858
|
+
<>
|
|
859
|
+
<span className="absolute inline-flex size-full animate-ping rounded-full bg-emerald-500 opacity-60" />
|
|
860
|
+
<span className="relative inline-flex size-1.5 rounded-full bg-emerald-500" />
|
|
861
|
+
</>
|
|
862
|
+
) : (
|
|
863
|
+
<span className="relative inline-flex size-1.5 rounded-full bg-rose-500" />
|
|
864
|
+
)}
|
|
865
|
+
</span>
|
|
866
|
+
{connected ? t.inspector.agentWatching : t.inspector.agentNotWatching}
|
|
867
|
+
</button>
|
|
868
|
+
}
|
|
869
|
+
/>
|
|
865
870
|
<TooltipContent
|
|
866
871
|
side="bottom"
|
|
867
872
|
align="end"
|
|
@@ -130,7 +130,7 @@ export function OverviewGrid({
|
|
|
130
130
|
</div>
|
|
131
131
|
</div>
|
|
132
132
|
<div ref={gridRef} className="min-h-0 flex-1 overflow-auto px-8 pb-8">
|
|
133
|
-
<TooltipProvider
|
|
133
|
+
<TooltipProvider delay={200}>
|
|
134
134
|
<div
|
|
135
135
|
className="grid justify-center gap-5"
|
|
136
136
|
style={{
|
|
@@ -225,7 +225,7 @@ function OverviewThumb({
|
|
|
225
225
|
className={cn(
|
|
226
226
|
'relative w-full overflow-hidden rounded-[4px] ring-1 transition-shadow',
|
|
227
227
|
styles.thumbSurface,
|
|
228
|
-
isFocused ? 'ring-2 ring-[var(--brand,#
|
|
228
|
+
isFocused ? 'ring-2 ring-[var(--brand,#e5484d)]' : styles.thumbRing,
|
|
229
229
|
)}
|
|
230
230
|
style={{ height: THUMB_H }}
|
|
231
231
|
>
|
|
@@ -243,7 +243,7 @@ function OverviewThumb({
|
|
|
243
243
|
{isCurrent && (
|
|
244
244
|
<span
|
|
245
245
|
aria-hidden
|
|
246
|
-
className="pointer-events-none absolute top-1.5 right-1.5 rounded-[3px] bg-[var(--brand,#
|
|
246
|
+
className="pointer-events-none absolute top-1.5 right-1.5 rounded-[3px] bg-[var(--brand,#e5484d)] px-1.5 py-0.5 font-mono text-[9.5px] tracking-[0.06em] uppercase text-white"
|
|
247
247
|
>
|
|
248
248
|
{t.present.nowBadge}
|
|
249
249
|
</span>
|
|
@@ -296,15 +296,17 @@ function OverviewIndicator({
|
|
|
296
296
|
}) {
|
|
297
297
|
return (
|
|
298
298
|
<Tooltip>
|
|
299
|
-
<TooltipTrigger
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
299
|
+
<TooltipTrigger
|
|
300
|
+
render={
|
|
301
|
+
<span
|
|
302
|
+
role="img"
|
|
303
|
+
aria-label={label}
|
|
304
|
+
className={cn('flex size-4 items-center justify-center', className)}
|
|
305
|
+
>
|
|
306
|
+
<Icon className="size-3.5" strokeWidth={1.9} />
|
|
307
|
+
</span>
|
|
308
|
+
}
|
|
309
|
+
/>
|
|
308
310
|
<TooltipContent side="top" sideOffset={6} container={tooltipContainer ?? undefined}>
|
|
309
311
|
{label}
|
|
310
312
|
</TooltipContent>
|
|
@@ -86,7 +86,7 @@ export function PresentControlBar({
|
|
|
86
86
|
: 'translate-y-8 scale-90 opacity-0 blur-md',
|
|
87
87
|
)}
|
|
88
88
|
>
|
|
89
|
-
<TooltipProvider
|
|
89
|
+
<TooltipProvider delay={300}>
|
|
90
90
|
<TooltipContainerCtx.Provider value={tooltipContainer ?? null}>
|
|
91
91
|
<div
|
|
92
92
|
className={cn(
|
|
@@ -259,30 +259,33 @@ function BarButton({
|
|
|
259
259
|
const container = useContext(TooltipContainerCtx);
|
|
260
260
|
return (
|
|
261
261
|
<Tooltip>
|
|
262
|
-
<TooltipTrigger
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
event
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
262
|
+
<TooltipTrigger
|
|
263
|
+
render={
|
|
264
|
+
<button
|
|
265
|
+
type="button"
|
|
266
|
+
aria-label={label}
|
|
267
|
+
disabled={disabled}
|
|
268
|
+
onClick={(event) => {
|
|
269
|
+
event.stopPropagation();
|
|
270
|
+
onClick();
|
|
271
|
+
}}
|
|
272
|
+
className={cn(
|
|
273
|
+
'inline-flex size-8 items-center justify-center rounded-full transition-colors',
|
|
274
|
+
'hover:bg-white/12 focus-visible:bg-white/12 focus-visible:outline-none',
|
|
275
|
+
'disabled:pointer-events-none disabled:opacity-30',
|
|
276
|
+
active && 'bg-[var(--brand,#e5484d)]/85 text-white hover:bg-[var(--brand,#e5484d)]',
|
|
277
|
+
)}
|
|
278
|
+
>
|
|
279
|
+
{children}
|
|
280
|
+
</button>
|
|
281
|
+
}
|
|
282
|
+
/>
|
|
283
|
+
|
|
281
284
|
<TooltipContent
|
|
282
285
|
container={container ?? undefined}
|
|
283
286
|
side="top"
|
|
284
287
|
sideOffset={6}
|
|
285
|
-
className="bg-black
|
|
288
|
+
className="bg-black text-white"
|
|
286
289
|
>
|
|
287
290
|
{label}
|
|
288
291
|
</TooltipContent>
|
|
@@ -18,7 +18,7 @@ export function PresentProgressBar({ index, total, visible }: Props) {
|
|
|
18
18
|
)}
|
|
19
19
|
>
|
|
20
20
|
<div
|
|
21
|
-
className="h-full w-full origin-left bg-[var(--brand,#
|
|
21
|
+
className="h-full w-full origin-left bg-[var(--brand,#e5484d)] transition-transform duration-200 ease-out"
|
|
22
22
|
style={{ transform: `scaleX(${pct})` }}
|
|
23
23
|
/>
|
|
24
24
|
</div>
|