@industry-theme/repository-composition-panels 0.6.23 → 0.6.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/{BufferResource-CEOmm-bn.js → BufferResource-04cpEQ0v.js} +2 -2
  2. package/dist/{BufferResource-CEOmm-bn.js.map → BufferResource-04cpEQ0v.js.map} +1 -1
  3. package/dist/{CanvasRenderer-uLmsLKVm.js → CanvasRenderer-C7nUvMXE.js} +3 -3
  4. package/dist/{CanvasRenderer-uLmsLKVm.js.map → CanvasRenderer-C7nUvMXE.js.map} +1 -1
  5. package/dist/{Filter-DaJ1lK09.js → Filter-D_86Ax-n.js} +2 -2
  6. package/dist/{Filter-DaJ1lK09.js.map → Filter-D_86Ax-n.js.map} +1 -1
  7. package/dist/{RenderTargetSystem-L205smmq.js → RenderTargetSystem-1fgwSKkC.js} +3 -3
  8. package/dist/{RenderTargetSystem-L205smmq.js.map → RenderTargetSystem-1fgwSKkC.js.map} +1 -1
  9. package/dist/{WebGLRenderer-Di8FBHm2.js → WebGLRenderer-Dj-oDZnm.js} +4 -4
  10. package/dist/{WebGLRenderer-Di8FBHm2.js.map → WebGLRenderer-Dj-oDZnm.js.map} +1 -1
  11. package/dist/{WebGPURenderer-shOBFSVw.js → WebGPURenderer-BSTx-5Vd.js} +4 -4
  12. package/dist/{WebGPURenderer-shOBFSVw.js.map → WebGPURenderer-BSTx-5Vd.js.map} +1 -1
  13. package/dist/{browserAll-BDQdYbg7.js → browserAll-DwRNjFsz.js} +3 -3
  14. package/dist/{browserAll-BDQdYbg7.js.map → browserAll-DwRNjFsz.js.map} +1 -1
  15. package/dist/{index-Dz9kyNPE.js → index-O-HJOiQ4.js} +1070 -528
  16. package/dist/{index-Dz9kyNPE.js.map → index-O-HJOiQ4.js.map} +1 -1
  17. package/dist/{init-CYQ-TSDD.js → init-C6R0aCVI.js} +3 -3
  18. package/dist/{init-CYQ-TSDD.js.map → init-C6R0aCVI.js.map} +1 -1
  19. package/dist/panels/CollectionMapPanel.d.ts.map +1 -1
  20. package/dist/panels/PackageCompositionPanel.d.ts +2 -0
  21. package/dist/panels/PackageCompositionPanel.d.ts.map +1 -1
  22. package/dist/panels/components/DependencyRow.d.ts.map +1 -1
  23. package/dist/panels/components/FilterBar.d.ts.map +1 -1
  24. package/dist/panels/components/PackageDetailCard.d.ts +16 -0
  25. package/dist/panels/components/PackageDetailCard.d.ts.map +1 -0
  26. package/dist/panels/components/PackageSummaryCard.d.ts +10 -0
  27. package/dist/panels/components/PackageSummaryCard.d.ts.map +1 -0
  28. package/dist/panels/components/index.d.ts +2 -0
  29. package/dist/panels/components/index.d.ts.map +1 -1
  30. package/dist/panels.bundle.js +1 -1
  31. package/dist/types/index.d.ts +8 -1
  32. package/dist/types/index.d.ts.map +1 -1
  33. package/dist/utils/envParser.d.ts +29 -0
  34. package/dist/utils/envParser.d.ts.map +1 -0
  35. package/dist/webworkerAll-BXVEg9Ze.js +3 -0
  36. package/dist/webworkerAll-BXVEg9Ze.js.map +1 -0
  37. package/package.json +3 -3
  38. package/dist/webworkerAll-c9JuRq0R.js +0 -3
  39. package/dist/webworkerAll-c9JuRq0R.js.map +0 -1
@@ -151,28 +151,17 @@ const Activity$1 = createLucideIcon$1("activity", __iconNode$qk);
151
151
  * See the LICENSE file in the root directory of this source tree.
152
152
  */
153
153
  const __iconNode$qj = [
154
- ["path", { d: "M5 12h14", key: "1ays0h" }],
155
- ["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
156
- ];
157
- const ArrowRight$1 = createLucideIcon$1("arrow-right", __iconNode$qj);
158
- /**
159
- * @license lucide-react v0.552.0 - ISC
160
- *
161
- * This source code is licensed under the ISC license.
162
- * See the LICENSE file in the root directory of this source tree.
163
- */
164
- const __iconNode$qi = [
165
154
  ["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
166
155
  ["path", { d: "M12 19V5", key: "x0mq9r" }]
167
156
  ];
168
- const ArrowUp$1 = createLucideIcon$1("arrow-up", __iconNode$qi);
157
+ const ArrowUp$1 = createLucideIcon$1("arrow-up", __iconNode$qj);
169
158
  /**
170
159
  * @license lucide-react v0.552.0 - ISC
171
160
  *
172
161
  * This source code is licensed under the ISC license.
173
162
  * See the LICENSE file in the root directory of this source tree.
174
163
  */
175
- const __iconNode$qh = [
164
+ const __iconNode$qi = [
176
165
  [
177
166
  "path",
178
167
  {
@@ -183,59 +172,70 @@ const __iconNode$qh = [
183
172
  ["path", { d: "m3.3 7 8.7 5 8.7-5", key: "g66t2b" }],
184
173
  ["path", { d: "M12 22V12", key: "d0xqtd" }]
185
174
  ];
186
- const Box$1 = createLucideIcon$1("box", __iconNode$qh);
175
+ const Box$1 = createLucideIcon$1("box", __iconNode$qi);
187
176
  /**
188
177
  * @license lucide-react v0.552.0 - ISC
189
178
  *
190
179
  * This source code is licensed under the ISC license.
191
180
  * See the LICENSE file in the root directory of this source tree.
192
181
  */
193
- const __iconNode$qg = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
194
- const Check$1 = createLucideIcon$1("check", __iconNode$qg);
182
+ const __iconNode$qh = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
183
+ const Check$1 = createLucideIcon$1("check", __iconNode$qh);
195
184
  /**
196
185
  * @license lucide-react v0.552.0 - ISC
197
186
  *
198
187
  * This source code is licensed under the ISC license.
199
188
  * See the LICENSE file in the root directory of this source tree.
200
189
  */
201
- const __iconNode$qf = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
202
- const ChevronDown$1 = createLucideIcon$1("chevron-down", __iconNode$qf);
190
+ const __iconNode$qg = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
191
+ const ChevronDown$1 = createLucideIcon$1("chevron-down", __iconNode$qg);
203
192
  /**
204
193
  * @license lucide-react v0.552.0 - ISC
205
194
  *
206
195
  * This source code is licensed under the ISC license.
207
196
  * See the LICENSE file in the root directory of this source tree.
208
197
  */
209
- const __iconNode$qe = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
210
- const ChevronLeft$1 = createLucideIcon$1("chevron-left", __iconNode$qe);
198
+ const __iconNode$qf = [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]];
199
+ const ChevronLeft$1 = createLucideIcon$1("chevron-left", __iconNode$qf);
211
200
  /**
212
201
  * @license lucide-react v0.552.0 - ISC
213
202
  *
214
203
  * This source code is licensed under the ISC license.
215
204
  * See the LICENSE file in the root directory of this source tree.
216
205
  */
217
- const __iconNode$qd = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
218
- const ChevronRight$1 = createLucideIcon$1("chevron-right", __iconNode$qd);
206
+ const __iconNode$qe = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
207
+ const ChevronRight$1 = createLucideIcon$1("chevron-right", __iconNode$qe);
219
208
  /**
220
209
  * @license lucide-react v0.552.0 - ISC
221
210
  *
222
211
  * This source code is licensed under the ISC license.
223
212
  * See the LICENSE file in the root directory of this source tree.
224
213
  */
225
- const __iconNode$qc = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
226
- const ChevronUp$1 = createLucideIcon$1("chevron-up", __iconNode$qc);
214
+ const __iconNode$qd = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
215
+ const ChevronUp$1 = createLucideIcon$1("chevron-up", __iconNode$qd);
227
216
  /**
228
217
  * @license lucide-react v0.552.0 - ISC
229
218
  *
230
219
  * This source code is licensed under the ISC license.
231
220
  * See the LICENSE file in the root directory of this source tree.
232
221
  */
233
- const __iconNode$qb = [
222
+ const __iconNode$qc = [
234
223
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
235
224
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
236
225
  ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
237
226
  ];
238
- const CircleAlert$1 = createLucideIcon$1("circle-alert", __iconNode$qb);
227
+ const CircleAlert$1 = createLucideIcon$1("circle-alert", __iconNode$qc);
228
+ /**
229
+ * @license lucide-react v0.552.0 - ISC
230
+ *
231
+ * This source code is licensed under the ISC license.
232
+ * See the LICENSE file in the root directory of this source tree.
233
+ */
234
+ const __iconNode$qb = [
235
+ ["path", { d: "M21.801 10A10 10 0 1 1 17 3.335", key: "yps3ct" }],
236
+ ["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
237
+ ];
238
+ const CircleCheckBig$1 = createLucideIcon$1("circle-check-big", __iconNode$qb);
239
239
  /**
240
240
  * @license lucide-react v0.552.0 - ISC
241
241
  *
@@ -1554,6 +1554,7 @@ const DependencyRow = ({ dependency }) => {
1554
1554
  borderRadius: `${theme2.radii[1]}px`,
1555
1555
  fontSize: `${theme2.fontSizes[0]}px`,
1556
1556
  fontWeight: theme2.fontWeights.medium,
1557
+ fontFamily: theme2.fonts.body,
1557
1558
  minWidth: "36px",
1558
1559
  textAlign: "center"
1559
1560
  };
@@ -1616,11 +1617,12 @@ const DependencyRow = ({ dependency }) => {
1616
1617
  display: "flex",
1617
1618
  alignItems: "center",
1618
1619
  justifyContent: "space-between",
1619
- padding: `${theme2.space[2]}px ${theme2.space[3]}px`,
1620
+ padding: `${theme2.space[3]}px ${theme2.space[4]}px`,
1620
1621
  backgroundColor: theme2.colors.background,
1621
- borderRadius: `${theme2.radii[1]}px`,
1622
+ borderRadius: 0,
1622
1623
  fontSize: `${theme2.fontSizes[1]}px`,
1623
- border: `1px solid ${theme2.colors.border}`,
1624
+ fontFamily: theme2.fonts.body,
1625
+ borderBottom: `1px solid ${theme2.colors.border}`,
1624
1626
  transition: "all 0.2s"
1625
1627
  },
1626
1628
  onMouseEnter: () => setIsHovered(true),
@@ -1692,7 +1694,7 @@ const DependencyRow = ({ dependency }) => {
1692
1694
  children: copied ? /* @__PURE__ */ jsx(Check$1, { size: 12 }) : /* @__PURE__ */ jsx(Copy$1, { size: 12 })
1693
1695
  }
1694
1696
  ),
1695
- /* @__PURE__ */ jsx("span", { style: { color: theme2.colors.textSecondary }, children: dependency.version })
1697
+ /* @__PURE__ */ jsx("span", { style: { color: theme2.colors.textSecondary, fontFamily: theme2.fonts.body }, children: dependency.version })
1696
1698
  ]
1697
1699
  }
1698
1700
  )
@@ -1719,8 +1721,7 @@ const FilterBar = ({
1719
1721
  {
1720
1722
  style: {
1721
1723
  display: "flex",
1722
- flexDirection: "column",
1723
- gap: `${theme2.space[2]}px`
1724
+ flexDirection: "column"
1724
1725
  },
1725
1726
  children: [
1726
1727
  /* @__PURE__ */ jsxs(
@@ -1753,9 +1754,10 @@ const FilterBar = ({
1753
1754
  onChange: (e2) => onSearchChange(e2.target.value),
1754
1755
  style: {
1755
1756
  width: "100%",
1756
- padding: `${theme2.space[2]}px ${theme2.space[5]}px`,
1757
- borderRadius: `${theme2.radii[2]}px`,
1758
- border: `1px solid ${theme2.colors.border}`,
1757
+ padding: `${theme2.space[3]}px ${theme2.space[5]}px`,
1758
+ borderRadius: 0,
1759
+ border: "none",
1760
+ borderBottom: `1px solid ${theme2.colors.border}`,
1759
1761
  backgroundColor: theme2.colors.backgroundSecondary,
1760
1762
  color: theme2.colors.text,
1761
1763
  fontSize: `${theme2.fontSizes[1]}px`,
@@ -1788,7 +1790,7 @@ const FilterBar = ({
1788
1790
  ]
1789
1791
  }
1790
1792
  ),
1791
- showFilters && /* @__PURE__ */ jsx("div", { style: { display: "flex", gap: `${theme2.space[1]}px`, width: "100%" }, children: availableFilters.map((type2) => {
1793
+ showFilters && /* @__PURE__ */ jsx("div", { style: { display: "flex", width: "100%" }, children: availableFilters.map((type2) => {
1792
1794
  const isActive = activeFilters.has(type2);
1793
1795
  return /* @__PURE__ */ jsxs(
1794
1796
  "button",
@@ -1796,12 +1798,13 @@ const FilterBar = ({
1796
1798
  onClick: () => onToggleFilter(type2),
1797
1799
  style: {
1798
1800
  flex: 1,
1799
- padding: `${theme2.space[1]}px ${theme2.space[2]}px`,
1801
+ padding: `${theme2.space[2]}px ${theme2.space[2]}px`,
1800
1802
  fontSize: `${theme2.fontSizes[0]}px`,
1801
1803
  fontWeight: theme2.fontWeights.medium,
1802
1804
  fontFamily: theme2.fonts.body,
1803
- borderRadius: `${theme2.radii[1]}px`,
1804
- border: `1px solid ${isActive ? theme2.colors.primary : theme2.colors.border}`,
1805
+ borderRadius: 0,
1806
+ border: "none",
1807
+ borderRight: `1px solid ${theme2.colors.border}`,
1805
1808
  backgroundColor: isActive ? `${theme2.colors.primary}20` : theme2.colors.backgroundSecondary,
1806
1809
  color: isActive ? theme2.colors.primary : theme2.colors.text,
1807
1810
  cursor: "pointer",
@@ -2565,6 +2568,108 @@ const OtherScriptsSection = ({
2565
2568
  )
2566
2569
  ] });
2567
2570
  };
2571
+ function parseEnvJson(content2) {
2572
+ const parsed = JSON.parse(content2);
2573
+ if (!parsed.variables || !Array.isArray(parsed.variables)) {
2574
+ throw new Error('Invalid env.json: missing "variables" array');
2575
+ }
2576
+ return parsed.variables.map((v2) => ({
2577
+ name: v2.name,
2578
+ description: v2.description,
2579
+ required: v2.required ?? false,
2580
+ default: v2.default,
2581
+ example: v2.example,
2582
+ group: v2.group,
2583
+ link: v2.link
2584
+ }));
2585
+ }
2586
+ const urlPattern = /https?:\/\/[^\s)>\]]+/gi;
2587
+ function parseDotEnv(content2) {
2588
+ const lines = content2.split("\n");
2589
+ const variables = [];
2590
+ const commentBuffer = [];
2591
+ let currentGroup = void 0;
2592
+ const sectionPatterns = [
2593
+ /^#\s*===\s*(.+?)\s*===\s*$/,
2594
+ // # === Section ===
2595
+ /^##\s+(.+?)\s*$/,
2596
+ // ## Section
2597
+ /^#\s*\[(.+?)\]\s*$/
2598
+ // # [Section]
2599
+ ];
2600
+ for (const line of lines) {
2601
+ const trimmed = line.trim();
2602
+ if (!trimmed) {
2603
+ commentBuffer.length = 0;
2604
+ continue;
2605
+ }
2606
+ if (trimmed.startsWith("#")) {
2607
+ let isSection = false;
2608
+ for (const pattern of sectionPatterns) {
2609
+ const sectionMatch = trimmed.match(pattern);
2610
+ if (sectionMatch) {
2611
+ currentGroup = sectionMatch[1].trim();
2612
+ commentBuffer.length = 0;
2613
+ isSection = true;
2614
+ break;
2615
+ }
2616
+ }
2617
+ if (!isSection) {
2618
+ commentBuffer.push(trimmed.slice(1).trim());
2619
+ }
2620
+ continue;
2621
+ }
2622
+ const match = trimmed.match(/^([A-Z_][A-Z0-9_]*)=(.*)$/i);
2623
+ if (match) {
2624
+ const [, name2, value] = match;
2625
+ let required = false;
2626
+ let link2 = void 0;
2627
+ const descriptionParts = [];
2628
+ for (const comment2 of commentBuffer) {
2629
+ const lowerComment = comment2.toLowerCase();
2630
+ if (!link2) {
2631
+ const urlMatch = comment2.match(urlPattern);
2632
+ if (urlMatch) {
2633
+ link2 = urlMatch[0];
2634
+ }
2635
+ }
2636
+ if (lowerComment === "required" || lowerComment === "(required)") {
2637
+ required = true;
2638
+ } else if (lowerComment.includes("required")) {
2639
+ required = true;
2640
+ descriptionParts.push(comment2.replace(/\s*\(?\s*required\s*\)?\s*/gi, "").trim());
2641
+ } else {
2642
+ descriptionParts.push(comment2);
2643
+ }
2644
+ }
2645
+ const description = descriptionParts.filter(Boolean).join(" ") || void 0;
2646
+ const defaultValue = value.trim() || void 0;
2647
+ variables.push({
2648
+ name: name2,
2649
+ description,
2650
+ required,
2651
+ default: defaultValue,
2652
+ example: defaultValue,
2653
+ group: currentGroup,
2654
+ link: link2
2655
+ });
2656
+ commentBuffer.length = 0;
2657
+ }
2658
+ }
2659
+ return variables;
2660
+ }
2661
+ function parseEnvFile(content2, fileType) {
2662
+ if (fileType === "json") {
2663
+ return {
2664
+ variables: parseEnvJson(content2),
2665
+ format: "json"
2666
+ };
2667
+ }
2668
+ return {
2669
+ variables: parseDotEnv(content2),
2670
+ format: "dotenv"
2671
+ };
2672
+ }
2568
2673
  const dependencyTypeOrder = {
2569
2674
  peer: 0,
2570
2675
  production: 1,
@@ -2594,369 +2699,42 @@ function extractDependencies(packageLayer) {
2594
2699
  return a2.name.localeCompare(b2.name);
2595
2700
  });
2596
2701
  }
2597
- function findInternalDependencies(pkg, allPackages) {
2598
- const currentName = pkg.packageData.name;
2599
- const allDeps = /* @__PURE__ */ new Set([
2600
- ...Object.keys(pkg.packageData.dependencies || {}),
2601
- ...Object.keys(pkg.packageData.devDependencies || {}),
2602
- ...Object.keys(pkg.packageData.peerDependencies || {})
2603
- ]);
2604
- const dependsOn = allPackages.filter(
2605
- (p2) => p2.packageData.name !== currentName && allDeps.has(p2.packageData.name)
2606
- );
2607
- const usedBy = allPackages.filter((other) => {
2608
- if (other.packageData.name === currentName) return false;
2609
- const otherDeps = /* @__PURE__ */ new Set([
2610
- ...Object.keys(other.packageData.dependencies || {}),
2611
- ...Object.keys(other.packageData.devDependencies || {}),
2612
- ...Object.keys(other.packageData.peerDependencies || {})
2613
- ]);
2614
- return otherDeps.has(currentName);
2615
- });
2616
- return { dependsOn, usedBy };
2617
- }
2618
- const PackageSummaryCard = ({
2619
- pkg,
2620
- allPackages,
2621
- onClick,
2622
- onHover
2623
- }) => {
2624
- var _a, _b;
2625
- const { theme: theme2 } = useTheme();
2626
- const deps = pkg.packageData.dependencies || {};
2627
- const devDeps = pkg.packageData.devDependencies || {};
2628
- const peerDeps = pkg.packageData.peerDependencies || {};
2629
- const totalDeps = Object.keys(deps).length + Object.keys(devDeps).length + Object.keys(peerDeps).length;
2630
- const configFilesArray = pkg.configFiles ? Object.values(pkg.configFiles).filter((c2) => c2 == null ? void 0 : c2.exists) : [];
2631
- configFilesArray.filter((c2) => !(c2 == null ? void 0 : c2.isInherited)).length;
2632
- const inheritedConfigs = configFilesArray.filter(
2633
- (c2) => c2 == null ? void 0 : c2.isInherited
2634
- ).length;
2635
- const commands = ((_a = pkg.packageData.availableCommands) == null ? void 0 : _a.length) || 0;
2636
- const { dependsOn, usedBy } = useMemo(
2637
- () => findInternalDependencies(pkg, allPackages),
2638
- [pkg, allPackages]
2639
- );
2640
- const hasInternalDeps = dependsOn.length > 0 || usedBy.length > 0;
2641
- const packageRole = useMemo(() => {
2642
- if (dependsOn.length === 0 && usedBy.length === 0) {
2643
- return null;
2644
- }
2645
- if (dependsOn.length === 0 && usedBy.length > 0) {
2646
- return { label: "core", icon: Box$1, color: "#10b981" };
2647
- }
2648
- if (dependsOn.length > 0 && usedBy.length === 0) {
2649
- return { label: "app", icon: Layers$1, color: "#8b5cf6" };
2650
- }
2651
- return { label: "shared", icon: LayoutGrid$1, color: "#f59e0b" };
2652
- }, [dependsOn.length, usedBy.length]);
2653
- return /* @__PURE__ */ jsxs(
2654
- "button",
2655
- {
2656
- onClick,
2657
- style: {
2658
- display: "flex",
2659
- flexDirection: "column",
2660
- gap: "8px",
2661
- padding: "12px",
2662
- backgroundColor: theme2.colors.backgroundSecondary,
2663
- border: `1px solid ${theme2.colors.border}`,
2664
- borderRadius: "0",
2665
- cursor: "pointer",
2666
- textAlign: "left",
2667
- transition: "all 0.15s ease",
2668
- width: "100%"
2669
- },
2670
- onMouseEnter: (e2) => {
2671
- e2.currentTarget.style.borderColor = theme2.colors.primary;
2672
- e2.currentTarget.style.backgroundColor = theme2.colors.backgroundTertiary;
2673
- onHover == null ? void 0 : onHover(pkg);
2674
- },
2675
- onMouseLeave: (e2) => {
2676
- e2.currentTarget.style.borderColor = theme2.colors.border;
2677
- e2.currentTarget.style.backgroundColor = theme2.colors.backgroundSecondary;
2678
- onHover == null ? void 0 : onHover(null);
2679
- },
2680
- children: [
2681
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
2682
- /* @__PURE__ */ jsx(
2683
- PackageManagerIcon,
2684
- {
2685
- packageManager: pkg.packageData.packageManager,
2686
- size: 20
2687
- }
2688
- ),
2689
- /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
2690
- /* @__PURE__ */ jsx(
2691
- "div",
2692
- {
2693
- style: {
2694
- fontSize: theme2.fontSizes[2],
2695
- fontWeight: theme2.fontWeights.semibold,
2696
- fontFamily: theme2.fonts.body,
2697
- color: theme2.colors.text,
2698
- overflow: "hidden",
2699
- textOverflow: "ellipsis",
2700
- whiteSpace: "nowrap"
2701
- },
2702
- children: pkg.packageData.name
2703
- }
2704
- ),
2705
- /* @__PURE__ */ jsxs(
2706
- "div",
2707
- {
2708
- style: {
2709
- fontSize: theme2.fontSizes[0],
2710
- fontFamily: theme2.fonts.body,
2711
- color: theme2.colors.textSecondary
2712
- },
2713
- children: [
2714
- pkg.packageData.path || "/",
2715
- pkg.packageData.version && ` • v${pkg.packageData.version}`
2716
- ]
2717
- }
2718
- )
2719
- ] }),
2720
- pkg.packageData.isMonorepoRoot && ((_b = pkg.packageData.monorepoMetadata) == null ? void 0 : _b.orchestrator) && /* @__PURE__ */ jsx(
2721
- OrchestratorBadge,
2722
- {
2723
- orchestrator: pkg.packageData.monorepoMetadata.orchestrator,
2724
- rootRole: pkg.packageData.monorepoMetadata.rootRole,
2725
- size: "sm"
2726
- }
2727
- ),
2728
- packageRole && /* @__PURE__ */ jsxs(
2729
- "span",
2730
- {
2731
- style: {
2732
- display: "flex",
2733
- alignItems: "center",
2734
- gap: "4px",
2735
- padding: "3px 8px",
2736
- backgroundColor: packageRole.color + "20",
2737
- color: packageRole.color,
2738
- borderRadius: "4px",
2739
- fontSize: theme2.fontSizes[0],
2740
- fontWeight: theme2.fontWeights.medium,
2741
- fontFamily: theme2.fonts.body,
2742
- flexShrink: 0
2743
- },
2744
- children: [
2745
- /* @__PURE__ */ jsx(packageRole.icon, { size: 12 }),
2746
- packageRole.label
2747
- ]
2748
- }
2749
- ),
2750
- /* @__PURE__ */ jsx(ChevronRight$1, { size: 16, color: theme2.colors.textSecondary })
2751
- ] }),
2752
- (pkg.packageData.description || pkg.packageData.license) && /* @__PURE__ */ jsxs(
2753
- "div",
2754
- {
2755
- style: {
2756
- display: "flex",
2757
- flexDirection: "column",
2758
- gap: "4px"
2759
- },
2760
- children: [
2761
- pkg.packageData.description && /* @__PURE__ */ jsx(
2762
- "div",
2763
- {
2764
- style: {
2765
- fontSize: theme2.fontSizes[0],
2766
- fontFamily: theme2.fonts.body,
2767
- color: theme2.colors.textSecondary,
2768
- lineHeight: 1.4,
2769
- overflow: "hidden",
2770
- display: "-webkit-box",
2771
- WebkitLineClamp: 2,
2772
- WebkitBoxOrient: "vertical"
2773
- },
2774
- children: pkg.packageData.description
2775
- }
2776
- ),
2777
- pkg.packageData.license && /* @__PURE__ */ jsx(
2778
- "div",
2779
- {
2780
- style: {
2781
- display: "flex",
2782
- alignItems: "center",
2783
- gap: "4px",
2784
- fontSize: theme2.fontSizes[0]
2785
- },
2786
- children: /* @__PURE__ */ jsx(
2787
- "span",
2788
- {
2789
- style: {
2790
- padding: "1px 6px",
2791
- backgroundColor: theme2.colors.textSecondary + "15",
2792
- color: theme2.colors.textSecondary,
2793
- borderRadius: "3px",
2794
- fontWeight: theme2.fontWeights.medium,
2795
- fontFamily: theme2.fonts.body
2796
- },
2797
- children: pkg.packageData.license
2798
- }
2799
- )
2800
- }
2801
- )
2802
- ]
2803
- }
2804
- ),
2805
- hasInternalDeps && /* @__PURE__ */ jsxs(
2806
- "div",
2807
- {
2808
- style: {
2809
- display: "flex",
2810
- flexDirection: "column",
2811
- gap: "4px",
2812
- fontSize: theme2.fontSizes[0]
2813
- },
2814
- children: [
2815
- dependsOn.length > 0 && /* @__PURE__ */ jsxs(
2816
- "div",
2817
- {
2818
- style: {
2819
- display: "flex",
2820
- alignItems: "center",
2821
- gap: "6px",
2822
- flexWrap: "wrap"
2823
- },
2824
- children: [
2825
- /* @__PURE__ */ jsxs(
2826
- "span",
2827
- {
2828
- style: {
2829
- color: theme2.colors.textSecondary,
2830
- fontFamily: theme2.fonts.body,
2831
- display: "flex",
2832
- alignItems: "center",
2833
- gap: "2px"
2834
- },
2835
- children: [
2836
- /* @__PURE__ */ jsx(ArrowRight$1, { size: 10 }),
2837
- "uses"
2838
- ]
2839
- }
2840
- ),
2841
- dependsOn.map((dep) => /* @__PURE__ */ jsx(
2842
- "span",
2843
- {
2844
- style: {
2845
- padding: "2px 6px",
2846
- backgroundColor: theme2.colors.primary + "15",
2847
- color: theme2.colors.primary,
2848
- borderRadius: "4px",
2849
- fontWeight: theme2.fontWeights.medium,
2850
- fontFamily: theme2.fonts.body
2851
- },
2852
- children: dep.packageData.name
2853
- },
2854
- dep.id
2855
- ))
2856
- ]
2857
- }
2858
- ),
2859
- usedBy.length > 0 && /* @__PURE__ */ jsxs(
2860
- "div",
2861
- {
2862
- style: {
2863
- display: "flex",
2864
- alignItems: "center",
2865
- gap: "6px",
2866
- flexWrap: "wrap"
2867
- },
2868
- children: [
2869
- /* @__PURE__ */ jsx(
2870
- "span",
2871
- {
2872
- style: {
2873
- color: theme2.colors.textSecondary,
2874
- fontFamily: theme2.fonts.body
2875
- },
2876
- children: "used by"
2877
- }
2878
- ),
2879
- usedBy.map((dep) => /* @__PURE__ */ jsx(
2880
- "span",
2881
- {
2882
- style: {
2883
- padding: "2px 6px",
2884
- backgroundColor: theme2.colors.textSecondary + "20",
2885
- color: theme2.colors.textSecondary,
2886
- borderRadius: "4px",
2887
- fontWeight: theme2.fontWeights.medium,
2888
- fontFamily: theme2.fonts.body
2889
- },
2890
- children: dep.packageData.name
2891
- },
2892
- dep.id
2893
- ))
2894
- ]
2895
- }
2896
- )
2897
- ]
2898
- }
2899
- ),
2900
- /* @__PURE__ */ jsxs(
2901
- "div",
2902
- {
2903
- style: {
2904
- display: "flex",
2905
- gap: "12px",
2906
- fontSize: theme2.fontSizes[0],
2907
- fontFamily: theme2.fonts.body,
2908
- color: theme2.colors.textSecondary
2909
- },
2910
- children: [
2911
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
2912
- /* @__PURE__ */ jsx(Package$1, { size: 12 }),
2913
- /* @__PURE__ */ jsxs("span", { children: [
2914
- totalDeps,
2915
- " deps"
2916
- ] })
2917
- ] }),
2918
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
2919
- /* @__PURE__ */ jsx(Settings$1, { size: 12 }),
2920
- /* @__PURE__ */ jsxs("span", { children: [
2921
- configFilesArray.length,
2922
- " configs",
2923
- inheritedConfigs > 0 && /* @__PURE__ */ jsxs("span", { style: { color: theme2.colors.primary }, children: [
2924
- " ",
2925
- "(",
2926
- inheritedConfigs,
2927
- "↑)"
2928
- ] })
2929
- ] })
2930
- ] }),
2931
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
2932
- /* @__PURE__ */ jsx(Terminal$1, { size: 12 }),
2933
- /* @__PURE__ */ jsxs("span", { children: [
2934
- commands,
2935
- " commands"
2936
- ] })
2937
- ] })
2938
- ]
2939
- }
2940
- )
2941
- ]
2942
- }
2943
- );
2944
- };
2945
- const PackageCard = ({
2702
+ const PackageDetailCard = ({
2946
2703
  pkg,
2947
2704
  isExpanded,
2948
2705
  onToggle,
2949
2706
  onCommandClick,
2950
2707
  onConfigClick,
2951
2708
  onPackageClick,
2952
- standalone = false
2709
+ standalone = false,
2710
+ readFile
2953
2711
  }) => {
2954
- var _a, _b, _c, _d, _e2, _f, _g, _h;
2712
+ var _a, _b, _c, _d, _e2, _f, _g, _h, _i;
2955
2713
  const { theme: theme2 } = useTheme();
2956
2714
  const [activeTab, setActiveTab] = useState("dependencies");
2957
2715
  const [activeFilters, setActiveFilters] = useState(/* @__PURE__ */ new Set());
2958
2716
  const [searchQuery, setSearchQuery] = useState("");
2959
2717
  const [showInfoModal, setShowInfoModal] = useState(false);
2718
+ const [envVariables, setEnvVariables] = useState([]);
2719
+ const [envLoading, setEnvLoading] = useState(false);
2720
+ const [envError, setEnvError] = useState(null);
2721
+ const groupedEnvVariables = useMemo(() => {
2722
+ const groups = /* @__PURE__ */ new Map();
2723
+ for (const variable of envVariables) {
2724
+ const group = variable.group;
2725
+ if (!groups.has(group)) {
2726
+ groups.set(group, []);
2727
+ }
2728
+ groups.get(group).push(variable);
2729
+ }
2730
+ const sortedGroups = Array.from(groups.entries()).sort(([a2], [b2]) => {
2731
+ if (a2 === void 0 && b2 === void 0) return 0;
2732
+ if (a2 === void 0) return 1;
2733
+ if (b2 === void 0) return -1;
2734
+ return a2.localeCompare(b2);
2735
+ });
2736
+ return sortedGroups;
2737
+ }, [envVariables]);
2960
2738
  const configFiles = useMemo(() => {
2961
2739
  if (!pkg.configFiles) return [];
2962
2740
  return Object.entries(pkg.configFiles).filter(([, config]) => config == null ? void 0 : config.exists).map(([name2, config]) => ({ name: name2, ...config }));
@@ -2966,6 +2744,34 @@ const PackageCard = ({
2966
2744
  const inherited = configFiles.filter((c2) => c2.isInherited).length;
2967
2745
  return { local, inherited, total: configFiles.length };
2968
2746
  }, [configFiles]);
2747
+ const envConfig = (_a = pkg.configFiles) == null ? void 0 : _a.envvars;
2748
+ const hasEnvConfig = (envConfig == null ? void 0 : envConfig.exists) ?? false;
2749
+ useEffect(() => {
2750
+ if (activeTab !== "env" || !(envConfig == null ? void 0 : envConfig.exists) || !readFile) {
2751
+ return;
2752
+ }
2753
+ const fetchEnvFile = async () => {
2754
+ setEnvLoading(true);
2755
+ setEnvError(null);
2756
+ try {
2757
+ const filePath = pkg.packageData.path ? `${pkg.packageData.path}/${envConfig.path}` : envConfig.path;
2758
+ const content2 = await readFile(filePath);
2759
+ const result = parseEnvFile(content2, envConfig.type);
2760
+ const sorted = [...result.variables].sort(
2761
+ (a2, b2) => a2.name.localeCompare(b2.name)
2762
+ );
2763
+ setEnvVariables(sorted);
2764
+ } catch (err) {
2765
+ setEnvError(
2766
+ err instanceof Error ? err.message : "Failed to load env file"
2767
+ );
2768
+ setEnvVariables([]);
2769
+ } finally {
2770
+ setEnvLoading(false);
2771
+ }
2772
+ };
2773
+ fetchEnvFile();
2774
+ }, [activeTab, envConfig, readFile, pkg.packageData.path]);
2969
2775
  const commands = pkg.packageData.availableCommands || [];
2970
2776
  const dependencyItems = useMemo(() => extractDependencies(pkg), [pkg]);
2971
2777
  const depCounts = useMemo(
@@ -3085,7 +2891,7 @@ const PackageCard = ({
3085
2891
  title: "Open package folder",
3086
2892
  children: [
3087
2893
  /* @__PURE__ */ jsx(Folder$1, { size: 12 }),
3088
- pkg.packageData.path || "/"
2894
+ pkg.packageData.path || "root"
3089
2895
  ]
3090
2896
  }
3091
2897
  )
@@ -3140,7 +2946,7 @@ const PackageCard = ({
3140
2946
  children: pkg.packageData.license
3141
2947
  }
3142
2948
  ),
3143
- (pkg.packageData.author || ((_a = pkg.packageData.authors) == null ? void 0 : _a[0])) && /* @__PURE__ */ jsxs(
2949
+ (pkg.packageData.author || ((_b = pkg.packageData.authors) == null ? void 0 : _b[0])) && /* @__PURE__ */ jsxs(
3144
2950
  "span",
3145
2951
  {
3146
2952
  style: {
@@ -3150,7 +2956,7 @@ const PackageCard = ({
3150
2956
  },
3151
2957
  children: [
3152
2958
  "by ",
3153
- pkg.packageData.author || ((_b = pkg.packageData.authors) == null ? void 0 : _b[0])
2959
+ pkg.packageData.author || ((_c = pkg.packageData.authors) == null ? void 0 : _c[0])
3154
2960
  ]
3155
2961
  }
3156
2962
  )
@@ -3174,6 +2980,13 @@ const PackageCard = ({
3174
2980
  label: "Dependencies",
3175
2981
  count: dependencyItems.length
3176
2982
  },
2983
+ ...hasEnvConfig ? [
2984
+ {
2985
+ id: "env",
2986
+ label: "Env",
2987
+ count: 1
2988
+ }
2989
+ ] : [],
3177
2990
  {
3178
2991
  id: "configs",
3179
2992
  label: "Configs",
@@ -3183,10 +2996,10 @@ const PackageCard = ({
3183
2996
  {
3184
2997
  id: "lenses",
3185
2998
  label: "Lenses",
3186
- count: ((_c = pkg.qualityMetrics) == null ? void 0 : _c.lensReadiness) ? Object.values(pkg.qualityMetrics.lensReadiness).filter(
2999
+ count: ((_d = pkg.qualityMetrics) == null ? void 0 : _d.lensReadiness) ? Object.values(pkg.qualityMetrics.lensReadiness).filter(
3187
3000
  (l2) => l2.ready
3188
3001
  ).length : 0,
3189
- total: ((_d = pkg.qualityMetrics) == null ? void 0 : _d.lensReadiness) ? Object.keys(pkg.qualityMetrics.lensReadiness).length : 0
3002
+ total: ((_e2 = pkg.qualityMetrics) == null ? void 0 : _e2.lensReadiness) ? Object.keys(pkg.qualityMetrics.lensReadiness).length : 0
3190
3003
  }
3191
3004
  ].map((tab2) => /* @__PURE__ */ jsxs(
3192
3005
  "button",
@@ -3237,6 +3050,259 @@ const PackageCard = ({
3237
3050
  overflow: "auto"
3238
3051
  },
3239
3052
  children: [
3053
+ activeTab === "env" && envConfig && /* @__PURE__ */ jsxs("div", { children: [
3054
+ /* @__PURE__ */ jsxs(
3055
+ "div",
3056
+ {
3057
+ style: {
3058
+ display: "flex",
3059
+ alignItems: "center",
3060
+ justifyContent: "space-between",
3061
+ padding: `${theme2.space[2]}px ${theme2.space[4]}px`,
3062
+ borderBottom: `1px solid ${theme2.colors.border}`
3063
+ },
3064
+ children: [
3065
+ /* @__PURE__ */ jsx(
3066
+ "span",
3067
+ {
3068
+ style: {
3069
+ fontSize: theme2.fontSizes[0],
3070
+ fontFamily: theme2.fonts.body,
3071
+ color: theme2.colors.textSecondary
3072
+ },
3073
+ children: envVariables.length > 0 ? `${envVariables.length} variables` : "Environment Variables"
3074
+ }
3075
+ ),
3076
+ /* @__PURE__ */ jsxs(
3077
+ "button",
3078
+ {
3079
+ onClick: () => onConfigClick == null ? void 0 : onConfigClick(envConfig),
3080
+ style: {
3081
+ display: "flex",
3082
+ alignItems: "center",
3083
+ gap: "4px",
3084
+ padding: "4px 8px",
3085
+ backgroundColor: "transparent",
3086
+ border: `1px solid ${theme2.colors.border}`,
3087
+ borderRadius: "4px",
3088
+ cursor: "pointer",
3089
+ color: theme2.colors.textSecondary,
3090
+ fontSize: theme2.fontSizes[0],
3091
+ fontFamily: theme2.fonts.body
3092
+ },
3093
+ title: `Open ${envConfig.path}`,
3094
+ children: [
3095
+ /* @__PURE__ */ jsx(FileText$1, { size: 12 }),
3096
+ envConfig.path
3097
+ ]
3098
+ }
3099
+ )
3100
+ ]
3101
+ }
3102
+ ),
3103
+ envLoading && /* @__PURE__ */ jsx(
3104
+ "div",
3105
+ {
3106
+ style: {
3107
+ padding: "20px",
3108
+ textAlign: "center",
3109
+ color: theme2.colors.textSecondary,
3110
+ fontSize: theme2.fontSizes[1],
3111
+ fontFamily: theme2.fonts.body
3112
+ },
3113
+ children: "Loading environment variables..."
3114
+ }
3115
+ ),
3116
+ envError && /* @__PURE__ */ jsxs(
3117
+ "div",
3118
+ {
3119
+ style: {
3120
+ padding: "12px",
3121
+ backgroundColor: theme2.colors.error + "15",
3122
+ border: `1px solid ${theme2.colors.error}30`,
3123
+ borderRadius: "6px",
3124
+ color: theme2.colors.error,
3125
+ fontSize: theme2.fontSizes[1],
3126
+ fontFamily: theme2.fonts.body,
3127
+ display: "flex",
3128
+ alignItems: "center",
3129
+ gap: "8px"
3130
+ },
3131
+ children: [
3132
+ /* @__PURE__ */ jsx(CircleAlert$1, { size: 16 }),
3133
+ envError
3134
+ ]
3135
+ }
3136
+ ),
3137
+ !envLoading && !envError && envVariables.length > 0 && /* @__PURE__ */ jsx(
3138
+ "div",
3139
+ {
3140
+ style: {
3141
+ display: "flex",
3142
+ flexDirection: "column"
3143
+ },
3144
+ children: groupedEnvVariables.map(([groupName, variables]) => /* @__PURE__ */ jsxs("div", { children: [
3145
+ groupName && /* @__PURE__ */ jsx(
3146
+ "div",
3147
+ {
3148
+ style: {
3149
+ padding: "8px 12px",
3150
+ backgroundColor: theme2.colors.backgroundTertiary,
3151
+ borderBottom: `1px solid ${theme2.colors.border}`,
3152
+ fontSize: theme2.fontSizes[0],
3153
+ fontFamily: theme2.fonts.body,
3154
+ fontWeight: theme2.fontWeights.semibold,
3155
+ color: theme2.colors.textSecondary,
3156
+ textTransform: "uppercase",
3157
+ letterSpacing: "0.5px"
3158
+ },
3159
+ children: groupName
3160
+ }
3161
+ ),
3162
+ variables.map((variable) => /* @__PURE__ */ jsxs(
3163
+ "div",
3164
+ {
3165
+ style: {
3166
+ padding: `${theme2.space[3]}px ${theme2.space[4]}px`,
3167
+ backgroundColor: theme2.colors.background,
3168
+ borderBottom: `1px solid ${theme2.colors.border}`
3169
+ },
3170
+ children: [
3171
+ /* @__PURE__ */ jsxs(
3172
+ "div",
3173
+ {
3174
+ style: {
3175
+ display: "flex",
3176
+ alignItems: "center",
3177
+ gap: "8px",
3178
+ marginBottom: variable.description ? "6px" : 0
3179
+ },
3180
+ children: [
3181
+ /* @__PURE__ */ jsx(
3182
+ "code",
3183
+ {
3184
+ style: {
3185
+ fontSize: theme2.fontSizes[1],
3186
+ fontFamily: theme2.fonts.monospace,
3187
+ color: theme2.colors.text,
3188
+ fontWeight: theme2.fontWeights.medium
3189
+ },
3190
+ children: variable.name
3191
+ }
3192
+ ),
3193
+ variable.link && /* @__PURE__ */ jsx(
3194
+ "a",
3195
+ {
3196
+ href: variable.link,
3197
+ target: "_blank",
3198
+ rel: "noopener noreferrer",
3199
+ style: {
3200
+ display: "flex",
3201
+ alignItems: "center",
3202
+ color: theme2.colors.accent,
3203
+ opacity: 0.7,
3204
+ transition: "opacity 0.15s ease"
3205
+ },
3206
+ onMouseEnter: (e2) => {
3207
+ e2.currentTarget.style.opacity = "1";
3208
+ },
3209
+ onMouseLeave: (e2) => {
3210
+ e2.currentTarget.style.opacity = "0.7";
3211
+ },
3212
+ title: variable.link,
3213
+ children: /* @__PURE__ */ jsx(ExternalLink$1, { size: 12 })
3214
+ }
3215
+ ),
3216
+ variable.required ? /* @__PURE__ */ jsxs(
3217
+ "span",
3218
+ {
3219
+ style: {
3220
+ display: "flex",
3221
+ alignItems: "center",
3222
+ gap: "3px",
3223
+ padding: "2px 6px",
3224
+ backgroundColor: theme2.colors.error + "20",
3225
+ color: theme2.colors.error,
3226
+ borderRadius: "4px",
3227
+ fontSize: theme2.fontSizes[0],
3228
+ fontFamily: theme2.fonts.body,
3229
+ fontWeight: theme2.fontWeights.medium
3230
+ },
3231
+ children: [
3232
+ /* @__PURE__ */ jsx(CircleAlert$1, { size: 10 }),
3233
+ "required"
3234
+ ]
3235
+ }
3236
+ ) : /* @__PURE__ */ jsxs(
3237
+ "span",
3238
+ {
3239
+ style: {
3240
+ display: "flex",
3241
+ alignItems: "center",
3242
+ gap: "3px",
3243
+ padding: "2px 6px",
3244
+ backgroundColor: theme2.colors.success + "20",
3245
+ color: theme2.colors.success,
3246
+ borderRadius: "4px",
3247
+ fontSize: theme2.fontSizes[0],
3248
+ fontFamily: theme2.fonts.body
3249
+ },
3250
+ children: [
3251
+ /* @__PURE__ */ jsx(CircleCheckBig$1, { size: 10 }),
3252
+ "optional"
3253
+ ]
3254
+ }
3255
+ ),
3256
+ variable.default && /* @__PURE__ */ jsxs(
3257
+ "span",
3258
+ {
3259
+ style: {
3260
+ fontSize: theme2.fontSizes[0],
3261
+ fontFamily: theme2.fonts.monospace,
3262
+ color: theme2.colors.textSecondary
3263
+ },
3264
+ children: [
3265
+ "default: ",
3266
+ variable.default
3267
+ ]
3268
+ }
3269
+ )
3270
+ ]
3271
+ }
3272
+ ),
3273
+ variable.description && /* @__PURE__ */ jsx(
3274
+ "div",
3275
+ {
3276
+ style: {
3277
+ fontSize: theme2.fontSizes[1],
3278
+ fontFamily: theme2.fonts.body,
3279
+ color: theme2.colors.textSecondary,
3280
+ lineHeight: 1.4
3281
+ },
3282
+ children: variable.description
3283
+ }
3284
+ )
3285
+ ]
3286
+ },
3287
+ variable.name
3288
+ ))
3289
+ ] }, groupName ?? "__ungrouped__"))
3290
+ }
3291
+ ),
3292
+ !envLoading && !envError && envVariables.length === 0 && !readFile && /* @__PURE__ */ jsx(
3293
+ "div",
3294
+ {
3295
+ style: {
3296
+ padding: "20px",
3297
+ textAlign: "center",
3298
+ color: theme2.colors.textSecondary,
3299
+ fontSize: theme2.fontSizes[1],
3300
+ fontFamily: theme2.fonts.body
3301
+ },
3302
+ children: "Click the file to view environment variables"
3303
+ }
3304
+ )
3305
+ ] }),
3240
3306
  activeTab === "configs" && /* @__PURE__ */ jsx("div", { style: { padding: "12px" }, children: /* @__PURE__ */ jsx(ConfigList, { configs: configFiles, onConfigClick }) }),
3241
3307
  activeTab === "lenses" && /* @__PURE__ */ jsxs(
3242
3308
  "div",
@@ -3250,7 +3316,7 @@ const PackageCard = ({
3250
3316
  /* @__PURE__ */ jsx(
3251
3317
  LensReadinessSection,
3252
3318
  {
3253
- lensReadiness: (_e2 = pkg.qualityMetrics) == null ? void 0 : _e2.lensReadiness
3319
+ lensReadiness: (_f = pkg.qualityMetrics) == null ? void 0 : _f.lensReadiness
3254
3320
  }
3255
3321
  ),
3256
3322
  /* @__PURE__ */ jsx(
@@ -3295,7 +3361,6 @@ const PackageCard = ({
3295
3361
  "div",
3296
3362
  {
3297
3363
  style: {
3298
- padding: "12px",
3299
3364
  borderBottom: `1px solid ${theme2.colors.border}`
3300
3365
  },
3301
3366
  children: /* @__PURE__ */ jsx(
@@ -3310,59 +3375,38 @@ const PackageCard = ({
3310
3375
  )
3311
3376
  }
3312
3377
  ),
3313
- /* @__PURE__ */ jsxs(
3378
+ /* @__PURE__ */ jsx(
3314
3379
  "div",
3315
3380
  {
3316
- style: { flex: 1, overflow: "auto", padding: "8px 12px" },
3317
- children: [
3318
- /* @__PURE__ */ jsxs(
3319
- "div",
3320
- {
3321
- style: {
3322
- fontSize: theme2.fontSizes[0],
3323
- fontFamily: theme2.fonts.body,
3324
- color: theme2.colors.textSecondary,
3325
- marginBottom: "8px"
3326
- },
3327
- children: [
3328
- "Showing ",
3329
- filteredDependencies.length,
3330
- " of",
3331
- " ",
3332
- dependencyItems.length
3333
- ]
3334
- }
3335
- ),
3336
- /* @__PURE__ */ jsx(
3337
- "div",
3338
- {
3339
- style: {
3340
- display: "flex",
3341
- flexDirection: "column",
3342
- gap: "4px"
3343
- },
3344
- children: filteredDependencies.length === 0 ? /* @__PURE__ */ jsx(
3345
- "div",
3346
- {
3347
- style: {
3348
- padding: "12px",
3349
- textAlign: "center",
3350
- color: theme2.colors.textSecondary,
3351
- fontSize: theme2.fontSizes[1],
3352
- fontFamily: theme2.fonts.body
3353
- },
3354
- children: "No dependencies match your filters"
3355
- }
3356
- ) : filteredDependencies.map((dep) => /* @__PURE__ */ jsx(
3357
- DependencyRow,
3358
- {
3359
- dependency: dep
3381
+ style: { flex: 1, overflow: "auto" },
3382
+ children: /* @__PURE__ */ jsx(
3383
+ "div",
3384
+ {
3385
+ style: {
3386
+ display: "flex",
3387
+ flexDirection: "column"
3388
+ },
3389
+ children: filteredDependencies.length === 0 ? /* @__PURE__ */ jsx(
3390
+ "div",
3391
+ {
3392
+ style: {
3393
+ padding: "12px",
3394
+ textAlign: "center",
3395
+ color: theme2.colors.textSecondary,
3396
+ fontSize: theme2.fontSizes[1],
3397
+ fontFamily: theme2.fonts.body
3360
3398
  },
3361
- `${dep.name}-${dep.dependencyType}`
3362
- ))
3363
- }
3364
- )
3365
- ]
3399
+ children: "No dependencies match your filters"
3400
+ }
3401
+ ) : filteredDependencies.map((dep) => /* @__PURE__ */ jsx(
3402
+ DependencyRow,
3403
+ {
3404
+ dependency: dep
3405
+ },
3406
+ `${dep.name}-${dep.dependencyType}`
3407
+ ))
3408
+ }
3409
+ )
3366
3410
  }
3367
3411
  )
3368
3412
  ] }),
@@ -3469,7 +3513,7 @@ const PackageCard = ({
3469
3513
  title: "Open package folder",
3470
3514
  children: [
3471
3515
  /* @__PURE__ */ jsx(Folder$1, { size: 12 }),
3472
- pkg.packageData.path || "/"
3516
+ pkg.packageData.path || "root"
3473
3517
  ]
3474
3518
  }
3475
3519
  )
@@ -3491,6 +3535,13 @@ const PackageCard = ({
3491
3535
  label: "Deps",
3492
3536
  count: dependencyItems.length
3493
3537
  },
3538
+ ...hasEnvConfig ? [
3539
+ {
3540
+ id: "env",
3541
+ label: "Env",
3542
+ count: 1
3543
+ }
3544
+ ] : [],
3494
3545
  {
3495
3546
  id: "configs",
3496
3547
  label: "Configs",
@@ -3500,10 +3551,10 @@ const PackageCard = ({
3500
3551
  {
3501
3552
  id: "lenses",
3502
3553
  label: "Lenses",
3503
- count: ((_f = pkg.qualityMetrics) == null ? void 0 : _f.lensReadiness) ? Object.values(pkg.qualityMetrics.lensReadiness).filter(
3554
+ count: ((_g = pkg.qualityMetrics) == null ? void 0 : _g.lensReadiness) ? Object.values(pkg.qualityMetrics.lensReadiness).filter(
3504
3555
  (l2) => l2.ready
3505
3556
  ).length : 0,
3506
- total: ((_g = pkg.qualityMetrics) == null ? void 0 : _g.lensReadiness) ? Object.keys(pkg.qualityMetrics.lensReadiness).length : 0
3557
+ total: ((_h = pkg.qualityMetrics) == null ? void 0 : _h.lensReadiness) ? Object.keys(pkg.qualityMetrics.lensReadiness).length : 0
3507
3558
  }
3508
3559
  ].map((tab2) => /* @__PURE__ */ jsxs(
3509
3560
  "button",
@@ -3554,6 +3605,259 @@ const PackageCard = ({
3554
3605
  overflow: "auto"
3555
3606
  },
3556
3607
  children: [
3608
+ activeTab === "env" && envConfig && /* @__PURE__ */ jsxs("div", { children: [
3609
+ /* @__PURE__ */ jsxs(
3610
+ "div",
3611
+ {
3612
+ style: {
3613
+ display: "flex",
3614
+ alignItems: "center",
3615
+ justifyContent: "space-between",
3616
+ padding: `${theme2.space[2]}px ${theme2.space[4]}px`,
3617
+ borderBottom: `1px solid ${theme2.colors.border}`
3618
+ },
3619
+ children: [
3620
+ /* @__PURE__ */ jsx(
3621
+ "span",
3622
+ {
3623
+ style: {
3624
+ fontSize: theme2.fontSizes[0],
3625
+ fontFamily: theme2.fonts.body,
3626
+ color: theme2.colors.textSecondary
3627
+ },
3628
+ children: envVariables.length > 0 ? `${envVariables.length} variables` : "Environment Variables"
3629
+ }
3630
+ ),
3631
+ /* @__PURE__ */ jsxs(
3632
+ "button",
3633
+ {
3634
+ onClick: () => onConfigClick == null ? void 0 : onConfigClick(envConfig),
3635
+ style: {
3636
+ display: "flex",
3637
+ alignItems: "center",
3638
+ gap: "4px",
3639
+ padding: "4px 8px",
3640
+ backgroundColor: "transparent",
3641
+ border: `1px solid ${theme2.colors.border}`,
3642
+ borderRadius: "4px",
3643
+ cursor: "pointer",
3644
+ color: theme2.colors.textSecondary,
3645
+ fontSize: theme2.fontSizes[0],
3646
+ fontFamily: theme2.fonts.body
3647
+ },
3648
+ title: `Open ${envConfig.path}`,
3649
+ children: [
3650
+ /* @__PURE__ */ jsx(FileText$1, { size: 12 }),
3651
+ envConfig.path
3652
+ ]
3653
+ }
3654
+ )
3655
+ ]
3656
+ }
3657
+ ),
3658
+ envLoading && /* @__PURE__ */ jsx(
3659
+ "div",
3660
+ {
3661
+ style: {
3662
+ padding: "20px",
3663
+ textAlign: "center",
3664
+ color: theme2.colors.textSecondary,
3665
+ fontSize: theme2.fontSizes[1],
3666
+ fontFamily: theme2.fonts.body
3667
+ },
3668
+ children: "Loading environment variables..."
3669
+ }
3670
+ ),
3671
+ envError && /* @__PURE__ */ jsxs(
3672
+ "div",
3673
+ {
3674
+ style: {
3675
+ padding: "12px",
3676
+ backgroundColor: theme2.colors.error + "15",
3677
+ border: `1px solid ${theme2.colors.error}30`,
3678
+ borderRadius: "6px",
3679
+ color: theme2.colors.error,
3680
+ fontSize: theme2.fontSizes[1],
3681
+ fontFamily: theme2.fonts.body,
3682
+ display: "flex",
3683
+ alignItems: "center",
3684
+ gap: "8px"
3685
+ },
3686
+ children: [
3687
+ /* @__PURE__ */ jsx(CircleAlert$1, { size: 16 }),
3688
+ envError
3689
+ ]
3690
+ }
3691
+ ),
3692
+ !envLoading && !envError && envVariables.length > 0 && /* @__PURE__ */ jsx(
3693
+ "div",
3694
+ {
3695
+ style: {
3696
+ display: "flex",
3697
+ flexDirection: "column"
3698
+ },
3699
+ children: groupedEnvVariables.map(([groupName, variables]) => /* @__PURE__ */ jsxs("div", { children: [
3700
+ groupName && /* @__PURE__ */ jsx(
3701
+ "div",
3702
+ {
3703
+ style: {
3704
+ padding: "8px 12px",
3705
+ backgroundColor: theme2.colors.backgroundTertiary,
3706
+ borderBottom: `1px solid ${theme2.colors.border}`,
3707
+ fontSize: theme2.fontSizes[0],
3708
+ fontFamily: theme2.fonts.body,
3709
+ fontWeight: theme2.fontWeights.semibold,
3710
+ color: theme2.colors.textSecondary,
3711
+ textTransform: "uppercase",
3712
+ letterSpacing: "0.5px"
3713
+ },
3714
+ children: groupName
3715
+ }
3716
+ ),
3717
+ variables.map((variable) => /* @__PURE__ */ jsxs(
3718
+ "div",
3719
+ {
3720
+ style: {
3721
+ padding: `${theme2.space[3]}px ${theme2.space[4]}px`,
3722
+ backgroundColor: theme2.colors.background,
3723
+ borderBottom: `1px solid ${theme2.colors.border}`
3724
+ },
3725
+ children: [
3726
+ /* @__PURE__ */ jsxs(
3727
+ "div",
3728
+ {
3729
+ style: {
3730
+ display: "flex",
3731
+ alignItems: "center",
3732
+ gap: "8px",
3733
+ marginBottom: variable.description ? "6px" : 0
3734
+ },
3735
+ children: [
3736
+ /* @__PURE__ */ jsx(
3737
+ "code",
3738
+ {
3739
+ style: {
3740
+ fontSize: theme2.fontSizes[1],
3741
+ fontFamily: theme2.fonts.monospace,
3742
+ color: theme2.colors.text,
3743
+ fontWeight: theme2.fontWeights.medium
3744
+ },
3745
+ children: variable.name
3746
+ }
3747
+ ),
3748
+ variable.link && /* @__PURE__ */ jsx(
3749
+ "a",
3750
+ {
3751
+ href: variable.link,
3752
+ target: "_blank",
3753
+ rel: "noopener noreferrer",
3754
+ style: {
3755
+ display: "flex",
3756
+ alignItems: "center",
3757
+ color: theme2.colors.accent,
3758
+ opacity: 0.7,
3759
+ transition: "opacity 0.15s ease"
3760
+ },
3761
+ onMouseEnter: (e2) => {
3762
+ e2.currentTarget.style.opacity = "1";
3763
+ },
3764
+ onMouseLeave: (e2) => {
3765
+ e2.currentTarget.style.opacity = "0.7";
3766
+ },
3767
+ title: variable.link,
3768
+ children: /* @__PURE__ */ jsx(ExternalLink$1, { size: 12 })
3769
+ }
3770
+ ),
3771
+ variable.required ? /* @__PURE__ */ jsxs(
3772
+ "span",
3773
+ {
3774
+ style: {
3775
+ display: "flex",
3776
+ alignItems: "center",
3777
+ gap: "3px",
3778
+ padding: "2px 6px",
3779
+ backgroundColor: theme2.colors.error + "20",
3780
+ color: theme2.colors.error,
3781
+ borderRadius: "4px",
3782
+ fontSize: theme2.fontSizes[0],
3783
+ fontFamily: theme2.fonts.body,
3784
+ fontWeight: theme2.fontWeights.medium
3785
+ },
3786
+ children: [
3787
+ /* @__PURE__ */ jsx(CircleAlert$1, { size: 10 }),
3788
+ "required"
3789
+ ]
3790
+ }
3791
+ ) : /* @__PURE__ */ jsxs(
3792
+ "span",
3793
+ {
3794
+ style: {
3795
+ display: "flex",
3796
+ alignItems: "center",
3797
+ gap: "3px",
3798
+ padding: "2px 6px",
3799
+ backgroundColor: theme2.colors.success + "20",
3800
+ color: theme2.colors.success,
3801
+ borderRadius: "4px",
3802
+ fontSize: theme2.fontSizes[0],
3803
+ fontFamily: theme2.fonts.body
3804
+ },
3805
+ children: [
3806
+ /* @__PURE__ */ jsx(CircleCheckBig$1, { size: 10 }),
3807
+ "optional"
3808
+ ]
3809
+ }
3810
+ ),
3811
+ variable.default && /* @__PURE__ */ jsxs(
3812
+ "span",
3813
+ {
3814
+ style: {
3815
+ fontSize: theme2.fontSizes[0],
3816
+ fontFamily: theme2.fonts.monospace,
3817
+ color: theme2.colors.textSecondary
3818
+ },
3819
+ children: [
3820
+ "default: ",
3821
+ variable.default
3822
+ ]
3823
+ }
3824
+ )
3825
+ ]
3826
+ }
3827
+ ),
3828
+ variable.description && /* @__PURE__ */ jsx(
3829
+ "div",
3830
+ {
3831
+ style: {
3832
+ fontSize: theme2.fontSizes[1],
3833
+ fontFamily: theme2.fonts.body,
3834
+ color: theme2.colors.textSecondary,
3835
+ lineHeight: 1.4
3836
+ },
3837
+ children: variable.description
3838
+ }
3839
+ )
3840
+ ]
3841
+ },
3842
+ variable.name
3843
+ ))
3844
+ ] }, groupName ?? "__ungrouped__"))
3845
+ }
3846
+ ),
3847
+ !envLoading && !envError && envVariables.length === 0 && !readFile && /* @__PURE__ */ jsx(
3848
+ "div",
3849
+ {
3850
+ style: {
3851
+ padding: "20px",
3852
+ textAlign: "center",
3853
+ color: theme2.colors.textSecondary,
3854
+ fontSize: theme2.fontSizes[1],
3855
+ fontFamily: theme2.fonts.body
3856
+ },
3857
+ children: "Click the file to view environment variables"
3858
+ }
3859
+ )
3860
+ ] }),
3557
3861
  activeTab === "configs" && /* @__PURE__ */ jsx("div", { style: { padding: "12px" }, children: /* @__PURE__ */ jsx(
3558
3862
  ConfigList,
3559
3863
  {
@@ -3565,7 +3869,7 @@ const PackageCard = ({
3565
3869
  /* @__PURE__ */ jsx(
3566
3870
  LensReadinessSection,
3567
3871
  {
3568
- lensReadiness: (_h = pkg.qualityMetrics) == null ? void 0 : _h.lensReadiness
3872
+ lensReadiness: (_i = pkg.qualityMetrics) == null ? void 0 : _i.lensReadiness
3569
3873
  }
3570
3874
  ),
3571
3875
  /* @__PURE__ */ jsx(
@@ -3608,7 +3912,6 @@ const PackageCard = ({
3608
3912
  "div",
3609
3913
  {
3610
3914
  style: {
3611
- padding: "12px",
3612
3915
  borderBottom: `1px solid ${theme2.colors.border}`
3613
3916
  },
3614
3917
  children: /* @__PURE__ */ jsx(
@@ -3623,59 +3926,38 @@ const PackageCard = ({
3623
3926
  )
3624
3927
  }
3625
3928
  ),
3626
- /* @__PURE__ */ jsxs(
3929
+ /* @__PURE__ */ jsx(
3627
3930
  "div",
3628
3931
  {
3629
- style: { flex: 1, overflow: "auto", padding: "8px 12px" },
3630
- children: [
3631
- /* @__PURE__ */ jsxs(
3632
- "div",
3633
- {
3634
- style: {
3635
- fontSize: theme2.fontSizes[0],
3636
- fontFamily: theme2.fonts.body,
3637
- color: theme2.colors.textSecondary,
3638
- marginBottom: "8px"
3639
- },
3640
- children: [
3641
- "Showing ",
3642
- filteredDependencies.length,
3643
- " of",
3644
- " ",
3645
- dependencyItems.length
3646
- ]
3647
- }
3648
- ),
3649
- /* @__PURE__ */ jsx(
3650
- "div",
3651
- {
3652
- style: {
3653
- display: "flex",
3654
- flexDirection: "column",
3655
- gap: "4px"
3656
- },
3657
- children: filteredDependencies.length === 0 ? /* @__PURE__ */ jsx(
3658
- "div",
3659
- {
3660
- style: {
3661
- padding: "12px",
3662
- textAlign: "center",
3663
- color: theme2.colors.textSecondary,
3664
- fontSize: theme2.fontSizes[1],
3665
- fontFamily: theme2.fonts.body
3666
- },
3667
- children: "No dependencies match your filters"
3668
- }
3669
- ) : filteredDependencies.map((dep) => /* @__PURE__ */ jsx(
3670
- DependencyRow,
3671
- {
3672
- dependency: dep
3932
+ style: { flex: 1, overflow: "auto" },
3933
+ children: /* @__PURE__ */ jsx(
3934
+ "div",
3935
+ {
3936
+ style: {
3937
+ display: "flex",
3938
+ flexDirection: "column"
3939
+ },
3940
+ children: filteredDependencies.length === 0 ? /* @__PURE__ */ jsx(
3941
+ "div",
3942
+ {
3943
+ style: {
3944
+ padding: "12px",
3945
+ textAlign: "center",
3946
+ color: theme2.colors.textSecondary,
3947
+ fontSize: theme2.fontSizes[1],
3948
+ fontFamily: theme2.fonts.body
3673
3949
  },
3674
- `${dep.name}-${dep.dependencyType}`
3675
- ))
3676
- }
3677
- )
3678
- ]
3950
+ children: "No dependencies match your filters"
3951
+ }
3952
+ ) : filteredDependencies.map((dep) => /* @__PURE__ */ jsx(
3953
+ DependencyRow,
3954
+ {
3955
+ dependency: dep
3956
+ },
3957
+ `${dep.name}-${dep.dependencyType}`
3958
+ ))
3959
+ }
3960
+ )
3679
3961
  }
3680
3962
  )
3681
3963
  ] }),
@@ -3697,6 +3979,257 @@ const PackageCard = ({
3697
3979
  }
3698
3980
  );
3699
3981
  };
3982
+ function findInternalDependencies(pkg, allPackages) {
3983
+ const currentName = pkg.packageData.name;
3984
+ const allDeps = /* @__PURE__ */ new Set([
3985
+ ...Object.keys(pkg.packageData.dependencies || {}),
3986
+ ...Object.keys(pkg.packageData.devDependencies || {}),
3987
+ ...Object.keys(pkg.packageData.peerDependencies || {})
3988
+ ]);
3989
+ const dependsOn = allPackages.filter(
3990
+ (p2) => p2.packageData.name !== currentName && allDeps.has(p2.packageData.name)
3991
+ );
3992
+ const usedBy = allPackages.filter((other) => {
3993
+ if (other.packageData.name === currentName) return false;
3994
+ const otherDeps = /* @__PURE__ */ new Set([
3995
+ ...Object.keys(other.packageData.dependencies || {}),
3996
+ ...Object.keys(other.packageData.devDependencies || {}),
3997
+ ...Object.keys(other.packageData.peerDependencies || {})
3998
+ ]);
3999
+ return otherDeps.has(currentName);
4000
+ });
4001
+ return { dependsOn, usedBy };
4002
+ }
4003
+ const PackageSummaryCard = ({
4004
+ pkg,
4005
+ allPackages,
4006
+ onClick,
4007
+ onHover
4008
+ }) => {
4009
+ var _a, _b;
4010
+ const { theme: theme2 } = useTheme();
4011
+ const deps = pkg.packageData.dependencies || {};
4012
+ const devDeps = pkg.packageData.devDependencies || {};
4013
+ const peerDeps = pkg.packageData.peerDependencies || {};
4014
+ const totalDeps = Object.keys(deps).length + Object.keys(devDeps).length + Object.keys(peerDeps).length;
4015
+ const configFilesArray = pkg.configFiles ? Object.values(pkg.configFiles).filter((c2) => c2 == null ? void 0 : c2.exists) : [];
4016
+ const inheritedConfigs = configFilesArray.filter(
4017
+ (c2) => c2 == null ? void 0 : c2.isInherited
4018
+ ).length;
4019
+ const commands = ((_a = pkg.packageData.availableCommands) == null ? void 0 : _a.length) || 0;
4020
+ const { dependsOn, usedBy } = useMemo(
4021
+ () => findInternalDependencies(pkg, allPackages),
4022
+ [pkg, allPackages]
4023
+ );
4024
+ const packageRole = useMemo(() => {
4025
+ if (dependsOn.length === 0 && usedBy.length === 0) {
4026
+ return null;
4027
+ }
4028
+ if (dependsOn.length === 0 && usedBy.length > 0) {
4029
+ return { label: "core", icon: Box$1, color: "#10b981" };
4030
+ }
4031
+ if (dependsOn.length > 0 && usedBy.length === 0) {
4032
+ return { label: "app", icon: Layers$1, color: "#8b5cf6" };
4033
+ }
4034
+ return { label: "shared", icon: LayoutGrid$1, color: "#f59e0b" };
4035
+ }, [dependsOn.length, usedBy.length]);
4036
+ return /* @__PURE__ */ jsxs(
4037
+ "button",
4038
+ {
4039
+ onClick,
4040
+ style: {
4041
+ display: "flex",
4042
+ flexDirection: "column",
4043
+ gap: "8px",
4044
+ padding: "20px",
4045
+ backgroundColor: theme2.colors.backgroundSecondary,
4046
+ border: `1px solid ${theme2.colors.border}`,
4047
+ borderRadius: "0",
4048
+ cursor: "pointer",
4049
+ textAlign: "left",
4050
+ transition: "all 0.15s ease",
4051
+ width: "100%"
4052
+ },
4053
+ onMouseEnter: (e2) => {
4054
+ e2.currentTarget.style.borderColor = theme2.colors.primary;
4055
+ e2.currentTarget.style.backgroundColor = theme2.colors.backgroundTertiary;
4056
+ onHover == null ? void 0 : onHover(pkg);
4057
+ },
4058
+ onMouseLeave: (e2) => {
4059
+ e2.currentTarget.style.borderColor = theme2.colors.border;
4060
+ e2.currentTarget.style.backgroundColor = theme2.colors.backgroundSecondary;
4061
+ onHover == null ? void 0 : onHover(null);
4062
+ },
4063
+ children: [
4064
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
4065
+ /* @__PURE__ */ jsx(
4066
+ PackageManagerIcon,
4067
+ {
4068
+ packageManager: pkg.packageData.packageManager,
4069
+ size: 20
4070
+ }
4071
+ ),
4072
+ /* @__PURE__ */ jsxs("div", { style: { flex: 1, minWidth: 0 }, children: [
4073
+ /* @__PURE__ */ jsx(
4074
+ "div",
4075
+ {
4076
+ style: {
4077
+ fontSize: theme2.fontSizes[3],
4078
+ fontWeight: theme2.fontWeights.semibold,
4079
+ fontFamily: theme2.fonts.body,
4080
+ color: theme2.colors.text,
4081
+ overflow: "hidden",
4082
+ textOverflow: "ellipsis",
4083
+ whiteSpace: "nowrap"
4084
+ },
4085
+ children: pkg.packageData.name
4086
+ }
4087
+ ),
4088
+ /* @__PURE__ */ jsxs(
4089
+ "div",
4090
+ {
4091
+ style: {
4092
+ fontSize: theme2.fontSizes[1],
4093
+ fontFamily: theme2.fonts.body,
4094
+ color: theme2.colors.textSecondary
4095
+ },
4096
+ children: [
4097
+ pkg.packageData.path || "root",
4098
+ pkg.packageData.version && ` • v${pkg.packageData.version}`
4099
+ ]
4100
+ }
4101
+ )
4102
+ ] }),
4103
+ pkg.packageData.isMonorepoRoot && ((_b = pkg.packageData.monorepoMetadata) == null ? void 0 : _b.orchestrator) && /* @__PURE__ */ jsx(
4104
+ OrchestratorBadge,
4105
+ {
4106
+ orchestrator: pkg.packageData.monorepoMetadata.orchestrator,
4107
+ rootRole: pkg.packageData.monorepoMetadata.rootRole,
4108
+ size: "sm"
4109
+ }
4110
+ ),
4111
+ packageRole && /* @__PURE__ */ jsxs(
4112
+ "span",
4113
+ {
4114
+ style: {
4115
+ display: "flex",
4116
+ alignItems: "center",
4117
+ gap: "4px",
4118
+ padding: "3px 8px",
4119
+ backgroundColor: packageRole.color + "20",
4120
+ color: packageRole.color,
4121
+ borderRadius: "4px",
4122
+ fontSize: theme2.fontSizes[1],
4123
+ fontWeight: theme2.fontWeights.medium,
4124
+ fontFamily: theme2.fonts.body,
4125
+ flexShrink: 0
4126
+ },
4127
+ children: [
4128
+ /* @__PURE__ */ jsx(packageRole.icon, { size: 12 }),
4129
+ packageRole.label
4130
+ ]
4131
+ }
4132
+ ),
4133
+ /* @__PURE__ */ jsx(ChevronRight$1, { size: 16, color: theme2.colors.textSecondary })
4134
+ ] }),
4135
+ (pkg.packageData.description || pkg.packageData.license) && /* @__PURE__ */ jsxs(
4136
+ "div",
4137
+ {
4138
+ style: {
4139
+ display: "flex",
4140
+ flexDirection: "column",
4141
+ gap: "4px"
4142
+ },
4143
+ children: [
4144
+ pkg.packageData.description && /* @__PURE__ */ jsx(
4145
+ "div",
4146
+ {
4147
+ style: {
4148
+ fontSize: theme2.fontSizes[1],
4149
+ fontFamily: theme2.fonts.body,
4150
+ color: theme2.colors.textSecondary,
4151
+ lineHeight: 1.4,
4152
+ overflow: "hidden",
4153
+ display: "-webkit-box",
4154
+ WebkitLineClamp: 2,
4155
+ WebkitBoxOrient: "vertical"
4156
+ },
4157
+ children: pkg.packageData.description
4158
+ }
4159
+ ),
4160
+ pkg.packageData.license && /* @__PURE__ */ jsx(
4161
+ "div",
4162
+ {
4163
+ style: {
4164
+ display: "flex",
4165
+ alignItems: "center",
4166
+ gap: "4px",
4167
+ fontSize: theme2.fontSizes[1]
4168
+ },
4169
+ children: /* @__PURE__ */ jsx(
4170
+ "span",
4171
+ {
4172
+ style: {
4173
+ padding: "1px 6px",
4174
+ backgroundColor: theme2.colors.textSecondary + "15",
4175
+ color: theme2.colors.textSecondary,
4176
+ borderRadius: "3px",
4177
+ fontWeight: theme2.fontWeights.medium,
4178
+ fontFamily: theme2.fonts.body
4179
+ },
4180
+ children: pkg.packageData.license
4181
+ }
4182
+ )
4183
+ }
4184
+ )
4185
+ ]
4186
+ }
4187
+ ),
4188
+ /* @__PURE__ */ jsxs(
4189
+ "div",
4190
+ {
4191
+ style: {
4192
+ display: "flex",
4193
+ gap: "12px",
4194
+ fontSize: theme2.fontSizes[1],
4195
+ fontFamily: theme2.fonts.body,
4196
+ color: theme2.colors.textSecondary
4197
+ },
4198
+ children: [
4199
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
4200
+ /* @__PURE__ */ jsx(Package$1, { size: 12 }),
4201
+ /* @__PURE__ */ jsxs("span", { children: [
4202
+ totalDeps,
4203
+ " deps"
4204
+ ] })
4205
+ ] }),
4206
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
4207
+ /* @__PURE__ */ jsx(Settings$1, { size: 12 }),
4208
+ /* @__PURE__ */ jsxs("span", { children: [
4209
+ configFilesArray.length,
4210
+ " configs",
4211
+ inheritedConfigs > 0 && /* @__PURE__ */ jsxs("span", { style: { color: theme2.colors.primary }, children: [
4212
+ " ",
4213
+ "(",
4214
+ inheritedConfigs,
4215
+ "↑)"
4216
+ ] })
4217
+ ] })
4218
+ ] }),
4219
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
4220
+ /* @__PURE__ */ jsx(Terminal$1, { size: 12 }),
4221
+ /* @__PURE__ */ jsxs("span", { children: [
4222
+ commands,
4223
+ " commands"
4224
+ ] })
4225
+ ] })
4226
+ ]
4227
+ }
4228
+ )
4229
+ ]
4230
+ }
4231
+ );
4232
+ };
3700
4233
  const PackageCompositionPanelContent = ({
3701
4234
  packages,
3702
4235
  isLoading = false,
@@ -3706,7 +4239,8 @@ const PackageCompositionPanelContent = ({
3706
4239
  onPackageClick,
3707
4240
  onPackageHover,
3708
4241
  onPackageSelect,
3709
- events
4242
+ events,
4243
+ readFile
3710
4244
  }) => {
3711
4245
  const { theme: theme2 } = useTheme();
3712
4246
  const [selectedPackageId, setSelectedPackageId] = useState(
@@ -3755,7 +4289,7 @@ const PackageCompositionPanelContent = ({
3755
4289
  }
3756
4290
  if (packages.length === 1) {
3757
4291
  return /* @__PURE__ */ jsx(
3758
- PackageCard,
4292
+ PackageDetailCard,
3759
4293
  {
3760
4294
  pkg: packages[0],
3761
4295
  isExpanded: true,
@@ -3764,7 +4298,8 @@ const PackageCompositionPanelContent = ({
3764
4298
  onCommandClick,
3765
4299
  onConfigClick,
3766
4300
  onPackageClick,
3767
- standalone: true
4301
+ standalone: true,
4302
+ readFile
3768
4303
  }
3769
4304
  );
3770
4305
  }
@@ -3957,7 +4492,7 @@ const PackageCompositionPanelContent = ({
3957
4492
  }
3958
4493
  ),
3959
4494
  /* @__PURE__ */ jsx("div", { style: { flex: 1, overflow: "hidden" }, children: selectedPackage && /* @__PURE__ */ jsx(
3960
- PackageCard,
4495
+ PackageDetailCard,
3961
4496
  {
3962
4497
  pkg: selectedPackage,
3963
4498
  isExpanded: true,
@@ -3966,7 +4501,8 @@ const PackageCompositionPanelContent = ({
3966
4501
  onCommandClick,
3967
4502
  onConfigClick,
3968
4503
  onPackageClick,
3969
- standalone: true
4504
+ standalone: true,
4505
+ readFile
3970
4506
  }
3971
4507
  ) })
3972
4508
  ]
@@ -4046,7 +4582,7 @@ const PackageCompositionPanelPreview = () => {
4046
4582
  }
4047
4583
  );
4048
4584
  };
4049
- const PackageCompositionPanel = ({ context: context2, events }) => {
4585
+ const PackageCompositionPanel = ({ context: context2, actions, events }) => {
4050
4586
  var _a;
4051
4587
  const packagesSlice = context2.packages;
4052
4588
  const packages = ((_a = packagesSlice == null ? void 0 : packagesSlice.data) == null ? void 0 : _a.packages) ?? [];
@@ -4080,7 +4616,8 @@ const PackageCompositionPanel = ({ context: context2, events }) => {
4080
4616
  isLoading,
4081
4617
  onPackageHover: handlePackageHover,
4082
4618
  onPackageSelect: handlePackageSelect,
4083
- events
4619
+ events,
4620
+ readFile: actions.readFile
4084
4621
  }
4085
4622
  );
4086
4623
  };
@@ -105383,7 +105920,7 @@ const browserExt = {
105383
105920
  },
105384
105921
  test: () => true,
105385
105922
  load: async () => {
105386
- await import("./browserAll-BDQdYbg7.js");
105923
+ await import("./browserAll-DwRNjFsz.js");
105387
105924
  }
105388
105925
  };
105389
105926
  const webworkerExt = {
@@ -105394,7 +105931,7 @@ const webworkerExt = {
105394
105931
  },
105395
105932
  test: () => typeof self !== "undefined" && self.WorkerGlobalScope !== void 0,
105396
105933
  load: async () => {
105397
- await import("./webworkerAll-c9JuRq0R.js");
105934
+ await import("./webworkerAll-BXVEg9Ze.js");
105398
105935
  }
105399
105936
  };
105400
105937
  class ObservablePoint {
@@ -117637,19 +118174,19 @@ async function autoDetectRenderer(options) {
117637
118174
  for (let i2 = 0; i2 < preferredOrder.length; i2++) {
117638
118175
  const rendererType = preferredOrder[i2];
117639
118176
  if (rendererType === "webgpu" && await isWebGPUSupported()) {
117640
- const { WebGPURenderer } = await import("./WebGPURenderer-shOBFSVw.js");
118177
+ const { WebGPURenderer } = await import("./WebGPURenderer-BSTx-5Vd.js");
117641
118178
  RendererClass = WebGPURenderer;
117642
118179
  finalOptions = { ...options, ...options.webgpu };
117643
118180
  break;
117644
118181
  } else if (rendererType === "webgl" && isWebGLSupported(
117645
118182
  options.failIfMajorPerformanceCaveat ?? AbstractRenderer.defaultOptions.failIfMajorPerformanceCaveat
117646
118183
  )) {
117647
- const { WebGLRenderer } = await import("./WebGLRenderer-Di8FBHm2.js");
118184
+ const { WebGLRenderer } = await import("./WebGLRenderer-Dj-oDZnm.js");
117648
118185
  RendererClass = WebGLRenderer;
117649
118186
  finalOptions = { ...options, ...options.webgl };
117650
118187
  break;
117651
118188
  } else if (rendererType === "canvas") {
117652
- const { CanvasRenderer } = await import("./CanvasRenderer-uLmsLKVm.js");
118189
+ const { CanvasRenderer } = await import("./CanvasRenderer-C7nUvMXE.js");
117653
118190
  RendererClass = CanvasRenderer;
117654
118191
  finalOptions = { ...options, ...options.canvasOptions };
117655
118192
  break;
@@ -134891,9 +135428,6 @@ This indicates a sprite was rendered without valid backing data.`
134891
135428
  }
134892
135429
  if (isFirstPlacement) {
134893
135430
  try {
134894
- if (isNewRepo) {
134895
- await addRepositoryToCollection(collection.id, projectId, metadata);
134896
- }
134897
135431
  const regionBoundsX2 = regionCol * REGION_SIZE_TILES;
134898
135432
  const regionBoundsY2 = regionRow * REGION_SIZE_TILES;
134899
135433
  const relativeGridX2 = gridX - regionBoundsX2;
@@ -134902,16 +135436,24 @@ This indicates a sprite was rendered without valid backing data.`
134902
135436
  gridX: relativeGridX2,
134903
135437
  gridY: relativeGridY2
134904
135438
  };
134905
- await regionCallbacks.onRepositoryPositionUpdated(
134906
- collection.id,
134907
- projectId,
134908
- layout2
134909
- );
134910
- await regionCallbacks.onRepositoryAssigned(
134911
- collection.id,
134912
- projectId,
134913
- newRegionId
134914
- );
135439
+ if (isNewRepo) {
135440
+ await addRepositoryToCollection(collection.id, projectId, {
135441
+ ...metadata,
135442
+ layout: layout2,
135443
+ regionId: newRegionId
135444
+ });
135445
+ } else {
135446
+ await regionCallbacks.onRepositoryPositionUpdated(
135447
+ collection.id,
135448
+ projectId,
135449
+ layout2
135450
+ );
135451
+ await regionCallbacks.onRepositoryAssigned(
135452
+ collection.id,
135453
+ projectId,
135454
+ newRegionId
135455
+ );
135456
+ }
134915
135457
  } catch (error) {
134916
135458
  console.error("[PLACEMENT] ✗ ERROR during placement:", error);
134917
135459
  throw error;
@@ -136572,4 +137114,4 @@ export {
136572
137114
  UPDATE_PRIORITY as y,
136573
137115
  removeItems as z
136574
137116
  };
136575
- //# sourceMappingURL=index-Dz9kyNPE.js.map
137117
+ //# sourceMappingURL=index-O-HJOiQ4.js.map