UNPKG

geoiq-frontend-ui-kit

Version:

This project is a UI kit for GeoIQ's frontend. It's built with React, TypeScript, and Vite.

36 lines (35 loc) 1.21 kB
import { renderOverlay as r } from "./index152.es.js"; import { commitTextEdit as l } from "./index156.es.js"; const t = { select: "Select — click a layer to move it", crop: "Crop — drag a box", text: "Text tool", draw: "Draw tool", shape: "Shape tool", sticker: "Sticker tool" }; function n(o) { return `url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='${encodeURIComponent(o)}' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m18 2 4 4-14 14H4v-4L18 2z'/%3E%3Cpath d='m14.5 5.5 4 4'/%3E%3C/svg%3E") 2 22, crosshair`; } const i = { select: "default", crop: "crosshair", text: "text", shape: "crosshair", sticker: "default" }; function c(o) { o.overlayEl && (o.overlayEl.style.cursor = o.mode === "draw" ? n(o.drawColor) : i[o.mode] || "default"); } function p(o, e) { o.mode !== "select" && l(o), o.mode = e, o.pendingShape = null, o.cropRect = null, c(o), r(o), o.statusText = t[e], o.notify(); } function u(o, e) { o.selectedId = e, r(o), o.notify(); } export { c as applyModeCursor, u as selectLayer, p as setMode }; //# sourceMappingURL=index155.es.js.map