@vizel/core 0.0.1-alpha.1

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.
Files changed (77) hide show
  1. package/README.md +44 -0
  2. package/dist/components.css +1 -0
  3. package/dist/components.css.map +1 -0
  4. package/dist/index.d.ts +2642 -0
  5. package/dist/index.js +150 -0
  6. package/dist/index10.js +118 -0
  7. package/dist/index11.js +174 -0
  8. package/dist/index12.js +78 -0
  9. package/dist/index13.js +141 -0
  10. package/dist/index14.js +150 -0
  11. package/dist/index15.js +20 -0
  12. package/dist/index16.js +17 -0
  13. package/dist/index17.js +308 -0
  14. package/dist/index18.js +52 -0
  15. package/dist/index19.js +29 -0
  16. package/dist/index2.js +93 -0
  17. package/dist/index20.js +268 -0
  18. package/dist/index21.js +72 -0
  19. package/dist/index22.js +360 -0
  20. package/dist/index23.js +87 -0
  21. package/dist/index24.js +39 -0
  22. package/dist/index25.js +95 -0
  23. package/dist/index26.js +104 -0
  24. package/dist/index27.js +136 -0
  25. package/dist/index28.js +56 -0
  26. package/dist/index29.js +69 -0
  27. package/dist/index3.js +69 -0
  28. package/dist/index30.js +40 -0
  29. package/dist/index31.js +26 -0
  30. package/dist/index32.js +15 -0
  31. package/dist/index33.js +12 -0
  32. package/dist/index34.js +19 -0
  33. package/dist/index35.js +60 -0
  34. package/dist/index36.js +17 -0
  35. package/dist/index37.js +66 -0
  36. package/dist/index38.js +6 -0
  37. package/dist/index39.js +125 -0
  38. package/dist/index4.js +89 -0
  39. package/dist/index40.js +329 -0
  40. package/dist/index41.js +489 -0
  41. package/dist/index42.js +50 -0
  42. package/dist/index43.js +676 -0
  43. package/dist/index44.js +6 -0
  44. package/dist/index45.js +6 -0
  45. package/dist/index46.js +240 -0
  46. package/dist/index47.js +84 -0
  47. package/dist/index48.js +288 -0
  48. package/dist/index49.js +1504 -0
  49. package/dist/index5.js +13 -0
  50. package/dist/index50.js +7 -0
  51. package/dist/index51.js +1563 -0
  52. package/dist/index52.js +204 -0
  53. package/dist/index53.js +725 -0
  54. package/dist/index54.js +23 -0
  55. package/dist/index55.js +12 -0
  56. package/dist/index56.js +9 -0
  57. package/dist/index57.js +10 -0
  58. package/dist/index58.js +16 -0
  59. package/dist/index59.js +21 -0
  60. package/dist/index6.js +135 -0
  61. package/dist/index60.js +27 -0
  62. package/dist/index61.js +86 -0
  63. package/dist/index62.js +248 -0
  64. package/dist/index63.js +1234 -0
  65. package/dist/index64.js +736 -0
  66. package/dist/index65.js +5 -0
  67. package/dist/index66.js +1063 -0
  68. package/dist/index67.js +57 -0
  69. package/dist/index68.js +100 -0
  70. package/dist/index69.js +6 -0
  71. package/dist/index7.js +456 -0
  72. package/dist/index70.js +93 -0
  73. package/dist/index8.js +52 -0
  74. package/dist/index9.js +275 -0
  75. package/dist/styles.css +1 -0
  76. package/dist/styles.css.map +1 -0
  77. package/package.json +109 -0
@@ -0,0 +1,26 @@
1
+ const r = "50";
2
+ function c() {
3
+ const e = document.createElement("div");
4
+ e.style.position = "absolute", e.style.zIndex = "50", document.body.appendChild(e);
5
+ const n = document.createElement("div");
6
+ return e.appendChild(n), {
7
+ container: e,
8
+ menuContainer: n,
9
+ updatePosition: (o) => {
10
+ if (!o) return;
11
+ const t = o();
12
+ t && (e.style.top = `${t.bottom + window.scrollY}px`, e.style.left = `${t.left + window.scrollX}px`);
13
+ },
14
+ destroy: () => {
15
+ e.remove();
16
+ }
17
+ };
18
+ }
19
+ function d(e) {
20
+ return e.key === "Escape";
21
+ }
22
+ export {
23
+ r as VIZEL_SUGGESTION_Z_INDEX,
24
+ c as createVizelSuggestionContainer,
25
+ d as handleVizelSuggestionEscape
26
+ };
@@ -0,0 +1,15 @@
1
+ function s(t) {
2
+ return /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(t);
3
+ }
4
+ function a(t) {
5
+ const e = t.trim(), r = e.startsWith("#") ? e : `#${e}`;
6
+ if (r.length === 4) {
7
+ const [, o, i, n] = r;
8
+ return `#${o}${o}${i}${i}${n}${n}`.toUpperCase();
9
+ }
10
+ return r.toUpperCase();
11
+ }
12
+ export {
13
+ s as isVizelValidHexColor,
14
+ a as normalizeVizelHexColor
15
+ };
@@ -0,0 +1,12 @@
1
+ function g(i, e) {
2
+ if (!e || e.length === 0)
3
+ return [{ text: i, highlight: !1 }];
4
+ const t = [];
5
+ let l = 0;
6
+ for (const [h, s] of e)
7
+ h > l && t.push({ text: i.slice(l, h), highlight: !1 }), t.push({ text: i.slice(h, s + 1), highlight: !0 }), l = s + 1;
8
+ return l < i.length && t.push({ text: i.slice(l), highlight: !1 }), t;
9
+ }
10
+ export {
11
+ g as splitVizelTextByMatches
12
+ };
@@ -0,0 +1,19 @@
1
+ import { mergeIconData as s } from "./index57.js";
2
+ import { getIconsTree as f } from "./index58.js";
3
+ function i(r, o, n) {
4
+ const u = r.icons, l = r.aliases || /* @__PURE__ */ Object.create(null);
5
+ let t = {};
6
+ function c(e) {
7
+ t = s(u[e] || l[e], t);
8
+ }
9
+ return c(o), n.forEach(c), s(r, t);
10
+ }
11
+ function g(r, o) {
12
+ if (r.icons[o]) return i(r, o, []);
13
+ const n = f(r, [o])[o];
14
+ return n ? i(r, o, n) : null;
15
+ }
16
+ export {
17
+ g as getIconData,
18
+ i as internalGetIconData
19
+ };
@@ -0,0 +1,60 @@
1
+ import { defaultIconProps as k } from "./index54.js";
2
+ import { defaultIconCustomisations as y } from "./index55.js";
3
+ import { calculateSize as b } from "./index59.js";
4
+ import { wrapSVGContent as C } from "./index60.js";
5
+ const I = (s) => s === "unset" || s === "undefined" || s === "none";
6
+ function H(s, x) {
7
+ const n = {
8
+ ...k,
9
+ ...s
10
+ }, g = {
11
+ ...y,
12
+ ...x
13
+ }, t = {
14
+ left: n.left,
15
+ top: n.top,
16
+ width: n.width,
17
+ height: n.height
18
+ };
19
+ let u = n.body;
20
+ [n, g].forEach((r) => {
21
+ const o = [], F = r.hFlip, S = r.vFlip;
22
+ let e = r.rotate;
23
+ F ? S ? e += 2 : (o.push("translate(" + (t.width + t.left).toString() + " " + (0 - t.top).toString() + ")"), o.push("scale(-1 1)"), t.top = t.left = 0) : S && (o.push("translate(" + (0 - t.left).toString() + " " + (t.height + t.top).toString() + ")"), o.push("scale(1 -1)"), t.top = t.left = 0);
24
+ let i;
25
+ switch (e < 0 && (e -= Math.floor(e / 4) * 4), e = e % 4, e) {
26
+ case 1:
27
+ i = t.height / 2 + t.top, o.unshift("rotate(90 " + i.toString() + " " + i.toString() + ")");
28
+ break;
29
+ case 2:
30
+ o.unshift("rotate(180 " + (t.width / 2 + t.left).toString() + " " + (t.height / 2 + t.top).toString() + ")");
31
+ break;
32
+ case 3:
33
+ i = t.width / 2 + t.left, o.unshift("rotate(-90 " + i.toString() + " " + i.toString() + ")");
34
+ break;
35
+ }
36
+ e % 2 === 1 && (t.left !== t.top && (i = t.left, t.left = t.top, t.top = i), t.width !== t.height && (i = t.width, t.width = t.height, t.height = i)), o.length && (u = C(u, '<g transform="' + o.join(" ") + '">', "</g>"));
37
+ });
38
+ const p = g.width, h = g.height, f = t.width, l = t.height;
39
+ let a, c;
40
+ p === null ? (c = h === null ? "1em" : h === "auto" ? l : h, a = b(c, f / l)) : (a = p === "auto" ? f : p, c = h === null ? b(a, l / f) : h === "auto" ? l : h);
41
+ const d = {}, w = (r, o) => {
42
+ I(o) || (d[r] = o.toString());
43
+ };
44
+ w("width", a), w("height", c);
45
+ const m = [
46
+ t.left,
47
+ t.top,
48
+ f,
49
+ l
50
+ ];
51
+ return d.viewBox = m.join(" "), {
52
+ attributes: d,
53
+ viewBox: m,
54
+ body: u
55
+ };
56
+ }
57
+ export {
58
+ H as iconToSVG,
59
+ I as isUnsetKeyword
60
+ };