@prometa/sleek 0.0.9 → 0.0.11
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/components/google-map-static.d.ts +4 -0
- package/dist/components/google-map-static.d.ts.map +1 -0
- package/dist/components/google-map.d.ts +37 -0
- package/dist/components/google-map.d.ts.map +1 -0
- package/dist/components.cjs +1 -1
- package/dist/components.js +1 -1
- package/dist/google-map-static.cjs +1 -0
- package/dist/google-map-static.js +10 -0
- package/dist/google-map.cjs +1 -0
- package/dist/google-map.js +356 -0
- package/dist/main.d.ts +3 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/sleek-select.cjs +3 -2
- package/dist/sleek-select.js +142 -139
- package/dist/sleek.cjs +1 -1
- package/dist/sleek.js +29 -25
- package/package.json +3 -1
package/dist/sleek.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./utils.cjs");function L(
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./utils.cjs");function L({maps:o}){window.SLEEK||(window.SLEEK={}),window.SLEEK.maps=o}function w(o,{resolveTagName:f=p,watch:m=!0}={}){const t=new EventTarget,i=Object.fromEntries(Object.entries(o).map(([e,n])=>[f(e),n]));c(),m&&v();function a(e){if(i[e]){if(r("element:load-start",{tagName:e},{cancelable:!0})===!1)return;i[e]().then(()=>r("element:loading",{tagName:e})).catch(s=>r("element:load-error",{tagName:e,error:s})).then(()=>r("element:load-end",{tagName:e}))}}function c(e=document){e.querySelectorAll(Object.keys(i).join(",")).forEach(n=>{E(n.tagName.toLowerCase())&&a(n.tagName.toLowerCase())})}function v(){new MutationObserver(n=>{r("observer:scan-start"),n.forEach(s=>{s.addedNodes.forEach(u=>{if(u.nodeType===Node.ELEMENT_NODE){const d=u;r("observer:scan-node",{node:d});const l=d.tagName.toLowerCase();E(l)&&a(l),c(d)}})}),r("observer:scan-end")}).observe(document.body,{childList:!0,subtree:!0})}function r(e,n={},s={}){return t.dispatchEvent(new CustomEvent(e,{detail:n,...s}))}return{addEventListener:t.addEventListener.bind(t),on:t.addEventListener.bind(t),removeEventListener:t.removeEventListener.bind(t),off:t.removeEventListener.bind(t)}}function E(o){return o.includes("-")&&!customElements.get(o)}function p(o){return o.split("/").pop().split(".").shift().toLowerCase()}exports.trySafeEval=b.trySafeEval;exports.loadCustomElements=w;exports.setup=L;
|
package/dist/sleek.js
CHANGED
|
@@ -1,38 +1,41 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
function L(
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { t as C } from "./utils.js";
|
|
2
|
+
function L({ maps: o }) {
|
|
3
|
+
window.SLEEK || (window.SLEEK = {}), window.SLEEK.maps = o;
|
|
4
|
+
}
|
|
5
|
+
function w(o, {
|
|
6
|
+
resolveTagName: f = b,
|
|
7
|
+
watch: m = !0
|
|
5
8
|
} = {}) {
|
|
6
9
|
const t = new EventTarget(), i = Object.fromEntries(
|
|
7
|
-
Object.entries(
|
|
10
|
+
Object.entries(o).map(([e, n]) => [f(e), n])
|
|
8
11
|
);
|
|
9
|
-
a(),
|
|
10
|
-
function
|
|
12
|
+
a(), m && v();
|
|
13
|
+
function c(e) {
|
|
11
14
|
if (i[e]) {
|
|
12
|
-
if (
|
|
13
|
-
i[e]().then(() =>
|
|
15
|
+
if (r("element:load-start", { tagName: e }, { cancelable: !0 }) === !1) return;
|
|
16
|
+
i[e]().then(() => r("element:loading", { tagName: e })).catch((s) => r("element:load-error", { tagName: e, error: s })).then(() => r("element:load-end", { tagName: e }));
|
|
14
17
|
}
|
|
15
18
|
}
|
|
16
19
|
function a(e = document) {
|
|
17
20
|
e.querySelectorAll(Object.keys(i).join(",")).forEach((n) => {
|
|
18
|
-
|
|
21
|
+
E(n.tagName.toLowerCase()) && c(n.tagName.toLowerCase());
|
|
19
22
|
});
|
|
20
23
|
}
|
|
21
24
|
function v() {
|
|
22
25
|
new MutationObserver((n) => {
|
|
23
|
-
|
|
24
|
-
s.addedNodes.forEach((
|
|
25
|
-
if (
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
|
|
26
|
+
r("observer:scan-start"), n.forEach((s) => {
|
|
27
|
+
s.addedNodes.forEach((u) => {
|
|
28
|
+
if (u.nodeType === Node.ELEMENT_NODE) {
|
|
29
|
+
const d = u;
|
|
30
|
+
r("observer:scan-node", { node: d });
|
|
31
|
+
const l = d.tagName.toLowerCase();
|
|
32
|
+
E(l) && c(l), a(d);
|
|
30
33
|
}
|
|
31
34
|
});
|
|
32
|
-
}),
|
|
35
|
+
}), r("observer:scan-end");
|
|
33
36
|
}).observe(document.body, { childList: !0, subtree: !0 });
|
|
34
37
|
}
|
|
35
|
-
function
|
|
38
|
+
function r(e, n = {}, s = {}) {
|
|
36
39
|
return t.dispatchEvent(new CustomEvent(e, { detail: n, ...s }));
|
|
37
40
|
}
|
|
38
41
|
return {
|
|
@@ -42,13 +45,14 @@ function L(r, {
|
|
|
42
45
|
off: t.removeEventListener.bind(t)
|
|
43
46
|
};
|
|
44
47
|
}
|
|
45
|
-
function
|
|
46
|
-
return
|
|
48
|
+
function E(o) {
|
|
49
|
+
return o.includes("-") && !customElements.get(o);
|
|
47
50
|
}
|
|
48
|
-
function b(
|
|
49
|
-
return
|
|
51
|
+
function b(o) {
|
|
52
|
+
return o.split("/").pop().split(".").shift().toLowerCase();
|
|
50
53
|
}
|
|
51
54
|
export {
|
|
52
|
-
|
|
53
|
-
|
|
55
|
+
w as loadCustomElements,
|
|
56
|
+
L as setup,
|
|
57
|
+
C as trySafeEval
|
|
54
58
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prometa/sleek",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.11",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"preview": "vite preview"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
+
"@googlemaps/js-api-loader": "^1.16.10",
|
|
27
28
|
"chart.js": "^4.4.8",
|
|
28
29
|
"chartjs-adapter-date-fns": "^3.0.0",
|
|
29
30
|
"chartjs-plugin-annotation": "^3.1.0",
|
|
@@ -32,6 +33,7 @@
|
|
|
32
33
|
"tom-select": "^2.4.3"
|
|
33
34
|
},
|
|
34
35
|
"devDependencies": {
|
|
36
|
+
"@types/google.maps": "^3.58.1",
|
|
35
37
|
"vite": "^6.2.0",
|
|
36
38
|
"vite-plugin-dts": "^4.5.3"
|
|
37
39
|
}
|