@eox/drawtools
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -9,3 +9,3 @@ var _t = Object.defineProperty; | ||
*/ | ||
const D = window, Q = D.ShadowRoot && (D.ShadyCSS === void 0 || D.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, ht = Symbol(), G = /* @__PURE__ */ new WeakMap(); | ||
const k = window, Q = k.ShadowRoot && (k.ShadyCSS === void 0 || k.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, ht = Symbol(), X = /* @__PURE__ */ new WeakMap(); | ||
let vt = class { | ||
@@ -22,3 +22,3 @@ constructor(t, e, i) { | ||
const i = e !== void 0 && e.length === 1; | ||
i && (t = G.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && G.set(e, t)); | ||
i && (t = X.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), i && X.set(e, t)); | ||
} | ||
@@ -33,6 +33,6 @@ return t; | ||
Q ? r.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet) : t.forEach((e) => { | ||
const i = document.createElement("style"), s = D.litNonce; | ||
const i = document.createElement("style"), s = k.litNonce; | ||
s !== void 0 && i.setAttribute("nonce", s), i.textContent = e.cssText, r.appendChild(i); | ||
}); | ||
}, X = Q ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => { | ||
}, G = Q ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => { | ||
let e = ""; | ||
@@ -49,3 +49,3 @@ for (const i of t.cssRules) | ||
var j; | ||
const k = window, Y = k.trustedTypes, gt = Y ? Y.emptyScript : "", tt = k.reactiveElementPolyfillSupport, K = { toAttribute(r, t) { | ||
const R = window, Y = R.trustedTypes, gt = Y ? Y.emptyScript : "", tt = R.reactiveElementPolyfillSupport, K = { toAttribute(r, t) { | ||
switch (t) { | ||
@@ -129,5 +129,5 @@ case Boolean: | ||
for (const s of i) | ||
e.unshift(X(s)); | ||
e.unshift(G(s)); | ||
} else | ||
t !== void 0 && e.push(X(t)); | ||
t !== void 0 && e.push(G(t)); | ||
return e; | ||
@@ -259,3 +259,3 @@ } | ||
}; | ||
w[J] = !0, w.elementProperties = /* @__PURE__ */ new Map(), w.elementStyles = [], w.shadowRootOptions = { mode: "open" }, tt == null || tt({ ReactiveElement: w }), ((j = k.reactiveElementVersions) !== null && j !== void 0 ? j : k.reactiveElementVersions = []).push("1.6.2"); | ||
w[J] = !0, w.elementProperties = /* @__PURE__ */ new Map(), w.elementStyles = [], w.shadowRootOptions = { mode: "open" }, tt == null || tt({ ReactiveElement: w }), ((j = R.reactiveElementVersions) !== null && j !== void 0 ? j : R.reactiveElementVersions = []).push("1.6.2"); | ||
/** | ||
@@ -267,3 +267,3 @@ * @license | ||
var B; | ||
const R = window, E = R.trustedTypes, et = E ? E.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, Z = "$lit$", f = `lit$${(Math.random() + "").slice(9)}$`, ct = "?" + f, At = `<${ct}>`, m = document, U = () => m.createComment(""), M = (r) => r === null || typeof r != "object" && typeof r != "function", ut = Array.isArray, mt = (r) => ut(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", F = `[ | ||
const I = window, E = I.trustedTypes, et = E ? E.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, Z = "$lit$", f = `lit$${(Math.random() + "").slice(9)}$`, ct = "?" + f, At = `<${ct}>`, m = document, U = () => m.createComment(""), M = (r) => r === null || typeof r != "object" && typeof r != "function", ut = Array.isArray, mt = (r) => ut(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", F = `[ | ||
\f\r]`, x = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, it = /-->/g, st = />/g, g = RegExp(`>|${F}(?:([^\\s"'>=/]+)(${F}*=${F}*(?:[^ | ||
@@ -275,7 +275,7 @@ \f\r"'\`<>=]|("|')|))|$)`, "g"), rt = /'/g, nt = /"/g, pt = /^(?:script|style|textarea|title)$/i, wt = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), Et = wt(1), S = Symbol.for("lit-noChange"), u = Symbol.for("lit-nothing"), ot = /* @__PURE__ */ new WeakMap(), A = m.createTreeWalker(m, 129, null, !1), St = (r, t) => { | ||
const a = r[l]; | ||
let y, h, c = -1, _ = 0; | ||
for (; _ < a.length && (n.lastIndex = _, h = n.exec(a), h !== null); ) | ||
_ = n.lastIndex, n === x ? h[1] === "!--" ? n = it : h[1] !== void 0 ? n = st : h[2] !== void 0 ? (pt.test(h[2]) && (s = RegExp("</" + h[2], "g")), n = g) : h[3] !== void 0 && (n = g) : n === g ? h[0] === ">" ? (n = s ?? x, c = -1) : h[1] === void 0 ? c = -2 : (c = n.lastIndex - h[2].length, y = h[1], n = h[3] === void 0 ? g : h[3] === '"' ? nt : rt) : n === nt || n === rt ? n = g : n === it || n === st ? n = x : (n = g, s = void 0); | ||
const O = n === g && r[l + 1].startsWith("/>") ? " " : ""; | ||
o += n === x ? a + At : c >= 0 ? (i.push(y), a.slice(0, c) + Z + a.slice(c) + f + O) : a + f + (c === -2 ? (i.push(void 0), l) : O); | ||
let y, h, c = -1, $ = 0; | ||
for (; $ < a.length && (n.lastIndex = $, h = n.exec(a), h !== null); ) | ||
$ = n.lastIndex, n === x ? h[1] === "!--" ? n = it : h[1] !== void 0 ? n = st : h[2] !== void 0 ? (pt.test(h[2]) && (s = RegExp("</" + h[2], "g")), n = g) : h[3] !== void 0 && (n = g) : n === g ? h[0] === ">" ? (n = s ?? x, c = -1) : h[1] === void 0 ? c = -2 : (c = n.lastIndex - h[2].length, y = h[1], n = h[3] === void 0 ? g : h[3] === '"' ? nt : rt) : n === nt || n === rt ? n = g : n === it || n === st ? n = x : (n = g, s = void 0); | ||
const T = n === g && r[l + 1].startsWith("/>") ? " " : ""; | ||
o += n === x ? a + At : c >= 0 ? (i.push(y), a.slice(0, c) + Z + a.slice(c) + f + T) : a + f + (c === -2 ? (i.push(void 0), l) : T); | ||
} | ||
@@ -303,6 +303,6 @@ const d = o + (r[e] || "<?>") + (t === 2 ? "</svg>" : ""); | ||
if (c.endsWith(Z) || c.startsWith(f)) { | ||
const _ = y[n++]; | ||
if (h.push(c), _ !== void 0) { | ||
const O = s.getAttribute(_.toLowerCase() + Z).split(f), T = /([.?@])?(.*)/.exec(_); | ||
l.push({ type: 1, index: o, name: T[2], strings: O, ctor: T[1] === "." ? Ct : T[1] === "?" ? Pt : T[1] === "@" ? Ut : I }); | ||
const $ = y[n++]; | ||
if (h.push(c), $ !== void 0) { | ||
const T = s.getAttribute($.toLowerCase() + Z).split(f), D = /([.?@])?(.*)/.exec($); | ||
l.push({ type: 1, index: o, name: D[2], strings: T, ctor: D[1] === "." ? Ct : D[1] === "?" ? Pt : D[1] === "@" ? Ut : L }); | ||
} else | ||
@@ -318,4 +318,4 @@ l.push({ type: 6, index: o }); | ||
s.textContent = E ? E.emptyScript : ""; | ||
for (let _ = 0; _ < c; _++) | ||
s.append(h[_], U()), A.nextNode(), l.push({ type: 2, index: ++o }); | ||
for (let $ = 0; $ < c; $++) | ||
s.append(h[$], U()), A.nextNode(), l.push({ type: 2, index: ++o }); | ||
s.append(h[c], U()); | ||
@@ -444,3 +444,3 @@ } | ||
} | ||
class I { | ||
class L { | ||
constructor(t, e, i, s, o) { | ||
@@ -472,3 +472,3 @@ this.type = 1, this._$AH = u, this._$AN = void 0, this.element = t, this.name = e, this._$AM = s, this.options = o, i.length > 2 || i[0] !== "" || i[1] !== "" ? (this._$AH = Array(i.length - 1).fill(new String()), this.strings = i) : this._$AH = u; | ||
} | ||
class Ct extends I { | ||
class Ct extends L { | ||
constructor() { | ||
@@ -482,3 +482,3 @@ super(...arguments), this.type = 3; | ||
const xt = E ? E.emptyScript : ""; | ||
class Pt extends I { | ||
class Pt extends L { | ||
constructor() { | ||
@@ -491,3 +491,3 @@ super(...arguments), this.type = 4; | ||
} | ||
class Ut extends I { | ||
class Ut extends L { | ||
constructor(t, e, i, s, o) { | ||
@@ -519,4 +519,4 @@ super(t, e, i, s, o), this.type = 5; | ||
} | ||
const lt = R.litHtmlPolyfillSupport; | ||
lt == null || lt(H, N), ((B = R.litHtmlVersions) !== null && B !== void 0 ? B : R.litHtmlVersions = []).push("2.7.4"); | ||
const lt = I.litHtmlPolyfillSupport; | ||
lt == null || lt(H, N), ((B = I.litHtmlVersions) !== null && B !== void 0 ? B : I.litHtmlVersions = []).push("2.7.4"); | ||
const Ht = (r, t, e) => { | ||
@@ -592,3 +592,3 @@ var i, s; | ||
}; | ||
function L(r) { | ||
function O(r) { | ||
return (t, e) => e !== void 0 ? Tt(r, t, e) : Ot(r, t); | ||
@@ -602,3 +602,3 @@ } | ||
function C(r) { | ||
return L({ ...r, state: !0 }); | ||
return O({ ...r, state: !0 }); | ||
} | ||
@@ -616,9 +616,10 @@ /** | ||
} | ||
`, kt = ` | ||
`; | ||
var kt = Object.defineProperty, Rt = Object.getOwnPropertyDescriptor, v = (r, t, e, i) => { | ||
for (var s = i > 1 ? void 0 : i ? Rt(t, e) : t, o = r.length - 1, n; o >= 0; o--) | ||
var Rt = Object.defineProperty, It = Object.getOwnPropertyDescriptor, v = (r, t, e, i) => { | ||
for (var s = i > 1 ? void 0 : i ? It(t, e) : t, o = r.length - 1, n; o >= 0; o--) | ||
(n = r[o]) && (s = (i ? n(t, e, s) : n(s)) || s); | ||
return i && s && kt(t, e, s), s; | ||
return i && s && Rt(t, e, s), s; | ||
}; | ||
let $ = class extends P { | ||
let _ = class extends P { | ||
constructor() { | ||
@@ -635,2 +636,3 @@ super(...arguments); | ||
p(this, "layer"); | ||
p(this, "unstyled"); | ||
p(this, "_draw"); | ||
@@ -668,2 +670,3 @@ p(this, "_modify"); | ||
${Dt} | ||
${!this.unstyled && kt} | ||
</style> | ||
@@ -690,32 +693,35 @@ <div> | ||
C() | ||
], $.prototype, "_layerId", 2); | ||
], _.prototype, "_layerId", 2); | ||
v([ | ||
C() | ||
], $.prototype, "_eoxMap", 2); | ||
], _.prototype, "_eoxMap", 2); | ||
v([ | ||
C() | ||
], $.prototype, "_olMap", 2); | ||
], _.prototype, "_olMap", 2); | ||
v([ | ||
C() | ||
], $.prototype, "_drawLayer", 2); | ||
], _.prototype, "_drawLayer", 2); | ||
v([ | ||
C() | ||
], $.prototype, "_drawnFeatures", 2); | ||
], _.prototype, "_drawnFeatures", 2); | ||
v([ | ||
C() | ||
], $.prototype, "_currentlyDrawing", 2); | ||
], _.prototype, "_currentlyDrawing", 2); | ||
v([ | ||
L({ type: Boolean }) | ||
], $.prototype, "multipleFeatures", 2); | ||
O({ type: Boolean }) | ||
], _.prototype, "multipleFeatures", 2); | ||
v([ | ||
L() | ||
], $.prototype, "for", 2); | ||
O() | ||
], _.prototype, "for", 2); | ||
v([ | ||
L() | ||
], $.prototype, "layer", 2); | ||
$ = v([ | ||
O() | ||
], _.prototype, "layer", 2); | ||
v([ | ||
O({ type: Boolean }) | ||
], _.prototype, "unstyled", 2); | ||
_ = v([ | ||
Nt("eox-drawtools") | ||
], $); | ||
], _); | ||
export { | ||
$ as EOxDrawTools | ||
_ as EOxDrawTools | ||
}; |
{ | ||
"name": "@eox/drawtools", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "devDependencies": { |
Sorry, the diff of this file is not supported yet
52853
942