@arbidocs/blocks 0.4.0 → 0.4.2

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 (74) hide show
  1. package/README.md +22 -0
  2. package/dist/{chunk-7G3JNSJB.cjs → chunk-2K33YGM6.cjs} +51 -14
  3. package/dist/chunk-2K33YGM6.cjs.map +1 -0
  4. package/dist/{chunk-S5T7ZTX2.js → chunk-2ORA62OF.js} +3 -3
  5. package/dist/{chunk-S5T7ZTX2.js.map → chunk-2ORA62OF.js.map} +1 -1
  6. package/dist/{chunk-RBXZYNVB.js → chunk-6P6AEQJB.js} +195 -35
  7. package/dist/chunk-6P6AEQJB.js.map +1 -0
  8. package/dist/{chunk-5TYEJOXY.js → chunk-7PEELPMA.js} +52 -15
  9. package/dist/chunk-7PEELPMA.js.map +1 -0
  10. package/dist/{chunk-KUA3BCT2.cjs → chunk-AE5FHFZ5.cjs} +6 -6
  11. package/dist/{chunk-KUA3BCT2.cjs.map → chunk-AE5FHFZ5.cjs.map} +1 -1
  12. package/dist/{chunk-FZQJ2S6P.cjs → chunk-DREI7EQ2.cjs} +197 -33
  13. package/dist/chunk-DREI7EQ2.cjs.map +1 -0
  14. package/dist/chunk-J2BGSWXM.cjs +990 -0
  15. package/dist/chunk-J2BGSWXM.cjs.map +1 -0
  16. package/dist/{chunk-6ALISABK.cjs → chunk-LRUCMZK6.cjs} +7 -4
  17. package/dist/{chunk-6ALISABK.cjs.map → chunk-LRUCMZK6.cjs.map} +1 -1
  18. package/dist/chunk-OBLSURHV.js +973 -0
  19. package/dist/chunk-OBLSURHV.js.map +1 -0
  20. package/dist/{chunk-DVLEQURC.js → chunk-QXEJXIP4.js} +7 -4
  21. package/dist/{chunk-DVLEQURC.js.map → chunk-QXEJXIP4.js.map} +1 -1
  22. package/dist/collaboration/index.cjs +1 -1
  23. package/dist/collaboration/index.js +1 -1
  24. package/dist/components/Chart.d.ts +9 -1
  25. package/dist/components/ContactForm.d.ts +15 -3
  26. package/dist/components/TeamGrid.d.ts +14 -2
  27. package/dist/components/editorial/ArticleList.d.ts +32 -0
  28. package/dist/components/editorial/Bands.d.ts +29 -0
  29. package/dist/components/editorial/EditorialHeading.d.ts +17 -0
  30. package/dist/components/editorial/EditorialHero.d.ts +46 -0
  31. package/dist/components/editorial/EditorialSection.d.ts +47 -0
  32. package/dist/components/editorial/Eyebrow.d.ts +14 -0
  33. package/dist/components/editorial/PanelGrid.d.ts +45 -0
  34. package/dist/components/editorial/ProfileCard.d.ts +27 -0
  35. package/dist/components/editorial/PullQuote.d.ts +17 -0
  36. package/dist/components/editorial/Reveal.d.ts +15 -0
  37. package/dist/components/editorial/index.d.ts +12 -0
  38. package/dist/components/editorial/lists.d.ts +42 -0
  39. package/dist/components/editorial/tone.d.ts +33 -0
  40. package/dist/facts/FactsViewToggle.d.ts +3 -1
  41. package/dist/facts/fact-row.d.ts +32 -0
  42. package/dist/facts/index.cjs +34 -5
  43. package/dist/facts/index.cjs.map +1 -1
  44. package/dist/facts/index.d.ts +1 -0
  45. package/dist/facts/index.js +31 -4
  46. package/dist/facts/index.js.map +1 -1
  47. package/dist/files/ViewToggle.d.ts +6 -2
  48. package/dist/files/ViewerChrome.d.ts +11 -14
  49. package/dist/files/index.cjs +20 -54
  50. package/dist/files/index.cjs.map +1 -1
  51. package/dist/files/index.js +17 -51
  52. package/dist/files/index.js.map +1 -1
  53. package/dist/index.cjs +161 -101
  54. package/dist/index.d.ts +1 -0
  55. package/dist/index.js +6 -6
  56. package/dist/shell/ActionCluster.d.ts +7 -2
  57. package/dist/shell/AskField.d.ts +6 -1
  58. package/dist/shell/index.cjs +42 -42
  59. package/dist/shell/index.js +1 -1
  60. package/dist/site/index.cjs +107 -47
  61. package/dist/site/index.d.ts +1 -0
  62. package/dist/site/index.js +2 -2
  63. package/dist/studio/index.cjs +71 -71
  64. package/dist/studio/index.js +3 -3
  65. package/package.json +3 -3
  66. package/src/blocks.css +17 -0
  67. package/dist/chunk-5TYEJOXY.js.map +0 -1
  68. package/dist/chunk-7G3JNSJB.cjs.map +0 -1
  69. package/dist/chunk-FZQJ2S6P.cjs.map +0 -1
  70. package/dist/chunk-MMYCZRKT.cjs +0 -168
  71. package/dist/chunk-MMYCZRKT.cjs.map +0 -1
  72. package/dist/chunk-RBXZYNVB.js.map +0 -1
  73. package/dist/chunk-UTWX2X2A.js +0 -165
  74. package/dist/chunk-UTWX2X2A.js.map +0 -1
@@ -4,15 +4,15 @@ import { TONE_SURFACE, ToneBadge } from '../chunk-DPLRHEJZ.js';
4
4
  import { ActionLink } from '../chunk-S7PSMMRG.js';
5
5
  import { ShareControl } from '../chunk-K4BGOPGG.js';
6
6
  import { ModalSection, ModalSectionTitle, ModalHeader } from '../chunk-TX2ZICS7.js';
7
- import { GridView } from '../chunk-DVLEQURC.js';
8
- export { DEFAULT_DOCUMENT_VIEW_TOGGLE_LABELS, DocumentViewToggle, GridView, ViewToggle } from '../chunk-DVLEQURC.js';
7
+ import { GridView } from '../chunk-QXEJXIP4.js';
8
+ export { DEFAULT_DOCUMENT_VIEW_TOGGLE_LABELS, DocumentViewToggle, GridView, ViewToggle } from '../chunk-QXEJXIP4.js';
9
9
  import { SelectionBar, SelectionBarAction } from '../chunk-NUNKSZKU.js';
10
10
  export { DEFAULT_SELECTION_BAR_LABELS, SelectionBar, SelectionBarAction } from '../chunk-NUNKSZKU.js';
11
11
  import '../chunk-NPLYHR2E.js';
12
12
  import '../chunk-76JDDMSP.js';
13
13
  import { testIdOr } from '../chunk-7F6CBP3Z.js';
14
14
  import { memo, useState, useRef, useEffect, forwardRef, useMemo, useCallback } from 'react';
15
- import { Check, Ban, Plus, Pencil, PencilLine, Loader2, UploadCloud, X, SlidersHorizontal, Folder, LoaderCircle, Sparkles, AlertCircle, FolderOpen, Upload, FileText, FolderPlus, Globe, Download, FolderUp, Users, XCircle, AlertTriangle, CheckCircle2, Share2, GitCompare, ImagePlus, Crop, ChevronLeft, ChevronRight, Minus, Eye, EyeOff, ArrowLeftRight, CopyX, History, Tags, StickyNote, Columns2, Copy, Undo2, ChevronDown, BookMarked, ExternalLink, Square, RefreshCw, Settings, Unplug, CalendarDays, CheckCircle, CircleSlash, Hourglass, Mail, CornerDownRight, CornerRightDown, Blend, MoreVertical, SquarePen, BookOpen, MessagesSquare, FolderInput, Trash2, NotebookPen, MoreHorizontal, ArrowRightFromLine, ArrowDownToLine, Tag, Bot, Calendar, Search, Hash, List, SquareCheckBig, Columns3, Save, CheckIcon, ArrowUpDown, FileX, ChevronsUpDown, Table2, ArrowRightLeft } from 'lucide-react';
15
+ import { Check, Ban, Plus, Pencil, PencilLine, Loader2, UploadCloud, X, SlidersHorizontal, Folder, LoaderCircle, Sparkles, AlertCircle, FolderOpen, Upload, FileText, FolderPlus, Globe, Download, FolderUp, Users, XCircle, AlertTriangle, CheckCircle2, Share2, GitCompare, ImagePlus, Crop, ChevronLeft, ChevronRight, ZoomIn, Eye, EyeOff, ArrowLeftRight, CopyX, Minus, History, Tags, StickyNote, Columns2, Copy, Undo2, ChevronDown, BookMarked, ExternalLink, Square, RefreshCw, Settings, Unplug, CalendarDays, CheckCircle, CircleSlash, Hourglass, Mail, CornerDownRight, CornerRightDown, Blend, MoreVertical, SquarePen, BookOpen, MessagesSquare, FolderInput, Trash2, NotebookPen, MoreHorizontal, ArrowRightFromLine, ArrowDownToLine, Tag, Bot, Calendar, Search, Hash, List, SquareCheckBig, Columns3, Save, CheckIcon, ArrowUpDown, FileX, ChevronsUpDown, Table2, ArrowRightLeft } from 'lucide-react';
16
16
  import { cn, Popover, PopoverTrigger, PopoverContent, Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, Input, Tooltip, TooltipTrigger, TooltipContent, Button, Progress, Badge, RadioGroup, RadioGroupItem, Label, ScrollArea, Dialog, DialogContent, DialogTitle, DialogDescription, TooltipProvider, IconToggle, Textarea, DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuSeparator, DropdownMenuItem, DialogTrigger, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, Checkbox, DialogHeader, CommandSeparator, getTagTypeIcon, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, Switch } from '@arbidocs/react/ui';
17
17
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
18
18
  import { cva } from 'class-variance-authority';
@@ -1479,9 +1479,7 @@ var DEFAULT_VIEWER_LABELS = {
1479
1479
  cropTitle: "Crop and save as a new version",
1480
1480
  previousPage: "Previous page",
1481
1481
  nextPage: "Next page",
1482
- zoomIn: "Zoom in",
1483
- zoomOut: "Zoom out",
1484
- zoomReset: (level) => `Zoom ${level}. Click to fit the page width.`,
1482
+ zoom: (level) => `Zoom ${level}. Tap to zoom in further, then back to fit the page width.`,
1485
1483
  pageInput: "Page number input",
1486
1484
  pageOfTitle: "Click to go to page",
1487
1485
  pageOf: (page, total) => `Page ${page} of ${total}. Click to navigate.`,
@@ -1758,60 +1756,28 @@ function PdfPageNav({
1758
1756
  }
1759
1757
  );
1760
1758
  }
1761
- function ViewerZoomControl({
1762
- zoom,
1763
- canZoomIn,
1764
- canZoomOut,
1765
- onZoomIn,
1766
- onZoomOut,
1767
- onReset,
1768
- labels,
1769
- testIds
1770
- }) {
1759
+ function ViewerZoomControl({ zoom, onCycle, labels, testIds }) {
1771
1760
  const l = { ...DEFAULT_VIEWER_LABELS, ...labels };
1772
1761
  const level = `${Math.round(zoom * 100)}%`;
1762
+ const isZoomed = Math.abs(zoom - 1) > 0.02;
1773
1763
  return /* @__PURE__ */ jsxs(
1774
- "div",
1764
+ Button,
1775
1765
  {
1776
- className: "absolute bottom-20 left-1/2 z-10 flex -translate-x-1/2 items-center gap-1 rounded-lg border border-border bg-background/95 px-2 py-1 shadow-lg backdrop-blur",
1777
- "data-testid": testIdOr(testIds?.overlay, { testId: "viewer-zoom-overlay" }),
1766
+ type: "button",
1767
+ variant: "ghost",
1768
+ onClick: onCycle,
1769
+ "aria-label": l.zoom(level),
1770
+ "data-testid": testIdOr(testIds?.button, { testId: "viewer-zoom-button" }),
1771
+ className: "absolute right-3 bottom-4 z-10 hidden h-11 min-w-11 items-center justify-center gap-1 rounded-full border border-border bg-background/95 px-2.5 shadow-md backdrop-blur pointer-coarse:inline-flex",
1778
1772
  children: [
1779
- /* @__PURE__ */ jsx(
1780
- Button,
1781
- {
1782
- variant: "ghost",
1783
- size: "icon",
1784
- className: "size-7 shrink-0 pointer-coarse:size-11",
1785
- onClick: onZoomOut,
1786
- disabled: !canZoomOut,
1787
- "aria-label": l.zoomOut,
1788
- "data-testid": testIdOr(testIds?.out, { testId: "viewer-zoom-out" }),
1789
- children: /* @__PURE__ */ jsx(Minus, { className: "size-4" })
1790
- }
1791
- ),
1792
- /* @__PURE__ */ jsx(
1793
- "button",
1773
+ /* @__PURE__ */ jsx(ZoomIn, { className: "size-4" }),
1774
+ isZoomed && /* @__PURE__ */ jsx(
1775
+ "span",
1794
1776
  {
1795
- type: "button",
1796
- onClick: onReset,
1797
- className: "min-w-12 rounded px-1 text-center text-sm font-medium tabular-nums hover:bg-muted pointer-coarse:min-h-11",
1798
- "aria-label": l.zoomReset(level),
1777
+ className: "text-xs font-medium tabular-nums",
1799
1778
  "data-testid": testIdOr(testIds?.level, { testId: "viewer-zoom-level" }),
1800
1779
  children: level
1801
1780
  }
1802
- ),
1803
- /* @__PURE__ */ jsx(
1804
- Button,
1805
- {
1806
- variant: "ghost",
1807
- size: "icon",
1808
- className: "size-7 shrink-0 pointer-coarse:size-11",
1809
- onClick: onZoomIn,
1810
- disabled: !canZoomIn,
1811
- "aria-label": l.zoomIn,
1812
- "data-testid": testIdOr(testIds?.in, { testId: "viewer-zoom-in" }),
1813
- children: /* @__PURE__ */ jsx(Plus, { className: "size-4" })
1814
- }
1815
1781
  )
1816
1782
  ]
1817
1783
  }