@industry-theme/file-city-panel 0.3.8 → 0.3.10

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.
@@ -49054,8 +49054,287 @@ const ContextContainer = ({
49054
49054
  }
49055
49055
  );
49056
49056
  };
49057
+ const NpmIcon$1 = ({ size }) => /* @__PURE__ */ jsxs(
49058
+ "svg",
49059
+ {
49060
+ width: size,
49061
+ height: size,
49062
+ viewBox: "0 0 24 24",
49063
+ fill: "#CB3837",
49064
+ role: "img",
49065
+ xmlns: "http://www.w3.org/2000/svg",
49066
+ children: [
49067
+ /* @__PURE__ */ jsx("title", { children: "npm" }),
49068
+ /* @__PURE__ */ jsx("path", { d: "M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z" })
49069
+ ]
49070
+ }
49071
+ );
49072
+ const YarnIcon$1 = ({ size }) => /* @__PURE__ */ jsxs(
49073
+ "svg",
49074
+ {
49075
+ width: size,
49076
+ height: size,
49077
+ viewBox: "0 0 24 24",
49078
+ fill: "#2C8EBB",
49079
+ role: "img",
49080
+ xmlns: "http://www.w3.org/2000/svg",
49081
+ children: [
49082
+ /* @__PURE__ */ jsx("title", { children: "Yarn" }),
49083
+ /* @__PURE__ */ jsx("path", { d: "M12 0C5.375 0 0 5.375 0 12s5.375 12 12 12 12-5.375 12-12S18.625 0 12 0zm.768 4.105c.183 0 .363.053.525.157.125.083.287.185.755 1.154.31-.088.468-.042.551-.019.204.056.366.19.463.375.477.917.542 2.553.334 3.605-.241 1.232-.755 2.029-1.131 2.576.324.329.778.899 1.117 1.825.278.774.31 1.478.273 2.015a5.51 5.51 0 0 0 .602-.329c.593-.366 1.487-.917 2.553-.931.714-.009 1.269.445 1.353 1.103a1.23 1.23 0 0 1-.945 1.362c-.649.158-.95.278-1.821.843-1.232.797-2.539 1.242-3.012 1.39a1.686 1.686 0 0 1-.704.343c-.737.181-3.266.315-3.466.315h-.046c-.783 0-1.214-.241-1.45-.491-.658.329-1.51.19-2.122-.134a1.078 1.078 0 0 1-.58-1.153 1.243 1.243 0 0 1-.153-.195c-.162-.25-.528-.936-.454-1.946.056-.723.556-1.367.88-1.71a5.522 5.522 0 0 1 .408-2.256c.306-.727.885-1.348 1.32-1.737-.32-.537-.644-1.367-.329-2.21.227-.602.412-.936.82-1.08h-.005c.199-.074.389-.153.486-.259a3.418 3.418 0 0 1 2.298-1.103c.037-.093.079-.185.125-.283.31-.658.639-1.029 1.024-1.168a.94.94 0 0 1 .328-.06zm.006.7c-.507.016-1.001 1.519-1.001 1.519s-1.27-.204-2.266.871c-.199.218-.468.334-.746.44-.079.028-.176.023-.417.672-.371.991.625 2.094.625 2.094s-1.186.839-1.626 1.881c-.486 1.144-.338 2.261-.338 2.261s-.843.732-.899 1.487c-.051.663.139 1.2.343 1.515.227.343.51.176.51.176s-.561.653-.037.931c.477.25 1.283.394 1.71-.037.31-.31.371-1.001.486-1.283.028-.065.12.111.209.199.097.093.264.195.264.195s-.755.324-.445 1.066c.102.246.468.403 1.066.398.222-.005 2.664-.139 3.313-.296.375-.088.505-.283.505-.283s1.566-.431 2.998-1.357c.917-.598 1.293-.76 2.034-.936.612-.148.57-1.098-.241-1.084-.839.009-1.575.44-2.196.825-1.163.718-1.742.672-1.742.672l-.018-.032c-.079-.13.371-1.293-.134-2.678-.547-1.515-1.413-1.881-1.344-1.997.297-.5 1.038-1.297 1.334-2.78.176-.899.13-2.377-.269-3.151-.074-.144-.732.241-.732.241s-.616-1.371-.788-1.483a.271.271 0 0 0-.157-.046z" })
49084
+ ]
49085
+ }
49086
+ );
49087
+ const PnpmIcon$1 = ({ size }) => /* @__PURE__ */ jsxs(
49088
+ "svg",
49089
+ {
49090
+ width: size,
49091
+ height: size,
49092
+ viewBox: "0 0 24 24",
49093
+ fill: "#F69220",
49094
+ role: "img",
49095
+ xmlns: "http://www.w3.org/2000/svg",
49096
+ children: [
49097
+ /* @__PURE__ */ jsx("title", { children: "pnpm" }),
49098
+ /* @__PURE__ */ jsx("path", { d: "M0 0v7.5h7.5V0zm8.25 0v7.5h7.498V0zm8.25 0v7.5H24V0zM8.25 8.25v7.5h7.498v-7.5zm8.25 0v7.5H24v-7.5zM0 16.5V24h7.5v-7.5zm8.25 0V24h7.498v-7.5zm8.25 0V24H24v-7.5z" })
49099
+ ]
49100
+ }
49101
+ );
49102
+ const BunIcon$1 = ({ size }) => /* @__PURE__ */ jsxs(
49103
+ "svg",
49104
+ {
49105
+ width: size,
49106
+ height: size,
49107
+ viewBox: "0 0 24 24",
49108
+ fill: "#FBF0DF",
49109
+ role: "img",
49110
+ xmlns: "http://www.w3.org/2000/svg",
49111
+ children: [
49112
+ /* @__PURE__ */ jsx("title", { children: "Bun" }),
49113
+ /* @__PURE__ */ jsx("path", { d: "M12 22.596c6.628 0 12-4.338 12-9.688 0-3.318-2.057-6.248-5.219-7.986-1.286-.715-2.297-1.357-3.139-1.89C14.058 2.025 13.08 1.404 12 1.404c-1.097 0-2.334.785-3.966 1.821a49.92 49.92 0 0 1-2.816 1.697C2.057 6.66 0 9.59 0 12.908c0 5.35 5.372 9.687 12 9.687v.001ZM10.599 4.715c.334-.759.503-1.58.498-2.409 0-.145.202-.187.23-.029.658 2.783-.902 4.162-2.057 4.624-.124.048-.199-.121-.103-.209a5.763 5.763 0 0 0 1.432-1.977Zm2.058-.102a5.82 5.82 0 0 0-.782-2.306v-.016c-.069-.123.086-.263.185-.172 1.962 2.111 1.307 4.067.556 5.051-.082.103-.23-.003-.189-.126a5.85 5.85 0 0 0 .23-2.431Zm1.776-.561a5.727 5.727 0 0 0-1.612-1.806v-.014c-.112-.085-.024-.274.114-.218 2.595 1.087 2.774 3.18 2.459 4.407a.116.116 0 0 1-.049.071.11.11 0 0 1-.153-.026.122.122 0 0 1-.022-.083 5.891 5.891 0 0 0-.737-2.331Zm-5.087.561c-.617.546-1.282.76-2.063 1-.117 0-.195-.078-.156-.181 1.752-.909 2.376-1.649 2.999-2.778 0 0 .155-.118.188.085 0 .304-.349 1.329-.968 1.874Zm4.945 11.237a2.957 2.957 0 0 1-.937 1.553c-.346.346-.8.565-1.286.62a2.178 2.178 0 0 1-1.327-.62 2.955 2.955 0 0 1-.925-1.553.244.244 0 0 1 .064-.198.234.234 0 0 1 .193-.069h3.965a.226.226 0 0 1 .19.07c.05.053.073.125.063.197Zm-5.458-2.176a1.862 1.862 0 0 1-2.384-.245 1.98 1.98 0 0 1-.233-2.447c.207-.319.503-.566.848-.713a1.84 1.84 0 0 1 1.092-.11c.366.075.703.261.967.531a1.98 1.98 0 0 1 .408 2.114 1.931 1.931 0 0 1-.698.869v.001Zm8.495.005a1.86 1.86 0 0 1-2.381-.253 1.964 1.964 0 0 1-.547-1.366c0-.384.11-.76.32-1.079.207-.319.503-.567.849-.713a1.844 1.844 0 0 1 1.093-.108c.367.076.704.262.968.534a1.98 1.98 0 0 1 .4 2.117 1.932 1.932 0 0 1-.702.868Z" })
49114
+ ]
49115
+ }
49116
+ );
49117
+ const PythonIcon = ({ size }) => /* @__PURE__ */ jsxs(
49118
+ "svg",
49119
+ {
49120
+ width: size,
49121
+ height: size,
49122
+ viewBox: "0 0 24 24",
49123
+ fill: "#3776AB",
49124
+ role: "img",
49125
+ xmlns: "http://www.w3.org/2000/svg",
49126
+ children: [
49127
+ /* @__PURE__ */ jsx("title", { children: "Python" }),
49128
+ /* @__PURE__ */ jsx("path", { d: "M14.25.18l.9.2.73.26.59.3.45.32.34.34.25.34.16.33.1.3.04.26.02.2-.01.13V8.5l-.05.63-.13.55-.21.46-.26.38-.3.31-.33.25-.35.19-.35.14-.33.1-.3.07-.26.04-.21.02H8.77l-.69.05-.59.14-.5.22-.41.27-.33.32-.27.35-.2.36-.15.37-.1.35-.07.32-.04.27-.02.21v3.06H3.17l-.21-.03-.28-.07-.32-.12-.35-.18-.36-.26-.36-.36-.35-.46-.32-.59-.28-.73-.21-.88-.14-1.05-.05-1.23.06-1.22.16-1.04.24-.87.32-.71.36-.57.4-.44.42-.33.42-.24.4-.16.36-.1.32-.05.24-.01h.16l.06.01h8.16v-.83H6.18l-.01-2.75-.02-.37.05-.34.11-.31.17-.28.25-.26.31-.23.38-.2.44-.18.51-.15.58-.12.64-.1.71-.06.77-.04.84-.02 1.27.05zm-6.3 1.98l-.23.33-.08.41.08.41.23.34.33.22.41.09.41-.09.33-.22.23-.34.08-.41-.08-.41-.23-.33-.33-.22-.41-.09-.41.09zm13.09 3.95l.28.06.32.12.35.18.36.27.36.35.35.47.32.59.28.73.21.88.14 1.04.05 1.23-.06 1.23-.16 1.04-.24.86-.32.71-.36.57-.4.45-.42.33-.42.24-.4.16-.36.09-.32.05-.24.02-.16-.01h-8.22v.82h5.84l.01 2.76.02.36-.05.34-.11.31-.17.29-.25.25-.31.24-.38.2-.44.17-.51.15-.58.13-.64.09-.71.07-.77.04-.84.01-1.27-.04-1.07-.14-.9-.2-.73-.25-.59-.3-.45-.33-.34-.34-.25-.34-.16-.33-.1-.3-.04-.25-.02-.2.01-.13v-5.34l.05-.64.13-.54.21-.46.26-.38.3-.32.33-.24.35-.2.35-.14.33-.1.3-.06.26-.04.21-.02.13-.01h5.84l.69-.05.59-.14.5-.21.41-.28.33-.32.27-.35.2-.36.15-.36.1-.35.07-.32.04-.28.02-.21V6.07h2.09l.14.01zm-6.47 14.25l-.23.33-.08.41.08.41.23.33.33.23.41.08.41-.08.33-.23.23-.33.08-.41-.08-.41-.23-.33-.33-.23-.41-.08-.41.08z" })
49129
+ ]
49130
+ }
49131
+ );
49132
+ const PoetryIcon = ({ size }) => /* @__PURE__ */ jsxs(
49133
+ "svg",
49134
+ {
49135
+ width: size,
49136
+ height: size,
49137
+ viewBox: "0 0 24 24",
49138
+ fill: "#60A5FA",
49139
+ role: "img",
49140
+ xmlns: "http://www.w3.org/2000/svg",
49141
+ children: [
49142
+ /* @__PURE__ */ jsx("title", { children: "Poetry" }),
49143
+ /* @__PURE__ */ jsx("path", { d: "M21.604 0a19.144 19.144 0 0 1-5.268 13.213L2.396 0l13.583 13.583a19.149 19.149 0 0 1-13.583 5.624V0h19.208Zm-1.911 17.297A24.455 24.455 0 0 1 7.189 24l-4.053-4.053a19.91 19.91 0 0 0 13.37-5.838l3.187 3.188Z" })
49144
+ ]
49145
+ }
49146
+ );
49147
+ const RustIcon = ({ size }) => /* @__PURE__ */ jsxs(
49148
+ "svg",
49149
+ {
49150
+ width: size,
49151
+ height: size,
49152
+ viewBox: "0 0 24 24",
49153
+ fill: "#000000",
49154
+ role: "img",
49155
+ xmlns: "http://www.w3.org/2000/svg",
49156
+ children: [
49157
+ /* @__PURE__ */ jsx("title", { children: "Rust" }),
49158
+ /* @__PURE__ */ jsx("path", { d: "M23.8346 11.7033l-1.0073-.6236a13.7268 13.7268 0 00-.0283-.2936l.8656-.8069a.3483.3483 0 00-.1154-.578l-1.1066-.414a8.4958 8.4958 0 00-.087-.2856l.6904-.9587a.3462.3462 0 00-.2257-.5446l-1.1663-.1894a9.3574 9.3574 0 00-.1407-.2622l.49-1.0761a.3437.3437 0 00-.0274-.3361.3486.3486 0 00-.3006-.154l-1.1845.0416a6.7444 6.7444 0 00-.1873-.2268l.2723-1.153a.3472.3472 0 00-.417-.4172l-1.1532.2724a14.0183 14.0183 0 00-.2278-.1873l.0415-1.1845a.3442.3442 0 00-.49-.328l-1.076.491c-.0872-.0476-.1742-.0952-.2623-.1407l-.1903-1.1673A.3483.3483 0 0016.256.955l-.9597.6905a8.4867 8.4867 0 00-.2855-.086l-.414-1.1066a.3483.3483 0 00-.5781-.1154l-.8069.8666a9.2936 9.2936 0 00-.2936-.0284L12.2946.1683a.3462.3462 0 00-.5892 0l-.6236 1.0073a13.7383 13.7383 0 00-.2936.0284L9.9803.3374a.3462.3462 0 00-.578.1154l-.4141 1.1065c-.0962.0274-.1903.0567-.2855.086L7.744.955a.3483.3483 0 00-.5447.2258L7.009 2.348a9.3574 9.3574 0 00-.2622.1407l-1.0762-.491a.3462.3462 0 00-.49.328l.0416 1.1845a7.9826 7.9826 0 00-.2278.1873L3.8413 3.425a.3472.3472 0 00-.4171.4171l.2713 1.1531c-.0628.075-.1255.1509-.1863.2268l-1.1845-.0415a.3462.3462 0 00-.328.49l.491 1.0761a9.167 9.167 0 00-.1407.2622l-1.1662.1894a.3483.3483 0 00-.2258.5446l.6904.9587a13.303 13.303 0 00-.087.2855l-1.1065.414a.3483.3483 0 00-.1155.5781l.8656.807a9.2936 9.2936 0 00-.0283.2935l-1.0073.6236a.3442.3442 0 000 .5892l1.0073.6236c.008.0982.0182.1964.0283.2936l-.8656.8079a.3462.3462 0 00.1155.578l1.1065.4141c.0273.0962.0567.1914.087.2855l-.6904.9587a.3452.3452 0 00.2268.5447l1.1662.1893c.0456.088.0922.1751.1408.2622l-.491 1.0762a.3462.3462 0 00.328.49l1.1834-.0415c.0618.0769.1235.1528.1873.2277l-.2713 1.1541a.3462.3462 0 00.4171.4161l1.153-.2713c.075.0638.151.1255.2279.1863l-.0415 1.1845a.3442.3442 0 00.49.327l1.0761-.49c.087.0486.1741.0951.2622.1407l.1903 1.1662a.3483.3483 0 00.5447.2268l.9587-.6904a9.299 9.299 0 00.2855.087l.414 1.1066a.3452.3452 0 00.5781.1154l.8079-.8656c.0972.0111.1954.0203.2936.0294l.6236 1.0073a.3472.3472 0 00.5892 0l.6236-1.0073c.0982-.0091.1964-.0183.2936-.0294l.8069.8656a.3483.3483 0 00.578-.1154l.4141-1.1066a8.4626 8.4626 0 00.2855-.087l.9587.6904a.3452.3452 0 00.5447-.2268l.1903-1.1662c.088-.0456.1751-.0931.2622-.1407l1.0762.49a.3472.3472 0 00.49-.327l-.0415-1.1845a6.7267 6.7267 0 00.2267-.1863l1.1531.2713a.3472.3472 0 00.4171-.416l-.2713-1.1542c.0628-.0749.1255-.1508.1863-.2278l1.1845.0415a.3442.3442 0 00.328-.49l-.49-1.076c.0475-.0872.0951-.1742.1407-.2623l1.1662-.1893a.3483.3483 0 00.2258-.5447l-.6904-.9587.087-.2855 1.1066-.414a.3462.3462 0 00.1154-.5781l-.8656-.8079c.0101-.0972.0202-.1954.0283-.2936l1.0073-.6236a.3442.3442 0 000-.5892zm-6.7413 8.3551a.7138.7138 0 01.2986-1.396.714.714 0 11-.2997 1.396zm-.3422-2.3142a.649.649 0 00-.7715.5l-.3573 1.6685c-1.1035.501-2.3285.7795-3.6193.7795a8.7368 8.7368 0 01-3.6951-.814l-.3574-1.6684a.648.648 0 00-.7714-.499l-1.473.3158a8.7216 8.7216 0 01-.7613-.898h7.1676c.081 0 .1356-.0141.1356-.088v-2.536c0-.074-.0536-.0881-.1356-.0881h-2.0966v-1.6077h2.2677c.2065 0 1.1065.0587 1.394 1.2088.0901.3533.2875 1.5044.4232 1.8729.1346.413.6833 1.2381 1.2685 1.2381h3.5716a.7492.7492 0 00.1296-.0131 8.7874 8.7874 0 01-.8119.9526zM6.8369 20.024a.714.714 0 11-.2997-1.396.714.714 0 01.2997 1.396zM4.1177 8.9972a.7137.7137 0 11-1.304.5791.7137.7137 0 011.304-.579zm-.8352 1.9813l1.5347-.6824a.65.65 0 00.33-.8585l-.3158-.7147h1.2432v5.6025H3.5669a8.7753 8.7753 0 01-.2834-3.348zm6.7343-.5437V8.7836h2.9601c.153 0 1.0792.1772 1.0792.8697 0 .575-.7107.7815-1.2948.7815zm10.7574 1.4862c0 .2187-.008.4363-.0243.651h-.9c-.09 0-.1265.0586-.1265.1477v.413c0 .973-.5487 1.1846-1.0296 1.2382-.4576.0517-.9648-.1913-1.0275-.4717-.2704-1.5186-.7198-1.8436-1.4305-2.4034.8817-.5599 1.799-1.386 1.799-2.4915 0-1.1936-.819-1.9458-1.3769-2.3153-.7825-.5163-1.6491-.6195-1.883-.6195H5.4682a8.7651 8.7651 0 014.907-2.7699l1.0974 1.151a.648.648 0 00.9182.0213l1.227-1.1743a8.7753 8.7753 0 016.0044 4.2762l-.8403 1.8982a.652.652 0 00.33.8585l1.6178.7188c.0283.2875.0425.577.0425.8717zm-9.3006-9.5993a.7128.7128 0 11.984 1.0316.7137.7137 0 01-.984-1.0316zm8.3389 6.71a.7107.7107 0 01.9395-.3625.7137.7137 0 11-.9405.3635z" })
49159
+ ]
49160
+ }
49161
+ );
49162
+ const PackageManagerIcon$1 = ({
49163
+ packageManager,
49164
+ size = 18,
49165
+ color: color2
49166
+ }) => {
49167
+ switch (packageManager) {
49168
+ case "npm":
49169
+ return /* @__PURE__ */ jsx(NpmIcon$1, { size });
49170
+ case "yarn":
49171
+ return /* @__PURE__ */ jsx(YarnIcon$1, { size });
49172
+ case "pnpm":
49173
+ return /* @__PURE__ */ jsx(PnpmIcon$1, { size });
49174
+ case "bun":
49175
+ return /* @__PURE__ */ jsx(BunIcon$1, { size });
49176
+ case "pip":
49177
+ case "pipenv":
49178
+ return /* @__PURE__ */ jsx(PythonIcon, { size });
49179
+ case "poetry":
49180
+ return /* @__PURE__ */ jsx(PoetryIcon, { size });
49181
+ case "cargo":
49182
+ return /* @__PURE__ */ jsx(RustIcon, { size });
49183
+ case "unknown":
49184
+ default:
49185
+ return /* @__PURE__ */ jsx(Package, { size, color: color2 });
49186
+ }
49187
+ };
49188
+ const PackageInfo = ({ packageData, workspacePackageCount }) => {
49189
+ const { theme: theme2 } = useTheme();
49190
+ const totalDeps = Object.keys(packageData.dependencies).length;
49191
+ const totalDevDeps = Object.keys(packageData.devDependencies).length;
49192
+ const totalPeerDeps = Object.keys(packageData.peerDependencies).length;
49193
+ const totalAllDeps = totalDeps + totalDevDeps + totalPeerDeps;
49194
+ return /* @__PURE__ */ jsxs(
49195
+ "div",
49196
+ {
49197
+ style: {
49198
+ display: "flex",
49199
+ flexDirection: "column",
49200
+ gap: `${theme2.space[2]}px`
49201
+ },
49202
+ children: [
49203
+ /* @__PURE__ */ jsxs(
49204
+ "div",
49205
+ {
49206
+ style: {
49207
+ display: "flex",
49208
+ alignItems: "center",
49209
+ gap: `${theme2.space[2]}px`
49210
+ },
49211
+ children: [
49212
+ /* @__PURE__ */ jsx(PackageManagerIcon$1, { packageManager: packageData.packageManager, size: 18 }),
49213
+ /* @__PURE__ */ jsxs(
49214
+ "div",
49215
+ {
49216
+ style: {
49217
+ flex: 1,
49218
+ minWidth: 0,
49219
+ display: "flex",
49220
+ flexDirection: "column",
49221
+ gap: `${theme2.space[1]}px`
49222
+ },
49223
+ children: [
49224
+ /* @__PURE__ */ jsx(
49225
+ "div",
49226
+ {
49227
+ style: {
49228
+ fontSize: theme2.fontSizes[2],
49229
+ fontFamily: theme2.fonts.body,
49230
+ fontWeight: theme2.fontWeights.semibold,
49231
+ color: theme2.colors.text,
49232
+ overflow: "hidden",
49233
+ textOverflow: "ellipsis",
49234
+ whiteSpace: "nowrap"
49235
+ },
49236
+ children: packageData.name
49237
+ }
49238
+ ),
49239
+ /* @__PURE__ */ jsxs(
49240
+ "div",
49241
+ {
49242
+ style: {
49243
+ fontSize: theme2.fontSizes[0],
49244
+ fontFamily: theme2.fonts.body,
49245
+ color: theme2.colors.textSecondary,
49246
+ display: "flex",
49247
+ alignItems: "center",
49248
+ gap: `${theme2.space[2]}px`
49249
+ },
49250
+ children: [
49251
+ packageData.version && /* @__PURE__ */ jsxs("span", { children: [
49252
+ "v",
49253
+ packageData.version
49254
+ ] }),
49255
+ packageData.license && /* @__PURE__ */ jsxs(Fragment, { children: [
49256
+ /* @__PURE__ */ jsx("span", { style: { color: theme2.colors.border }, children: "•" }),
49257
+ /* @__PURE__ */ jsx("span", { children: packageData.license })
49258
+ ] })
49259
+ ]
49260
+ }
49261
+ )
49262
+ ]
49263
+ }
49264
+ )
49265
+ ]
49266
+ }
49267
+ ),
49268
+ packageData.description && /* @__PURE__ */ jsx(
49269
+ "div",
49270
+ {
49271
+ style: {
49272
+ fontSize: theme2.fontSizes[1],
49273
+ fontFamily: theme2.fonts.body,
49274
+ color: theme2.colors.textSecondary,
49275
+ lineHeight: theme2.lineHeights.body,
49276
+ overflow: "hidden",
49277
+ display: "-webkit-box",
49278
+ WebkitLineClamp: 2,
49279
+ WebkitBoxOrient: "vertical"
49280
+ },
49281
+ children: packageData.description
49282
+ }
49283
+ ),
49284
+ /* @__PURE__ */ jsx(
49285
+ "div",
49286
+ {
49287
+ style: {
49288
+ display: "flex",
49289
+ alignItems: "center",
49290
+ gap: `${theme2.space[2]}px`,
49291
+ flexWrap: "wrap",
49292
+ fontSize: theme2.fontSizes[0],
49293
+ fontFamily: theme2.fonts.body,
49294
+ color: theme2.colors.textSecondary
49295
+ },
49296
+ children: workspacePackageCount != null && workspacePackageCount > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
49297
+ /* @__PURE__ */ jsx(
49298
+ "div",
49299
+ {
49300
+ style: {
49301
+ display: "inline-flex",
49302
+ alignItems: "center",
49303
+ padding: `${theme2.space[1]}px ${theme2.space[2]}px`,
49304
+ fontSize: theme2.fontSizes[0],
49305
+ fontFamily: theme2.fonts.body,
49306
+ fontWeight: theme2.fontWeights.semibold,
49307
+ color: theme2.colors.primary,
49308
+ backgroundColor: `${theme2.colors.primary}15`,
49309
+ borderRadius: "4px"
49310
+ },
49311
+ children: "Monorepo"
49312
+ }
49313
+ ),
49314
+ /* @__PURE__ */ jsx("span", { style: { color: theme2.colors.border }, children: "•" }),
49315
+ /* @__PURE__ */ jsxs("span", { children: [
49316
+ workspacePackageCount,
49317
+ " workspace",
49318
+ workspacePackageCount !== 1 ? "s" : ""
49319
+ ] })
49320
+ ] }) : /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: `${theme2.space[1]}px` }, children: [
49321
+ /* @__PURE__ */ jsx(Package2, { size: 12 }),
49322
+ /* @__PURE__ */ jsxs("span", { children: [
49323
+ totalAllDeps,
49324
+ " dep",
49325
+ totalAllDeps !== 1 ? "s" : ""
49326
+ ] })
49327
+ ] }) })
49328
+ }
49329
+ )
49330
+ ]
49331
+ }
49332
+ );
49333
+ };
49057
49334
  const Legend = ({
49058
49335
  fileTypes,
49336
+ packageData,
49337
+ workspacePackageCount,
49059
49338
  gitStatus,
49060
49339
  prFiles,
49061
49340
  prFileStats,
@@ -49086,13 +49365,17 @@ const Legend = ({
49086
49365
  position = "bottom"
49087
49366
  }) => {
49088
49367
  const { theme: theme2 } = useTheme();
49368
+ const [viewMode, setViewMode] = useState("package");
49089
49369
  const hasGitStatus = gitStatus != null && (gitStatus.stagedFiles.length > 0 || gitStatus.modifiedFiles.length > 0 || gitStatus.untrackedFiles.length > 0 || gitStatus.deletedFiles.length > 0);
49090
49370
  const hasPrFiles = prFiles != null && (prFiles.added.length > 0 || prFiles.modified.length > 0 || prFiles.removed.length > 0 || prFiles.renamed.length > 0);
49091
49371
  const hasCommitFiles = commitFiles != null && (commitFiles.added.length > 0 || commitFiles.modified.length > 0 || commitFiles.removed.length > 0 || commitFiles.renamed.length > 0);
49092
49372
  const hasStoryboardContext = (storyboardContext == null ? void 0 : storyboardContext.storyboard) != null;
49093
49373
  const hasAgentLayers = agentLayers && agentLayers.length > 0;
49094
49374
  const hasQualityMetrics = qualityMetrics && qualityMetrics.length > 0;
49095
- const isEmpty = fileTypes.length === 0 && !hasGitStatus && !hasPrFiles && !hasCommitFiles && !hasStoryboardContext && !hasAgentLayers && !hasQualityMetrics;
49375
+ const hasPackageData = packageData != null;
49376
+ const hasFileTypes = fileTypes.length > 0;
49377
+ const showToggle = hasPackageData && hasFileTypes && !hasPrFiles && !hasCommitFiles && !hasStoryboardContext;
49378
+ const isEmpty = fileTypes.length === 0 && !hasGitStatus && !hasPrFiles && !hasCommitFiles && !hasStoryboardContext && !hasAgentLayers && !hasQualityMetrics && !hasPackageData;
49096
49379
  const qualityModeLabels = {
49097
49380
  coverage: "Test Coverage",
49098
49381
  eslint: "Linting Quality",
@@ -49122,6 +49405,67 @@ const Legend = ({
49122
49405
  ]
49123
49406
  }
49124
49407
  ),
49408
+ hasPackageData && !hasPrFiles && !hasCommitFiles && !hasStoryboardContext && viewMode === "package" && /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "8px", padding: `0 ${horizontalPadding}` }, children: [
49409
+ /* @__PURE__ */ jsxs(
49410
+ "div",
49411
+ {
49412
+ style: {
49413
+ display: "flex",
49414
+ alignItems: "center",
49415
+ justifyContent: "space-between",
49416
+ gap: "6px"
49417
+ },
49418
+ children: [
49419
+ /* @__PURE__ */ jsxs(
49420
+ "div",
49421
+ {
49422
+ style: {
49423
+ display: "flex",
49424
+ alignItems: "center",
49425
+ gap: "6px",
49426
+ fontSize: theme2.fontSizes[0],
49427
+ fontFamily: theme2.fonts.body,
49428
+ fontWeight: 600,
49429
+ color: theme2.colors.textSecondary,
49430
+ textTransform: "uppercase",
49431
+ letterSpacing: "0.5px"
49432
+ },
49433
+ children: [
49434
+ /* @__PURE__ */ jsx(Package2, { size: 12 }),
49435
+ "Package"
49436
+ ]
49437
+ }
49438
+ ),
49439
+ showToggle && /* @__PURE__ */ jsxs(
49440
+ "button",
49441
+ {
49442
+ onClick: () => setViewMode("fileTypes"),
49443
+ style: {
49444
+ display: "flex",
49445
+ alignItems: "center",
49446
+ gap: "4px",
49447
+ padding: "2px 6px",
49448
+ fontSize: theme2.fontSizes[0],
49449
+ fontFamily: theme2.fonts.body,
49450
+ color: theme2.colors.textSecondary,
49451
+ backgroundColor: "transparent",
49452
+ border: `1px solid ${theme2.colors.border}`,
49453
+ borderRadius: "3px",
49454
+ cursor: "pointer",
49455
+ transition: "all 0.15s ease"
49456
+ },
49457
+ title: "Show file types",
49458
+ children: [
49459
+ /* @__PURE__ */ jsx(Layers, { size: 10 }),
49460
+ "Types"
49461
+ ]
49462
+ }
49463
+ )
49464
+ ]
49465
+ }
49466
+ ),
49467
+ /* @__PURE__ */ jsx(PackageInfo, { packageData, workspacePackageCount })
49468
+ ] }),
49125
49469
  hasQualityMetrics && colorMode && /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "8px", padding: `0 ${horizontalPadding}` }, children: [
49126
49470
  /* @__PURE__ */ jsxs(
49127
49471
  "div",
@@ -49556,19 +49900,57 @@ const Legend = ({
49556
49900
  }
49557
49901
  ) })
49558
49902
  ] }),
49559
- fileTypes.length > 0 && !hasPrFiles && !hasCommitFiles && !hasStoryboardContext && /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "8px", padding: `0 ${horizontalPadding}` }, children: [
49560
- /* @__PURE__ */ jsx(
49903
+ fileTypes.length > 0 && !hasPrFiles && !hasCommitFiles && !hasStoryboardContext && (viewMode === "fileTypes" || !hasPackageData) && /* @__PURE__ */ jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "8px", padding: `0 ${horizontalPadding}` }, children: [
49904
+ /* @__PURE__ */ jsxs(
49561
49905
  "div",
49562
49906
  {
49563
49907
  style: {
49564
- fontSize: theme2.fontSizes[0],
49565
- fontFamily: theme2.fonts.body,
49566
- fontWeight: 600,
49567
- color: theme2.colors.textSecondary,
49568
- textTransform: "uppercase",
49569
- letterSpacing: "0.5px"
49908
+ display: "flex",
49909
+ alignItems: "center",
49910
+ justifyContent: "space-between",
49911
+ gap: "6px"
49570
49912
  },
49571
- children: "File Types"
49913
+ children: [
49914
+ /* @__PURE__ */ jsx(
49915
+ "div",
49916
+ {
49917
+ style: {
49918
+ fontSize: theme2.fontSizes[0],
49919
+ fontFamily: theme2.fonts.body,
49920
+ fontWeight: 600,
49921
+ color: theme2.colors.textSecondary,
49922
+ textTransform: "uppercase",
49923
+ letterSpacing: "0.5px"
49924
+ },
49925
+ children: "File Types"
49926
+ }
49927
+ ),
49928
+ showToggle && /* @__PURE__ */ jsxs(
49929
+ "button",
49930
+ {
49931
+ onClick: () => setViewMode("package"),
49932
+ style: {
49933
+ display: "flex",
49934
+ alignItems: "center",
49935
+ gap: "4px",
49936
+ padding: "2px 6px",
49937
+ fontSize: theme2.fontSizes[0],
49938
+ fontFamily: theme2.fonts.body,
49939
+ color: theme2.colors.textSecondary,
49940
+ backgroundColor: "transparent",
49941
+ border: `1px solid ${theme2.colors.border}`,
49942
+ borderRadius: "3px",
49943
+ cursor: "pointer",
49944
+ transition: "all 0.15s ease"
49945
+ },
49946
+ title: "Show package",
49947
+ children: [
49948
+ /* @__PURE__ */ jsx(Package2, { size: 10 }),
49949
+ "Package"
49950
+ ]
49951
+ }
49952
+ )
49953
+ ]
49572
49954
  }
49573
49955
  ),
49574
49956
  /* @__PURE__ */ jsx(
@@ -50883,8 +51265,7 @@ const TourPlayer = ({
50883
51265
  visible = true,
50884
51266
  position,
50885
51267
  skipWelcome = false,
50886
- ttsAdapter,
50887
- tourAudioContext,
51268
+ audioUrls,
50888
51269
  autoPlayAudio = false,
50889
51270
  autoAdvanceOnAudioEnd = false,
50890
51271
  autoAdvanceDelay = 1e3
@@ -50894,10 +51275,12 @@ const TourPlayer = ({
50894
51275
  const [completedSteps, setCompletedSteps] = useState(/* @__PURE__ */ new Set());
50895
51276
  const [isPlaying, setIsPlaying] = useState(skipWelcome);
50896
51277
  const [autoAdvanceTimeRemaining, setAutoAdvanceTimeRemaining] = useState(null);
50897
- const [ttsState, setTtsState] = useState((ttsAdapter == null ? void 0 : ttsAdapter.state) || null);
50898
- const [audioReady, setAudioReady] = useState(false);
51278
+ const [isAudioPlaying, setIsAudioPlaying] = useState(false);
51279
+ const [isAudioPaused, setIsAudioPaused] = useState(false);
51280
+ const [audioDuration, setAudioDuration] = useState(0);
51281
+ const [audioCurrentTime, setAudioCurrentTime] = useState(0);
50899
51282
  const [isAutoPlaying, setIsAutoPlaying] = useState(false);
50900
- const ttsStateUpdateInterval = useRef(null);
51283
+ const audioElementRef = useRef(null);
50901
51284
  const currentStepIndex = controlledStepIndex !== void 0 ? controlledStepIndex : internalStepIndex;
50902
51285
  const currentStep = tour.steps[currentStepIndex];
50903
51286
  const isFirstStep = currentStepIndex === 0;
@@ -50964,98 +51347,126 @@ const TourPlayer = ({
50964
51347
  [onInteractiveAction]
50965
51348
  );
50966
51349
  useEffect(() => {
50967
- if (!ttsAdapter || !tourAudioContext) return;
50968
- async function loadAudio() {
50969
- try {
50970
- const stepIds = tour.steps.map((step) => step.id);
50971
- await ttsAdapter.fetchTourAudio(tour.id, stepIds, tourAudioContext);
50972
- setAudioReady(true);
50973
- } catch (error) {
50974
- console.error("[TourPlayer] Failed to load tour audio:", error);
50975
- }
50976
- }
50977
- loadAudio();
50978
- }, [ttsAdapter, tourAudioContext, tour]);
50979
- useEffect(() => {
50980
- if (!ttsAdapter) return;
50981
- ttsStateUpdateInterval.current = setInterval(() => {
50982
- setTtsState({ ...ttsAdapter.state });
50983
- }, 100);
50984
51350
  return () => {
50985
- if (ttsStateUpdateInterval.current) {
50986
- clearInterval(ttsStateUpdateInterval.current);
50987
- ttsStateUpdateInterval.current = null;
51351
+ if (audioElementRef.current) {
51352
+ audioElementRef.current.pause();
51353
+ audioElementRef.current = null;
50988
51354
  }
50989
51355
  };
50990
- }, [ttsAdapter]);
51356
+ }, []);
50991
51357
  useEffect(() => {
50992
- if (!ttsAdapter || !autoAdvanceOnAudioEnd || !isAutoPlaying) return;
50993
- const handleAudioEnded = () => {
50994
- console.log("[TourPlayer] Audio ended, auto-advancing...");
50995
- setTimeout(() => {
50996
- if (!isLastStep) {
50997
- nextStep();
50998
- } else {
50999
- console.log("[TourPlayer] Tour complete");
51000
- setIsAutoPlaying(false);
51001
- handleExit();
51002
- }
51003
- }, autoAdvanceDelay);
51004
- };
51005
- ttsAdapter.addEventListener("ended", handleAudioEnded);
51006
- return () => ttsAdapter.removeEventListener("ended", handleAudioEnded);
51007
- }, [ttsAdapter, autoAdvanceOnAudioEnd, isAutoPlaying, isLastStep, autoAdvanceDelay, nextStep, handleExit]);
51358
+ if (!isAutoPlaying && audioElementRef.current) {
51359
+ audioElementRef.current.pause();
51360
+ audioElementRef.current = null;
51361
+ setIsAudioPlaying(false);
51362
+ setIsAudioPaused(false);
51363
+ }
51364
+ }, [currentStepIndex, isAutoPlaying]);
51008
51365
  useEffect(() => {
51009
- if (!ttsAdapter || !autoPlayAudio || !isPlaying || !audioReady || !isAutoPlaying) return;
51010
- const playCurrentStep = async () => {
51011
- try {
51012
- await ttsAdapter.speak(currentStep.id);
51013
- } catch (error) {
51014
- console.error("[TourPlayer] Auto-play failed:", error);
51015
- setIsAutoPlaying(false);
51366
+ if (!autoPlayAudio || !isPlaying || !audioUrls || !isAutoPlaying) return;
51367
+ const audioUrl = audioUrls.get(currentStep.id);
51368
+ if (!audioUrl) return;
51369
+ const timer2 = setTimeout(() => {
51370
+ playAudio(audioUrl);
51371
+ }, 100);
51372
+ return () => clearTimeout(timer2);
51373
+ }, [currentStep == null ? void 0 : currentStep.id, isPlaying, audioUrls, autoPlayAudio, isAutoPlaying]);
51374
+ const playAudio = useCallback((audioUrl) => {
51375
+ if (audioElementRef.current) {
51376
+ audioElementRef.current.pause();
51377
+ }
51378
+ const audio = new Audio(audioUrl);
51379
+ audioElementRef.current = audio;
51380
+ audio.addEventListener("loadedmetadata", () => {
51381
+ setAudioDuration(audio.duration);
51382
+ });
51383
+ audio.addEventListener("timeupdate", () => {
51384
+ setAudioCurrentTime(audio.currentTime);
51385
+ });
51386
+ audio.addEventListener("play", () => {
51387
+ setIsAudioPlaying(true);
51388
+ setIsAudioPaused(false);
51389
+ });
51390
+ audio.addEventListener("pause", () => {
51391
+ if (!audio.ended) {
51392
+ setIsAudioPlaying(false);
51393
+ setIsAudioPaused(true);
51016
51394
  }
51017
- };
51018
- playCurrentStep();
51019
- }, [ttsAdapter, autoPlayAudio, currentStep == null ? void 0 : currentStep.id, isPlaying, audioReady, isAutoPlaying]);
51020
- useEffect(() => {
51021
- return () => {
51022
- if (ttsAdapter) {
51023
- ttsAdapter.stop();
51395
+ });
51396
+ audio.addEventListener("ended", () => {
51397
+ setIsAudioPlaying(false);
51398
+ setIsAudioPaused(false);
51399
+ setAudioCurrentTime(0);
51400
+ if (isAutoPlaying && autoAdvanceOnAudioEnd) {
51401
+ setTimeout(() => {
51402
+ if (!isLastStep) {
51403
+ nextStep();
51404
+ } else {
51405
+ setIsAutoPlaying(false);
51406
+ }
51407
+ }, autoAdvanceDelay);
51024
51408
  }
51025
- };
51026
- }, [ttsAdapter]);
51027
- const handleReadAloud = useCallback(async () => {
51028
- if (!ttsAdapter || !audioReady) return;
51029
- if (ttsState == null ? void 0 : ttsState.isPlaying) {
51030
- ttsAdapter.stop();
51031
- return;
51409
+ });
51410
+ audio.play().catch((error) => {
51411
+ console.error("[TourPlayer] Audio playback failed:", error);
51412
+ });
51413
+ }, [isAutoPlaying, autoAdvanceOnAudioEnd, isLastStep, autoAdvanceDelay, nextStep]);
51414
+ const stopAudio = useCallback(() => {
51415
+ if (audioElementRef.current) {
51416
+ audioElementRef.current.pause();
51417
+ audioElementRef.current.currentTime = 0;
51418
+ audioElementRef.current = null;
51419
+ setIsAudioPlaying(false);
51420
+ setIsAudioPaused(false);
51421
+ setAudioCurrentTime(0);
51422
+ }
51423
+ }, []);
51424
+ useCallback(() => {
51425
+ if (audioElementRef.current && isAudioPlaying) {
51426
+ audioElementRef.current.pause();
51427
+ }
51428
+ }, [isAudioPlaying]);
51429
+ const resumeAudio = useCallback(() => {
51430
+ if (audioElementRef.current && isAudioPaused) {
51431
+ audioElementRef.current.play().catch((error) => {
51432
+ console.error("[TourPlayer] Audio resume failed:", error);
51433
+ });
51032
51434
  }
51033
- if (ttsState == null ? void 0 : ttsState.isPaused) {
51034
- ttsAdapter.resume();
51435
+ }, [isAudioPaused]);
51436
+ const handleReadAloud = useCallback(() => {
51437
+ if (!audioUrls) return;
51438
+ const audioUrl = audioUrls.get(currentStep.id);
51439
+ if (!audioUrl) return;
51440
+ if (isAudioPlaying) {
51441
+ stopAudio();
51035
51442
  return;
51036
51443
  }
51037
- try {
51038
- await ttsAdapter.speak(currentStep.id);
51039
- } catch (error) {
51040
- console.error("[TourPlayer] TTS failed:", error);
51444
+ if (isAudioPaused) {
51445
+ resumeAudio();
51446
+ return;
51041
51447
  }
51042
- }, [ttsAdapter, ttsState, audioReady, currentStep == null ? void 0 : currentStep.id]);
51448
+ playAudio(audioUrl);
51449
+ }, [audioUrls, currentStep.id, isAudioPlaying, isAudioPaused, stopAudio, resumeAudio, playAudio]);
51043
51450
  const toggleAutoPlay = useCallback(() => {
51044
- if (!ttsAdapter || !audioReady) return;
51451
+ if (!audioUrls) return;
51045
51452
  if (isAutoPlaying) {
51046
51453
  setIsAutoPlaying(false);
51047
- ttsAdapter.stop();
51454
+ stopAudio();
51048
51455
  } else {
51049
51456
  setIsAutoPlaying(true);
51050
- ttsAdapter.speak(currentStep.id);
51457
+ const audioUrl = audioUrls.get(currentStep.id);
51458
+ if (audioUrl) {
51459
+ playAudio(audioUrl);
51460
+ }
51051
51461
  }
51052
- }, [isAutoPlaying, ttsAdapter, audioReady, currentStep == null ? void 0 : currentStep.id]);
51462
+ }, [isAutoPlaying, audioUrls, currentStep.id, stopAudio, playAudio]);
51053
51463
  const formatTime = (seconds) => {
51054
51464
  const mins = Math.floor(seconds / 60);
51055
51465
  const secs = Math.floor(seconds % 60);
51056
51466
  return `${mins}:${secs.toString().padStart(2, "0")}`;
51057
51467
  };
51058
- const showTTSControls = !!ttsAdapter && audioReady;
51468
+ const hasAudio = !!audioUrls && audioUrls.size > 0;
51469
+ const currentStepHasAudio = hasAudio && audioUrls.has(currentStep.id);
51059
51470
  const canAutoPlay = autoPlayAudio && autoAdvanceOnAudioEnd;
51060
51471
  if (!visible) return null;
51061
51472
  const useAbsolutePositioning = position === "overlay";
@@ -51293,7 +51704,7 @@ const TourPlayer = ({
51293
51704
  ]
51294
51705
  }
51295
51706
  ),
51296
- showTTSControls && canAutoPlay && /* @__PURE__ */ jsxs(
51707
+ hasAudio && canAutoPlay && /* @__PURE__ */ jsxs(
51297
51708
  "button",
51298
51709
  {
51299
51710
  onClick: () => {
@@ -51622,7 +52033,7 @@ const TourPlayer = ({
51622
52033
  ] })
51623
52034
  }
51624
52035
  ),
51625
- showTTSControls && /* @__PURE__ */ jsxs(
52036
+ currentStepHasAudio && /* @__PURE__ */ jsxs(
51626
52037
  "div",
51627
52038
  {
51628
52039
  style: {
@@ -51639,7 +52050,6 @@ const TourPlayer = ({
51639
52050
  "button",
51640
52051
  {
51641
52052
  onClick: handleReadAloud,
51642
- disabled: (ttsState == null ? void 0 : ttsState.isLoading) || !audioReady,
51643
52053
  style: {
51644
52054
  display: "flex",
51645
52055
  alignItems: "center",
@@ -51651,24 +52061,20 @@ const TourPlayer = ({
51651
52061
  borderRadius: "8px",
51652
52062
  fontSize: theme2.fontSizes[2],
51653
52063
  fontFamily: theme2.fonts.body,
51654
- cursor: (ttsState == null ? void 0 : ttsState.isLoading) || !audioReady ? "not-allowed" : "pointer",
51655
- opacity: (ttsState == null ? void 0 : ttsState.isLoading) || !audioReady ? 0.5 : 1,
52064
+ cursor: "pointer",
51656
52065
  transition: "all 0.2s"
51657
52066
  },
51658
52067
  onMouseEnter: (e) => {
51659
- if (!(ttsState == null ? void 0 : ttsState.isLoading) && audioReady) {
51660
- e.currentTarget.style.backgroundColor = theme2.colors.backgroundLight;
51661
- }
52068
+ e.currentTarget.style.backgroundColor = theme2.colors.backgroundLight;
51662
52069
  },
51663
52070
  onMouseLeave: (e) => {
51664
52071
  e.currentTarget.style.backgroundColor = "transparent";
51665
52072
  },
51666
52073
  children: [
51667
- (ttsState == null ? void 0 : ttsState.isLoading) && /* @__PURE__ */ jsx(LoaderCircle, { size: 16, className: "animate-spin", style: { animation: "spin 1s linear infinite" } }),
51668
- (ttsState == null ? void 0 : ttsState.isPlaying) && /* @__PURE__ */ jsx(Volume2, { size: 16 }),
51669
- (ttsState == null ? void 0 : ttsState.isPaused) && /* @__PURE__ */ jsx(VolumeX, { size: 16 }),
51670
- !(ttsState == null ? void 0 : ttsState.isPlaying) && !(ttsState == null ? void 0 : ttsState.isPaused) && !(ttsState == null ? void 0 : ttsState.isLoading) && /* @__PURE__ */ jsx(Volume2, { size: 16 }),
51671
- /* @__PURE__ */ jsx("span", { children: (ttsState == null ? void 0 : ttsState.isLoading) ? "Loading..." : (ttsState == null ? void 0 : ttsState.isPlaying) ? "Stop" : (ttsState == null ? void 0 : ttsState.isPaused) ? "Resume" : "Read Aloud" })
52074
+ isAudioPlaying && /* @__PURE__ */ jsx(Volume2, { size: 16 }),
52075
+ isAudioPaused && /* @__PURE__ */ jsx(VolumeX, { size: 16 }),
52076
+ !isAudioPlaying && !isAudioPaused && /* @__PURE__ */ jsx(Volume2, { size: 16 }),
52077
+ /* @__PURE__ */ jsx("span", { children: isAudioPlaying ? "Stop" : isAudioPaused ? "Resume" : "Read Aloud" })
51672
52078
  ]
51673
52079
  }
51674
52080
  ),
@@ -51676,7 +52082,6 @@ const TourPlayer = ({
51676
52082
  "button",
51677
52083
  {
51678
52084
  onClick: toggleAutoPlay,
51679
- disabled: !audioReady,
51680
52085
  style: {
51681
52086
  display: "flex",
51682
52087
  alignItems: "center",
@@ -51688,14 +52093,11 @@ const TourPlayer = ({
51688
52093
  borderRadius: "8px",
51689
52094
  fontSize: theme2.fontSizes[2],
51690
52095
  fontFamily: theme2.fonts.body,
51691
- cursor: !audioReady ? "not-allowed" : "pointer",
51692
- opacity: !audioReady ? 0.5 : 1,
52096
+ cursor: "pointer",
51693
52097
  transition: "all 0.2s"
51694
52098
  },
51695
52099
  onMouseEnter: (e) => {
51696
- if (audioReady) {
51697
- e.currentTarget.style.opacity = "0.8";
51698
- }
52100
+ e.currentTarget.style.opacity = "0.8";
51699
52101
  },
51700
52102
  onMouseLeave: (e) => {
51701
52103
  e.currentTarget.style.opacity = "1";
@@ -51707,8 +52109,8 @@ const TourPlayer = ({
51707
52109
  }
51708
52110
  )
51709
52111
  ] }),
51710
- (ttsState == null ? void 0 : ttsState.isPlaying) && ttsState.duration && /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
51711
- /* @__PURE__ */ jsx("span", { style: { fontSize: theme2.fontSizes[1], color: theme2.colors.textSecondary, minWidth: "35px" }, children: formatTime(ttsState.currentTime || 0) }),
52112
+ isAudioPlaying && audioDuration > 0 && /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
52113
+ /* @__PURE__ */ jsx("span", { style: { fontSize: theme2.fontSizes[1], color: theme2.colors.textSecondary, minWidth: "35px" }, children: formatTime(audioCurrentTime) }),
51712
52114
  /* @__PURE__ */ jsx(
51713
52115
  "div",
51714
52116
  {
@@ -51724,7 +52126,7 @@ const TourPlayer = ({
51724
52126
  {
51725
52127
  style: {
51726
52128
  height: "100%",
51727
- width: `${ttsState.progress || 0}%`,
52129
+ width: `${audioCurrentTime / audioDuration * 100}%`,
51728
52130
  backgroundColor: theme2.colors.primary,
51729
52131
  transition: "width 0.1s linear"
51730
52132
  }
@@ -51732,7 +52134,7 @@ const TourPlayer = ({
51732
52134
  )
51733
52135
  }
51734
52136
  ),
51735
- /* @__PURE__ */ jsx("span", { style: { fontSize: theme2.fontSizes[1], color: theme2.colors.textSecondary, minWidth: "35px" }, children: formatTime(ttsState.duration) })
52137
+ /* @__PURE__ */ jsx("span", { style: { fontSize: theme2.fontSizes[1], color: theme2.colors.textSecondary, minWidth: "35px" }, children: formatTime(audioDuration) })
51736
52138
  ] })
51737
52139
  ]
51738
52140
  }
@@ -53583,6 +53985,7 @@ const CodeCityPanelContent = ({
53583
53985
  const agentHighlightLayersSlice = context.getSlice("agentHighlightLayers");
53584
53986
  const colorModesSlice = context.getSlice("fileCityColorModes");
53585
53987
  const qualityData = (_c = colorModesSlice == null ? void 0 : colorModesSlice.data) == null ? void 0 : _c.qualityData;
53988
+ const packagesSlice = context.getSlice("packages");
53586
53989
  const fileColorLayersRegistered = useRef(false);
53587
53990
  const gitLayersRegistered = useRef(false);
53588
53991
  const prFilesLayersRegistered = useRef(false);
@@ -54230,6 +54633,30 @@ const CodeCityPanelContent = ({
54230
54633
  };
54231
54634
  });
54232
54635
  }, [baseLayers, highlightLayers, colorMode]);
54636
+ const legendPackageData = useMemo(() => {
54637
+ var _a2;
54638
+ if (!((_a2 = packagesSlice == null ? void 0 : packagesSlice.data) == null ? void 0 : _a2.packages) || packagesSlice.data.packages.length === 0) {
54639
+ return { packageData: null, workspacePackageCount: 0 };
54640
+ }
54641
+ const rootPackage = packagesSlice.data.packages.find((pkg) => pkg.packageData.path === "") || packagesSlice.data.packages[0];
54642
+ const workspaceCount = packagesSlice.data.summary.isMonorepo ? packagesSlice.data.summary.workspacePackages.length : 0;
54643
+ return {
54644
+ packageData: {
54645
+ name: rootPackage.packageData.name,
54646
+ path: rootPackage.packageData.path,
54647
+ version: rootPackage.packageData.version,
54648
+ description: rootPackage.packageData.description,
54649
+ license: rootPackage.packageData.license,
54650
+ packageManager: rootPackage.packageData.packageManager,
54651
+ dependencies: rootPackage.packageData.dependencies || {},
54652
+ devDependencies: rootPackage.packageData.devDependencies || {},
54653
+ peerDependencies: rootPackage.packageData.peerDependencies || {},
54654
+ availableCommands: rootPackage.packageData.availableCommands,
54655
+ isMonorepoRoot: rootPackage.packageData.isMonorepoRoot
54656
+ },
54657
+ workspacePackageCount: workspaceCount
54658
+ };
54659
+ }, [packagesSlice == null ? void 0 : packagesSlice.data]);
54233
54660
  const toggleAgentLayer = useCallback((id2) => {
54234
54661
  setHighlightLayers((prev) => {
54235
54662
  const agentLayers = prev.filter((l) => l.id.startsWith("event-highlight"));
@@ -54445,24 +54872,6 @@ const CodeCityPanelContent = ({
54445
54872
  return;
54446
54873
  }
54447
54874
  setSelectedFilePath(filePath);
54448
- let gitStatus;
54449
- if (gitSlice == null ? void 0 : gitSlice.data) {
54450
- if (gitSlice.data.stagedFiles.includes(filePath)) {
54451
- gitStatus = "staged";
54452
- } else if (gitSlice.data.modifiedFiles.includes(filePath)) {
54453
- gitStatus = "unstaged";
54454
- } else if (gitSlice.data.untrackedFiles.includes(filePath)) {
54455
- gitStatus = "untracked";
54456
- } else if (gitSlice.data.deletedFiles.includes(filePath)) {
54457
- gitStatus = "deleted";
54458
- }
54459
- }
54460
- events.emit({
54461
- type: "file:open",
54462
- source: "code-city-panel",
54463
- timestamp: Date.now(),
54464
- payload: { path: filePath, gitStatus }
54465
- });
54466
54875
  const lastSlashIndex = filePath.lastIndexOf("/");
54467
54876
  const parentDirectory = lastSlashIndex > 0 ? filePath.substring(0, lastSlashIndex) : "";
54468
54877
  const packageName = parentDirectory ? parentDirectory.split("/").pop() : "";
@@ -54481,8 +54890,29 @@ const CodeCityPanelContent = ({
54481
54890
  });
54482
54891
  }
54483
54892
  },
54484
- [events, gitSlice == null ? void 0 : gitSlice.data, selectedFilePath]
54893
+ [events, selectedFilePath]
54485
54894
  );
54895
+ const handleOpenFile = useCallback(() => {
54896
+ if (!selectedFilePath) return;
54897
+ let gitStatus;
54898
+ if (gitSlice == null ? void 0 : gitSlice.data) {
54899
+ if (gitSlice.data.stagedFiles.includes(selectedFilePath)) {
54900
+ gitStatus = "staged";
54901
+ } else if (gitSlice.data.modifiedFiles.includes(selectedFilePath)) {
54902
+ gitStatus = "unstaged";
54903
+ } else if (gitSlice.data.untrackedFiles.includes(selectedFilePath)) {
54904
+ gitStatus = "untracked";
54905
+ } else if (gitSlice.data.deletedFiles.includes(selectedFilePath)) {
54906
+ gitStatus = "deleted";
54907
+ }
54908
+ }
54909
+ events.emit({
54910
+ type: "file:open",
54911
+ source: "code-city-panel",
54912
+ timestamp: Date.now(),
54913
+ payload: { path: selectedFilePath, gitStatus }
54914
+ });
54915
+ }, [events, gitSlice == null ? void 0 : gitSlice.data, selectedFilePath]);
54486
54916
  const handleClearPackageSelection = useCallback(() => {
54487
54917
  events.emit({
54488
54918
  type: "package:select",
@@ -54916,7 +55346,80 @@ const CodeCityPanelContent = ({
54916
55346
  alignItems: "center",
54917
55347
  gap: "12px"
54918
55348
  },
54919
- children: hoverInfo && (hoverInfo.hoveredBuilding || hoverInfo.hoveredDistrict) ? /* @__PURE__ */ jsxs(Fragment, { children: [
55349
+ children: selectedFilePath ? (
55350
+ /* Show selected file with Open button */
55351
+ /* @__PURE__ */ jsxs(Fragment, { children: [
55352
+ /* @__PURE__ */ jsxs(
55353
+ "div",
55354
+ {
55355
+ style: {
55356
+ flex: "1 1 auto",
55357
+ display: "flex",
55358
+ flexDirection: "column",
55359
+ gap: "1px",
55360
+ minWidth: 0
55361
+ },
55362
+ children: [
55363
+ /* @__PURE__ */ jsx(
55364
+ "div",
55365
+ {
55366
+ style: {
55367
+ fontWeight: 600,
55368
+ fontFamily: theme2.fonts.monospace,
55369
+ color: theme2.colors.primary,
55370
+ fontSize: theme2.fontSizes[1],
55371
+ overflow: "hidden",
55372
+ textOverflow: "ellipsis",
55373
+ whiteSpace: "nowrap"
55374
+ },
55375
+ children: selectedFilePath.split("/").pop() || "Unknown"
55376
+ }
55377
+ ),
55378
+ /* @__PURE__ */ jsx(
55379
+ "div",
55380
+ {
55381
+ style: {
55382
+ fontFamily: theme2.fonts.monospace,
55383
+ color: theme2.colors.textSecondary,
55384
+ fontSize: theme2.fontSizes[0],
55385
+ overflow: "hidden",
55386
+ textOverflow: "ellipsis",
55387
+ whiteSpace: "nowrap"
55388
+ },
55389
+ children: selectedFilePath
55390
+ }
55391
+ )
55392
+ ]
55393
+ }
55394
+ ),
55395
+ /* @__PURE__ */ jsx(
55396
+ "button",
55397
+ {
55398
+ onClick: handleOpenFile,
55399
+ style: {
55400
+ padding: "6px 14px",
55401
+ backgroundColor: theme2.colors.primary,
55402
+ color: "#ffffff",
55403
+ border: "none",
55404
+ borderRadius: "4px",
55405
+ fontSize: theme2.fontSizes[0],
55406
+ fontFamily: theme2.fonts.body,
55407
+ fontWeight: 500,
55408
+ cursor: "pointer",
55409
+ display: "flex",
55410
+ alignItems: "center",
55411
+ gap: "6px",
55412
+ flexShrink: 0,
55413
+ transition: "opacity 0.2s"
55414
+ },
55415
+ onMouseEnter: (e) => e.currentTarget.style.opacity = "0.9",
55416
+ onMouseLeave: (e) => e.currentTarget.style.opacity = "1",
55417
+ title: "Open file",
55418
+ children: "Open"
55419
+ }
55420
+ )
55421
+ ] })
55422
+ ) : hoverInfo && (hoverInfo.hoveredBuilding || hoverInfo.hoveredDistrict) ? /* @__PURE__ */ jsxs(Fragment, { children: [
54920
55423
  /* @__PURE__ */ jsxs(
54921
55424
  "div",
54922
55425
  {
@@ -55045,7 +55548,7 @@ const CodeCityPanelContent = ({
55045
55548
  fontSize: theme2.fontSizes[0],
55046
55549
  fontFamily: theme2.fonts.body
55047
55550
  },
55048
- children: "Hover over files and directories to see details • Click to open"
55551
+ children: "Hover over files and directories to see details • Click to select • Use Open button to open files"
55049
55552
  }
55050
55553
  )
55051
55554
  )
@@ -55185,6 +55688,8 @@ const CodeCityPanelContent = ({
55185
55688
  Legend,
55186
55689
  {
55187
55690
  fileTypes: [],
55691
+ packageData: legendPackageData.packageData,
55692
+ workspacePackageCount: legendPackageData.workspacePackageCount,
55188
55693
  gitStatus: gitSlice == null ? void 0 : gitSlice.data,
55189
55694
  prFiles: (_q = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _q.filesByStatus,
55190
55695
  prFileStats: (_r = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _r.files,
@@ -55215,6 +55720,8 @@ const CodeCityPanelContent = ({
55215
55720
  Legend,
55216
55721
  {
55217
55722
  fileTypes: legendFileTypes,
55723
+ packageData: legendPackageData.packageData,
55724
+ workspacePackageCount: legendPackageData.workspacePackageCount,
55218
55725
  gitStatus: gitSlice == null ? void 0 : gitSlice.data,
55219
55726
  prFiles: (_x = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _x.filesByStatus,
55220
55727
  prFileStats: (_y = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _y.files,