@vanduo-oss/vd3-cbun 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/LICENSE +22 -0
  3. package/README.md +160 -0
  4. package/SKILL.md +119 -0
  5. package/dist/charts/core.d.ts +273 -0
  6. package/dist/charts/index.cjs +1828 -0
  7. package/dist/charts/index.cjs.map +7 -0
  8. package/dist/charts/index.d.ts +65 -0
  9. package/dist/charts/index.js +1805 -0
  10. package/dist/charts/index.js.map +7 -0
  11. package/dist/charts/vd3-charts.css +51 -0
  12. package/dist/charts/vue.d.ts +86 -0
  13. package/dist/flowchart/core.d.ts +288 -0
  14. package/dist/flowchart/index.cjs +3447 -0
  15. package/dist/flowchart/index.cjs.map +7 -0
  16. package/dist/flowchart/index.d.ts +54 -0
  17. package/dist/flowchart/index.js +3424 -0
  18. package/dist/flowchart/index.js.map +7 -0
  19. package/dist/flowchart/vd3-flowchart.css +600 -0
  20. package/dist/flowchart/vue.d.ts +66 -0
  21. package/dist/hex-grid/core.d.ts +200 -0
  22. package/dist/hex-grid/hex-math.cjs +162 -0
  23. package/dist/hex-grid/hex-math.cjs.map +7 -0
  24. package/dist/hex-grid/hex-math.d.ts +119 -0
  25. package/dist/hex-grid/hex-math.js +141 -0
  26. package/dist/hex-grid/hex-math.js.map +7 -0
  27. package/dist/hex-grid/index.cjs +915 -0
  28. package/dist/hex-grid/index.cjs.map +7 -0
  29. package/dist/hex-grid/index.d.ts +15 -0
  30. package/dist/hex-grid/index.js +894 -0
  31. package/dist/hex-grid/index.js.map +7 -0
  32. package/dist/hex-grid/vue.d.ts +14 -0
  33. package/dist/index.d.ts +13 -0
  34. package/dist/index.js +11 -0
  35. package/dist/index.js.map +7 -0
  36. package/dist/meta.json +551 -0
  37. package/dist/music-player/core.d.ts +88 -0
  38. package/dist/music-player/index.cjs +1227 -0
  39. package/dist/music-player/index.cjs.map +7 -0
  40. package/dist/music-player/index.d.ts +12 -0
  41. package/dist/music-player/index.js +1204 -0
  42. package/dist/music-player/index.js.map +7 -0
  43. package/dist/music-player/vd3-music-player.css +829 -0
  44. package/dist/music-player/vue.d.ts +32 -0
  45. package/package.json +105 -0
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/hex-grid/vue.js", "../../src/hex-grid/hex-math.js", "../../src/hex-grid/core.js"],
4
+ "sourcesContent": ["/**\n * Vue 3 bindings for the hex-grid component of @vanduo-oss/vd3-cbun.\n *\n * import { VdHexGrid } from '@vanduo-oss/vd3-cbun/hex-grid';\n * <VdHexGrid :size=\"30\" :width=\"15\" :height=\"10\" @select=\"onSelect\" />\n *\n * The canvas core stays framework-agnostic. SSR-safe: the canvas grid\n * is created on mount (client) into a plain container the server can pre-render.\n */\nimport { defineComponent, h, ref, onMounted, onBeforeUnmount, watch } from 'vue';\nimport { VdHexGrid as VdHexGridCore } from './core.js';\n\nconst FORWARDED_EVENTS = ['select', 'zoom', 'pan'];\n\nexport const VdHexGrid = defineComponent({\n name: 'VdHexGrid',\n props: {\n /** Hexagon size (px). */\n size: { type: Number, default: 30 },\n /** Grid columns (number of hexes). */\n width: { type: Number, default: 10 },\n /** Grid rows (number of hexes). */\n height: { type: Number, default: 10 },\n /** Grid rotation (radians). */\n rotation: { type: Number, default: 0 },\n },\n emits: ['select', 'zoom', 'pan', 'ready'],\n setup(props, { emit, expose }) {\n const el = ref(null);\n let instance = null;\n\n const create = () => {\n instance = new VdHexGridCore({\n element: el.value,\n size: props.size,\n width: props.width,\n height: props.height,\n rotation: props.rotation,\n });\n FORWARDED_EVENTS.forEach((name) => {\n instance.on(name, (data) => emit(name, data));\n });\n emit('ready', instance);\n };\n\n onMounted(() => {\n if (typeof window === 'undefined' || !el.value) return;\n create();\n });\n\n // Drive prop changes through the instance setters (no recreate needed).\n watch(\n () => props.size,\n (v) => instance && instance.setSize(v),\n );\n watch(\n () => [props.width, props.height],\n ([w, hgt]) => instance && instance.setDimensions(w, hgt),\n );\n watch(\n () => props.rotation,\n (v) => instance && instance.setRotation(v),\n );\n\n onBeforeUnmount(() => {\n if (instance) {\n instance.destroy();\n instance = null;\n }\n });\n\n expose({ getInstance: () => instance });\n\n return () =>\n h('div', { ref: el, class: 'vd-hex-grid', style: { width: '100%', height: '100%' } }, [\n h('canvas', { style: { width: '100%', height: '100%', display: 'block', cursor: 'grab' } }),\n ]);\n },\n});\n", "// Hex math utilities adapted for Vanduo framework\n// Based on web-civ utils/hex-math.js\n\n/**\n * Rotate a point around the origin\n * @param {number} x - X coordinate\n * @param {number} y - Y coordinate\n * @param {number} [rotation=0] - Rotation in radians\n * @returns {{x: number, y: number}} Rotated point\n */\nexport function rotatePoint(x, y, rotation = 0) {\n if (!rotation) {\n return { x, y };\n }\n\n const cosRot = Math.cos(rotation);\n const sinRot = Math.sin(rotation);\n\n return {\n x: x * cosRot - y * sinRot,\n y: x * sinRot + y * cosRot,\n };\n}\n\n/**\n * Apply the inverse of a rotation to a point\n * @param {number} x - X coordinate\n * @param {number} y - Y coordinate\n * @param {number} [rotation=0] - Rotation in radians\n * @returns {{x: number, y: number}} Unrotated point\n */\nexport function unrotatePoint(x, y, rotation = 0) {\n return rotatePoint(x, y, -rotation);\n}\n\n/**\n * Convert hex axial coordinates to pixel coordinates (flat-top orientation)\n * @param {number} q - Hex column coordinate\n * @param {number} r - Hex row coordinate\n * @param {number} size - Hex radius\n * @param {number} [rotation=0] - Optional grid rotation in radians\n * @returns {{x: number, y: number}} Pixel coordinates\n */\nexport function hexToPixel(q, r, size, rotation = 0) {\n const baseX = size * 1.5 * q;\n const baseY = size * Math.sqrt(3) * (r + q * 0.5);\n return rotatePoint(baseX, baseY, rotation);\n}\n\n/**\n * Convert pixel coordinates to hex axial coordinates (flat-top orientation)\n * @param {number} px - Pixel X coordinate\n * @param {number} py - Pixel Y coordinate\n * @param {number} size - Hex radius\n * @param {number} [rotation=0] - Optional grid rotation in radians\n * @returns {{q: number, r: number}} Hex coordinates (rounded)\n */\nexport function pixelToHex(px, py, size, rotation = 0) {\n const point = unrotatePoint(px, py, rotation);\n const q = ((2 / 3) * point.x) / size;\n const r = ((-1 / 3) * point.x + (Math.sqrt(3) / 3) * point.y) / size;\n return axialRound(q, r);\n}\n\n/**\n * Round fractional axial coordinates to nearest hex\n * @param {number} q - Fractional q coordinate\n * @param {number} r - Fractional r coordinate\n * @returns {{q: number, r: number}} Rounded hex coordinates\n */\nexport function axialRound(q, r) {\n const s = -q - r;\n let rq = Math.round(q);\n let rr = Math.round(r);\n const rs = Math.round(s);\n const qDiff = Math.abs(rq - q);\n const rDiff = Math.abs(rr - r);\n const sDiff = Math.abs(rs - s);\n if (qDiff > rDiff && qDiff > sDiff) {\n rq = -rr - rs;\n } else if (rDiff > sDiff) {\n rr = -rq - rs;\n }\n return { q: rq, r: rr };\n}\n\n/**\n * Get the 6 corner points of a flat-top hexagon\n * @param {number} x - Center X coordinate\n * @param {number} y - Center Y coordinate\n * @param {number} size - Hex radius\n * @param {number} [rotation=0] - Optional hex rotation in radians\n * @returns {Array<{x: number, y: number}>} Array of 6 corner points\n */\nexport function getHexCorners(x, y, size, rotation = 0) {\n const corners = [];\n for (let i = 0; i < 6; i++) {\n const angleRad = (Math.PI / 180) * (60 * i) + rotation;\n corners.push({\n x: x + size * Math.cos(angleRad),\n y: y + size * Math.sin(angleRad),\n });\n }\n return corners;\n}\n\n/**\n * Get the 6 adjacent hex coordinates from a given hex\n * @param {number} q - Hex column\n * @param {number} r - Hex row\n * @returns {Array<{q: number, r: number}>} Array of 6 adjacent hex coordinates\n */\nexport function getAdjacentHexes(q, r) {\n return [\n { q: q + 1, r: r },\n { q: q + 1, r: r - 1 },\n { q: q, r: r - 1 },\n { q: q - 1, r: r },\n { q: q - 1, r: r + 1 },\n { q: q, r: r + 1 },\n ];\n}\n\n/**\n * Calculate distance between two hexes using axial coordinates\n * @param {number} q1 - First hex q coordinate\n * @param {number} r1 - First hex r coordinate\n * @param {number} q2 - Second hex q coordinate\n * @param {number} r2 - Second hex r coordinate\n * @returns {number} Distance in hex steps\n */\nexport function hexDistance(q1, r1, q2, r2) {\n return (Math.abs(q1 - q2) + Math.abs(q1 + r1 - q2 - r2) + Math.abs(r1 - r2)) / 2;\n}\n\n/**\n * Terrain types available in the system\n */\nexport const TerrainType = Object.freeze({\n GRASSLAND: 'Grassland',\n PLAINS: 'Plains',\n DESERT: 'Desert',\n TUNDRA: 'Tundra',\n SNOW: 'Snow',\n MOUNTAIN: 'Mountain',\n OCEAN: 'Ocean',\n COAST: 'Coast',\n});\n\n/**\n * Terrain colors for rendering\n */\nexport const TERRAIN_COLORS = Object.freeze({\n [TerrainType.GRASSLAND]: '#47602f',\n [TerrainType.PLAINS]: '#6e6838',\n [TerrainType.DESERT]: '#bd9a60',\n [TerrainType.TUNDRA]: '#75787b',\n [TerrainType.SNOW]: '#cfdce4',\n [TerrainType.MOUNTAIN]: '#464543',\n [TerrainType.OCEAN]: '#1d354c',\n [TerrainType.COAST]: '#295170',\n});\n\n/**\n * Default terrain color for unknown types\n */\nexport const DEFAULT_TERRAIN_COLOR = '#FF00FF';\n\n/**\n * Terrain yields - resources generated per turn from each terrain type\n */\nexport const TERRAIN_YIELDS = Object.freeze({\n [TerrainType.GRASSLAND]: { food: 2, production: 0, gold: 0 },\n [TerrainType.PLAINS]: { food: 1, production: 1, gold: 0 },\n [TerrainType.DESERT]: { food: 0, production: 1, gold: 0 },\n [TerrainType.TUNDRA]: { food: 1, production: 0, gold: 0 },\n [TerrainType.SNOW]: { food: 0, production: 0, gold: 0 },\n [TerrainType.COAST]: { food: 1, production: 0, gold: 0 },\n [TerrainType.OCEAN]: { food: 0, production: 0, gold: 0 },\n [TerrainType.MOUNTAIN]: { food: 0, production: 0, gold: 0 },\n});\n\n/**\n * Movement costs for units based on terrain\n * Higher cost = harder to move through\n */\nexport const TERRAIN_MOVEMENT_COSTS = Object.freeze({\n [TerrainType.GRASSLAND]: 1,\n [TerrainType.PLAINS]: 1,\n [TerrainType.DESERT]: 1,\n [TerrainType.TUNDRA]: 1,\n [TerrainType.SNOW]: 2,\n [TerrainType.COAST]: 1,\n [TerrainType.OCEAN]: 999, // Impassable for land units\n [TerrainType.MOUNTAIN]: 999, // Impassable\n});\n\n/**\n * Check if terrain is passable for land units\n * @param {string} terrainType - Terrain type\n * @returns {boolean} True if passable\n */\nexport function isPassable(terrainType) {\n const cost = TERRAIN_MOVEMENT_COSTS[terrainType];\n return cost !== undefined && cost < 999;\n}\n\n/**\n * Get movement cost for terrain\n * @param {string} terrainType - Terrain type\n * @returns {number} Movement cost\n */\nexport function getMovementCost(terrainType) {\n return TERRAIN_MOVEMENT_COSTS[terrainType] ?? 999;\n}\n\n/**\n * Get terrain yields\n * @param {string} terrainType - Terrain type\n * @returns {Object} Yields object {food, production, gold}\n */\nexport function getTerrainYields(terrainType) {\n return TERRAIN_YIELDS[terrainType] || { food: 0, production: 0, gold: 0 };\n}\n\n/**\n * Get terrain color\n * @param {string} terrainType - Terrain type\n * @returns {string} Hex color string\n */\nexport function getTerrainColor(terrainType) {\n return TERRAIN_COLORS[terrainType] || DEFAULT_TERRAIN_COLOR;\n}\n", "// VdHexGrid - Dynamic controllable Hex Grid API for Vanduo framework\n// Based on web-civ HexGrid implementation\n// Enables developers to use hex grids as components and game devs creating web civ-like games\n\nimport {\n hexToPixel,\n pixelToHex,\n getHexCorners,\n getAdjacentHexes,\n hexDistance,\n TerrainType,\n isPassable,\n getMovementCost,\n getTerrainYields,\n getTerrainColor,\n} from './hex-math.js';\n\n// Constants\nexport const VD_HEX_VERSION = '1.0.0';\nconst ZOOM_MIN = 0.3;\nconst ZOOM_MAX = 3.0;\nconst ZOOM_FACTOR = 0.1;\nconst DRAG_THRESHOLD = 2;\n\n/**\n * VdHexGrid - A dynamic controllable hex grid component\n *\n * @example\n * const grid = new VdHexGrid({\n * element: document.getElementById('container'),\n * canvas: document.getElementById('canvas'),\n * size: 30,\n * width: 15,\n * height: 10,\n * rotation: 0 // Optional rotation in radians\n * });\n *\n * grid.on('select', (hex) => {\n * console.log('Selected:', hex.q, hex.r);\n * });\n */\nexport class VdHexGrid {\n static VERSION = VD_HEX_VERSION;\n\n constructor({ element, canvas, size = 30, width = 10, height = 10, rotation = 0 }) {\n this.element = element;\n this.canvas = canvas;\n this.size = size;\n this.width = width;\n this.height = height;\n this.rotation = rotation;\n this.hexes = new Map();\n this.selectedHex = null;\n this.listeners = {};\n\n // Transform state for pan/zoom\n this.transform = { x: 0, y: 0, scale: 1 };\n\n // Drag state\n this.dragging = false;\n this.lastPos = null;\n this.hasMoved = false;\n\n // Theme colors\n this.themeColors = this._getThemeColors();\n\n // Custom render callback\n this.customRenderCallback = null;\n\n // Set up canvas if not already done\n if (!this.canvas) {\n this.canvas = element.querySelector('canvas') || document.createElement('canvas');\n if (!element.contains(this.canvas)) {\n element.appendChild(this.canvas);\n }\n }\n\n this.ctx = this.canvas.getContext('2d');\n\n // Generate the grid\n this._generateGrid();\n this._render();\n this._setupEvents();\n\n // Observe theme changes\n this._observeThemeChanges();\n }\n\n /**\n * Get theme colors from CSS custom properties\n */\n _getThemeColors() {\n const root = document.documentElement;\n const style = getComputedStyle(root);\n\n // Prefer Vanduo's canonical --vd-* tokens; fall back to the legacy\n // unprefixed names, then to a hardcoded default.\n const read = (token, legacy, fallback) =>\n style.getPropertyValue(token).trim() || style.getPropertyValue(legacy).trim() || fallback;\n\n return {\n bgPrimary: read('--vd-bg-primary', '--bg-primary', '#ffffff'),\n bgSecondary: read('--vd-bg-secondary', '--bg-secondary', '#f5f5f5'),\n borderColor: read('--vd-border-color', '--border-color', '#e0e0e0'),\n colorPrimary: read('--vd-color-primary', '--color-primary', '#3b82f6'),\n textColor: read('--vd-text-primary', '--text-primary', '#1f2937'),\n textMuted: read('--vd-text-muted', '--text-muted', '#6b7280'),\n };\n }\n\n /**\n * Observe theme changes and re-render when theme changes\n */\n _observeThemeChanges() {\n const reTheme = () => {\n this.themeColors = this._getThemeColors();\n this._render();\n };\n\n // Re-render when the document theme attribute flips (e.g. data-theme).\n this._themeObserver = new MutationObserver(reTheme);\n this._themeObserver.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['data-theme'],\n });\n\n // Also follow OS-level light/dark changes that flip token values through a\n // prefers-color-scheme media query without touching any attribute.\n if (typeof window !== 'undefined' && window.matchMedia) {\n this._themeMedia = window.matchMedia('(prefers-color-scheme: dark)');\n this._themeMediaHandler = reTheme;\n this._themeMedia.addEventListener('change', this._themeMediaHandler);\n }\n }\n\n /**\n * Disconnect theme listeners. Call before discarding the instance (for example\n * on SPA navigation) to avoid leaking observers and media-query listeners.\n */\n destroy() {\n if (this._themeObserver) {\n this._themeObserver.disconnect();\n this._themeObserver = null;\n }\n if (this._themeMedia && this._themeMediaHandler) {\n this._themeMedia.removeEventListener('change', this._themeMediaHandler);\n this._themeMedia = null;\n this._themeMediaHandler = null;\n }\n }\n\n /**\n * Convert screen coordinates to world coordinates\n */\n _screenToWorld(screenX, screenY) {\n const rect = this.canvas.getBoundingClientRect();\n const canvasX = screenX - rect.left;\n const canvasY = screenY - rect.top;\n\n return {\n x: (canvasX - this.transform.x) / this.transform.scale,\n y: (canvasY - this.transform.y) / this.transform.scale,\n };\n }\n\n /**\n * Convert client coordinates to canvas-local coordinates\n */\n _clientToCanvas(clientX, clientY) {\n const rect = this.canvas.getBoundingClientRect();\n return {\n x: clientX - rect.left,\n y: clientY - rect.top,\n };\n }\n\n /**\n * Generate hex grid data\n */\n _generateGrid() {\n this.hexes.clear();\n\n for (let r = 0; r < this.height; r++) {\n const qOffset = Math.floor(r / 2);\n for (let q = -qOffset; q < this.width - qOffset; q++) {\n const pixel = hexToPixel(q, r, this.size, this.rotation);\n\n const hex = {\n q,\n r,\n x: pixel.x,\n y: pixel.y,\n fill: this.themeColors.bgSecondary,\n stroke: this.themeColors.borderColor,\n adjacent: getAdjacentHexes(q, r),\n terrain: null,\n data: {},\n };\n this.hexes.set(`${q},${r}`, hex);\n }\n }\n }\n\n /**\n * Keep selected hex reference in sync after grid regeneration\n */\n _resyncSelectedHex() {\n if (!this.selectedHex) return;\n this.selectedHex = this.hexes.get(`${this.selectedHex.q},${this.selectedHex.r}`) ?? null;\n }\n\n /**\n * Render the hex grid on canvas\n */\n _render() {\n // Get canvas displayed size\n const rect = this.canvas.getBoundingClientRect();\n const displayWidth = rect.width || 800;\n const displayHeight = rect.height || 400;\n\n // Set canvas internal resolution to match display\n this.canvas.width = displayWidth;\n this.canvas.height = displayHeight;\n\n // Clear canvas with theme background\n this.ctx.fillStyle = this.themeColors.bgPrimary;\n this.ctx.fillRect(0, 0, this.canvas.width, this.canvas.height);\n\n // Apply transform\n this.ctx.save();\n this.ctx.translate(this.transform.x, this.transform.y);\n this.ctx.scale(this.transform.scale, this.transform.scale);\n\n // Draw all hexes\n this.hexes.forEach((hex) => {\n this._drawHex(hex);\n\n // Call custom render callback if set\n if (this.customRenderCallback) {\n this.customRenderCallback(this.ctx, hex, this.size);\n }\n });\n\n // Redraw selected hex if any\n if (this.selectedHex) {\n this._drawHex(this.selectedHex, true);\n }\n\n this.ctx.restore();\n }\n\n /**\n * Draw a single hex\n */\n _drawHex(hex, isSelected = false) {\n const corners = getHexCorners(hex.x, hex.y, this.size, this.rotation);\n\n this.ctx.beginPath();\n this.ctx.moveTo(corners[0].x, corners[0].y);\n for (let i = 1; i < corners.length; i++) {\n this.ctx.lineTo(corners[i].x, corners[i].y);\n }\n this.ctx.closePath();\n\n // Determine fill color: terrain > custom fill > theme\n let fill;\n if (isSelected) {\n fill = this.themeColors.colorPrimary;\n } else if (hex.terrain) {\n fill = getTerrainColor(hex.terrain);\n } else if (hex.fill) {\n fill = hex.fill;\n } else {\n fill = this.themeColors.bgSecondary;\n }\n this.ctx.fillStyle = fill;\n this.ctx.fill();\n\n // Stroke with theme color\n const stroke = isSelected\n ? this.themeColors.colorPrimary\n : hex.stroke || this.themeColors.borderColor;\n this.ctx.strokeStyle = stroke;\n this.ctx.lineWidth = isSelected ? 3 : 1;\n this.ctx.stroke();\n\n // Draw coordinates for selected hex\n if (isSelected) {\n this.ctx.fillStyle = '#ffffff';\n this.ctx.font = '10px monospace';\n this.ctx.textAlign = 'center';\n this.ctx.textBaseline = 'middle';\n this.ctx.fillText(`${hex.q},${hex.r}`, hex.x, hex.y);\n }\n }\n\n /**\n * Set up mouse/touch events for hex selection, pan, and zoom\n */\n _setupEvents() {\n // Touch state for pinch-to-zoom\n this.touchState = {\n initialDistance: 0,\n initialScale: 1,\n touches: [],\n };\n\n // Pan - pointer down\n this.canvas.addEventListener('pointerdown', (e) => {\n this.dragging = true;\n this.hasMoved = false;\n this.lastPos = { x: e.clientX, y: e.clientY };\n this.canvas.style.cursor = 'grabbing';\n });\n\n // Pan - pointer move\n this.canvas.addEventListener('pointermove', (e) => {\n if (!this.dragging) return;\n\n const cur = { x: e.clientX, y: e.clientY };\n const dx = cur.x - this.lastPos.x;\n const dy = cur.y - this.lastPos.y;\n\n if (Math.abs(dx) > DRAG_THRESHOLD || Math.abs(dy) > DRAG_THRESHOLD) {\n this.hasMoved = true;\n }\n\n this.transform.x += dx;\n this.transform.y += dy;\n this.lastPos = cur;\n this._render();\n });\n\n // Pan - pointer up\n const stopDrag = () => {\n this.dragging = false;\n if (!this.hasMoved) {\n this.canvas.style.cursor = 'pointer';\n }\n };\n this.canvas.addEventListener('pointerup', stopDrag);\n this.canvas.addEventListener('pointerleave', stopDrag);\n\n // Click (tap without drag)\n this.canvas.addEventListener('click', (e) => {\n if (this.hasMoved) return;\n\n const worldPos = this._screenToWorld(e.clientX, e.clientY);\n const hexCoords = pixelToHex(worldPos.x, worldPos.y, this.size, this.rotation);\n const hex = this.hexes.get(`${hexCoords.q},${hexCoords.r}`);\n\n if (hex) {\n this.selectedHex = hex;\n this._render();\n this._emit('select', hex);\n }\n });\n\n // Zoom - mouse wheel\n this.canvas.addEventListener(\n 'wheel',\n (e) => {\n e.preventDefault();\n\n const zoomFactor = e.deltaY > 0 ? 1 - ZOOM_FACTOR : 1 + ZOOM_FACTOR;\n const newScale = Math.max(ZOOM_MIN, Math.min(this.transform.scale * zoomFactor, ZOOM_MAX));\n\n // Zoom toward cursor\n const mouse = this._clientToCanvas(e.clientX, e.clientY);\n\n const scaleDiff = newScale / this.transform.scale;\n this.transform.x = mouse.x - (mouse.x - this.transform.x) * scaleDiff;\n this.transform.y = mouse.y - (mouse.y - this.transform.y) * scaleDiff;\n this.transform.scale = newScale;\n\n this._render();\n this._emit('zoom', { scale: this.transform.scale });\n },\n { passive: false },\n );\n\n // Touch events for pinch-to-zoom\n this.canvas.addEventListener(\n 'touchstart',\n (e) => {\n if (e.touches.length === 2) {\n e.preventDefault();\n this.touchState.touches = Array.from(e.touches);\n this.touchState.initialDistance = this._getTouchDistance(e.touches);\n this.touchState.initialScale = this.transform.scale;\n }\n },\n { passive: false },\n );\n\n this.canvas.addEventListener(\n 'touchmove',\n (e) => {\n if (e.touches.length === 2) {\n e.preventDefault();\n const currentDistance = this._getTouchDistance(e.touches);\n const scale =\n (currentDistance / this.touchState.initialDistance) * this.touchState.initialScale;\n const newScale = Math.max(ZOOM_MIN, Math.min(scale, ZOOM_MAX));\n\n // Zoom toward center of pinch\n const centerClientX = (e.touches[0].clientX + e.touches[1].clientX) / 2;\n const centerClientY = (e.touches[0].clientY + e.touches[1].clientY) / 2;\n const center = this._clientToCanvas(centerClientX, centerClientY);\n\n const scaleDiff = newScale / this.transform.scale;\n this.transform.x = center.x - (center.x - this.transform.x) * scaleDiff;\n this.transform.y = center.y - (center.y - this.transform.y) * scaleDiff;\n this.transform.scale = newScale;\n\n this._render();\n this._emit('zoom', { scale: this.transform.scale });\n }\n },\n { passive: false },\n );\n\n this.canvas.addEventListener('touchend', () => {\n this.touchState.touches = [];\n });\n\n // Cursor style\n this.canvas.addEventListener('mouseenter', () => {\n this.canvas.style.cursor = 'grab';\n });\n this.canvas.addEventListener('mouseleave', () => {\n this.canvas.style.cursor = 'default';\n });\n }\n\n /**\n * Calculate distance between two touch points\n * @param {TouchList} touches - Touch list\n * @returns {number} Distance in pixels\n */\n _getTouchDistance(touches) {\n if (touches.length < 2) return 0;\n const dx = touches[0].clientX - touches[1].clientX;\n const dy = touches[0].clientY - touches[1].clientY;\n return Math.sqrt(dx * dx + dy * dy);\n }\n\n /**\n * Set hex size\n */\n setSize(size) {\n this.size = size;\n this._generateGrid();\n this._resyncSelectedHex();\n this._render();\n }\n\n /**\n * Set grid dimensions\n */\n setDimensions(width, height) {\n this.width = width;\n this.height = height;\n this._generateGrid();\n this._resyncSelectedHex();\n this._render();\n }\n\n /**\n * Reset grid to defaults\n */\n reset() {\n this.size = 30;\n this.width = 15;\n this.height = 10;\n this.rotation = 0;\n this.selectedHex = null;\n this.transform = { x: 0, y: 0, scale: 1 };\n this._generateGrid();\n this._render();\n }\n\n /**\n * Fill hexes with random colors\n */\n fillRandom() {\n const colors = [\n '#f0f0f0',\n '#d4e5d4',\n '#e5d4d4',\n '#d4d4e5',\n '#e5e5d4',\n '#d4e5e5',\n '#e8e8e8',\n '#d0d0d0',\n ];\n this.hexes.forEach((hex) => {\n hex.fill = colors[Math.floor(Math.random() * colors.length)];\n });\n this._render();\n }\n\n /**\n * Get hex by coordinates\n */\n getHex(q, r) {\n return this.hexes.get(`${q},${r}`);\n }\n\n /**\n * Get all hexes\n */\n getAllHexes() {\n return Array.from(this.hexes.values());\n }\n\n /**\n * Set hex fill color\n */\n setHexFill(q, r, color) {\n const hex = this.hexes.get(`${q},${r}`);\n if (hex) {\n hex.fill = color;\n this._render();\n }\n }\n\n /**\n * Reset view to default position\n */\n resetView() {\n this.transform = { x: 0, y: 0, scale: 1 };\n this._render();\n this._emit('pan', { x: 0, y: 0 });\n this._emit('zoom', { scale: 1 });\n }\n\n /**\n * Zoom in\n */\n zoomIn() {\n const newScale = Math.min(this.transform.scale * (1 + ZOOM_FACTOR), ZOOM_MAX);\n this.transform.scale = newScale;\n this._render();\n this._emit('zoom', { scale: this.transform.scale });\n }\n\n /**\n * Zoom out\n */\n zoomOut() {\n const newScale = Math.max(this.transform.scale * (1 - ZOOM_FACTOR), ZOOM_MIN);\n this.transform.scale = newScale;\n this._render();\n this._emit('zoom', { scale: this.transform.scale });\n }\n\n /**\n * Get current transform state\n */\n getTransform() {\n return { ...this.transform };\n }\n\n /**\n * Subscribe to events\n */\n on(event, callback) {\n if (!this.listeners[event]) {\n this.listeners[event] = [];\n }\n this.listeners[event].push(callback);\n }\n\n /**\n * Emit events\n */\n _emit(event, data) {\n if (this.listeners[event]) {\n this.listeners[event].forEach((callback) => callback(data));\n }\n }\n\n // \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n // Terrain System\n // \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n\n /**\n * Set terrain type for a hex\n * @param {number} q - Hex column\n * @param {number} r - Hex row\n * @param {string} terrainType - Terrain type (e.g., 'GRASSLAND', 'OCEAN')\n */\n setHexTerrain(q, r, terrainType) {\n const hex = this.hexes.get(`${q},${r}`);\n if (hex) {\n hex.terrain = terrainType;\n this._render();\n }\n }\n\n /**\n * Get terrain type for a hex\n * @param {number} q - Hex column\n * @param {number} r - Hex row\n * @returns {string|null} Terrain type or null\n */\n getHexTerrain(q, r) {\n const hex = this.hexes.get(`${q},${r}`);\n return hex ? hex.terrain : null;\n }\n\n /**\n * Generate random terrain for all hexes\n */\n generateRandomTerrain() {\n const terrainTypes = Object.values(TerrainType);\n this.hexes.forEach((hex) => {\n hex.terrain = terrainTypes[Math.floor(Math.random() * terrainTypes.length)];\n });\n this._render();\n }\n\n /**\n * Get terrain yields for a hex\n * @param {number} q - Hex column\n * @param {number} r - Hex row\n * @returns {Object} Yields object {food, production, gold}\n */\n getHexYields(q, r) {\n const terrain = this.getHexTerrain(q, r);\n return terrain ? getTerrainYields(terrain) : { food: 0, production: 0, gold: 0 };\n }\n\n /**\n * Get movement cost for a hex\n * @param {number} q - Hex column\n * @param {number} r - Hex row\n * @returns {number} Movement cost\n */\n getHexMovementCost(q, r) {\n const terrain = this.getHexTerrain(q, r);\n return terrain ? getMovementCost(terrain) : 999;\n }\n\n /**\n * Check if hex is passable\n * @param {number} q - Hex column\n * @param {number} r - Hex row\n * @returns {boolean} True if passable\n */\n isHexPassable(q, r) {\n const terrain = this.getHexTerrain(q, r);\n return terrain ? isPassable(terrain) : false;\n }\n\n // \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n // Hex Data Attachment\n // \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n\n /**\n * Set custom data for a hex\n * @param {number} q - Hex column\n * @param {number} r - Hex row\n * @param {Object} data - Custom data object\n */\n setHexData(q, r, data) {\n const hex = this.hexes.get(`${q},${r}`);\n if (hex) {\n hex.data = { ...hex.data, ...data };\n }\n }\n\n /**\n * Get custom data for a hex\n * @param {number} q - Hex column\n * @param {number} r - Hex row\n * @returns {Object} Custom data object\n */\n getHexData(q, r) {\n const hex = this.hexes.get(`${q},${r}`);\n return hex ? hex.data : {};\n }\n\n /**\n * Clear custom data for a hex\n * @param {number} q - Hex column\n * @param {number} r - Hex row\n */\n clearHexData(q, r) {\n const hex = this.hexes.get(`${q},${r}`);\n if (hex) {\n hex.data = {};\n }\n }\n\n // \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n // Distance & Pathfinding\n // \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n\n /**\n * Calculate distance between two hexes\n * @param {number} q1 - First hex q coordinate\n * @param {number} r1 - First hex r coordinate\n * @param {number} q2 - Second hex q coordinate\n * @param {number} r2 - Second hex r coordinate\n * @returns {number} Distance in hex steps\n */\n hexDistance(q1, r1, q2, r2) {\n return hexDistance(q1, r1, q2, r2);\n }\n\n /**\n * Get valid moves from a hex within movement points\n * @param {number} q - Starting hex column\n * @param {number} r - Starting hex row\n * @param {number} movementPoints - Available movement points\n * @returns {Array<{q: number, r: number}>} Array of valid hex coordinates\n */\n getValidMoves(q, r, movementPoints) {\n const validHexes = [];\n const adjacent = getAdjacentHexes(q, r);\n\n for (const hex of adjacent) {\n if (!this.hexes.has(`${hex.q},${hex.r}`)) continue;\n\n const cost = this.getHexMovementCost(hex.q, hex.r);\n if (cost < 999 && movementPoints >= cost) {\n validHexes.push(hex);\n }\n }\n\n return validHexes;\n }\n\n /**\n * Get path between two hexes (simple BFS)\n * @param {number} startQ - Starting hex column\n * @param {number} startR - Starting hex row\n * @param {number} endQ - Ending hex column\n * @param {number} endR - Ending hex row\n * @returns {Array<{q: number, r: number}>} Array of hex coordinates forming path\n */\n getPath(startQ, startR, endQ, endR) {\n const startKey = `${startQ},${startR}`;\n const endKey = `${endQ},${endR}`;\n\n if (!this.hexes.has(startKey) || !this.hexes.has(endKey)) {\n return [];\n }\n\n const queue = [[startQ, startR]];\n const visited = new Set([startKey]);\n const parent = new Map();\n\n while (queue.length > 0) {\n const [currentQ, currentR] = queue.shift();\n const currentKey = `${currentQ},${currentR}`;\n\n if (currentKey === endKey) {\n // Reconstruct path\n const path = [];\n let key = endKey;\n while (key) {\n const [q, r] = key.split(',').map(Number);\n path.unshift({ q, r });\n key = parent.get(key);\n }\n return path;\n }\n\n const adjacent = getAdjacentHexes(currentQ, currentR);\n for (const neighbor of adjacent) {\n const neighborKey = `${neighbor.q},${neighbor.r}`;\n if (this.hexes.has(neighborKey) && !visited.has(neighborKey)) {\n if (this.isHexPassable(neighbor.q, neighbor.r)) {\n visited.add(neighborKey);\n parent.set(neighborKey, currentKey);\n queue.push([neighbor.q, neighbor.r]);\n }\n }\n }\n }\n\n return []; // No path found\n }\n\n // \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n // Grid Rotation\n // \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n\n /**\n * Set grid rotation\n * @param {number} rotation - Rotation in radians\n */\n setRotation(rotation) {\n this.rotation = rotation;\n this._generateGrid();\n this._resyncSelectedHex();\n this._render();\n }\n\n /**\n * Get current grid rotation\n * @returns {number} Rotation in radians\n */\n getRotation() {\n return this.rotation;\n }\n\n // \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n // Custom Rendering\n // \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n\n /**\n * Set custom render callback for each hex\n * @param {function} callback - Called with (ctx, hex, size) for each hex\n */\n setCustomRender(callback) {\n this.customRenderCallback = callback;\n this._render();\n }\n\n /**\n * Clear custom render callback\n */\n clearCustomRender() {\n this.customRenderCallback = null;\n this._render();\n }\n\n // \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n // Utility Methods\n // \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n\n /**\n * Check if hex exists at coordinates\n * @param {number} q - Hex column\n * @param {number} r - Hex row\n * @returns {boolean}\n */\n hasHex(q, r) {\n return this.hexes.has(`${q},${r}`);\n }\n\n /**\n * Get hex count\n * @returns {number} Number of hexes in grid\n */\n getHexCount() {\n return this.hexes.size;\n }\n\n /**\n * Export terrain data as JSON\n * @returns {Object} Terrain data object\n */\n exportTerrainData() {\n const data = {};\n this.hexes.forEach((hex, key) => {\n if (hex.terrain) {\n data[key] = hex.terrain;\n }\n });\n return data;\n }\n\n /**\n * Import terrain data from JSON\n * @param {Object} data - Terrain data object\n */\n importTerrainData(data) {\n Object.entries(data).forEach(([key, terrain]) => {\n const [q, r] = key.split(',').map(Number);\n this.setHexTerrain(q, r, terrain);\n });\n }\n}\n"],
5
+ "mappings": ";;;;;AASA,SAAS,iBAAiB,GAAG,KAAK,WAAW,iBAAiB,aAAa;;;ACCpE,SAAS,YAAY,GAAG,GAAG,WAAW,GAAG;AAC9C,MAAI,CAAC,UAAU;AACb,WAAO,EAAE,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AAAA,IACvC;AACA;AAAA,MACE,MAAM,CAAC,MAAM,OAAO,MAAM,MAAM;AAAA,MAChC,CAAC,CAAC,GAAG,GAAG,MAAM,YAAY,SAAS,cAAc,GAAG,GAAG;AAAA,IACzD;AACA;AAAA,MACE,MAAM,MAAM;AAAA,MACZ,CAAC,MAAM,YAAY,SAAS,YAAY,CAAC;AAAA,IAC3C;AAEA,oBAAgB,MAAM;AACpB,UAAI,UAAU;AACZ,iBAAS,QAAQ;AACjB,mBAAW;AAAA,MACb;AAAA,IACF,CAAC;AAED,WAAO,EAAE,aAAa,MAAM,SAAS,CAAC;AAEtC,WAAO,MACL,EAAE,OAAO,EAAE,KAAK,IAAI,OAAO,eAAe,OAAO,EAAE,OAAO,QAAQ,QAAQ,OAAO,EAAE,GAAG;AAAA,MACpF,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,QAAQ,QAAQ,QAAQ,SAAS,SAAS,QAAQ,OAAO,EAAE,CAAC;AAAA,IAC5F,CAAC;AAAA,EACL;AACF,CAAC;",
6
+ "names": ["VdHexGrid"]
7
+ }
@@ -0,0 +1,14 @@
1
+ import type { DefineComponent } from 'vue';
2
+
3
+ export interface VdHexGridProps {
4
+ /** Hexagon size in px. Default 30. */
5
+ size?: number;
6
+ /** Grid columns (number of hexes). Default 10. */
7
+ width?: number;
8
+ /** Grid rows (number of hexes). Default 10. */
9
+ height?: number;
10
+ /** Grid rotation in radians. Default 0. */
11
+ rotation?: number;
12
+ }
13
+
14
+ export declare const VdHexGrid: DefineComponent<VdHexGridProps>;
@@ -0,0 +1,13 @@
1
+ // Hand-written declarations for the root entry of @vanduo-oss/vd3-cbun.
2
+ // Keep in sync with src/index.js and component-versions.json.
3
+
4
+ /**
5
+ * Per-component VERSION constants for the vd3-cbun bundle. Decoupled from the
6
+ * bundle's own package version; asserted against component-versions.json.
7
+ */
8
+ export declare const VD3_CBUN_VERSIONS: Readonly<{
9
+ charts: string;
10
+ flowchart: string;
11
+ 'hex-grid': string;
12
+ 'music-player': string;
13
+ }>;
package/dist/index.js ADDED
@@ -0,0 +1,11 @@
1
+ // src/index.js
2
+ var VD3_CBUN_VERSIONS = Object.freeze({
3
+ charts: "1.0.0",
4
+ flowchart: "1.2.0",
5
+ "hex-grid": "1.0.0",
6
+ "music-player": "1.0.0"
7
+ });
8
+ export {
9
+ VD3_CBUN_VERSIONS
10
+ };
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/index.js"],
4
+ "sourcesContent": ["// Root entry of @vanduo-oss/vd3-cbun.\n//\n// Exposes ONLY the per-component VERSION-constants map. Component APIs live on\n// the subpath exports (./charts, ./flowchart, ./hex-grid, ./music-player) so\n// importing one component never pulls in another (tree-shaking contract).\n//\n// The values below are hardcoded mirrors of component-versions.json (the\n// manifest is the source of truth). The version-consistency check \u2014\n// tests/smoke.spec.ts \u2014 asserts the two stay in sync; bump both together.\n// Note: `flowchart` continues the old-line 1.2.0 lineage because\n// VD_FLOWCHART_VERSION is serialized into user documents via toJSON().version.\n\nexport const VD3_CBUN_VERSIONS = Object.freeze({\n charts: '1.0.0',\n flowchart: '1.2.0',\n 'hex-grid': '1.0.0',\n 'music-player': '1.0.0',\n});\n"],
5
+ "mappings": ";AAYO,IAAM,oBAAoB,OAAO,OAAO;AAAA,EAC7C,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,gBAAgB;AAClB,CAAC;",
6
+ "names": []
7
+ }