@opengis/gis 0.2.164 → 0.2.165
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/{CardIcon-BZoV9hHZ.js → CardIcon-B-HKyoDs.js} +1 -1
- package/dist/{EntityTablePage-BvEgLON7.js → EntityTablePage-BnAJuEwI.js} +1 -1
- package/dist/{ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-D82X-z0q.js → ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-L9BfGfUU.js} +1 -1
- package/dist/{HeaderActions.vue_vue_type_script_setup_true_lang-CmDKSALB.js → HeaderActions.vue_vue_type_script_setup_true_lang-D3oMTMO0.js} +1 -1
- package/dist/{MapSettings-WRwB36Dm.js → MapSettings-B1lSk4KX.js} +1 -1
- package/dist/{RastersTablePage-D71D-oy4.js → RastersTablePage-aEh696Or.js} +1 -1
- package/dist/{cartocss-DtveuW5e.js → cartocss-BoYdEjtS.js} +5 -5
- package/dist/{import-utils-gA0dsRhG.js → import-utils-HEL359RU.js} +1 -1
- package/dist/{index-lWiWUrDa.js → index-ClqqnPEd.js} +11 -11
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/{raster-DVJiO4HK.js → raster-DFD-dtui.js} +3 -3
- package/dist/{register-D1q_RREp.js → register-DMJ_OnzW.js} +3 -3
- package/dist/{service-BnT0jfPh.js → service-FcW2Gvt4.js} +5 -5
- package/dist/{vs-datatable-BmISto2b.js → vs-datatable-C27Dlfo3.js} +1 -1
- package/package.json +1 -1
- package/server/routes/map/controllers/gis.icon.js +25 -10
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as te, resolveDirective as We, openBlock as u, createElementBlock as m, createElementVNode as n, Fragment as W, renderList as X, toDisplayString as d, withDirectives as we, createTextVNode as Xe, normalizeClass as ae, ref as $, watch as S, computed as h, vModelText as Ke, onMounted as Ye, onBeforeUnmount as Ze, createCommentVNode as q, createVNode as B, withCtx as He, createBlock as F, resolveDynamicComponent as Je } from "vue";
|
|
2
2
|
import { useRouter as et, useRoute as tt } from "vue-router";
|
|
3
3
|
import { TooltipDirective as st, notify as M } from "@opengis/core";
|
|
4
|
-
import { _ as nt, u as lt, f as rt, M as ot, i as it, j as be, F as at } from "./index-
|
|
5
|
-
import { _ as ut, a as ct, b as dt, c as ft } from "./HeaderActions.vue_vue_type_script_setup_true_lang-
|
|
6
|
-
import { _ as he } from "./ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-
|
|
4
|
+
import { _ as nt, u as lt, f as rt, M as ot, i as it, j as be, F as at } from "./index-ClqqnPEd.js";
|
|
5
|
+
import { _ as ut, a as ct, b as dt, c as ft } from "./HeaderActions.vue_vue_type_script_setup_true_lang-D3oMTMO0.js";
|
|
6
|
+
import { _ as he } from "./ExtentOutlineLayer.vue_vue_type_script_setup_true_lang-L9BfGfUU.js";
|
|
7
7
|
const mt = { class: "flex-1 overflow-y-auto p-4 sm:p-6" }, pt = { class: "space-y-3" }, gt = { class: "bg-white p-3 rounded-xl border border-gray-200 shadow-sm" }, yt = { class: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-2" }, vt = { class: "text-xs text-gray-500 mb-1" }, xt = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "text-base text-md font-semibold text-gray-900"
|
|
@@ -2,9 +2,9 @@ import { defineComponent as B, mergeModels as j, useModel as S, computed as h, d
|
|
|
2
2
|
import { useRoute as Z, useRouter as ee } from "vue-router";
|
|
3
3
|
import { notify as F } from "@opengis/core";
|
|
4
4
|
import { _ as te } from "./TableFormHeader.vue_vue_type_script_setup_true_lang-Mci_tseM.js";
|
|
5
|
-
import { V as N } from "./vs-datatable-
|
|
6
|
-
import { _ as z, n as R, m as E, r as H } from "./import-utils-
|
|
7
|
-
import { a as ae, b as le, c as se, d as oe, e as ie } from "./index-
|
|
5
|
+
import { V as N } from "./vs-datatable-C27Dlfo3.js";
|
|
6
|
+
import { _ as z, n as R, m as E, r as H } from "./import-utils-HEL359RU.js";
|
|
7
|
+
import { a as ae, b as le, c as se, d as oe, e as ie } from "./index-ClqqnPEd.js";
|
|
8
8
|
import { LucideChevronRight as re } from "lucide-vue-next";
|
|
9
9
|
import { _ as ne } from "./MapSettingsTabs.vue_vue_type_script_setup_true_lang-CKCK3NqY.js";
|
|
10
10
|
const ue = { class: "vs-form" }, de = { class: "vs-form__body auto-rows-max container" }, ce = { class: "flex flex-wrap" }, me = { class: "h-fit w-full mb-6 bg-white border border-gray-200 rounded-lg p-6" }, ve = { class: "h-fit w-full flex flex-wrap" }, pe = { class: "w-full" }, fe = /* @__PURE__ */ B({
|
|
@@ -4,12 +4,12 @@ var L = (e, n, t) => pi(e, typeof n != "symbol" ? n + "" : n, t);
|
|
|
4
4
|
import { openBlock as _, createElementBlock as M, createElementVNode as g, defineComponent as ae, ref as E, watch as $, createTextVNode as mi, createVNode as D, createBlock as P, createCommentVNode as W, defineAsyncComponent as hi, unref as ze, withCtx as bn, withDirectives as fn, vModelText as dn, normalizeClass as _e, Fragment as kt, renderList as At, toDisplayString as fe, getCurrentInstance as Ct, onBeforeUnmount as wt, toRef as gi, computed as ve, onMounted as yi, resolveDynamicComponent as vi } from "vue";
|
|
5
5
|
import { useRoute as bi, useRouter as xi } from "vue-router";
|
|
6
6
|
import { notify as X } from "@opengis/core";
|
|
7
|
-
import { _ as Xe, u as Ge, f as Si, M as ki, g as Ai, h as Ci, i as wi, j as tt, k as Ti, l as _i, m as Ei, s as it, n as Ii } from "./index-
|
|
8
|
-
import { _ as Ni, a as $i, b as Li, c as Fi } from "./HeaderActions.vue_vue_type_script_setup_true_lang-
|
|
9
|
-
import { S as Oi, C as Ri } from "./CardIcon-
|
|
7
|
+
import { _ as Xe, u as Ge, f as Si, M as ki, g as Ai, h as Ci, i as wi, j as tt, k as Ti, l as _i, m as Ei, s as it, n as Ii } from "./index-ClqqnPEd.js";
|
|
8
|
+
import { _ as Ni, a as $i, b as Li, c as Fi } from "./HeaderActions.vue_vue_type_script_setup_true_lang-D3oMTMO0.js";
|
|
9
|
+
import { S as Oi, C as Ri } from "./CardIcon-B-HKyoDs.js";
|
|
10
10
|
import { _ as Tt } from "./MonacoEditor.vue_vue_type_script_setup_true_lang-D3ZPeXMw.js";
|
|
11
|
-
import { V as Ze } from "./vs-datatable-
|
|
12
|
-
import { _ as Nn, m as $n, r as $e } from "./import-utils-
|
|
11
|
+
import { V as Ze } from "./vs-datatable-C27Dlfo3.js";
|
|
12
|
+
import { _ as Nn, m as $n, r as $e } from "./import-utils-HEL359RU.js";
|
|
13
13
|
/*! js-yaml 5.2.1 https://github.com/nodeca/js-yaml @license MIT */
|
|
14
14
|
var T = Symbol("NOT_RESOLVED"), Ln = Symbol("MERGE_KEY");
|
|
15
15
|
function U(e, n) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent as F, mergeModels as O, defineAsyncComponent as I, useModel as R, ref as y, watch as K, openBlock as o, createElementBlock as s, createElementVNode as e, createVNode as $, unref as x, withCtx as S, createStaticVNode as V, useSlots as P, computed as H, Fragment as b, createTextVNode as U, createCommentVNode as N, renderList as A, normalizeStyle as Q, toDisplayString as M, normalizeClass as z, withModifiers as X, createBlock as Y, resolveDynamicComponent as ee, withDirectives as te, renderSlot as ne } from "vue";
|
|
2
2
|
import { notify as E } from "@opengis/core";
|
|
3
3
|
import { Edit as le, Trash as oe } from "lucide-vue-next";
|
|
4
|
-
import { _ as u } from "./index-
|
|
4
|
+
import { _ as u } from "./index-ClqqnPEd.js";
|
|
5
5
|
const se = { class: "flex items-center justify-center col-span-3 gap-2" }, re = { class: "flex justify-end p-[20px] gap-[10px] border-t w-full" }, ie = /* @__PURE__ */ F({
|
|
6
6
|
__name: "vs-datatable-controls",
|
|
7
7
|
props: /* @__PURE__ */ O({
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@ import { fileURLToPath } from 'node:url';
|
|
|
5
5
|
import * as solidIcons from '@fortawesome/free-solid-svg-icons';
|
|
6
6
|
import sharp from 'sharp';
|
|
7
7
|
|
|
8
|
-
const iconFilenamePattern = /^([a-z][a-z0-9]*)-(s|m|l|xl)-fa-([a-z0-9-]+)\+([a-f0-9]{3,8})\.(png|svg)$/i;
|
|
8
|
+
const iconFilenamePattern = /^([a-z][a-z0-9]*)-(s|m|l|xl)-(fa|ar)-([a-z0-9-]+)\+([a-f0-9]{3,8})\.(png|svg)$/i;
|
|
9
9
|
const validColorLengths = new Set([3, 4, 6, 8]);
|
|
10
10
|
|
|
11
11
|
const iconSizeByCode = {
|
|
@@ -56,14 +56,17 @@ function parseIconFilename(filename) {
|
|
|
56
56
|
const match = iconFilenamePattern.exec(filename);
|
|
57
57
|
if (!match) return null;
|
|
58
58
|
|
|
59
|
-
const [, pinName, sizeCode,
|
|
59
|
+
const [, pinName, sizeCode, iconType, iconValue, hexColor, format] = match;
|
|
60
60
|
if (!validColorLengths.has(hexColor.length)) return null;
|
|
61
61
|
|
|
62
62
|
return {
|
|
63
63
|
filename: filename.toLowerCase(),
|
|
64
64
|
pinName: pinName.toLowerCase(),
|
|
65
65
|
size: iconSizeByCode[sizeCode.toLowerCase()],
|
|
66
|
-
|
|
66
|
+
iconType: iconType.toLowerCase(),
|
|
67
|
+
iconValue: iconType.toLowerCase() === 'fa'
|
|
68
|
+
? iconValue.toLowerCase()
|
|
69
|
+
: iconValue.toUpperCase(),
|
|
67
70
|
color: `#${hexColor}`,
|
|
68
71
|
format: format.toLowerCase(),
|
|
69
72
|
};
|
|
@@ -103,7 +106,7 @@ function getPinPlacement(pinName, width, height) {
|
|
|
103
106
|
};
|
|
104
107
|
}
|
|
105
108
|
|
|
106
|
-
function
|
|
109
|
+
function createFontAwesomeSvg(icon, placement, color) {
|
|
107
110
|
const [width, height, , , pathData] = icon.icon;
|
|
108
111
|
const paths = Array.isArray(pathData) ? pathData : [pathData];
|
|
109
112
|
const x = placement.x - placement.iconSize / 2;
|
|
@@ -114,6 +117,21 @@ function createForegroundSvg(icon, placement, color) {
|
|
|
114
117
|
</svg>`;
|
|
115
118
|
}
|
|
116
119
|
|
|
120
|
+
function createSymbolSvg(symbol, placement, color) {
|
|
121
|
+
const fontSize = Math.round(placement.iconSize * 0.75);
|
|
122
|
+
|
|
123
|
+
return `<text data-gis-icon-layer="foreground" x="${placement.x}" y="${placement.y}" fill="${color}" font-family="Arial, sans-serif" font-size="${fontSize}" font-weight="700" text-anchor="middle" dominant-baseline="middle">${symbol}</text>`;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function createForegroundSvg(options, placement) {
|
|
127
|
+
if (options.iconType === 'ar') {
|
|
128
|
+
return createSymbolSvg(options.iconValue, placement, options.color);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
const icon = findIcon(options.iconValue);
|
|
132
|
+
return icon ? createFontAwesomeSvg(icon, placement, options.color) : null;
|
|
133
|
+
}
|
|
134
|
+
|
|
117
135
|
function setSvgViewport(svg, size, width, height) {
|
|
118
136
|
return svg.replace(/<svg\b([^>]*)>/i, (_, attributes) => {
|
|
119
137
|
const rootAttributes = attributes
|
|
@@ -129,7 +147,7 @@ async function createPinSvg({
|
|
|
129
147
|
pinName,
|
|
130
148
|
size,
|
|
131
149
|
color,
|
|
132
|
-
|
|
150
|
+
...iconOptions
|
|
133
151
|
}) {
|
|
134
152
|
const templatePath = path.join(pinDirectory, `${pinName}.svg`);
|
|
135
153
|
const template = await readFileIfExists(templatePath, 'utf8');
|
|
@@ -142,18 +160,15 @@ async function createPinSvg({
|
|
|
142
160
|
? template.replace(/#ff0000/gi, color)
|
|
143
161
|
: template;
|
|
144
162
|
const svg = setSvgViewport(coloredTemplate, size, width, height);
|
|
145
|
-
const foreground = createForegroundSvg(
|
|
163
|
+
const foreground = createForegroundSvg({ ...iconOptions, color }, placement);
|
|
164
|
+
if (!foreground) return null;
|
|
146
165
|
|
|
147
166
|
return svg.replace(/<\/svg>\s*$/, `${foreground}</svg>`);
|
|
148
167
|
}
|
|
149
168
|
|
|
150
169
|
async function createIcon(options) {
|
|
151
|
-
const icon = findIcon(options.iconName);
|
|
152
|
-
if (!icon) return null;
|
|
153
|
-
|
|
154
170
|
const svg = await createPinSvg({
|
|
155
171
|
...options,
|
|
156
|
-
icon,
|
|
157
172
|
});
|
|
158
173
|
if (!svg) return null;
|
|
159
174
|
if (options.format === 'svg') return Buffer.from(svg);
|