@industry-theme/repository-composition-panels 0.2.60 → 0.2.62

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 (33) hide show
  1. package/dist/{BufferResource-CkqEod2p.js → BufferResource-D-qYLgbY.js} +2 -2
  2. package/dist/{BufferResource-CkqEod2p.js.map → BufferResource-D-qYLgbY.js.map} +1 -1
  3. package/dist/{CanvasRenderer-Dr_Cv8Dc.js → CanvasRenderer-CYJLQIYQ.js} +3 -3
  4. package/dist/{CanvasRenderer-Dr_Cv8Dc.js.map → CanvasRenderer-CYJLQIYQ.js.map} +1 -1
  5. package/dist/{Filter-Be7Gagsd.js → Filter-BAwXUca-.js} +2 -2
  6. package/dist/{Filter-Be7Gagsd.js.map → Filter-BAwXUca-.js.map} +1 -1
  7. package/dist/{RenderTargetSystem-C9oPzIqc.js → RenderTargetSystem-BrLrRZqC.js} +3 -3
  8. package/dist/{RenderTargetSystem-C9oPzIqc.js.map → RenderTargetSystem-BrLrRZqC.js.map} +1 -1
  9. package/dist/{WebGLRenderer-D2it_58F.js → WebGLRenderer-DTTtXSAz.js} +4 -4
  10. package/dist/{WebGLRenderer-D2it_58F.js.map → WebGLRenderer-DTTtXSAz.js.map} +1 -1
  11. package/dist/{WebGPURenderer-DxUZO3nG.js → WebGPURenderer-Dw5euE6h.js} +4 -4
  12. package/dist/{WebGPURenderer-DxUZO3nG.js.map → WebGPURenderer-Dw5euE6h.js.map} +1 -1
  13. package/dist/{browserAll-CpFra-kV.js → browserAll-NVcZTmV1.js} +3 -3
  14. package/dist/{browserAll-CpFra-kV.js.map → browserAll-NVcZTmV1.js.map} +1 -1
  15. package/dist/{index-C6MgM63s.js → index-DP0q9yO1.js} +242 -61
  16. package/dist/{index-C6MgM63s.js.map → index-DP0q9yO1.js.map} +1 -1
  17. package/dist/index.d.ts +1 -1
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/{init-te6qDnVZ.js → init-BsBxpyBv.js} +3 -3
  20. package/dist/{init-te6qDnVZ.js.map → init-BsBxpyBv.js.map} +1 -1
  21. package/dist/panels/CollectionMapPanel.d.ts +16 -11
  22. package/dist/panels/CollectionMapPanel.d.ts.map +1 -1
  23. package/dist/panels/overworld-map/OverworldMapPanel.d.ts.map +1 -1
  24. package/dist/panels/overworld-map/spriteGenerator.d.ts +11 -1
  25. package/dist/panels/overworld-map/spriteGenerator.d.ts.map +1 -1
  26. package/dist/panels/overworld-map/types.d.ts +1 -0
  27. package/dist/panels/overworld-map/types.d.ts.map +1 -1
  28. package/dist/panels.bundle.js +1 -1
  29. package/dist/webworkerAll-DYw1TGzb.js +3 -0
  30. package/dist/webworkerAll-DYw1TGzb.js.map +1 -0
  31. package/package.json +3 -1
  32. package/dist/webworkerAll-D_TIOa40.js +0 -3
  33. package/dist/webworkerAll-D_TIOa40.js.map +0 -1
@@ -1,3 +1,6 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
1
4
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
5
  import * as React2 from "react";
3
6
  import React2__default, { createContext, useContext, forwardRef, createElement, useCallback, useState, useRef, useEffect, useMemo, memo, useLayoutEffect, useImperativeHandle } from "react";
@@ -103876,6 +103879,105 @@ const DependencyGraphPanel = ({ context: context2 }) => {
103876
103879
  }
103877
103880
  );
103878
103881
  };
103882
+ createContext(null);
103883
+ class PanelErrorBoundary extends React2__default.Component {
103884
+ constructor(props) {
103885
+ super(props);
103886
+ __publicField(this, "reset", () => {
103887
+ this.setState({ error: null });
103888
+ });
103889
+ this.state = { error: null };
103890
+ }
103891
+ static getDerivedStateFromError(error) {
103892
+ return { error };
103893
+ }
103894
+ componentDidCatch(error, errorInfo) {
103895
+ console.error("Panel error:", error, errorInfo);
103896
+ }
103897
+ render() {
103898
+ if (this.state.error) {
103899
+ const Fallback = this.props.fallback;
103900
+ return /* @__PURE__ */ jsx(Fallback, {
103901
+ error: this.state.error,
103902
+ reset: this.reset
103903
+ });
103904
+ }
103905
+ return this.props.children;
103906
+ }
103907
+ }
103908
+ var PANEL_DATA_MIME_TYPE = "application/x-panel-data";
103909
+ function parsePanelData(e2) {
103910
+ const dataStr = e2.dataTransfer.getData(PANEL_DATA_MIME_TYPE);
103911
+ if (!dataStr)
103912
+ return null;
103913
+ try {
103914
+ const data = JSON.parse(dataStr);
103915
+ return validatePanelData(data) ? data : null;
103916
+ } catch (err) {
103917
+ console.warn("Failed to parse panel data:", err);
103918
+ return null;
103919
+ }
103920
+ }
103921
+ function validatePanelData(data) {
103922
+ return typeof data === "object" && data !== null && "sourcePanel" in data && typeof data.sourcePanel === "string" && "dataType" in data && typeof data.dataType === "string" && "primaryData" in data && typeof data.primaryData === "string";
103923
+ }
103924
+ function useDropZone(config) {
103925
+ const [isDragOver, setIsDragOver] = useState(false);
103926
+ const handleDragOver = useCallback((e2) => {
103927
+ var _a;
103928
+ e2.preventDefault();
103929
+ e2.stopPropagation();
103930
+ e2.dataTransfer.dropEffect = "copy";
103931
+ (_a = config.onDragOver) == null ? void 0 : _a.call(config, e2);
103932
+ }, [config]);
103933
+ const handleDragEnter = useCallback((e2) => {
103934
+ e2.preventDefault();
103935
+ e2.stopPropagation();
103936
+ if (config.showVisualFeedback) {
103937
+ setIsDragOver(true);
103938
+ }
103939
+ }, [config]);
103940
+ const handleDragLeave = useCallback((e2) => {
103941
+ e2.preventDefault();
103942
+ e2.stopPropagation();
103943
+ const relatedTarget = e2.relatedTarget;
103944
+ const currentTarget = e2.currentTarget;
103945
+ if (!relatedTarget || !currentTarget.contains(relatedTarget)) {
103946
+ setIsDragOver(false);
103947
+ }
103948
+ }, []);
103949
+ const handleDrop = useCallback((e2) => {
103950
+ e2.preventDefault();
103951
+ e2.stopPropagation();
103952
+ setIsDragOver(false);
103953
+ const panelData = parsePanelData(e2);
103954
+ if (panelData) {
103955
+ if (config.validateDrop && !config.validateDrop(panelData)) {
103956
+ console.warn("Drop validation failed", panelData);
103957
+ return;
103958
+ }
103959
+ for (const handler of config.handlers) {
103960
+ const types2 = Array.isArray(handler.dataType) ? handler.dataType : [handler.dataType];
103961
+ if (types2.includes(panelData.dataType)) {
103962
+ handler.onDrop(panelData, e2);
103963
+ return;
103964
+ }
103965
+ }
103966
+ console.warn("No handler for data type:", panelData.dataType);
103967
+ }
103968
+ const plainText = e2.dataTransfer.getData("text/plain");
103969
+ if (plainText && plainText.trim() && config.onPlainTextDrop) {
103970
+ config.onPlainTextDrop(plainText, e2);
103971
+ }
103972
+ }, [config]);
103973
+ return {
103974
+ onDragOver: handleDragOver,
103975
+ onDragEnter: handleDragEnter,
103976
+ onDragLeave: handleDragLeave,
103977
+ onDrop: handleDrop,
103978
+ isDragOver
103979
+ };
103980
+ }
103879
103981
  var ExtensionType = /* @__PURE__ */ ((ExtensionType2) => {
103880
103982
  ExtensionType2["Application"] = "application";
103881
103983
  ExtensionType2["WebGLPipes"] = "webgl-pipes";
@@ -104149,7 +104251,7 @@ const browserExt = {
104149
104251
  },
104150
104252
  test: () => true,
104151
104253
  load: async () => {
104152
- await import("./browserAll-CpFra-kV.js");
104254
+ await import("./browserAll-NVcZTmV1.js");
104153
104255
  }
104154
104256
  };
104155
104257
  const webworkerExt = {
@@ -104160,7 +104262,7 @@ const webworkerExt = {
104160
104262
  },
104161
104263
  test: () => typeof self !== "undefined" && self.WorkerGlobalScope !== void 0,
104162
104264
  load: async () => {
104163
- await import("./webworkerAll-D_TIOa40.js");
104265
+ await import("./webworkerAll-DYw1TGzb.js");
104164
104266
  }
104165
104267
  };
104166
104268
  class ObservablePoint {
@@ -116403,19 +116505,19 @@ async function autoDetectRenderer(options) {
116403
116505
  for (let i2 = 0; i2 < preferredOrder.length; i2++) {
116404
116506
  const rendererType = preferredOrder[i2];
116405
116507
  if (rendererType === "webgpu" && await isWebGPUSupported()) {
116406
- const { WebGPURenderer } = await import("./WebGPURenderer-DxUZO3nG.js");
116508
+ const { WebGPURenderer } = await import("./WebGPURenderer-Dw5euE6h.js");
116407
116509
  RendererClass = WebGPURenderer;
116408
116510
  finalOptions = { ...options, ...options.webgpu };
116409
116511
  break;
116410
116512
  } else if (rendererType === "webgl" && isWebGLSupported(
116411
116513
  options.failIfMajorPerformanceCaveat ?? AbstractRenderer.defaultOptions.failIfMajorPerformanceCaveat
116412
116514
  )) {
116413
- const { WebGLRenderer } = await import("./WebGLRenderer-D2it_58F.js");
116515
+ const { WebGLRenderer } = await import("./WebGLRenderer-DTTtXSAz.js");
116414
116516
  RendererClass = WebGLRenderer;
116415
116517
  finalOptions = { ...options, ...options.webgl };
116416
116518
  break;
116417
116519
  } else if (rendererType === "canvas") {
116418
- const { CanvasRenderer } = await import("./CanvasRenderer-Dr_Cv8Dc.js");
116520
+ const { CanvasRenderer } = await import("./CanvasRenderer-CYJLQIYQ.js");
116419
116521
  RendererClass = CanvasRenderer;
116420
116522
  finalOptions = { ...options, ...options.canvasOptions };
116421
116523
  break;
@@ -118592,7 +118694,7 @@ var BufferUsage = /* @__PURE__ */ ((BufferUsage2) => {
118592
118694
  BufferUsage2[BufferUsage2["STATIC"] = 1024] = "STATIC";
118593
118695
  return BufferUsage2;
118594
118696
  })(BufferUsage || {});
118595
- class Buffer extends EventEmitter {
118697
+ class Buffer2 extends EventEmitter {
118596
118698
  /**
118597
118699
  * Creates a new Buffer with the given options
118598
118700
  * @param options - the options for the buffer
@@ -118711,7 +118813,7 @@ class Buffer extends EventEmitter {
118711
118813
  }
118712
118814
  }
118713
118815
  function ensureIsBuffer(buffer, index2) {
118714
- if (!(buffer instanceof Buffer)) {
118816
+ if (!(buffer instanceof Buffer2)) {
118715
118817
  let usage = index2 ? BufferUsage.INDEX : BufferUsage.VERTEX;
118716
118818
  if (buffer instanceof Array) {
118717
118819
  if (index2) {
@@ -118722,7 +118824,7 @@ function ensureIsBuffer(buffer, index2) {
118722
118824
  usage = BufferUsage.VERTEX | BufferUsage.COPY_DST;
118723
118825
  }
118724
118826
  }
118725
- buffer = new Buffer({
118827
+ buffer = new Buffer2({
118726
118828
  data: buffer,
118727
118829
  label: index2 ? "index-mesh-buffer" : "vertex-mesh-buffer",
118728
118830
  usage
@@ -118762,7 +118864,7 @@ function getGeometryBounds(geometry, attributeId, bounds) {
118762
118864
  return bounds;
118763
118865
  }
118764
118866
  function ensureIsAttribute(attribute) {
118765
- if (attribute instanceof Buffer || Array.isArray(attribute) || attribute.BYTES_PER_ELEMENT) {
118867
+ if (attribute instanceof Buffer2 || Array.isArray(attribute) || attribute.BYTES_PER_ELEMENT) {
118766
118868
  attribute = {
118767
118869
  buffer: attribute
118768
118870
  };
@@ -118900,13 +119002,13 @@ const placeHolderIndexData = new Uint32Array(1);
118900
119002
  class BatchGeometry extends Geometry {
118901
119003
  constructor() {
118902
119004
  const vertexSize = 6;
118903
- const attributeBuffer = new Buffer({
119005
+ const attributeBuffer = new Buffer2({
118904
119006
  data: placeHolderBufferData,
118905
119007
  label: "attribute-batch-buffer",
118906
119008
  usage: BufferUsage.VERTEX | BufferUsage.COPY_DST,
118907
119009
  shrinkToFit: false
118908
119010
  });
118909
- const indexBuffer = new Buffer({
119011
+ const indexBuffer = new Buffer2({
118910
119012
  data: placeHolderIndexData,
118911
119013
  label: "index-batch-buffer",
118912
119014
  usage: BufferUsage.INDEX | BufferUsage.COPY_DST,
@@ -124954,19 +125056,19 @@ const _MeshGeometry = class _MeshGeometry2 extends Geometry {
124954
125056
  }
124955
125057
  const indices = options.indices || new Uint32Array([0, 1, 2, 0, 2, 3]);
124956
125058
  const shrinkToFit = options.shrinkBuffersToFit;
124957
- const positionBuffer = new Buffer({
125059
+ const positionBuffer = new Buffer2({
124958
125060
  data: positions,
124959
125061
  label: "attribute-mesh-positions",
124960
125062
  shrinkToFit,
124961
125063
  usage: BufferUsage.VERTEX | BufferUsage.COPY_DST
124962
125064
  });
124963
- const uvBuffer = new Buffer({
125065
+ const uvBuffer = new Buffer2({
124964
125066
  data: uvs,
124965
125067
  label: "attribute-mesh-uvs",
124966
125068
  shrinkToFit,
124967
125069
  usage: BufferUsage.VERTEX | BufferUsage.COPY_DST
124968
125070
  });
124969
- const indexBuffer = new Buffer({
125071
+ const indexBuffer = new Buffer2({
124970
125072
  data: indices,
124971
125073
  label: "index-mesh-buffer",
124972
125074
  shrinkToFit,
@@ -130876,7 +130978,23 @@ function generateDecorativeSprite(type2) {
130876
130978
  }
130877
130979
  return canvas;
130878
130980
  }
130879
- function generateSpriteAtlas() {
130981
+ async function loadCustomSprite(imagePath) {
130982
+ return new Promise((resolve) => {
130983
+ const img = new Image();
130984
+ img.onload = () => {
130985
+ const canvas = createCanvas(img.width, img.height);
130986
+ const ctx = canvas.getContext("2d");
130987
+ ctx.drawImage(img, 0, 0);
130988
+ resolve(canvas);
130989
+ };
130990
+ img.onerror = () => {
130991
+ console.warn(`Failed to load custom sprite: ${imagePath}`);
130992
+ resolve(null);
130993
+ };
130994
+ img.src = imagePath;
130995
+ });
130996
+ }
130997
+ async function generateSpriteAtlas(customSprites) {
130880
130998
  const atlas = {};
130881
130999
  atlas["bg-grass"] = generateGrassBackgroundTile();
130882
131000
  for (const biome of Object.keys(BIOME_COLORS)) {
@@ -130888,8 +131006,16 @@ function generateSpriteAtlas() {
130888
131006
  const themes = ["grass", "desert", "water", "volcano", "ice"];
130889
131007
  for (const type2 of locationTypes) {
130890
131008
  for (const theme2 of themes) {
131009
+ const spriteKey = `location-${type2}-${theme2}`;
131010
+ if (customSprites == null ? void 0 : customSprites[spriteKey]) {
131011
+ const customCanvas = await loadCustomSprite(customSprites[spriteKey]);
131012
+ if (customCanvas) {
131013
+ atlas[spriteKey] = customCanvas;
131014
+ continue;
131015
+ }
131016
+ }
130891
131017
  const size = type2 === "castle" ? 3 : type2 === "monorepo" ? 3 : 2;
130892
- atlas[`location-${type2}-${theme2}`] = generateLocationSprite(type2, theme2, size);
131018
+ atlas[spriteKey] = generateLocationSprite(type2, theme2, size);
130893
131019
  }
130894
131020
  }
130895
131021
  atlas["deco-cloud"] = generateDecorativeSprite("cloud");
@@ -130950,7 +131076,13 @@ const OverworldMapPanelContent = ({
130950
131076
  }
130951
131077
  (_c = canvasRef.current) == null ? void 0 : _c.appendChild(app.canvas);
130952
131078
  appRef.current = app;
130953
- const atlas = generateSpriteAtlas();
131079
+ const customSprites = {};
131080
+ for (const location2 of mapData.nodes) {
131081
+ if (location2.customSpritePath) {
131082
+ customSprites[location2.sprite] = location2.customSpritePath;
131083
+ }
131084
+ }
131085
+ const atlas = await generateSpriteAtlas(customSprites);
130954
131086
  const textures = {};
130955
131087
  for (const [key, canvas] of Object.entries(atlas)) {
130956
131088
  textures[key] = Texture.from(canvas);
@@ -131630,14 +131762,39 @@ const CollectionMapPanelContent = ({
131630
131762
  width,
131631
131763
  height,
131632
131764
  isLoading = false,
131633
- onProjectMoved
131765
+ onProjectMoved,
131766
+ onProjectAdded
131634
131767
  }) => {
131768
+ const handleProjectDrop = useCallback((data, event) => {
131769
+ if (!onProjectAdded) {
131770
+ console.warn("No onProjectAdded callback provided - cannot add project to collection");
131771
+ return;
131772
+ }
131773
+ const repositoryPath = data.primaryData;
131774
+ const repositoryMetadata = data.metadata || {};
131775
+ console.log("Project dropped on collection map:", {
131776
+ path: repositoryPath,
131777
+ metadata: repositoryMetadata,
131778
+ collectionId: collection.id,
131779
+ sourcePanel: data.sourcePanel
131780
+ });
131781
+ onProjectAdded(repositoryPath, repositoryMetadata);
131782
+ }, [collection.id, onProjectAdded]);
131783
+ const { isDragOver, ...dropZoneProps } = useDropZone({
131784
+ handlers: [
131785
+ {
131786
+ dataType: "repository-project",
131787
+ onDrop: handleProjectDrop
131788
+ }
131789
+ ],
131790
+ showVisualFeedback: true
131791
+ });
131635
131792
  const projects = useMemo(() => {
131636
131793
  const collectionMemberships = memberships.filter(
131637
131794
  (m2) => m2.collectionId === collection.id
131638
131795
  );
131639
131796
  return collectionMemberships.map((membership) => {
131640
- var _a, _b, _c;
131797
+ var _a, _b;
131641
131798
  const repo = repositories.find((r2) => {
131642
131799
  var _a2;
131643
131800
  const repoId = ((_a2 = r2.github) == null ? void 0 : _a2.id) || r2.name;
@@ -131647,12 +131804,12 @@ const CollectionMapPanelContent = ({
131647
131804
  return null;
131648
131805
  }
131649
131806
  let category;
131650
- if (((_a = repo.provider) == null ? void 0 : _a.type) === "github" || repo.github) {
131807
+ if (repo.github) {
131651
131808
  category = "git-repo";
131652
131809
  } else {
131653
131810
  category = repo.theme || "git-repo";
131654
131811
  }
131655
- const importance = ((_b = membership.metadata) == null ? void 0 : _b.pinned) ? 95 : 75;
131812
+ const importance = ((_a = membership.metadata) == null ? void 0 : _a.pinned) ? 95 : 75;
131656
131813
  const project = {
131657
131814
  id: membership.repositoryId,
131658
131815
  name: repo.name,
@@ -131661,48 +131818,64 @@ const CollectionMapPanelContent = ({
131661
131818
  category,
131662
131819
  importance,
131663
131820
  dependencies: dependencies[membership.repositoryId] || [],
131664
- isRoot: ((_c = membership.metadata) == null ? void 0 : _c.pinned) || false
131821
+ isRoot: ((_b = membership.metadata) == null ? void 0 : _b.pinned) || false
131665
131822
  };
131666
131823
  return project;
131667
131824
  }).filter((p2) => p2 !== null);
131668
131825
  }, [collection.id, memberships, repositories, dependencies]);
131669
- return /* @__PURE__ */ jsxs("div", { style: { position: "relative", width: "100%", height: "100%", overflow: "hidden" }, children: [
131670
- /* @__PURE__ */ jsxs(
131671
- "div",
131672
- {
131673
- style: {
131674
- position: "absolute",
131675
- top: 8,
131676
- left: 8,
131677
- zIndex: 100,
131678
- backgroundColor: "rgba(0, 0, 0, 0.7)",
131679
- padding: "8px 16px",
131680
- borderRadius: 8,
131681
- color: "white",
131682
- fontFamily: "monospace",
131683
- fontSize: 14,
131684
- fontWeight: "bold",
131685
- pointerEvents: "none"
131686
- },
131687
- children: [
131688
- collection.icon && /* @__PURE__ */ jsx("span", { style: { marginRight: 8 }, children: collection.icon }),
131689
- collection.name
131690
- ]
131691
- }
131692
- ),
131693
- /* @__PURE__ */ jsx(
131694
- GitProjectsMapPanelContent,
131695
- {
131696
- projects,
131697
- regionLayout,
131698
- width,
131699
- height,
131700
- isLoading
131701
- }
131702
- )
131703
- ] });
131826
+ return /* @__PURE__ */ jsxs(
131827
+ "div",
131828
+ {
131829
+ style: {
131830
+ position: "relative",
131831
+ width: "100%",
131832
+ height: "100%",
131833
+ overflow: "hidden",
131834
+ border: isDragOver ? "2px solid #3b82f6" : "none",
131835
+ transition: "border 0.2s ease"
131836
+ },
131837
+ ...dropZoneProps,
131838
+ children: [
131839
+ /* @__PURE__ */ jsxs(
131840
+ "div",
131841
+ {
131842
+ style: {
131843
+ position: "absolute",
131844
+ top: 8,
131845
+ left: 8,
131846
+ zIndex: 100,
131847
+ backgroundColor: isDragOver ? "rgba(59, 130, 246, 0.9)" : "rgba(0, 0, 0, 0.7)",
131848
+ padding: "8px 16px",
131849
+ borderRadius: 8,
131850
+ color: "white",
131851
+ fontFamily: "monospace",
131852
+ fontSize: 14,
131853
+ fontWeight: "bold",
131854
+ pointerEvents: "none",
131855
+ transition: "background-color 0.2s ease"
131856
+ },
131857
+ children: [
131858
+ collection.icon && /* @__PURE__ */ jsx("span", { style: { marginRight: 8 }, children: collection.icon }),
131859
+ collection.name,
131860
+ isDragOver && /* @__PURE__ */ jsx("span", { style: { marginLeft: 8 }, children: "+ Drop to add" })
131861
+ ]
131862
+ }
131863
+ ),
131864
+ /* @__PURE__ */ jsx(
131865
+ GitProjectsMapPanelContent,
131866
+ {
131867
+ projects,
131868
+ regionLayout,
131869
+ width,
131870
+ height,
131871
+ isLoading
131872
+ }
131873
+ )
131874
+ ]
131875
+ }
131876
+ );
131704
131877
  };
131705
- const CollectionMapPanel = ({ context: context2 }) => {
131878
+ const CollectionMapPanel = ({ context: context2, actions }) => {
131706
131879
  var _a, _b, _c, _d;
131707
131880
  const collectionsSlice = context2.getSlice("userCollections");
131708
131881
  const collections = ((_a = collectionsSlice == null ? void 0 : collectionsSlice.data) == null ? void 0 : _a.collections) || [];
@@ -131713,6 +131886,13 @@ const CollectionMapPanel = ({ context: context2 }) => {
131713
131886
  const repositoriesLoading = (repositoriesSlice == null ? void 0 : repositoriesSlice.loading) ?? false;
131714
131887
  const selectedCollectionId = (_d = context2.selectedCollection) == null ? void 0 : _d.id;
131715
131888
  const selectedCollection = collections.find((c2) => c2.id === selectedCollectionId);
131889
+ const handleProjectAdded = useCallback((repositoryPath, repositoryMetadata) => {
131890
+ if (actions == null ? void 0 : actions.addRepositoryToCollection) {
131891
+ actions.addRepositoryToCollection(selectedCollectionId, repositoryPath, repositoryMetadata);
131892
+ } else {
131893
+ console.warn("Actions does not support addRepositoryToCollection - drag-drop feature requires context integration");
131894
+ }
131895
+ }, [actions, selectedCollectionId]);
131716
131896
  if (!selectedCollection) {
131717
131897
  return /* @__PURE__ */ jsxs(
131718
131898
  "div",
@@ -131746,7 +131926,8 @@ const CollectionMapPanel = ({ context: context2 }) => {
131746
131926
  memberships: collectionMemberships,
131747
131927
  repositories,
131748
131928
  dependencies,
131749
- isLoading
131929
+ isLoading,
131930
+ onProjectAdded: handleProjectAdded
131750
131931
  }
131751
131932
  ) });
131752
131933
  };
@@ -132774,7 +132955,7 @@ export {
132774
132955
  extensions as f,
132775
132956
  getAttributeInfoFromFormat as g,
132776
132957
  STENCIL_MODES as h,
132777
- Buffer as i,
132958
+ Buffer2 as i,
132778
132959
  BufferUsage as j,
132779
132960
  EventEmitter as k,
132780
132961
  uid as l,
@@ -132793,4 +132974,4 @@ export {
132793
132974
  CanvasSource as y,
132794
132975
  Ticker as z
132795
132976
  };
132796
- //# sourceMappingURL=index-C6MgM63s.js.map
132977
+ //# sourceMappingURL=index-DP0q9yO1.js.map