{
  "$schema": "https://shadcn-vue.com/schema/registry-item.json",
  "name": "maritime-vessel-map",
  "title": "Maritime Vessel Map",
  "type": "registry:block",
  "files": [
    {
      "path": "packages/registry-vue/blocks/maritime-vessel-map/MaritimeVesselMap.vue",
      "content": "<script setup lang=\"ts\">\nimport { nextTick, ref } from 'vue'\nimport { Map, MapMarker, type MapRef } from '@/components/ui/map'\nimport { Card, CardContent, CardHeader, CardTitle, CardDescription } from '@/components/ui/card'\nimport { Badge } from '@/components/ui/badge'\nimport { Button } from '@/components/ui/button'\n\ndefineProps<{ accessToken?: string }>()\n\ninterface Vessel {\n  mmsi: string\n  name: string\n  flag: string\n  type: 'Container' | 'Crude Tanker' | 'Bulk Carrier' | 'Tug'\n  coords: [number, number]\n  heading: number\n  speedKnots: number\n  draught: string\n  dest: string\n  eta: string\n  status: 'Underway' | 'Moored' | 'At Anchor'\n}\n\nconst mapRef = ref<MapRef | null>(null)\n\nconst vessels: Vessel[] = [\n  {\n    mmsi: '219018442',\n    name: 'EVER GIVEN',\n    flag: 'PA',\n    type: 'Container',\n    coords: [103.78, 1.25],\n    heading: 110,\n    speedKnots: 14.8,\n    draught: '15.7m',\n    dest: 'SGSIN PEB',\n    eta: 'OCT 24 14:00',\n    status: 'Underway',\n  },\n  {\n    mmsi: '636019812',\n    name: 'NORDIC STAR',\n    flag: 'LR',\n    type: 'Crude Tanker',\n    coords: [103.88, 1.22],\n    heading: 245,\n    speedKnots: 0.2,\n    draught: '12.1m',\n    dest: 'SINGAPORE ANCH',\n    eta: 'OCT 24 08:30',\n    status: 'At Anchor',\n  },\n  {\n    mmsi: '356782000',\n    name: 'PACIFIC RUBY',\n    flag: 'SG',\n    type: 'Bulk Carrier',\n    coords: [103.95, 1.29],\n    heading: 45,\n    speedKnots: 11.2,\n    draught: '10.4m',\n    dest: 'JPTYO',\n    eta: 'OCT 29 06:00',\n    status: 'Underway',\n  },\n  {\n    mmsi: '508111222',\n    name: 'HARBOR VALIANT',\n    flag: 'SG',\n    type: 'Tug',\n    coords: [103.75, 1.28],\n    heading: 180,\n    speedKnots: 6.4,\n    draught: '4.5m',\n    dest: 'PASIR PANJANG',\n    eta: 'OCT 24 12:00',\n    status: 'Underway',\n  },\n]\n\nconst activeVessel = ref<Vessel>(vessels[0])\n\nasync function selectVessel(v: Vessel) {\n  activeVessel.value = v\n  // `:center` is reactive, so Vue re-applies it on the next tick and would\n  // otherwise cancel this flight and strand the camera at the default zoom.\n  await nextTick()\n  mapRef.value?.flyTo({ center: v.coords, zoom: 11.5 })\n}\n</script>\n\n<template>\n  <div class=\"grid gap-4 lg:grid-cols-[1fr_320px]\">\n    <div class=\"border-border bg-card relative h-[480px] overflow-hidden rounded-xl border\">\n      <Map\n        ref=\"mapRef\"\n        :access-token=\"accessToken\"\n        variant=\"dark\"\n        :center=\"activeVessel.coords\"\n        :zoom=\"10.8\"\n        class=\"h-full w-full\"\n      >\n        <MapMarker v-for=\"v in vessels\" :key=\"v.mmsi\" :lng-lat=\"v.coords\" anchor=\"center\" @click=\"selectVessel(v)\">\n          <div class=\"group relative flex cursor-pointer flex-col items-center\">\n            <div\n              class=\"flex size-7 items-center justify-center rounded-full font-bold text-cyan-400\"\n              :class=\"activeVessel.mmsi === v.mmsi ? 'bg-cyan-500/20 ring-2 ring-cyan-400' : 'bg-background/80'\"\n              :style=\"{ transform: `rotate(${v.heading}deg)` }\"\n            >\n              ▲\n            </div>\n            <span\n              class=\"border-border bg-card/90 mt-1 rounded border px-1 py-0.5 font-mono text-xs font-semibold tracking-wider whitespace-nowrap shadow-xs\"\n              :class=\"activeVessel.mmsi === v.mmsi ? 'border-cyan-400/50 text-cyan-400' : 'text-foreground'\"\n            >\n              {{ v.name }}\n            </span>\n          </div>\n        </MapMarker>\n      </Map>\n    </div>\n\n    <!-- AIS Telemetry Drawer -->\n    <Card class=\"flex flex-col justify-between\">\n      <CardHeader>\n        <div class=\"flex items-center justify-between\">\n          <Badge variant=\"outline\" class=\"font-mono text-xs\">{{ activeVessel.type }}</Badge>\n          <Badge class=\"border-cyan-500/20 bg-cyan-500/10 text-cyan-600 dark:text-cyan-400\">{{\n            activeVessel.status\n          }}</Badge>\n        </div>\n        <CardTitle class=\"mt-2 font-mono text-lg\">{{ activeVessel.name }}</CardTitle>\n        <CardDescription class=\"font-mono text-xs\"\n          >MMSI: {{ activeVessel.mmsi }} • Flag: {{ activeVessel.flag }}</CardDescription\n        >\n      </CardHeader>\n      <CardContent class=\"space-y-4\">\n        <div class=\"border-border bg-muted/40 grid grid-cols-2 gap-2 rounded-lg border p-2.5 font-mono text-xs\">\n          <div>\n            <div class=\"text-muted-foreground text-xs uppercase\">Speed Over Ground</div>\n            <div class=\"text-foreground text-sm font-bold\">{{ activeVessel.speedKnots }} kts</div>\n          </div>\n          <div>\n            <div class=\"text-muted-foreground text-xs uppercase\">Heading</div>\n            <div class=\"text-foreground text-sm font-bold\">{{ activeVessel.heading }}°</div>\n          </div>\n          <div class=\"mt-2\">\n            <div class=\"text-muted-foreground text-xs uppercase\">Max Draught</div>\n            <div class=\"text-foreground text-sm font-bold\">{{ activeVessel.draught }}</div>\n          </div>\n          <div class=\"mt-2\">\n            <div class=\"text-muted-foreground text-xs uppercase\">Destination</div>\n            <div class=\"text-foreground truncate text-xs font-bold\">{{ activeVessel.dest }}</div>\n          </div>\n        </div>\n\n        <div class=\"border-border space-y-1 border-t pt-3\">\n          <div class=\"text-muted-foreground mb-1 font-mono text-xs tracking-wider uppercase\">\n            Singapore Strait Traffic\n          </div>\n          <button\n            v-for=\"v in vessels\"\n            :key=\"v.mmsi\"\n            type=\"button\"\n            class=\"flex w-full items-center justify-between rounded-md px-2 py-1 text-xs transition-colors\"\n            :class=\"\n              activeVessel.mmsi === v.mmsi\n                ? 'bg-accent text-accent-foreground font-semibold'\n                : 'hover:bg-muted text-muted-foreground'\n            \"\n            @click=\"selectVessel(v)\"\n          >\n            <span class=\"font-mono\">{{ v.name }}</span>\n            <span class=\"font-mono text-xs opacity-75\">{{ v.speedKnots }} kts</span>\n          </button>\n        </div>\n\n        <Button variant=\"outline\" size=\"sm\" class=\"w-full font-mono text-xs\" @click=\"selectVessel(activeVessel)\">\n          Center on Vessel\n        </Button>\n      </CardContent>\n    </Card>\n  </div>\n</template>\n",
      "type": "registry:block",
      "target": "~/app/components/blocks/MaritimeVesselMap.vue"
    }
  ],
  "dependencies": [],
  "devDependencies": [],
  "registryDependencies": [
    "https://uipkge.dev/r/vue/badge.json",
    "https://uipkge.dev/r/vue/button.json",
    "https://uipkge.dev/r/vue/card.json",
    "https://uipkge.dev/r/vue/map.json"
  ],
  "description": "Automatic Identification System (AIS) vessel tracking with container ships, tankers, speed, and anchorage status.",
  "categories": [
    "logistics",
    "maritime",
    "map"
  ]
}