@m3ui-vue/m3ui-vue 1.0.1 → 1.0.3

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 (115) hide show
  1. package/dist/API.md +636 -20
  2. package/dist/MMenuItem-DFyXflk9.js +707 -0
  3. package/dist/MMenuItem-DFyXflk9.js.map +1 -0
  4. package/dist/MSlider-CdNIH7jc.js +1376 -0
  5. package/dist/MSlider-CdNIH7jc.js.map +1 -0
  6. package/dist/MTextField-B4X92vH_.js +671 -0
  7. package/dist/MTextField-B4X92vH_.js.map +1 -0
  8. package/dist/api.json +1 -1
  9. package/dist/chart.js +1 -1
  10. package/dist/chart.js.map +1 -1
  11. package/dist/code-editor.js +1 -1
  12. package/dist/components/MIconButton.vue.d.ts +1 -1
  13. package/dist/components/MMap.vue.d.ts +74 -0
  14. package/dist/components/MMapBaseLayers.vue.d.ts +15 -0
  15. package/dist/components/MMapControl.vue.d.ts +23 -0
  16. package/dist/components/MMapFeatureInfo.vue.d.ts +25 -0
  17. package/dist/components/MMapFilter.vue.d.ts +19 -0
  18. package/dist/components/MMapGeoJson.vue.d.ts +34 -0
  19. package/dist/components/MMapHover.vue.d.ts +17 -0
  20. package/dist/components/MMapIdentify.vue.d.ts +37 -0
  21. package/dist/components/MMapLayers.vue.d.ts +31 -0
  22. package/dist/components/MMapMarker.vue.d.ts +42 -0
  23. package/dist/components/MMapMeasure.vue.d.ts +43 -0
  24. package/dist/components/MMapPopup.vue.d.ts +43 -0
  25. package/dist/components/MMapSearch.vue.d.ts +28 -0
  26. package/dist/components/MShader.vue.d.ts +9 -3
  27. package/dist/components/_MMapLayerItem.vue.d.ts +25 -0
  28. package/dist/composables/_hydration.d.ts +4 -0
  29. package/dist/composables/_mapGeometry.d.ts +13 -0
  30. package/dist/composables/_ssrState.d.ts +30 -0
  31. package/dist/composables/_storageKeys.d.ts +3 -0
  32. package/dist/composables/_useThemeTokens.d.ts +7 -0
  33. package/dist/composables/mapAdapters.d.ts +111 -0
  34. package/dist/composables/mapSearch.d.ts +31 -0
  35. package/dist/composables/themeInitScript.d.ts +22 -0
  36. package/dist/composables/useColorPalette.d.ts +176 -6
  37. package/dist/composables/useLocale.d.ts +30 -0
  38. package/dist/composables/useMap.d.ts +47 -0
  39. package/dist/composables/useMapFilter.d.ts +10 -0
  40. package/dist/composables/useMapLayers.d.ts +30 -0
  41. package/dist/composables/useTheme.d.ts +2 -0
  42. package/dist/index.d.ts +4 -1
  43. package/dist/locales/index.js +217 -7
  44. package/dist/locales/index.js.map +1 -1
  45. package/dist/m3ui-vue.css +1 -1
  46. package/dist/m3ui.js +6742 -7961
  47. package/dist/m3ui.js.map +1 -1
  48. package/dist/map.d.ts +24 -0
  49. package/dist/map.js +1931 -0
  50. package/dist/map.js.map +1 -0
  51. package/dist/plugin.d.ts +25 -2
  52. package/dist/rich-text-editor.js +27 -26
  53. package/dist/rich-text-editor.js.map +1 -1
  54. package/dist/styles.css +1 -1
  55. package/dist/{useLocale-CuvWRZ1h.js → useLocale-b5-hzsL3.js} +32 -2
  56. package/dist/useLocale-b5-hzsL3.js.map +1 -0
  57. package/package.json +11 -2
  58. package/src/__tests__/MFab.test.ts +52 -6
  59. package/src/__tests__/MMap.test.ts +292 -0
  60. package/src/__tests__/MMapLayers.test.ts +257 -0
  61. package/src/__tests__/MMapTools.test.ts +233 -0
  62. package/src/__tests__/MShader.test.ts +16 -0
  63. package/src/__tests__/_fakeMaplibre.ts +158 -0
  64. package/src/__tests__/hydration.test.ts +119 -0
  65. package/src/__tests__/ssr.test.ts +171 -0
  66. package/src/__tests__/ssrState.test.ts +155 -0
  67. package/src/__tests__/themeInitScript.test.ts +122 -0
  68. package/src/components/MChart.vue +3 -2
  69. package/src/components/MFab.vue +29 -7
  70. package/src/components/MIconButton.vue +1 -1
  71. package/src/components/MLightbox.vue +10 -1
  72. package/src/components/MMap.vue +522 -0
  73. package/src/components/MMapBaseLayers.vue +67 -0
  74. package/src/components/MMapControl.vue +61 -0
  75. package/src/components/MMapFeatureInfo.vue +41 -0
  76. package/src/components/MMapFilter.vue +80 -0
  77. package/src/components/MMapGeoJson.vue +136 -0
  78. package/src/components/MMapHover.vue +131 -0
  79. package/src/components/MMapIdentify.vue +103 -0
  80. package/src/components/MMapLayers.vue +111 -0
  81. package/src/components/MMapMarker.vue +102 -0
  82. package/src/components/MMapMeasure.vue +452 -0
  83. package/src/components/MMapPopup.vue +99 -0
  84. package/src/components/MMapSearch.vue +162 -0
  85. package/src/components/MSearchBar.vue +4 -1
  86. package/src/components/MShader.vue +11 -3
  87. package/src/components/_MMapLayerItem.vue +77 -0
  88. package/src/composables/_hydration.ts +10 -0
  89. package/src/composables/_mapGeometry.ts +75 -0
  90. package/src/composables/_ssrState.ts +80 -0
  91. package/src/composables/_storageKeys.ts +6 -0
  92. package/src/composables/_useThemeTokens.ts +42 -0
  93. package/src/composables/mapAdapters.ts +208 -0
  94. package/src/composables/mapSearch.ts +56 -0
  95. package/src/composables/themeInitScript.ts +51 -0
  96. package/src/composables/useColorPalette.ts +32 -14
  97. package/src/composables/useLocale.ts +62 -0
  98. package/src/composables/useMap.ts +98 -0
  99. package/src/composables/useMapFilter.ts +45 -0
  100. package/src/composables/useMapLayers.ts +124 -0
  101. package/src/composables/useTheme.ts +18 -7
  102. package/src/composables/useWindowSizeClass.ts +23 -4
  103. package/src/index.ts +4 -1
  104. package/src/locales/de.ts +31 -1
  105. package/src/locales/es.ts +31 -1
  106. package/src/locales/fr.ts +31 -1
  107. package/src/locales/ja.ts +31 -1
  108. package/src/locales/ko.ts +31 -1
  109. package/src/locales/pt.ts +31 -1
  110. package/src/locales/zh.ts +31 -1
  111. package/src/map.ts +32 -0
  112. package/src/plugin.ts +77 -13
  113. package/dist/MTextField-BPbFeI9M.js +0 -1368
  114. package/dist/MTextField-BPbFeI9M.js.map +0 -1
  115. package/dist/useLocale-CuvWRZ1h.js.map +0 -1
package/dist/chart.js CHANGED
@@ -12,7 +12,7 @@ var p = /* @__PURE__ */ i({
12
12
  setup(i) {
13
13
  let p = i, m = l(!1), h = d(null), g = d({});
14
14
  function _() {
15
- let e = getComputedStyle(document.documentElement), t = (t) => e.getPropertyValue(t).trim();
15
+ let e = typeof document > "u" ? null : getComputedStyle(document.documentElement), t = (t) => e?.getPropertyValue(t).trim() ?? "";
16
16
  return {
17
17
  primary: t("--color-primary"),
18
18
  onSurface: t("--color-on-surface"),
package/dist/chart.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"chart.js","names":[],"sources":["../src/components/MChart.vue","../src/components/MChart.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A thin Chart.js wrapper — line, bar, pie, doughnut, and radar types, with legend/tooltip/axis colors that\n * automatically track the active M3 theme (light/dark, and any palette swap). Available from the `/chart` entry\n * point.\n */\nimport { computed, ref, watch, onMounted, onBeforeUnmount, shallowRef, type Component } from 'vue'\n\ntype ChartType = 'line' | 'bar' | 'pie' | 'doughnut' | 'radar'\n\nconst props = withDefaults(\n defineProps<{\n /** Chart type. Required — there is no default. */\n type: ChartType\n /** Chart.js data object with labels and datasets. Required — there is no default. */\n data: Record<string, any>\n /**\n * Chart.js options, deep-merged on top of MChart's own M3-themed defaults (legend/tooltip/axis colors that\n * track the active theme automatically)\n */\n options?: Record<string, any>\n /** Chart height */\n height?: string\n }>(),\n { height: '300px' },\n)\n\nconst ready = ref(false)\nconst chartComponent = shallowRef<Component | null>(null)\nconst componentMap = shallowRef<Record<string, Component>>({})\n\nfunction getM3Colors() {\n const style = getComputedStyle(document.documentElement)\n const get = (v: string) => style.getPropertyValue(v).trim()\n return {\n primary: get('--color-primary'),\n onSurface: get('--color-on-surface'),\n onSurfaceVariant: get('--color-on-surface-variant'),\n outlineVariant: get('--color-outline-variant'),\n surface: get('--color-surface'),\n surfaceContainer: get('--color-surface-container'),\n // Canvas can't resolve CSS vars, so pass Chart.js the resolved font stack\n fontFamily: get('--font-sans') || \"'Roboto', system-ui, sans-serif\",\n }\n}\n\nconst m3Colors = ref(getM3Colors())\n\nlet themeObserver: MutationObserver | null = null\n\nonMounted(async () => {\n m3Colors.value = getM3Colors()\n\n themeObserver = new MutationObserver(() => { m3Colors.value = getM3Colors() })\n // `class` flips light/dark, `data-palette` switches the palette (useColorPalette / createM3UI).\n themeObserver.observe(document.documentElement, { attributes: true, attributeFilter: ['class', 'style', 'data-palette'] })\n // Canvas text drawn before a web font finishes loading keeps the fallback, so redraw once it has\n document.fonts?.ready.then(() => { m3Colors.value = getM3Colors() })\n\n const [chartjs, vueChartjs] = await Promise.all([\n import('chart.js'),\n import('vue-chartjs'),\n ])\n\n chartjs.Chart.register(\n chartjs.CategoryScale,\n chartjs.LinearScale,\n chartjs.PointElement,\n chartjs.LineElement,\n chartjs.BarElement,\n chartjs.ArcElement,\n chartjs.RadialLinearScale,\n chartjs.Filler,\n chartjs.Tooltip,\n chartjs.Legend,\n chartjs.Title,\n )\n\n componentMap.value = {\n line: vueChartjs.Line,\n bar: vueChartjs.Bar,\n pie: vueChartjs.Pie,\n doughnut: vueChartjs.Doughnut,\n radar: vueChartjs.Radar,\n }\n\n ready.value = true\n})\n\nonBeforeUnmount(() => { themeObserver?.disconnect() })\n\nwatch(() => props.type, () => {\n if (ready.value) chartComponent.value = componentMap.value[props.type] ?? null\n}, { immediate: true })\n\nwatch(ready, () => {\n chartComponent.value = componentMap.value[props.type] ?? null\n})\n\nconst mergedOptions = computed<Record<string, any>>(() => {\n const c = m3Colors.value\n const base: Record<string, any> = {\n responsive: true,\n maintainAspectRatio: false,\n plugins: {\n legend: {\n labels: {\n color: c.onSurface,\n font: { family: c.fontFamily, size: 12 },\n usePointStyle: true,\n pointStyle: 'circle',\n padding: 16,\n },\n },\n tooltip: {\n backgroundColor: c.surfaceContainer,\n titleColor: c.onSurface,\n bodyColor: c.onSurfaceVariant,\n borderColor: c.outlineVariant,\n borderWidth: 1,\n cornerRadius: 12,\n padding: 12,\n titleFont: { family: c.fontFamily, size: 13, weight: '600' as const },\n bodyFont: { family: c.fontFamily, size: 12 },\n displayColors: true,\n boxPadding: 4,\n },\n },\n }\n\n if (props.type !== 'pie' && props.type !== 'doughnut') {\n base.scales = {\n x: {\n grid: { color: c.outlineVariant + '40', drawTicks: false },\n ticks: { color: c.onSurfaceVariant, font: { family: c.fontFamily, size: 11 }, padding: 8 },\n border: { color: c.outlineVariant },\n },\n y: {\n grid: { color: c.outlineVariant + '40', drawTicks: false },\n ticks: { color: c.onSurfaceVariant, font: { family: c.fontFamily, size: 11 }, padding: 8 },\n border: { color: c.outlineVariant },\n },\n }\n }\n\n if (props.type === 'radar') {\n base.scales = {\n r: {\n grid: { color: c.outlineVariant + '40' },\n angleLines: { color: c.outlineVariant + '40' },\n pointLabels: { color: c.onSurfaceVariant, font: { family: c.fontFamily, size: 11 } },\n ticks: { color: c.onSurfaceVariant, backdropColor: 'transparent', font: { family: c.fontFamily } },\n },\n }\n }\n\n return deepMerge(base, props.options ?? {})\n})\n\nfunction deepMerge(target: any, source: any): any {\n const output = { ...target }\n for (const key of Object.keys(source)) {\n if (source[key] && typeof source[key] === 'object' && !Array.isArray(source[key])) {\n output[key] = deepMerge(target[key] ?? {}, source[key])\n } else {\n output[key] = source[key]\n }\n }\n return output\n}\n</script>\n\n<template>\n <div class=\"rounded-lg border border-outline-variant bg-surface p-4\" :style=\"{ height }\">\n <component\n v-if=\"ready && chartComponent\"\n :is=\"chartComponent\"\n :data=\"data\"\n :options=\"mergedOptions\"\n />\n </div>\n</template>\n","<script setup lang=\"ts\">\n/**\n * A thin Chart.js wrapper — line, bar, pie, doughnut, and radar types, with legend/tooltip/axis colors that\n * automatically track the active M3 theme (light/dark, and any palette swap). Available from the `/chart` entry\n * point.\n */\nimport { computed, ref, watch, onMounted, onBeforeUnmount, shallowRef, type Component } from 'vue'\n\ntype ChartType = 'line' | 'bar' | 'pie' | 'doughnut' | 'radar'\n\nconst props = withDefaults(\n defineProps<{\n /** Chart type. Required — there is no default. */\n type: ChartType\n /** Chart.js data object with labels and datasets. Required — there is no default. */\n data: Record<string, any>\n /**\n * Chart.js options, deep-merged on top of MChart's own M3-themed defaults (legend/tooltip/axis colors that\n * track the active theme automatically)\n */\n options?: Record<string, any>\n /** Chart height */\n height?: string\n }>(),\n { height: '300px' },\n)\n\nconst ready = ref(false)\nconst chartComponent = shallowRef<Component | null>(null)\nconst componentMap = shallowRef<Record<string, Component>>({})\n\nfunction getM3Colors() {\n const style = getComputedStyle(document.documentElement)\n const get = (v: string) => style.getPropertyValue(v).trim()\n return {\n primary: get('--color-primary'),\n onSurface: get('--color-on-surface'),\n onSurfaceVariant: get('--color-on-surface-variant'),\n outlineVariant: get('--color-outline-variant'),\n surface: get('--color-surface'),\n surfaceContainer: get('--color-surface-container'),\n // Canvas can't resolve CSS vars, so pass Chart.js the resolved font stack\n fontFamily: get('--font-sans') || \"'Roboto', system-ui, sans-serif\",\n }\n}\n\nconst m3Colors = ref(getM3Colors())\n\nlet themeObserver: MutationObserver | null = null\n\nonMounted(async () => {\n m3Colors.value = getM3Colors()\n\n themeObserver = new MutationObserver(() => { m3Colors.value = getM3Colors() })\n // `class` flips light/dark, `data-palette` switches the palette (useColorPalette / createM3UI).\n themeObserver.observe(document.documentElement, { attributes: true, attributeFilter: ['class', 'style', 'data-palette'] })\n // Canvas text drawn before a web font finishes loading keeps the fallback, so redraw once it has\n document.fonts?.ready.then(() => { m3Colors.value = getM3Colors() })\n\n const [chartjs, vueChartjs] = await Promise.all([\n import('chart.js'),\n import('vue-chartjs'),\n ])\n\n chartjs.Chart.register(\n chartjs.CategoryScale,\n chartjs.LinearScale,\n chartjs.PointElement,\n chartjs.LineElement,\n chartjs.BarElement,\n chartjs.ArcElement,\n chartjs.RadialLinearScale,\n chartjs.Filler,\n chartjs.Tooltip,\n chartjs.Legend,\n chartjs.Title,\n )\n\n componentMap.value = {\n line: vueChartjs.Line,\n bar: vueChartjs.Bar,\n pie: vueChartjs.Pie,\n doughnut: vueChartjs.Doughnut,\n radar: vueChartjs.Radar,\n }\n\n ready.value = true\n})\n\nonBeforeUnmount(() => { themeObserver?.disconnect() })\n\nwatch(() => props.type, () => {\n if (ready.value) chartComponent.value = componentMap.value[props.type] ?? null\n}, { immediate: true })\n\nwatch(ready, () => {\n chartComponent.value = componentMap.value[props.type] ?? null\n})\n\nconst mergedOptions = computed<Record<string, any>>(() => {\n const c = m3Colors.value\n const base: Record<string, any> = {\n responsive: true,\n maintainAspectRatio: false,\n plugins: {\n legend: {\n labels: {\n color: c.onSurface,\n font: { family: c.fontFamily, size: 12 },\n usePointStyle: true,\n pointStyle: 'circle',\n padding: 16,\n },\n },\n tooltip: {\n backgroundColor: c.surfaceContainer,\n titleColor: c.onSurface,\n bodyColor: c.onSurfaceVariant,\n borderColor: c.outlineVariant,\n borderWidth: 1,\n cornerRadius: 12,\n padding: 12,\n titleFont: { family: c.fontFamily, size: 13, weight: '600' as const },\n bodyFont: { family: c.fontFamily, size: 12 },\n displayColors: true,\n boxPadding: 4,\n },\n },\n }\n\n if (props.type !== 'pie' && props.type !== 'doughnut') {\n base.scales = {\n x: {\n grid: { color: c.outlineVariant + '40', drawTicks: false },\n ticks: { color: c.onSurfaceVariant, font: { family: c.fontFamily, size: 11 }, padding: 8 },\n border: { color: c.outlineVariant },\n },\n y: {\n grid: { color: c.outlineVariant + '40', drawTicks: false },\n ticks: { color: c.onSurfaceVariant, font: { family: c.fontFamily, size: 11 }, padding: 8 },\n border: { color: c.outlineVariant },\n },\n }\n }\n\n if (props.type === 'radar') {\n base.scales = {\n r: {\n grid: { color: c.outlineVariant + '40' },\n angleLines: { color: c.outlineVariant + '40' },\n pointLabels: { color: c.onSurfaceVariant, font: { family: c.fontFamily, size: 11 } },\n ticks: { color: c.onSurfaceVariant, backdropColor: 'transparent', font: { family: c.fontFamily } },\n },\n }\n }\n\n return deepMerge(base, props.options ?? {})\n})\n\nfunction deepMerge(target: any, source: any): any {\n const output = { ...target }\n for (const key of Object.keys(source)) {\n if (source[key] && typeof source[key] === 'object' && !Array.isArray(source[key])) {\n output[key] = deepMerge(target[key] ?? {}, source[key])\n } else {\n output[key] = source[key]\n }\n }\n return output\n}\n</script>\n\n<template>\n <div class=\"rounded-lg border border-outline-variant bg-surface p-4\" :style=\"{ height }\">\n <component\n v-if=\"ready && chartComponent\"\n :is=\"chartComponent\"\n :data=\"data\"\n :options=\"mergedOptions\"\n />\n </div>\n</template>\n"],"mappings":"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"}
1
+ {"version":3,"file":"chart.js","names":[],"sources":["../src/components/MChart.vue","../src/components/MChart.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * A thin Chart.js wrapper — line, bar, pie, doughnut, and radar types, with legend/tooltip/axis colors that\n * automatically track the active M3 theme (light/dark, and any palette swap). Available from the `/chart` entry\n * point.\n */\nimport { computed, ref, watch, onMounted, onBeforeUnmount, shallowRef, type Component } from 'vue'\n\ntype ChartType = 'line' | 'bar' | 'pie' | 'doughnut' | 'radar'\n\nconst props = withDefaults(\n defineProps<{\n /** Chart type. Required — there is no default. */\n type: ChartType\n /** Chart.js data object with labels and datasets. Required — there is no default. */\n data: Record<string, any>\n /**\n * Chart.js options, deep-merged on top of MChart's own M3-themed defaults (legend/tooltip/axis colors that\n * track the active theme automatically)\n */\n options?: Record<string, any>\n /** Chart height */\n height?: string\n }>(),\n { height: '300px' },\n)\n\nconst ready = ref(false)\nconst chartComponent = shallowRef<Component | null>(null)\nconst componentMap = shallowRef<Record<string, Component>>({})\n\nfunction getM3Colors() {\n // No DOM on the server (SSR): the chart only draws on the client, which reads them again in onMounted\n const style = typeof document === 'undefined' ? null : getComputedStyle(document.documentElement)\n const get = (v: string) => style?.getPropertyValue(v).trim() ?? ''\n return {\n primary: get('--color-primary'),\n onSurface: get('--color-on-surface'),\n onSurfaceVariant: get('--color-on-surface-variant'),\n outlineVariant: get('--color-outline-variant'),\n surface: get('--color-surface'),\n surfaceContainer: get('--color-surface-container'),\n // Canvas can't resolve CSS vars, so pass Chart.js the resolved font stack\n fontFamily: get('--font-sans') || \"'Roboto', system-ui, sans-serif\",\n }\n}\n\nconst m3Colors = ref(getM3Colors())\n\nlet themeObserver: MutationObserver | null = null\n\nonMounted(async () => {\n m3Colors.value = getM3Colors()\n\n themeObserver = new MutationObserver(() => { m3Colors.value = getM3Colors() })\n // `class` flips light/dark, `data-palette` switches the palette (useColorPalette / createM3UI).\n themeObserver.observe(document.documentElement, { attributes: true, attributeFilter: ['class', 'style', 'data-palette'] })\n // Canvas text drawn before a web font finishes loading keeps the fallback, so redraw once it has\n document.fonts?.ready.then(() => { m3Colors.value = getM3Colors() })\n\n const [chartjs, vueChartjs] = await Promise.all([\n import('chart.js'),\n import('vue-chartjs'),\n ])\n\n chartjs.Chart.register(\n chartjs.CategoryScale,\n chartjs.LinearScale,\n chartjs.PointElement,\n chartjs.LineElement,\n chartjs.BarElement,\n chartjs.ArcElement,\n chartjs.RadialLinearScale,\n chartjs.Filler,\n chartjs.Tooltip,\n chartjs.Legend,\n chartjs.Title,\n )\n\n componentMap.value = {\n line: vueChartjs.Line,\n bar: vueChartjs.Bar,\n pie: vueChartjs.Pie,\n doughnut: vueChartjs.Doughnut,\n radar: vueChartjs.Radar,\n }\n\n ready.value = true\n})\n\nonBeforeUnmount(() => { themeObserver?.disconnect() })\n\nwatch(() => props.type, () => {\n if (ready.value) chartComponent.value = componentMap.value[props.type] ?? null\n}, { immediate: true })\n\nwatch(ready, () => {\n chartComponent.value = componentMap.value[props.type] ?? null\n})\n\nconst mergedOptions = computed<Record<string, any>>(() => {\n const c = m3Colors.value\n const base: Record<string, any> = {\n responsive: true,\n maintainAspectRatio: false,\n plugins: {\n legend: {\n labels: {\n color: c.onSurface,\n font: { family: c.fontFamily, size: 12 },\n usePointStyle: true,\n pointStyle: 'circle',\n padding: 16,\n },\n },\n tooltip: {\n backgroundColor: c.surfaceContainer,\n titleColor: c.onSurface,\n bodyColor: c.onSurfaceVariant,\n borderColor: c.outlineVariant,\n borderWidth: 1,\n cornerRadius: 12,\n padding: 12,\n titleFont: { family: c.fontFamily, size: 13, weight: '600' as const },\n bodyFont: { family: c.fontFamily, size: 12 },\n displayColors: true,\n boxPadding: 4,\n },\n },\n }\n\n if (props.type !== 'pie' && props.type !== 'doughnut') {\n base.scales = {\n x: {\n grid: { color: c.outlineVariant + '40', drawTicks: false },\n ticks: { color: c.onSurfaceVariant, font: { family: c.fontFamily, size: 11 }, padding: 8 },\n border: { color: c.outlineVariant },\n },\n y: {\n grid: { color: c.outlineVariant + '40', drawTicks: false },\n ticks: { color: c.onSurfaceVariant, font: { family: c.fontFamily, size: 11 }, padding: 8 },\n border: { color: c.outlineVariant },\n },\n }\n }\n\n if (props.type === 'radar') {\n base.scales = {\n r: {\n grid: { color: c.outlineVariant + '40' },\n angleLines: { color: c.outlineVariant + '40' },\n pointLabels: { color: c.onSurfaceVariant, font: { family: c.fontFamily, size: 11 } },\n ticks: { color: c.onSurfaceVariant, backdropColor: 'transparent', font: { family: c.fontFamily } },\n },\n }\n }\n\n return deepMerge(base, props.options ?? {})\n})\n\nfunction deepMerge(target: any, source: any): any {\n const output = { ...target }\n for (const key of Object.keys(source)) {\n if (source[key] && typeof source[key] === 'object' && !Array.isArray(source[key])) {\n output[key] = deepMerge(target[key] ?? {}, source[key])\n } else {\n output[key] = source[key]\n }\n }\n return output\n}\n</script>\n\n<template>\n <div class=\"rounded-lg border border-outline-variant bg-surface p-4\" :style=\"{ height }\">\n <component\n v-if=\"ready && chartComponent\"\n :is=\"chartComponent\"\n :data=\"data\"\n :options=\"mergedOptions\"\n />\n </div>\n</template>\n","<script setup lang=\"ts\">\n/**\n * A thin Chart.js wrapper — line, bar, pie, doughnut, and radar types, with legend/tooltip/axis colors that\n * automatically track the active M3 theme (light/dark, and any palette swap). Available from the `/chart` entry\n * point.\n */\nimport { computed, ref, watch, onMounted, onBeforeUnmount, shallowRef, type Component } from 'vue'\n\ntype ChartType = 'line' | 'bar' | 'pie' | 'doughnut' | 'radar'\n\nconst props = withDefaults(\n defineProps<{\n /** Chart type. Required — there is no default. */\n type: ChartType\n /** Chart.js data object with labels and datasets. Required — there is no default. */\n data: Record<string, any>\n /**\n * Chart.js options, deep-merged on top of MChart's own M3-themed defaults (legend/tooltip/axis colors that\n * track the active theme automatically)\n */\n options?: Record<string, any>\n /** Chart height */\n height?: string\n }>(),\n { height: '300px' },\n)\n\nconst ready = ref(false)\nconst chartComponent = shallowRef<Component | null>(null)\nconst componentMap = shallowRef<Record<string, Component>>({})\n\nfunction getM3Colors() {\n // No DOM on the server (SSR): the chart only draws on the client, which reads them again in onMounted\n const style = typeof document === 'undefined' ? null : getComputedStyle(document.documentElement)\n const get = (v: string) => style?.getPropertyValue(v).trim() ?? ''\n return {\n primary: get('--color-primary'),\n onSurface: get('--color-on-surface'),\n onSurfaceVariant: get('--color-on-surface-variant'),\n outlineVariant: get('--color-outline-variant'),\n surface: get('--color-surface'),\n surfaceContainer: get('--color-surface-container'),\n // Canvas can't resolve CSS vars, so pass Chart.js the resolved font stack\n fontFamily: get('--font-sans') || \"'Roboto', system-ui, sans-serif\",\n }\n}\n\nconst m3Colors = ref(getM3Colors())\n\nlet themeObserver: MutationObserver | null = null\n\nonMounted(async () => {\n m3Colors.value = getM3Colors()\n\n themeObserver = new MutationObserver(() => { m3Colors.value = getM3Colors() })\n // `class` flips light/dark, `data-palette` switches the palette (useColorPalette / createM3UI).\n themeObserver.observe(document.documentElement, { attributes: true, attributeFilter: ['class', 'style', 'data-palette'] })\n // Canvas text drawn before a web font finishes loading keeps the fallback, so redraw once it has\n document.fonts?.ready.then(() => { m3Colors.value = getM3Colors() })\n\n const [chartjs, vueChartjs] = await Promise.all([\n import('chart.js'),\n import('vue-chartjs'),\n ])\n\n chartjs.Chart.register(\n chartjs.CategoryScale,\n chartjs.LinearScale,\n chartjs.PointElement,\n chartjs.LineElement,\n chartjs.BarElement,\n chartjs.ArcElement,\n chartjs.RadialLinearScale,\n chartjs.Filler,\n chartjs.Tooltip,\n chartjs.Legend,\n chartjs.Title,\n )\n\n componentMap.value = {\n line: vueChartjs.Line,\n bar: vueChartjs.Bar,\n pie: vueChartjs.Pie,\n doughnut: vueChartjs.Doughnut,\n radar: vueChartjs.Radar,\n }\n\n ready.value = true\n})\n\nonBeforeUnmount(() => { themeObserver?.disconnect() })\n\nwatch(() => props.type, () => {\n if (ready.value) chartComponent.value = componentMap.value[props.type] ?? null\n}, { immediate: true })\n\nwatch(ready, () => {\n chartComponent.value = componentMap.value[props.type] ?? null\n})\n\nconst mergedOptions = computed<Record<string, any>>(() => {\n const c = m3Colors.value\n const base: Record<string, any> = {\n responsive: true,\n maintainAspectRatio: false,\n plugins: {\n legend: {\n labels: {\n color: c.onSurface,\n font: { family: c.fontFamily, size: 12 },\n usePointStyle: true,\n pointStyle: 'circle',\n padding: 16,\n },\n },\n tooltip: {\n backgroundColor: c.surfaceContainer,\n titleColor: c.onSurface,\n bodyColor: c.onSurfaceVariant,\n borderColor: c.outlineVariant,\n borderWidth: 1,\n cornerRadius: 12,\n padding: 12,\n titleFont: { family: c.fontFamily, size: 13, weight: '600' as const },\n bodyFont: { family: c.fontFamily, size: 12 },\n displayColors: true,\n boxPadding: 4,\n },\n },\n }\n\n if (props.type !== 'pie' && props.type !== 'doughnut') {\n base.scales = {\n x: {\n grid: { color: c.outlineVariant + '40', drawTicks: false },\n ticks: { color: c.onSurfaceVariant, font: { family: c.fontFamily, size: 11 }, padding: 8 },\n border: { color: c.outlineVariant },\n },\n y: {\n grid: { color: c.outlineVariant + '40', drawTicks: false },\n ticks: { color: c.onSurfaceVariant, font: { family: c.fontFamily, size: 11 }, padding: 8 },\n border: { color: c.outlineVariant },\n },\n }\n }\n\n if (props.type === 'radar') {\n base.scales = {\n r: {\n grid: { color: c.outlineVariant + '40' },\n angleLines: { color: c.outlineVariant + '40' },\n pointLabels: { color: c.onSurfaceVariant, font: { family: c.fontFamily, size: 11 } },\n ticks: { color: c.onSurfaceVariant, backdropColor: 'transparent', font: { family: c.fontFamily } },\n },\n }\n }\n\n return deepMerge(base, props.options ?? {})\n})\n\nfunction deepMerge(target: any, source: any): any {\n const output = { ...target }\n for (const key of Object.keys(source)) {\n if (source[key] && typeof source[key] === 'object' && !Array.isArray(source[key])) {\n output[key] = deepMerge(target[key] ?? {}, source[key])\n } else {\n output[key] = source[key]\n }\n }\n return output\n}\n</script>\n\n<template>\n <div class=\"rounded-lg border border-outline-variant bg-surface p-4\" :style=\"{ height }\">\n <component\n v-if=\"ready && chartComponent\"\n :is=\"chartComponent\"\n :data=\"data\"\n :options=\"mergedOptions\"\n />\n </div>\n</template>\n"],"mappings":"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"}
@@ -1,4 +1,4 @@
1
- import { i as e } from "./useLocale-CuvWRZ1h.js";
1
+ import { i as e } from "./useLocale-b5-hzsL3.js";
2
2
  import { t } from "./MIcon-DLOkQduI.js";
3
3
  import { t as n } from "./_plugin-vue_export-helper-B3ysoDQm.js";
4
4
  import { computed as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, normalizeClass as u, normalizeStyle as d, onBeforeUnmount as f, onMounted as p, openBlock as m, ref as h, renderSlot as g, toDisplayString as _, watch as v, withCtx as y } from "vue";
@@ -1,7 +1,7 @@
1
1
  type __VLS_Props = {
2
2
  /** Material Symbol icon name */
3
3
  icon: string;
4
- /** Accessible label (aria-label and title) */
4
+ /** Accessible label (its aria-label; no visible tooltip: wrap it in MTooltip for one) */
5
5
  label?: string;
6
6
  /** Visual style */
7
7
  variant?: 'standard' | 'filled' | 'tonal' | 'outlined';
@@ -0,0 +1,74 @@
1
+ import type * as Maplibre from 'maplibre-gl';
2
+ import type { MapAdapter } from '../composables/mapAdapters';
3
+ export type MapControlPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
4
+ type __VLS_Props = {
5
+ /** The map's style: a style JSON URL or a style object (MapLibre's `StyleSpecification`). Changing it reloads the style */
6
+ mapStyle: string | Maplibre.StyleSpecification;
7
+ /** `[lng, lat]` (v-model). When left out, the style's (or the remembered view's) */
8
+ center?: [number, number];
9
+ /** Zoom level (v-model) */
10
+ zoom?: number;
11
+ /** Rotation in degrees (v-model) */
12
+ bearing?: number;
13
+ /** Tilt in degrees (v-model) */
14
+ pitch?: number;
15
+ /**
16
+ * Remember the view (center, zoom, bearing, pitch) in localStorage and start from it on the next visit: `true`
17
+ * under `m3-map-view`, or your own key (one per map)
18
+ */
19
+ persist?: boolean | string;
20
+ /** Zoom and compass buttons: `false`, or a corner (`true` is top-right) */
21
+ navigation?: boolean | MapControlPosition;
22
+ /** A button that centers the map on the user's location and follows it: `false`, or a corner (`true` is top-right) */
23
+ geolocate?: boolean | MapControlPosition;
24
+ /** A fullscreen button: `false`, or a corner (`true` is top-right) */
25
+ fullscreen?: boolean | MapControlPosition;
26
+ /** A metric scale bar: `false`, or a corner (`true` is bottom-left) */
27
+ scale?: boolean | MapControlPosition;
28
+ /** The style's attribution, compact: `false`, or a corner (`true` is bottom-right). Most tile providers require it */
29
+ attribution?: boolean | MapControlPosition;
30
+ /** Anything else for MapLibre's `Map` constructor (`maxZoom`, `maxBounds`, `cooperativeGestures`…) */
31
+ options?: Partial<Omit<Maplibre.MapOptions, 'container' | 'style'>>;
32
+ /**
33
+ * Reads the style's conventions (layer names, groups, base layers, what to identify or show on hover) for
34
+ * `MMapLayers`, `MMapBaseLayers`, `MMapIdentify` and `MMapHover`: `genericAdapter`, `orvianAdapter()`, or your own
35
+ */
36
+ adapter?: MapAdapter;
37
+ };
38
+ declare var __VLS_1: {};
39
+ type __VLS_Slots = {} & {
40
+ default?: (props: typeof __VLS_1) => any;
41
+ };
42
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
43
+ /** The MapLibre map, once loaded */
44
+ map: import("vue").ShallowRef<Maplibre.Map | undefined, Maplibre.Map | undefined>;
45
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
46
+ ready: (map: Maplibre.Map) => any;
47
+ click: (event: Maplibre.MapMouseEvent) => any;
48
+ "update:center": (center: [number, number]) => any;
49
+ "update:zoom": (zoom: number) => any;
50
+ "update:bearing": (bearing: number) => any;
51
+ "update:pitch": (pitch: number) => any;
52
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
53
+ onReady?: ((map: Maplibre.Map) => any) | undefined;
54
+ onClick?: ((event: Maplibre.MapMouseEvent) => any) | undefined;
55
+ "onUpdate:center"?: ((center: [number, number]) => any) | undefined;
56
+ "onUpdate:zoom"?: ((zoom: number) => any) | undefined;
57
+ "onUpdate:bearing"?: ((bearing: number) => any) | undefined;
58
+ "onUpdate:pitch"?: ((pitch: number) => any) | undefined;
59
+ }>, {
60
+ fullscreen: boolean | MapControlPosition;
61
+ navigation: boolean | MapControlPosition;
62
+ scale: boolean | MapControlPosition;
63
+ persist: boolean | string;
64
+ geolocate: boolean | MapControlPosition;
65
+ attribution: boolean | MapControlPosition;
66
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
67
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
68
+ declare const _default: typeof __VLS_export;
69
+ export default _default;
70
+ type __VLS_WithSlots<T, S> = T & {
71
+ new (): {
72
+ $slots: S;
73
+ };
74
+ };
@@ -0,0 +1,15 @@
1
+ type __VLS_Props = {
2
+ /** Prefix for the thumbnails' paths (e.g. `/images/`); full URLs are used as they are */
3
+ imageBase?: string;
4
+ /** Offer "no base layer" */
5
+ none?: boolean;
6
+ /** Lay them out in a column */
7
+ vertical?: boolean;
8
+ };
9
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
10
+ none: boolean;
11
+ vertical: boolean;
12
+ imageBase: string;
13
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
@@ -0,0 +1,23 @@
1
+ import type { MapControlPosition } from './MMap.vue';
2
+ type __VLS_Props = {
3
+ /** The corner */
4
+ position?: MapControlPosition;
5
+ /** Draw it as a control group (a surface with dividers between buttons), like MapLibre's zoom buttons */
6
+ group?: boolean;
7
+ };
8
+ declare var __VLS_1: {};
9
+ type __VLS_Slots = {} & {
10
+ default?: (props: typeof __VLS_1) => any;
11
+ };
12
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
13
+ position: MapControlPosition;
14
+ group: boolean;
15
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
17
+ declare const _default: typeof __VLS_export;
18
+ export default _default;
19
+ type __VLS_WithSlots<T, S> = T & {
20
+ new (): {
21
+ $slots: S;
22
+ };
23
+ };
@@ -0,0 +1,25 @@
1
+ import type { MapIdentifyResult } from '../composables/mapAdapters';
2
+ type __VLS_Props = {
3
+ /** What was found */
4
+ results: MapIdentifyResult[];
5
+ };
6
+ declare var __VLS_6: {
7
+ field: {
8
+ key: string;
9
+ label: string;
10
+ value: string;
11
+ };
12
+ result: MapIdentifyResult;
13
+ };
14
+ type __VLS_Slots = {} & {
15
+ value?: (props: typeof __VLS_6) => any;
16
+ };
17
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
19
+ declare const _default: typeof __VLS_export;
20
+ export default _default;
21
+ type __VLS_WithSlots<T, S> = T & {
22
+ new (): {
23
+ $slots: S;
24
+ };
25
+ };
@@ -0,0 +1,19 @@
1
+ type __VLS_Props = {
2
+ /** The layer's id */
3
+ layer: string;
4
+ /** The property to filter by */
5
+ property: string;
6
+ /** The values to offer (labels in `labels`); by default the ones found in the layer's loaded features */
7
+ values?: (string | number)[];
8
+ /** Labels for the values, by value */
9
+ labels?: Record<string, string>;
10
+ /** The selected values (v-model) */
11
+ modelValue?: (string | number)[];
12
+ };
13
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
14
+ "update:modelValue": (values: (string | number)[]) => any;
15
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
16
+ "onUpdate:modelValue"?: ((values: (string | number)[]) => any) | undefined;
17
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
@@ -0,0 +1,34 @@
1
+ import type * as Maplibre from 'maplibre-gl';
2
+ type DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
3
+ /** A layer of `MMapGeoJson`: any MapLibre layer without its `source` (and `id`, made up when left out). */
4
+ export type MapGeoJsonLayer = DistributiveOmit<Exclude<Maplibre.LayerSpecification, Maplibre.BackgroundLayerSpecification>, 'id' | 'source'> & {
5
+ id?: string;
6
+ };
7
+ type __VLS_Props = {
8
+ /** A GeoJSON object, or the URL of one */
9
+ data: Maplibre.GeoJSONSourceSpecification['data'];
10
+ /** The source's id (and the prefix of its layers' made-up ids). Unique on the map; generated when left out */
11
+ id?: string;
12
+ /** How to draw it: MapLibre layers without `source`. Defaults to theme-colored fill, outline, line and circle layers */
13
+ layers?: MapGeoJsonLayer[];
14
+ /** Insert the layers below this layer id (e.g. under the style's labels) */
15
+ before?: string;
16
+ /** Show a pointer over its features (set it when you handle `click`) */
17
+ interactive?: boolean;
18
+ /** More options for the GeoJSON source (`cluster`, `promoteId`, `tolerance`…) */
19
+ sourceOptions?: Partial<Omit<Maplibre.GeoJSONSourceSpecification, 'type' | 'data'>>;
20
+ };
21
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
22
+ /** The source's id */
23
+ sourceId: string;
24
+ /** The ids of its layers on the map */
25
+ layerIds: () => string[];
26
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
27
+ click: (event: Maplibre.MapLayerMouseEvent) => any;
28
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
29
+ onClick?: ((event: Maplibre.MapLayerMouseEvent) => any) | undefined;
30
+ }>, {
31
+ interactive: boolean;
32
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
33
+ declare const _default: typeof __VLS_export;
34
+ export default _default;
@@ -0,0 +1,17 @@
1
+ import type { MapControlPosition } from './MMap.vue';
2
+ type __VLS_Props = {
3
+ /** On (v-model) */
4
+ modelValue?: boolean;
5
+ /** Its on/off button: `false`, or a corner (`true` is top-right) */
6
+ control?: boolean | MapControlPosition;
7
+ };
8
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
9
+ "update:modelValue": (on: boolean) => any;
10
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
11
+ "onUpdate:modelValue"?: ((on: boolean) => any) | undefined;
12
+ }>, {
13
+ modelValue: boolean;
14
+ control: boolean | MapControlPosition;
15
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
@@ -0,0 +1,37 @@
1
+ import { type MapIdentifyResult } from '../composables/mapAdapters';
2
+ type __VLS_Props = {
3
+ /** Listen to clicks. It also pauses by itself while another tool owns them (`MMapMeasure` measuring) */
4
+ enabled?: boolean;
5
+ /** Show the results in a popup at the click */
6
+ popup?: boolean;
7
+ /** Mark where the user clicked while there are results */
8
+ marker?: boolean;
9
+ };
10
+ declare function close(): void;
11
+ declare var __VLS_12: {
12
+ results: MapIdentifyResult[];
13
+ lngLat: [number, number];
14
+ close: typeof close;
15
+ };
16
+ type __VLS_Slots = {} & {
17
+ default?: (props: typeof __VLS_12) => any;
18
+ };
19
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
20
+ close: typeof close;
21
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
22
+ identify: (results: MapIdentifyResult[], lngLat: [number, number]) => any;
23
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
24
+ onIdentify?: ((results: MapIdentifyResult[], lngLat: [number, number]) => any) | undefined;
25
+ }>, {
26
+ marker: boolean;
27
+ popup: boolean;
28
+ enabled: boolean;
29
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
30
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
31
+ declare const _default: typeof __VLS_export;
32
+ export default _default;
33
+ type __VLS_WithSlots<T, S> = T & {
34
+ new (): {
35
+ $slots: S;
36
+ };
37
+ };
@@ -0,0 +1,31 @@
1
+ import type { MapLayerInfo } from '../composables/mapAdapters';
2
+ type __VLS_Props = {
3
+ /** Show the search field */
4
+ search?: boolean;
5
+ /** Groups start collapsed */
6
+ collapsed?: boolean;
7
+ };
8
+ declare var __VLS_25: {
9
+ layer: MapLayerInfo;
10
+ visible: boolean;
11
+ }, __VLS_36: {
12
+ layer: MapLayerInfo;
13
+ visible: boolean;
14
+ };
15
+ type __VLS_Slots = {} & {
16
+ actions?: (props: typeof __VLS_25) => any;
17
+ } & {
18
+ actions?: (props: typeof __VLS_36) => any;
19
+ };
20
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
21
+ search: boolean;
22
+ collapsed: boolean;
23
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
25
+ declare const _default: typeof __VLS_export;
26
+ export default _default;
27
+ type __VLS_WithSlots<T, S> = T & {
28
+ new (): {
29
+ $slots: S;
30
+ };
31
+ };
@@ -0,0 +1,42 @@
1
+ import type * as Maplibre from 'maplibre-gl';
2
+ type __VLS_Props = {
3
+ /** Position, `[lng, lat]` (v-model with `draggable`) */
4
+ lngLat: [number, number];
5
+ /** The pin's color (any CSS color). Defaults to the theme's primary; ignored with custom content */
6
+ color?: string;
7
+ /** Let the user drag it */
8
+ draggable?: boolean;
9
+ /** Which part of the marker sits on `lngLat`. Defaults to `bottom` for the pin, `center` for custom content */
10
+ anchor?: Maplibre.PositionAnchor;
11
+ /** Offset in pixels, `[x, y]` */
12
+ offset?: [number, number];
13
+ /** Rotation in degrees */
14
+ rotation?: number;
15
+ };
16
+ declare var __VLS_1: {}, __VLS_3: {};
17
+ type __VLS_Slots = {} & {
18
+ default?: (props: typeof __VLS_1) => any;
19
+ } & {
20
+ popup?: (props: typeof __VLS_3) => any;
21
+ };
22
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
23
+ /** The MapLibre marker */
24
+ marker: () => Maplibre.Marker | undefined;
25
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
26
+ click: (event: MouseEvent) => any;
27
+ "update:lngLat": (lngLat: [number, number]) => any;
28
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
29
+ onClick?: ((event: MouseEvent) => any) | undefined;
30
+ "onUpdate:lngLat"?: ((lngLat: [number, number]) => any) | undefined;
31
+ }>, {
32
+ rotation: number;
33
+ draggable: boolean;
34
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
35
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
36
+ declare const _default: typeof __VLS_export;
37
+ export default _default;
38
+ type __VLS_WithSlots<T, S> = T & {
39
+ new (): {
40
+ $slots: S;
41
+ };
42
+ };
@@ -0,0 +1,43 @@
1
+ import { type LngLat } from '../composables/_mapGeometry';
2
+ import type { MapControlPosition } from './MMap.vue';
3
+ type Mode = 'distance' | 'area';
4
+ type __VLS_Props = {
5
+ /** The measuring mode (v-model): `'distance'`, `'area'`, or null. Set it to start measuring from outside */
6
+ modelValue?: Mode | null;
7
+ /** Its buttons: `false` (drive it with v-model), or a corner (`true` is top-right) */
8
+ control?: boolean | MapControlPosition;
9
+ };
10
+ declare function start(next: Mode): void;
11
+ declare function finish(byEscape?: boolean): void;
12
+ /** Deletes one finished measurement. */
13
+ declare function remove(index: number): void;
14
+ declare function clear(): void;
15
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
16
+ start: typeof start;
17
+ finish: typeof finish;
18
+ clear: typeof clear;
19
+ remove: typeof remove;
20
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
21
+ "update:modelValue": (mode: Mode | null) => any;
22
+ change: (measurements: {
23
+ mode: Mode;
24
+ points: LngLat[];
25
+ closed: boolean;
26
+ length: number;
27
+ area?: number;
28
+ }[]) => any;
29
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
30
+ "onUpdate:modelValue"?: ((mode: Mode | null) => any) | undefined;
31
+ onChange?: ((measurements: {
32
+ mode: Mode;
33
+ points: LngLat[];
34
+ closed: boolean;
35
+ length: number;
36
+ area?: number;
37
+ }[]) => any) | undefined;
38
+ }>, {
39
+ modelValue: Mode | null;
40
+ control: boolean | MapControlPosition;
41
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
42
+ declare const _default: typeof __VLS_export;
43
+ export default _default;
@@ -0,0 +1,43 @@
1
+ import type * as Maplibre from 'maplibre-gl';
2
+ type __VLS_Props = {
3
+ /** Position, `[lng, lat]` */
4
+ lngLat: [number, number];
5
+ /** Shown (v-model) */
6
+ open?: boolean;
7
+ /** Show a close button */
8
+ closeButton?: boolean;
9
+ /** Close it when the map is clicked */
10
+ closeOnClick?: boolean;
11
+ /** Where the popup sits relative to `lngLat`. By default MapLibre picks the side with room */
12
+ anchor?: Maplibre.PositionAnchor;
13
+ /** Offset in pixels from `lngLat` */
14
+ offset?: number;
15
+ /** Maximum width (CSS) */
16
+ maxWidth?: string;
17
+ };
18
+ declare var __VLS_1: {};
19
+ type __VLS_Slots = {} & {
20
+ default?: (props: typeof __VLS_1) => any;
21
+ };
22
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
23
+ /** The MapLibre popup */
24
+ popup: () => Maplibre.Popup | undefined;
25
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
26
+ "update:open": (open: boolean) => any;
27
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
28
+ "onUpdate:open"?: ((open: boolean) => any) | undefined;
29
+ }>, {
30
+ offset: number;
31
+ open: boolean;
32
+ maxWidth: string;
33
+ closeButton: boolean;
34
+ closeOnClick: boolean;
35
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
36
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
37
+ declare const _default: typeof __VLS_export;
38
+ export default _default;
39
+ type __VLS_WithSlots<T, S> = T & {
40
+ new (): {
41
+ $slots: S;
42
+ };
43
+ };
@@ -0,0 +1,28 @@
1
+ import { type MapSearchProvider, type MapSearchResult } from '../composables/mapSearch';
2
+ import type { MapControlPosition } from './MMap.vue';
3
+ type __VLS_Props = {
4
+ /** Where to search: `nominatimProvider(options)` by default, or your own function */
5
+ provider?: MapSearchProvider;
6
+ /** The corner */
7
+ position?: MapControlPosition;
8
+ /** The field's placeholder (the locale's "Search places" by default) */
9
+ placeholder?: string;
10
+ /** The zoom to fly to for a result without an extent */
11
+ zoom?: number;
12
+ /** Mark the picked result */
13
+ marker?: boolean;
14
+ /** Search while typing (debounced), for providers that allow it; Nominatim's public server doesn't */
15
+ instant?: boolean;
16
+ };
17
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
18
+ select: (result: MapSearchResult) => any;
19
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
20
+ onSelect?: ((result: MapSearchResult) => any) | undefined;
21
+ }>, {
22
+ marker: boolean;
23
+ position: MapControlPosition;
24
+ instant: boolean;
25
+ zoom: number;
26
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
27
+ declare const _default: typeof __VLS_export;
28
+ export default _default;
@@ -2,18 +2,24 @@ export type ShaderRenderer = 'auto' | 'webgpu' | 'webgl';
2
2
  export type ShaderStatus = 'loading' | 'ready' | 'error' | 'fallback';
3
3
  type __VLS_Props = {
4
4
  /** GLSL fragment shader body (Shadertoy-style): must define `mainImage(out vec4 fragColor, in vec2 fragCoord)`.
5
- * Runs on WebGL2. Always required as the compatible baseline. */
5
+ * Runs on WebGL2. Always required as the compatible baseline. Don't write the `#version`, the precision or any
6
+ * uniform: the component puts them in front of your code, with Shadertoy's `iTime` (seconds, stops while
7
+ * paused), `iResolution` (canvas size in device pixels), `iMouse` and `iFrame`, plus one per `uniforms` key. */
6
8
  code: string;
7
9
  /** Optional WGSL fragment shader module, e.g. `@fragment fn fs_main(@builtin(position) pos: vec4f) -> @location(0) vec4f`.
8
10
  * Runs on WebGPU when available. Must declare its own bindings — see docs for the required uniform buffer layout. */
9
11
  wgsl?: string;
10
12
  /** Which backend to use. 'auto' picks WebGPU when `wgsl` is set and supported, else WebGL2. */
11
13
  renderer?: ShaderRenderer;
12
- /** Custom uniforms. Keys/shape are locked in at mount time; only values are reactive per frame. */
14
+ /** Custom uniforms, read every frame. In GLSL each key is declared for you, as a `float` for a number or a
15
+ * `vec2`–`vec4` for an array; in WGSL they're binding 1, one `vec4f` per key in this order. Keys and shapes
16
+ * are fixed when the shader compiles (on mount, or when `code`/`wgsl`/`renderer` change); values can change
17
+ * freely, e.g. to drive the shader from your own clock instead of `iTime`. */
13
18
  uniforms?: Record<string, number | number[]>;
14
19
  /** Freezes the render loop and the shader clock */
15
20
  paused?: boolean;
16
- /** Device pixel ratio to render at. Defaults to devicePixelRatio, capped at 2 for performance. */
21
+ /** Device pixels per CSS pixel to render at. Defaults to devicePixelRatio, capped at 2 for performance. Lower it to
22
+ * render fewer pixels (a "quality" setting); the canvas is resized when it changes. */
17
23
  pixelRatio?: number;
18
24
  };
19
25
  declare var __VLS_1: {}, __VLS_8: {}, __VLS_10: {
@@ -0,0 +1,25 @@
1
+ import type { MapLayerInfo } from '../composables/mapAdapters';
2
+ type __VLS_Props = {
3
+ layer: MapLayerInfo;
4
+ expanded: boolean;
5
+ };
6
+ declare var __VLS_28: {
7
+ layer: MapLayerInfo;
8
+ visible: boolean;
9
+ };
10
+ type __VLS_Slots = {} & {
11
+ actions?: (props: typeof __VLS_28) => any;
12
+ };
13
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
14
+ "toggle-expanded": () => any;
15
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
16
+ "onToggle-expanded"?: (() => any) | undefined;
17
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
19
+ declare const _default: typeof __VLS_export;
20
+ export default _default;
21
+ type __VLS_WithSlots<T, S> = T & {
22
+ new (): {
23
+ $slots: S;
24
+ };
25
+ };
@@ -0,0 +1,4 @@
1
+ import { type InjectionKey } from 'vue';
2
+ export declare const M3_HYDRATING_KEY: InjectionKey<() => boolean>;
3
+ /** Whether the calling component is being hydrated from server-rendered HTML (false outside a component's setup). */
4
+ export declare function isHydrating(): boolean;
@@ -0,0 +1,13 @@
1
+ export type LngLat = [number, number];
2
+ /** Great-circle distance between two points, in meters (haversine). */
3
+ export declare function distance(a: LngLat, b: LngLat): number;
4
+ /** The length of a path, in meters. */
5
+ export declare function pathLength(points: LngLat[]): number;
6
+ /** The point halfway along the great circle between two points. */
7
+ export declare function midpoint(a: LngLat, b: LngLat): LngLat;
8
+ /** The area of a ring (closed or not), in square meters, on the sphere (@turf/area's formula). */
9
+ export declare function ringArea(points: LngLat[]): number;
10
+ /** The ring with its first point repeated at the end. */
11
+ export declare function closeRing(points: LngLat[]): LngLat[];
12
+ /** Where to label a polygon: its area centroid (in degrees, fine at a measuring scale), or the vertices' mean. */
13
+ export declare function centroid(points: LngLat[]): LngLat;