@activecollab/components 2.0.397 → 2.0.399

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 (61) hide show
  1. package/dist/cjs/presentation/whiteboard/bottomDock.js +194 -0
  2. package/dist/cjs/presentation/whiteboard/bottomDock.js.map +1 -0
  3. package/dist/cjs/presentation/whiteboard/canvasElements.js +877 -0
  4. package/dist/cjs/presentation/whiteboard/canvasElements.js.map +1 -0
  5. package/dist/cjs/presentation/whiteboard/elements.js +816 -0
  6. package/dist/cjs/presentation/whiteboard/elements.js.map +1 -0
  7. package/dist/cjs/presentation/whiteboard/fileElement.js +457 -0
  8. package/dist/cjs/presentation/whiteboard/fileElement.js.map +1 -0
  9. package/dist/cjs/presentation/whiteboard/glyphs.js +67 -0
  10. package/dist/cjs/presentation/whiteboard/glyphs.js.map +1 -0
  11. package/dist/cjs/presentation/whiteboard/inspector.js +884 -0
  12. package/dist/cjs/presentation/whiteboard/inspector.js.map +1 -0
  13. package/dist/cjs/presentation/whiteboard/linkElement.js +357 -0
  14. package/dist/cjs/presentation/whiteboard/linkElement.js.map +1 -0
  15. package/dist/cjs/presentation/whiteboard/outline.js +966 -0
  16. package/dist/cjs/presentation/whiteboard/outline.js.map +1 -0
  17. package/dist/cjs/presentation/whiteboard/peopleMenu.js +516 -0
  18. package/dist/cjs/presentation/whiteboard/peopleMenu.js.map +1 -0
  19. package/dist/cjs/presentation/whiteboard/settingsMenu.js +177 -0
  20. package/dist/cjs/presentation/whiteboard/settingsMenu.js.map +1 -0
  21. package/dist/esm/presentation/whiteboard/bottomDock.d.ts +51 -0
  22. package/dist/esm/presentation/whiteboard/bottomDock.d.ts.map +1 -0
  23. package/dist/esm/presentation/whiteboard/bottomDock.js +162 -0
  24. package/dist/esm/presentation/whiteboard/bottomDock.js.map +1 -0
  25. package/dist/esm/presentation/whiteboard/canvasElements.d.ts +61 -0
  26. package/dist/esm/presentation/whiteboard/canvasElements.d.ts.map +1 -0
  27. package/dist/esm/presentation/whiteboard/canvasElements.js +746 -0
  28. package/dist/esm/presentation/whiteboard/canvasElements.js.map +1 -0
  29. package/dist/esm/presentation/whiteboard/elements.d.ts +180 -0
  30. package/dist/esm/presentation/whiteboard/elements.d.ts.map +1 -0
  31. package/dist/esm/presentation/whiteboard/elements.js +736 -0
  32. package/dist/esm/presentation/whiteboard/elements.js.map +1 -0
  33. package/dist/esm/presentation/whiteboard/fileElement.d.ts +113 -0
  34. package/dist/esm/presentation/whiteboard/fileElement.d.ts.map +1 -0
  35. package/dist/esm/presentation/whiteboard/fileElement.js +430 -0
  36. package/dist/esm/presentation/whiteboard/fileElement.js.map +1 -0
  37. package/dist/esm/presentation/whiteboard/glyphs.d.ts +32 -0
  38. package/dist/esm/presentation/whiteboard/glyphs.d.ts.map +1 -0
  39. package/dist/esm/presentation/whiteboard/glyphs.js +50 -0
  40. package/dist/esm/presentation/whiteboard/glyphs.js.map +1 -0
  41. package/dist/esm/presentation/whiteboard/inspector.d.ts +100 -0
  42. package/dist/esm/presentation/whiteboard/inspector.d.ts.map +1 -0
  43. package/dist/esm/presentation/whiteboard/inspector.js +753 -0
  44. package/dist/esm/presentation/whiteboard/inspector.js.map +1 -0
  45. package/dist/esm/presentation/whiteboard/linkElement.d.ts +97 -0
  46. package/dist/esm/presentation/whiteboard/linkElement.d.ts.map +1 -0
  47. package/dist/esm/presentation/whiteboard/linkElement.js +327 -0
  48. package/dist/esm/presentation/whiteboard/linkElement.js.map +1 -0
  49. package/dist/esm/presentation/whiteboard/outline.d.ts +89 -0
  50. package/dist/esm/presentation/whiteboard/outline.d.ts.map +1 -0
  51. package/dist/esm/presentation/whiteboard/outline.js +870 -0
  52. package/dist/esm/presentation/whiteboard/outline.js.map +1 -0
  53. package/dist/esm/presentation/whiteboard/peopleMenu.d.ts +44 -0
  54. package/dist/esm/presentation/whiteboard/peopleMenu.d.ts.map +1 -0
  55. package/dist/esm/presentation/whiteboard/peopleMenu.js +440 -0
  56. package/dist/esm/presentation/whiteboard/peopleMenu.js.map +1 -0
  57. package/dist/esm/presentation/whiteboard/settingsMenu.d.ts +13 -0
  58. package/dist/esm/presentation/whiteboard/settingsMenu.d.ts.map +1 -0
  59. package/dist/esm/presentation/whiteboard/settingsMenu.js +155 -0
  60. package/dist/esm/presentation/whiteboard/settingsMenu.js.map +1 -0
  61. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"elements.js","names":["React","useState","styled","MinusGlyph","PlusGlyph","SquareGlyph","Dot","IconButton","ArrowRefreshIcon","CircleIcon","CircleSlashIcon","LockIcon","RoundedRectangleIcon","TextAlignCenterIcon","TextAlignJustifyIcon","TextAlignLeftIcon","TextAlignRightIcon","TextStyleBoldIcon","TextStyleItalicIcon","TextStyleStrikeIcon","TextStyleUnderlineIcon","TrashIcon","TriangleIcon","List","ListItem","Menu","Tooltip","colors","ELEMENT_FILL","ELEMENT_STROKE","ELEMENT_TEXT","STICKY_FILL","SELECTION_BLUE","COLOR_PALETTE","FONT_SIZE_OPTIONS","THICKNESS_OPTIONS","OPACITY_OPTIONS","RADIUS_OPTIONS","ELEMENT_BODIES","COLOR_OPTIONS","Object","values","map","entry","id","color","name","textColor","defaultShapeState","type","fill","fillOpacity","stroke","strokeOpacity","strokeWidth","strokeDash","undefined","borderRadius","fontSize","bold","italic","underline","strikethrough","align","withOpacity","opacityPct","alpha","startsWith","r","parseInt","slice","g","b","replace","shapeBorder","state","lineStyle","stickyGradient","opacity","main","faded","Math","max","GRID_LEVELS","value","label","dotSpacing","snapStep","gridLevel","_GRID_LEVELS$find","find","level","CANVAS_ELEMENTS","kind","initialType","x","y","width","height","INITIAL_SHAPES","reduce","acc","element","INITIAL_POSITIONS","snapValue","step","round","StyledCanvasLayer","div","withConfig","displayName","componentId","StyledCanvasElement","StyledSticky","StyledHandles","RESIZE_DIRECTIONS","ResizeHandles","createElement","onMouseDown","event","stopPropagation","direction","key","className","StyledFormattingToolbar","StyledToolbarButton","button","StyledToolbarLink","withComponent","StyledFontSizeValue","span","stopClick","SUBMENU_SHADOW","StyledColorPopover","WHEEL_SIZE","WHEEL_RADIUS","StyledColorWheel","ColorWheel","_ref","onColorChange","onClick","rect","currentTarget","getBoundingClientRect","dx","clientX","left","dy","clientY","top","distance","sqrt","angle","atan2","PI","hue","saturation","min","StyledSwatchRow","ColorSwatchRow","_ref2","selectedColor","includeTransparent","onSelect","onAddClick","style","backgroundColor","SHAPE_TYPE_ICON","rectangle","roundedRectangle","circle","triangle","SHAPE_TYPE_OPTIONS","BORDER_STYLE_OPTIONS","ToolbarActions","_ref3","locked","onToggleLock","onDelete","Fragment","title","ShapeTypeMenu","_ref4","onChange","_useState","open","setOpen","onOpen","onClose","position","target","variant","active","padding","tabIndex","option","AlignmentMenu","_ref5","_ALIGN_OPTIONS$find","disabled","_useState2","selected","ALIGN_OPTIONS","icon","ToolbarColorSwatch","_ref6","_useState3","_useState4","wheelOpen","setWheelOpen","isTransparent","current","size","ToolbarTextControls","_ref7","styleFlags","onFontSize","onToggleStyle","onAlign","STYLE_OPTIONS","ShapeFormattingToolbar","_ref8","_element$align","onUpdate","PostitFormattingToolbar","_ref9","_extends","renderShapeBody","def","display","overflow","points","strokeDasharray","border"],"sources":["../../../../src/presentation/whiteboard/elements.tsx"],"sourcesContent":["import React, { ReactElement, useState } from \"react\";\n\nimport styled from \"styled-components\";\n\nimport { MinusGlyph, PlusGlyph, SquareGlyph } from \"./glyphs\";\nimport { Dot } from \"../../components/Dot\";\nimport { IconButton } from \"../../components/IconButton\";\nimport {\n ArrowRefreshIcon,\n CircleIcon,\n CircleSlashIcon,\n LockIcon,\n RoundedRectangleIcon,\n TextAlignCenterIcon,\n TextAlignJustifyIcon,\n TextAlignLeftIcon,\n TextAlignRightIcon,\n TextStyleBoldIcon,\n TextStyleItalicIcon,\n TextStyleStrikeIcon,\n TextStyleUnderlineIcon,\n TrashIcon,\n TriangleIcon,\n} from \"../../components/Icons\";\nimport { List, ListItem } from \"../../components/List\";\nimport { Menu } from \"../../components/Menu\";\nimport { Tooltip } from \"../../components/Tooltip\";\nimport { colors } from \"../../utils/colors\";\n\n/* ------------------------------------------------------------------ */\n/* Canvas elements (1:1 with new-activecollab-front */\n/* src/components/Whiteboards/ — constants.js, ShapeElement.jsx, */\n/* PostitElement.jsx, ResizableWrapper.jsx, ResizeHandles.jsx, */\n/* FormattingToolbarContainer.jsx + the two formatting toolbars) */\n/* ------------------------------------------------------------------ */\n\n/* element colors are canvas DATA (app constants), not theme — hardcoded */\nexport const ELEMENT_FILL = \"#ffffff\";\nexport const ELEMENT_STROKE = \"#374151\";\nexport const ELEMENT_TEXT = \"#1f2937\";\nexport const STICKY_FILL = \"#fbbf24\";\nexport const SELECTION_BLUE = \"#3b82f6\";\n\n/* COLOR_PALETTE from toolbar/colorPalette.js (submenu swatch rows) */\nexport const COLOR_PALETTE = [\n \"#ffffff\",\n \"#3b82f6\",\n \"#ef4444\",\n \"#10b981\",\n \"#f59e0b\",\n \"#8b5cf6\",\n \"#f97316\",\n \"#06b6d4\",\n \"#84cc16\",\n \"#ec4899\",\n \"#6b7280\",\n];\n\n/* Discrete option sets for the right Inspector — mirror the app's fixed\n font-size ladder and the border-thickness steps offered in the toolbar. */\nexport const FONT_SIZE_OPTIONS = [\n 10, 13, 16, 20, 24, 30, 36, 48, 72, 96, 144, 216, 288,\n];\nexport const THICKNESS_OPTIONS = [1, 2, 3, 4, 5];\n\nexport const OPACITY_OPTIONS = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100];\n\n/* Corner radii scaled to the board: shapes are drawn at ~100–300px, so the jump\n from a crisp corner to a pill reads across 0–64px. */\nexport const RADIUS_OPTIONS = [0, 4, 8, 12, 16, 24, 32, 48, 64];\n\n/* Element bodies are HTML, as the API returns them (the `body` field). The\n Inspector renders them read-only; when a body is empty the field is omitted.\n Mock the three cases across the canvas: a short body (shape-rounded, the\n default selection), a long one that scrolls (shape-circle), and none at all\n (shape-triangle / sticky). */\nexport const ELEMENT_BODIES: Record<string, string> = {\n \"shape-rounded\": \"<p>Marks the <strong>Kickoff</strong> phase.</p>\",\n \"shape-circle\":\n \"<p>The <strong>discovery</strong> loop for this initiative.</p><p>We collect signals from support, sales and analytics, then cluster them into themes before committing to a direction.</p><ul><li>Owner: research</li><li>Inputs: interviews, tickets, funnel data</li><li>Output: a prioritised opportunity list</li></ul><p>See the <em>retro notes</em> and last quarter's readout for the full context and prior decisions.</p>\",\n};\n\n/* Named-colour options for the Inspector fill/stroke pickers, built from the\n design system's shared data colours (utils/colors). Shaped for the DS Select\n (id + name + color + textColor) so it renders the standard dot-and-radio menu\n used by the label dialogs. */\nexport const COLOR_OPTIONS = Object.values(colors).map((entry) => ({\n id: entry.color,\n name: entry.name,\n color: entry.color,\n textColor: entry.color,\n}));\n\nexport type ShapeType =\n | \"rectangle\"\n | \"roundedRectangle\"\n | \"circle\"\n | \"triangle\";\n\nexport type TextAlign = \"left\" | \"center\" | \"right\" | \"justify\";\n\n/* per-shape editable state (the app bakes opacity into rgba via\n hexToRgba/parseOpacity; the mock keeps opacity separate and rebuilds\n the color when rendering) */\nexport interface ShapeElementState {\n type: ShapeType;\n fill: string;\n fillOpacity: number;\n stroke: string;\n strokeOpacity: number;\n strokeWidth: number;\n strokeDash?: \"5,5\" | \"2,2\";\n borderRadius: number;\n fontSize: number;\n bold: boolean;\n italic: boolean;\n underline: boolean;\n strikethrough: boolean;\n textColor: string;\n /* Text alignment — surfaced in the Inspector's Text group (the floating\n toolbar does not expose it, so it defaults to left). */\n align?: TextAlign;\n}\n\nexport const defaultShapeState = (type: ShapeType): ShapeElementState => ({\n type,\n fill: ELEMENT_FILL,\n fillOpacity: 100,\n stroke: ELEMENT_STROKE,\n strokeOpacity: 100,\n strokeWidth: 2,\n strokeDash: undefined,\n borderRadius: type === \"roundedRectangle\" ? 12 : 0,\n fontSize: 16,\n bold: false,\n italic: false,\n underline: false,\n strikethrough: false,\n textColor: ELEMENT_TEXT,\n align: \"left\",\n});\n\n/* swatches are 6-digit hex, the color wheel returns hsl(...) */\nexport const withOpacity = (color: string, opacityPct: number): string => {\n if (opacityPct >= 100) {\n return color;\n }\n\n const alpha = opacityPct / 100;\n\n if (color.startsWith(\"#\")) {\n const r = parseInt(color.slice(1, 3), 16);\n const g = parseInt(color.slice(3, 5), 16);\n const b = parseInt(color.slice(5, 7), 16);\n\n return `rgba(${r}, ${g}, ${b}, ${alpha})`;\n }\n\n if (color.startsWith(\"hsl(\")) {\n return color.replace(\"hsl(\", \"hsla(\").replace(\")\", `, ${alpha})`);\n }\n\n return color;\n};\n\n/* getShapeBorder from ShapeElement.jsx */\nexport const shapeBorder = (state: ShapeElementState): string => {\n if (state.strokeWidth === 0) {\n return \"none\";\n }\n\n const lineStyle =\n state.strokeDash === \"5,5\"\n ? \"dashed\"\n : state.strokeDash === \"2,2\"\n ? \"dotted\"\n : \"solid\";\n\n return `${state.strokeWidth}px ${lineStyle} ${withOpacity(\n state.stroke,\n state.strokeOpacity\n )}`;\n};\n\n/* PostitElement gradient: color → same color at ~87% alpha */\nexport const stickyGradient = (color: string, opacity = 100): string => {\n const main = withOpacity(color, opacity);\n const faded = withOpacity(color, Math.max(0, opacity - 13));\n\n return `linear-gradient(135deg, ${main} 0%, ${faded} 100%)`;\n};\n\nexport type GridSize = \"off\" | \"small\" | \"large\";\n\n/* Grid config, aligned to the 8px design-system grid. dotSpacing drives the\n dot layer; snapStep drives snapping — decoupled, so each level snaps finer\n than its dots (Small: 16px dots / 8px snap; Large: 32px dots / 16px snap,\n i.e. dots and half-dots). */\nexport const GRID_LEVELS: {\n value: GridSize;\n label: string;\n dotSpacing: number | null;\n snapStep: number | null;\n}[] = [\n { value: \"off\", label: \"Off\", dotSpacing: null, snapStep: null },\n { value: \"small\", label: \"Small\", dotSpacing: 16, snapStep: 8 },\n { value: \"large\", label: \"Large\", dotSpacing: 32, snapStep: 16 },\n];\n\nexport const gridLevel = (value: GridSize): (typeof GRID_LEVELS)[number] =>\n GRID_LEVELS.find((level) => level.value === value) ?? GRID_LEVELS[0];\n\nexport interface CanvasElementDef {\n id: string;\n kind: \"shape\" | \"sticky\";\n initialType?: ShapeType;\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\n/* default sizes from DEFAULT_SHAPE_SIZES / DEFAULT_STICKY_SIZE; positions are\n board-space pixels (top-left) so dragging can snap to the pixel grid */\nexport const CANVAS_ELEMENTS: CanvasElementDef[] = [\n {\n id: \"shape-circle\",\n kind: \"shape\",\n initialType: \"circle\",\n x: 320,\n y: 180,\n width: 80,\n height: 80,\n },\n {\n id: \"shape-rounded\",\n kind: \"shape\",\n initialType: \"roundedRectangle\",\n x: 560,\n y: 300,\n width: 100,\n height: 60,\n },\n {\n id: \"shape-triangle\",\n kind: \"shape\",\n initialType: \"triangle\",\n x: 820,\n y: 170,\n width: 80,\n height: 80,\n },\n {\n id: \"sticky\",\n kind: \"sticky\",\n x: 430,\n y: 430,\n width: 120,\n height: 120,\n },\n];\n\nexport const INITIAL_SHAPES = CANVAS_ELEMENTS.reduce<\n Record<string, ShapeElementState>\n>((acc, element) => {\n if (element.kind === \"shape\" && element.initialType) {\n acc[element.id] = defaultShapeState(element.initialType);\n }\n\n return acc;\n}, {});\n\nexport const INITIAL_POSITIONS = CANVAS_ELEMENTS.reduce<\n Record<string, { x: number; y: number }>\n>((acc, element) => {\n acc[element.id] = { x: element.x, y: element.y };\n\n return acc;\n}, {});\n\nexport const snapValue = (value: number, step: number | null): number =>\n step ? Math.round(value / step) * step : value;\n\n/* deselect happens on canvas-background click (layer under the bars) */\nexport const StyledCanvasLayer = styled.div`\n position: absolute;\n inset: 0;\n\n /* the Link tool is armed: the next drag draws a card box */\n &.drawing {\n cursor: crosshair;\n }\n`;\n\n/* ResizableWrapper: selected = 2px blue-500 ring @50%, hover = 4px\n blue-400 ring @70% (Tailwind rings are box-shadows) */\nexport const StyledCanvasElement = styled.div`\n position: absolute;\n cursor: move;\n\n &:hover:not(.selected) {\n box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.7);\n }\n\n &.selected {\n box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);\n }\n\n /* A StackedCard draws its own ring (from --sc-selection-ring, set on the\n canvas to the board blue), so the wrapper's ring would double it. The card\n is also auto-height: the wrapper sets width only and lets the box grow. */\n &.is-card {\n cursor: grab;\n height: auto;\n\n &:hover:not(.selected),\n &.selected {\n box-shadow: none;\n }\n }\n\n /* fill/border/radius come from the element's editable state (inline) */\n .shape-fill {\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`;\n\n/* PostitElement: 12px padding, shadow-lg, 1deg tilt that straightens on\n hover, diagonal gradient to ~87% alpha, Comic Sans */\nexport const StyledSticky = styled.div`\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n padding: 12px;\n box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),\n 0 4px 6px -4px rgba(0, 0, 0, 0.1);\n transform: rotate(1deg);\n transition: transform 200ms;\n font-family: \"Comic Sans MS\", cursive, system-ui, sans-serif;\n line-height: 1.4;\n word-break: break-word;\n white-space: pre-wrap;\n\n ${StyledCanvasElement}:hover & {\n transform: rotate(0deg);\n }\n`;\n\n/* ResizeHandles: 8 12px blue squares w/ 2px white border on the box,\n plus the 24px rotate handle outside the bottom-left corner */\nexport const StyledHandles = styled.div`\n .rh {\n position: absolute;\n width: 12px;\n height: 12px;\n box-sizing: border-box;\n background-color: ${SELECTION_BLUE};\n border: 2px solid #ffffff;\n border-radius: 2px;\n z-index: 10;\n\n &:hover {\n background-color: #2563eb;\n }\n }\n\n .rh-nw {\n top: -6px;\n left: -6px;\n cursor: nw-resize;\n }\n .rh-n {\n top: -6px;\n left: 50%;\n margin-left: -6px;\n cursor: n-resize;\n }\n .rh-ne {\n top: -6px;\n right: -6px;\n cursor: ne-resize;\n }\n .rh-w {\n top: 50%;\n left: -6px;\n margin-top: -6px;\n cursor: w-resize;\n }\n .rh-e {\n top: 50%;\n right: -6px;\n margin-top: -6px;\n cursor: e-resize;\n }\n .rh-sw {\n bottom: -6px;\n left: -6px;\n cursor: sw-resize;\n }\n .rh-s {\n bottom: -6px;\n left: 50%;\n margin-left: -6px;\n cursor: s-resize;\n }\n .rh-se {\n bottom: -6px;\n right: -6px;\n cursor: se-resize;\n }\n\n .rotate-handle {\n position: absolute;\n bottom: -35px;\n left: -35px;\n width: 24px;\n height: 24px;\n box-sizing: border-box;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: #ffffff;\n border: 2px solid ${SELECTION_BLUE};\n border-radius: 50%;\n cursor: grab;\n z-index: 11;\n\n svg {\n width: 16px;\n height: 16px;\n }\n }\n`;\n\nexport const RESIZE_DIRECTIONS = [\"nw\", \"n\", \"ne\", \"w\", \"e\", \"sw\", \"s\", \"se\"];\n\nexport const ResizeHandles = (): ReactElement => (\n <StyledHandles onMouseDown={(event) => event.stopPropagation()}>\n {RESIZE_DIRECTIONS.map((direction) => (\n <span key={direction} className={`rh rh-${direction}`} />\n ))}\n <span className=\"rotate-handle\">\n <ArrowRefreshIcon fill={SELECTION_BLUE} />\n </span>\n </StyledHandles>\n);\n\n/* FormattingToolbarContainer: Paper paper-2 (bg + 8px radius + shadow,\n no border), 8px padding, 4px gap, centered 10px above the element */\nexport const StyledFormattingToolbar = styled.div`\n position: absolute;\n bottom: calc(100% + 10px);\n left: 50%;\n transform: translateX(-50%);\n display: flex;\n align-items: center;\n gap: 4px;\n padding: 8px;\n border-radius: 8px;\n background-color: var(--page-paper-main);\n box-shadow: var(--shadow-tertiary);\n white-space: nowrap;\n cursor: auto;\n z-index: 20;\n\n .tb-group {\n position: relative;\n display: flex;\n align-items: center;\n gap: 4px;\n padding-right: 8px;\n margin-right: 8px;\n border-right: 1px solid var(--border-primary);\n }\n\n /* submenu/popover anchor around a single trigger */\n .tb-rel {\n position: relative;\n display: inline-flex;\n }\n\n .divider {\n width: 1px;\n height: 20px;\n background-color: var(--border-primary);\n margin: 0 4px;\n flex-shrink: 0;\n }\n`;\n\n/* Button variant=\"option\" (idle) / \"tertiary\" (active), h-8 px-2 gap-1 */\nexport const StyledToolbarButton = styled.button`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n height: 32px;\n box-sizing: border-box;\n padding: 0 8px;\n border: 0;\n border-radius: 8px;\n background-color: transparent;\n color: var(--color-secondary);\n font-family: -apple-system, BlinkMacSystemFont, \"Roboto\", \"Helvetica Neue\",\n Arial, sans-serif;\n font-size: 14px;\n cursor: pointer;\n\n &:hover {\n background-color: var(--color-theme-200);\n }\n\n &.active {\n background-color: var(--color-theme-300);\n }\n\n &.icon-only {\n width: 32px;\n padding: 0;\n }\n\n &:disabled {\n opacity: 0.45;\n cursor: default;\n\n &:hover {\n background-color: transparent;\n }\n }\n\n svg {\n fill: currentColor;\n flex-shrink: 0;\n }\n\n svg.i16 {\n width: 16px;\n height: 16px;\n }\n\n svg.i12 {\n width: 12px;\n height: 12px;\n }\n`;\n\n/* Same chrome as a toolbar button, but an <a> — used where the action is a real\n navigation (Visit). `withComponent` keeps the styles and swaps the element, so\n the props type becomes the anchor's. */\nexport const StyledToolbarLink = styled(StyledToolbarButton.withComponent(\"a\"))`\n text-decoration: none;\n`;\n\n/* font-mono min-w-[24px] text-xs readout between the stepper buttons */\nexport const StyledFontSizeValue = styled.span`\n min-width: 24px;\n text-align: center;\n font-family: ui-monospace, SFMono-Regular, Menlo, monospace;\n font-size: 12px;\n color: var(--color-secondary);\n`;\n\nexport const stopClick = (event: React.MouseEvent): void =>\n event.stopPropagation();\n\n/* Shared drop shadow for the colour swatch popover / colour wheel that the\n compact toolbar swatch trigger opens. */\nexport const SUBMENU_SHADOW =\n \"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1)\";\n\n/* ColorWheelPopover: beside the submenu (SHAPE_POPOVER_CLASS) or below\n a toolbar trigger (sticky default class) */\nexport const StyledColorPopover = styled.div`\n position: absolute;\n box-sizing: border-box;\n padding: 12px;\n background-color: var(--page-paper-main);\n border: 1px solid var(--border-primary);\n border-radius: 8px;\n box-shadow: ${SUBMENU_SHADOW};\n z-index: 70;\n cursor: auto;\n\n &.beside {\n top: 0;\n left: 100%;\n margin-left: 8px;\n }\n\n &.below {\n top: 40px;\n left: 0;\n }\n`;\n\n/* ImprovedColorWheel: hue = angle from east (atan2), saturation = distance,\n lightness 50 — the canvas wheel replicated with CSS gradients */\nexport const WHEEL_SIZE = 200;\nexport const WHEEL_RADIUS = WHEEL_SIZE / 2 - 5;\n\nexport const StyledColorWheel = styled.button`\n display: block;\n width: ${WHEEL_SIZE}px;\n height: ${WHEEL_SIZE}px;\n padding: 0;\n border: 0;\n border-radius: 50%;\n cursor: crosshair;\n box-shadow: ${SUBMENU_SHADOW};\n background: radial-gradient(\n circle closest-side,\n #ffffff,\n rgba(255, 255, 255, 0)\n ),\n conic-gradient(\n from 90deg,\n #ff0000,\n #ffff00,\n #00ff00,\n #00ffff,\n #0000ff,\n #ff00ff,\n #ff0000\n );\n`;\n\nexport interface ColorWheelProps {\n onColorChange: (color: string) => void;\n}\n\nexport const ColorWheel = ({\n onColorChange,\n}: ColorWheelProps): ReactElement => (\n <StyledColorWheel\n onClick={(event) => {\n const rect = event.currentTarget.getBoundingClientRect();\n const dx = event.clientX - rect.left - WHEEL_SIZE / 2;\n const dy = event.clientY - rect.top - WHEEL_SIZE / 2;\n const distance = Math.sqrt(dx * dx + dy * dy);\n\n if (distance > WHEEL_RADIUS) {\n return;\n }\n\n let angle = Math.atan2(dy, dx);\n\n if (angle < 0) {\n angle += 2 * Math.PI;\n }\n\n const hue = Math.round((angle * 180) / Math.PI);\n const saturation = Math.round(\n Math.min(100, (distance / WHEEL_RADIUS) * 100)\n );\n\n onColorChange(`hsl(${hue}, ${saturation}%, 50%)`);\n }}\n />\n);\n\n/* ColorSwatchRow.jsx: 32px swatches + a \"+\" that opens the color wheel */\nexport const StyledSwatchRow = styled.div`\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n\n .swatch {\n width: 32px;\n height: 32px;\n box-sizing: border-box;\n padding: 0;\n border: 2px solid var(--border-primary);\n border-radius: 4px;\n cursor: pointer;\n\n &:hover {\n border-color: var(--color-theme-500);\n }\n\n &.selected {\n box-shadow: 0 0 0 2px ${SELECTION_BLUE};\n }\n }\n\n .swatch-add {\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: var(--color-theme-200);\n color: var(--color-secondary);\n }\n`;\n\nexport interface ColorSwatchRowProps {\n selectedColor?: string;\n /* Adds a \"Transparent\" swatch (a CircleSlash chip) as the first option. Only\n shape fill opts in — a sticky's colour is its whole point, and text colour\n would render invisibly, so both leave this off. Matches the app's\n `includeTransparent` on the shared ColorPicker. */\n includeTransparent?: boolean;\n onSelect: (color: string) => void;\n onAddClick: () => void;\n}\n\nexport const ColorSwatchRow = ({\n selectedColor,\n includeTransparent,\n onSelect,\n onAddClick,\n}: ColorSwatchRowProps): ReactElement => (\n <StyledSwatchRow>\n {includeTransparent ? (\n <button\n type=\"button\"\n className={\n selectedColor === \"transparent\"\n ? \"swatch swatch-add selected\"\n : \"swatch swatch-add\"\n }\n aria-label=\"Transparent\"\n onClick={() => onSelect(\"transparent\")}\n >\n <CircleSlashIcon width={20} height={20} fill=\"currentColor\" />\n </button>\n ) : null}\n {COLOR_PALETTE.map((color) => (\n <button\n key={color}\n type=\"button\"\n className={selectedColor === color ? \"swatch selected\" : \"swatch\"}\n style={{ backgroundColor: color }}\n onClick={() => onSelect(color)}\n />\n ))}\n <button type=\"button\" className=\"swatch swatch-add\" onClick={onAddClick}>\n <PlusGlyph />\n </button>\n </StyledSwatchRow>\n);\n\nexport const SHAPE_TYPE_ICON: Record<ShapeType, ReactElement> = {\n rectangle: <SquareGlyph />,\n roundedRectangle: <RoundedRectangleIcon className=\"i16\" />,\n circle: <CircleIcon className=\"i16\" />,\n triangle: <TriangleIcon className=\"i16\" />,\n};\n\n/* The four shape types, in the order the shape-type menu lists them. */\nexport const SHAPE_TYPE_OPTIONS: { type: ShapeType; label: string }[] = [\n { type: \"rectangle\", label: \"Rectangle\" },\n { type: \"roundedRectangle\", label: \"Rounded Rectangle\" },\n { type: \"circle\", label: \"Circle\" },\n { type: \"triangle\", label: \"Triangle\" },\n];\n\n/* Stroke pattern options — now only the Inspector's Stroke group renders these\n (the shape floating toolbar no longer edits stroke). Mirrors the app's\n STROKE_PATTERN_OPTIONS dash enum: solid | dashed | dotted. */\nexport const BORDER_STYLE_OPTIONS: {\n value?: ShapeElementState[\"strokeDash\"];\n label: string;\n}[] = [\n { value: undefined, label: \"Solid\" },\n { value: \"5,5\", label: \"Dashed\" },\n { value: \"2,2\", label: \"Dotted\" },\n];\n\n/* ── Shared floating-toolbar controls ───────────────────────────────────────\n The floating toolbars were flattened this session to match the app: compact,\n collapsed controls (single-button dropdowns) with uniform 4px spacing and a\n single hairline separator only before Lock / Delete. These mirror the shared\n controls in the app's Inspector/Controls (ShapeTypeMenu, AlignmentMenu,\n ColorPicker compact, ToolbarActions). */\n\n/* ToolbarActions — the trailing block shared by EVERY floating toolbar:\n separator → Lock → Delete, in the standard control colour (not red). Mirrors\n app `toolbar/ToolbarActions.jsx`. */\nexport interface ToolbarActionsProps {\n locked: boolean;\n onToggleLock: () => void;\n onDelete: () => void;\n}\n\nexport const ToolbarActions = ({\n locked,\n onToggleLock,\n onDelete,\n}: ToolbarActionsProps): ReactElement => (\n <>\n <span className=\"divider\" />\n <Tooltip title={locked ? \"Unlock\" : \"Lock\"}>\n <StyledToolbarButton\n className={locked ? \"icon-only active\" : \"icon-only\"}\n aria-pressed={locked}\n onClick={onToggleLock}\n >\n <LockIcon className=\"i16\" />\n </StyledToolbarButton>\n </Tooltip>\n <Tooltip title=\"Delete\">\n <StyledToolbarButton className=\"icon-only\" onClick={onDelete}>\n <TrashIcon className=\"i16\" />\n </StyledToolbarButton>\n </Tooltip>\n </>\n);\n\n/* ShapeTypeMenu — collapsed shape-type picker: one icon button showing the\n current shape, opening a dropdown of the four types. Modeled on the app's\n ShapeTypeMenu (DS Menu + List). */\nexport interface ToolbarShapeTypeMenuProps {\n value: ShapeType;\n onChange: (type: ShapeType) => void;\n}\n\nexport const ShapeTypeMenu = ({\n value,\n onChange,\n}: ToolbarShapeTypeMenuProps): ReactElement => {\n const [open, setOpen] = useState(false);\n\n return (\n <Menu\n open={open}\n onOpen={() => setOpen(true)}\n onClose={() => setOpen(false)}\n position=\"bottom-start\"\n target={\n <IconButton\n type=\"button\"\n variant=\"text gray\"\n active={open}\n aria-label=\"Shape\"\n >\n {SHAPE_TYPE_ICON[value]}\n </IconButton>\n }\n >\n <List style={{ padding: \"8px 0\" }} tabIndex={-1}>\n {SHAPE_TYPE_OPTIONS.map((option) => (\n <ListItem\n key={option.type}\n aria-label={option.label}\n onClick={() => {\n onChange(option.type);\n setOpen(false);\n }}\n >\n {SHAPE_TYPE_ICON[option.type]}\n {option.label}\n </ListItem>\n ))}\n </List>\n </Menu>\n );\n};\n\n/* AlignmentMenu — collapsed alignment picker (single button + dropdown), the\n compact-toolbar counterpart to the Inspector's expanded four-button row.\n Mirrors the app's AlignmentMenu. */\nexport interface ToolbarAlignmentMenuProps {\n value: TextAlign;\n onChange: (align: TextAlign) => void;\n disabled?: boolean;\n}\n\nexport const AlignmentMenu = ({\n value,\n onChange,\n disabled,\n}: ToolbarAlignmentMenuProps): ReactElement => {\n const [open, setOpen] = useState(false);\n const selected =\n ALIGN_OPTIONS.find((option) => option.value === value) ?? ALIGN_OPTIONS[0];\n\n return (\n <Menu\n open={open}\n onOpen={() => setOpen(true)}\n onClose={() => setOpen(false)}\n position=\"bottom-start\"\n target={\n <IconButton\n type=\"button\"\n variant=\"text gray\"\n active={open}\n disabled={disabled}\n aria-label=\"Alignment\"\n >\n {selected.icon}\n </IconButton>\n }\n >\n <List style={{ padding: \"8px 0\" }} tabIndex={-1}>\n {ALIGN_OPTIONS.map((option) => (\n <ListItem\n key={option.value}\n aria-label={option.label}\n onClick={() => {\n onChange(option.value);\n setOpen(false);\n }}\n >\n {option.icon}\n {option.label}\n </ListItem>\n ))}\n </List>\n </Menu>\n );\n};\n\n/* Compact swatch-only colour trigger: a single dot (or a CircleSlash chip when\n transparent) that opens a swatch popover. The Inspector's ColorPickerField\n keeps the swatch + name; the floating toolbars use this swatch-only variant.\n `includeTransparent` is passed through to the swatch row — shape fill opts\n in, sticky fill and text colour do not. */\nexport interface ToolbarColorSwatchProps {\n value: string;\n includeTransparent?: boolean;\n label: string;\n onChange: (color: string) => void;\n}\n\nexport const ToolbarColorSwatch = ({\n value,\n includeTransparent,\n label,\n onChange,\n}: ToolbarColorSwatchProps): ReactElement => {\n const [open, setOpen] = useState(false);\n const [wheelOpen, setWheelOpen] = useState(false);\n const isTransparent = value === \"transparent\";\n\n return (\n <span className=\"tb-rel\">\n <Tooltip title={label}>\n <StyledToolbarButton\n className={open ? \"icon-only active\" : \"icon-only\"}\n aria-label={label}\n onClick={() => {\n setOpen((current) => !current);\n setWheelOpen(false);\n }}\n >\n {isTransparent ? (\n <CircleSlashIcon width={16} height={16} fill=\"currentColor\" />\n ) : (\n <Dot color={value} size={16} />\n )}\n </StyledToolbarButton>\n </Tooltip>\n {open ? (\n <StyledColorPopover className=\"below\">\n <ColorSwatchRow\n selectedColor={value}\n includeTransparent={includeTransparent}\n onSelect={(color) => {\n onChange(color);\n setOpen(false);\n }}\n onAddClick={() => setWheelOpen((current) => !current)}\n />\n {wheelOpen ? (\n <StyledColorPopover className=\"beside\">\n <ColorWheel\n onColorChange={(color) => {\n onChange(color);\n setOpen(false);\n }}\n />\n </StyledColorPopover>\n ) : null}\n </StyledColorPopover>\n ) : null}\n </span>\n );\n};\n\n/* The text controls shared by the shape and sticky toolbars: font-size stepper,\n B / I / U / S, and the collapsed alignment menu. Same set the app's sticky\n and shape toolbars share (font-size picker, TextStyleButtons, AlignmentMenu).\n Kept generic so both element shapes can drive it. */\nexport interface ToolbarTextControlsProps {\n fontSize: number;\n styleFlags: {\n bold: boolean;\n italic: boolean;\n underline: boolean;\n strikethrough: boolean;\n };\n align: TextAlign;\n onFontSize: (size: number) => void;\n onToggleStyle: (key: TextStyleKey) => void;\n onAlign: (align: TextAlign) => void;\n}\n\nexport const ToolbarTextControls = ({\n fontSize,\n styleFlags,\n align,\n onFontSize,\n onToggleStyle,\n onAlign,\n}: ToolbarTextControlsProps): ReactElement => (\n <>\n <Tooltip title=\"Decrease font size\">\n <StyledToolbarButton\n className=\"icon-only\"\n aria-label=\"Decrease font size\"\n onClick={() => onFontSize(Math.max(8, fontSize - 2))}\n >\n <MinusGlyph className=\"i16\" />\n </StyledToolbarButton>\n </Tooltip>\n <StyledFontSizeValue>{fontSize}</StyledFontSizeValue>\n <Tooltip title=\"Increase font size\">\n <StyledToolbarButton\n className=\"icon-only\"\n aria-label=\"Increase font size\"\n onClick={() => onFontSize(Math.min(96, fontSize + 2))}\n >\n <PlusGlyph className=\"i16\" />\n </StyledToolbarButton>\n </Tooltip>\n {STYLE_OPTIONS.map((option) => (\n <Tooltip key={option.key} title={option.label}>\n <StyledToolbarButton\n className={styleFlags[option.key] ? \"icon-only active\" : \"icon-only\"}\n aria-label={option.label}\n aria-pressed={styleFlags[option.key]}\n onClick={() => onToggleStyle(option.key)}\n >\n {option.icon}\n </StyledToolbarButton>\n </Tooltip>\n ))}\n <AlignmentMenu value={align} onChange={onAlign} />\n </>\n);\n\nexport interface ShapeFormattingToolbarProps {\n element: ShapeElementState;\n onUpdate: (partial: Partial<ShapeElementState>) => void;\n onDelete: () => void;\n locked: boolean;\n onToggleLock: () => void;\n}\n\n/* ShapeFormattingToolbar — flat layout (was submenu-based): shape-type menu →\n fill colour → the same text controls as the sticky toolbar → Lock / Delete.\n Stroke is no longer edited here — it lives only in the Inspector's Stroke\n group now. Mirrors the app's ShapeFormattingToolbar. */\nexport const ShapeFormattingToolbar = ({\n element,\n onUpdate,\n onDelete,\n locked,\n onToggleLock,\n}: ShapeFormattingToolbarProps): ReactElement => (\n <StyledFormattingToolbar onClick={stopClick} onMouseDown={stopClick}>\n <ShapeTypeMenu\n value={element.type}\n onChange={(type) => onUpdate({ type })}\n />\n <ToolbarColorSwatch\n value={element.fill}\n includeTransparent\n label=\"Fill color\"\n onChange={(fill) => onUpdate({ fill })}\n />\n <ToolbarTextControls\n fontSize={element.fontSize}\n styleFlags={element}\n align={element.align ?? \"left\"}\n onFontSize={(fontSize) => onUpdate({ fontSize })}\n onToggleStyle={(key) => onUpdate({ [key]: !element[key] })}\n onAlign={(align) => onUpdate({ align })}\n />\n <ToolbarActions\n locked={locked}\n onToggleLock={onToggleLock}\n onDelete={onDelete}\n />\n </StyledFormattingToolbar>\n);\n\nexport interface StickyTextStyle {\n fontSize: number;\n bold: boolean;\n italic: boolean;\n strikethrough: boolean;\n underline: boolean;\n align: TextAlign;\n textColor: string;\n color: string;\n fillOpacity: number;\n}\n\nexport interface PostitFormattingToolbarProps {\n value: StickyTextStyle;\n onChange: (next: StickyTextStyle) => void;\n onDelete: () => void;\n locked: boolean;\n onToggleLock: () => void;\n}\n\n/* PostitFormattingToolbar — flat layout: note (fill) colour → the shared text\n controls (font-size, B/I/U/S, alignment menu) → Lock / Delete. The note's\n colour is its whole point, so its fill swatch does NOT offer Transparent.\n Mirrors the app's PostitFormattingToolbar. */\nexport const PostitFormattingToolbar = ({\n value,\n onChange,\n onDelete,\n locked,\n onToggleLock,\n}: PostitFormattingToolbarProps): ReactElement => (\n <StyledFormattingToolbar onClick={stopClick} onMouseDown={stopClick}>\n <ToolbarColorSwatch\n value={value.color}\n label=\"Note color\"\n onChange={(color) => onChange({ ...value, color })}\n />\n <ToolbarTextControls\n fontSize={value.fontSize}\n styleFlags={value}\n align={value.align}\n onFontSize={(fontSize) => onChange({ ...value, fontSize })}\n onToggleStyle={(key) => onChange({ ...value, [key]: !value[key] })}\n onAlign={(align) => onChange({ ...value, align })}\n />\n <ToolbarActions\n locked={locked}\n onToggleLock={onToggleLock}\n onDelete={onDelete}\n />\n </StyledFormattingToolbar>\n);\n\n/* shape body per current (editable) type */\nexport const renderShapeBody = (\n def: CanvasElementDef,\n state: ShapeElementState,\n /* Effective size — the Inspector can override the element's default width /\n height, so the triangle polygon is drawn from the live size, not the def. */\n width: number = def.width,\n height: number = def.height\n): ReactElement =>\n state.type === \"triangle\" ? (\n /* TriangleElement: SVG polygon, apex top-center */\n <svg\n width=\"100%\"\n height=\"100%\"\n style={{ display: \"block\", overflow: \"visible\" }}\n >\n <polygon\n points={`${width / 2},0 ${width},${height} 0,${height}`}\n fill={withOpacity(state.fill, state.fillOpacity)}\n stroke={withOpacity(state.stroke, state.strokeOpacity)}\n strokeWidth={state.strokeWidth}\n strokeDasharray={state.strokeDash}\n />\n </svg>\n ) : (\n <div\n className=\"shape-fill\"\n style={{\n backgroundColor: withOpacity(state.fill, state.fillOpacity),\n border: shapeBorder(state),\n borderRadius: state.type === \"circle\" ? \"50%\" : state.borderRadius,\n }}\n />\n );\n\nexport const ALIGN_OPTIONS: {\n value: TextAlign;\n label: string;\n icon: ReactElement;\n}[] = [\n { value: \"left\", label: \"Align Left\", icon: <TextAlignLeftIcon /> },\n { value: \"center\", label: \"Align Center\", icon: <TextAlignCenterIcon /> },\n { value: \"right\", label: \"Align Right\", icon: <TextAlignRightIcon /> },\n { value: \"justify\", label: \"Justify\", icon: <TextAlignJustifyIcon /> },\n];\n\nexport type TextStyleKey = \"bold\" | \"italic\" | \"underline\" | \"strikethrough\";\n\nexport const STYLE_OPTIONS: {\n key: TextStyleKey;\n label: string;\n icon: ReactElement;\n}[] = [\n { key: \"bold\", label: \"Bold\", icon: <TextStyleBoldIcon /> },\n { key: \"italic\", label: \"Italic\", icon: <TextStyleItalicIcon /> },\n { key: \"underline\", label: \"Underline\", icon: <TextStyleUnderlineIcon /> },\n {\n key: \"strikethrough\",\n label: \"Strikethrough\",\n icon: <TextStyleStrikeIcon />,\n },\n];\n"],"mappings":";AAAA,OAAOA,KAAK,IAAkBC,QAAQ,QAAQ,OAAO;AAErD,OAAOC,MAAM,MAAM,mBAAmB;AAEtC,SAASC,UAAU,EAAEC,SAAS,EAAEC,WAAW,QAAQ,UAAU;AA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AAM;EAAErC,KAAK,EAAE,MAAM;EAAEsH,IAAI,eAAE3M,KAAA,CAAAqH,aAAA,CAACpG,iBAAiB,MAAE;AAAE,CAAC,EAC3D;EAAEyG,GAAG,EAAE,QAAQ;EAAErC,KAAK,EAAE,QAAQ;EAAEsH,IAAI,eAAE3M,KAAA,CAAAqH,aAAA,CAACnG,mBAAmB,MAAE;AAAE,CAAC,EACjE;EAAEwG,GAAG,EAAE,WAAW;EAAErC,KAAK,EAAE,WAAW;EAAEsH,IAAI,eAAE3M,KAAA,CAAAqH,aAAA,CAACjG,sBAAsB,MAAE;AAAE,CAAC,EAC1E;EACEsG,GAAG,EAAE,eAAe;EACpBrC,KAAK,EAAE,eAAe;EACtBsH,IAAI,eAAE3M,KAAA,CAAAqH,aAAA,CAAClG,mBAAmB,MAAE;AAC9B,CAAC,CACF","ignoreList":[]}
@@ -0,0 +1,113 @@
1
+ import React, { ReactElement } from "react";
2
+ import { CardResizeHandlers } from "./linkElement";
3
+ /**
4
+ * The file card is the second element built on `StackedCard`, and it mirrors the
5
+ * card in a project's Files tab (`Folders/GridView/Items/File.js`): a thumbnail
6
+ * over a strip with the name, then size · date.
7
+ *
8
+ * Its lifecycle is the app's real upload lifecycle, which is two phases and not
9
+ * one — the distinction the ring alone doesn't tell you:
10
+ *
11
+ * uploading XHR progress 0–100. `ProgressRing radius={22} stroke={4}` with
12
+ * the percentage, exactly as `Items/FileUpload.js` does it.
13
+ * preparing bytes are in, the server is generating the thumbnail. Progress
14
+ * is no longer knowable, so the ring gives way to the
15
+ * indeterminate `SpinnerLoader` at the same size — again as the
16
+ * real card does at `progress === 100`.
17
+ * ready the thumbnail exists; the card renders it.
18
+ * error the upload failed: retry, same as the app's `ArrowRefreshIcon`.
19
+ *
20
+ * Both phases reserve the same box as the finished cover, so a card never
21
+ * reflows as it climbs — the discipline the unfurl ladder established.
22
+ */
23
+ export declare const FILE_DEFAULT_WIDTH = 208;
24
+ export declare const MAX_UPLOAD_BYTES: number;
25
+ export declare const UPLOAD_TICK_MS = 110;
26
+ export declare const UPLOAD_STEP = 9;
27
+ export declare const PREPARING_MS = 1100;
28
+ /** What the mock keeps about a picked file. */
29
+ export interface PickedFile {
30
+ /** Name without the extension — truncates on its own. */
31
+ base: string;
32
+ /** Extension without the dot; never truncated, as in the real card. */
33
+ extension: string;
34
+ size: number;
35
+ mimeType: string;
36
+ /** An object URL, so an image really renders. Null for everything else. */
37
+ thumbnailUrl: string | null;
38
+ }
39
+ /** A file element on the board. Position lives in the shared positions map. */
40
+ export interface FileElementDef {
41
+ id: string;
42
+ width: number;
43
+ /** null while the card is an empty placeholder waiting for a file. */
44
+ file: PickedFile | null;
45
+ }
46
+ export declare const FILE_SIZE_UNITS: [string, number][];
47
+ export declare const formatFileSize: (value: number) => string;
48
+ export declare const describeFile: (file: File) => PickedFile;
49
+ export declare const revokeThumbnail: (file: PickedFile | null) => void;
50
+ /** The first actual file on a clipboard or a drop, or null if there is none. */
51
+ export declare const binaryFrom: (data: DataTransfer | null) => File | null;
52
+ export type UploadStatus = "uploading" | "preparing" | "ready" | "error";
53
+ export interface UploadController {
54
+ status: UploadStatus;
55
+ /** 0–100, as the app's XHR reports it. Only meaningful while uploading. */
56
+ progress: number;
57
+ retry: () => void;
58
+ }
59
+ /**
60
+ * Drives one file through the upload lifecycle. Stands in for
61
+ * `useFileHandler` + the XHR in `utils/upload.jsx`: ticks progress to 100,
62
+ * hands over to the thumbnail phase, then resolves.
63
+ */
64
+ export declare const useMockUpload: (file: PickedFile | null) => UploadController;
65
+ export declare const StyledFileCard: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<import("../..").IStackedCardProps & React.RefAttributes<HTMLDivElement>>, any, {}, never>;
66
+ export declare const StyledUploadCover: import("styled-components").StyledComponent<"div", any, {}, never>;
67
+ export declare const StyledFileFallback: import("styled-components").StyledComponent<"div", any, {}, never>;
68
+ export declare const StyledFileName: import("styled-components").StyledComponent<"div", any, {}, never>;
69
+ export declare const StyledDropOverlay: import("styled-components").StyledComponent<"div", any, {}, never>;
70
+ export declare const StyledHiddenFileInput: import("styled-components").StyledComponent<"input", any, {}, never>;
71
+ export declare const StyledPlaceholderBox: import("styled-components").StyledComponent<"div", any, {}, never>;
72
+ export declare const FilePlaceholder: (props: React.ButtonHTMLAttributes<HTMLButtonElement>) => ReactElement;
73
+ export interface FileToolbarProps {
74
+ status: UploadStatus | "placeholder";
75
+ onPick?: () => void;
76
+ onCancel?: () => void;
77
+ onRetry?: () => void;
78
+ onDelete: () => void;
79
+ }
80
+ export declare const FileFormattingToolbar: ({ status, onPick, onCancel, onRetry, onDelete, }: FileToolbarProps) => ReactElement;
81
+ export interface FileUploadCardProps {
82
+ element: FileElementDef;
83
+ selected: boolean;
84
+ resize: CardResizeHandlers;
85
+ onCancel: () => void;
86
+ onDelete: () => void;
87
+ }
88
+ /**
89
+ * A file element with a file attached: the card runs the upload lifecycle and
90
+ * then renders the finished preview.
91
+ */
92
+ export declare const FileUploadCard: ({ element, selected, resize, onCancel, onDelete, }: FileUploadCardProps) => ReactElement;
93
+ export declare const renderFileThumbnail: (file: PickedFile | null) => ReactElement;
94
+ export interface FileElementProps {
95
+ element: FileElementDef;
96
+ selected: boolean;
97
+ /** Open the file picker as soon as a freshly drawn placeholder lands. */
98
+ autoOpen: boolean;
99
+ onPickFile: (file: File) => void;
100
+ resize: CardResizeHandlers;
101
+ onCancel: () => void;
102
+ onDelete: () => void;
103
+ }
104
+ /**
105
+ * The two shapes of a file element: an empty placeholder that can be clicked or
106
+ * dropped onto, and the uploading/ready card.
107
+ *
108
+ * A box drawn with the File tool opens the picker immediately. Dismissing the
109
+ * picker fires no change, so the card simply stays a placeholder — which is what
110
+ * makes Esc a no-op by construction rather than by handling.
111
+ */
112
+ export declare const FileElement: ({ element, selected, autoOpen, onPickFile, resize, onCancel, onDelete, }: FileElementProps) => ReactElement;
113
+ //# sourceMappingURL=fileElement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fileElement.d.ts","sourceRo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