{"_id":"@composy/3d-map-vue","name":"@composy/3d-map-vue","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@composy/3d-map-vue","version":"0.0.1","description":"3d地图","keywords":["3d-map","vue","vue3","vue2","component"],"author":{"name":"LDesign Team"},"license":"MIT","type":"module","sideEffects":["*.vue","*.tsx","*.jsx","dist/*","es/**/style/**","esm/**/style/**"],"exports":{".":{"types":"./es/index.d.ts","import":"./es/index.js","require":"./lib/index.cjs","default":"./es/index.js"},"./components":{"types":"./es/components/index.d.ts","import":"./es/components/index.js","require":"./lib/components/index.cjs","default":"./es/components/index.js"},"./components/*":{"types":"./es/components/*.d.ts","import":"./es/components/*.js","require":"./lib/components/*.cjs","default":"./es/components/*.js"},"./composables":{"types":"./es/composables/index.d.ts","import":"./es/composables/index.js","require":"./lib/composables/index.cjs","default":"./es/composables/index.js"},"./composables/*":{"types":"./es/composables/*.d.ts","import":"./es/composables/*.js","require":"./lib/composables/*.cjs","default":"./es/composables/*.js"},"./index.css":"./dist/index.css","./index.min.css":"./dist/index.min.css","./style/index.css":"./lib/style/index.css","./style/index.less":"./es/style/index.less","./package.json":"./package.json"},"main":"./lib/index.cjs","module":"./es/index.js","types":"./es/index.d.ts","unpkg":"./dist/index.min.js","jsdelivr":"./dist/index.min.js","scripts":{"dev":"vite build --watch","build":"ldesign-builder build","test":"vitest run","test:watch":"vitest","test:coverage":"vitest run --coverage","lint":"eslint src","lint:fix":"eslint src --fix","type-check":"vue-tsc --noEmit"},"dependencies":{"@composy/3d-map-core":"^0.0.1","vue-demi":"^0.14.10"},"peerDependencies":{"vue":"^2.7.0 || ^3.5.32"},"devDependencies":{"@composy/builder":"^0.0.1","@vitest/coverage-v8":"4.1.10","@vue/test-utils":"^2.4.11","eslint":"10.7.0","jsdom":"29.1.1","typescript":"5.9.3","vite":"^8.1.4","vitest":"4.1.10","vue":"3.5.39","vue-tsc":"^3.3.7"},"publishConfig":{"registry":"http://npm.longrise.cn:6286/"},"style":"./dist/index.css","typings":"./es/index.d.ts","browser":"./dist/index.js","_id":"@composy/3d-map-vue@0.0.1","_nodeVersion":"23.11.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-Ah1z6GgO6pUBBSzEJ8AoI71ubJUKpXv4HxWPhCJMtSht2MoWYQrru8wbejHbE4NNcjiItln99TejLR9ysOuWFQ==","shasum":"923d4804d0c60e5df9efc3612a407da1f9f129c6","tarball":"https://registry.npmjs.org/@composy/3d-map-vue/-/3d-map-vue-0.0.1.tgz","fileCount":99,"unpackedSize":389906,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDAVV+QC0saXWVQT3VU97r3Kniq7up7jbOU3HL0zitNQAiAnOyT9tQn4lZ293sbiShhnGz+fhsydVf9zpwkz3sxgMg=="}]},"_npmUser":{"name":"swimly","email":"979741120@qq.com"},"directories":{},"maintainers":[{"name":"swimly","email":"979741120@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/3d-map-vue_0.0.1_1786948955308_0.9614894862315282"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-17T06:42:34.216Z","0.0.1":"2026-08-17T06:42:35.491Z","modified":"2026-08-17T06:42:36.431Z"},"maintainers":[{"name":"swimly","email":"979741120@qq.com"}],"description":"3d地图","keywords":["3d-map","vue","vue3","vue2","component"],"author":{"name":"LDesign Team"},"license":"MIT","readme":"# @composy/3d-map-vue\n\nVue adapter components and composables for `@composy/3d-map-core`.\n\n## Features\n\n- Vue 3 ready map container, building, heatmap, scatterplot, arc, and info-window components.\n- Shared `MapEngine` access through `useMap3D`, `use3dMap`, and the map container provider.\n- Theme-safe styles: every component class uses the `ldesign-` prefix, and CSS relies on generated LDesign variables.\n- Tokenized defaults: colors use `packages/color` generated `--ld-*` variables, and spacing, radius, font, border, shadow, and z-index values use `packages/size` compatible `--ld-*` variables.\n- Library builds use `@composy/builder` and emit `dist`, `es`, `esm`, and `lib` artifacts.\n\n## Install\n\n```bash\npnpm add @composy/3d-map-core @composy/3d-map-vue\n```\n\n`vue` is a peer dependency:\n\n```bash\npnpm add vue\n```\n\n## Basic Usage\n\n```vue\n<script setup lang=\"ts\">\nimport { ref } from 'vue'\nimport { LMap3D, LBuilding, LInfoWindow } from '@composy/3d-map-vue'\nimport type { BuildingFeature } from '@composy/3d-map-core'\n\nconst selected = ref<BuildingFeature | null>(null)\nconst selectedPosition = ref<[number, number]>([116.397428, 39.90923])\n</script>\n\n<template>\n  <LMap3D\n    class=\"ldesign-3d-map-demo\"\n    :center=\"[116.397428, 39.90923]\"\n    :zoom=\"14\"\n    :pitch=\"52\"\n    :buildings=\"{ enabled: true }\"\n    @building-click=\"(feature, lngLat) => {\n      selected = feature\n      selectedPosition = lngLat\n    }\"\n  >\n    <LBuilding\n      :style=\"{\n        color: 'var(--ld-primary-500)',\n        opacity: 0.86,\n      }\"\n    />\n\n    <LInfoWindow\n      v-if=\"selected\"\n      :position=\"selectedPosition\"\n      :visible=\"Boolean(selected)\"\n      title=\"Building\"\n      @close=\"selected = null\"\n    >\n      <span>{{ selected.properties?.name ?? 'Unnamed building' }}</span>\n    </LInfoWindow>\n  </LMap3D>\n</template>\n```\n\n## Components\n\n| Component | Purpose |\n| --- | --- |\n| `LMap3D` | Creates and provides the `MapEngine` instance. |\n| `LBuilding` | Loads or renders 3D building GeoJSON. |\n| `LInfoWindow` | Displays tokenized floating map content. |\n| `LHeatmap` | Adds heatmap visualization layers. |\n| `LScatterplot` | Adds scatterplot visualization layers. |\n| `LArc` | Adds origin-to-destination arc layers. |\n\n## Composables\n\n```ts\nimport { useMap3D, use3dMap } from '@composy/3d-map-vue'\n```\n\n- `useMap3D(options)` creates and manages a map engine from Vue lifecycle hooks.\n- `use3dMap()` reads the nearest provided map engine from `LMap3D`.\n\n## Styling Contract\n\nAll public classes are prefixed with `ldesign-`.\n\n```css\n.ldesign-3d-map-shell {\n  color: var(--ld-text-primary);\n  background: var(--ld-bg-container);\n  border-radius: var(--ld-radius-lg);\n  padding: var(--ld-spacing-lg);\n}\n```\n\nDo not introduce raw hex or function-style color literals in package styles. Use generated variables from `packages/color`. Do not introduce hardcoded spacing, radius, border, font, shadow, or z-index values when an equivalent generated variable from `packages/size` exists.\n\n## Build Outputs\n\n```bash\npnpm --dir packages/vue run type-check\npnpm --dir packages/vue run build\n```\n\nThe build generates:\n\n- `dist/index.js` and `dist/index.min.js` for browser usage.\n- `es/**` for ESM with preserved modules.\n- `esm/**` for compatibility ESM output.\n- `lib/**` for CommonJS output.\n\n## Exports\n\n```ts\nexport * from '@composy/3d-map-vue'\nexport * from '@composy/3d-map-vue/components'\nexport * from '@composy/3d-map-vue/composables'\n```\n","readmeFilename":"README.md","_rev":"1-c495c5f0eff8b4a6ee42498a3494054f"}