@vishu1301/script-writing 1.2.8 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -433,7 +433,14 @@ function ScreenplayEditorView({
433
433
  }) }),
434
434
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 shrink-0 relative px-1", children: [
435
435
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-[1px] h-6 bg-zinc-200/80 mx-2 hidden sm:block rounded-full" }),
436
- showPdfImport && !isLocked && /* @__PURE__ */ jsxRuntime.jsx(PdfImporter, { disabled: isLocked, onScriptImported: handleScriptImport, children: /* @__PURE__ */ jsxRuntime.jsx("div", { title: "Import Script", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Upload, { className: "w-[18px] h-[18px]" }) }) }),
436
+ showPdfImport && !isLocked && /* @__PURE__ */ jsxRuntime.jsx(
437
+ PdfImporter,
438
+ {
439
+ disabled: isLocked,
440
+ onScriptImported: handleScriptImport,
441
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { title: "Import Script", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Upload, { className: "w-[18px] h-[18px]" }) })
442
+ }
443
+ ),
437
444
  onToggleLock && /* @__PURE__ */ jsxRuntime.jsx(
438
445
  "button",
439
446
  {
@@ -1743,47 +1750,40 @@ var handleSyncWithCloud = (blocks, sceneNumbers, onSaveAsSbx, project_name) => {
1743
1750
  }
1744
1751
  }
1745
1752
  };
1746
-
1747
- // app/types/script-breakdown.types.tsx
1748
1753
  var CATEGORIES = [
1749
- { id: "CAST", label: "Cast", color: "#7C3AED", hex: "#A78BFA" },
1750
- { id: "PROP", label: "Prop", color: "#FF6A00", hex: "#FFB86B" },
1751
- { id: "COSTUME", label: "Costume", color: "#FF2E93", hex: "#FF8AC2" },
1752
- { id: "VEHICLE", label: "Vehicle", color: "#00A6FF", hex: "#6ED6FF" },
1753
- { id: "SET_PROP", label: "Set Prop", color: "#00C853", hex: "#69F0AE" },
1754
- { id: "EXTRA", label: "Extra", color: "#00B8D4", hex: "#62EFFF" },
1755
- { id: "LOCATION", label: "Location", color: "#FFB300", hex: "#FFE082" },
1756
- { id: "SUBLOCATION", label: "Sublocation", color: "#004CFF", hex: "#004CFF" },
1757
- { id: "OTHER", label: "Other", color: "#9E9E9E", hex: "#E0E0E0" }
1754
+ { id: "CAST", label: "Cast", color: "#F97316", hex: "#FDBA74", icon: lucideReact.Users },
1755
+ { id: "PROP", label: "Prop", color: "#7C3AED", hex: "#C4B5FD", icon: lucideReact.Box },
1756
+ { id: "COSTUME", label: "Costume", color: "#DB2777", hex: "#F9A8D4", icon: lucideReact.Shirt },
1757
+ { id: "VEHICLE", label: "Vehicle", color: "#2563EB", hex: "#93C5FD", icon: lucideReact.Car },
1758
+ { id: "SET_PROP", label: "Set Prop", color: "#92400E", hex: "#FCD34D", icon: lucideReact.Armchair },
1759
+ { id: "EXTRA", label: "Extra", color: "#F59E0B", hex: "#FDE68A", icon: lucideReact.UserPlus },
1760
+ { id: "LOCATION", label: "Location", color: "#059669", hex: "#6EE7B7", icon: lucideReact.MapPin },
1761
+ { id: "SUBLOCATION", label: "Sublocation", color: "#65A30D", hex: "#BEF264", icon: lucideReact.Map }
1762
+ // { id: "OTHER", label: "Other", color: "#475569", hex: "#CBD5F5", icon: Tags }
1758
1763
  ];
1759
- var PopcornIcon = ({ isSummarizing }) => /* @__PURE__ */ jsxRuntime.jsxs(
1760
- "svg",
1761
- {
1762
- xmlns: "http://www.w3.org/2000/svg",
1763
- width: "24",
1764
- height: "24",
1765
- viewBox: "0 0 24 24",
1766
- fill: "none",
1767
- strokeLinecap: "round",
1768
- strokeLinejoin: "round",
1769
- className: `w-6 h-6 transition-all duration-500 ${isSummarizing ? "animate-cook" : "group-hover:scale-110 group-hover:-rotate-12"}`,
1770
- children: [
1771
- /* @__PURE__ */ jsxRuntime.jsx(
1772
- "path",
1773
- {
1774
- d: "M18 8a2 2 0 0 0 0-4 2 2 0 0 0-4 0 2 2 0 0 0-4 0 2 2 0 0 0-4 0 2 2 0 0 0 0 4",
1775
- stroke: "#facc15",
1776
- strokeWidth: "2"
1777
- }
1778
- ),
1779
- /* @__PURE__ */ jsxRuntime.jsxs("g", { stroke: "#ef4444", strokeWidth: "2", children: [
1780
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20 8c.5 0 .9.4.8 1l-2.6 12c-.1.5-.7 1-1.2 1H7c-.6 0-1.1-.4-1.2-1L3.2 9c-.1-.6.3-1 .8-1Z" }),
1781
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M10 22 9 8", strokeWidth: "1" }),
1782
- /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m14 22 1-14", strokeWidth: "1" })
1764
+ var CinemaAIIcon = ({ isProcessing }) => {
1765
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative flex items-center justify-center w-[18px] h-[18px]", children: /* @__PURE__ */ jsxRuntime.jsx(
1766
+ "svg",
1767
+ {
1768
+ viewBox: "0 0 24 24",
1769
+ className: `w-full h-full stroke-[#1e769c] ${isProcessing ? "animate-[spin_2s_linear_infinite]" : ""}`,
1770
+ fill: "none",
1771
+ strokeWidth: "1.75",
1772
+ strokeLinecap: "round",
1773
+ strokeLinejoin: "round",
1774
+ children: isProcessing ? /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1775
+ /* @__PURE__ */ jsxRuntime.jsx("rect", { x: "2", y: "2", width: "20", height: "20", rx: "2.5" }),
1776
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M7 2v20" }),
1777
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M17 2v20" }),
1778
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M2 12h20" }),
1779
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M2 7h5" }),
1780
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M2 17h5" }),
1781
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M17 17h5" }),
1782
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M17 7h5" })
1783
1783
  ] })
1784
- ]
1785
- }
1786
- );
1784
+ }
1785
+ ) });
1786
+ };
1787
1787
  var SummarizeButton = ({
1788
1788
  onSummarize,
1789
1789
  isSummarizing
@@ -1793,140 +1793,27 @@ var SummarizeButton = ({
1793
1793
  {
1794
1794
  onClick: onSummarize,
1795
1795
  disabled: isSummarizing,
1796
- className: `group relative w-full py-4 px-8 rounded-[3rem] transition-all duration-500 ease-[cubic-bezier(0.22,1,0.36,1)] border ${isSummarizing ? "bg-zinc-100 border-zinc-300 opacity-100 cursor-wait shadow-inner" : "bg-gradient-to-b from-white via-zinc-50 to-zinc-100 border-white/70 shadow-[0_10px_30px_-10px_rgba(0,0,0,0.12),inset_0_1px_0_rgba(255,255,255,0.8)] hover:shadow-[0_20px_50px_-15px_rgba(139,92,246,0.3)] hover:-translate-y-[2px] active:scale-[0.98]"}`,
1796
+ className: `relative inline-flex items-center justify-center overflow-hidden px-7 py-3.5 rounded-[2.5rem] border outline-none transition-all duration-300 ease-out ${isSummarizing ? "border-[#7acee6] bg-[#d5f1f8] cursor-wait shadow-[0_0_0_4px_#eefafd]" : "border-[#b0e3f1] bg-[#eefafd] cursor-pointer hover:border-[#7acee6] hover:bg-[#d5f1f8] hover:shadow-[0_8px_24px_-6px_rgba(32,146,186,0.18)] hover:-translate-y-[1px]"}`,
1797
1797
  children: [
1798
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute inset-0 opacity-0 group-hover:opacity-100 transition duration-700", children: /* @__PURE__ */ jsxRuntime.jsx(
1799
- "span",
1800
- {
1801
- className: "absolute inset-0 blur-3xl opacity-20",
1802
- style: {
1803
- backgroundImage: "conic-gradient(from 0deg at 50% 50%, #c084fc, transparent 60%, #fb7185, transparent 90%)",
1804
- animation: "custom-spin 10s linear infinite"
1805
- }
1806
- }
1807
- ) }),
1808
1798
  /* @__PURE__ */ jsxRuntime.jsx(
1809
1799
  "span",
1810
1800
  {
1811
- className: `absolute inset-0 transition-opacity duration-700 ${isSummarizing ? "opacity-100" : "opacity-0"}`,
1812
- style: {
1813
- backgroundImage: "radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.1), transparent 70%)"
1814
- }
1801
+ className: `absolute inset-0 rounded-[inherit] ${isSummarizing ? "bg-[linear-gradient(135deg,#d5f1f8_0%,#b0e3f1_100%)]" : "bg-[linear-gradient(135deg,#eefafd_0%,#d5f1f8_100%)]"}`
1815
1802
  }
1816
1803
  ),
1817
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex items-center justify-center gap-4", children: [
1818
- /* @__PURE__ */ jsxRuntime.jsx("style", { children: `
1819
- @keyframes custom-spin {
1820
- from { transform: rotate(0deg); }
1821
- to { transform: rotate(360deg); }
1822
- }
1823
- @keyframes kernel-pop {
1824
- 0% { transform: translate(0, 0) scale(0) rotate(0deg); opacity: 0; }
1825
- 10% { opacity: 1; transform: translate(var(--tx1), var(--ty1)) scale(1.3) rotate(45deg); }
1826
- 40% { transform: translate(var(--tx2), var(--ty2)) scale(1) rotate(180deg); opacity: 1; }
1827
- 100% { transform: translate(var(--tx3), var(--ty3)) scale(0.4) rotate(360deg); opacity: 0; }
1828
- }
1829
- @keyframes icon-cook {
1830
- 0%, 100% { transform: scale(1.1) translateY(0); }
1831
- 50% { transform: scale(0.9, 1.1) translateY(-3px) rotate(3deg); }
1832
- }
1833
- .animate-kernel {
1834
- animation: kernel-pop var(--dur) cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
1835
- animation-delay: var(--delay);
1836
- filter: drop-shadow(0 4px 6px rgba(0,0,0,0.15)); /* Added shadow for visibility */
1837
- }
1838
- .animate-cook { animation: icon-cook 0.3s ease-in-out infinite; }
1839
- ` }),
1840
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex items-center justify-center", children: [
1841
- /* @__PURE__ */ jsxRuntime.jsx(PopcornIcon, { isSummarizing }),
1842
- isSummarizing && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", children: [
1843
- /* @__PURE__ */ jsxRuntime.jsx(
1844
- "svg",
1845
- {
1846
- className: "animate-kernel absolute w-4 h-4",
1847
- style: {
1848
- "--dur": "1.2s",
1849
- "--delay": "0s",
1850
- "--tx1": "-18px",
1851
- "--ty1": "-22px",
1852
- "--tx2": "-28px",
1853
- "--ty2": "-28px",
1854
- "--tx3": "-38px",
1855
- "--ty3": "12px"
1856
- },
1857
- viewBox: "0 0 24 24",
1858
- children: /* @__PURE__ */ jsxRuntime.jsx(
1859
- "path",
1860
- {
1861
- d: "M12 2a4 4 0 0 0-4 4 4 4 0 0 0-4 4 4 4 0 0 0 4 4 4 4 0 0 0 4 4 4 4 0 0 0 4-4 4 4 0 0 0 4-4 4 4 0 0 0-4-4 4 4 0 0 0-4-4z",
1862
- fill: "#FBBF24",
1863
- stroke: "#F59E0B",
1864
- strokeWidth: "0.5"
1865
- }
1866
- )
1867
- }
1868
- ),
1869
- /* @__PURE__ */ jsxRuntime.jsx(
1870
- "svg",
1871
- {
1872
- className: "animate-kernel absolute w-3.5 h-3.5",
1873
- style: {
1874
- "--dur": "1.5s",
1875
- "--delay": "0.3s",
1876
- "--tx1": "18px",
1877
- "--ty1": "-28px",
1878
- "--tx2": "28px",
1879
- "--ty2": "-38px",
1880
- "--tx3": "38px",
1881
- "--ty3": "18px"
1882
- },
1883
- viewBox: "0 0 24 24",
1884
- children: /* @__PURE__ */ jsxRuntime.jsx(
1885
- "path",
1886
- {
1887
- d: "M12 3c-2 0-3 1-4 2-1-1-3-1-4 1-1 2 0 4 1 5-1 1-1 3 1 4 2 1 4 0 6-1 2 1 4 2 6 1 2-1 2-3 1-4 1-1 2-3 1-5-1-2-3-2-4-1-1-1-2-2-4-2z",
1888
- fill: "#FDE68A",
1889
- stroke: "#FBBF24",
1890
- strokeWidth: "0.5"
1891
- }
1892
- )
1893
- }
1894
- ),
1895
- /* @__PURE__ */ jsxRuntime.jsx(
1896
- "svg",
1897
- {
1898
- className: "animate-kernel absolute w-4 h-4",
1899
- style: {
1900
- "--dur": "1.8s",
1901
- "--delay": "0.7s",
1902
- "--tx1": "-2px",
1903
- "--ty1": "-28px",
1904
- "--tx2": "5px",
1905
- "--ty2": "-48px",
1906
- "--tx3": "10px",
1907
- "--ty3": "18px"
1908
- },
1909
- viewBox: "0 0 24 24",
1910
- children: /* @__PURE__ */ jsxRuntime.jsx(
1911
- "path",
1912
- {
1913
- d: "M12 2a4 4 0 0 0-4 4 4 4 0 0 0-4 4 4 4 0 0 0 4 4 4 4 0 0 0 4 4 4 4 0 0 0 4-4 4 4 0 0 0 4-4 4 4 0 0 0-4-4 4 4 0 0 0-4-4z",
1914
- fill: "#FEF3C7"
1915
- }
1916
- )
1917
- }
1918
- )
1919
- ] })
1920
- ] }),
1921
- /* @__PURE__ */ jsxRuntime.jsx(
1922
- "span",
1923
- {
1924
- className: `text-[12px] font-bold tracking-[0.25em] uppercase transition-all duration-300 ${isSummarizing ? "text-violet-700" : "text-zinc-500 group-hover:text-zinc-900"}`,
1925
- children: isSummarizing ? "Summarizing..." : "Summarize Scene"
1926
- }
1927
- )
1928
- ] }),
1929
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute bottom-0 left-0 right-0 h-[1px] bg-gradient-to-r from-transparent via-white/40 to-transparent" })
1804
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "relative z-10 flex items-center gap-3", children: [
1805
+ /* @__PURE__ */ jsxRuntime.jsx(CinemaAIIcon, { isProcessing: isSummarizing }),
1806
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex flex-col items-start leading-none", children: [
1807
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[13px] font-semibold text-[#1d5b79] tracking-[0.01em]", children: isSummarizing ? "Analyzing Scene..." : "Summarize Scene" }),
1808
+ /* @__PURE__ */ jsxRuntime.jsx(
1809
+ "span",
1810
+ {
1811
+ className: `text-[9px] font-medium uppercase tracking-[0.12em] mt-1 ${isSummarizing ? "text-[#2092ba]" : "text-[#3cafd4]"}`,
1812
+ children: isSummarizing ? "AI Engine Active" : ""
1813
+ }
1814
+ )
1815
+ ] })
1816
+ ] })
1930
1817
  ]
1931
1818
  }
1932
1819
  );
@@ -1952,6 +1839,9 @@ function ScriptBreakdownSceneView({
1952
1839
  isSummarizing,
1953
1840
  aiSummarized = false
1954
1841
  }) {
1842
+ const [expanded, setExpanded] = react.useState(false);
1843
+ const [expandedCategories, setExpandedCategories] = react.useState({});
1844
+ const [isSidebarOpen, setIsSidebarOpen] = react.useState(false);
1955
1845
  const COURIER_STACK = "'Courier Prime', 'Courier', monospace";
1956
1846
  react.useEffect(() => {
1957
1847
  const fontId = "google-font-courier-prime";
@@ -2041,8 +1931,8 @@ function ScriptBreakdownSceneView({
2041
1931
  }
2042
1932
  return nodes;
2043
1933
  };
2044
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-8 md:p-12 mx-auto w-full min-h-screen flex flex-col gap-8", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col lg:flex-row gap-8 items-start", children: [
2045
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4", children: [
1934
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative p-8 md:p-12 mx-auto w-full min-h-screen flex flex-col gap-8 xl:pr-[20rem]", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-center max-w-6xl", children: [
1935
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4 min-h-screen", children: [
2046
1936
  /* @__PURE__ */ jsxRuntime.jsx(
2047
1937
  "div",
2048
1938
  {
@@ -2115,10 +2005,10 @@ function ScriptBreakdownSceneView({
2115
2005
  children: [
2116
2006
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
2117
2007
  /* @__PURE__ */ jsxRuntime.jsx(
2118
- "div",
2008
+ cat.icon,
2119
2009
  {
2120
- className: "w-2 h-2 rounded-full shadow-sm group-hover:scale-125 transition-transform duration-300",
2121
- style: { backgroundColor: cat.hex }
2010
+ className: "w-4 h-4 group-hover:scale-110 transition-transform duration-300",
2011
+ style: { color: cat.color }
2122
2012
  }
2123
2013
  ),
2124
2014
  cat.label
@@ -2181,52 +2071,131 @@ function ScriptBreakdownSceneView({
2181
2071
  ) })
2182
2072
  ] })
2183
2073
  ] }),
2184
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "w-full flex flex-col gap-6 sticky top-6", children: [
2185
- !aiSummarized && /* @__PURE__ */ jsxRuntime.jsx(
2186
- summarize_button_default,
2187
- {
2188
- isSummarizing,
2189
- onSummarize
2190
- }
2191
- ),
2192
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-white/50 backdrop-blur-2xl border border-white shadow-[0_8px_30px_rgb(0,0,0,0.04)] rounded-[2.5rem] p-8 w-full", children: [
2193
- /* @__PURE__ */ jsxRuntime.jsxs("h3", { className: "text-xs font-extrabold text-slate-800 uppercase tracking-[0.25em] mb-8 flex items-center gap-3", children: [
2194
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex items-center justify-center w-8 h-8 rounded-full bg-white/80 shadow-[0_4px_15px_rgb(0,0,0,0.04)] border border-white", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Tags, { className: "w-3.5 h-3.5 text-slate-500" }) }),
2195
- "Tags",
2196
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "ml-auto bg-slate-100/80 text-slate-500 px-2.5 py-1 rounded-lg text-[10px] font-bold tracking-widest border border-slate-200/50 shadow-inner", children: tags.length })
2197
- ] }),
2198
- tags.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-8", children: CATEGORIES.map((cat) => {
2199
- if (cat.id === "SUBLOCATION" && !hasLocationTag) return null;
2200
- const catTags = Array.from(
2201
- new Map(
2202
- tags.filter((t) => t.category_id === cat.id).map((tag) => [tag.name.toLowerCase(), tag])
2203
- ).values()
2204
- );
2205
- if (catTags.length === 0) return null;
2206
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4", children: [
2207
- /* @__PURE__ */ jsxRuntime.jsxs("h4", { className: "text-[10px] font-bold text-slate-400 uppercase tracking-[0.2em] flex items-center gap-2 border-b border-white/60 pb-2", children: [
2208
- /* @__PURE__ */ jsxRuntime.jsx(
2209
- "div",
2210
- {
2211
- className: "w-2 h-2 rounded-full shadow-sm",
2212
- style: { backgroundColor: cat.hex }
2213
- }
2214
- ),
2215
- cat.label
2074
+ /* @__PURE__ */ jsxRuntime.jsxs(
2075
+ "button",
2076
+ {
2077
+ onClick: () => setIsSidebarOpen(true),
2078
+ className: "fixed bottom-6 right-6 z-40 flex h-14 w-14 items-center justify-center rounded-full bg-[#15607b] text-white shadow-[0_8px_30px_rgba(21,96,123,0.3)] transition-transform hover:scale-105 active:scale-95 xl:hidden",
2079
+ children: [
2080
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Tags, { className: "h-6 w-6" }),
2081
+ tags.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "absolute -top-1 -right-1 flex h-5 w-5 items-center justify-center rounded-full bg-rose-500 text-[10px] font-bold text-white shadow-sm border-2 border-white", children: tags.length })
2082
+ ]
2083
+ }
2084
+ ),
2085
+ isSidebarOpen && /* @__PURE__ */ jsxRuntime.jsx(
2086
+ "div",
2087
+ {
2088
+ className: "fixed inset-0 z-40 bg-slate-900/20 backdrop-blur-sm transition-opacity xl:hidden",
2089
+ onClick: () => setIsSidebarOpen(false)
2090
+ }
2091
+ ),
2092
+ /* @__PURE__ */ jsxRuntime.jsx(
2093
+ "div",
2094
+ {
2095
+ className: `fixed xl:absolute top-0 right-0 z-50 h-screen xl:h-full w-72 transform transition-transform duration-300 ease-[cubic-bezier(0.22,1,0.36,1)] xl:translate-x-0 ${isSidebarOpen ? "translate-x-0 shadow-[0_0_40px_rgba(0,0,0,0.1)]" : "translate-x-full"}`,
2096
+ children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sticky top-0 flex h-screen max-h-screen w-full flex-col border-l border-l-[#eefafd] bg-white p-3 py-5", children: [
2097
+ !aiSummarized && /* @__PURE__ */ jsxRuntime.jsx(
2098
+ summarize_button_default,
2099
+ {
2100
+ isSummarizing,
2101
+ onSummarize
2102
+ }
2103
+ ),
2104
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex flex-col gap-3 py-5 my-5 border-t border-t-[#eefafd] flex-1 overflow-hidden", children: [
2105
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex items-center justify-between mb-6 shrink-0", children: [
2106
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
2107
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative flex h-8 w-8 items-center justify-center rounded-[10px] border border-[#15607b]/20 bg-white shadow-sm", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Tags, { className: "h-4 w-4 text-[#15607b]" }) }),
2108
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-[12px] font-semibold uppercase tracking-[0.28em] text-[#134a61]", children: "Breakdown" })
2109
+ ] }),
2110
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "rounded-full border border-slate-200/60 bg-slate-50 px-2.5 py-1 text-[11px] font-semibold text-[#134a61] shadow-sm backdrop-blur-md", children: tags.length }) })
2216
2111
  ] }),
2217
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-2", children: catTags.map((tag, index) => /* @__PURE__ */ jsxRuntime.jsx(
2218
- "span",
2219
- {
2220
- className: "text-[11px] font-bold px-3 py-1.5 rounded-xl bg-white/80 backdrop-blur-md border border-white shadow-[0_4px_15px_rgb(0,0,0,0.03)] hover:shadow-[0_4px_20px_rgb(0,0,0,0.06)] hover:-translate-y-0.5 transition-all duration-300 cursor-default",
2221
- style: { color: cat.color },
2222
- children: tag.name
2223
- },
2224
- index
2225
- )) })
2226
- ] }, cat.id);
2227
- }) }) : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs font-medium text-slate-400 italic bg-white/40 p-6 rounded-[2rem] border border-white border-dashed text-center shadow-[0_4px_20px_rgb(0,0,0,0.02)]", children: "Highlight text to tag elements." })
2228
- ] })
2229
- ] })
2112
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-4 overflow-y-auto custom-scrollbar", children: CATEGORIES.map((cat) => {
2113
+ const catTags = tags.filter((t) => t.category_id === cat.id);
2114
+ if (!catTags.length) return null;
2115
+ const isExpanded = expandedCategories[cat.id];
2116
+ const uniqueTags = Array.from(
2117
+ new Map(
2118
+ catTags.map((tag) => [tag.name.toLowerCase(), tag])
2119
+ ).values()
2120
+ );
2121
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
2122
+ /* @__PURE__ */ jsxRuntime.jsxs(
2123
+ "div",
2124
+ {
2125
+ onClick: () => setExpandedCategories((prev) => __spreadProps(__spreadValues({}, prev), {
2126
+ [cat.id]: !prev[cat.id]
2127
+ })),
2128
+ className: "group relative flex cursor-pointer items-center gap-3 overflow-hidden rounded-[24px] border border-white/70 px-4 py-3.5 transition-all duration-300 ease-[cubic-bezier(0.22,1,0.36,1)] hover:-translate-y-[1px]",
2129
+ style: {
2130
+ background: `linear-gradient(135deg, rgba(255,255,255,0.92), ${cat.hex}18)`,
2131
+ boxShadow: `0 16px 36px ${cat.hex}14, inset 0 1px 0 rgba(255,255,255,0.9)`,
2132
+ border: `1px solid ${cat.hex}50`
2133
+ },
2134
+ children: [
2135
+ /* @__PURE__ */ jsxRuntime.jsx(
2136
+ "div",
2137
+ {
2138
+ className: "absolute inset-0 opacity-0 transition-opacity duration-300 group-hover:opacity-100",
2139
+ style: {
2140
+ background: `radial-gradient(circle at 15% 20%, ${cat.hex}24, transparent 38%)`
2141
+ }
2142
+ }
2143
+ ),
2144
+ /* @__PURE__ */ jsxRuntime.jsx(
2145
+ "div",
2146
+ {
2147
+ className: "relative flex h-9 w-9 shrink-0 items-center justify-center rounded-xl border border-white/70 backdrop-blur-md",
2148
+ style: {
2149
+ background: `linear-gradient(135deg, ${cat.color}22, rgba(255,255,255,0.75))`,
2150
+ boxShadow: `0 10px 22px ${cat.color}14`
2151
+ },
2152
+ children: /* @__PURE__ */ jsxRuntime.jsx(cat.icon, { className: "h-4 w-4", color: cat.color })
2153
+ }
2154
+ ),
2155
+ /* @__PURE__ */ jsxRuntime.jsx(
2156
+ "span",
2157
+ {
2158
+ className: "relative text-[13px] font-semibold tracking-[0.01em]",
2159
+ style: { color: cat.color },
2160
+ children: cat.label
2161
+ }
2162
+ ),
2163
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "relative ml-auto rounded-full border border-white/70 bg-white/75 px-2.5 py-1 text-[11px] font-semibold text-[#456575] backdrop-blur-md", children: catTags.length }),
2164
+ /* @__PURE__ */ jsxRuntime.jsx(
2165
+ lucideReact.ChevronDown,
2166
+ {
2167
+ className: `relative h-4 w-4 transition-transform duration-500 ease-[cubic-bezier(0.22,1,0.36,1)] ${isExpanded ? "rotate-180" : ""}`,
2168
+ style: { color: cat.color }
2169
+ }
2170
+ )
2171
+ ]
2172
+ }
2173
+ ),
2174
+ /* @__PURE__ */ jsxRuntime.jsx(
2175
+ "div",
2176
+ {
2177
+ className: `grid transition-all duration-500 ease-[cubic-bezier(0.22,1,0.36,1)] ${isExpanded ? "grid-rows-[1fr] opacity-100 mt-3" : "grid-rows-[0fr] opacity-0"}`,
2178
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap justify-start gap-2 py-2", children: uniqueTags.map((tag, index) => /* @__PURE__ */ jsxRuntime.jsx(
2179
+ "span",
2180
+ {
2181
+ className: "text-[11px] font-semibold px-3 py-1.5 rounded-full border backdrop-blur-md transition-all duration-300",
2182
+ style: {
2183
+ color: cat.color,
2184
+ background: `linear-gradient(145deg, ${cat.color}18, rgba(255,255,255,0.88))`,
2185
+ borderColor: `${cat.color}28`
2186
+ },
2187
+ children: tag.name
2188
+ },
2189
+ index
2190
+ )) }) })
2191
+ }
2192
+ )
2193
+ ] }, cat.id);
2194
+ }) })
2195
+ ] })
2196
+ ] })
2197
+ }
2198
+ )
2230
2199
  ] }) });
2231
2200
  }
2232
2201
  function useScriptBreakdownScene(options) {