@industry-theme/file-city-panel 0.3.9 → 0.3.11

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,8 @@ const TourPlayer = ({
50883
51265
  visible = true,
50884
51266
  position,
50885
51267
  skipWelcome = false,
50886
- ttsAdapter,
50887
51268
  tourAudioContext,
51269
+ actions,
50888
51270
  autoPlayAudio = false,
50889
51271
  autoAdvanceOnAudioEnd = false,
50890
51272
  autoAdvanceDelay = 1e3
@@ -50894,10 +51276,13 @@ const TourPlayer = ({
50894
51276
  const [completedSteps, setCompletedSteps] = useState(/* @__PURE__ */ new Set());
50895
51277
  const [isPlaying, setIsPlaying] = useState(skipWelcome);
50896
51278
  const [autoAdvanceTimeRemaining, setAutoAdvanceTimeRemaining] = useState(null);
50897
- const [ttsState, setTtsState] = useState((ttsAdapter == null ? void 0 : ttsAdapter.state) || null);
50898
- const [audioReady, setAudioReady] = useState(false);
51279
+ const [audioUrls, setAudioUrls] = useState();
51280
+ const [isAudioPlaying, setIsAudioPlaying] = useState(false);
51281
+ const [isAudioPaused, setIsAudioPaused] = useState(false);
51282
+ const [audioDuration, setAudioDuration] = useState(0);
51283
+ const [audioCurrentTime, setAudioCurrentTime] = useState(0);
50899
51284
  const [isAutoPlaying, setIsAutoPlaying] = useState(false);
50900
- const ttsStateUpdateInterval = useRef(null);
51285
+ const audioElementRef = useRef(null);
50901
51286
  const currentStepIndex = controlledStepIndex !== void 0 ? controlledStepIndex : internalStepIndex;
50902
51287
  const currentStep = tour.steps[currentStepIndex];
50903
51288
  const isFirstStep = currentStepIndex === 0;
@@ -50964,98 +51349,138 @@ const TourPlayer = ({
50964
51349
  [onInteractiveAction]
50965
51350
  );
50966
51351
  useEffect(() => {
50967
- if (!ttsAdapter || !tourAudioContext) return;
51352
+ if (!(actions == null ? void 0 : actions.fetchAudioUrls) || !tourAudioContext) return;
50968
51353
  async function loadAudio() {
50969
51354
  try {
50970
- const stepIds = tour.steps.map((step) => step.id);
50971
- await ttsAdapter.fetchTourAudio(tour.id, stepIds, tourAudioContext);
50972
- setAudioReady(true);
51355
+ const urls = await actions.fetchAudioUrls(tourAudioContext);
51356
+ setAudioUrls(urls);
50973
51357
  } catch (error) {
50974
- console.error("[TourPlayer] Failed to load tour audio:", error);
51358
+ console.error("[TourPlayer] Failed to fetch audio URLs:", error);
50975
51359
  }
50976
51360
  }
50977
51361
  loadAudio();
50978
- }, [ttsAdapter, tourAudioContext, tour]);
51362
+ }, [actions, tourAudioContext]);
50979
51363
  useEffect(() => {
50980
- if (!ttsAdapter) return;
50981
- ttsStateUpdateInterval.current = setInterval(() => {
50982
- setTtsState({ ...ttsAdapter.state });
50983
- }, 100);
50984
51364
  return () => {
50985
- if (ttsStateUpdateInterval.current) {
50986
- clearInterval(ttsStateUpdateInterval.current);
50987
- ttsStateUpdateInterval.current = null;
51365
+ if (audioElementRef.current) {
51366
+ audioElementRef.current.pause();
51367
+ audioElementRef.current = null;
50988
51368
  }
50989
51369
  };
50990
- }, [ttsAdapter]);
51370
+ }, []);
50991
51371
  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]);
51372
+ if (!isAutoPlaying && audioElementRef.current) {
51373
+ audioElementRef.current.pause();
51374
+ audioElementRef.current = null;
51375
+ setIsAudioPlaying(false);
51376
+ setIsAudioPaused(false);
51377
+ }
51378
+ }, [currentStepIndex, isAutoPlaying]);
51008
51379
  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);
51380
+ if (!autoPlayAudio || !isPlaying || !audioUrls || !isAutoPlaying) return;
51381
+ const audioUrl = audioUrls.get(currentStep.id);
51382
+ if (!audioUrl) return;
51383
+ const timer2 = setTimeout(() => {
51384
+ playAudio(audioUrl);
51385
+ }, 100);
51386
+ return () => clearTimeout(timer2);
51387
+ }, [currentStep == null ? void 0 : currentStep.id, isPlaying, audioUrls, autoPlayAudio, isAutoPlaying]);
51388
+ const playAudio = useCallback((audioUrl) => {
51389
+ if (audioElementRef.current) {
51390
+ audioElementRef.current.pause();
51391
+ }
51392
+ const audio = new Audio(audioUrl);
51393
+ audioElementRef.current = audio;
51394
+ audio.addEventListener("loadedmetadata", () => {
51395
+ setAudioDuration(audio.duration);
51396
+ });
51397
+ audio.addEventListener("timeupdate", () => {
51398
+ setAudioCurrentTime(audio.currentTime);
51399
+ });
51400
+ audio.addEventListener("play", () => {
51401
+ setIsAudioPlaying(true);
51402
+ setIsAudioPaused(false);
51403
+ });
51404
+ audio.addEventListener("pause", () => {
51405
+ if (!audio.ended) {
51406
+ setIsAudioPlaying(false);
51407
+ setIsAudioPaused(true);
51016
51408
  }
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();
51409
+ });
51410
+ audio.addEventListener("ended", () => {
51411
+ setIsAudioPlaying(false);
51412
+ setIsAudioPaused(false);
51413
+ setAudioCurrentTime(0);
51414
+ if (isAutoPlaying && autoAdvanceOnAudioEnd) {
51415
+ setTimeout(() => {
51416
+ if (!isLastStep) {
51417
+ nextStep();
51418
+ } else {
51419
+ setIsAutoPlaying(false);
51420
+ }
51421
+ }, autoAdvanceDelay);
51024
51422
  }
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;
51423
+ });
51424
+ audio.play().catch((error) => {
51425
+ console.error("[TourPlayer] Audio playback failed:", error);
51426
+ });
51427
+ }, [isAutoPlaying, autoAdvanceOnAudioEnd, isLastStep, autoAdvanceDelay, nextStep]);
51428
+ const stopAudio = useCallback(() => {
51429
+ if (audioElementRef.current) {
51430
+ audioElementRef.current.pause();
51431
+ audioElementRef.current.currentTime = 0;
51432
+ audioElementRef.current = null;
51433
+ setIsAudioPlaying(false);
51434
+ setIsAudioPaused(false);
51435
+ setAudioCurrentTime(0);
51032
51436
  }
51033
- if (ttsState == null ? void 0 : ttsState.isPaused) {
51034
- ttsAdapter.resume();
51437
+ }, []);
51438
+ useCallback(() => {
51439
+ if (audioElementRef.current && isAudioPlaying) {
51440
+ audioElementRef.current.pause();
51441
+ }
51442
+ }, [isAudioPlaying]);
51443
+ const resumeAudio = useCallback(() => {
51444
+ if (audioElementRef.current && isAudioPaused) {
51445
+ audioElementRef.current.play().catch((error) => {
51446
+ console.error("[TourPlayer] Audio resume failed:", error);
51447
+ });
51448
+ }
51449
+ }, [isAudioPaused]);
51450
+ const handleReadAloud = useCallback(() => {
51451
+ if (!audioUrls) return;
51452
+ const audioUrl = audioUrls.get(currentStep.id);
51453
+ if (!audioUrl) return;
51454
+ if (isAudioPlaying) {
51455
+ stopAudio();
51035
51456
  return;
51036
51457
  }
51037
- try {
51038
- await ttsAdapter.speak(currentStep.id);
51039
- } catch (error) {
51040
- console.error("[TourPlayer] TTS failed:", error);
51458
+ if (isAudioPaused) {
51459
+ resumeAudio();
51460
+ return;
51041
51461
  }
51042
- }, [ttsAdapter, ttsState, audioReady, currentStep == null ? void 0 : currentStep.id]);
51462
+ playAudio(audioUrl);
51463
+ }, [audioUrls, currentStep.id, isAudioPlaying, isAudioPaused, stopAudio, resumeAudio, playAudio]);
51043
51464
  const toggleAutoPlay = useCallback(() => {
51044
- if (!ttsAdapter || !audioReady) return;
51465
+ if (!audioUrls) return;
51045
51466
  if (isAutoPlaying) {
51046
51467
  setIsAutoPlaying(false);
51047
- ttsAdapter.stop();
51468
+ stopAudio();
51048
51469
  } else {
51049
51470
  setIsAutoPlaying(true);
51050
- ttsAdapter.speak(currentStep.id);
51471
+ const audioUrl = audioUrls.get(currentStep.id);
51472
+ if (audioUrl) {
51473
+ playAudio(audioUrl);
51474
+ }
51051
51475
  }
51052
- }, [isAutoPlaying, ttsAdapter, audioReady, currentStep == null ? void 0 : currentStep.id]);
51476
+ }, [isAutoPlaying, audioUrls, currentStep.id, stopAudio, playAudio]);
51053
51477
  const formatTime = (seconds) => {
51054
51478
  const mins = Math.floor(seconds / 60);
51055
51479
  const secs = Math.floor(seconds % 60);
51056
51480
  return `${mins}:${secs.toString().padStart(2, "0")}`;
51057
51481
  };
51058
- const showTTSControls = !!ttsAdapter && audioReady;
51482
+ const hasAudio = !!audioUrls && audioUrls.size > 0;
51483
+ const currentStepHasAudio = hasAudio && audioUrls.has(currentStep.id);
51059
51484
  const canAutoPlay = autoPlayAudio && autoAdvanceOnAudioEnd;
51060
51485
  if (!visible) return null;
51061
51486
  const useAbsolutePositioning = position === "overlay";
@@ -51293,7 +51718,7 @@ const TourPlayer = ({
51293
51718
  ]
51294
51719
  }
51295
51720
  ),
51296
- showTTSControls && canAutoPlay && /* @__PURE__ */ jsxs(
51721
+ hasAudio && canAutoPlay && /* @__PURE__ */ jsxs(
51297
51722
  "button",
51298
51723
  {
51299
51724
  onClick: () => {
@@ -51622,7 +52047,7 @@ const TourPlayer = ({
51622
52047
  ] })
51623
52048
  }
51624
52049
  ),
51625
- showTTSControls && /* @__PURE__ */ jsxs(
52050
+ currentStepHasAudio && /* @__PURE__ */ jsxs(
51626
52051
  "div",
51627
52052
  {
51628
52053
  style: {
@@ -51639,7 +52064,6 @@ const TourPlayer = ({
51639
52064
  "button",
51640
52065
  {
51641
52066
  onClick: handleReadAloud,
51642
- disabled: (ttsState == null ? void 0 : ttsState.isLoading) || !audioReady,
51643
52067
  style: {
51644
52068
  display: "flex",
51645
52069
  alignItems: "center",
@@ -51651,24 +52075,20 @@ const TourPlayer = ({
51651
52075
  borderRadius: "8px",
51652
52076
  fontSize: theme2.fontSizes[2],
51653
52077
  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,
52078
+ cursor: "pointer",
51656
52079
  transition: "all 0.2s"
51657
52080
  },
51658
52081
  onMouseEnter: (e) => {
51659
- if (!(ttsState == null ? void 0 : ttsState.isLoading) && audioReady) {
51660
- e.currentTarget.style.backgroundColor = theme2.colors.backgroundLight;
51661
- }
52082
+ e.currentTarget.style.backgroundColor = theme2.colors.backgroundLight;
51662
52083
  },
51663
52084
  onMouseLeave: (e) => {
51664
52085
  e.currentTarget.style.backgroundColor = "transparent";
51665
52086
  },
51666
52087
  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" })
52088
+ isAudioPlaying && /* @__PURE__ */ jsx(Volume2, { size: 16 }),
52089
+ isAudioPaused && /* @__PURE__ */ jsx(VolumeX, { size: 16 }),
52090
+ !isAudioPlaying && !isAudioPaused && /* @__PURE__ */ jsx(Volume2, { size: 16 }),
52091
+ /* @__PURE__ */ jsx("span", { children: isAudioPlaying ? "Stop" : isAudioPaused ? "Resume" : "Read Aloud" })
51672
52092
  ]
51673
52093
  }
51674
52094
  ),
@@ -51676,7 +52096,6 @@ const TourPlayer = ({
51676
52096
  "button",
51677
52097
  {
51678
52098
  onClick: toggleAutoPlay,
51679
- disabled: !audioReady,
51680
52099
  style: {
51681
52100
  display: "flex",
51682
52101
  alignItems: "center",
@@ -51688,14 +52107,11 @@ const TourPlayer = ({
51688
52107
  borderRadius: "8px",
51689
52108
  fontSize: theme2.fontSizes[2],
51690
52109
  fontFamily: theme2.fonts.body,
51691
- cursor: !audioReady ? "not-allowed" : "pointer",
51692
- opacity: !audioReady ? 0.5 : 1,
52110
+ cursor: "pointer",
51693
52111
  transition: "all 0.2s"
51694
52112
  },
51695
52113
  onMouseEnter: (e) => {
51696
- if (audioReady) {
51697
- e.currentTarget.style.opacity = "0.8";
51698
- }
52114
+ e.currentTarget.style.opacity = "0.8";
51699
52115
  },
51700
52116
  onMouseLeave: (e) => {
51701
52117
  e.currentTarget.style.opacity = "1";
@@ -51707,8 +52123,8 @@ const TourPlayer = ({
51707
52123
  }
51708
52124
  )
51709
52125
  ] }),
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) }),
52126
+ isAudioPlaying && audioDuration > 0 && /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
52127
+ /* @__PURE__ */ jsx("span", { style: { fontSize: theme2.fontSizes[1], color: theme2.colors.textSecondary, minWidth: "35px" }, children: formatTime(audioCurrentTime) }),
51712
52128
  /* @__PURE__ */ jsx(
51713
52129
  "div",
51714
52130
  {
@@ -51724,7 +52140,7 @@ const TourPlayer = ({
51724
52140
  {
51725
52141
  style: {
51726
52142
  height: "100%",
51727
- width: `${ttsState.progress || 0}%`,
52143
+ width: `${audioCurrentTime / audioDuration * 100}%`,
51728
52144
  backgroundColor: theme2.colors.primary,
51729
52145
  transition: "width 0.1s linear"
51730
52146
  }
@@ -51732,7 +52148,7 @@ const TourPlayer = ({
51732
52148
  )
51733
52149
  }
51734
52150
  ),
51735
- /* @__PURE__ */ jsx("span", { style: { fontSize: theme2.fontSizes[1], color: theme2.colors.textSecondary, minWidth: "35px" }, children: formatTime(ttsState.duration) })
52151
+ /* @__PURE__ */ jsx("span", { style: { fontSize: theme2.fontSizes[1], color: theme2.colors.textSecondary, minWidth: "35px" }, children: formatTime(audioDuration) })
51736
52152
  ] })
51737
52153
  ]
51738
52154
  }
@@ -53583,6 +53999,7 @@ const CodeCityPanelContent = ({
53583
53999
  const agentHighlightLayersSlice = context.getSlice("agentHighlightLayers");
53584
54000
  const colorModesSlice = context.getSlice("fileCityColorModes");
53585
54001
  const qualityData = (_c = colorModesSlice == null ? void 0 : colorModesSlice.data) == null ? void 0 : _c.qualityData;
54002
+ const packagesSlice = context.getSlice("packages");
53586
54003
  const fileColorLayersRegistered = useRef(false);
53587
54004
  const gitLayersRegistered = useRef(false);
53588
54005
  const prFilesLayersRegistered = useRef(false);
@@ -54230,6 +54647,30 @@ const CodeCityPanelContent = ({
54230
54647
  };
54231
54648
  });
54232
54649
  }, [baseLayers, highlightLayers, colorMode]);
54650
+ const legendPackageData = useMemo(() => {
54651
+ var _a2;
54652
+ if (!((_a2 = packagesSlice == null ? void 0 : packagesSlice.data) == null ? void 0 : _a2.packages) || packagesSlice.data.packages.length === 0) {
54653
+ return { packageData: null, workspacePackageCount: 0 };
54654
+ }
54655
+ const rootPackage = packagesSlice.data.packages.find((pkg) => pkg.packageData.path === "") || packagesSlice.data.packages[0];
54656
+ const workspaceCount = packagesSlice.data.summary.isMonorepo ? packagesSlice.data.summary.workspacePackages.length : 0;
54657
+ return {
54658
+ packageData: {
54659
+ name: rootPackage.packageData.name,
54660
+ path: rootPackage.packageData.path,
54661
+ version: rootPackage.packageData.version,
54662
+ description: rootPackage.packageData.description,
54663
+ license: rootPackage.packageData.license,
54664
+ packageManager: rootPackage.packageData.packageManager,
54665
+ dependencies: rootPackage.packageData.dependencies || {},
54666
+ devDependencies: rootPackage.packageData.devDependencies || {},
54667
+ peerDependencies: rootPackage.packageData.peerDependencies || {},
54668
+ availableCommands: rootPackage.packageData.availableCommands,
54669
+ isMonorepoRoot: rootPackage.packageData.isMonorepoRoot
54670
+ },
54671
+ workspacePackageCount: workspaceCount
54672
+ };
54673
+ }, [packagesSlice == null ? void 0 : packagesSlice.data]);
54233
54674
  const toggleAgentLayer = useCallback((id2) => {
54234
54675
  setHighlightLayers((prev) => {
54235
54676
  const agentLayers = prev.filter((l) => l.id.startsWith("event-highlight"));
@@ -55261,6 +55702,8 @@ const CodeCityPanelContent = ({
55261
55702
  Legend,
55262
55703
  {
55263
55704
  fileTypes: [],
55705
+ packageData: legendPackageData.packageData,
55706
+ workspacePackageCount: legendPackageData.workspacePackageCount,
55264
55707
  gitStatus: gitSlice == null ? void 0 : gitSlice.data,
55265
55708
  prFiles: (_q = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _q.filesByStatus,
55266
55709
  prFileStats: (_r = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _r.files,
@@ -55291,6 +55734,8 @@ const CodeCityPanelContent = ({
55291
55734
  Legend,
55292
55735
  {
55293
55736
  fileTypes: legendFileTypes,
55737
+ packageData: legendPackageData.packageData,
55738
+ workspacePackageCount: legendPackageData.workspacePackageCount,
55294
55739
  gitStatus: gitSlice == null ? void 0 : gitSlice.data,
55295
55740
  prFiles: (_x = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _x.filesByStatus,
55296
55741
  prFileStats: (_y = prFilesSlice == null ? void 0 : prFilesSlice.data) == null ? void 0 : _y.files,