@industry-theme/repository-composition-panels 0.2.55 → 0.2.56
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/BufferResource-7ZG9gi25.js +593 -0
- package/dist/BufferResource-7ZG9gi25.js.map +1 -0
- package/dist/CanvasRenderer-C3lxf5_p.js +1525 -0
- package/dist/CanvasRenderer-C3lxf5_p.js.map +1 -0
- package/dist/Filter-DTcLrzpd.js +81 -0
- package/dist/Filter-DTcLrzpd.js.map +1 -0
- package/dist/RenderTargetSystem-BMwTjFRu.js +3046 -0
- package/dist/RenderTargetSystem-BMwTjFRu.js.map +1 -0
- package/dist/WebGLRenderer-C1WxucO3.js +3884 -0
- package/dist/WebGLRenderer-C1WxucO3.js.map +1 -0
- package/dist/WebGPURenderer-CStGpA3z.js +2142 -0
- package/dist/WebGPURenderer-CStGpA3z.js.map +1 -0
- package/dist/browserAll-CvLsOAZt.js +2687 -0
- package/dist/browserAll-CvLsOAZt.js.map +1 -0
- package/dist/index-v-8srNgr.js +87198 -0
- package/dist/index-v-8srNgr.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/init-Dc6cN5o5.js +670 -0
- package/dist/init-Dc6cN5o5.js.map +1 -0
- package/dist/panels/CollectionMapPanel.d.ts +68 -0
- package/dist/panels/CollectionMapPanel.d.ts.map +1 -0
- package/dist/panels/GitProjectsMapPanel.d.ts +50 -0
- package/dist/panels/GitProjectsMapPanel.d.ts.map +1 -0
- package/dist/panels/overworld-map/OverworldMapPanel.d.ts +35 -0
- package/dist/panels/overworld-map/OverworldMapPanel.d.ts.map +1 -0
- package/dist/panels/overworld-map/dataConverter.d.ts +28 -0
- package/dist/panels/overworld-map/dataConverter.d.ts.map +1 -0
- package/dist/panels/overworld-map/genericMapper.d.ts +43 -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 +102 -0
- package/dist/panels/overworld-map/isometricUtils.d.ts.map +1 -0
- package/dist/panels/overworld-map/spriteGenerator.d.ts +35 -0
- package/dist/panels/overworld-map/spriteGenerator.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 +197 -0
- package/dist/panels/overworld-map/types.d.ts.map +1 -0
- package/dist/panels.bundle.js +39 -60834
- package/dist/panels.bundle.js.map +1 -1
- package/dist/types/dependencies.d.ts +2 -24
- package/dist/types/dependencies.d.ts.map +1 -1
- package/dist/webworkerAll-LYLt9MVw.js +3 -0
- package/dist/webworkerAll-LYLt9MVw.js.map +1 -0
- package/package.json +9 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init-Dc6cN5o5.js","sources":["../node_modules/pixi.js/lib/filters/defaults/defaultFilter.vert.mjs","../node_modules/pixi.js/lib/filters/defaults/passthrough/passthrough.frag.mjs","../node_modules/pixi.js/lib/filters/defaults/passthrough/passthrough.wgsl.mjs","../node_modules/pixi.js/lib/filters/defaults/passthrough/PassthroughFilter.mjs","../node_modules/pixi.js/lib/filters/FilterPipe.mjs","../node_modules/pixi.js/lib/scene/container/bounds/getRenderableBounds.mjs","../node_modules/pixi.js/lib/filters/FilterSystem.mjs","../node_modules/pixi.js/lib/filters/init.mjs"],"sourcesContent":["var vertex = \"in vec2 aPosition;\\nout vec2 vTextureCoord;\\n\\nuniform vec4 uInputSize;\\nuniform vec4 uOutputFrame;\\nuniform vec4 uOutputTexture;\\n\\nvec4 filterVertexPosition( void )\\n{\\n vec2 position = aPosition * uOutputFrame.zw + uOutputFrame.xy;\\n \\n position.x = position.x * (2.0 / uOutputTexture.x) - 1.0;\\n position.y = position.y * (2.0*uOutputTexture.z / uOutputTexture.y) - uOutputTexture.z;\\n\\n return vec4(position, 0.0, 1.0);\\n}\\n\\nvec2 filterTextureCoord( void )\\n{\\n return aPosition * (uOutputFrame.zw * uInputSize.zw);\\n}\\n\\nvoid main(void)\\n{\\n gl_Position = filterVertexPosition();\\n vTextureCoord = filterTextureCoord();\\n}\\n\";\n\nexport { vertex as default };\n//# sourceMappingURL=defaultFilter.vert.mjs.map\n","var fragment = \"in vec2 vTextureCoord;\\nout vec4 finalColor;\\nuniform sampler2D uTexture;\\nvoid main() {\\n finalColor = texture(uTexture, vTextureCoord);\\n}\\n\";\n\nexport { fragment as default };\n//# sourceMappingURL=passthrough.frag.mjs.map\n","var source = \"struct GlobalFilterUniforms {\\n uInputSize: vec4<f32>,\\n uInputPixel: vec4<f32>,\\n uInputClamp: vec4<f32>,\\n uOutputFrame: vec4<f32>,\\n uGlobalFrame: vec4<f32>,\\n uOutputTexture: vec4<f32>,\\n};\\n\\n@group(0) @binding(0) var <uniform> gfu: GlobalFilterUniforms;\\n@group(0) @binding(1) var uTexture: texture_2d<f32>;\\n@group(0) @binding(2) var uSampler: sampler;\\n\\nstruct VSOutput {\\n @builtin(position) position: vec4<f32>,\\n @location(0) uv: vec2<f32>\\n};\\n\\nfn filterVertexPosition(aPosition: vec2<f32>) -> vec4<f32>\\n{\\n var position = aPosition * gfu.uOutputFrame.zw + gfu.uOutputFrame.xy;\\n\\n position.x = position.x * (2.0 / gfu.uOutputTexture.x) - 1.0;\\n position.y = position.y * (2.0 * gfu.uOutputTexture.z / gfu.uOutputTexture.y) - gfu.uOutputTexture.z;\\n\\n return vec4(position, 0.0, 1.0);\\n}\\n\\nfn filterTextureCoord(aPosition: vec2<f32>) -> vec2<f32>\\n{\\n return aPosition * (gfu.uOutputFrame.zw * gfu.uInputSize.zw);\\n}\\n\\n@vertex\\nfn mainVertex(\\n @location(0) aPosition: vec2<f32>,\\n) -> VSOutput {\\n return VSOutput(\\n filterVertexPosition(aPosition),\\n filterTextureCoord(aPosition)\\n );\\n}\\n\\n@fragment\\nfn mainFragment(\\n @location(0) uv: vec2<f32>,\\n) -> @location(0) vec4<f32> {\\n return textureSample(uTexture, uSampler, uv);\\n}\\n\";\n\nexport { source as default };\n//# sourceMappingURL=passthrough.wgsl.mjs.map\n","import { GlProgram } from '../../../rendering/renderers/gl/shader/GlProgram.mjs';\nimport { GpuProgram } from '../../../rendering/renderers/gpu/shader/GpuProgram.mjs';\nimport { Filter } from '../../Filter.mjs';\nimport vertex from '../defaultFilter.vert.mjs';\nimport fragment from './passthrough.frag.mjs';\nimport source from './passthrough.wgsl.mjs';\n\n\"use strict\";\nclass PassthroughFilter extends Filter {\n constructor() {\n const gpuProgram = GpuProgram.from({\n vertex: { source, entryPoint: \"mainVertex\" },\n fragment: { source, entryPoint: \"mainFragment\" },\n name: \"passthrough-filter\"\n });\n const glProgram = GlProgram.from({\n vertex,\n fragment,\n name: \"passthrough-filter\"\n });\n super({\n gpuProgram,\n glProgram\n });\n }\n}\n\nexport { PassthroughFilter };\n//# sourceMappingURL=PassthroughFilter.mjs.map\n","import { ExtensionType } from '../extensions/Extensions.mjs';\n\n\"use strict\";\nclass FilterPipe {\n constructor(renderer) {\n this._renderer = renderer;\n }\n push(filterEffect, container, instructionSet) {\n const renderPipes = this._renderer.renderPipes;\n renderPipes.batch.break(instructionSet);\n instructionSet.add({\n renderPipeId: \"filter\",\n canBundle: false,\n action: \"pushFilter\",\n container,\n filterEffect\n });\n }\n pop(_filterEffect, _container, instructionSet) {\n this._renderer.renderPipes.batch.break(instructionSet);\n instructionSet.add({\n renderPipeId: \"filter\",\n action: \"popFilter\",\n canBundle: false\n });\n }\n execute(instruction) {\n if (instruction.action === \"pushFilter\") {\n this._renderer.filter.push(instruction);\n } else if (instruction.action === \"popFilter\") {\n this._renderer.filter.pop();\n }\n }\n destroy() {\n this._renderer = null;\n }\n}\nFilterPipe.extension = {\n type: [\n ExtensionType.WebGLPipes,\n ExtensionType.WebGPUPipes,\n ExtensionType.CanvasPipes\n ],\n name: \"filter\"\n};\n\nexport { FilterPipe };\n//# sourceMappingURL=FilterPipe.mjs.map\n","import '../../../maths/index.mjs';\nimport { Matrix } from '../../../maths/matrix/Matrix.mjs';\n\n\"use strict\";\nconst tempProjectionMatrix = new Matrix();\nfunction getGlobalRenderableBounds(renderables, bounds) {\n bounds.clear();\n const actualMatrix = bounds.matrix;\n for (let i = 0; i < renderables.length; i++) {\n const renderable = renderables[i];\n if (renderable.globalDisplayStatus < 7) {\n continue;\n }\n const renderGroup = renderable.renderGroup ?? renderable.parentRenderGroup;\n if (renderGroup?.isCachedAsTexture) {\n bounds.matrix = tempProjectionMatrix.copyFrom(renderGroup.textureOffsetInverseTransform).append(renderable.worldTransform);\n } else if (renderGroup?._parentCacheAsTextureRenderGroup) {\n bounds.matrix = tempProjectionMatrix.copyFrom(renderGroup._parentCacheAsTextureRenderGroup.inverseWorldTransform).append(renderable.groupTransform);\n } else {\n bounds.matrix = renderable.worldTransform;\n }\n bounds.addBounds(renderable.bounds);\n }\n bounds.matrix = actualMatrix;\n return bounds;\n}\n\nexport { getGlobalRenderableBounds };\n//# sourceMappingURL=getRenderableBounds.mjs.map\n","import { ExtensionType } from '../extensions/Extensions.mjs';\nimport { PassthroughFilter } from './defaults/passthrough/PassthroughFilter.mjs';\nimport { Matrix } from '../maths/matrix/Matrix.mjs';\nimport { BindGroup } from '../rendering/renderers/gpu/shader/BindGroup.mjs';\nimport { Geometry } from '../rendering/renderers/shared/geometry/Geometry.mjs';\nimport { UniformGroup } from '../rendering/renderers/shared/shader/UniformGroup.mjs';\nimport { Texture } from '../rendering/renderers/shared/texture/Texture.mjs';\nimport { TexturePool } from '../rendering/renderers/shared/texture/TexturePool.mjs';\nimport { RendererType } from '../rendering/renderers/types.mjs';\nimport { Bounds } from '../scene/container/bounds/Bounds.mjs';\nimport { getGlobalRenderableBounds } from '../scene/container/bounds/getRenderableBounds.mjs';\nimport { warn } from '../utils/logging/warn.mjs';\n\n\"use strict\";\nconst quadGeometry = new Geometry({\n attributes: {\n aPosition: {\n buffer: new Float32Array([0, 0, 1, 0, 1, 1, 0, 1]),\n format: \"float32x2\",\n stride: 2 * 4,\n offset: 0\n }\n },\n indexBuffer: new Uint32Array([0, 1, 2, 0, 2, 3])\n});\nclass FilterData {\n constructor() {\n /**\n * Indicates whether the filter should be skipped.\n * @type {boolean}\n */\n this.skip = false;\n /**\n * The texture to which the filter is applied.\n * @type {Texture}\n */\n this.inputTexture = null;\n /**\n * The back texture used for blending, if required.\n * @type {Texture | null}\n */\n this.backTexture = null;\n /**\n * The list of filters to be applied.\n * @type {Filter[]}\n */\n this.filters = null;\n /**\n * The bounds of the filter area.\n * @type {Bounds}\n */\n this.bounds = new Bounds();\n /**\n * The container to which the filter is applied.\n * @type {Container}\n */\n this.container = null;\n /**\n * Indicates whether blending is required for the filter.\n * @type {boolean}\n */\n this.blendRequired = false;\n /**\n * The render surface where the output of the filter is rendered.\n * @type {RenderSurface}\n */\n this.outputRenderSurface = null;\n /**\n * The global frame of the filter area.\n * @type {{ x: number, y: number, width: number, height: number }}\n */\n this.globalFrame = { x: 0, y: 0, width: 0, height: 0 };\n /** The first enabled filter index in the current filter list. */\n this.firstEnabledIndex = -1;\n /** The last enabled filter index in the current filter list. */\n this.lastEnabledIndex = -1;\n }\n}\nclass FilterSystem {\n constructor(renderer) {\n this._filterStackIndex = 0;\n this._filterStack = [];\n this._filterGlobalUniforms = new UniformGroup({\n uInputSize: { value: new Float32Array(4), type: \"vec4<f32>\" },\n uInputPixel: { value: new Float32Array(4), type: \"vec4<f32>\" },\n uInputClamp: { value: new Float32Array(4), type: \"vec4<f32>\" },\n uOutputFrame: { value: new Float32Array(4), type: \"vec4<f32>\" },\n uGlobalFrame: { value: new Float32Array(4), type: \"vec4<f32>\" },\n uOutputTexture: { value: new Float32Array(4), type: \"vec4<f32>\" }\n });\n this._globalFilterBindGroup = new BindGroup({});\n this.renderer = renderer;\n }\n /**\n * The back texture of the currently active filter. Requires the filter to have `blendRequired` set to true.\n * @readonly\n */\n get activeBackTexture() {\n return this._activeFilterData?.backTexture;\n }\n /**\n * Pushes a filter instruction onto the filter stack.\n * @param instruction - The instruction containing the filter effect and container.\n * @internal\n */\n push(instruction) {\n const renderer = this.renderer;\n const filters = instruction.filterEffect.filters;\n const filterData = this._pushFilterData();\n filterData.skip = false;\n filterData.filters = filters;\n filterData.container = instruction.container;\n filterData.outputRenderSurface = renderer.renderTarget.renderSurface;\n const colorTextureSource = renderer.renderTarget.renderTarget.colorTexture.source;\n const rootResolution = colorTextureSource.resolution;\n const rootAntialias = colorTextureSource.antialias;\n if (filters.every((filter) => !filter.enabled)) {\n filterData.skip = true;\n return;\n }\n const bounds = filterData.bounds;\n this._calculateFilterArea(instruction, bounds);\n this._calculateFilterBounds(filterData, renderer.renderTarget.rootViewPort, rootAntialias, rootResolution, 1);\n if (filterData.skip) {\n return;\n }\n const previousFilterData = this._getPreviousFilterData();\n const globalResolution = this._findFilterResolution(rootResolution);\n let offsetX = 0;\n let offsetY = 0;\n if (previousFilterData) {\n offsetX = previousFilterData.bounds.minX;\n offsetY = previousFilterData.bounds.minY;\n }\n this._calculateGlobalFrame(\n filterData,\n offsetX,\n offsetY,\n globalResolution,\n colorTextureSource.width,\n colorTextureSource.height\n );\n this._setupFilterTextures(filterData, bounds, renderer, previousFilterData);\n }\n /**\n * Applies filters to a texture.\n *\n * This method takes a texture and a list of filters, applies the filters to the texture,\n * and returns the resulting texture.\n * @param {object} params - The parameters for applying filters.\n * @param {Texture} params.texture - The texture to apply filters to.\n * @param {Filter[]} params.filters - The filters to apply.\n * @returns {Texture} The resulting texture after all filters have been applied.\n * @example\n *\n * ```ts\n * // Create a texture and a list of filters\n * const texture = new Texture(...);\n * const filters = [new BlurFilter(), new ColorMatrixFilter()];\n *\n * // Apply the filters to the texture\n * const resultTexture = filterSystem.applyToTexture({ texture, filters });\n *\n * // Use the resulting texture\n * sprite.texture = resultTexture;\n * ```\n *\n * Key Points:\n * 1. padding is not currently supported here - so clipping may occur with filters that use padding.\n * 2. If all filters are disabled or skipped, the original texture is returned.\n */\n generateFilteredTexture({ texture, filters }) {\n const filterData = this._pushFilterData();\n this._activeFilterData = filterData;\n filterData.skip = false;\n filterData.filters = filters;\n const colorTextureSource = texture.source;\n const rootResolution = colorTextureSource.resolution;\n const rootAntialias = colorTextureSource.antialias;\n if (filters.every((filter) => !filter.enabled)) {\n filterData.skip = true;\n return texture;\n }\n const bounds = filterData.bounds;\n bounds.addRect(texture.frame);\n this._calculateFilterBounds(filterData, bounds.rectangle, rootAntialias, rootResolution, 0);\n if (filterData.skip) {\n return texture;\n }\n const globalResolution = rootResolution;\n const offsetX = 0;\n const offsetY = 0;\n this._calculateGlobalFrame(\n filterData,\n offsetX,\n offsetY,\n globalResolution,\n colorTextureSource.width,\n colorTextureSource.height\n );\n filterData.outputRenderSurface = TexturePool.getOptimalTexture(\n bounds.width,\n bounds.height,\n filterData.resolution,\n filterData.antialias\n );\n filterData.backTexture = Texture.EMPTY;\n filterData.inputTexture = texture;\n const renderer = this.renderer;\n renderer.renderTarget.finishRenderPass();\n this._applyFiltersToTexture(filterData, true);\n const outputTexture = filterData.outputRenderSurface;\n outputTexture.source.alphaMode = \"premultiplied-alpha\";\n return outputTexture;\n }\n /** @internal */\n pop() {\n const renderer = this.renderer;\n const filterData = this._popFilterData();\n if (filterData.skip) {\n return;\n }\n renderer.globalUniforms.pop();\n renderer.renderTarget.finishRenderPass();\n this._activeFilterData = filterData;\n this._applyFiltersToTexture(filterData, false);\n if (filterData.blendRequired) {\n TexturePool.returnTexture(filterData.backTexture);\n }\n TexturePool.returnTexture(filterData.inputTexture);\n }\n /**\n * Copies the last render surface to a texture.\n * @param lastRenderSurface - The last render surface to copy from.\n * @param bounds - The bounds of the area to copy.\n * @param previousBounds - The previous bounds to use for offsetting the copy.\n */\n getBackTexture(lastRenderSurface, bounds, previousBounds) {\n const backgroundResolution = lastRenderSurface.colorTexture.source._resolution;\n const backTexture = TexturePool.getOptimalTexture(\n bounds.width,\n bounds.height,\n backgroundResolution,\n false\n );\n let x = bounds.minX;\n let y = bounds.minY;\n if (previousBounds) {\n x -= previousBounds.minX;\n y -= previousBounds.minY;\n }\n x = Math.floor(x * backgroundResolution);\n y = Math.floor(y * backgroundResolution);\n const width = Math.ceil(bounds.width * backgroundResolution);\n const height = Math.ceil(bounds.height * backgroundResolution);\n this.renderer.renderTarget.copyToTexture(\n lastRenderSurface,\n backTexture,\n { x, y },\n { width, height },\n { x: 0, y: 0 }\n );\n return backTexture;\n }\n /**\n * Applies a filter to a texture.\n * @param filter - The filter to apply.\n * @param input - The input texture.\n * @param output - The output render surface.\n * @param clear - Whether to clear the output surface before applying the filter.\n */\n applyFilter(filter, input, output, clear) {\n const renderer = this.renderer;\n const filterData = this._activeFilterData;\n const outputRenderSurface = filterData.outputRenderSurface;\n const isFinalTarget = outputRenderSurface === output;\n const rootResolution = renderer.renderTarget.rootRenderTarget.colorTexture.source._resolution;\n const resolution = this._findFilterResolution(rootResolution);\n let offsetX = 0;\n let offsetY = 0;\n if (isFinalTarget) {\n const offset = this._findPreviousFilterOffset();\n offsetX = offset.x;\n offsetY = offset.y;\n }\n this._updateFilterUniforms(input, output, filterData, offsetX, offsetY, resolution, isFinalTarget, clear);\n const filterToApply = filter.enabled ? filter : this._getPassthroughFilter();\n this._setupBindGroupsAndRender(filterToApply, input, renderer);\n }\n /**\n * Multiply _input normalized coordinates_ to this matrix to get _sprite texture normalized coordinates_.\n *\n * Use `outputMatrix * vTextureCoord` in the shader.\n * @param outputMatrix - The matrix to output to.\n * @param {Sprite} sprite - The sprite to map to.\n * @returns The mapped matrix.\n */\n calculateSpriteMatrix(outputMatrix, sprite) {\n const data = this._activeFilterData;\n const mappedMatrix = outputMatrix.set(\n data.inputTexture._source.width,\n 0,\n 0,\n data.inputTexture._source.height,\n data.bounds.minX,\n data.bounds.minY\n );\n const worldTransform = sprite.worldTransform.copyTo(Matrix.shared);\n const renderGroup = sprite.renderGroup || sprite.parentRenderGroup;\n if (renderGroup && renderGroup.cacheToLocalTransform) {\n worldTransform.prepend(renderGroup.cacheToLocalTransform);\n }\n worldTransform.invert();\n mappedMatrix.prepend(worldTransform);\n mappedMatrix.scale(\n 1 / sprite.texture.orig.width,\n 1 / sprite.texture.orig.height\n );\n mappedMatrix.translate(sprite.anchor.x, sprite.anchor.y);\n return mappedMatrix;\n }\n destroy() {\n this._passthroughFilter?.destroy(true);\n this._passthroughFilter = null;\n }\n _getPassthroughFilter() {\n this._passthroughFilter ?? (this._passthroughFilter = new PassthroughFilter());\n return this._passthroughFilter;\n }\n /**\n * Sets up the bind groups and renders the filter.\n * @param filter - The filter to apply\n * @param input - The input texture\n * @param renderer - The renderer instance\n */\n _setupBindGroupsAndRender(filter, input, renderer) {\n if (renderer.renderPipes.uniformBatch) {\n const batchUniforms = renderer.renderPipes.uniformBatch.getUboResource(this._filterGlobalUniforms);\n this._globalFilterBindGroup.setResource(batchUniforms, 0);\n } else {\n this._globalFilterBindGroup.setResource(this._filterGlobalUniforms, 0);\n }\n this._globalFilterBindGroup.setResource(input.source, 1);\n this._globalFilterBindGroup.setResource(input.source.style, 2);\n filter.groups[0] = this._globalFilterBindGroup;\n renderer.encoder.draw({\n geometry: quadGeometry,\n shader: filter,\n state: filter._state,\n topology: \"triangle-list\"\n });\n if (renderer.type === RendererType.WEBGL) {\n renderer.renderTarget.finishRenderPass();\n }\n }\n /**\n * Sets up the filter textures including input texture and back texture if needed.\n * @param filterData - The filter data to update\n * @param bounds - The bounds for the texture\n * @param renderer - The renderer instance\n * @param previousFilterData - The previous filter data for back texture calculation\n */\n _setupFilterTextures(filterData, bounds, renderer, previousFilterData) {\n filterData.backTexture = Texture.EMPTY;\n filterData.inputTexture = TexturePool.getOptimalTexture(\n bounds.width,\n bounds.height,\n filterData.resolution,\n filterData.antialias\n );\n if (filterData.blendRequired) {\n renderer.renderTarget.finishRenderPass();\n const renderTarget = renderer.renderTarget.getRenderTarget(filterData.outputRenderSurface);\n filterData.backTexture = this.getBackTexture(renderTarget, bounds, previousFilterData?.bounds);\n }\n renderer.renderTarget.bind(filterData.inputTexture, true);\n renderer.globalUniforms.push({\n offset: bounds\n });\n }\n /**\n * Calculates and sets the global frame for the filter.\n * @param filterData - The filter data to update\n * @param offsetX - The X offset\n * @param offsetY - The Y offset\n * @param globalResolution - The global resolution\n * @param sourceWidth - The source texture width\n * @param sourceHeight - The source texture height\n */\n _calculateGlobalFrame(filterData, offsetX, offsetY, globalResolution, sourceWidth, sourceHeight) {\n const globalFrame = filterData.globalFrame;\n globalFrame.x = offsetX * globalResolution;\n globalFrame.y = offsetY * globalResolution;\n globalFrame.width = sourceWidth * globalResolution;\n globalFrame.height = sourceHeight * globalResolution;\n }\n /**\n * Updates the filter uniforms with the current filter state.\n * @param input - The input texture\n * @param output - The output render surface\n * @param filterData - The current filter data\n * @param offsetX - The X offset for positioning\n * @param offsetY - The Y offset for positioning\n * @param resolution - The current resolution\n * @param isFinalTarget - Whether this is the final render target\n * @param clear - Whether to clear the output surface\n */\n _updateFilterUniforms(input, output, filterData, offsetX, offsetY, resolution, isFinalTarget, clear) {\n const uniforms = this._filterGlobalUniforms.uniforms;\n const outputFrame = uniforms.uOutputFrame;\n const inputSize = uniforms.uInputSize;\n const inputPixel = uniforms.uInputPixel;\n const inputClamp = uniforms.uInputClamp;\n const globalFrame = uniforms.uGlobalFrame;\n const outputTexture = uniforms.uOutputTexture;\n if (isFinalTarget) {\n outputFrame[0] = filterData.bounds.minX - offsetX;\n outputFrame[1] = filterData.bounds.minY - offsetY;\n } else {\n outputFrame[0] = 0;\n outputFrame[1] = 0;\n }\n outputFrame[2] = input.frame.width;\n outputFrame[3] = input.frame.height;\n inputSize[0] = input.source.width;\n inputSize[1] = input.source.height;\n inputSize[2] = 1 / inputSize[0];\n inputSize[3] = 1 / inputSize[1];\n inputPixel[0] = input.source.pixelWidth;\n inputPixel[1] = input.source.pixelHeight;\n inputPixel[2] = 1 / inputPixel[0];\n inputPixel[3] = 1 / inputPixel[1];\n inputClamp[0] = 0.5 * inputPixel[2];\n inputClamp[1] = 0.5 * inputPixel[3];\n inputClamp[2] = input.frame.width * inputSize[2] - 0.5 * inputPixel[2];\n inputClamp[3] = input.frame.height * inputSize[3] - 0.5 * inputPixel[3];\n const rootTexture = this.renderer.renderTarget.rootRenderTarget.colorTexture;\n globalFrame[0] = offsetX * resolution;\n globalFrame[1] = offsetY * resolution;\n globalFrame[2] = rootTexture.source.width * resolution;\n globalFrame[3] = rootTexture.source.height * resolution;\n if (output instanceof Texture) output.source.resource = null;\n const renderTarget = this.renderer.renderTarget.getRenderTarget(output);\n this.renderer.renderTarget.bind(output, !!clear);\n if (output instanceof Texture) {\n outputTexture[0] = output.frame.width;\n outputTexture[1] = output.frame.height;\n } else {\n outputTexture[0] = renderTarget.width;\n outputTexture[1] = renderTarget.height;\n }\n outputTexture[2] = renderTarget.isRoot ? -1 : 1;\n this._filterGlobalUniforms.update();\n }\n /**\n * Finds the correct resolution by looking back through the filter stack.\n * @param rootResolution - The fallback root resolution to use\n * @returns The resolution from the previous filter or root resolution\n */\n _findFilterResolution(rootResolution) {\n let currentIndex = this._filterStackIndex - 1;\n while (currentIndex > 0 && this._filterStack[currentIndex].skip) {\n --currentIndex;\n }\n return currentIndex > 0 && this._filterStack[currentIndex].inputTexture ? this._filterStack[currentIndex].inputTexture.source._resolution : rootResolution;\n }\n /**\n * Finds the offset from the previous non-skipped filter in the stack.\n * @returns The offset coordinates from the previous filter\n */\n _findPreviousFilterOffset() {\n let offsetX = 0;\n let offsetY = 0;\n let lastIndex = this._filterStackIndex;\n while (lastIndex > 0) {\n lastIndex--;\n const prevFilterData = this._filterStack[lastIndex];\n if (!prevFilterData.skip) {\n offsetX = prevFilterData.bounds.minX;\n offsetY = prevFilterData.bounds.minY;\n break;\n }\n }\n return { x: offsetX, y: offsetY };\n }\n /**\n * Calculates the filter area bounds based on the instruction type.\n * @param instruction - The filter instruction\n * @param bounds - The bounds object to populate\n */\n _calculateFilterArea(instruction, bounds) {\n if (instruction.renderables) {\n getGlobalRenderableBounds(instruction.renderables, bounds);\n } else if (instruction.filterEffect.filterArea) {\n bounds.clear();\n bounds.addRect(instruction.filterEffect.filterArea);\n bounds.applyMatrix(instruction.container.worldTransform);\n } else {\n instruction.container.getFastGlobalBounds(true, bounds);\n }\n if (instruction.container) {\n const renderGroup = instruction.container.renderGroup || instruction.container.parentRenderGroup;\n const filterFrameTransform = renderGroup.cacheToLocalTransform;\n if (filterFrameTransform) {\n bounds.applyMatrix(filterFrameTransform);\n }\n }\n }\n _applyFiltersToTexture(filterData, clear) {\n const inputTexture = filterData.inputTexture;\n const bounds = filterData.bounds;\n const filters = filterData.filters;\n const firstEnabled = filterData.firstEnabledIndex;\n const lastEnabled = filterData.lastEnabledIndex;\n this._globalFilterBindGroup.setResource(inputTexture.source.style, 2);\n this._globalFilterBindGroup.setResource(filterData.backTexture.source, 3);\n if (firstEnabled === lastEnabled) {\n filters[firstEnabled].apply(this, inputTexture, filterData.outputRenderSurface, clear);\n } else {\n let flip = filterData.inputTexture;\n const tempTexture = TexturePool.getOptimalTexture(\n bounds.width,\n bounds.height,\n flip.source._resolution,\n false\n );\n let flop = tempTexture;\n for (let i = firstEnabled; i < lastEnabled; i++) {\n const filter = filters[i];\n if (!filter.enabled) continue;\n filter.apply(this, flip, flop, true);\n const t = flip;\n flip = flop;\n flop = t;\n }\n filters[lastEnabled].apply(this, flip, filterData.outputRenderSurface, clear);\n TexturePool.returnTexture(tempTexture);\n }\n }\n _calculateFilterBounds(filterData, viewPort, rootAntialias, rootResolution, paddingMultiplier) {\n const renderer = this.renderer;\n const bounds = filterData.bounds;\n const filters = filterData.filters;\n let resolution = Infinity;\n let padding = 0;\n let antialias = true;\n let blendRequired = false;\n let enabled = false;\n let clipToViewport = true;\n let firstEnabledIndex = -1;\n let lastEnabledIndex = -1;\n for (let i = 0; i < filters.length; i++) {\n const filter = filters[i];\n if (!filter.enabled) continue;\n if (firstEnabledIndex === -1) firstEnabledIndex = i;\n lastEnabledIndex = i;\n resolution = Math.min(resolution, filter.resolution === \"inherit\" ? rootResolution : filter.resolution);\n padding += filter.padding;\n if (filter.antialias === \"off\") {\n antialias = false;\n } else if (filter.antialias === \"inherit\") {\n antialias && (antialias = rootAntialias);\n }\n if (!filter.clipToViewport) {\n clipToViewport = false;\n }\n const isCompatible = !!(filter.compatibleRenderers & renderer.type);\n if (!isCompatible) {\n enabled = false;\n break;\n }\n if (filter.blendRequired && !(renderer.backBuffer?.useBackBuffer ?? true)) {\n warn(\"Blend filter requires backBuffer on WebGL renderer to be enabled. Set `useBackBuffer: true` in the renderer options.\");\n enabled = false;\n break;\n }\n enabled = true;\n blendRequired || (blendRequired = filter.blendRequired);\n }\n if (!enabled) {\n filterData.skip = true;\n return;\n }\n if (clipToViewport) {\n bounds.fitBounds(0, viewPort.width / rootResolution, 0, viewPort.height / rootResolution);\n }\n bounds.scale(resolution).ceil().scale(1 / resolution).pad((padding | 0) * paddingMultiplier);\n if (!bounds.isPositive) {\n filterData.skip = true;\n return;\n }\n filterData.antialias = antialias;\n filterData.resolution = resolution;\n filterData.blendRequired = blendRequired;\n filterData.firstEnabledIndex = firstEnabledIndex;\n filterData.lastEnabledIndex = lastEnabledIndex;\n }\n _popFilterData() {\n this._filterStackIndex--;\n return this._filterStack[this._filterStackIndex];\n }\n _getPreviousFilterData() {\n let previousFilterData;\n let index = this._filterStackIndex - 1;\n while (index > 0) {\n index--;\n previousFilterData = this._filterStack[index];\n if (!previousFilterData.skip) {\n break;\n }\n }\n return previousFilterData;\n }\n _pushFilterData() {\n let filterData = this._filterStack[this._filterStackIndex];\n if (!filterData) {\n filterData = this._filterStack[this._filterStackIndex] = new FilterData();\n }\n this._filterStackIndex++;\n return filterData;\n }\n}\n/** @ignore */\nFilterSystem.extension = {\n type: [\n ExtensionType.WebGLSystem,\n ExtensionType.WebGPUSystem\n ],\n name: \"filter\"\n};\n\nexport { FilterSystem };\n//# sourceMappingURL=FilterSystem.mjs.map\n","import { extensions } from '../extensions/Extensions.mjs';\nimport { FilterPipe } from './FilterPipe.mjs';\nimport { FilterSystem } from './FilterSystem.mjs';\n\n\"use strict\";\nextensions.add(FilterSystem);\nextensions.add(FilterPipe);\n//# sourceMappingURL=init.mjs.map\n"],"names":[],"mappings":";;AAAA,IAAI,SAAS;ACAb,IAAI,WAAW;ACAf,IAAI,SAAS;ACQb,MAAM,0BAA0B,OAAO;AAAA,EACrC,cAAc;AACZ,UAAM,aAAa,WAAW,KAAK;AAAA,MACjC,QAAQ,EAAE,QAAQ,YAAY,aAAY;AAAA,MAC1C,UAAU,EAAE,QAAQ,YAAY,eAAc;AAAA,MAC9C,MAAM;AAAA,IACZ,CAAK;AACD,UAAM,YAAY,UAAU,KAAK;AAAA,MAC/B;AAAA,MACA;AAAA,MACA,MAAM;AAAA,IACZ,CAAK;AACD,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,IACN,CAAK;AAAA,EACH;AACF;ACtBA,MAAM,WAAW;AAAA,EACf,YAAY,UAAU;AACpB,SAAK,YAAY;AAAA,EACnB;AAAA,EACA,KAAK,cAAc,WAAW,gBAAgB;AAC5C,UAAM,cAAc,KAAK,UAAU;AACnC,gBAAY,MAAM,MAAM,cAAc;AACtC,mBAAe,IAAI;AAAA,MACjB,cAAc;AAAA,MACd,WAAW;AAAA,MACX,QAAQ;AAAA,MACR;AAAA,MACA;AAAA,IACN,CAAK;AAAA,EACH;AAAA,EACA,IAAI,eAAe,YAAY,gBAAgB;AAC7C,SAAK,UAAU,YAAY,MAAM,MAAM,cAAc;AACrD,mBAAe,IAAI;AAAA,MACjB,cAAc;AAAA,MACd,QAAQ;AAAA,MACR,WAAW;AAAA,IACjB,CAAK;AAAA,EACH;AAAA,EACA,QAAQ,aAAa;AACnB,QAAI,YAAY,WAAW,cAAc;AACvC,WAAK,UAAU,OAAO,KAAK,WAAW;AAAA,IACxC,WAAW,YAAY,WAAW,aAAa;AAC7C,WAAK,UAAU,OAAO,IAAG;AAAA,IAC3B;AAAA,EACF;AAAA,EACA,UAAU;AACR,SAAK,YAAY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AACf,mBAAa,KAAK,aAAa,KAAK,iBAAiB,IAAI,IAAI,WAAU;AAAA,IACzE;AACA,SAAK;AACL,WAAO;AAAA,EACT;AACF;AAEA,aAAa,YAAY;AAAA,EACvB,MAAM;AAAA,IACJ,cAAc;AAAA,IACd,cAAc;AAAA,EAClB;AAAA,EACE,MAAM;AACR;AChnBA,WAAW,IAAI,YAAY;AAC3B,WAAW,IAAI,UAAU;","x_google_ignoreList":[0,1,2,3,4,5,6,7]}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CollectionMapPanel - Visualize Alexandria Collections as overworld maps
|
|
3
|
+
*/
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import type { PanelComponentProps } from '../types';
|
|
6
|
+
/**
|
|
7
|
+
* Alexandria Collections types (from @principal-ai/alexandria-collections)
|
|
8
|
+
*/
|
|
9
|
+
export interface Collection {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
theme?: string;
|
|
14
|
+
icon?: string;
|
|
15
|
+
isDefault?: boolean;
|
|
16
|
+
createdAt: number;
|
|
17
|
+
updatedAt: number;
|
|
18
|
+
metadata?: Record<string, unknown>;
|
|
19
|
+
}
|
|
20
|
+
export interface AlexandriaRepository {
|
|
21
|
+
name: string;
|
|
22
|
+
registeredAt: string;
|
|
23
|
+
provider?: {
|
|
24
|
+
type: 'github' | 'gitlab' | 'bitbucket' | 'generic';
|
|
25
|
+
metadata?: any;
|
|
26
|
+
url?: string;
|
|
27
|
+
};
|
|
28
|
+
lastChecked?: string;
|
|
29
|
+
theme?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface CollectionMembership {
|
|
32
|
+
repositoryId: string;
|
|
33
|
+
collectionId: string;
|
|
34
|
+
addedAt: number;
|
|
35
|
+
metadata?: {
|
|
36
|
+
pinned?: boolean;
|
|
37
|
+
notes?: string;
|
|
38
|
+
[key: string]: unknown;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export interface CollectionMapPanelProps {
|
|
42
|
+
/** The collection to visualize as an overworld map */
|
|
43
|
+
collection: Collection;
|
|
44
|
+
/** Repositories in this collection */
|
|
45
|
+
memberships: CollectionMembership[];
|
|
46
|
+
/** Full repository data */
|
|
47
|
+
repositories: AlexandriaRepository[];
|
|
48
|
+
/** Optional dependency graph for connections between repos */
|
|
49
|
+
dependencies?: Record<string, string[]>;
|
|
50
|
+
/** Panel width */
|
|
51
|
+
width?: number;
|
|
52
|
+
/** Panel height */
|
|
53
|
+
height?: number;
|
|
54
|
+
/** Loading state */
|
|
55
|
+
isLoading?: boolean;
|
|
56
|
+
/** Callback when a project is moved (for saving position) */
|
|
57
|
+
onProjectMoved?: (projectId: string, gridX: number, gridY: number) => void;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* CollectionMapPanelContent Component
|
|
61
|
+
* Converts Alexandria Collections to overworld map visualization
|
|
62
|
+
*/
|
|
63
|
+
export declare const CollectionMapPanelContent: React.FC<CollectionMapPanelProps>;
|
|
64
|
+
/**
|
|
65
|
+
* Main panel component that integrates with the panel framework
|
|
66
|
+
*/
|
|
67
|
+
export declare const CollectionMapPanel: React.FC<PanelComponentProps>;
|
|
68
|
+
//# sourceMappingURL=CollectionMapPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CollectionMapPanel.d.ts","sourceRoot":"","sources":["../../src/panels/CollectionMapPanel.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAGpD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;I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C,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5E;AAED;;;GAGG;AACH,eAAO,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAiFvE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAqD5D,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* GitProjectsMapPanel - Visualize multiple git projects as regions on an overworld map
|
|
3
|
+
*/
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import type { PanelComponentProps } from '../types';
|
|
6
|
+
/**
|
|
7
|
+
* Represents a git project/repository
|
|
8
|
+
*/
|
|
9
|
+
export interface GitProject {
|
|
10
|
+
/** Unique identifier (e.g., repo name or path) */
|
|
11
|
+
id: string;
|
|
12
|
+
/** Display name */
|
|
13
|
+
name: string;
|
|
14
|
+
/** Path to the git repository */
|
|
15
|
+
path: string;
|
|
16
|
+
/** Category/type of project (e.g., 'frontend', 'backend', 'tool') */
|
|
17
|
+
category?: string;
|
|
18
|
+
/** Importance level 0-100 (affects visual size) */
|
|
19
|
+
importance?: number;
|
|
20
|
+
/** Other projects this one depends on (by id) */
|
|
21
|
+
dependencies?: string[];
|
|
22
|
+
/** Is this a root/primary project? */
|
|
23
|
+
isRoot?: boolean;
|
|
24
|
+
/** Is this a monorepo containing multiple packages? */
|
|
25
|
+
isMonorepo?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface GitProjectsMapPanelProps {
|
|
28
|
+
/** Git projects to visualize */
|
|
29
|
+
projects: GitProject[];
|
|
30
|
+
/** Panel width */
|
|
31
|
+
width?: number;
|
|
32
|
+
/** Panel height */
|
|
33
|
+
height?: number;
|
|
34
|
+
/** Loading state */
|
|
35
|
+
isLoading?: boolean;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* GitProjectsMapPanelContent Component
|
|
39
|
+
* Renders multiple git projects as regions on an overworld map
|
|
40
|
+
*/
|
|
41
|
+
export declare const GitProjectsMapPanelContent: React.FC<GitProjectsMapPanelProps>;
|
|
42
|
+
/**
|
|
43
|
+
* Preview component for panel selection UI
|
|
44
|
+
*/
|
|
45
|
+
export declare const GitProjectsMapPanelPreview: React.FC;
|
|
46
|
+
/**
|
|
47
|
+
* Main panel component that integrates with the panel framework
|
|
48
|
+
*/
|
|
49
|
+
export declare const GitProjectsMapPanel: React.FC<PanelComponentProps>;
|
|
50
|
+
//# sourceMappingURL=GitProjectsMapPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GitProjectsMapPanel.d.ts","sourceRoot":"","sources":["../../src/panels/GitProjectsMapPanel.tsx"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAIpD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,kDAAkD;IAClD,EAAE,EAAE,MAAM,CAAC;IAEX,mBAAmB;IACnB,IAAI,EAAE,MAAM,CAAC;IAEb,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAC;IAEb,qEAAqE;IACrE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,mDAAmD;IACnD,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,iDAAiD;IACjD,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IAExB,sCAAsC;IACtC,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB,uDAAuD;IACvD,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,wBAAwB;IACvC,gCAAgC;IAChC,QAAQ,EAAE,UAAU,EAAE,CAAC;IAEvB,kBAAkB;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,mBAAmB;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,oBAAoB;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;GAGG;AACH,eAAO,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CA+DzE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAkB9C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAwI7D,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OverworldMapPanel - 8-bit Mario-style overworld map for package dependencies
|
|
3
|
+
*/
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import type { PackageLayer } from '../../types/composition';
|
|
6
|
+
import type { PanelComponentProps } from '../../types';
|
|
7
|
+
export interface OverworldMapPanelProps {
|
|
8
|
+
/** Package data from the repository */
|
|
9
|
+
packages: PackageLayer[];
|
|
10
|
+
/** Include dev dependencies in the map */
|
|
11
|
+
includeDevDependencies?: boolean;
|
|
12
|
+
/** Include peer dependencies in the map */
|
|
13
|
+
includePeerDependencies?: boolean;
|
|
14
|
+
/** Panel width */
|
|
15
|
+
width?: number;
|
|
16
|
+
/** Panel height */
|
|
17
|
+
height?: number;
|
|
18
|
+
/** Loading state */
|
|
19
|
+
isLoading?: boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* OverworldMapPanelContent Component
|
|
23
|
+
* Renders package dependencies as an 8-bit isometric overworld map
|
|
24
|
+
*/
|
|
25
|
+
export declare const OverworldMapPanelContent: React.FC<OverworldMapPanelProps>;
|
|
26
|
+
/**
|
|
27
|
+
* Preview component for panel selection UI
|
|
28
|
+
*/
|
|
29
|
+
export declare const OverworldMapPanelPreview: React.FC;
|
|
30
|
+
/**
|
|
31
|
+
* Main panel component that integrates with the panel framework
|
|
32
|
+
* Extracts packages from context and passes to content component
|
|
33
|
+
*/
|
|
34
|
+
export declare const OverworldMapPanel: React.FC<PanelComponentProps>;
|
|
35
|
+
//# 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;AAGpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAE5D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAMvD,MAAM,WAAW,sBAAsB;IACrC,uCAAuC;IACvC,QAAQ,EAAE,YAAY,EAAE,CAAC;IAEzB,0CAA0C;IAC1C,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC,2CAA2C;IAC3C,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAElC,kBAAkB;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,mBAAmB;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,oBAAoB;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CA6uBrE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAkB5C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAe3D,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts PackageLayer data from dependency graph into OverworldMap format
|
|
3
|
+
* This is a specialized implementation using the generic mapper
|
|
4
|
+
*/
|
|
5
|
+
import type { PackageLayer } from '../../types/composition';
|
|
6
|
+
import type { OverworldMap, OverworldMapCollection } from './types';
|
|
7
|
+
export interface OverworldMapOptions {
|
|
8
|
+
includeDevDependencies?: boolean;
|
|
9
|
+
includePeerDependencies?: boolean;
|
|
10
|
+
mapPadding?: number;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Convert PackageLayer array to OverworldMap
|
|
14
|
+
* This is a convenience wrapper around the generic mapper
|
|
15
|
+
*/
|
|
16
|
+
export declare function packagesToOverworldMap(packages: PackageLayer[], options?: OverworldMapOptions): OverworldMap;
|
|
17
|
+
/**
|
|
18
|
+
* Convert PackageLayer array to unified OverworldMap with regions
|
|
19
|
+
* Creates one continuous scrollable map (recommended)
|
|
20
|
+
*/
|
|
21
|
+
export declare function packagesToUnifiedOverworldMap(packages: PackageLayer[], options?: OverworldMapOptions): OverworldMap;
|
|
22
|
+
/**
|
|
23
|
+
* Convert PackageLayer array to OverworldMapCollection
|
|
24
|
+
* @deprecated Use packagesToUnifiedOverworldMap instead for better UX
|
|
25
|
+
* Automatically splits into multiple maps if too many packages
|
|
26
|
+
*/
|
|
27
|
+
export declare function packagesToOverworldMapCollection(packages: PackageLayer[], options?: OverworldMapOptions): OverworldMapCollection;
|
|
28
|
+
//# sourceMappingURL=dataConverter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dataConverter.d.ts","sourceRoot":"","sources":["../../../src/panels/overworld-map/dataConverter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EACV,YAAY,EACZ,sBAAsB,EAOvB,MAAM,SAAS,CAAC;AAUjB,MAAM,WAAW,mBAAmB;IAClC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AA2DD;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,YAAY,EAAE,EACxB,OAAO,GAAE,mBAAwB,GAChC,YAAY,CAwBd;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,YAAY,EAAE,EACxB,OAAO,GAAE,mBAAwB,GAChC,YAAY,CAwBd;AAED;;;;GAIG;AACH,wBAAgB,gCAAgC,CAC9C,QAAQ,EAAE,YAAY,EAAE,EACxB,OAAO,GAAE,mBAAwB,GAChC,sBAAsB,CA6BxB"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generic mapper for converting any node/edge data to OverworldMap format
|
|
3
|
+
* Use this to create maps for repos, services, or any connected entities
|
|
4
|
+
*/
|
|
5
|
+
import type { OverworldMap, OverworldMapCollection, BiomeTheme, LocationNodeType } from './types';
|
|
6
|
+
/**
|
|
7
|
+
* Generic node - represents any entity (package, repo, service, etc.)
|
|
8
|
+
*/
|
|
9
|
+
export interface GenericNode {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
isRoot?: boolean;
|
|
13
|
+
category?: string;
|
|
14
|
+
importance?: number;
|
|
15
|
+
dependencies?: string[];
|
|
16
|
+
devDependencies?: string[];
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Options for generic mapping
|
|
20
|
+
*/
|
|
21
|
+
export interface GenericMapperOptions {
|
|
22
|
+
includeDevDependencies?: boolean;
|
|
23
|
+
mapPadding?: number;
|
|
24
|
+
getCategoryTheme?: (category: string) => BiomeTheme;
|
|
25
|
+
getNodeType?: (node: GenericNode) => LocationNodeType;
|
|
26
|
+
getNodeColor?: (node: GenericNode) => string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Convert generic nodes to a single OverworldMap
|
|
30
|
+
*/
|
|
31
|
+
export declare function nodesToOverworldMap(nodes: GenericNode[], options?: GenericMapperOptions): OverworldMap;
|
|
32
|
+
/**
|
|
33
|
+
* Convert generic nodes to unified OverworldMap with regions
|
|
34
|
+
* Creates one continuous map with spatially separated regions
|
|
35
|
+
*/
|
|
36
|
+
export declare function nodesToUnifiedOverworldMap(nodes: GenericNode[], options?: GenericMapperOptions): OverworldMap;
|
|
37
|
+
/**
|
|
38
|
+
* Convert generic nodes to OverworldMapCollection
|
|
39
|
+
* @deprecated Use nodesToUnifiedOverworldMap instead for better UX
|
|
40
|
+
* Automatically splits into multiple maps if too many nodes
|
|
41
|
+
*/
|
|
42
|
+
export declare function nodesToOverworldMapCollection(nodes: GenericNode[], options?: GenericMapperOptions): OverworldMapCollection;
|
|
43
|
+
//# sourceMappingURL=genericMapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"genericMapper.d.ts","sourceRoot":"","sources":["../../../src/panels/overworld-map/genericMapper.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,sBAAsB,EAItB,UAAU,EACV,gBAAgB,EAGjB,MAAM,SAAS,CAAC;AAGjB;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;IAGjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IAGpB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IAGpB,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,UAAU,CAAC;IACpD,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,gBAAgB,CAAC;IACtD,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,MAAM,CAAC;CAC9C;AAyND;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,WAAW,EAAE,EACpB,OAAO,GAAE,oBAAyB,GACjC,YAAY,CAgLd;AAiDD;;;GAGG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,WAAW,EAAE,EACpB,OAAO,GAAE,oBAAyB,GACjC,YAAY,CA0Fd;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAC3C,KAAK,EAAE,WAAW,EAAE,EACpB,OAAO,GAAE,oBAAyB,GACjC,sBAAsB,CAgCxB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Overworld Map Panel - 8-bit dependency visualization
|
|
3
|
+
*/
|
|
4
|
+
export { OverworldMapPanel, OverworldMapPanelContent, OverworldMapPanelPreview, } from './OverworldMapPanel';
|
|
5
|
+
export type { OverworldMapPanelProps } from './OverworldMapPanel';
|
|
6
|
+
export type { OverworldMap, OverworldMapCollection, MapRegion, LocationNode, PathConnection, Tile, BiomeTheme, LocationNodeType, Camera, GridPoint, } from './types';
|
|
7
|
+
export { MAX_NODES_PER_MAP, MAP_TRANSITION_THRESHOLD } from './types';
|
|
8
|
+
export { gridToScreen, screenToGrid, getIsometricZIndex, ISO_TILE_WIDTH, ISO_TILE_HEIGHT, } from './isometricUtils';
|
|
9
|
+
export { packagesToOverworldMap, packagesToUnifiedOverworldMap, packagesToOverworldMapCollection, } from './dataConverter';
|
|
10
|
+
export type { OverworldMapOptions } from './dataConverter';
|
|
11
|
+
export { nodesToOverworldMap, nodesToUnifiedOverworldMap, nodesToOverworldMapCollection, } from './genericMapper';
|
|
12
|
+
export type { GenericNode, GenericMapperOptions, } from './genericMapper';
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/panels/overworld-map/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,iBAAiB,EACjB,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAGlE,YAAY,EACV,YAAY,EACZ,sBAAsB,EACtB,SAAS,EACT,YAAY,EACZ,cAAc,EACd,IAAI,EACJ,UAAU,EACV,gBAAgB,EAChB,MAAM,EACN,SAAS,GACV,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAGtE,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,gCAAgC,GACjC,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAG3D,OAAO,EACL,mBAAmB,EACnB,0BAA0B,EAC1B,6BAA6B,GAC9B,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,WAAW,EACX,oBAAoB,GACrB,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Isometric rendering utilities for converting between grid and screen coordinates
|
|
3
|
+
*/
|
|
4
|
+
import { type GridPoint, type IsometricCoords } from './types';
|
|
5
|
+
export { TILE_SIZE } from './types';
|
|
6
|
+
/**
|
|
7
|
+
* Isometric tile dimensions
|
|
8
|
+
* For 32x32 logical tiles, we use a 2:1 ratio diamond
|
|
9
|
+
*/
|
|
10
|
+
export declare const ISO_TILE_WIDTH: number;
|
|
11
|
+
export declare const ISO_TILE_HEIGHT = 32;
|
|
12
|
+
/**
|
|
13
|
+
* Convert grid coordinates to isometric screen coordinates
|
|
14
|
+
* @param gridX Grid X position
|
|
15
|
+
* @param gridY Grid Y position
|
|
16
|
+
* @returns Screen coordinates {screenX, screenY}
|
|
17
|
+
*/
|
|
18
|
+
export declare function gridToScreen(gridX: number, gridY: number): IsometricCoords;
|
|
19
|
+
/**
|
|
20
|
+
* Convert screen coordinates back to grid coordinates
|
|
21
|
+
* @param screenX Screen X position
|
|
22
|
+
* @param screenY Screen Y position
|
|
23
|
+
* @returns Grid coordinates {gridX, gridY}
|
|
24
|
+
*/
|
|
25
|
+
export declare function screenToGrid(screenX: number, screenY: number): GridPoint;
|
|
26
|
+
/**
|
|
27
|
+
* Get the bounding box for an isometric tile
|
|
28
|
+
* @param gridX Grid X position
|
|
29
|
+
* @param gridY Grid Y position
|
|
30
|
+
* @returns Corner points of the diamond in screen space
|
|
31
|
+
*/
|
|
32
|
+
export declare function getTileBounds(gridX: number, gridY: number): {
|
|
33
|
+
top: {
|
|
34
|
+
x: number;
|
|
35
|
+
y: number;
|
|
36
|
+
};
|
|
37
|
+
right: {
|
|
38
|
+
x: number;
|
|
39
|
+
y: number;
|
|
40
|
+
};
|
|
41
|
+
bottom: {
|
|
42
|
+
x: number;
|
|
43
|
+
y: number;
|
|
44
|
+
};
|
|
45
|
+
left: {
|
|
46
|
+
x: number;
|
|
47
|
+
y: number;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Calculate the correct render order (z-index) for isometric tiles
|
|
52
|
+
* Tiles further "back" (higher Y + higher X) should render first
|
|
53
|
+
* @param gridX Grid X position
|
|
54
|
+
* @param gridY Grid Y position
|
|
55
|
+
* @returns Z-index value
|
|
56
|
+
*/
|
|
57
|
+
export declare function getIsometricZIndex(gridX: number, gridY: number): number;
|
|
58
|
+
/**
|
|
59
|
+
* Get the center point of a tile in screen coordinates
|
|
60
|
+
* @param gridX Grid X position
|
|
61
|
+
* @param gridY Grid Y position
|
|
62
|
+
* @returns Center point in screen space
|
|
63
|
+
*/
|
|
64
|
+
export declare function getTileCenter(gridX: number, gridY: number): IsometricCoords;
|
|
65
|
+
/**
|
|
66
|
+
* Check if a point in screen space is inside an isometric tile
|
|
67
|
+
* @param screenX Screen X coordinate to test
|
|
68
|
+
* @param screenY Screen Y coordinate to test
|
|
69
|
+
* @param gridX Grid X of tile
|
|
70
|
+
* @param gridY Grid Y of tile
|
|
71
|
+
* @returns true if point is inside the diamond
|
|
72
|
+
*/
|
|
73
|
+
export declare function isPointInTile(screenX: number, screenY: number, gridX: number, gridY: number): boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Create a path between two grid points for drawing connections
|
|
76
|
+
* Uses simple straight line for now, can be enhanced with pathfinding
|
|
77
|
+
* @param from Starting grid point
|
|
78
|
+
* @param to Ending grid point
|
|
79
|
+
* @param segments Number of segments (for smooth curves)
|
|
80
|
+
* @returns Array of screen coordinates
|
|
81
|
+
*/
|
|
82
|
+
export declare function createIsometricPath(from: GridPoint, to: GridPoint, segments?: number): IsometricCoords[];
|
|
83
|
+
/**
|
|
84
|
+
* Calculate the optimal map dimensions to fit all nodes
|
|
85
|
+
* Adds padding around the edges
|
|
86
|
+
* @param nodes Array of grid points
|
|
87
|
+
* @param padding Padding in tiles
|
|
88
|
+
* @returns Map dimensions {width, height}
|
|
89
|
+
*/
|
|
90
|
+
export declare function calculateMapBounds(nodes: GridPoint[], padding?: number): {
|
|
91
|
+
width: number;
|
|
92
|
+
height: number;
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* Offset all grid positions by a delta (useful for centering)
|
|
96
|
+
* @param nodes Array of grid points
|
|
97
|
+
* @param deltaX X offset
|
|
98
|
+
* @param deltaY Y offset
|
|
99
|
+
* @returns New array with offset positions
|
|
100
|
+
*/
|
|
101
|
+
export declare function offsetGridPositions(nodes: GridPoint[], deltaX: number, deltaY: number): GridPoint[];
|
|
102
|
+
//# sourceMappingURL=isometricUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isometricUtils.d.ts","sourceRoot":"","sources":["../../../src/panels/overworld-map/isometricUtils.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAa,KAAK,SAAS,EAAE,KAAK,eAAe,EAAE,MAAM,SAAS,CAAC;A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,GACb,SAAS,EAAE,CAKb"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Procedural pixel art sprite generator for placeholder graphics
|
|
3
|
+
* Creates simple isometric tiles and buildings using Canvas API
|
|
4
|
+
*/
|
|
5
|
+
import type { BiomeTheme, LocationNodeType } from './types';
|
|
6
|
+
/**
|
|
7
|
+
* Color palettes for different biomes (NES-style limited colors)
|
|
8
|
+
*/
|
|
9
|
+
export declare const BIOME_COLORS: Record<BiomeTheme, {
|
|
10
|
+
primary: string;
|
|
11
|
+
secondary: string;
|
|
12
|
+
accent: string;
|
|
13
|
+
}>;
|
|
14
|
+
/**
|
|
15
|
+
* Generate an isometric grass tile
|
|
16
|
+
*/
|
|
17
|
+
export declare function generateGrassTile(theme?: BiomeTheme): HTMLCanvasElement;
|
|
18
|
+
/**
|
|
19
|
+
* Generate an isometric path tile
|
|
20
|
+
*/
|
|
21
|
+
export declare function generatePathTile(): HTMLCanvasElement;
|
|
22
|
+
/**
|
|
23
|
+
* Generate a simple isometric building/location sprite
|
|
24
|
+
*/
|
|
25
|
+
export declare function generateLocationSprite(type: LocationNodeType, theme: BiomeTheme, size?: number): HTMLCanvasElement;
|
|
26
|
+
/**
|
|
27
|
+
* Generate a decorative sprite (cloud, tree, etc.)
|
|
28
|
+
*/
|
|
29
|
+
export declare function generateDecorativeSprite(type: 'cloud' | 'tree' | 'bush' | 'rock'): HTMLCanvasElement;
|
|
30
|
+
/**
|
|
31
|
+
* Generate a complete sprite atlas from all tile types
|
|
32
|
+
* Returns a texture map for PixiJS
|
|
33
|
+
*/
|
|
34
|
+
export declare function generateSpriteAtlas(): Record<string, HTMLCanvasElement>;
|
|
35
|
+
//# sourceMappingURL=spriteGenerator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spriteGenerator.d.ts","sourceRoot":"","sources":["../../../src/panels/overworld-map/spriteGenerator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAY,MAAM,SAAS,CAAC;AAEtE;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,UAAU,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CA0BnG,CAAC;AAYF;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,GAAE,UAAoB,GAAG,iBAAiB,CAsBhF;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,iBAAiB,CAqBpD;AAyBD;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,gBAAgB,EACtB,KAAK,EAAE,UAAU,EACjB,IAAI,GAAE,MAAU,GACf,iBAAiB,CAkTnB;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,iBAAiB,CAwCpG;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CA6BvE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-setup.d.ts","sourceRoot":"","sources":["../../../src/panels/overworld-map/test-setup.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|