@industry-theme/agent-panels 0.2.15 → 0.2.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import { type SkillsListPanelProps } from './panels/SkillsListPanel';
2
+ import { type SkillDetailPanelProps } from './panels/SkillDetailPanel';
2
3
  import type { PanelDefinition } from './types';
3
- export type { SkillsListPanelProps };
4
+ import type { Skill } from './panels/skills/hooks/useSkillsData';
5
+ export type { SkillsListPanelProps, SkillDetailPanelProps, Skill };
4
6
  /**
5
7
  * Export array of panel definitions.
6
8
  * This is the required export for panel extensions.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAItF,OAAO,KAAK,EAAE,eAAe,EAAqB,MAAM,SAAS,CAAC;AAGlE,YAAY,EAAE,oBAAoB,EAAE,CAAC;AAErC;;;GAGG;AACH,eAAO,MAAM,MAAM,EAAE,eAAe,EA6GnC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa,qBAGzB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,qBAG3B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AACtF,OAAO,EAAoB,KAAK,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAGzF,OAAO,KAAK,EAAE,eAAe,EAAqB,MAAM,SAAS,CAAC;AAClE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qCAAqC,CAAC;AAGjE,YAAY,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,KAAK,EAAE,CAAC;AAEnE;;;GAGG;AACH,eAAO,MAAM,MAAM,EAAE,eAAe,EA6GnC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,aAAa,qBAGzB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,qBAG3B,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { PanelComponentProps } from '../types';
3
+ import type { Skill } from './skills/hooks/useSkillsData';
3
4
  import './SkillDetailPanel.css';
4
5
  export interface SkillDetailPanelProps extends PanelComponentProps {
5
6
  /**
@@ -8,6 +9,12 @@ export interface SkillDetailPanelProps extends PanelComponentProps {
8
9
  * This allows the host to control panel state via props instead of events.
9
10
  */
10
11
  selectedSkillId?: string | null;
12
+ /**
13
+ * Optional skill object to display.
14
+ * If provided, bypasses useSkillsData loading for instant display.
15
+ * This provides better performance when the skill data is already available.
16
+ */
17
+ skill?: Skill | null;
11
18
  }
12
19
  export declare const SkillDetailPanel: React.FC<SkillDetailPanelProps>;
13
20
  //# sourceMappingURL=SkillDetailPanel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SkillDetailPanel.d.ts","sourceRoot":"","sources":["../../src/panels/SkillDetailPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAC3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAOpD,OAAO,wBAAwB,CAAC;AAEhC,MAAM,WAAW,qBAAsB,SAAQ,mBAAmB;IAChE;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACjC;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAqL5D,CAAC"}
1
+ {"version":3,"file":"SkillDetailPanel.d.ts","sourceRoot":"","sources":["../../src/panels/SkillDetailPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAC3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEpD,OAAO,KAAK,E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,IAAI,CAAC;IAC/C,kDAAkD;IAClD,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,EAAE,KAAK,IAAI,CAAC;IACrD,+DAA+D;IAC/D,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,0FAA0F;IAC1F,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,yEAAyE;IACzE,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,uEAAuE;IACvE,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAoYD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA6FtD,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -5,6 +5,7 @@ import { Theme } from '@principal-ade/industry-theme';
5
5
  import { type PartialSkillMetadata } from '@principal-ade/markdown-utils';
6
6
  import React from 'react';
7
7
  import type { MarkdownHeader } from '../utils/extractHeaders';
8
+ import type { Skill } from '../hooks/useSkillsData';
8
9
  export interface SkillSidebarProps {
9
10
  /** Array of headers for table of contents */
10
11
  headers: MarkdownHeader[];
@@ -16,6 +17,8 @@ export interface SkillSidebarProps {
16
17
  className?: string;
17
18
  /** Optional callback when a header is clicked */
18
19
  onHeaderClick?: (header: MarkdownHeader) => void;
20
+ /** Optional full skill object for displaying installation locations */
21
+ skill?: Skill;
19
22
  }
20
23
  /**
21
24
  * SkillSidebar component
@@ -1 +1 @@
1
- {"version":3,"file":"SkillSidebar.d.ts","sourceRoot":"","sources":["../../../../src/panels/skills/components/SkillSidebar.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,KAAK,EAAE,MAAM,+BAA+B,CAAC;AACtD,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAK9D,MAAM,WAAW,iBAAiB;IAChC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Y,CAAC"}
@@ -47953,15 +47953,88 @@ const TableOfContents = ({
47953
47953
  }
47954
47954
  );
47955
47955
  };
47956
+ const getSourceConfig = (source2) => {
47957
+ switch (source2) {
47958
+ case "global-universal":
47959
+ return {
47960
+ label: "Global",
47961
+ icon: Globe,
47962
+ color: "#7c3aed",
47963
+ // purple
47964
+ bgColor: "#7c3aed15",
47965
+ borderColor: "#7c3aed30"
47966
+ };
47967
+ case "global-claude":
47968
+ return {
47969
+ label: "Global Claude",
47970
+ icon: Globe,
47971
+ color: "#0891b2",
47972
+ // cyan
47973
+ bgColor: "#0891b215",
47974
+ borderColor: "#0891b230"
47975
+ };
47976
+ case "project-universal":
47977
+ return {
47978
+ label: "Project",
47979
+ icon: Folder,
47980
+ color: "#16a34a",
47981
+ // green
47982
+ bgColor: "#16a34a15",
47983
+ borderColor: "#16a34a30"
47984
+ };
47985
+ case "project-claude":
47986
+ return {
47987
+ label: "Project Claude",
47988
+ icon: Folder,
47989
+ color: "#0284c7",
47990
+ // blue
47991
+ bgColor: "#0284c715",
47992
+ borderColor: "#0284c730"
47993
+ };
47994
+ case "project-other":
47995
+ return {
47996
+ label: "Project",
47997
+ icon: Folder,
47998
+ color: "#64748b",
47999
+ // slate
48000
+ bgColor: "#64748b15",
48001
+ borderColor: "#64748b30"
48002
+ };
48003
+ }
48004
+ };
48005
+ const formatRelativeTime$1 = (dateString) => {
48006
+ try {
48007
+ const date = new Date(dateString);
48008
+ const now = /* @__PURE__ */ new Date();
48009
+ const diffMs = now.getTime() - date.getTime();
48010
+ const diffDays = Math.floor(diffMs / (1e3 * 60 * 60 * 24));
48011
+ if (diffDays === 0) return "Today";
48012
+ if (diffDays === 1) return "Yesterday";
48013
+ if (diffDays < 7) return `${diffDays} days ago`;
48014
+ if (diffDays < 30) {
48015
+ const weeks = Math.floor(diffDays / 7);
48016
+ return `${weeks} ${weeks === 1 ? "week" : "weeks"} ago`;
48017
+ }
48018
+ if (diffDays < 365) {
48019
+ const months = Math.floor(diffDays / 30);
48020
+ return `${months} ${months === 1 ? "month" : "months"} ago`;
48021
+ }
48022
+ const years = Math.floor(diffDays / 365);
48023
+ return `${years} ${years === 1 ? "year" : "years"} ago`;
48024
+ } catch {
48025
+ return dateString;
48026
+ }
48027
+ };
47956
48028
  const SkillSidebar = ({
47957
48029
  headers,
47958
48030
  metadata,
47959
48031
  theme: theme2,
47960
48032
  className = "",
47961
- onHeaderClick
48033
+ onHeaderClick,
48034
+ skill
47962
48035
  }) => {
47963
48036
  const [activeTab, setActiveTab] = React2__default.useState("toc");
47964
- const hasMetadata = metadata.compatibility || metadata["allowed-tools"] && metadata["allowed-tools"].length > 0 || metadata.metadata && Object.keys(metadata.metadata).length > 0;
48037
+ const hasMetadata = metadata.compatibility || metadata["allowed-tools"] && metadata["allowed-tools"].length > 0 || metadata.metadata && Object.keys(metadata.metadata).length > 0 || (skill == null ? void 0 : skill.installedLocations) && skill.installedLocations.length > 1;
47965
48038
  React2__default.useEffect(() => {
47966
48039
  if (headers.length === 0 && hasMetadata) {
47967
48040
  setActiveTab("metadata");
@@ -48119,7 +48192,7 @@ const SkillSidebar = ({
48119
48192
  index2
48120
48193
  )) })
48121
48194
  ] }),
48122
- metadata.metadata && Object.keys(metadata.metadata).length > 0 && /* @__PURE__ */ jsxs("div", { children: [
48195
+ metadata.metadata && Object.keys(metadata.metadata).length > 0 && /* @__PURE__ */ jsxs("div", { style: { marginBottom: theme2.space[3] }, children: [
48123
48196
  /* @__PURE__ */ jsx(
48124
48197
  "div",
48125
48198
  {
@@ -48163,6 +48236,112 @@ const SkillSidebar = ({
48163
48236
  }
48164
48237
  )
48165
48238
  ] }, key)) })
48239
+ ] }),
48240
+ (skill == null ? void 0 : skill.installedLocations) && skill.installedLocations.length > 1 && /* @__PURE__ */ jsxs("div", { children: [
48241
+ /* @__PURE__ */ jsxs(
48242
+ "div",
48243
+ {
48244
+ style: {
48245
+ fontFamily: theme2.fonts.heading,
48246
+ fontWeight: 600,
48247
+ fontSize: theme2.fontSizes[0],
48248
+ textTransform: "uppercase",
48249
+ letterSpacing: "0.5px",
48250
+ color: theme2.colors.textSecondary,
48251
+ marginBottom: theme2.space[2]
48252
+ },
48253
+ children: [
48254
+ "Installed Locations (",
48255
+ skill.installedLocations.length,
48256
+ ")"
48257
+ ]
48258
+ }
48259
+ ),
48260
+ /* @__PURE__ */ jsx("div", { style: {
48261
+ display: "flex",
48262
+ flexDirection: "column",
48263
+ gap: theme2.space[2]
48264
+ }, children: skill.installedLocations.map((location2, idx) => {
48265
+ var _a, _b, _c;
48266
+ const isPrimary = location2.path === skill.path;
48267
+ const sourceConfig = getSourceConfig(location2.source);
48268
+ return /* @__PURE__ */ jsxs(
48269
+ "div",
48270
+ {
48271
+ style: {
48272
+ padding: theme2.space[2],
48273
+ backgroundColor: isPrimary ? `${theme2.colors.primary}08` : theme2.colors.backgroundSecondary,
48274
+ borderRadius: "6px",
48275
+ border: `1px solid ${isPrimary ? theme2.colors.primary + "40" : theme2.colors.border}`,
48276
+ display: "flex",
48277
+ flexDirection: "column",
48278
+ gap: theme2.space[1]
48279
+ },
48280
+ children: [
48281
+ /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: theme2.space[2], flexWrap: "wrap" }, children: [
48282
+ /* @__PURE__ */ jsxs(
48283
+ "div",
48284
+ {
48285
+ style: {
48286
+ display: "inline-flex",
48287
+ alignItems: "center",
48288
+ gap: "4px",
48289
+ padding: "2px 6px",
48290
+ borderRadius: theme2.radii[1],
48291
+ backgroundColor: sourceConfig.bgColor,
48292
+ border: `1px solid ${sourceConfig.borderColor}`,
48293
+ fontSize: theme2.fontSizes[0],
48294
+ color: sourceConfig.color,
48295
+ fontWeight: 500
48296
+ },
48297
+ children: [
48298
+ /* @__PURE__ */ jsx(sourceConfig.icon, { size: 10 }),
48299
+ /* @__PURE__ */ jsx("span", { children: sourceConfig.label })
48300
+ ]
48301
+ }
48302
+ ),
48303
+ isPrimary && /* @__PURE__ */ jsx("span", { style: {
48304
+ fontSize: theme2.fontSizes[0],
48305
+ color: theme2.colors.primary,
48306
+ fontWeight: 600,
48307
+ fontFamily: theme2.fonts.body
48308
+ }, children: "(Active)" })
48309
+ ] }),
48310
+ /* @__PURE__ */ jsx("div", { style: {
48311
+ fontSize: theme2.fontSizes[0],
48312
+ color: theme2.colors.textSecondary,
48313
+ fontFamily: theme2.fonts.monospace,
48314
+ wordBreak: "break-all"
48315
+ }, children: location2.path }),
48316
+ ((_a = location2.metadata) == null ? void 0 : _a.installedAt) && /* @__PURE__ */ jsxs("div", { style: {
48317
+ fontSize: theme2.fontSizes[0],
48318
+ color: theme2.colors.textMuted,
48319
+ fontFamily: theme2.fonts.body
48320
+ }, children: [
48321
+ "Installed: ",
48322
+ formatRelativeTime$1(location2.metadata.installedAt)
48323
+ ] }),
48324
+ ((_b = location2.metadata) == null ? void 0 : _b.sha) && ((_c = skill.metadata) == null ? void 0 : _c.sha) && location2.metadata.sha !== skill.metadata.sha && /* @__PURE__ */ jsxs("div", { style: {
48325
+ fontSize: theme2.fontSizes[0],
48326
+ color: "#f59e0b",
48327
+ // warning color
48328
+ fontFamily: theme2.fonts.monospace,
48329
+ display: "flex",
48330
+ alignItems: "center",
48331
+ gap: "4px"
48332
+ }, children: [
48333
+ /* @__PURE__ */ jsx(TriangleAlert, { size: 10 }),
48334
+ /* @__PURE__ */ jsxs("span", { children: [
48335
+ "Different version (SHA: ",
48336
+ location2.metadata.sha.substring(0, 7),
48337
+ ")"
48338
+ ] })
48339
+ ] })
48340
+ ]
48341
+ },
48342
+ idx
48343
+ );
48344
+ }) })
48166
48345
  ] })
48167
48346
  ] })
48168
48347
  ] })
@@ -48193,55 +48372,6 @@ const formatRelativeTime = (dateString) => {
48193
48372
  return dateString;
48194
48373
  }
48195
48374
  };
48196
- const getSourceConfig = (source2) => {
48197
- switch (source2) {
48198
- case "global-universal":
48199
- return {
48200
- label: "Global",
48201
- icon: Globe,
48202
- color: "#7c3aed",
48203
- // purple
48204
- bgColor: "#7c3aed15",
48205
- borderColor: "#7c3aed30"
48206
- };
48207
- case "global-claude":
48208
- return {
48209
- label: "Global Claude",
48210
- icon: Globe,
48211
- color: "#0891b2",
48212
- // cyan
48213
- bgColor: "#0891b215",
48214
- borderColor: "#0891b230"
48215
- };
48216
- case "project-universal":
48217
- return {
48218
- label: "Project",
48219
- icon: Folder,
48220
- color: "#16a34a",
48221
- // green
48222
- bgColor: "#16a34a15",
48223
- borderColor: "#16a34a30"
48224
- };
48225
- case "project-claude":
48226
- return {
48227
- label: "Project Claude",
48228
- icon: Folder,
48229
- color: "#0284c7",
48230
- // blue
48231
- bgColor: "#0284c715",
48232
- borderColor: "#0284c730"
48233
- };
48234
- case "project-other":
48235
- return {
48236
- label: "Project",
48237
- icon: Folder,
48238
- color: "#64748b",
48239
- // slate
48240
- bgColor: "#64748b15",
48241
- borderColor: "#64748b30"
48242
- };
48243
- }
48244
- };
48245
48375
  const SkillMetadataSection = ({
48246
48376
  metadata,
48247
48377
  theme: theme2,
@@ -48523,110 +48653,6 @@ const SkillMetadataSection = ({
48523
48653
  file
48524
48654
  ] }, idx)) })
48525
48655
  ] })
48526
- ] }),
48527
- (skill == null ? void 0 : skill.installedLocations) && skill.installedLocations.length > 1 && /* @__PURE__ */ jsxs("div", { style: {
48528
- marginTop: theme2.space[3],
48529
- paddingTop: theme2.space[3],
48530
- borderTop: `1px solid ${theme2.colors.border}`
48531
- }, children: [
48532
- /* @__PURE__ */ jsxs("div", { style: {
48533
- fontSize: theme2.fontSizes[1],
48534
- fontWeight: 600,
48535
- color: theme2.colors.text,
48536
- marginBottom: theme2.space[2],
48537
- fontFamily: theme2.fonts.heading
48538
- }, children: [
48539
- "Installed Locations (",
48540
- skill.installedLocations.length,
48541
- ")"
48542
- ] }),
48543
- /* @__PURE__ */ jsx("div", { style: {
48544
- display: "flex",
48545
- flexDirection: "column",
48546
- gap: theme2.space[2]
48547
- }, children: skill.installedLocations.map((location2, idx) => {
48548
- var _a2, _b2, _c2;
48549
- const isPrimary = location2.path === skill.path;
48550
- const sourceConfig = getSourceConfig(location2.source);
48551
- return /* @__PURE__ */ jsxs(
48552
- "div",
48553
- {
48554
- style: {
48555
- padding: theme2.space[2],
48556
- backgroundColor: isPrimary ? `${theme2.colors.primary}08` : theme2.colors.backgroundSecondary,
48557
- borderRadius: "6px",
48558
- border: `1px solid ${isPrimary ? theme2.colors.primary + "40" : theme2.colors.border}`,
48559
- display: "flex",
48560
- flexDirection: "column",
48561
- gap: theme2.space[1]
48562
- },
48563
- children: [
48564
- /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: theme2.space[2] }, children: [
48565
- /* @__PURE__ */ jsxs(
48566
- "div",
48567
- {
48568
- style: {
48569
- display: "inline-flex",
48570
- alignItems: "center",
48571
- gap: "4px",
48572
- padding: "2px 6px",
48573
- borderRadius: theme2.radii[1],
48574
- backgroundColor: sourceConfig.bgColor,
48575
- border: `1px solid ${sourceConfig.borderColor}`,
48576
- fontSize: theme2.fontSizes[0],
48577
- color: sourceConfig.color,
48578
- fontWeight: 500
48579
- },
48580
- children: [
48581
- /* @__PURE__ */ jsx(sourceConfig.icon, { size: 10 }),
48582
- /* @__PURE__ */ jsx("span", { children: sourceConfig.label })
48583
- ]
48584
- }
48585
- ),
48586
- isPrimary && /* @__PURE__ */ jsx("span", { style: {
48587
- fontSize: theme2.fontSizes[0],
48588
- color: theme2.colors.primary,
48589
- fontWeight: 600,
48590
- fontFamily: theme2.fonts.body
48591
- }, children: "(Active)" })
48592
- ] }),
48593
- /* @__PURE__ */ jsx("div", { style: {
48594
- fontSize: theme2.fontSizes[0],
48595
- color: theme2.colors.textSecondary,
48596
- fontFamily: theme2.fonts.monospace,
48597
- overflow: "hidden",
48598
- textOverflow: "ellipsis",
48599
- whiteSpace: "nowrap"
48600
- }, children: location2.path }),
48601
- ((_a2 = location2.metadata) == null ? void 0 : _a2.installedAt) && /* @__PURE__ */ jsxs("div", { style: {
48602
- fontSize: theme2.fontSizes[0],
48603
- color: theme2.colors.textMuted,
48604
- fontFamily: theme2.fonts.body
48605
- }, children: [
48606
- "Installed: ",
48607
- formatRelativeTime(location2.metadata.installedAt)
48608
- ] }),
48609
- ((_b2 = location2.metadata) == null ? void 0 : _b2.sha) && ((_c2 = skill.metadata) == null ? void 0 : _c2.sha) && location2.metadata.sha !== skill.metadata.sha && /* @__PURE__ */ jsxs("div", { style: {
48610
- fontSize: theme2.fontSizes[0],
48611
- color: "#f59e0b",
48612
- // warning color
48613
- fontFamily: theme2.fonts.monospace,
48614
- display: "flex",
48615
- alignItems: "center",
48616
- gap: "4px"
48617
- }, children: [
48618
- /* @__PURE__ */ jsx(TriangleAlert, { size: 10 }),
48619
- /* @__PURE__ */ jsxs("span", { children: [
48620
- "Different version (SHA: ",
48621
- location2.metadata.sha.substring(0, 7),
48622
- ")"
48623
- ] })
48624
- ] })
48625
- ]
48626
- },
48627
- idx
48628
- );
48629
- }) })
48630
48656
  ] })
48631
48657
  ] });
48632
48658
  };
@@ -48695,7 +48721,8 @@ const SkillMarkdown = ({
48695
48721
  {
48696
48722
  headers,
48697
48723
  metadata: parsed.metadata,
48698
- theme: theme2
48724
+ theme: theme2,
48725
+ skill
48699
48726
  }
48700
48727
  ),
48701
48728
  /* @__PURE__ */ jsx("div", { style: { flex: 1, overflow: "auto", padding: theme2.space[3], paddingTop: 0 }, children: /* @__PURE__ */ jsx(
@@ -48718,14 +48745,16 @@ const SkillDetailPanel = ({
48718
48745
  context,
48719
48746
  events,
48720
48747
  actions,
48721
- selectedSkillId: selectedSkillIdProp
48748
+ selectedSkillId: selectedSkillIdProp,
48749
+ skill: skillProp
48722
48750
  }) => {
48723
48751
  const { theme: theme2 } = useTheme();
48724
48752
  const { skills, isLoading, error } = useSkillsData({ context });
48725
48753
  const [selectedSkillIdState, setSelectedSkillIdState] = useState(null);
48726
- const [skill, setSkill] = useState(null);
48754
+ const [skillState, setSkillState] = useState(null);
48727
48755
  const panelRef = useRef(null);
48728
48756
  const selectedSkillId = selectedSkillIdProp !== void 0 ? selectedSkillIdProp : selectedSkillIdState;
48757
+ const skill = skillProp !== void 0 ? skillProp : skillState;
48729
48758
  gt(
48730
48759
  "skill-detail",
48731
48760
  events,
@@ -48748,13 +48777,16 @@ const SkillDetailPanel = ({
48748
48777
  return unsubscribe;
48749
48778
  }, [events, selectedSkillIdProp]);
48750
48779
  useEffect(() => {
48780
+ if (skillProp !== void 0) {
48781
+ return;
48782
+ }
48751
48783
  if (selectedSkillId && skills.length > 0) {
48752
48784
  const foundSkill = skills.find((s2) => s2.id === selectedSkillId);
48753
- setSkill(foundSkill || null);
48785
+ setSkillState(foundSkill || null);
48754
48786
  } else if (!selectedSkillId) {
48755
- setSkill(null);
48787
+ setSkillState(null);
48756
48788
  }
48757
- }, [selectedSkillId, skills]);
48789
+ }, [selectedSkillId, skills, skillProp]);
48758
48790
  if (error) {
48759
48791
  return /* @__PURE__ */ jsx(
48760
48792
  "div",