@arbidocs/blocks 0.5.122 → 0.5.123

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.
Files changed (60) hide show
  1. package/dist/ConnectedNativeDocxComparison-QKHCYD6W.cjs +1 -1
  2. package/dist/{ConnectedPresentation-AU25OW25.cjs → ConnectedPresentation-5DOJ35XL.cjs} +7 -7
  3. package/dist/{ConnectedPresentation-AU25OW25.cjs.map → ConnectedPresentation-5DOJ35XL.cjs.map} +1 -1
  4. package/dist/{ConnectedSlidesTab-I75LKKN7.cjs → ConnectedSlidesTab-7YMEDGUU.cjs} +40 -18
  5. package/dist/ConnectedSlidesTab-7YMEDGUU.cjs.map +1 -0
  6. package/dist/ConnectedStreamedWordArtifact-AG62232A.cjs +1 -1
  7. package/dist/{FilesViewerDialog-4352KIOG.cjs → FilesViewerDialog-2QCCRWF2.cjs} +7 -7
  8. package/dist/{FilesViewerDialog-4352KIOG.cjs.map → FilesViewerDialog-2QCCRWF2.cjs.map} +1 -1
  9. package/dist/agents/index.cjs +176 -176
  10. package/dist/{chunk-LHWOKOMP.cjs → chunk-46P7IDBX.cjs} +3 -3
  11. package/dist/chunk-46P7IDBX.cjs.map +1 -0
  12. package/dist/{chunk-USNTRL22.cjs → chunk-DWMWEALB.cjs} +288 -214
  13. package/dist/chunk-DWMWEALB.cjs.map +1 -0
  14. package/dist/{chunk-UTJ223TI.cjs → chunk-JD2HX2BR.cjs} +98 -78
  15. package/dist/chunk-JD2HX2BR.cjs.map +1 -0
  16. package/dist/{chunk-QG2U2JGX.cjs → chunk-L4CIFLCU.cjs} +4 -4
  17. package/dist/{chunk-QG2U2JGX.cjs.map → chunk-L4CIFLCU.cjs.map} +1 -1
  18. package/dist/{chunk-CQQQIZU4.cjs → chunk-NQML7IUC.cjs} +3 -3
  19. package/dist/{chunk-CQQQIZU4.cjs.map → chunk-NQML7IUC.cjs.map} +1 -1
  20. package/dist/{chunk-WRLGLZIA.cjs → chunk-SNPK3R3O.cjs} +5 -5
  21. package/dist/{chunk-WRLGLZIA.cjs.map → chunk-SNPK3R3O.cjs.map} +1 -1
  22. package/dist/{chunk-XGM4VVNV.cjs → chunk-WV7BCGCK.cjs} +19 -19
  23. package/dist/{chunk-XGM4VVNV.cjs.map → chunk-WV7BCGCK.cjs.map} +1 -1
  24. package/dist/connect/docx.cjs +1 -1
  25. package/dist/connect/index.cjs +161 -161
  26. package/dist/connect/viewer.cjs +5 -5
  27. package/dist/connection/presentation/ConnectedSlidesTab.js +35 -13
  28. package/dist/connection/presentation/ConnectedSlidesTab.js.map +2 -2
  29. package/dist/connection/viewer/ConnectedDocumentViewer.js +51 -60
  30. package/dist/connection/viewer/ConnectedDocumentViewer.js.map +2 -2
  31. package/dist/connection/viewer/ViewerMoreMenu.d.ts +18 -0
  32. package/dist/connection/viewer/ViewerMoreMenu.js +45 -0
  33. package/dist/connection/viewer/ViewerMoreMenu.js.map +7 -0
  34. package/dist/connection/viewer/pdf/PdfPassageHighlights.js +3 -2
  35. package/dist/connection/viewer/pdf/PdfPassageHighlights.js.map +2 -2
  36. package/dist/document-tools/DocumentToolButtons.js +2 -2
  37. package/dist/document-tools/DocumentToolButtons.js.map +2 -2
  38. package/dist/document-tools/index.cjs +13 -13
  39. package/dist/embed/index.cjs +2 -2
  40. package/dist/index.cjs +234 -234
  41. package/dist/presentation/BoxActionBar.d.ts +2 -2
  42. package/dist/presentation/BoxActionBar.js +62 -30
  43. package/dist/presentation/BoxActionBar.js.map +2 -2
  44. package/dist/presentation/ClipActionBar.js +60 -7
  45. package/dist/presentation/ClipActionBar.js.map +2 -2
  46. package/dist/presentation/ClipViewControls.d.ts +3 -3
  47. package/dist/presentation/ClipViewControls.js +59 -64
  48. package/dist/presentation/ClipViewControls.js.map +2 -2
  49. package/dist/presentation/SlidesEditor.js +56 -42
  50. package/dist/presentation/SlidesEditor.js.map +2 -2
  51. package/dist/presentation/StageItem.js +0 -5
  52. package/dist/presentation/StageItem.js.map +2 -2
  53. package/dist/styles.css +1 -1
  54. package/dist/workflow-canvas/index.cjs +12 -12
  55. package/node_modules/@arbidocs/coedit/package.json +1 -1
  56. package/package.json +5 -5
  57. package/dist/ConnectedSlidesTab-I75LKKN7.cjs.map +0 -1
  58. package/dist/chunk-LHWOKOMP.cjs.map +0 -1
  59. package/dist/chunk-USNTRL22.cjs.map +0 -1
  60. package/dist/chunk-UTJ223TI.cjs.map +0 -1
@@ -701,6 +701,132 @@ function Notice() {
701
701
  }
702
702
  );
703
703
  }
704
+ var PAN_STEP = 0.1;
705
+ var MAX_ZOOM = 800;
706
+ var HOLD_DELAY = 350;
707
+ var HOLD_EVERY = 90;
708
+ var BUTTON = "flex size-7 items-center justify-center rounded-full border border-border bg-background text-foreground hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-30 pointer-coarse:size-11";
709
+ function HoldButton({
710
+ label,
711
+ disabled,
712
+ onStep,
713
+ className,
714
+ children
715
+ }) {
716
+ const timer = react.useRef(null);
717
+ const stop = () => {
718
+ if (timer.current) clearTimeout(timer.current);
719
+ timer.current = null;
720
+ };
721
+ react.useEffect(() => stop, []);
722
+ react.useEffect(() => {
723
+ if (disabled) stop();
724
+ }, [disabled]);
725
+ const start = (event) => {
726
+ event.stopPropagation();
727
+ if (disabled || event.button !== 0) return;
728
+ onStep();
729
+ const repeat = () => {
730
+ onStep();
731
+ timer.current = setTimeout(repeat, HOLD_EVERY);
732
+ };
733
+ timer.current = setTimeout(repeat, HOLD_DELAY);
734
+ };
735
+ return /* @__PURE__ */ jsxRuntime.jsx(
736
+ "button",
737
+ {
738
+ type: "button",
739
+ className: ui.cn(BUTTON, className),
740
+ title: label,
741
+ "aria-label": label,
742
+ disabled,
743
+ onPointerDown: start,
744
+ onPointerUp: stop,
745
+ onPointerLeave: stop,
746
+ onPointerCancel: stop,
747
+ onClick: (event) => event.detail === 0 && onStep(),
748
+ children
749
+ }
750
+ );
751
+ }
752
+ function ClipViewControls({ clip }) {
753
+ const { panClip, setClipZoom } = chunk4TTX6ZNS_cjs.usePresentation.getState();
754
+ const { rect } = clip;
755
+ const zoomBase = clip.zoomBase ?? rect.w;
756
+ const minZoom = Math.min(100, Math.floor(zoomBase / Math.min(1, rect.w / rect.h) * 100));
757
+ const pan = (dx, dy) => () => panClip(clip.id, dx * rect.w, dy * rect.h);
758
+ const zoom = Math.round(zoomBase / rect.w * 100);
759
+ const edge = 1e-6;
760
+ return /* @__PURE__ */ jsxRuntime.jsxs(
761
+ "div",
762
+ {
763
+ className: "flex flex-col items-center gap-2 p-1",
764
+ onPointerDown: (event) => event.stopPropagation(),
765
+ "data-testid": "clip-view-controls",
766
+ children: [
767
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-3 grid-rows-3 place-items-center gap-0.5", children: [
768
+ /* @__PURE__ */ jsxRuntime.jsx(
769
+ HoldButton,
770
+ {
771
+ label: "Show more above",
772
+ disabled: rect.y <= edge,
773
+ onStep: pan(0, -PAN_STEP),
774
+ className: "col-start-2 row-start-1",
775
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUp, { className: "size-4" })
776
+ }
777
+ ),
778
+ /* @__PURE__ */ jsxRuntime.jsx(
779
+ HoldButton,
780
+ {
781
+ label: "Show more on the left",
782
+ disabled: rect.x <= edge,
783
+ onStep: pan(-PAN_STEP, 0),
784
+ className: "col-start-1 row-start-2",
785
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, { className: "size-4" })
786
+ }
787
+ ),
788
+ /* @__PURE__ */ jsxRuntime.jsx(
789
+ HoldButton,
790
+ {
791
+ label: "Show more on the right",
792
+ disabled: rect.x + rect.w >= 1 - edge,
793
+ onStep: pan(PAN_STEP, 0),
794
+ className: "col-start-3 row-start-2",
795
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "size-4" })
796
+ }
797
+ ),
798
+ /* @__PURE__ */ jsxRuntime.jsx(
799
+ HoldButton,
800
+ {
801
+ label: "Show more below",
802
+ disabled: rect.y + rect.h >= 1 - edge,
803
+ onStep: pan(0, PAN_STEP),
804
+ className: "col-start-2 row-start-3",
805
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "size-4" })
806
+ }
807
+ )
808
+ ] }),
809
+ /* @__PURE__ */ jsxRuntime.jsx("div", { "data-testid": "clip-zoom-control", children: /* @__PURE__ */ jsxRuntime.jsx(
810
+ chunk5GCCUXMT_cjs.ZoomSlider,
811
+ {
812
+ value: zoom,
813
+ min: minZoom,
814
+ max: Math.max(MAX_ZOOM, zoom),
815
+ zoomOutStep: 25,
816
+ onChange: (value) => setClipZoom(clip.id, value),
817
+ label: "Zoom",
818
+ valueLabel: /* @__PURE__ */ jsxRuntime.jsxs("span", { "data-testid": "clip-zoom", children: [
819
+ zoom,
820
+ "%"
821
+ ] }),
822
+ className: "pointer-coarse:h-11",
823
+ sliderClassName: "w-28"
824
+ }
825
+ ) })
826
+ ]
827
+ }
828
+ );
829
+ }
704
830
  var ACTION = "inline-flex size-7 items-center justify-center rounded text-foreground hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring pointer-coarse:size-11";
705
831
  var SIZES = [
706
832
  { command: "fit", label: "Fit the slide", icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Maximize2, { className: "size-4" }) },
@@ -730,6 +856,7 @@ function ClipActionBar({
730
856
  onCropImage
731
857
  }) {
732
858
  const actions = chunk4TTX6ZNS_cjs.usePresentation.getState();
859
+ const clip = chunk4TTX6ZNS_cjs.usePresentation((state) => state.clips.find((entry) => entry.id === clipId));
733
860
  return /* @__PURE__ */ jsxRuntime.jsxs(
734
861
  "div",
735
862
  {
@@ -740,7 +867,7 @@ function ClipActionBar({
740
867
  onPointerDown: (event) => event.stopPropagation(),
741
868
  "data-testid": "clip-action-bar",
742
869
  children: [
743
- SIZES.map(({ command, label, icon }) => /* @__PURE__ */ jsxRuntime.jsx(Action, { label, onClick: () => actions.applyFrame(clipId, command), children: icon }, command)),
870
+ /* @__PURE__ */ jsxRuntime.jsx(Action, { label: "Fit the slide", onClick: () => actions.applyFrame(clipId, "fit"), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Maximize2, { className: "size-4" }) }),
744
871
  /* @__PURE__ */ jsxRuntime.jsxs(ui.DropdownMenu, { children: [
745
872
  /* @__PURE__ */ jsxRuntime.jsx(ui.DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: ACTION, title: "Align", "aria-label": "Align", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlignCenterHorizontal, { className: "size-4" }) }) }),
746
873
  /* @__PURE__ */ jsxRuntime.jsx(ui.DropdownMenuContent, { align: "start", children: ALIGNMENTS.map(({ alignment, label, icon }) => /* @__PURE__ */ jsxRuntime.jsxs(ui.DropdownMenuItem, { onSelect: () => actions.align(clipId, alignment), children: [
@@ -748,11 +875,56 @@ function ClipActionBar({
748
875
  /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2", children: label })
749
876
  ] }, alignment)) })
750
877
  ] }),
751
- onCropImage && /* @__PURE__ */ jsxRuntime.jsx(Action, { label: "Crop", onClick: onCropImage, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Crop, { className: "size-4" }) }),
752
- onEditImage && /* @__PURE__ */ jsxRuntime.jsx(Action, { label: "Edit image", onClick: onEditImage, children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sparkles, { className: "size-4" }) }),
753
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-0.5 h-5 w-px bg-border" }),
754
- /* @__PURE__ */ jsxRuntime.jsx(Action, { label: "Bring to front", onClick: () => actions.bringToFront(clipId), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.BringToFront, { className: "size-4" }) }),
755
- /* @__PURE__ */ jsxRuntime.jsx(Action, { label: "Send to back", onClick: () => actions.sendToBack(clipId), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.SendToBack, { className: "size-4" }) }),
878
+ clip && /* @__PURE__ */ jsxRuntime.jsxs(ui.Popover, { children: [
879
+ /* @__PURE__ */ jsxRuntime.jsx(ui.PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
880
+ "button",
881
+ {
882
+ type: "button",
883
+ className: ACTION,
884
+ title: "View: scroll or zoom what the clip shows (or scroll over it)",
885
+ "aria-label": "View",
886
+ "data-testid": "clip-view-button",
887
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ZoomIn, { className: "size-4" })
888
+ }
889
+ ) }),
890
+ /* @__PURE__ */ jsxRuntime.jsx(ui.PopoverContent, { align: "start", className: "w-auto p-2", children: /* @__PURE__ */ jsxRuntime.jsx(ClipViewControls, { clip }) })
891
+ ] }),
892
+ /* @__PURE__ */ jsxRuntime.jsxs(ui.DropdownMenu, { children: [
893
+ /* @__PURE__ */ jsxRuntime.jsx(ui.DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
894
+ "button",
895
+ {
896
+ type: "button",
897
+ className: ACTION,
898
+ title: "More",
899
+ "aria-label": "More",
900
+ "data-testid": "clip-more-menu",
901
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MoreHorizontal, { className: "size-4" })
902
+ }
903
+ ) }),
904
+ /* @__PURE__ */ jsxRuntime.jsxs(ui.DropdownMenuContent, { align: "start", children: [
905
+ SIZES.filter(({ command }) => command !== "fit").map(({ command, label, icon }) => /* @__PURE__ */ jsxRuntime.jsxs(ui.DropdownMenuItem, { onSelect: () => actions.applyFrame(clipId, command), children: [
906
+ icon,
907
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2", children: label })
908
+ ] }, command)),
909
+ onCropImage && /* @__PURE__ */ jsxRuntime.jsxs(ui.DropdownMenuItem, { onSelect: onCropImage, children: [
910
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Crop, { className: "size-4" }),
911
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2", children: "Crop" })
912
+ ] }),
913
+ onEditImage && /* @__PURE__ */ jsxRuntime.jsxs(ui.DropdownMenuItem, { onSelect: onEditImage, children: [
914
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sparkles, { className: "size-4" }),
915
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2", children: "Edit image" })
916
+ ] }),
917
+ /* @__PURE__ */ jsxRuntime.jsx(ui.DropdownMenuSeparator, {}),
918
+ /* @__PURE__ */ jsxRuntime.jsxs(ui.DropdownMenuItem, { onSelect: () => actions.bringToFront(clipId), children: [
919
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.BringToFront, { className: "size-4" }),
920
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2", children: "Bring to front" })
921
+ ] }),
922
+ /* @__PURE__ */ jsxRuntime.jsxs(ui.DropdownMenuItem, { onSelect: () => actions.sendToBack(clipId), children: [
923
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.SendToBack, { className: "size-4" }),
924
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2", children: "Send to back" })
925
+ ] })
926
+ ] })
927
+ ] }),
756
928
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-0.5 h-5 w-px bg-border" }),
757
929
  /* @__PURE__ */ jsxRuntime.jsx(
758
930
  "button",
@@ -950,137 +1122,6 @@ var SlideDecor = react.memo(function SlideDecor2({
950
1122
  geometry.logo && logoImage && /* @__PURE__ */ jsxRuntime.jsx(Logo, { image: logoImage, box: geometry.logo })
951
1123
  ] });
952
1124
  });
953
- var PAN_STEP = 0.1;
954
- var MAX_ZOOM = 800;
955
- var HOLD_DELAY = 350;
956
- var HOLD_EVERY = 90;
957
- var BUTTON = "pointer-events-auto flex size-7 items-center justify-center rounded-full border border-border bg-background/90 text-foreground shadow-sm backdrop-blur-sm hover:bg-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-30 pointer-coarse:size-11";
958
- function HoldButton({
959
- label,
960
- disabled,
961
- onStep,
962
- className,
963
- children
964
- }) {
965
- const timer = react.useRef(null);
966
- const stop = () => {
967
- if (timer.current) clearTimeout(timer.current);
968
- timer.current = null;
969
- };
970
- react.useEffect(() => stop, []);
971
- react.useEffect(() => {
972
- if (disabled) stop();
973
- }, [disabled]);
974
- const start = (event) => {
975
- event.stopPropagation();
976
- if (disabled || event.button !== 0) return;
977
- onStep();
978
- const repeat = () => {
979
- onStep();
980
- timer.current = setTimeout(repeat, HOLD_EVERY);
981
- };
982
- timer.current = setTimeout(repeat, HOLD_DELAY);
983
- };
984
- return /* @__PURE__ */ jsxRuntime.jsx(
985
- "button",
986
- {
987
- type: "button",
988
- className: ui.cn(BUTTON, className),
989
- title: label,
990
- "aria-label": label,
991
- disabled,
992
- onPointerDown: start,
993
- onPointerUp: stop,
994
- onPointerLeave: stop,
995
- onPointerCancel: stop,
996
- onClick: (event) => event.detail === 0 && onStep(),
997
- children
998
- }
999
- );
1000
- }
1001
- function ClipViewControls({ clip }) {
1002
- const { panClip, setClipZoom } = chunk4TTX6ZNS_cjs.usePresentation.getState();
1003
- const { rect } = clip;
1004
- const zoomBase = clip.zoomBase ?? rect.w;
1005
- const minZoom = Math.min(100, Math.floor(zoomBase / Math.min(1, rect.w / rect.h) * 100));
1006
- const pan = (dx, dy) => () => panClip(clip.id, dx * rect.w, dy * rect.h);
1007
- const zoom = Math.round(zoomBase / rect.w * 100);
1008
- const edge = 1e-6;
1009
- return /* @__PURE__ */ jsxRuntime.jsxs(
1010
- "div",
1011
- {
1012
- className: "pointer-events-none absolute inset-0 z-10",
1013
- onPointerDown: (event) => event.stopPropagation(),
1014
- "data-testid": "clip-view-controls",
1015
- children: [
1016
- /* @__PURE__ */ jsxRuntime.jsx(
1017
- HoldButton,
1018
- {
1019
- label: "Show more above",
1020
- disabled: rect.y <= edge,
1021
- onStep: pan(0, -PAN_STEP),
1022
- className: "absolute left-1/2 top-4 -translate-x-1/2 pointer-coarse:top-7",
1023
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUp, { className: "size-4" })
1024
- }
1025
- ),
1026
- /* @__PURE__ */ jsxRuntime.jsx(
1027
- HoldButton,
1028
- {
1029
- label: "Show more below",
1030
- disabled: rect.y + rect.h >= 1 - edge,
1031
- onStep: pan(0, PAN_STEP),
1032
- className: "absolute bottom-10 left-1/2 -translate-x-1/2 pointer-coarse:bottom-14",
1033
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "size-4" })
1034
- }
1035
- ),
1036
- /* @__PURE__ */ jsxRuntime.jsx(
1037
- HoldButton,
1038
- {
1039
- label: "Show more on the left",
1040
- disabled: rect.x <= edge,
1041
- onStep: pan(-PAN_STEP, 0),
1042
- className: "absolute left-4 top-1/2 -translate-y-1/2 pointer-coarse:left-7",
1043
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, { className: "size-4" })
1044
- }
1045
- ),
1046
- /* @__PURE__ */ jsxRuntime.jsx(
1047
- HoldButton,
1048
- {
1049
- label: "Show more on the right",
1050
- disabled: rect.x + rect.w >= 1 - edge,
1051
- onStep: pan(PAN_STEP, 0),
1052
- className: "absolute right-4 top-1/2 -translate-y-1/2 pointer-coarse:right-7",
1053
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "size-4" })
1054
- }
1055
- ),
1056
- /* @__PURE__ */ jsxRuntime.jsx(
1057
- "div",
1058
- {
1059
- className: "pointer-events-auto absolute bottom-1.5 left-1/2 -translate-x-1/2",
1060
- "data-testid": "clip-zoom-control",
1061
- children: /* @__PURE__ */ jsxRuntime.jsx(
1062
- chunk5GCCUXMT_cjs.ZoomSlider,
1063
- {
1064
- value: zoom,
1065
- min: minZoom,
1066
- max: Math.max(MAX_ZOOM, zoom),
1067
- zoomOutStep: 25,
1068
- onChange: (value) => setClipZoom(clip.id, value),
1069
- label: "Zoom",
1070
- valueLabel: /* @__PURE__ */ jsxRuntime.jsxs("span", { "data-testid": "clip-zoom", children: [
1071
- zoom,
1072
- "%"
1073
- ] }),
1074
- className: "bg-background/95 shadow-sm backdrop-blur-sm pointer-coarse:h-11",
1075
- sliderClassName: "w-24"
1076
- }
1077
- )
1078
- }
1079
- )
1080
- ]
1081
- }
1082
- );
1083
- }
1084
1125
  var isEdge = (kind) => kind === "n" || kind === "e" || kind === "s" || kind === "w";
1085
1126
  var EDGES = [
1086
1127
  { edge: "n", left: "50%", top: "0%", cursor: "ns-resize", label: "top" },
@@ -1106,7 +1147,6 @@ var StageItem = react.memo(function StageItem2({
1106
1147
  }) {
1107
1148
  const element = react.useRef(null);
1108
1149
  const gesture = react.useRef(null);
1109
- const [dragging, setDragging] = react.useState(false);
1110
1150
  const [reshape, setReshape] = react.useState(null);
1111
1151
  const shown = reshape ? { ...clip, ...reshape.shape } : clip;
1112
1152
  const box2 = reshape?.frame ?? frame;
@@ -1156,7 +1196,6 @@ var StageItem = react.memo(function StageItem2({
1156
1196
  const g = gesture.current;
1157
1197
  if (!g) return;
1158
1198
  if (!g.next) {
1159
- setDragging(true);
1160
1199
  host.dragging(true);
1161
1200
  if (element.current) element.current.style.willChange = "transform";
1162
1201
  }
@@ -1187,7 +1226,6 @@ var StageItem = react.memo(function StageItem2({
1187
1226
  }
1188
1227
  if (!g.next) return;
1189
1228
  setReshape(null);
1190
- setDragging(false);
1191
1229
  host.dragging(false);
1192
1230
  host.guides([]);
1193
1231
  host.commit(clip.id, g.next.frame, g.next.shape);
@@ -1237,7 +1275,6 @@ var StageItem = react.memo(function StageItem2({
1237
1275
  children: label
1238
1276
  }
1239
1277
  ),
1240
- selected && !dragging && /* @__PURE__ */ jsxRuntime.jsx(ClipViewControls, { clip }),
1241
1278
  selected && CORNERS.map(({ corner, left, top, cursor }) => /* @__PURE__ */ jsxRuntime.jsx(
1242
1279
  "div",
1243
1280
  {
@@ -1547,12 +1584,6 @@ var StageBox = react.memo(function StageBox2({
1547
1584
  });
1548
1585
  var SIZE_STEPS = [8, 10, 12, 14, 16, 18, 20, 24, 28, 32, 36, 44, 54, 66, 80, 96];
1549
1586
  var nextSize = (size, up) => up ? SIZE_STEPS.find((step) => step > size + 0.5) ?? size : [...SIZE_STEPS].reverse().find((step) => step < size - 0.5) ?? size;
1550
- var ALIGN_NEXT = {
1551
- left: "center",
1552
- center: "right",
1553
- right: "left",
1554
- justify: "left"
1555
- };
1556
1587
  var ALIGN_ICON = {
1557
1588
  left: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlignLeft, { className: "size-4" }),
1558
1589
  center: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.AlignCenter, { className: "size-4" }),
@@ -1640,25 +1671,6 @@ function BoxActionBar({ box: box2, onRemoved }) {
1640
1671
  children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Bold, { className: ui.cn("size-4", run?.bold && "text-primary") })
1641
1672
  }
1642
1673
  ),
1643
- /* @__PURE__ */ jsxRuntime.jsx(
1644
- Action,
1645
- {
1646
- label: "Italic",
1647
- onClick: () => update((b) => chunk4TTX6ZNS_cjs.styleRuns(b, (r) => ({ ...r, italic: !run?.italic }))),
1648
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Italic, { className: ui.cn("size-4", run?.italic && "text-primary") })
1649
- }
1650
- ),
1651
- /* @__PURE__ */ jsxRuntime.jsx(
1652
- Action,
1653
- {
1654
- label: "Align",
1655
- onClick: () => update((b) => ({
1656
- ...b,
1657
- paragraphs: b.paragraphs.map((p) => ({ ...p, align: ALIGN_NEXT[align] }))
1658
- })),
1659
- children: ALIGN_ICON[align]
1660
- }
1661
- ),
1662
1674
  /* @__PURE__ */ jsxRuntime.jsx(
1663
1675
  ColorAction,
1664
1676
  {
@@ -1680,10 +1692,58 @@ function BoxActionBar({ box: box2, onRemoved }) {
1680
1692
  children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PaintBucket, { className: "size-4" })
1681
1693
  }
1682
1694
  ),
1683
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-0.5 h-5 w-px bg-border" }),
1684
- /* @__PURE__ */ jsxRuntime.jsx(Action, { label: "In front of the clips", onClick: () => actions.restackBox(box2.id, "front"), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.BringToFront, { className: "size-4" }) }),
1685
- /* @__PURE__ */ jsxRuntime.jsx(Action, { label: "Behind the clips", onClick: () => actions.restackBox(box2.id, "back"), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.SendToBack, { className: "size-4" }) }),
1686
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-0.5 h-5 w-px bg-border" }),
1695
+ /* @__PURE__ */ jsxRuntime.jsxs(ui.DropdownMenu, { children: [
1696
+ /* @__PURE__ */ jsxRuntime.jsx(ui.DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
1697
+ "button",
1698
+ {
1699
+ type: "button",
1700
+ className: ACTION,
1701
+ title: "More",
1702
+ "aria-label": "More",
1703
+ "data-testid": "box-more-menu",
1704
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MoreHorizontal, { className: "size-4" })
1705
+ }
1706
+ ) }),
1707
+ /* @__PURE__ */ jsxRuntime.jsxs(ui.DropdownMenuContent, { align: "start", children: [
1708
+ text && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1709
+ /* @__PURE__ */ jsxRuntime.jsxs(
1710
+ ui.DropdownMenuCheckboxItem,
1711
+ {
1712
+ checked: !!run?.italic,
1713
+ onCheckedChange: () => update((b) => chunk4TTX6ZNS_cjs.styleRuns(b, (r) => ({ ...r, italic: !run?.italic }))),
1714
+ children: [
1715
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Italic, { className: "size-4" }),
1716
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2", children: "Italic" })
1717
+ ]
1718
+ }
1719
+ ),
1720
+ ["left", "center", "right"].map((value) => /* @__PURE__ */ jsxRuntime.jsxs(
1721
+ ui.DropdownMenuCheckboxItem,
1722
+ {
1723
+ checked: align === value,
1724
+ onCheckedChange: () => update((b) => ({
1725
+ ...b,
1726
+ paragraphs: b.paragraphs.map((p) => ({ ...p, align: value }))
1727
+ })),
1728
+ children: [
1729
+ ALIGN_ICON[value],
1730
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2", children: value === "left" ? "Align left" : value === "center" ? "Centre" : "Align right" })
1731
+ ]
1732
+ },
1733
+ value
1734
+ )),
1735
+ /* @__PURE__ */ jsxRuntime.jsx(ui.DropdownMenuSeparator, {})
1736
+ ] }),
1737
+ /* @__PURE__ */ jsxRuntime.jsxs(ui.DropdownMenuItem, { onSelect: () => actions.restackBox(box2.id, "front"), children: [
1738
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.BringToFront, { className: "size-4" }),
1739
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2", children: "In front of the clips" })
1740
+ ] }),
1741
+ /* @__PURE__ */ jsxRuntime.jsxs(ui.DropdownMenuItem, { onSelect: () => actions.restackBox(box2.id, "back"), children: [
1742
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.SendToBack, { className: "size-4" }),
1743
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2", children: "Behind the clips" })
1744
+ ] })
1745
+ ] })
1746
+ ] }),
1687
1747
  /* @__PURE__ */ jsxRuntime.jsx(
1688
1748
  "button",
1689
1749
  {
@@ -1909,27 +1969,6 @@ function PresentationStage({
1909
1969
  }
1910
1970
  );
1911
1971
  }
1912
- function SlideAction({
1913
- label,
1914
- onClick,
1915
- disabled,
1916
- children
1917
- }) {
1918
- return /* @__PURE__ */ jsxRuntime.jsx(
1919
- ui.Button,
1920
- {
1921
- type: "button",
1922
- size: "icon",
1923
- variant: "ghost",
1924
- className: "size-7 text-muted-foreground hover:text-foreground pointer-coarse:size-10",
1925
- title: label,
1926
- "aria-label": label,
1927
- disabled,
1928
- onClick,
1929
- children
1930
- }
1931
- );
1932
- }
1933
1972
  var SlideCard = react.memo(function SlideCard2({
1934
1973
  index,
1935
1974
  count,
@@ -1941,7 +1980,7 @@ var SlideCard = react.memo(function SlideCard2({
1941
1980
  }) {
1942
1981
  const empty = chunk4TTX6ZNS_cjs.usePresentation((s) => {
1943
1982
  const slide = s.slides[index];
1944
- return !!slide && !slide.items.length && !slide.boxes.length && slide.layout !== "title" && slide.layout !== "section";
1983
+ return !!slide && !slide.items.length && !slide.boxes.length && !slide.points.trim() && slide.layout !== "title" && slide.layout !== "section";
1945
1984
  });
1946
1985
  const notes = chunk4TTX6ZNS_cjs.usePresentation((s) => s.slides[index]?.notes ?? "");
1947
1986
  const textEditing = react.useMemo(
@@ -1976,26 +2015,61 @@ var SlideCard = react.memo(function SlideCard2({
1976
2015
  "data-testid": `slide-actions-${index}`,
1977
2016
  children: [
1978
2017
  /* @__PURE__ */ jsxRuntime.jsx(LayoutMenu, { index, compact: true }),
1979
- /* @__PURE__ */ jsxRuntime.jsx(
1980
- SlideAction,
1981
- {
1982
- label: "Move up",
1983
- disabled: index === 0,
1984
- onClick: () => actions.moveSlide(index, index - 1),
1985
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUp, { className: "size-3.5" })
1986
- }
1987
- ),
1988
- /* @__PURE__ */ jsxRuntime.jsx(
1989
- SlideAction,
1990
- {
1991
- label: "Move down",
1992
- disabled: index === count - 1,
1993
- onClick: () => actions.moveSlide(index, index + 1),
1994
- children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowDown, { className: "size-3.5" })
1995
- }
1996
- ),
1997
- /* @__PURE__ */ jsxRuntime.jsx(SlideAction, { label: "Duplicate", onClick: () => actions.duplicateSlide(index), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { className: "size-3.5" }) }),
1998
- /* @__PURE__ */ jsxRuntime.jsx(SlideAction, { label: "Delete slide", onClick: () => actions.removeSlide(index), children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Trash2, { className: "size-3.5" }) })
2018
+ /* @__PURE__ */ jsxRuntime.jsxs(ui.DropdownMenu, { children: [
2019
+ /* @__PURE__ */ jsxRuntime.jsx(ui.DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
2020
+ ui.Button,
2021
+ {
2022
+ type: "button",
2023
+ size: "icon",
2024
+ variant: "ghost",
2025
+ className: "size-7 text-muted-foreground hover:text-foreground pointer-coarse:size-11",
2026
+ title: "Slide actions",
2027
+ "aria-label": `Slide ${index + 1} actions`,
2028
+ "data-testid": `slide-menu-${index}`,
2029
+ children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MoreHorizontal, { className: "size-3.5" })
2030
+ }
2031
+ ) }),
2032
+ /* @__PURE__ */ jsxRuntime.jsxs(ui.DropdownMenuContent, { align: "start", children: [
2033
+ /* @__PURE__ */ jsxRuntime.jsxs(
2034
+ ui.DropdownMenuItem,
2035
+ {
2036
+ disabled: index === 0,
2037
+ onSelect: () => actions.moveSlide(index, index - 1),
2038
+ children: [
2039
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowUp, { className: "size-4" }),
2040
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2", children: "Move up" })
2041
+ ]
2042
+ }
2043
+ ),
2044
+ /* @__PURE__ */ jsxRuntime.jsxs(
2045
+ ui.DropdownMenuItem,
2046
+ {
2047
+ disabled: index === count - 1,
2048
+ onSelect: () => actions.moveSlide(index, index + 1),
2049
+ children: [
2050
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowDown, { className: "size-4" }),
2051
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2", children: "Move down" })
2052
+ ]
2053
+ }
2054
+ ),
2055
+ /* @__PURE__ */ jsxRuntime.jsxs(ui.DropdownMenuItem, { onSelect: () => actions.duplicateSlide(index), children: [
2056
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Copy, { className: "size-4" }),
2057
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2", children: "Duplicate" })
2058
+ ] }),
2059
+ /* @__PURE__ */ jsxRuntime.jsx(ui.DropdownMenuSeparator, {}),
2060
+ /* @__PURE__ */ jsxRuntime.jsxs(
2061
+ ui.DropdownMenuItem,
2062
+ {
2063
+ className: "text-destructive",
2064
+ onSelect: () => actions.removeSlide(index),
2065
+ children: [
2066
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Trash2, { className: "size-4" }),
2067
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-2", children: "Delete slide" })
2068
+ ]
2069
+ }
2070
+ )
2071
+ ] })
2072
+ ] })
1999
2073
  ]
2000
2074
  }
2001
2075
  )
@@ -4786,5 +4860,5 @@ exports.PresentationStage = PresentationStage;
4786
4860
  exports.SlidesEditor = SlidesEditor;
4787
4861
  exports.usePresentationController = usePresentationController;
4788
4862
  exports.usePresentationFiles = usePresentationFiles;
4789
- //# sourceMappingURL=chunk-USNTRL22.cjs.map
4790
- //# sourceMappingURL=chunk-USNTRL22.cjs.map
4863
+ //# sourceMappingURL=chunk-DWMWEALB.cjs.map
4864
+ //# sourceMappingURL=chunk-DWMWEALB.cjs.map