react-tiling-workspace 0.0.0-stage → 0.1.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.
Files changed (48) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +147 -2
  3. package/dist/components/LayoutPickerDialog-C-Sb3uOl.cjs +517 -0
  4. package/dist/components/LayoutPickerDialog-C-Sb3uOl.cjs.map +1 -0
  5. package/dist/components/LayoutPickerDialog-STglqYFI.mjs +500 -0
  6. package/dist/components/LayoutPickerDialog-STglqYFI.mjs.map +1 -0
  7. package/dist/components/icons-0kjsH_LJ.cjs +144 -0
  8. package/dist/components/icons-0kjsH_LJ.cjs.map +1 -0
  9. package/dist/components/icons-BgtEPXL8.mjs +97 -0
  10. package/dist/components/icons-BgtEPXL8.mjs.map +1 -0
  11. package/dist/components/layout-picker.cjs +5 -0
  12. package/dist/components/layout-picker.d.cts +22 -0
  13. package/dist/components/layout-picker.d.mts +22 -0
  14. package/dist/components/layout-picker.mjs +2 -0
  15. package/dist/components/mobile.cjs +575 -0
  16. package/dist/components/mobile.cjs.map +1 -0
  17. package/dist/components/mobile.d.cts +42 -0
  18. package/dist/components/mobile.d.mts +42 -0
  19. package/dist/components/mobile.mjs +574 -0
  20. package/dist/components/mobile.mjs.map +1 -0
  21. package/dist/components/topbar.cjs +94 -0
  22. package/dist/components/topbar.cjs.map +1 -0
  23. package/dist/components/topbar.d.cts +38 -0
  24. package/dist/components/topbar.d.mts +38 -0
  25. package/dist/components/topbar.mjs +93 -0
  26. package/dist/components/topbar.mjs.map +1 -0
  27. package/dist/components/types-DkwWFcD5.d.mts +32 -0
  28. package/dist/components/types-qsXC_48o.d.cts +32 -0
  29. package/dist/index.cjs +3336 -0
  30. package/dist/index.cjs.map +1 -0
  31. package/dist/index.d.cts +243 -0
  32. package/dist/index.d.mts +243 -0
  33. package/dist/index.mjs +3320 -0
  34. package/dist/index.mjs.map +1 -0
  35. package/dist/server/server.cjs +104 -0
  36. package/dist/server/server.cjs.map +1 -0
  37. package/dist/server/server.d.cts +71 -0
  38. package/dist/server/server.d.mts +71 -0
  39. package/dist/server/server.mjs +95 -0
  40. package/dist/server/server.mjs.map +1 -0
  41. package/dist/server/shortcuts.cjs +32 -0
  42. package/dist/server/shortcuts.cjs.map +1 -0
  43. package/dist/server/shortcuts.d.cts +6 -0
  44. package/dist/server/shortcuts.d.mts +6 -0
  45. package/dist/server/shortcuts.mjs +31 -0
  46. package/dist/server/shortcuts.mjs.map +1 -0
  47. package/dist/theme.css +119 -0
  48. package/package.json +113 -4
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LayoutPickerDialog-STglqYFI.mjs","names":[],"sources":["../../src/layout.ts","../../src/components/TooltipSlot.tsx","../../src/components/LayoutPickerDialog.tsx"],"sourcesContent":["import type {\n FoldState,\n WorkspaceLayoutNode,\n WorkspaceLayoutTemplate,\n} from \"./types\";\n\nexport const MAX_WORKSPACE_SPLIT_DEPTH = 4;\n\nexport const HORIZONTAL_FOLD_SNAP_PX = 96;\nexport const VERTICAL_FOLD_SNAP_PX = 76;\nexport const HORIZONTAL_FOLDED_RAIL_PX = 46;\nexport const VERTICAL_FOLDED_BAR_PX = 44;\nexport const HORIZONTAL_UNFOLD_THRESHOLD_PX = 128;\nexport const VERTICAL_UNFOLD_THRESHOLD_PX = 104;\nexport const HORIZONTAL_MIN_OPEN_PX = 120;\nexport const VERTICAL_MIN_OPEN_PX = 92;\nexport const HORIZONTAL_READING_OPEN_PX = 320;\nexport const VERTICAL_READING_OPEN_PX = 220;\nexport const FOLD_APPROACH_MARGIN_PX = 38;\n\nexport function computeReadingTargetPx(\n direction: \"horizontal\" | \"vertical\",\n openTotalPx: number,\n openCount: number,\n): number {\n const minOpenPx = direction === \"horizontal\" ? HORIZONTAL_MIN_OPEN_PX : VERTICAL_MIN_OPEN_PX;\n const preferredReadingPx =\n direction === \"horizontal\" ? HORIZONTAL_READING_OPEN_PX : VERTICAL_READING_OPEN_PX;\n const equalSharePx = Math.floor(openTotalPx / Math.max(1, openCount));\n return Math.max(minOpenPx + 24, Math.min(preferredReadingPx, equalSharePx));\n}\n\nexport function findPanelPath<Id extends string>(\n node: WorkspaceLayoutNode<Id> | null | undefined,\n id: Id,\n): number[] | null {\n if (!node) return null;\n if (node.type === \"panel\") return node.id === id ? [] : null;\n for (let i = 0; i < node.children.length; i += 1) {\n const subPath = findPanelPath(node.children[i], id);\n if (subPath !== null) return [i, ...subPath];\n }\n return null;\n}\n\nexport function getResponsiveCompactAxis(\n widthPx: number,\n heightPx: number,\n): \"horizontal\" | \"vertical\" | null {\n if (widthPx < HORIZONTAL_MIN_OPEN_PX) return \"horizontal\";\n if (heightPx < VERTICAL_MIN_OPEN_PX) return \"vertical\";\n return null;\n}\n\nexport function getPanelIds<Id extends string>(\n tree: WorkspaceLayoutNode<Id> | null | undefined,\n): Id[] {\n if (!tree) return [];\n if (tree.type === \"panel\") return [tree.id];\n return tree.children.flatMap((child) => getPanelIds(child));\n}\n\nexport function isNodeFolded<Id extends string>(\n node: WorkspaceLayoutNode<Id>,\n folds: Partial<Record<Id, FoldState>>,\n): boolean {\n if (node.type === \"panel\") {\n return (folds[node.id] ?? \"open\") === \"folded\";\n }\n return node.children.length > 0 && node.children.every((child) => isNodeFolded(child, folds));\n}\n\nexport function setNodeFoldState<Id extends string>(\n node: WorkspaceLayoutNode<Id>,\n folds: Partial<Record<Id, FoldState>>,\n state: FoldState,\n): Partial<Record<Id, FoldState>> {\n const ids = getPanelIds(node);\n if (ids.length === 0) return folds;\n let changed = false;\n for (const id of ids) {\n if ((folds[id] ?? \"open\") !== state) {\n changed = true;\n break;\n }\n }\n if (!changed) return folds;\n const next: Partial<Record<Id, FoldState>> = { ...folds };\n for (const id of ids) {\n next[id] = state;\n }\n return next;\n}\n\nexport function normalizeLayoutTree<Id extends string>(\n node: WorkspaceLayoutNode<Id>,\n): WorkspaceLayoutNode<Id> {\n if (node.type === \"panel\") return node;\n\n const rawSizes = node.children.map((_, index) => node.sizes?.[index] ?? 1);\n const nextChildren: WorkspaceLayoutNode<Id>[] = [];\n const nextSizes: number[] = [];\n let hasExplicitSizes = Boolean(node.sizes);\n\n for (let i = 0; i < node.children.length; i += 1) {\n const normalizedChild = normalizeLayoutTree(node.children[i]);\n const weight = rawSizes[i];\n\n if (normalizedChild.type === \"split\" && normalizedChild.direction === node.direction) {\n const childSizes = normalizedChild.children.map(\n (_, childIdx) => normalizedChild.sizes?.[childIdx] ?? 1,\n );\n const childTotal = childSizes.reduce((acc, value) => acc + value, 0) || 1;\n for (let j = 0; j < normalizedChild.children.length; j += 1) {\n nextChildren.push(normalizedChild.children[j]);\n nextSizes.push(weight * (childSizes[j] / childTotal));\n }\n if (normalizedChild.sizes) hasExplicitSizes = true;\n } else {\n nextChildren.push(normalizedChild);\n nextSizes.push(weight);\n }\n }\n\n if (nextChildren.length === 1) return nextChildren[0];\n return hasExplicitSizes\n ? { type: \"split\", direction: node.direction, children: nextChildren, sizes: nextSizes }\n : { type: \"split\", direction: node.direction, children: nextChildren };\n}\n\nexport function validateLayoutTree<Id extends string>(\n value: unknown,\n knownIds: ReadonlySet<Id>,\n): value is WorkspaceLayoutNode<Id> {\n const seen = new Set<Id>();\n function visit(node: unknown, splitDepthCount: number): boolean {\n if (!node || typeof node !== \"object\") return false;\n const candidate = node as Record<string, unknown>;\n if (candidate.type === \"panel\") {\n if (typeof candidate.id !== \"string\" || !knownIds.has(candidate.id as Id)) return false;\n const id = candidate.id as Id;\n if (seen.has(id)) return false;\n seen.add(id);\n return true;\n }\n if (\n candidate.type !== \"split\" ||\n (candidate.direction !== \"horizontal\" && candidate.direction !== \"vertical\") ||\n !Array.isArray(candidate.children) ||\n candidate.children.length < 2 ||\n splitDepthCount >= MAX_WORKSPACE_SPLIT_DEPTH\n ) {\n return false;\n }\n if (\n candidate.sizes !== undefined &&\n (!Array.isArray(candidate.sizes) ||\n candidate.sizes.length !== candidate.children.length ||\n candidate.sizes.some(\n (size) => typeof size !== \"number\" || !Number.isFinite(size) || size <= 0,\n ))\n ) {\n return false;\n }\n return candidate.children.every((child) => visit(child, splitDepthCount + 1));\n }\n return visit(value, 0);\n}\n\nexport function createHorizontalTree<Id extends string>(\n ids: Id[],\n): WorkspaceLayoutNode<Id> | null {\n if (ids.length === 0) return null;\n const children = ids.map((id) => ({ type: \"panel\" as const, id }));\n return children.length === 1\n ? children[0]\n : { type: \"split\", direction: \"horizontal\", children };\n}\n\nexport function instantiateLayoutTemplate<Id extends string>(\n template: WorkspaceLayoutTemplate,\n ids: Id[],\n): WorkspaceLayoutNode<Id> | null {\n if (template.type === \"panel\") {\n const id = ids[template.index];\n return id === undefined ? null : { type: \"panel\", id };\n }\n const children = template.children\n .map((child) => instantiateLayoutTemplate(child, ids))\n .filter((child): child is WorkspaceLayoutNode<Id> => child !== null);\n if (children.length === 0) return null;\n if (children.length === 1) return children[0];\n return normalizeLayoutTree({ type: \"split\", direction: template.direction, children });\n}\n\nexport function layoutTemplateSignature(template: WorkspaceLayoutTemplate): string {\n if (template.type === \"panel\") return \"p\";\n return `${template.direction === \"horizontal\" ? \"h\" : \"v\"}(${template.children\n .map(layoutTemplateSignature)\n .join(\",\")})`;\n}\n\nexport function layoutTreeSignature<Id extends string>(\n tree: WorkspaceLayoutNode<Id>,\n): string {\n if (tree.type === \"panel\") return \"p\";\n return `${tree.direction === \"horizontal\" ? \"h\" : \"v\"}(${tree.children\n .map(layoutTreeSignature)\n .join(\",\")})`;\n}\n\nexport function removePanel<Id extends string>(\n node: WorkspaceLayoutNode<Id>,\n id: Id,\n): WorkspaceLayoutNode<Id> | null {\n if (node.type === \"panel\") return node.id === id ? null : node;\n const nextChildren: WorkspaceLayoutNode<Id>[] = [];\n const nextSizes: number[] = [];\n for (let i = 0; i < node.children.length; i += 1) {\n const child = removePanel(node.children[i], id);\n if (child !== null) {\n nextChildren.push(child);\n nextSizes.push(node.sizes?.[i] ?? 1);\n }\n }\n if (nextChildren.length === 0) return null;\n if (nextChildren.length === 1) return nextChildren[0];\n return normalizeLayoutTree({\n ...node,\n children: nextChildren,\n sizes: node.sizes ? nextSizes : undefined,\n });\n}\n\nexport function insertAtPanel<Id extends string>(\n node: WorkspaceLayoutNode<Id>,\n targetId: Id,\n inserted: WorkspaceLayoutNode<Id>,\n): WorkspaceLayoutNode<Id> {\n if (node.type === \"panel\") {\n return node.id === targetId ? inserted : node;\n }\n return normalizeLayoutTree({\n ...node,\n children: node.children.map((child) => insertAtPanel(child, targetId, inserted)),\n sizes: node.sizes,\n });\n}\n\nexport function insertBesidePanel<Id extends string>(\n node: WorkspaceLayoutNode<Id>,\n targetId: Id,\n sourceId: Id,\n position: \"left\" | \"right\" | \"top\" | \"bottom\",\n): WorkspaceLayoutNode<Id> {\n if (node.type === \"panel\") {\n if (node.id !== targetId) return node;\n const source: WorkspaceLayoutNode<Id> = { type: \"panel\", id: sourceId };\n const horizontal = position === \"left\" || position === \"right\";\n const children =\n position === \"left\" || position === \"top\" ? [source, node] : [node, source];\n return {\n type: \"split\",\n direction: horizontal ? \"horizontal\" : \"vertical\",\n children,\n };\n }\n return normalizeLayoutTree({\n ...node,\n children: node.children.map((child) =>\n insertBesidePanel(child, targetId, sourceId, position),\n ),\n sizes: node.sizes,\n });\n}\n\nexport function movePanelInTree<Id extends string>(\n tree: WorkspaceLayoutNode<Id> | null | undefined,\n sourceId: Id,\n targetId: Id,\n position: \"left\" | \"right\" | \"top\" | \"bottom\",\n knownIds: ReadonlySet<Id>,\n): WorkspaceLayoutNode<Id> | null {\n if (!tree || sourceId === targetId) return null;\n const stripped = removePanel(tree, sourceId);\n if (!stripped) {\n return { type: \"panel\", id: sourceId };\n }\n const candidate = insertBesidePanel(stripped, targetId, sourceId, position);\n if (splitDepth(candidate) > MAX_WORKSPACE_SPLIT_DEPTH || !validateLayoutTree(candidate, knownIds)) {\n return null;\n }\n return candidate;\n}\n\nexport function getSplitAtPath<Id extends string>(\n node: WorkspaceLayoutNode<Id>,\n path: number[],\n): WorkspaceLayoutNode<Id> | null {\n let current = node;\n for (const index of path) {\n if (current.type !== \"split\" || !current.children[index]) return null;\n current = current.children[index];\n }\n return current;\n}\n\nexport function resizeSplitAtPath<Id extends string>(\n node: WorkspaceLayoutNode<Id>,\n path: number[],\n index: number,\n firstSize: number,\n secondSize: number,\n): WorkspaceLayoutNode<Id> {\n if (path.length === 0) {\n if (node.type !== \"split\") return node;\n const sizes = node.children.map((_, childIndex) => node.sizes?.[childIndex] ?? 1);\n if (index < 0 || index + 1 >= sizes.length) return node;\n const pairTotal = sizes[index] + sizes[index + 1];\n const measuredTotal = Math.max(1, firstSize + secondSize);\n sizes[index] = Math.max(0.05, pairTotal * (firstSize / measuredTotal));\n sizes[index + 1] = Math.max(0.05, pairTotal * (secondSize / measuredTotal));\n return { ...node, sizes };\n }\n if (node.type !== \"split\") return node;\n const [head, ...tail] = path;\n return {\n ...node,\n children: node.children.map((child, childIndex) =>\n childIndex === head\n ? resizeSplitAtPath(child, tail, index, firstSize, secondSize)\n : child,\n ),\n };\n}\n\nexport function setSplitChildWeightsAtPath<Id extends string>(\n node: WorkspaceLayoutNode<Id>,\n path: number[],\n weights: readonly number[],\n): WorkspaceLayoutNode<Id> {\n if (path.length === 0) {\n if (node.type !== \"split\" || weights.length !== node.children.length) return node;\n return { ...node, sizes: weights.map((weight) => Math.max(0.05, weight)) };\n }\n if (node.type !== \"split\") return node;\n const [head, ...tail] = path;\n return {\n ...node,\n children: node.children.map((child, childIndex) =>\n childIndex === head ? setSplitChildWeightsAtPath(child, tail, weights) : child,\n ),\n };\n}\n\nexport function growSplitChildWeightsToMinimum(\n weights: readonly number[],\n sizesPx: readonly number[],\n foldedChildren: readonly boolean[],\n targetIndex: number,\n minimumTargetPx: number,\n minimumDonorPx = minimumTargetPx,\n): number[] | null {\n if (\n weights.length !== sizesPx.length ||\n sizesPx.length !== foldedChildren.length ||\n targetIndex < 0 ||\n targetIndex >= sizesPx.length ||\n foldedChildren[targetIndex]\n ) {\n return null;\n }\n\n const neededPx = minimumTargetPx - sizesPx[targetIndex];\n if (neededPx <= 0) return null;\n\n const desiredSizes = [...sizesPx];\n const donors = sizesPx\n .map((size, index) => ({\n index,\n spare: !foldedChildren[index] && index !== targetIndex\n ? Math.max(0, size - minimumDonorPx)\n : 0,\n }))\n .filter((donor) => donor.spare > 0)\n .sort((a, b) => b.spare - a.spare);\n\n let remainingPx = neededPx;\n for (const donor of donors) {\n const contribution = Math.min(remainingPx, donor.spare);\n desiredSizes[donor.index] -= contribution;\n remainingPx -= contribution;\n if (remainingPx <= 0) break;\n }\n\n const transferredPx = neededPx - remainingPx;\n if (transferredPx <= 0) return null;\n desiredSizes[targetIndex] += transferredPx;\n\n const openWeightTotal = weights.reduce(\n (total, weight, index) => total + (foldedChildren[index] ? 0 : weight),\n 0,\n );\n const openSizeTotal = sizesPx.reduce(\n (total, size, index) => total + (foldedChildren[index] ? 0 : size),\n 0,\n );\n if (openWeightTotal <= 0 || openSizeTotal <= 0) return null;\n\n const weightPerPixel = openWeightTotal / openSizeTotal;\n return weights.map((weight, index) =>\n foldedChildren[index] ? weight : desiredSizes[index] * weightPerPixel,\n );\n}\n\nexport function growChildWeightsWithFallback(\n weights: readonly number[],\n sizesPx: readonly number[],\n foldedChildren: readonly boolean[],\n targetIndex: number,\n desiredTargetPx: number,\n preferredDonorFloorPx: number,\n fallbackDonorFloorPx: number,\n): number[] | null {\n return (\n growSplitChildWeightsToMinimum(\n weights,\n sizesPx,\n foldedChildren,\n targetIndex,\n desiredTargetPx,\n preferredDonorFloorPx,\n ) ??\n growSplitChildWeightsToMinimum(\n weights,\n sizesPx,\n foldedChildren,\n targetIndex,\n desiredTargetPx,\n fallbackDonorFloorPx,\n )\n );\n}\n\nexport function equalizeSplitAtPath<Id extends string>(\n node: WorkspaceLayoutNode<Id>,\n path: number[],\n index: number,\n): WorkspaceLayoutNode<Id> {\n if (path.length === 0) {\n if (node.type !== \"split\") return node;\n const sizes = node.children.map((_, childIndex) => node.sizes?.[childIndex] ?? 1);\n if (index < 0 || index + 1 >= sizes.length) return node;\n const avg = (sizes[index] + sizes[index + 1]) / 2;\n sizes[index] = avg;\n sizes[index + 1] = avg;\n return { ...node, sizes };\n }\n if (node.type !== \"split\") return node;\n const [head, ...tail] = path;\n return {\n ...node,\n children: node.children.map((child, childIndex) =>\n childIndex === head ? equalizeSplitAtPath(child, tail, index) : child,\n ),\n };\n}\n\nexport function setSplitPairWeightsAtPath<Id extends string>(\n node: WorkspaceLayoutNode<Id>,\n path: number[],\n index: number,\n firstWeight: number,\n secondWeight: number,\n): WorkspaceLayoutNode<Id> {\n if (path.length === 0) {\n if (node.type !== \"split\") return node;\n const sizes = node.children.map((_, childIndex) => node.sizes?.[childIndex] ?? 1);\n if (index < 0 || index + 1 >= sizes.length) return node;\n sizes[index] = Math.max(0.15, firstWeight);\n sizes[index + 1] = Math.max(0.15, secondWeight);\n return { ...node, sizes };\n }\n if (node.type !== \"split\") return node;\n const [head, ...tail] = path;\n return {\n ...node,\n children: node.children.map((child, childIndex) =>\n childIndex === head\n ? setSplitPairWeightsAtPath(child, tail, index, firstWeight, secondWeight)\n : child,\n ),\n };\n}\n\nexport type ComputeResizeStepParams<Id extends string> = {\n tree: WorkspaceLayoutNode<Id>;\n folds: Partial<Record<Id, FoldState>>;\n path: number[];\n index: number;\n direction: \"horizontal\" | \"vertical\";\n startFirstPx: number;\n startSecondPx: number;\n deltaPx: number;\n};\n\nexport type ComputeResizeStepResult<Id extends string> = {\n tree: WorkspaceLayoutNode<Id>;\n folds: Partial<Record<Id, FoldState>>;\n nearFoldSide: \"first\" | \"second\" | null;\n snappedSide: \"first\" | \"second\" | null;\n};\n\n/**\n * Computes the next split tree and fold map for a single divider drag frame.\n * Supports recursive subtrees (folding all panels inside a nested column/row),\n * hysteresis when dragging a folded panel back open, and preserves the fold-point\n * proportions so unaffected siblings do not jump when a panel folds.\n */\nexport function computeResizeStep<Id extends string>({\n tree,\n folds,\n path,\n index,\n direction,\n startFirstPx,\n startSecondPx,\n deltaPx,\n}: ComputeResizeStepParams<Id>): ComputeResizeStepResult<Id> {\n const split = getSplitAtPath(tree, path);\n if (!split || split.type !== \"split\") {\n return { tree, folds, nearFoldSide: null, snappedSide: null };\n }\n const first = split.children[index];\n const second = split.children[index + 1];\n if (!first || !second) {\n return { tree, folds, nearFoldSide: null, snappedSide: null };\n }\n\n const snapThreshold =\n direction === \"horizontal\" ? HORIZONTAL_FOLD_SNAP_PX : VERTICAL_FOLD_SNAP_PX;\n const unfoldThreshold =\n direction === \"horizontal\" ? HORIZONTAL_UNFOLD_THRESHOLD_PX : VERTICAL_UNFOLD_THRESHOLD_PX;\n const minOpenPx = direction === \"horizontal\" ? HORIZONTAL_MIN_OPEN_PX : VERTICAL_MIN_OPEN_PX;\n\n const totalPx = Math.max(1, startFirstPx + startSecondPx);\n const rawFirstPx = startFirstPx + deltaPx;\n const rawSecondPx = totalPx - rawFirstPx;\n\n const firstFolded = isNodeFolded(first, folds);\n const secondFolded = isNodeFolded(second, folds);\n const pairFirstWeight = split.sizes?.[index] ?? 1;\n const pairSecondWeight = split.sizes?.[index + 1] ?? 1;\n const pairTotalWeight = pairFirstWeight + pairSecondWeight;\n const foldedSizePx =\n direction === \"horizontal\" ? HORIZONTAL_FOLDED_RAIL_PX : VERTICAL_FOLDED_BAR_PX;\n\n const foldChild = (side: \"first\" | \"second\"): ComputeResizeStepResult<Id> => {\n const foldedChild = side === \"first\" ? first : second;\n const nextFolds = setNodeFoldState(foldedChild, folds, \"folded\");\n const safeFirstPx = Math.max(0, Math.min(totalPx, rawFirstPx));\n const safeSecondPx = totalPx - safeFirstPx;\n const foldedWeight =\n pairTotalWeight * ((side === \"first\" ? safeFirstPx : safeSecondPx) / totalPx);\n const expandedNeighborWeight = pairTotalWeight * ((totalPx - foldedSizePx) / totalPx);\n\n return {\n tree: setSplitPairWeightsAtPath(\n tree,\n path,\n index,\n side === \"first\" ? foldedWeight : expandedNeighborWeight,\n side === \"second\" ? foldedWeight : expandedNeighborWeight,\n ),\n folds: nextFolds,\n nearFoldSide: null,\n snappedSide: side,\n };\n };\n\n // Check both sides before snapping either one: both siblings may be folded.\n const unfoldChild = (side: \"first\" | \"second\"): ComputeResizeStepResult<Id> => {\n const targetChild = side === \"first\" ? first : second;\n const nextFolds = setNodeFoldState(targetChild, folds, \"open\");\n if (firstFolded && secondFolded && pairTotalWeight < 1) {\n // Both siblings were previously snap-folded to tiny weights; give the newly\n // unfolded child a full unit weight while keeping the still-folded sibling small.\n const unfoldedWeight = Math.max(1, pairTotalWeight);\n const stillFoldedWeight = side === \"first\" ? pairSecondWeight : pairFirstWeight;\n return {\n tree: setSplitPairWeightsAtPath(\n tree,\n path,\n index,\n side === \"first\" ? unfoldedWeight : stillFoldedWeight,\n side === \"second\" ? unfoldedWeight : stillFoldedWeight,\n ),\n folds: nextFolds,\n nearFoldSide: null,\n snappedSide: null,\n };\n }\n const openTarget = Math.max(minOpenPx, side === \"first\" ? rawFirstPx : rawSecondPx);\n const openSibling = Math.max(minOpenPx, totalPx - openTarget);\n return {\n tree: resizeSplitAtPath(\n tree,\n path,\n index,\n side === \"first\" ? openTarget : openSibling,\n side === \"second\" ? openTarget : openSibling,\n ),\n folds: nextFolds,\n nearFoldSide: null,\n snappedSide: null,\n };\n };\n\n if (firstFolded && rawFirstPx >= unfoldThreshold) {\n return unfoldChild(\"first\");\n }\n\n if (secondFolded && rawSecondPx >= unfoldThreshold) {\n return unfoldChild(\"second\");\n }\n\n if (firstFolded) {\n return { tree, folds, nearFoldSide: null, snappedSide: \"first\" };\n }\n if (secondFolded) {\n return { tree, folds, nearFoldSide: null, snappedSide: \"second\" };\n }\n\n // Both children are open: check snap-fold thresholds (works for leaf panels AND nested splits!)\n if (rawFirstPx <= snapThreshold && totalPx > snapThreshold * 1.6) {\n return foldChild(\"first\");\n }\n\n if (rawSecondPx <= snapThreshold && totalPx > snapThreshold * 1.6) {\n return foldChild(\"second\");\n }\n\n // Normal live resize while open. When totalPx is too narrow for both children to\n // stay above snapThreshold + 4, scale the minimum clamp so resizing doesn't lock at 50/50.\n const minClampPx = Math.min(snapThreshold + 4, Math.max(1, Math.floor(totalPx * 0.25)));\n const clampedFirst = Math.max(minClampPx, Math.min(totalPx - minClampPx, rawFirstPx));\n const clampedSecond = Math.max(minClampPx, totalPx - clampedFirst);\n\n let nearFoldSide: \"first\" | \"second\" | null = null;\n if (totalPx > snapThreshold * 1.6) {\n if (rawFirstPx <= snapThreshold + FOLD_APPROACH_MARGIN_PX) {\n nearFoldSide = \"first\";\n } else if (rawSecondPx <= snapThreshold + FOLD_APPROACH_MARGIN_PX) {\n nearFoldSide = \"second\";\n }\n }\n\n return {\n tree: resizeSplitAtPath(tree, path, index, clampedFirst, clampedSecond),\n folds,\n nearFoldSide,\n snappedSide: null,\n };\n}\n\nexport function computeKeyboardResizeStep<Id extends string>({\n tree,\n folds,\n path,\n index,\n deltaRatio,\n}: {\n tree: WorkspaceLayoutNode<Id>;\n folds: Partial<Record<Id, FoldState>>;\n path: number[];\n index: number;\n deltaRatio: number;\n}): { tree: WorkspaceLayoutNode<Id>; folds: Partial<Record<Id, FoldState>> } {\n const split = getSplitAtPath(tree, path);\n if (!split || split.type !== \"split\") return { tree, folds };\n const first = split.children[index];\n const second = split.children[index + 1];\n if (!first || !second) return { tree, folds };\n\n const firstFolded = isNodeFolded(first, folds);\n const secondFolded = isNodeFolded(second, folds);\n const sizes = split.children.map((_, i) => split.sizes?.[i] ?? 1);\n const firstWeight = sizes[index] ?? 1;\n const secondWeight = sizes[index + 1] ?? 1;\n const total = firstWeight + secondWeight;\n\n if (firstFolded) {\n if (deltaRatio <= 0) return { tree, folds };\n const nextFolds = setNodeFoldState(first, folds, \"open\");\n const nextFirst = Math.max(total * 0.25, firstWeight);\n const nextSecond = Math.max(0.15, secondFolded ? secondWeight : total - nextFirst);\n return {\n tree: setSplitPairWeightsAtPath(tree, path, index, nextFirst, nextSecond),\n folds: nextFolds,\n };\n }\n\n if (secondFolded) {\n if (deltaRatio >= 0) return { tree, folds };\n const nextFolds = setNodeFoldState(second, folds, \"open\");\n const nextSecond = Math.max(total * 0.25, secondWeight);\n const nextFirst = Math.max(0.15, total - nextSecond);\n return {\n tree: setSplitPairWeightsAtPath(tree, path, index, nextFirst, nextSecond),\n folds: nextFolds,\n };\n }\n\n const nextFirst = Math.max(total * 0.15, Math.min(total * 0.85, firstWeight + total * deltaRatio));\n const nextSecond = total - nextFirst;\n return {\n tree: resizeSplitAtPath(tree, path, index, nextFirst, nextSecond),\n folds,\n };\n}\n\nexport function splitDepth<Id extends string>(node: WorkspaceLayoutNode<Id>): number {\n if (node.type === \"panel\") return 0;\n return 1 + Math.max(...node.children.map(splitDepth));\n}\n","import type { ReactNode } from \"react\";\nimport type { RenderTooltip } from \"../types\";\n\ntype TooltipSlotProps = {\n renderTooltip?: RenderTooltip;\n label: string;\n shortcut?: string[];\n side?: \"top\" | \"bottom\" | \"left\" | \"right\";\n children: ReactNode;\n};\n\nexport function TooltipSlot({\n renderTooltip,\n label,\n shortcut,\n side = \"bottom\",\n children,\n}: TooltipSlotProps) {\n if (!renderTooltip) return <>{children}</>;\n return <>{renderTooltip({ label, shortcut, side, children })}</>;\n}\n","import { useEffect, useState, type ReactNode } from \"react\";\nimport type { LayoutPreset, RenderTooltip, WorkspaceLayoutTemplate } from \"../types\";\nimport { layoutTemplateSignature } from \"../layout\";\nimport { BookmarkIcon, CheckIcon, CloseIcon, LayoutIcon } from \"./icons\";\nimport { TooltipSlot } from \"./TooltipSlot\";\n\nfunction columnsTemplate(columns: number[]): WorkspaceLayoutTemplate {\n let index = 0;\n const columnNodes = columns.map((rowCount) => {\n const panels = Array.from({ length: rowCount }, () => ({ type: \"panel\" as const, index: index++ }));\n return panels.length === 1\n ? panels[0]\n : { type: \"split\" as const, direction: \"vertical\" as const, children: panels };\n });\n return columnNodes.length === 1\n ? columnNodes[0]\n : { type: \"split\", direction: \"horizontal\", children: columnNodes };\n}\n\nfunction rowsTemplate(rows: number[]): WorkspaceLayoutTemplate {\n let index = 0;\n const rowNodes = rows.map((colCount) => {\n const panels = Array.from({ length: colCount }, () => ({ type: \"panel\" as const, index: index++ }));\n return panels.length === 1\n ? panels[0]\n : { type: \"split\" as const, direction: \"horizontal\" as const, children: panels };\n });\n return rowNodes.length === 1\n ? rowNodes[0]\n : { type: \"split\", direction: \"vertical\", children: rowNodes };\n}\n\nexport const DEFAULT_LAYOUT_PRESETS: Record<number, LayoutPreset[]> = {\n 1: [{ id: \"1-single\", label: \"Single Focus\", layout: columnsTemplate([1]) }],\n 2: [\n { id: \"2-cols\", label: \"Split Columns\", layout: columnsTemplate([1, 1]) },\n { id: \"2-rows\", label: \"Stacked Rows\", layout: columnsTemplate([2]) },\n ],\n 3: [\n { id: \"3-cols\", label: \"Three Columns\", layout: columnsTemplate([1, 1, 1]) },\n { id: \"3-1-2\", label: \"Focus + Two Stacked\", layout: columnsTemplate([1, 2]) },\n { id: \"3-2-1\", label: \"Two Stacked + Focus\", layout: columnsTemplate([2, 1]) },\n { id: \"3-top-2\", label: \"Hero + Two Below\", layout: rowsTemplate([1, 2]) },\n { id: \"3-2-bottom\", label: \"Two Above + Wide\", layout: rowsTemplate([2, 1]) },\n { id: \"3-rows\", label: \"Three Stacked\", layout: columnsTemplate([3]) },\n ],\n 4: [\n { id: \"4-studio\", label: \"Studio Trio\", layout: columnsTemplate([1, 2, 1]) },\n { id: \"4-grid\", label: \"2 × 2 Grid\", layout: columnsTemplate([2, 2]) },\n { id: \"4-1-1-2\", label: \"Two Cols + Stacked\", layout: columnsTemplate([1, 1, 2]) },\n { id: \"4-top-3\", label: \"Top Banner + Three\", layout: rowsTemplate([1, 3]) },\n { id: \"4-1-3\", label: \"Focus + Three Rail\", layout: columnsTemplate([1, 3]) },\n { id: \"4-cols\", label: \"Four Columns\", layout: columnsTemplate([1, 1, 1, 1]) },\n ],\n 5: [\n { id: \"5-1-2-2\", label: \"Focus + 2 × 2\", layout: columnsTemplate([1, 2, 2]) },\n { id: \"5-2-1-2\", label: \"Command Center\", layout: columnsTemplate([2, 1, 2]) },\n { id: \"5-2-2-1\", label: \"2 × 2 + Focus\", layout: columnsTemplate([2, 2, 1]) },\n { id: \"5-top-2-2\", label: \"Header + 2 × 2\", layout: rowsTemplate([1, 2, 2]) },\n { id: \"5-2-3\", label: \"Two Left + Three Right\", layout: columnsTemplate([2, 3]) },\n { id: \"5-cols\", label: \"Five Columns\", layout: columnsTemplate([1, 1, 1, 1, 1]) },\n ],\n 6: [\n { id: \"6-3x2\", label: \"3 × 2 Grid\", layout: columnsTemplate([2, 2, 2]) },\n { id: \"6-2x3\", label: \"2 × 3 Grid\", layout: columnsTemplate([3, 3]) },\n { id: \"6-1-2-3\", label: \"Cascade 1-2-3\", layout: columnsTemplate([1, 2, 3]) },\n { id: \"6-1-1-2-2\", label: \"Two Cols + 2 × 2\", layout: columnsTemplate([1, 1, 2, 2]) },\n ],\n 7: [\n { id: \"7-2-2-3\", label: \"2 + 2 + 3 Studio\", layout: columnsTemplate([2, 2, 3]) },\n { id: \"7-3-2-2\", label: \"3 + 2 + 2 Studio\", layout: columnsTemplate([3, 2, 2]) },\n { id: \"7-2-3-2\", label: \"2 + 3 + 2 Center\", layout: columnsTemplate([2, 3, 2]) },\n { id: \"7-1-2-2-2\", label: \"Focus + Three Pairs\", layout: columnsTemplate([1, 2, 2, 2]) },\n { id: \"7-3-4\", label: \"3 Left + 4 Right\", layout: columnsTemplate([3, 4]) },\n ],\n};\n\nfunction generateFallbackPresets(count: number): LayoutPreset[] {\n if (count <= 1) return DEFAULT_LAYOUT_PRESETS[1];\n if (count > 5) {\n const makeBalancedColumns = (columnCount: number) => {\n const base = Math.floor(count / columnCount);\n const extraPanels = count % columnCount;\n return Array.from(\n { length: columnCount },\n (_, index) => base + (index < extraPanels ? 1 : 0),\n );\n };\n const gridColumns = makeBalancedColumns(Math.ceil(Math.sqrt(count)));\n const twoColumns = makeBalancedColumns(2);\n return [\n {\n id: `${count}-grid`,\n label: `${gridColumns.join(\" + \")} Grid`,\n layout: columnsTemplate(gridColumns),\n },\n {\n id: `${count}-2cols`,\n label: `${twoColumns.join(\" + \")} Split`,\n layout: columnsTemplate(twoColumns),\n },\n ];\n }\n const cols = Array.from({ length: count }, () => 1);\n const half = Math.ceil(count / 2);\n const twoCols = [half, count - half].filter((n) => n > 0);\n return [\n { id: `${count}-cols`, label: `${count} Columns`, layout: columnsTemplate(cols) },\n { id: `${count}-2cols`, label: `${twoCols.join(\" + \")} Split`, layout: columnsTemplate(twoCols) },\n { id: `${count}-rows`, label: `${count} Stacked`, layout: columnsTemplate([count]) },\n ];\n}\n\nexport type LayoutPickerDialogProps = {\n currentOpenCount: number;\n currentSignature: string;\n maxPanels?: number;\n presets?: Record<number, LayoutPreset[]>;\n onApplyLayout: (layout: WorkspaceLayoutTemplate) => void;\n onSaveAsDefault?: () => Promise<void> | void;\n renderFooterExtra?: (ctx: { close: () => void }) => ReactNode;\n renderTooltip?: RenderTooltip;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n iconOnly?: boolean;\n trigger?: ReactNode;\n};\n\nexport function LayoutPickerDialog({\n currentOpenCount,\n currentSignature,\n maxPanels = 7,\n presets: customPresets = DEFAULT_LAYOUT_PRESETS,\n onApplyLayout,\n onSaveAsDefault,\n renderFooterExtra,\n renderTooltip,\n open: controlledOpen,\n onOpenChange,\n iconOnly = false,\n trigger,\n}: LayoutPickerDialogProps) {\n const maxSections = Math.max(1, maxPanels);\n const sectionCounts = Array.from({ length: maxSections }, (_, i) => i + 1);\n\n const [uncontrolledOpen, setUncontrolledOpen] = useState(false);\n const open = controlledOpen ?? uncontrolledOpen;\n const setOpen = (next: boolean) => {\n if (controlledOpen === undefined) setUncontrolledOpen(next);\n onOpenChange?.(next);\n };\n\n const [savingDefault, setSavingDefault] = useState(false);\n const [selectedCount, setSelectedCount] = useState<number>(() =>\n Math.min(maxSections, Math.max(1, currentOpenCount || Math.min(4, maxSections))),\n );\n\n useEffect(() => {\n if (!open) return;\n setSelectedCount(Math.min(maxSections, Math.max(1, currentOpenCount || Math.min(4, maxSections))));\n }, [open, currentOpenCount, maxSections]);\n\n useEffect(() => {\n if (!open) return;\n function handleKeyDown(event: KeyboardEvent) {\n if (event.key === \"Escape\") setOpen(false);\n }\n window.addEventListener(\"keydown\", handleKeyDown);\n return () => window.removeEventListener(\"keydown\", handleKeyDown);\n }, [open]);\n\n const presets = customPresets[selectedCount] ?? generateFallbackPresets(selectedCount);\n\n const renderPreview = (node: WorkspaceLayoutTemplate, current: boolean, key = \"root\"): ReactNode => {\n if (node.type === \"panel\") {\n return (\n <div\n key={key}\n className={`flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden rounded-[6px] border transition-colors duration-150 ${\n current\n ? \"border-[var(--rtw-accent,#6366f1)]/45 bg-[var(--rtw-surface,#ffffff)] shadow-[0_1px_2px_rgba(15,23,42,0.06)]\"\n : \"border-[var(--rtw-border-strong,#c9d3e2)]/85 bg-[var(--rtw-surface,#ffffff)] shadow-[0_1px_2px_rgba(15,23,42,0.03)] group-hover:border-[var(--rtw-accent,#6366f1)]/45\"\n }`}\n >\n {/* Mini Panel Chrome Header */}\n <div\n className={`flex h-[8px] w-full shrink-0 items-center border-b px-1.5 transition-colors duration-150 ${\n current\n ? \"border-[var(--rtw-accent,#6366f1)]/20 bg-[var(--rtw-accent-tint,rgba(99,102,241,0.14))]\"\n : \"border-[var(--rtw-border-muted,#eaedf4)] bg-[var(--rtw-surface-header,#f8fafc)] group-hover:bg-[var(--rtw-accent-tint,rgba(99,102,241,0.08))]\"\n }`}\n >\n <span\n className={`h-[2.5px] w-3.5 rounded-full transition-colors duration-150 ${\n current\n ? \"bg-[var(--rtw-accent,#6366f1)]/60\"\n : \"bg-[var(--rtw-border-strong,#c9d3e2)] group-hover:bg-[var(--rtw-accent,#6366f1)]/45\"\n }`}\n />\n </div>\n {/* Subtle Slot Index */}\n <div className=\"flex min-h-0 flex-1 items-center justify-center overflow-hidden p-1\">\n <span\n className={`text-[11px] font-semibold leading-none tabular-nums transition-colors duration-150 ${\n current\n ? \"text-[var(--rtw-accent,#6366f1)]/85\"\n : \"text-[var(--rtw-text-faint,#94a3b8)]/80 group-hover:text-[var(--rtw-text-subtle,#64748b)]\"\n }`}\n >\n {node.index + 1}\n </span>\n </div>\n </div>\n );\n }\n return (\n <div\n key={key}\n className={`flex min-h-0 min-w-0 flex-1 gap-2 ${node.direction === \"horizontal\" ? \"flex-row\" : \"flex-col\"}`}\n >\n {node.children.map((child, index) => renderPreview(child, current, `${key}-${index}`))}\n </div>\n );\n };\n\n return (\n <>\n {trigger === undefined ? (\n <TooltipSlot renderTooltip={renderTooltip} label=\"Choose workspace layout\" side=\"bottom\">\n <button\n type=\"button\"\n onClick={() => setOpen(true)}\n aria-label=\"Choose workspace layout\"\n title={renderTooltip ? undefined : \"Choose workspace layout\"}\n className={\n iconOnly\n ? \"inline-flex size-8 cursor-pointer items-center justify-center rounded-lg text-[var(--rtw-text-muted,#475569)] transition-colors hover:bg-[var(--rtw-surface-subtle,#edf1f7)] hover:text-[var(--rtw-text-strong,#0f172a)]\"\n : \"inline-flex h-8 cursor-pointer items-center gap-1.5 whitespace-nowrap rounded-lg border border-[var(--rtw-border,#dfe5ef)] bg-[var(--rtw-surface-header,#f8fafc)] px-2.5 text-xs font-medium text-[var(--rtw-text,#1e293b)] transition-colors hover:border-[var(--rtw-border-strong,#c9d3e2)] hover:bg-[var(--rtw-surface-subtle,#edf1f7)]\"\n }\n >\n <LayoutIcon className=\"size-3.5 text-[var(--rtw-accent,#6366f1)]\" />\n {!iconOnly && <span>Layouts</span>}\n </button>\n </TooltipSlot>\n ) : (\n trigger\n )}\n\n {open && (\n <div\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"rtw-layout-picker-title\"\n className=\"rtw-animate-backdrop fixed inset-0 z-50 flex items-center justify-center bg-black/45 p-4 backdrop-blur-sm\"\n onClick={() => setOpen(false)}\n >\n <div\n className=\"rtw-animate-modal flex max-h-[calc(100dvh-2rem)] w-full max-w-6xl flex-col overflow-hidden rounded-[var(--rtw-radius-dialog,1rem)] border border-[var(--rtw-border,#dfe5ef)] bg-[var(--rtw-surface,#ffffff)] shadow-[var(--rtw-shadow-dialog)]\"\n onClick={(e) => e.stopPropagation()}\n >\n {/* Header */}\n <div className=\"flex shrink-0 items-center justify-between border-b border-[var(--rtw-border-muted,#eaedf4)] bg-[var(--rtw-surface-header,#f8fafc)] px-6 py-4\">\n <div className=\"flex items-center gap-3\">\n <span className=\"grid size-9 place-items-center rounded-xl bg-[var(--rtw-accent-tint,rgba(99,102,241,0.12))] text-[var(--rtw-accent,#6366f1)]\">\n <LayoutIcon className=\"size-4.5\" />\n </span>\n <div>\n <h2\n id=\"rtw-layout-picker-title\"\n className=\"text-sm font-semibold tracking-[-0.01em] text-[var(--rtw-text-strong,#0f172a)]\"\n >\n Workspace Layouts\n </h2>\n <p className=\"text-xs text-[var(--rtw-text-subtle,#64748b)]\">\n Choose a panel count and click any layout to arrange your workspace.\n </p>\n </div>\n </div>\n <button\n type=\"button\"\n onClick={() => setOpen(false)}\n aria-label=\"Close layout dialog\"\n className=\"flex size-8 cursor-pointer items-center justify-center rounded-lg text-[var(--rtw-text-subtle,#64748b)] transition-colors hover:bg-[var(--rtw-surface-hover,#e5ebf3)] hover:text-[var(--rtw-text-strong,#0f172a)]\"\n >\n <CloseIcon className=\"size-4\" />\n </button>\n </div>\n\n <div className=\"space-y-5 overflow-y-auto p-6\">\n {/* Segmented Panel Count Selector */}\n <div className=\"flex flex-wrap items-center justify-between gap-3\">\n <div className=\"flex items-center gap-2\">\n <span className=\"text-xs font-medium text-[var(--rtw-text-muted,#475569)]\">\n Visible panels\n </span>\n <span className=\"rounded-md bg-[var(--rtw-surface-subtle,#edf1f7)] px-1.5 py-0.5 text-[11px] font-medium tabular-nums text-[var(--rtw-text-subtle,#64748b)]\">\n {presets.length} {presets.length === 1 ? \"layout\" : \"layouts\"}\n </span>\n </div>\n <div\n role=\"group\"\n aria-label=\"Number of panels\"\n className=\"inline-flex items-center gap-0.5 rounded-xl border border-[var(--rtw-border,#dfe5ef)] bg-[var(--rtw-surface-subtle,#edf1f7)] p-1\"\n >\n {sectionCounts.map((count) => {\n const isSelected = selectedCount === count;\n return (\n <button\n key={count}\n type=\"button\"\n onClick={() => setSelectedCount(count)}\n aria-pressed={isSelected}\n className={`flex h-7 min-w-9 cursor-pointer items-center justify-center rounded-lg px-2.5 text-xs font-semibold tabular-nums transition-all duration-150 ${\n isSelected\n ? \"bg-[var(--rtw-accent,#6366f1)] text-[var(--rtw-accent-foreground,#ffffff)] shadow-sm\"\n : \"text-[var(--rtw-text-muted,#475569)] hover:bg-[var(--rtw-surface-hover,#e5ebf3)]/60 hover:text-[var(--rtw-text-strong,#0f172a)]\"\n }`}\n >\n {count}\n </button>\n );\n })}\n </div>\n </div>\n\n {/* Miniature Workspace Blueprint Grid */}\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3\">\n {presets.map((preset) => {\n const isCurrent = layoutTemplateSignature(preset.layout) === currentSignature;\n return (\n <button\n key={preset.id}\n type=\"button\"\n aria-label={`Apply ${preset.label}`}\n aria-pressed={isCurrent}\n title={preset.label}\n onClick={() => {\n onApplyLayout(preset.layout);\n setOpen(false);\n }}\n className={`group relative flex aspect-[16/10] w-full cursor-pointer overflow-hidden rounded-xl border p-3 text-left transition-all duration-150 ${\n isCurrent\n ? \"border-[var(--rtw-accent,#6366f1)] bg-[var(--rtw-accent-tint,rgba(99,102,241,0.08))] ring-2 ring-[var(--rtw-accent-ring,rgba(99,102,241,0.48))] shadow-sm\"\n : \"border-[var(--rtw-border,#dfe5ef)] bg-[var(--rtw-bg,#f1f4f9)] hover:-translate-y-0.5 hover:border-[var(--rtw-accent,#6366f1)]/60 hover:bg-[var(--rtw-surface-subtle,#edf1f7)] hover:shadow-md\"\n }`}\n >\n {renderPreview(preset.layout, isCurrent)}\n {isCurrent && (\n <span\n aria-hidden=\"true\"\n className=\"absolute right-2 top-2 z-10 grid size-5 place-items-center rounded-full bg-[var(--rtw-accent,#6366f1)] text-[var(--rtw-accent-foreground,#ffffff)] shadow-sm ring-2 ring-[var(--rtw-surface,#ffffff)]\"\n >\n <CheckIcon className=\"size-3\" />\n </span>\n )}\n </button>\n );\n })}\n </div>\n </div>\n\n {/* Footer */}\n {(onSaveAsDefault || renderFooterExtra) && (\n <div className=\"flex shrink-0 flex-wrap items-center justify-between gap-2 border-t border-[var(--rtw-border-muted,#eaedf4)] bg-[var(--rtw-surface-header,#f8fafc)] px-6 py-3.5\">\n {onSaveAsDefault ? (\n <button\n type=\"button\"\n disabled={savingDefault}\n onClick={async () => {\n setSavingDefault(true);\n try {\n await onSaveAsDefault();\n } finally {\n setSavingDefault(false);\n }\n }}\n className=\"inline-flex h-8 cursor-pointer items-center gap-1.5 whitespace-nowrap rounded-lg border border-[var(--rtw-border-strong,#c9d3e2)] bg-[var(--rtw-surface,#ffffff)] px-3 text-xs font-medium text-[var(--rtw-text,#1e293b)] transition-colors hover:border-[var(--rtw-accent,#6366f1)]/60 hover:text-[var(--rtw-accent,#6366f1)] disabled:opacity-50\"\n >\n <BookmarkIcon className=\"size-3.5 text-[var(--rtw-accent,#6366f1)]\" />\n <span>{savingDefault ? \"Saving…\" : \"Save current as default\"}</span>\n </button>\n ) : (\n <span />\n )}\n {renderFooterExtra?.({ close: () => setOpen(false) })}\n </div>\n )}\n </div>\n </div>\n )}\n </>\n );\n}\n"],"mappings":";;;;;AAmMA,SAAgB,wBAAwB,UAA2C;CACjF,IAAI,SAAS,SAAS,SAAS,OAAO;CACtC,OAAO,GAAG,SAAS,cAAc,eAAe,MAAM,IAAI,GAAG,SAAS,SACnE,IAAI,uBAAuB,CAAC,CAC5B,KAAK,GAAG,EAAE;AACf;;AC7LA,SAAgB,YAAY,EAC1B,eACA,OACA,UACA,OAAO,UACP,YACmB;CACnB,IAAI,CAAC,eAAe,OAAO,oBAAA,UAAA,EAAG,SAAW,CAAA;CACzC,OAAO,oBAAA,UAAA,EAAA,UAAG,cAAc;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,KAAK;OACxB;MACF;MACA,WAAU;MAXZ,UAAA,CAaE,oBAAC,cAAD,EAAc,WAAU,4CAA6C,CAAA,GACrE,oBAAC,QAAD,EAAA,UAAO,gBAAgB,YAAY,0BAAgC,CAAA,CAC7D;KAER,CAAA,IAAA,oBAAC,QAAD,CAAO,CAAA,GAER,oBAAoB,EAAE,aAAa,QAAQ,KAAK,EAAE,CAAC,CACjD;;GAEJ;;CACF,CAAA,CAEP,EAAA,CAAA;AAEN"}
@@ -0,0 +1,144 @@
1
+ "use client";
2
+ let react_jsx_runtime = require("react/jsx-runtime");
3
+ // src/components/icons.tsx
4
+ function SvgIcon({ children, className = "size-4", ...rest }) {
5
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
6
+ viewBox: "0 0 24 24",
7
+ fill: "none",
8
+ stroke: "currentColor",
9
+ strokeWidth: 1.85,
10
+ strokeLinecap: "round",
11
+ strokeLinejoin: "round",
12
+ "aria-hidden": "true",
13
+ className,
14
+ ...rest,
15
+ children
16
+ });
17
+ }
18
+ function PlusIcon(props) {
19
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(SvgIcon, {
20
+ ...props,
21
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M12 5v14" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M5 12h14" })]
22
+ });
23
+ }
24
+ function CloseIcon(props) {
25
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(SvgIcon, {
26
+ ...props,
27
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M18 6 6 18" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "m6 6 12 12" })]
28
+ });
29
+ }
30
+ function LayoutIcon(props) {
31
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(SvgIcon, {
32
+ ...props,
33
+ children: [
34
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", {
35
+ width: "18",
36
+ height: "18",
37
+ x: "3",
38
+ y: "3",
39
+ rx: "2.5"
40
+ }),
41
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M3 9h18" }),
42
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M9 21V9" })
43
+ ]
44
+ });
45
+ }
46
+ function CheckIcon(props) {
47
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SvgIcon, {
48
+ ...props,
49
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M20 6 9 17l-5-5" })
50
+ });
51
+ }
52
+ function BookmarkIcon(props) {
53
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SvgIcon, {
54
+ ...props,
55
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z" })
56
+ });
57
+ }
58
+ function RotateCcwIcon(props) {
59
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(SvgIcon, {
60
+ ...props,
61
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M3 3v5h5" })]
62
+ });
63
+ }
64
+ function MenuIcon(props) {
65
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(SvgIcon, {
66
+ ...props,
67
+ children: [
68
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("line", {
69
+ x1: "4",
70
+ x2: "20",
71
+ y1: "12",
72
+ y2: "12"
73
+ }),
74
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("line", {
75
+ x1: "4",
76
+ x2: "20",
77
+ y1: "6",
78
+ y2: "6"
79
+ }),
80
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("line", {
81
+ x1: "4",
82
+ x2: "20",
83
+ y1: "18",
84
+ y2: "18"
85
+ })
86
+ ]
87
+ });
88
+ }
89
+ function LoaderIcon(props) {
90
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SvgIcon, {
91
+ ...props,
92
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
93
+ });
94
+ }
95
+ Object.defineProperty(exports, "BookmarkIcon", {
96
+ enumerable: true,
97
+ get: function() {
98
+ return BookmarkIcon;
99
+ }
100
+ });
101
+ Object.defineProperty(exports, "CheckIcon", {
102
+ enumerable: true,
103
+ get: function() {
104
+ return CheckIcon;
105
+ }
106
+ });
107
+ Object.defineProperty(exports, "CloseIcon", {
108
+ enumerable: true,
109
+ get: function() {
110
+ return CloseIcon;
111
+ }
112
+ });
113
+ Object.defineProperty(exports, "LayoutIcon", {
114
+ enumerable: true,
115
+ get: function() {
116
+ return LayoutIcon;
117
+ }
118
+ });
119
+ Object.defineProperty(exports, "LoaderIcon", {
120
+ enumerable: true,
121
+ get: function() {
122
+ return LoaderIcon;
123
+ }
124
+ });
125
+ Object.defineProperty(exports, "MenuIcon", {
126
+ enumerable: true,
127
+ get: function() {
128
+ return MenuIcon;
129
+ }
130
+ });
131
+ Object.defineProperty(exports, "PlusIcon", {
132
+ enumerable: true,
133
+ get: function() {
134
+ return PlusIcon;
135
+ }
136
+ });
137
+ Object.defineProperty(exports, "RotateCcwIcon", {
138
+ enumerable: true,
139
+ get: function() {
140
+ return RotateCcwIcon;
141
+ }
142
+ });
143
+
144
+ //# sourceMappingURL=icons-0kjsH_LJ.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icons-0kjsH_LJ.cjs","names":[],"sources":["../../src/components/icons.tsx"],"sourcesContent":["import type { SVGProps } from \"react\";\n\ntype IconProps = SVGProps<SVGSVGElement>;\n\nfunction SvgIcon({\n children,\n className = \"size-4\",\n ...rest\n}: IconProps) {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={1.85}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n className={className}\n {...rest}\n >\n {children}\n </svg>\n );\n}\n\nexport function PlusIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <path d=\"M12 5v14\" />\n <path d=\"M5 12h14\" />\n </SvgIcon>\n );\n}\n\nexport function CloseIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </SvgIcon>\n );\n}\n\nexport function MinusIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <path d=\"M5 12h14\" />\n </SvgIcon>\n );\n}\n\nexport function ChevronUpIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <path d=\"m18 15-6-6-6 6\" />\n </SvgIcon>\n );\n}\n\nexport function ChevronDownIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <path d=\"m6 9 6 6 6-6\" />\n </SvgIcon>\n );\n}\n\nexport function ChevronLeftIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <path d=\"m15 18-6-6 6-6\" />\n </SvgIcon>\n );\n}\n\nexport function ChevronRightIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <path d=\"m9 18 6-6-6-6\" />\n </SvgIcon>\n );\n}\n\nexport function GripVerticalIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <circle cx=\"9\" cy=\"6\" r=\"1\" fill=\"currentColor\" stroke=\"none\" />\n <circle cx=\"9\" cy=\"12\" r=\"1\" fill=\"currentColor\" stroke=\"none\" />\n <circle cx=\"9\" cy=\"18\" r=\"1\" fill=\"currentColor\" stroke=\"none\" />\n <circle cx=\"15\" cy=\"6\" r=\"1\" fill=\"currentColor\" stroke=\"none\" />\n <circle cx=\"15\" cy=\"12\" r=\"1\" fill=\"currentColor\" stroke=\"none\" />\n <circle cx=\"15\" cy=\"18\" r=\"1\" fill=\"currentColor\" stroke=\"none\" />\n </SvgIcon>\n );\n}\n\nexport function FoldHorizontalIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <path d=\"M12 3v18\" />\n <path d=\"m8 8-4 4 4 4\" />\n <path d=\"m16 8 4 4-4 4\" />\n </SvgIcon>\n );\n}\n\nexport function PanelFoldHorizontalIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <path d=\"M2 12h6\" />\n <path d=\"M22 12h-6\" />\n <path d=\"M12 3v18\" />\n <path d=\"m5 9 3 3-3 3\" />\n <path d=\"m19 9-3 3 3 3\" />\n </SvgIcon>\n );\n}\n\nexport function PanelFoldVerticalIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <path d=\"M12 2v6\" />\n <path d=\"M12 22v-6\" />\n <path d=\"M3 12h18\" />\n <path d=\"m9 5 3 3 3-3\" />\n <path d=\"m9 19 3-3 3 3\" />\n </SvgIcon>\n );\n}\n\nexport function PanelUnfoldHorizontalIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <path d=\"M12 3v18\" />\n <path d=\"M8 12H2\" />\n <path d=\"M16 12h6\" />\n <path d=\"m5 9-3 3 3 3\" />\n <path d=\"m19 9 3 3-3 3\" />\n </SvgIcon>\n );\n}\n\nexport function PanelUnfoldVerticalIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <path d=\"M3 12h18\" />\n <path d=\"M12 8V2\" />\n <path d=\"M12 16v6\" />\n <path d=\"m9 5 3-3 3 3\" />\n <path d=\"m9 19 3 3 3-3\" />\n </SvgIcon>\n );\n}\n\nexport function MaximizeIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <polyline points=\"15 3 21 3 21 9\" />\n <polyline points=\"9 21 3 21 3 15\" />\n <line x1=\"21\" x2=\"14\" y1=\"3\" y2=\"10\" />\n <line x1=\"3\" x2=\"10\" y1=\"21\" y2=\"14\" />\n </SvgIcon>\n );\n}\n\nexport function MinimizeIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <polyline points=\"4 14 10 14 10 20\" />\n <polyline points=\"20 10 14 10 14 4\" />\n <line x1=\"14\" x2=\"21\" y1=\"10\" y2=\"3\" />\n <line x1=\"3\" x2=\"10\" y1=\"21\" y2=\"14\" />\n </SvgIcon>\n );\n}\n\nexport function DockIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2.5\" />\n <path d=\"M3 8h18\" />\n <path d=\"m9 15 3-3 3 3\" />\n </SvgIcon>\n );\n}\n\nexport function LayoutIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2.5\" />\n <path d=\"M3 9h18\" />\n <path d=\"M9 21V9\" />\n </SvgIcon>\n );\n}\n\nexport function CheckIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <path d=\"M20 6 9 17l-5-5\" />\n </SvgIcon>\n );\n}\n\nexport function BookmarkIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <path d=\"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z\" />\n </SvgIcon>\n );\n}\n\nexport function RotateCcwIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <path d=\"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8\" />\n <path d=\"M3 3v5h5\" />\n </SvgIcon>\n );\n}\n\nexport function MenuIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <line x1=\"4\" x2=\"20\" y1=\"12\" y2=\"12\" />\n <line x1=\"4\" x2=\"20\" y1=\"6\" y2=\"6\" />\n <line x1=\"4\" x2=\"20\" y1=\"18\" y2=\"18\" />\n </SvgIcon>\n );\n}\n\nexport function LoaderIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <path d=\"M21 12a9 9 0 1 1-6.219-8.56\" />\n </SvgIcon>\n );\n}\n"],"mappings":";;;AAIA,SAAS,QAAQ,EACf,UACA,YAAY,UACZ,GAAG,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AAa,OAAkB;CAC7C,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,SAAD;EAAS,GAAI;EACX,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD,EAAM,GAAE,sDAAuD,CAAA;CACxD,CAAA;AAEb;AAEA,SAAgB,cAAc,OAAkB;CAC9C,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,SAAD;EAAS,GAAI;EAAb,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD,EAAM,GAAE,oDAAqD,CAAA,GAC7D,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD,EAAM,GAAE,WAAY,CAAA,CACb;;AAEb;AAEA,SAAgB,SAAS,OAAkB;CACzC,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,SAAD;EAAS,GAAI;EAAb,UAAA;GACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;IAAM,IAAG;IAAI,IAAG;IAAK,IAAG;IAAK,IAAG;GAAM,CAAA;GACtC,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;IAAM,IAAG;IAAI,IAAG;IAAK,IAAG;IAAI,IAAG;GAAK,CAAA;GACpC,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;IAAM,IAAG;IAAI,IAAG;IAAK,IAAG;IAAK,IAAG;GAAM,CAAA;EAC/B;;AAEb;AAEA,SAAgB,WAAW,OAAkB;CAC3C,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,SAAD;EAAS,GAAI;EACX,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD,EAAM,GAAE,8BAA+B,CAAA;CAChC,CAAA;AAEb"}
@@ -0,0 +1,97 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ // src/components/icons.tsx
4
+ function SvgIcon({ children, className = "size-4", ...rest }) {
5
+ return /* @__PURE__ */ jsx("svg", {
6
+ viewBox: "0 0 24 24",
7
+ fill: "none",
8
+ stroke: "currentColor",
9
+ strokeWidth: 1.85,
10
+ strokeLinecap: "round",
11
+ strokeLinejoin: "round",
12
+ "aria-hidden": "true",
13
+ className,
14
+ ...rest,
15
+ children
16
+ });
17
+ }
18
+ function PlusIcon(props) {
19
+ return /* @__PURE__ */ jsxs(SvgIcon, {
20
+ ...props,
21
+ children: [/* @__PURE__ */ jsx("path", { d: "M12 5v14" }), /* @__PURE__ */ jsx("path", { d: "M5 12h14" })]
22
+ });
23
+ }
24
+ function CloseIcon(props) {
25
+ return /* @__PURE__ */ jsxs(SvgIcon, {
26
+ ...props,
27
+ children: [/* @__PURE__ */ jsx("path", { d: "M18 6 6 18" }), /* @__PURE__ */ jsx("path", { d: "m6 6 12 12" })]
28
+ });
29
+ }
30
+ function LayoutIcon(props) {
31
+ return /* @__PURE__ */ jsxs(SvgIcon, {
32
+ ...props,
33
+ children: [
34
+ /* @__PURE__ */ jsx("rect", {
35
+ width: "18",
36
+ height: "18",
37
+ x: "3",
38
+ y: "3",
39
+ rx: "2.5"
40
+ }),
41
+ /* @__PURE__ */ jsx("path", { d: "M3 9h18" }),
42
+ /* @__PURE__ */ jsx("path", { d: "M9 21V9" })
43
+ ]
44
+ });
45
+ }
46
+ function CheckIcon(props) {
47
+ return /* @__PURE__ */ jsx(SvgIcon, {
48
+ ...props,
49
+ children: /* @__PURE__ */ jsx("path", { d: "M20 6 9 17l-5-5" })
50
+ });
51
+ }
52
+ function BookmarkIcon(props) {
53
+ return /* @__PURE__ */ jsx(SvgIcon, {
54
+ ...props,
55
+ children: /* @__PURE__ */ jsx("path", { d: "m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z" })
56
+ });
57
+ }
58
+ function RotateCcwIcon(props) {
59
+ return /* @__PURE__ */ jsxs(SvgIcon, {
60
+ ...props,
61
+ children: [/* @__PURE__ */ jsx("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }), /* @__PURE__ */ jsx("path", { d: "M3 3v5h5" })]
62
+ });
63
+ }
64
+ function MenuIcon(props) {
65
+ return /* @__PURE__ */ jsxs(SvgIcon, {
66
+ ...props,
67
+ children: [
68
+ /* @__PURE__ */ jsx("line", {
69
+ x1: "4",
70
+ x2: "20",
71
+ y1: "12",
72
+ y2: "12"
73
+ }),
74
+ /* @__PURE__ */ jsx("line", {
75
+ x1: "4",
76
+ x2: "20",
77
+ y1: "6",
78
+ y2: "6"
79
+ }),
80
+ /* @__PURE__ */ jsx("line", {
81
+ x1: "4",
82
+ x2: "20",
83
+ y1: "18",
84
+ y2: "18"
85
+ })
86
+ ]
87
+ });
88
+ }
89
+ function LoaderIcon(props) {
90
+ return /* @__PURE__ */ jsx(SvgIcon, {
91
+ ...props,
92
+ children: /* @__PURE__ */ jsx("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
93
+ });
94
+ }
95
+ export { LoaderIcon as a, RotateCcwIcon as c, LayoutIcon as i, CheckIcon as n, MenuIcon as o, CloseIcon as r, PlusIcon as s, BookmarkIcon as t };
96
+
97
+ //# sourceMappingURL=icons-BgtEPXL8.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icons-BgtEPXL8.mjs","names":[],"sources":["../../src/components/icons.tsx"],"sourcesContent":["import type { SVGProps } from \"react\";\n\ntype IconProps = SVGProps<SVGSVGElement>;\n\nfunction SvgIcon({\n children,\n className = \"size-4\",\n ...rest\n}: IconProps) {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={1.85}\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n className={className}\n {...rest}\n >\n {children}\n </svg>\n );\n}\n\nexport function PlusIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <path d=\"M12 5v14\" />\n <path d=\"M5 12h14\" />\n </SvgIcon>\n );\n}\n\nexport function CloseIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <path d=\"M18 6 6 18\" />\n <path d=\"m6 6 12 12\" />\n </SvgIcon>\n );\n}\n\nexport function MinusIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <path d=\"M5 12h14\" />\n </SvgIcon>\n );\n}\n\nexport function ChevronUpIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <path d=\"m18 15-6-6-6 6\" />\n </SvgIcon>\n );\n}\n\nexport function ChevronDownIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <path d=\"m6 9 6 6 6-6\" />\n </SvgIcon>\n );\n}\n\nexport function ChevronLeftIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <path d=\"m15 18-6-6 6-6\" />\n </SvgIcon>\n );\n}\n\nexport function ChevronRightIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <path d=\"m9 18 6-6-6-6\" />\n </SvgIcon>\n );\n}\n\nexport function GripVerticalIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <circle cx=\"9\" cy=\"6\" r=\"1\" fill=\"currentColor\" stroke=\"none\" />\n <circle cx=\"9\" cy=\"12\" r=\"1\" fill=\"currentColor\" stroke=\"none\" />\n <circle cx=\"9\" cy=\"18\" r=\"1\" fill=\"currentColor\" stroke=\"none\" />\n <circle cx=\"15\" cy=\"6\" r=\"1\" fill=\"currentColor\" stroke=\"none\" />\n <circle cx=\"15\" cy=\"12\" r=\"1\" fill=\"currentColor\" stroke=\"none\" />\n <circle cx=\"15\" cy=\"18\" r=\"1\" fill=\"currentColor\" stroke=\"none\" />\n </SvgIcon>\n );\n}\n\nexport function FoldHorizontalIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <path d=\"M12 3v18\" />\n <path d=\"m8 8-4 4 4 4\" />\n <path d=\"m16 8 4 4-4 4\" />\n </SvgIcon>\n );\n}\n\nexport function PanelFoldHorizontalIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <path d=\"M2 12h6\" />\n <path d=\"M22 12h-6\" />\n <path d=\"M12 3v18\" />\n <path d=\"m5 9 3 3-3 3\" />\n <path d=\"m19 9-3 3 3 3\" />\n </SvgIcon>\n );\n}\n\nexport function PanelFoldVerticalIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <path d=\"M12 2v6\" />\n <path d=\"M12 22v-6\" />\n <path d=\"M3 12h18\" />\n <path d=\"m9 5 3 3 3-3\" />\n <path d=\"m9 19 3-3 3 3\" />\n </SvgIcon>\n );\n}\n\nexport function PanelUnfoldHorizontalIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <path d=\"M12 3v18\" />\n <path d=\"M8 12H2\" />\n <path d=\"M16 12h6\" />\n <path d=\"m5 9-3 3 3 3\" />\n <path d=\"m19 9 3 3-3 3\" />\n </SvgIcon>\n );\n}\n\nexport function PanelUnfoldVerticalIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <path d=\"M3 12h18\" />\n <path d=\"M12 8V2\" />\n <path d=\"M12 16v6\" />\n <path d=\"m9 5 3-3 3 3\" />\n <path d=\"m9 19 3 3 3-3\" />\n </SvgIcon>\n );\n}\n\nexport function MaximizeIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <polyline points=\"15 3 21 3 21 9\" />\n <polyline points=\"9 21 3 21 3 15\" />\n <line x1=\"21\" x2=\"14\" y1=\"3\" y2=\"10\" />\n <line x1=\"3\" x2=\"10\" y1=\"21\" y2=\"14\" />\n </SvgIcon>\n );\n}\n\nexport function MinimizeIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <polyline points=\"4 14 10 14 10 20\" />\n <polyline points=\"20 10 14 10 14 4\" />\n <line x1=\"14\" x2=\"21\" y1=\"10\" y2=\"3\" />\n <line x1=\"3\" x2=\"10\" y1=\"21\" y2=\"14\" />\n </SvgIcon>\n );\n}\n\nexport function DockIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2.5\" />\n <path d=\"M3 8h18\" />\n <path d=\"m9 15 3-3 3 3\" />\n </SvgIcon>\n );\n}\n\nexport function LayoutIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2.5\" />\n <path d=\"M3 9h18\" />\n <path d=\"M9 21V9\" />\n </SvgIcon>\n );\n}\n\nexport function CheckIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <path d=\"M20 6 9 17l-5-5\" />\n </SvgIcon>\n );\n}\n\nexport function BookmarkIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <path d=\"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z\" />\n </SvgIcon>\n );\n}\n\nexport function RotateCcwIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <path d=\"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8\" />\n <path d=\"M3 3v5h5\" />\n </SvgIcon>\n );\n}\n\nexport function MenuIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <line x1=\"4\" x2=\"20\" y1=\"12\" y2=\"12\" />\n <line x1=\"4\" x2=\"20\" y1=\"6\" y2=\"6\" />\n <line x1=\"4\" x2=\"20\" y1=\"18\" y2=\"18\" />\n </SvgIcon>\n );\n}\n\nexport function LoaderIcon(props: IconProps) {\n return (\n <SvgIcon {...props}>\n <path d=\"M21 12a9 9 0 1 1-6.219-8.56\" />\n </SvgIcon>\n );\n}\n"],"mappings":";;;AAIA,SAAS,QAAQ,EACf,UACA,YAAY,UACZ,GAAG,QACS;CACZ,OACE,oBAAC,OAAD;EACE,SAAQ;EACR,MAAK;EACL,QAAO;EACP,aAAa;EACb,eAAc;EACd,gBAAe;EACf,eAAY;EACD;EACX,GAAI;EAEH;CACE,CAAA;AAET;AAEA,SAAgB,SAAS,OAAkB;CACzC,OACE,qBAAC,SAAD;EAAS,GAAI;EAAb,UAAA,CACE,oBAAC,QAAD,EAAM,GAAE,WAAY,CAAA,GACpB,oBAAC,QAAD,EAAM,GAA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b;AAEA,SAAgB,WAAW,OAAkB;CAC3C,OACE,oBAAC,SAAD;EAAS,GAAI;EACX,UAAA,oBAAC,QAAD,EAAM,GAAE,8BAA+B,CAAA;CAChC,CAAA;AAEb"}
@@ -0,0 +1,5 @@
1
+ "use client";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const require_LayoutPickerDialog = require("./LayoutPickerDialog-C-Sb3uOl.cjs");
4
+ exports.DEFAULT_LAYOUT_PRESETS = require_LayoutPickerDialog.DEFAULT_LAYOUT_PRESETS;
5
+ exports.LayoutPickerDialog = require_LayoutPickerDialog.LayoutPickerDialog;
@@ -0,0 +1,22 @@
1
+
2
+ import { ReactNode } from "react";
3
+ import { n as RenderTooltip, r as WorkspaceLayoutTemplate, t as LayoutPreset } from "./types-qsXC_48o.cjs";
4
+ export declare const DEFAULT_LAYOUT_PRESETS: Record<number, LayoutPreset[]>;
5
+ type LayoutPickerDialogProps = {
6
+ currentOpenCount: number;
7
+ currentSignature: string;
8
+ maxPanels?: number;
9
+ presets?: Record<number, LayoutPreset[]>;
10
+ onApplyLayout: (layout: WorkspaceLayoutTemplate) => void;
11
+ onSaveAsDefault?: () => Promise<void> | void;
12
+ renderFooterExtra?: (ctx: {
13
+ close: () => void;
14
+ }) => ReactNode;
15
+ renderTooltip?: RenderTooltip;
16
+ open?: boolean;
17
+ onOpenChange?: (open: boolean) => void;
18
+ iconOnly?: boolean;
19
+ trigger?: ReactNode;
20
+ };
21
+ export declare function LayoutPickerDialog({ currentOpenCount, currentSignature, maxPanels, presets: customPresets, onApplyLayout, onSaveAsDefault, renderFooterExtra, renderTooltip, open: controlledOpen, onOpenChange, iconOnly, trigger }: LayoutPickerDialogProps): import("react").JSX.Element;
22
+ export type { LayoutPickerDialogProps };
@@ -0,0 +1,22 @@
1
+
2
+ import { ReactNode } from "react";
3
+ import { n as RenderTooltip, r as WorkspaceLayoutTemplate, t as LayoutPreset } from "./types-DkwWFcD5.mjs";
4
+ export declare const DEFAULT_LAYOUT_PRESETS: Record<number, LayoutPreset[]>;
5
+ type LayoutPickerDialogProps = {
6
+ currentOpenCount: number;
7
+ currentSignature: string;
8
+ maxPanels?: number;
9
+ presets?: Record<number, LayoutPreset[]>;
10
+ onApplyLayout: (layout: WorkspaceLayoutTemplate) => void;
11
+ onSaveAsDefault?: () => Promise<void> | void;
12
+ renderFooterExtra?: (ctx: {
13
+ close: () => void;
14
+ }) => ReactNode;
15
+ renderTooltip?: RenderTooltip;
16
+ open?: boolean;
17
+ onOpenChange?: (open: boolean) => void;
18
+ iconOnly?: boolean;
19
+ trigger?: ReactNode;
20
+ };
21
+ export declare function LayoutPickerDialog({ currentOpenCount, currentSignature, maxPanels, presets: customPresets, onApplyLayout, onSaveAsDefault, renderFooterExtra, renderTooltip, open: controlledOpen, onOpenChange, iconOnly, trigger }: LayoutPickerDialogProps): import("react").JSX.Element;
22
+ export type { LayoutPickerDialogProps };
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ export { t as DEFAULT_LAYOUT_PRESETS, n as LayoutPickerDialog } from "./LayoutPickerDialog-STglqYFI.mjs";