@m3ui-vue/m3ui-vue 1.6.1 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/API.md +1 -1
- package/dist/MColorPickerModal-NtkihoK6.js +577 -0
- package/dist/MColorPickerModal-NtkihoK6.js.map +1 -0
- package/dist/MTooltip-CK39Zon4.js +183 -0
- package/dist/MTooltip-CK39Zon4.js.map +1 -0
- package/dist/api.json +1 -1
- package/dist/draw.js +26 -25
- package/dist/draw.js.map +1 -1
- package/dist/m3ui-vue.css +1 -1
- package/dist/m3ui.js +1157 -1156
- package/dist/m3ui.js.map +1 -1
- package/dist/map.js +638 -632
- package/dist/map.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/components/MAudioRecorder.vue +9 -9
- package/src/components/MMapBaseLayers.vue +29 -28
- package/src/components/MMapMeasure.vue +1 -1
- package/dist/MTooltip-Dd5g2zhh.js +0 -754
- package/dist/MTooltip-Dd5g2zhh.js.map +0 -1
package/dist/draw.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { i as e } from "./useLocale-DaVSTdm0.js";
|
|
2
2
|
import { t } from "./MIconButton-BBggVwBV.js";
|
|
3
3
|
import { n, t as r } from "./MMenuItem-BuxYoASE.js";
|
|
4
|
-
import {
|
|
4
|
+
import { t as i } from "./MTooltip-CK39Zon4.js";
|
|
5
|
+
import { t as a } from "./MColorPickerModal-NtkihoK6.js";
|
|
5
6
|
import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, createVNode as p, defineComponent as m, inject as h, mergeModels as g, mergeProps as _, nextTick as v, normalizeClass as y, normalizeStyle as b, onBeforeUnmount as x, onMounted as S, openBlock as C, provide as ee, ref as w, renderList as T, renderSlot as E, shallowRef as D, toDisplayString as te, unref as O, useId as ne, useModel as k, vModelText as re, watch as ie, withCtx as A, withDirectives as j, withKeys as ae, withModifiers as M } from "vue";
|
|
6
7
|
// src/composables/drawGeometry.ts
|
|
7
8
|
var N = 0, oe = () => `d${Date.now().toString(36)}${(N++).toString(36)}`, se = {
|
|
@@ -1365,7 +1366,7 @@ var De = ["aria-label"], Oe = [
|
|
|
1365
1366
|
"aria-label": O(x).drawTools
|
|
1366
1367
|
}, [
|
|
1367
1368
|
E(e.$slots, "default"),
|
|
1368
|
-
(C(!0), u(o, null, T(D.value, (e,
|
|
1369
|
+
(C(!0), u(o, null, T(D.value, (e, a) => (C(), u(o, { key: a }, [e.length === 1 ? (C(), c(i, {
|
|
1369
1370
|
key: 0,
|
|
1370
1371
|
text: j(e[0]),
|
|
1371
1372
|
placement: "top"
|
|
@@ -1384,16 +1385,16 @@ var De = ["aria-label"], Oe = [
|
|
|
1384
1385
|
"onClick"
|
|
1385
1386
|
])]),
|
|
1386
1387
|
_: 2
|
|
1387
|
-
}, 1032, ["text"])) : (C(), u("div", st, [p(
|
|
1388
|
-
text: j(k(e,
|
|
1388
|
+
}, 1032, ["text"])) : (C(), u("div", st, [p(i, {
|
|
1389
|
+
text: j(k(e, a)),
|
|
1389
1390
|
placement: "top"
|
|
1390
1391
|
}, {
|
|
1391
1392
|
default: A(() => [p(t, {
|
|
1392
|
-
icon: S[k(e,
|
|
1393
|
-
label: j(k(e,
|
|
1393
|
+
icon: S[k(e, a)].icon,
|
|
1394
|
+
label: j(k(e, a)),
|
|
1394
1395
|
variant: e.includes(O(v).tool.value) ? "filled" : "standard",
|
|
1395
1396
|
"aria-pressed": e.includes(O(v).tool.value),
|
|
1396
|
-
onClick: (t) => O(v).tool.value = k(e,
|
|
1397
|
+
onClick: (t) => O(v).tool.value = k(e, a)
|
|
1397
1398
|
}, null, 8, [
|
|
1398
1399
|
"icon",
|
|
1399
1400
|
"label",
|
|
@@ -1426,7 +1427,7 @@ var De = ["aria-label"], Oe = [
|
|
|
1426
1427
|
]))), 128))]),
|
|
1427
1428
|
_: 2
|
|
1428
1429
|
}, 1024)]))], 64))), 128)),
|
|
1429
|
-
re.value ? (C(), c(
|
|
1430
|
+
re.value ? (C(), c(i, {
|
|
1430
1431
|
key: 0,
|
|
1431
1432
|
text: O(x).drawFill,
|
|
1432
1433
|
placement: "top"
|
|
@@ -1454,7 +1455,7 @@ var De = ["aria-label"], Oe = [
|
|
|
1454
1455
|
"aria-pressed": O(v).color.value.toLowerCase() === e.toLowerCase(),
|
|
1455
1456
|
onClick: (t) => O(v).color.value = e
|
|
1456
1457
|
}, null, 14, B))), 128)),
|
|
1457
|
-
m.customColor ? (C(), c(
|
|
1458
|
+
m.customColor ? (C(), c(i, {
|
|
1458
1459
|
key: 1,
|
|
1459
1460
|
text: O(x).drawCustomColor,
|
|
1460
1461
|
placement: "top"
|
|
@@ -1469,7 +1470,7 @@ var De = ["aria-label"], Oe = [
|
|
|
1469
1470
|
}, [M.value ? l("", !0) : (C(), u("span", V, "add"))], 14, lt)]),
|
|
1470
1471
|
_: 1
|
|
1471
1472
|
}, 8, ["text"])) : l("", !0),
|
|
1472
|
-
m.customColor ? (C(), c(
|
|
1473
|
+
m.customColor ? (C(), c(a, {
|
|
1473
1474
|
key: 2,
|
|
1474
1475
|
modelValue: O(v).color.value,
|
|
1475
1476
|
"onUpdate:modelValue": s[2] ||= (e) => O(v).color.value = e,
|
|
@@ -1493,7 +1494,7 @@ var De = ["aria-label"], Oe = [
|
|
|
1493
1494
|
}, null, 4)], 10, H))), 128)),
|
|
1494
1495
|
m.history ? (C(), u(o, { key: 3 }, [
|
|
1495
1496
|
s[8] ||= d("span", { class: "mx-1 h-6 w-px shrink-0 bg-outline-variant" }, null, -1),
|
|
1496
|
-
p(
|
|
1497
|
+
p(i, {
|
|
1497
1498
|
text: O(x).drawUndo,
|
|
1498
1499
|
placement: "top"
|
|
1499
1500
|
}, {
|
|
@@ -1505,7 +1506,7 @@ var De = ["aria-label"], Oe = [
|
|
|
1505
1506
|
}, null, 8, ["label", "disabled"])]),
|
|
1506
1507
|
_: 1
|
|
1507
1508
|
}, 8, ["text"]),
|
|
1508
|
-
p(
|
|
1509
|
+
p(i, {
|
|
1509
1510
|
text: O(x).drawRedo,
|
|
1510
1511
|
placement: "top"
|
|
1511
1512
|
}, {
|
|
@@ -1518,7 +1519,7 @@ var De = ["aria-label"], Oe = [
|
|
|
1518
1519
|
_: 1
|
|
1519
1520
|
}, 8, ["text"])
|
|
1520
1521
|
], 64)) : l("", !0),
|
|
1521
|
-
O(v).selection.value.length ? (C(), c(
|
|
1522
|
+
O(v).selection.value.length ? (C(), c(i, {
|
|
1522
1523
|
key: 4,
|
|
1523
1524
|
text: O(x).drawDelete,
|
|
1524
1525
|
placement: "top"
|
|
@@ -1547,10 +1548,10 @@ var De = ["aria-label"], Oe = [
|
|
|
1547
1548
|
setup(n) {
|
|
1548
1549
|
let r = h(Te, null);
|
|
1549
1550
|
if (!r) throw Error("MDrawLayers must be inside <MDrawCanvas>");
|
|
1550
|
-
let
|
|
1551
|
+
let a = r, f = e(), m = s(() => a.layers.value.length ? a.layers.value : [{
|
|
1551
1552
|
id: "layer-1",
|
|
1552
1553
|
name: f.drawLayer.replace("{n}", "1")
|
|
1553
|
-
}]), g = s(() => m.value.slice().reverse()), _ = (e) =>
|
|
1554
|
+
}]), g = s(() => m.value.slice().reverse()), _ = (e) => a.setLayers(e), b = (e, t) => _(m.value.map((n) => n.id === e ? {
|
|
1554
1555
|
...n,
|
|
1555
1556
|
...t
|
|
1556
1557
|
} : n));
|
|
@@ -1559,14 +1560,14 @@ var De = ["aria-label"], Oe = [
|
|
|
1559
1560
|
id: oe(),
|
|
1560
1561
|
name: f.drawLayer.replace("{n}", String(m.value.length + 1))
|
|
1561
1562
|
};
|
|
1562
|
-
_([...m.value, e]),
|
|
1563
|
+
_([...m.value, e]), a.layer.value = e.id;
|
|
1563
1564
|
}
|
|
1564
1565
|
function S(e) {
|
|
1565
1566
|
if (m.value.length < 2) return;
|
|
1566
|
-
let t = m.value[0].id, n =
|
|
1567
|
-
n.length && (
|
|
1567
|
+
let t = m.value[0].id, n = a.items.value.filter((n) => (n.layer ?? t) === e).map((e) => e.id);
|
|
1568
|
+
n.length && (a.selection.value = n, a.deleteSelection());
|
|
1568
1569
|
let r = m.value.filter((t) => t.id !== e);
|
|
1569
|
-
_(r),
|
|
1570
|
+
_(r), a.layer.value === e && (a.layer.value = r[r.length - 1].id);
|
|
1570
1571
|
}
|
|
1571
1572
|
function ee(e, t) {
|
|
1572
1573
|
let n = m.value.findIndex((t) => t.id === e), r = n + t;
|
|
@@ -1585,7 +1586,7 @@ var De = ["aria-label"], Oe = [
|
|
|
1585
1586
|
class: "m3-draw-layers flex w-64 flex-col rounded-xl bg-surface-container p-2 text-on-surface shadow-elevation-2",
|
|
1586
1587
|
role: "group",
|
|
1587
1588
|
"aria-label": O(f).drawLayers
|
|
1588
|
-
}, [d("div", dt, [d("span", ft, te(O(f).drawLayers), 1), p(
|
|
1589
|
+
}, [d("div", dt, [d("span", ft, te(O(f).drawLayers), 1), p(i, {
|
|
1589
1590
|
text: O(f).drawAddLayer,
|
|
1590
1591
|
placement: "left"
|
|
1591
1592
|
}, {
|
|
@@ -1598,7 +1599,7 @@ var De = ["aria-label"], Oe = [
|
|
|
1598
1599
|
_: 1
|
|
1599
1600
|
}, 8, ["text"])]), (C(!0), u(o, null, T(g.value, (e) => (C(), u("div", {
|
|
1600
1601
|
key: e.id,
|
|
1601
|
-
class: y(["group flex h-10 items-center gap-1 rounded-full pr-1 pl-3 text-body-medium", O(
|
|
1602
|
+
class: y(["group flex h-10 items-center gap-1 rounded-full pr-1 pl-3 text-body-medium", O(a).layer.value === e.id ? "bg-secondary-container text-on-secondary-container" : "hover:bg-on-surface/8"])
|
|
1602
1603
|
}, [
|
|
1603
1604
|
E.value === e.id ? (C(), u("input", {
|
|
1604
1605
|
key: 0,
|
|
@@ -1614,11 +1615,11 @@ var De = ["aria-label"], Oe = [
|
|
|
1614
1615
|
key: 1,
|
|
1615
1616
|
type: "button",
|
|
1616
1617
|
class: y(["min-w-0 flex-1 truncate text-left outline-none", e.visible === !1 && "opacity-50"]),
|
|
1617
|
-
"aria-pressed": O(
|
|
1618
|
-
onClick: (t) => O(
|
|
1618
|
+
"aria-pressed": O(a).layer.value === e.id,
|
|
1619
|
+
onClick: (t) => O(a).layer.value = e.id,
|
|
1619
1620
|
onDblclick: (t) => ne(e.id)
|
|
1620
1621
|
}, te(e.name), 43, W)),
|
|
1621
|
-
p(
|
|
1622
|
+
p(i, {
|
|
1622
1623
|
text: e.visible === !1 ? O(f).drawShowLayer : O(f).drawHideLayer,
|
|
1623
1624
|
placement: "left"
|
|
1624
1625
|
}, {
|
|
@@ -1634,7 +1635,7 @@ var De = ["aria-label"], Oe = [
|
|
|
1634
1635
|
])]),
|
|
1635
1636
|
_: 2
|
|
1636
1637
|
}, 1032, ["text"]),
|
|
1637
|
-
p(
|
|
1638
|
+
p(i, {
|
|
1638
1639
|
text: e.locked ? O(f).drawUnlockLayer : O(f).drawLockLayer,
|
|
1639
1640
|
placement: "left"
|
|
1640
1641
|
}, {
|