@industry-theme/repository-composition-panels 0.7.14 → 0.7.16
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/assets/orchestrators/index.d.ts +28 -0
- package/dist/assets/orchestrators/index.d.ts.map +1 -0
- package/dist/browserAll-XNN46GKF.js +7 -0
- package/dist/browserAll-XNN46GKF.js.map +1 -0
- package/dist/{index-pPFTSf2O.js → index-Bt-XsLNt.js} +16092 -689
- package/dist/{index-pPFTSf2O.js.map → index-Bt-XsLNt.js.map} +1 -1
- package/dist/index.d.ts +35 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/init-Ccb5WXmw.js +4 -0
- package/dist/init-Ccb5WXmw.js.map +1 -0
- package/dist/mocks/panelContext.d.ts +24 -0
- package/dist/mocks/panelContext.d.ts.map +1 -0
- package/dist/panels/CollectionMapPanel.d.ts +132 -0
- package/dist/panels/CollectionMapPanel.d.ts.map +1 -0
- package/dist/panels/GitChangesPanel.d.ts +48 -0
- package/dist/panels/GitChangesPanel.d.ts.map +1 -0
- package/dist/panels/PackageCompositionPanel.d.ts +37 -0
- package/dist/panels/PackageCompositionPanel.d.ts.map +1 -0
- package/dist/panels/SearchPanel.d.ts +33 -0
- package/dist/panels/SearchPanel.d.ts.map +1 -0
- package/dist/panels/TelemetryCoveragePanel.d.ts +48 -0
- package/dist/panels/TelemetryCoveragePanel.d.ts.map +1 -0
- package/dist/panels/components/DependencyInfoModal.d.ts +8 -0
- package/dist/panels/components/DependencyInfoModal.d.ts.map +1 -0
- package/dist/panels/components/DependencyRow.d.ts +8 -0
- package/dist/panels/components/DependencyRow.d.ts.map +1 -0
- package/dist/panels/components/EmptyDependencies.d.ts +7 -0
- package/dist/panels/components/EmptyDependencies.d.ts.map +1 -0
- package/dist/panels/components/FilterBar.d.ts +19 -0
- package/dist/panels/components/FilterBar.d.ts.map +1 -0
- package/dist/panels/components/InheritedConfigIndicator.d.ts +27 -0
- package/dist/panels/components/InheritedConfigIndicator.d.ts.map +1 -0
- package/dist/panels/components/LensReadinessSection.d.ts +8 -0
- package/dist/panels/components/LensReadinessSection.d.ts.map +1 -0
- package/dist/panels/components/OrchestratorBadge.d.ts +11 -0
- package/dist/panels/components/OrchestratorBadge.d.ts.map +1 -0
- package/dist/panels/components/OtherScriptsSection.d.ts +9 -0
- package/dist/panels/components/OtherScriptsSection.d.ts.map +1 -0
- package/dist/panels/components/PackageDetailCard.d.ts +18 -0
- package/dist/panels/components/PackageDetailCard.d.ts.map +1 -0
- package/dist/panels/components/PackageLoadingGraph.d.ts +3 -0
- package/dist/panels/components/PackageLoadingGraph.d.ts.map +1 -0
- package/dist/panels/components/PackageManagerIcon.d.ts +10 -0
- package/dist/panels/components/PackageManagerIcon.d.ts.map +1 -0
- package/dist/panels/components/PackageSummaryCard.d.ts +10 -0
- package/dist/panels/components/PackageSummaryCard.d.ts.map +1 -0
- package/dist/panels/components/index.d.ts +11 -0
- package/dist/panels/components/index.d.ts.map +1 -0
- package/dist/panels/dependency-graph/DependencyGraphPanel.d.ts +20 -0
- package/dist/panels/dependency-graph/DependencyGraphPanel.d.ts.map +1 -0
- package/dist/panels/dependency-graph/dependencyToCanvas.d.ts +20 -0
- package/dist/panels/dependency-graph/dependencyToCanvas.d.ts.map +1 -0
- package/dist/panels/dependency-graph/forceLayout.d.ts +38 -0
- package/dist/panels/dependency-graph/forceLayout.d.ts.map +1 -0
- package/dist/panels/dependency-graph/index.d.ts +5 -0
- package/dist/panels/dependency-graph/index.d.ts.map +1 -0
- package/dist/panels/overworld-map/BuildingSizeTest.d.ts +11 -0
- package/dist/panels/overworld-map/BuildingSizeTest.d.ts.map +1 -0
- package/dist/panels/overworld-map/LayoutEngineTest.d.ts +24 -0
- package/dist/panels/overworld-map/LayoutEngineTest.d.ts.map +1 -0
- package/dist/panels/overworld-map/LicenseSignTest.d.ts +7 -0
- package/dist/panels/overworld-map/LicenseSignTest.d.ts.map +1 -0
- package/dist/panels/overworld-map/OverworldMapPanel.d.ts +62 -0
- package/dist/panels/overworld-map/OverworldMapPanel.d.ts.map +1 -0
- package/dist/panels/overworld-map/PackageExpansionTest.d.ts +25 -0
- package/dist/panels/overworld-map/PackageExpansionTest.d.ts.map +1 -0
- package/dist/panels/overworld-map/RegionEditingTest.d.ts +10 -0
- package/dist/panels/overworld-map/RegionEditingTest.d.ts.map +1 -0
- package/dist/panels/overworld-map/collaboratorDecoration.d.ts +38 -0
- package/dist/panels/overworld-map/collaboratorDecoration.d.ts.map +1 -0
- package/dist/panels/overworld-map/components/IsometricInteractionManager.d.ts +159 -0
- package/dist/panels/overworld-map/components/IsometricInteractionManager.d.ts.map +1 -0
- package/dist/panels/overworld-map/components/IsometricPathManager.d.ts +50 -0
- package/dist/panels/overworld-map/components/IsometricPathManager.d.ts.map +1 -0
- package/dist/panels/overworld-map/components/IsometricPixiCanvas.d.ts +88 -0
- package/dist/panels/overworld-map/components/IsometricPixiCanvas.d.ts.map +1 -0
- package/dist/panels/overworld-map/components/IsometricRenderer.d.ts +141 -0
- package/dist/panels/overworld-map/components/IsometricRenderer.d.ts.map +1 -0
- package/dist/panels/overworld-map/components/RegionTracker.d.ts +62 -0
- package/dist/panels/overworld-map/components/RegionTracker.d.ts.map +1 -0
- package/dist/panels/overworld-map/components/RepoSprite.d.ts +47 -0
- package/dist/panels/overworld-map/components/RepoSprite.d.ts.map +1 -0
- package/dist/panels/overworld-map/components/buildingSpriteGenerator.d.ts +19 -0
- package/dist/panels/overworld-map/components/buildingSpriteGenerator.d.ts.map +1 -0
- package/dist/panels/overworld-map/components/collaboratorDecorationSprites.d.ts +25 -0
- package/dist/panels/overworld-map/components/collaboratorDecorationSprites.d.ts.map +1 -0
- package/dist/panels/overworld-map/components/licenseSignSprites.d.ts +122 -0
- package/dist/panels/overworld-map/components/licenseSignSprites.d.ts.map +1 -0
- package/dist/panels/overworld-map/components/starDecorationSprites.d.ts +18 -0
- package/dist/panels/overworld-map/components/starDecorationSprites.d.ts.map +1 -0
- package/dist/panels/overworld-map/genericMapper.d.ts +81 -0
- package/dist/panels/overworld-map/genericMapper.d.ts.map +1 -0
- package/dist/panels/overworld-map/index.d.ts +13 -0
- package/dist/panels/overworld-map/index.d.ts.map +1 -0
- package/dist/panels/overworld-map/isometricUtils.d.ts +150 -0
- package/dist/panels/overworld-map/isometricUtils.d.ts.map +1 -0
- package/dist/panels/overworld-map/packageExpansion.d.ts +15 -0
- package/dist/panels/overworld-map/packageExpansion.d.ts.map +1 -0
- package/dist/panels/overworld-map/spriteLayoutEngine.d.ts +103 -0
- package/dist/panels/overworld-map/spriteLayoutEngine.d.ts.map +1 -0
- package/dist/panels/overworld-map/starDecoration.d.ts +37 -0
- package/dist/panels/overworld-map/starDecoration.d.ts.map +1 -0
- package/dist/panels/overworld-map/test-setup.d.ts +6 -0
- package/dist/panels/overworld-map/test-setup.d.ts.map +1 -0
- package/dist/panels/overworld-map/types.d.ts +228 -0
- package/dist/panels/overworld-map/types.d.ts.map +1 -0
- package/dist/panels.bundle.js +32 -31
- package/dist/services/LocalSearchService.d.ts +70 -0
- package/dist/services/LocalSearchService.d.ts.map +1 -0
- package/dist/tools/index.d.ts +32 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools.bundle.js +106 -0
- package/dist/types/composition.d.ts +22 -0
- package/dist/types/composition.d.ts.map +1 -0
- package/dist/types/dependencies.d.ts +26 -0
- package/dist/types/dependencies.d.ts.map +1 -0
- package/dist/types/index.d.ts +94 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/utils/envParser.d.ts +29 -0
- package/dist/utils/envParser.d.ts.map +1 -0
- package/dist/utils/licenseColors.d.ts +13 -0
- package/dist/utils/licenseColors.d.ts.map +1 -0
- package/dist/utils/repositoryAging.d.ts +26 -0
- package/dist/utils/repositoryAging.d.ts.map +1 -0
- package/dist/utils/repositoryScaling.d.ts +40 -0
- package/dist/utils/repositoryScaling.d.ts.map +1 -0
- package/dist/webworkerAll-Ez5pUZRt.js +3 -0
- package/dist/webworkerAll-Ez5pUZRt.js.map +1 -0
- package/package.json +1 -1
- package/dist/BufferResource-DME1VWVJ.js +0 -593
- package/dist/BufferResource-DME1VWVJ.js.map +0 -1
- package/dist/CanvasRenderer-Md8Ayshs.js +0 -1525
- package/dist/CanvasRenderer-Md8Ayshs.js.map +0 -1
- package/dist/Filter-Bi2t_gmW.js +0 -81
- package/dist/Filter-Bi2t_gmW.js.map +0 -1
- package/dist/RenderTargetSystem-D98tiHim.js +0 -3046
- package/dist/RenderTargetSystem-D98tiHim.js.map +0 -1
- package/dist/WebGLRenderer-2YtxQhbh.js +0 -3884
- package/dist/WebGLRenderer-2YtxQhbh.js.map +0 -1
- package/dist/WebGPURenderer-kS6gO2Xc.js +0 -2142
- package/dist/WebGPURenderer-kS6gO2Xc.js.map +0 -1
- package/dist/browserAll-TZZf5l7B.js +0 -2687
- package/dist/browserAll-TZZf5l7B.js.map +0 -1
- package/dist/init-CfSmqCnm.js +0 -670
- package/dist/init-CfSmqCnm.js.map +0 -1
- package/dist/webworkerAll-TcJuZTza.js +0 -3
- package/dist/webworkerAll-TcJuZTza.js.map +0 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { DependencyInfoModal } from './DependencyInfoModal';
|
|
2
|
+
export { PackageLoadingGraph } from './PackageLoadingGraph';
|
|
3
|
+
export { DependencyRow } from './DependencyRow';
|
|
4
|
+
export { FilterBar } from './FilterBar';
|
|
5
|
+
export { InheritedConfigIndicator, ConfigList, } from './InheritedConfigIndicator';
|
|
6
|
+
export { LensReadinessSection } from './LensReadinessSection';
|
|
7
|
+
export { OrchestratorBadge } from './OrchestratorBadge';
|
|
8
|
+
export { OtherScriptsSection } from './OtherScriptsSection';
|
|
9
|
+
export { PackageDetailCard } from './PackageDetailCard';
|
|
10
|
+
export { PackageSummaryCard } from './PackageSummaryCard';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/panels/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EACL,wBAAwB,EACxB,UAAU,GACX,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DependencyGraphPanelPropsTyped } from '../../types';
|
|
3
|
+
import type { PackageLayer } from '../../types/composition';
|
|
4
|
+
export interface DependencyGraphPanelProps {
|
|
5
|
+
packages: PackageLayer[];
|
|
6
|
+
isLoading?: boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Content component that renders the dependency graph visualization
|
|
10
|
+
*/
|
|
11
|
+
export declare const DependencyGraphPanelContent: React.FC<DependencyGraphPanelProps>;
|
|
12
|
+
/**
|
|
13
|
+
* Preview component for the panel selector
|
|
14
|
+
*/
|
|
15
|
+
export declare const DependencyGraphPanelPreview: React.FC;
|
|
16
|
+
/**
|
|
17
|
+
* DependencyGraphPanel - Panel Framework compatible component
|
|
18
|
+
*/
|
|
19
|
+
export declare const DependencyGraphPanel: React.FC<DependencyGraphPanelPropsTyped>;
|
|
20
|
+
//# sourceMappingURL=DependencyGraphPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DependencyGraphPanel.d.ts","sourceRoot":"","sources":["../../../src/panels/dependency-graph/DependencyGraphPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAa9D,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAC;AAClE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAK5D,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAgBD;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,KAAK,CAAC,EAAE,CAChD,yBAAyB,CAkZ1B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,KAAK,CAAC,EAwB/C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,8BAA8B,CAYzE,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ExtendedCanvas } from '@principal-ai/principal-view-core';
|
|
2
|
+
import type { PackageLayer } from '../../types/composition';
|
|
3
|
+
export interface DependencyCanvasOptions {
|
|
4
|
+
/** Include devDependencies in the graph */
|
|
5
|
+
includeDevDependencies?: boolean;
|
|
6
|
+
/** Include peerDependencies in the graph */
|
|
7
|
+
includePeerDependencies?: boolean;
|
|
8
|
+
/** Default node width */
|
|
9
|
+
nodeWidth?: number;
|
|
10
|
+
/** Default node height */
|
|
11
|
+
nodeHeight?: number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Convert an array of PackageLayer objects (from a monorepo) into an ExtendedCanvas
|
|
15
|
+
* that can be rendered by GraphRenderer.
|
|
16
|
+
*
|
|
17
|
+
* Only internal dependencies (packages within the monorepo) are shown as edges.
|
|
18
|
+
*/
|
|
19
|
+
export declare function dependencyTreeToCanvas(packages: PackageLayer[], options?: DependencyCanvasOptions): ExtendedCanvas;
|
|
20
|
+
//# sourceMappingURL=dependencyToCanvas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dependencyToCanvas.d.ts","sourceRoot":"","sources":["../../../src/panels/dependency-graph/dependencyToCanvas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAA4B,MAAM,mCAAmC,CAAC;AAClG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAgB5D,MAAM,WAAW,uBAAuB;IACtC,2CAA2C;IAC3C,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,4CAA4C;IAC5C,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,yBAAyB;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0BAA0B;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,YAAY,EAAE,EACxB,OAAO,GAAE,uBAA4B,GACpC,cAAc,CAwHhB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { ExtendedCanvas } from '@principal-ai/principal-view-core';
|
|
2
|
+
export interface ForceLayoutOptions {
|
|
3
|
+
/** Strength of repulsion between nodes (-300 default, more negative = more spread) */
|
|
4
|
+
chargeStrength?: number;
|
|
5
|
+
/** Target distance between linked nodes (150 default) */
|
|
6
|
+
linkDistance?: number;
|
|
7
|
+
/** Collision radius multiplier based on node size (1.2 default) */
|
|
8
|
+
collisionMultiplier?: number;
|
|
9
|
+
/** Number of simulation iterations (300 default) */
|
|
10
|
+
iterations?: number;
|
|
11
|
+
/** Center X coordinate (auto-calculated if not provided) */
|
|
12
|
+
centerX?: number;
|
|
13
|
+
/** Center Y coordinate (auto-calculated if not provided) */
|
|
14
|
+
centerY?: number;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Apply D3 force-directed layout to an ExtendedCanvas.
|
|
18
|
+
* Handles cycles naturally since force simulation doesn't assume hierarchy.
|
|
19
|
+
*/
|
|
20
|
+
export declare function applyForceLayout(canvas: ExtendedCanvas, options?: ForceLayoutOptions): ExtendedCanvas;
|
|
21
|
+
export interface SugiyamaLayoutOptions {
|
|
22
|
+
/** Direction of the layout: 'TB' (top-bottom), 'BT', 'LR' (left-right), 'RL' */
|
|
23
|
+
direction?: 'TB' | 'BT' | 'LR' | 'RL';
|
|
24
|
+
/** Horizontal spacing between nodes */
|
|
25
|
+
nodeSpacingX?: number;
|
|
26
|
+
/** Vertical spacing between layers */
|
|
27
|
+
nodeSpacingY?: number;
|
|
28
|
+
/** Starting X offset */
|
|
29
|
+
offsetX?: number;
|
|
30
|
+
/** Starting Y offset */
|
|
31
|
+
offsetY?: number;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Apply Sugiyama (hierarchical/layered) layout to an ExtendedCanvas.
|
|
35
|
+
* Best for DAGs and directed graphs. Falls back to force layout if cycles exist.
|
|
36
|
+
*/
|
|
37
|
+
export declare function applySugiyamaLayout(canvas: ExtendedCanvas, options?: SugiyamaLayoutOptions): ExtendedCanvas;
|
|
38
|
+
//# sourceMappingURL=forceLayout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forceLayout.d.ts","sourceRoot":"","sources":["../../../src/panels/dependency-graph/forceLayout.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAaxE,MAAM,WAAW,kBAAkB;IACjC,sFAAsF;IACtF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,yDAAyD;IACzD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mEAAmE;IACnE,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,oDAAoD;IACpD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,cAAc,EACtB,OAAO,GAAE,kBAAuB,GAC/B,cAAc,CA+FhB;AAED,MAAM,WAAW,qBAAqB;IACpC,gFAAgF;IAChF,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACtC,uCAAuC;IACvC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sCAAsC;IACtC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wBAAwB;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wBAAwB;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,cAAc,EACtB,OAAO,GAAE,qBAA0B,GAClC,cAAc,CA8HhB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { DependencyGraphPanel, DependencyGraphPanelContent, DependencyGraphPanelPreview, } from './DependencyGraphPanel';
|
|
2
|
+
export type { DependencyGraphPanelProps } from './DependencyGraphPanel';
|
|
3
|
+
export { dependencyTreeToCanvas, type DependencyCanvasOptions } from './dependencyToCanvas';
|
|
4
|
+
export { applyForceLayout, applySugiyamaLayout, type ForceLayoutOptions, type SugiyamaLayoutOptions, } from './forceLayout';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/panels/dependency-graph/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,2BAA2B,EAC3B,2BAA2B,GAC5B,MAAM,wBAAwB,CAAC;AAChC,YAAY,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,KAAK,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC5F,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,GAC3B,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Building Size Test - Demonstrates repository size scaling
|
|
3
|
+
* Shows multiple buildings at different sizes (1.5x to 4.0x multiplier)
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export interface BuildingSizeTestProps {
|
|
7
|
+
gridWidth?: number;
|
|
8
|
+
gridHeight?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const BuildingSizeTest: React.FC<BuildingSizeTestProps>;
|
|
11
|
+
//# sourceMappingURL=BuildingSizeTest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BuildingSizeTest.d.ts","sourceRoot":"","sources":["../../../src/panels/overworld-map/BuildingSizeTest.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAA4B,MAAM,OAAO,CAAC;AAQjD,MAAM,WAAW,qBAAqB;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAsN5D,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Layout Engine Test - Demonstrates automatic sprite placement
|
|
3
|
+
* Uses the actual OverworldMapPanelContent component
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export interface SpriteConfig {
|
|
7
|
+
size: number;
|
|
8
|
+
language?: string;
|
|
9
|
+
count: number;
|
|
10
|
+
}
|
|
11
|
+
export interface LayoutEngineTestProps {
|
|
12
|
+
/** Distribution of sprite sizes and languages */
|
|
13
|
+
sprites?: SpriteConfig[];
|
|
14
|
+
/** Legacy: Distribution of sprite sizes (count per size) */
|
|
15
|
+
sizeDistribution?: {
|
|
16
|
+
size1_0?: number;
|
|
17
|
+
size1_5?: number;
|
|
18
|
+
size2_0?: number;
|
|
19
|
+
size2_5?: number;
|
|
20
|
+
size3_0?: number;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export declare const LayoutEngineTest: React.FC<LayoutEngineTestProps>;
|
|
24
|
+
//# sourceMappingURL=LayoutEngineTest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LayoutEngineTest.d.ts","sourceRoot":"","sources":["../../../src/panels/overworld-map/LayoutEngineTest.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAkB,MAAM,OAAO,CAAC;AAIvC,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,qBAAqB;IACpC,iDAAiD;IACjD,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IAEzB,4DAA4D;IAC5D,gBAAgB,CAAC,EAAE;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;CACH;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAuG5D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LicenseSignTest.d.ts","sourceRoot":"","sources":["../../../src/panels/overworld-map/LicenseSignTest.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAkB,MAAM,OAAO,CAAC;AAIvC,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EA2JnC,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OverworldMapPanel - 8-bit Mario-style overworld map for package dependencies
|
|
3
|
+
*/
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { Viewport } from 'pixi-viewport';
|
|
6
|
+
import type { CustomRegion } from '@principal-ai/alexandria-collections';
|
|
7
|
+
import type { RegionLayout, GenericNode } from './genericMapper';
|
|
8
|
+
export interface OverworldMapPanelProps {
|
|
9
|
+
/** Generic nodes to visualize on the map */
|
|
10
|
+
nodes: GenericNode[];
|
|
11
|
+
/** Include dev dependencies in the map */
|
|
12
|
+
includeDevDependencies?: boolean;
|
|
13
|
+
/** Include peer dependencies in the map */
|
|
14
|
+
includePeerDependencies?: boolean;
|
|
15
|
+
/** Region layout configuration for multi-region maps */
|
|
16
|
+
regionLayout?: RegionLayout;
|
|
17
|
+
/** Panel width */
|
|
18
|
+
width?: number;
|
|
19
|
+
/** Panel height */
|
|
20
|
+
height?: number;
|
|
21
|
+
/** Loading state */
|
|
22
|
+
isLoading?: boolean;
|
|
23
|
+
/** Callback when a node is moved (for persisting manual positions) */
|
|
24
|
+
onProjectMoved?: (nodeId: string, gridX: number, gridY: number) => void;
|
|
25
|
+
/** Callback when a node is clicked (without being moved), or null when clicking empty space to deselect */
|
|
26
|
+
onNodeClicked?: (nodeId: string | null) => void;
|
|
27
|
+
/** Currently selected node ID */
|
|
28
|
+
selectedNodeId?: string | null;
|
|
29
|
+
/** Callback when hovering over a package within a monorepo */
|
|
30
|
+
onPackageHover?: (nodeId: string, packageName: string) => void;
|
|
31
|
+
/** Callback when hover ends on a package within a monorepo */
|
|
32
|
+
onPackageHoverEnd?: (nodeId: string, packageName: string) => void;
|
|
33
|
+
/** Callback when clicking on a package within a monorepo */
|
|
34
|
+
onPackageClick?: (nodeId: string, packageName: string) => void;
|
|
35
|
+
/** Whether regions are being edited */
|
|
36
|
+
isEditingRegions?: boolean;
|
|
37
|
+
/** Custom regions defined in collection */
|
|
38
|
+
customRegions?: CustomRegion[];
|
|
39
|
+
/** Callback to add a new region at a specific grid position */
|
|
40
|
+
onAddRegion?: (position: {
|
|
41
|
+
row: number;
|
|
42
|
+
col: number;
|
|
43
|
+
}) => void;
|
|
44
|
+
/** Callback to rename a region */
|
|
45
|
+
onRenameRegion?: (id: string, name: string) => void;
|
|
46
|
+
/** Callback to delete a region */
|
|
47
|
+
onDeleteRegion?: (id: string) => void;
|
|
48
|
+
/** Stable collection identifier - only recreate PIXI when this changes */
|
|
49
|
+
collectionKey?: string;
|
|
50
|
+
/** Callback when viewport is ready (for coordinate conversion) */
|
|
51
|
+
onViewportReady?: (viewport: Viewport) => void;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* OverworldMapPanelContent Component
|
|
55
|
+
* Renders package dependencies as an 8-bit isometric overworld map
|
|
56
|
+
*/
|
|
57
|
+
export declare const OverworldMapPanelContent: React.FC<OverworldMapPanelProps>;
|
|
58
|
+
/**
|
|
59
|
+
* Preview component for panel selection UI
|
|
60
|
+
*/
|
|
61
|
+
export declare const OverworldMapPanelPreview: React.FC;
|
|
62
|
+
//# sourceMappingURL=OverworldMapPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OverworldMapPanel.d.ts","sourceRoot":"","sources":["../../../src/panels/overworld-map/OverworldMapPanel.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAA+C,MAAM,OAAO,CAAC;AAEpE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAezE,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAGjE,MAAM,WAAW,sBAAsB;IACrC,4CAA4C;IAC5C,KAAK,EAAE,WAAW,EAAE,CAAC;IAErB,0CAA0C;IAC1C,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC,2CAA2C;IAC3C,uBAAuB,CAAC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AAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAEtC,0EAA0E;IAC1E,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,kEAAkE;IAClE,eAAe,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,CAAC;CAChD;AAED;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAqqCrE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAkB5C,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Package Expansion Test Component
|
|
3
|
+
* Demonstrates multiple buildings per repository
|
|
4
|
+
*/
|
|
5
|
+
import React from 'react';
|
|
6
|
+
export interface SubPackage {
|
|
7
|
+
name: string;
|
|
8
|
+
size: number;
|
|
9
|
+
}
|
|
10
|
+
export interface PackageNode {
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
size: number;
|
|
14
|
+
language?: string;
|
|
15
|
+
category?: string;
|
|
16
|
+
subPackages?: SubPackage[];
|
|
17
|
+
}
|
|
18
|
+
export interface PackageExpansionTestProps {
|
|
19
|
+
/** Title to display */
|
|
20
|
+
title?: string;
|
|
21
|
+
/** Package nodes to display */
|
|
22
|
+
packages?: PackageNode[];
|
|
23
|
+
}
|
|
24
|
+
export declare const PackageExpansionTest: React.FC<PackageExpansionTestProps>;
|
|
25
|
+
//# sourceMappingURL=PackageExpansionTest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PackageExpansionTest.d.ts","sourceRoot":"","sources":["../../../src/panels/overworld-map/PackageExpansionTest.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAsC,MAAM,OAAO,CAAC;AAuB3D,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;CAC5B;AAED,MAAM,WAAW,yBAAyB;IACxC,uBAAuB;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAC;CAC1B;AAED,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CA2QpE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Region Editing Test - Demonstrates interactive region management with placeholders
|
|
3
|
+
*/
|
|
4
|
+
import React from 'react';
|
|
5
|
+
export interface RegionEditingTestProps {
|
|
6
|
+
/** Number of initial regions (1-4) */
|
|
7
|
+
initialRegions?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare const RegionEditingTest: React.FC<RegionEditingTestProps>;
|
|
10
|
+
//# sourceMappingURL=RegionEditingTest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RegionEditingTest.d.ts","sourceRoot":"","sources":["../../../src/panels/overworld-map/RegionEditingTest.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAsC,MAAM,OAAO,CAAC;AAQ3D,MAAM,WAAW,sBAAsB;IACrC,sCAAsC;IACtC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAmgB9D,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Collaborator Decoration System
|
|
3
|
+
* Defines tiers and decorations for repository collaborators
|
|
4
|
+
*/
|
|
5
|
+
export interface CollaboratorTier {
|
|
6
|
+
min: number;
|
|
7
|
+
max: number;
|
|
8
|
+
name: string;
|
|
9
|
+
decorationType: 'bench' | 'pavilion' | 'gazebo' | 'bandstand';
|
|
10
|
+
color: number;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Tier definitions for collaborator decorations
|
|
14
|
+
* Uses community space metaphor: bench → pavilion → gazebo → bandstand
|
|
15
|
+
*/
|
|
16
|
+
export declare const COLLABORATOR_TIERS: CollaboratorTier[];
|
|
17
|
+
/**
|
|
18
|
+
* Get the collaborator tier for a given count
|
|
19
|
+
*/
|
|
20
|
+
export declare function getCollaboratorTier(count: number): CollaboratorTier | null;
|
|
21
|
+
/**
|
|
22
|
+
* Calculate size bonus for layout to accommodate decoration
|
|
23
|
+
* Community spaces are compact, so smaller bonuses than stars
|
|
24
|
+
*/
|
|
25
|
+
export declare function getCollaboratorDecorationSizeBonus(count: number): number;
|
|
26
|
+
/**
|
|
27
|
+
* Format collaborator count for display
|
|
28
|
+
*/
|
|
29
|
+
export declare function formatCollaboratorCount(count: number): string;
|
|
30
|
+
/**
|
|
31
|
+
* Calculate a scale factor for the collaborator decoration based on absolute count
|
|
32
|
+
* Uses logarithmic scaling to handle range of collaborator counts
|
|
33
|
+
*
|
|
34
|
+
* @param count - Collaborator count
|
|
35
|
+
* @returns Scale factor starting at 0.7, +0.3 per order of magnitude
|
|
36
|
+
*/
|
|
37
|
+
export declare function getCollaboratorScaleFactor(count: number): number;
|
|
38
|
+
//# sourceMappingURL=collaboratorDecoration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collaboratorDecoration.d.ts","sourceRoot":"","sources":["../../../src/panels/overworld-map/collaboratorDecoration.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,OAAO,GAAG,UAAU,GAAG,QAAQ,GAAG,WAAW,CAAC;IAC9D,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,gBAAgB,EA4ChD,CAAC;AAEF;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAM1E;AAED;;;GAGG;AACH,wBAAgB,kCAAkC,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAgBxE;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAQ7D;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMhE"}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IsometricInteractionManager - Manages all sprite interactions
|
|
3
|
+
*
|
|
4
|
+
* This component handles:
|
|
5
|
+
* - Sprite drag-and-drop with viewport pause/resume
|
|
6
|
+
* - Grid snapping on release
|
|
7
|
+
* - Hover state management
|
|
8
|
+
* - Intersection detection with visual feedback
|
|
9
|
+
* - Region boundary constraints
|
|
10
|
+
* - Event callbacks for React integration
|
|
11
|
+
*/
|
|
12
|
+
import type { Viewport } from 'pixi-viewport';
|
|
13
|
+
import type { Container } from 'pixi.js';
|
|
14
|
+
import type { SpriteInstance } from './IsometricRenderer';
|
|
15
|
+
import type { GridPoint, MapRegion } from '../types';
|
|
16
|
+
export interface IsometricInteractionConfig {
|
|
17
|
+
viewport: Viewport | null;
|
|
18
|
+
worldContainer: Container;
|
|
19
|
+
tileWidth?: number;
|
|
20
|
+
tileHeight?: number;
|
|
21
|
+
regionSize?: number;
|
|
22
|
+
highlightColor?: number;
|
|
23
|
+
selectedColor?: number;
|
|
24
|
+
intersectionColor?: number;
|
|
25
|
+
containerOffset?: {
|
|
26
|
+
x: number;
|
|
27
|
+
y: number;
|
|
28
|
+
};
|
|
29
|
+
mapBounds?: {
|
|
30
|
+
minX: number;
|
|
31
|
+
minY: number;
|
|
32
|
+
maxX: number;
|
|
33
|
+
maxY: number;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export interface IsometricInteractionEvents {
|
|
37
|
+
onDragStart?: (nodeId: string) => void;
|
|
38
|
+
onDragMove?: (nodeId: string, gridX: number, gridY: number) => void;
|
|
39
|
+
onDragEnd?: (nodeId: string, gridX: number, gridY: number) => void;
|
|
40
|
+
onClick?: (nodeId: string | null) => void;
|
|
41
|
+
onHover?: (nodeId: string) => void;
|
|
42
|
+
onHoverEnd?: (nodeId: string) => void;
|
|
43
|
+
onRegionChange?: (region: MapRegion | null) => void;
|
|
44
|
+
/** Fired when hovering over a specific package within a monorepo */
|
|
45
|
+
onPackageHover?: (nodeId: string, packageName: string) => void;
|
|
46
|
+
/** Fired when hover ends on a specific package within a monorepo */
|
|
47
|
+
onPackageHoverEnd?: (nodeId: string, packageName: string) => void;
|
|
48
|
+
/** Fired when clicking on a specific package within a monorepo */
|
|
49
|
+
onPackageClick?: (nodeId: string, packageName: string) => void;
|
|
50
|
+
}
|
|
51
|
+
export declare class IsometricInteractionManager {
|
|
52
|
+
private viewport;
|
|
53
|
+
private worldContainer;
|
|
54
|
+
private config;
|
|
55
|
+
private events;
|
|
56
|
+
private sprites;
|
|
57
|
+
private dragState;
|
|
58
|
+
private hoveredNodeId;
|
|
59
|
+
private selectedNodeId;
|
|
60
|
+
private draggingEnabled;
|
|
61
|
+
private mapBounds;
|
|
62
|
+
private clickConsumedBySprite;
|
|
63
|
+
private readonly hoverColor;
|
|
64
|
+
private readonly selectedColor;
|
|
65
|
+
constructor(config: IsometricInteractionConfig, events?: IsometricInteractionEvents);
|
|
66
|
+
/**
|
|
67
|
+
* Set up background click handler to deselect when clicking on empty space
|
|
68
|
+
*/
|
|
69
|
+
private setupBackgroundDeselect;
|
|
70
|
+
/**
|
|
71
|
+
* Register a sprite for interaction
|
|
72
|
+
* Extracted from IsometricGridTest.tsx lines 172-243
|
|
73
|
+
*/
|
|
74
|
+
registerSprite(id: string, instance: SpriteInstance): void;
|
|
75
|
+
/**
|
|
76
|
+
* Unregister a sprite
|
|
77
|
+
*/
|
|
78
|
+
unregisterSprite(id: string): void;
|
|
79
|
+
/**
|
|
80
|
+
* Clear all sprite registrations
|
|
81
|
+
* Used when scene is recreated but interaction manager persists
|
|
82
|
+
*/
|
|
83
|
+
clearSprites(): void;
|
|
84
|
+
/**
|
|
85
|
+
* Handle pointer down - start dragging
|
|
86
|
+
*/
|
|
87
|
+
private onPointerDown;
|
|
88
|
+
/**
|
|
89
|
+
* Clamp grid position to map bounds, accounting for sprite boundary size
|
|
90
|
+
*/
|
|
91
|
+
private clampToMapBounds;
|
|
92
|
+
/**
|
|
93
|
+
* Handle global pointer move - update drag
|
|
94
|
+
* Extracted from IsometricGridTest.tsx lines 192-211
|
|
95
|
+
*/
|
|
96
|
+
private onGlobalPointerMove;
|
|
97
|
+
/**
|
|
98
|
+
* Handle pointer up - end dragging and snap to grid
|
|
99
|
+
* Extracted from IsometricGridTest.tsx lines 221-231
|
|
100
|
+
*/
|
|
101
|
+
private onPointerUp;
|
|
102
|
+
/**
|
|
103
|
+
* Handle pointer up outside - end dragging
|
|
104
|
+
*/
|
|
105
|
+
private onPointerUpOutside;
|
|
106
|
+
/**
|
|
107
|
+
* Update highlights for sprites near the dragged sprite
|
|
108
|
+
* Shows highlights for sprites within 1 tile of the dragged sprite's boundary
|
|
109
|
+
*/
|
|
110
|
+
private updateNearbyHighlights;
|
|
111
|
+
/**
|
|
112
|
+
* Finish dragging - snap to grid and cleanup
|
|
113
|
+
*/
|
|
114
|
+
private finishDrag;
|
|
115
|
+
/**
|
|
116
|
+
* Handle pointer over - show highlight
|
|
117
|
+
*/
|
|
118
|
+
private onPointerOver;
|
|
119
|
+
/**
|
|
120
|
+
* Handle pointer out - hide highlight (unless dragging or selected)
|
|
121
|
+
*/
|
|
122
|
+
private onPointerOut;
|
|
123
|
+
/**
|
|
124
|
+
* Enable or disable dragging
|
|
125
|
+
*/
|
|
126
|
+
setDraggable(enabled: boolean): void;
|
|
127
|
+
/**
|
|
128
|
+
* Set the selected node
|
|
129
|
+
*/
|
|
130
|
+
setSelected(nodeId: string | null): void;
|
|
131
|
+
/**
|
|
132
|
+
* Get the currently selected node ID
|
|
133
|
+
*/
|
|
134
|
+
getSelectedNodeId(): string | null;
|
|
135
|
+
/**
|
|
136
|
+
* Update highlight color based on selected state
|
|
137
|
+
*/
|
|
138
|
+
private updateHighlightColor;
|
|
139
|
+
/**
|
|
140
|
+
* Check if position would cause boundary overlap with other sprites
|
|
141
|
+
* Boundary size is 4 × size tiles, extending 2 × size in each direction
|
|
142
|
+
*/
|
|
143
|
+
private wouldCollide;
|
|
144
|
+
/**
|
|
145
|
+
* Check intersections between dragged sprite and other sprites
|
|
146
|
+
* Returns array of intersecting sprite IDs
|
|
147
|
+
* Extracted from OverworldMapPanel.tsx lines 745-763
|
|
148
|
+
*/
|
|
149
|
+
checkIntersections(draggedId: string, position: GridPoint): string[];
|
|
150
|
+
/**
|
|
151
|
+
* Check if a sprite is currently being dragged
|
|
152
|
+
*/
|
|
153
|
+
isDragging(): boolean;
|
|
154
|
+
/**
|
|
155
|
+
* Cleanup resources
|
|
156
|
+
*/
|
|
157
|
+
destroy(): void;
|
|
158
|
+
}
|
|
159
|
+
//# sourceMappingURL=IsometricInteractionManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IsometricInteractionManager.d.ts","sourceRoot":"","sources":["../../../../src/panels/overworld-map/components/IsometricInteractionManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAyB,MAAM,SAAS,CAAC;AAChE,OAAO,KAAK,EAAE,cAAc,EAAE,MA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AwEzB;IAEF;;;OAGG;IACH,OAAO,CAAC,WAAW,CAMjB;IAEF;;OAEG;IACH,OAAO,CAAC,kBAAkB,CAMxB;IAEF;;;OAGG;IACH,OAAO,CAAC,sBAAsB;IAmC9B;;OAEG;IACH,OAAO,CAAC,UAAU;IA2ElB;;OAEG;IACH,OAAO,CAAC,aAAa;IAMrB;;OAEG;IACH,OAAO,CAAC,YAAY;IAgBpB;;OAEG;IACH,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAUpC;;OAEG;IACH,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAyBxC;;OAEG;IACH,iBAAiB,IAAI,MAAM,GAAG,IAAI;IAIlC;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAgC5B;;;OAGG;IACH,OAAO,CAAC,YAAY;IA2BpB;;;;OAIG;IACH,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,GAAG,MAAM,EAAE;IA0CpE;;OAEG;IACH,UAAU,IAAI,OAAO;IAIrB;;OAEG;IACH,OAAO,IAAI,IAAI;CAkBhB"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IsometricPathManager - Manages dynamic path updates during sprite drag
|
|
3
|
+
*
|
|
4
|
+
* This helper class handles:
|
|
5
|
+
* - Tracking node-to-path relationships
|
|
6
|
+
* - Updating only affected paths during drag
|
|
7
|
+
* - Reusing Graphics objects for efficiency
|
|
8
|
+
*/
|
|
9
|
+
import type { Graphics } from 'pixi.js';
|
|
10
|
+
import type { GridPoint } from '../types';
|
|
11
|
+
import type { IsometricRenderer } from './IsometricRenderer';
|
|
12
|
+
export interface PathConnectionData {
|
|
13
|
+
id: string;
|
|
14
|
+
fromNodeId: string;
|
|
15
|
+
toNodeId: string;
|
|
16
|
+
graphics: Graphics;
|
|
17
|
+
}
|
|
18
|
+
export declare class IsometricPathManager {
|
|
19
|
+
private pathConnections;
|
|
20
|
+
private nodePositions;
|
|
21
|
+
private renderer;
|
|
22
|
+
private nodeToPathsIndex;
|
|
23
|
+
constructor(pathConnections: PathConnectionData[], nodePositions: Map<string, GridPoint>, renderer: IsometricRenderer);
|
|
24
|
+
/**
|
|
25
|
+
* Build index of node-to-paths relationships for fast lookup
|
|
26
|
+
*/
|
|
27
|
+
private buildIndex;
|
|
28
|
+
/**
|
|
29
|
+
* Update paths connected to a moving node
|
|
30
|
+
* Extracted from OverworldMapPanel.tsx lines 569, 636, 739
|
|
31
|
+
*/
|
|
32
|
+
updateNodePosition(nodeId: string, gridX: number, gridY: number): void;
|
|
33
|
+
/**
|
|
34
|
+
* Get all paths connected to a node
|
|
35
|
+
*/
|
|
36
|
+
getConnectedPaths(nodeId: string): PathConnectionData[];
|
|
37
|
+
/**
|
|
38
|
+
* Add a new path (for dynamic path creation)
|
|
39
|
+
*/
|
|
40
|
+
addPath(path: PathConnectionData): void;
|
|
41
|
+
/**
|
|
42
|
+
* Remove a path (for dynamic path removal)
|
|
43
|
+
*/
|
|
44
|
+
removePath(pathId: string): void;
|
|
45
|
+
/**
|
|
46
|
+
* Cleanup resources
|
|
47
|
+
*/
|
|
48
|
+
destroy(): void;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=IsometricPathManager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IsometricPathManager.d.ts","sourceRoot":"","sources":["../../../../src/panels/overworld-map/components/IsometricPathManager.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,eAAe,CAAuB;IAC9C,OAAO,CAAC,aAAa,CAAyB;IAC9C,OAAO,CAAC,QAAQ,CAAoB;IAGpC,OAAO,CAAC,gBAAgB,CAAgD;gBAGtE,eAAe,EAAE,kBAAkB,EAAE,EACrC,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,EACrC,QAAQ,EAAE,iBAAiB;IAU7B;;OAEG;IACH,OAAO,CAAC,UAAU;IAgBlB;;;OAGG;IACH,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAkBtE;;OAEG;IACH,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,kBAAkB,EAAE;IAIvD;;OAEG;IACH,OAAO,CAAC,IAAI,EAAE,kBAAkB,GAAG,IAAI;IAevC;;OAEG;IACH,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IA4BhC;;OAEG;IACH,OAAO,IAAI,IAAI;CAKhB"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IsometricPixiCanvas - Manages Pixi Application lifecycle and pixi-viewport integration
|
|
3
|
+
*
|
|
4
|
+
* This component handles:
|
|
5
|
+
* - Pixi.js Application initialization and cleanup
|
|
6
|
+
* - pixi-viewport integration with plugins (drag, wheel, pinch, decelerate)
|
|
7
|
+
* - Camera animation with easing
|
|
8
|
+
* - Responsive resize handling
|
|
9
|
+
* - Region-aware viewport scaling
|
|
10
|
+
*/
|
|
11
|
+
import { Application } from 'pixi.js';
|
|
12
|
+
import { Viewport } from 'pixi-viewport';
|
|
13
|
+
export interface IsometricPixiCanvasConfig {
|
|
14
|
+
container: HTMLElement;
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
worldWidth: number;
|
|
18
|
+
worldHeight: number;
|
|
19
|
+
backgroundColor?: number;
|
|
20
|
+
minZoom?: number;
|
|
21
|
+
maxZoom?: number;
|
|
22
|
+
}
|
|
23
|
+
export interface IsometricPixiCanvasEvents {
|
|
24
|
+
onViewportMove?: (x: number, y: number) => void;
|
|
25
|
+
onZoom?: (scale: number) => void;
|
|
26
|
+
}
|
|
27
|
+
export declare class IsometricPixiCanvas {
|
|
28
|
+
private _app;
|
|
29
|
+
private _viewport;
|
|
30
|
+
private config;
|
|
31
|
+
private events;
|
|
32
|
+
private resizeObserver;
|
|
33
|
+
private animationFrameId;
|
|
34
|
+
constructor(config: IsometricPixiCanvasConfig, events?: IsometricPixiCanvasEvents);
|
|
35
|
+
/**
|
|
36
|
+
* Initialize Pixi Application and viewport
|
|
37
|
+
* Returns the app and viewport instances for further setup
|
|
38
|
+
*/
|
|
39
|
+
init(): Promise<{
|
|
40
|
+
app: Application;
|
|
41
|
+
viewport: Viewport;
|
|
42
|
+
}>;
|
|
43
|
+
/**
|
|
44
|
+
* Get the Pixi Application instance
|
|
45
|
+
*/
|
|
46
|
+
get app(): Application;
|
|
47
|
+
/**
|
|
48
|
+
* Get the pixi-viewport instance
|
|
49
|
+
*/
|
|
50
|
+
get viewport(): Viewport;
|
|
51
|
+
/**
|
|
52
|
+
* Get the HTML canvas element
|
|
53
|
+
*/
|
|
54
|
+
get canvas(): HTMLCanvasElement;
|
|
55
|
+
/**
|
|
56
|
+
* Setup resize observer for responsive handling
|
|
57
|
+
* Extracted from OverworldMapPanel.tsx lines 830-886
|
|
58
|
+
*/
|
|
59
|
+
private setupResizeObserver;
|
|
60
|
+
/**
|
|
61
|
+
* Resize the canvas and viewport
|
|
62
|
+
*/
|
|
63
|
+
resize(width: number, height: number): void;
|
|
64
|
+
/**
|
|
65
|
+
* Move viewport center immediately or smoothly
|
|
66
|
+
*/
|
|
67
|
+
moveCenter(x: number, y: number, immediate?: boolean): void;
|
|
68
|
+
/**
|
|
69
|
+
* Animate viewport to a position with easing
|
|
70
|
+
* Extracted from OverworldMapPanel.tsx lines 772-825
|
|
71
|
+
*/
|
|
72
|
+
animateTo(targetX: number, targetY: number, duration?: number, easing?: (t: number) => number): Promise<void>;
|
|
73
|
+
/**
|
|
74
|
+
* Fit viewport to a region with padding
|
|
75
|
+
* Extracted from OverworldMapPanel.tsx lines 772-800 (scale calculation)
|
|
76
|
+
*/
|
|
77
|
+
fitToRegion(bounds: {
|
|
78
|
+
x: number;
|
|
79
|
+
y: number;
|
|
80
|
+
width: number;
|
|
81
|
+
height: number;
|
|
82
|
+
}, padding?: number): void;
|
|
83
|
+
/**
|
|
84
|
+
* Cleanup resources
|
|
85
|
+
*/
|
|
86
|
+
destroy(): void;
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=IsometricPixiCanvas.d.ts.map
|