@nasa-terra/components 0.0.0 → 0.0.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 (236) hide show
  1. package/{dist/chunks/chunk.SZQ6DLHF.js → cdn/chunks/chunk.27YQ2AOA.js} +6 -6
  2. package/cdn/chunks/{chunk.BHXZEJO5.js → chunk.2B4YBQ5O.js} +1 -1
  3. package/cdn/chunks/chunk.2I657ASB.js +85 -0
  4. package/cdn/chunks/{chunk.R5TLD4JZ.js → chunk.2J6CFV4K.js} +1 -1
  5. package/{dist/chunks/chunk.SJ6OGWI6.js → cdn/chunks/chunk.2O76GCUZ.js} +1 -1
  6. package/cdn/chunks/chunk.2V4XFMTB.js +7 -0
  7. package/{dist/chunks/chunk.2RBWEAYS.js → cdn/chunks/chunk.36AVAQOO.js} +4 -4
  8. package/cdn/chunks/chunk.3ZGFXEAJ.js +273 -0
  9. package/cdn/chunks/{chunk.D6XFZNUK.js → chunk.4YOL6PQR.js} +4 -4
  10. package/{dist/chunks/chunk.6ZHGOB2G.js → cdn/chunks/chunk.77L4US7V.js} +1 -1
  11. package/cdn/chunks/chunk.7DEY3B3N.js +11 -0
  12. package/cdn/chunks/chunk.7VUSSQRI.js +20 -0
  13. package/cdn/chunks/chunk.AAWOHDFX.js +259 -0
  14. package/cdn/chunks/{chunk.34DQXAAA.js → chunk.AEIZVWLR.js} +1 -1
  15. package/cdn/chunks/{chunk.CI6OSO6M.js → chunk.BB7N2ZYB.js} +1 -1
  16. package/cdn/chunks/{chunk.Y4CNYLFC.js → chunk.BINGLTII.js} +1 -1
  17. package/cdn/chunks/chunk.BLNUBLUS.js +289 -0
  18. package/cdn/chunks/{chunk.AOKHUEZK.js → chunk.D33ZL7ZQ.js} +1 -1
  19. package/{dist/chunks/chunk.VIV3TUJX.js → cdn/chunks/chunk.DL3FIOYA.js} +1 -1
  20. package/cdn/chunks/{chunk.E3743HRF.js → chunk.DQGFAA4K.js} +4 -4
  21. package/cdn/chunks/{chunk.TA3MUOR6.js → chunk.EFAXKQZX.js} +1 -1
  22. package/cdn/chunks/chunk.FGILL5W6.js +118 -0
  23. package/cdn/chunks/chunk.FXIUS5TR.js +21 -0
  24. package/cdn/chunks/{chunk.P2U3GEIK.js → chunk.FZT3BVW7.js} +1 -1
  25. package/{dist/chunks/chunk.TCOEMJRS.js → cdn/chunks/chunk.GCKJPPGU.js} +1 -1
  26. package/cdn/chunks/chunk.I2NEFB34.js +99 -0
  27. package/cdn/chunks/{chunk.RVZES2AU.js → chunk.I32QCWMN.js} +1 -1
  28. package/cdn/chunks/chunk.IBEKZVOY.js +80 -0
  29. package/cdn/chunks/{chunk.42A7HENY.js → chunk.IO4MLLEG.js} +1 -1
  30. package/cdn/chunks/{chunk.P4XRFEY4.js → chunk.IP3XWLQI.js} +1 -1
  31. package/{dist/chunks/chunk.R4J62P4T.js → cdn/chunks/chunk.IQITDFID.js} +1 -1
  32. package/cdn/chunks/chunk.ITX3RB2M.js +11 -0
  33. package/cdn/chunks/{chunk.OEWCLC7K.js → chunk.J576Q62R.js} +1 -1
  34. package/cdn/chunks/{chunk.4TENYCNW.js → chunk.JCZW2OWI.js} +1 -1
  35. package/cdn/chunks/chunk.JFU3ZCDL.js +359 -0
  36. package/{dist/chunks/chunk.36PTCDA5.js → cdn/chunks/chunk.JOVDYQHE.js} +1 -1
  37. package/cdn/chunks/{chunk.6RAHIA27.js → chunk.JV6B7CXO.js} +2 -1
  38. package/cdn/chunks/{chunk.5X6SO6J5.js → chunk.KH54YRZ3.js} +1 -1
  39. package/cdn/chunks/{chunk.7FISIUEV.js → chunk.KVY2Y3KE.js} +1 -1
  40. package/cdn/chunks/{chunk.ZMCLEFDE.js → chunk.KXLY6BVH.js} +4 -4
  41. package/cdn/chunks/chunk.LELNKRPW.js +685 -0
  42. package/cdn/chunks/{chunk.53SMSSCB.js → chunk.M25XJ2VR.js} +6 -6
  43. package/cdn/chunks/{chunk.X7ARZIFO.js → chunk.MDM7S6E6.js} +1 -1
  44. package/cdn/chunks/{chunk.253Y3NFH.js → chunk.MIAPAPCI.js} +1 -1
  45. package/{dist/chunks/chunk.XJ3P4AO2.js → cdn/chunks/chunk.MKXJDRVT.js} +1 -1
  46. package/{dist/chunks/chunk.LE36I4N2.js → cdn/chunks/chunk.MOJMTJF6.js} +1 -1
  47. package/{dist/chunks/chunk.NZYKW5Y7.js → cdn/chunks/chunk.MQ5JNQCQ.js} +1 -1
  48. package/cdn/chunks/chunk.MWHQHPUM.js +54 -0
  49. package/{dist/chunks/chunk.WJPV6KQS.js → cdn/chunks/chunk.MXAZ646L.js} +1 -1
  50. package/cdn/chunks/chunk.N2DS7NLI.js +102 -0
  51. package/{dist/chunks/chunk.A2U7NITY.js → cdn/chunks/chunk.NU4LRV7F.js} +1 -1
  52. package/cdn/chunks/chunk.NYBJ252W.js +318 -0
  53. package/cdn/chunks/chunk.OIDMX5LU.js +10 -0
  54. package/cdn/chunks/{chunk.M366DOLL.js → chunk.OLCGKQR3.js} +1 -1
  55. package/{dist/chunks/chunk.WBXETWE4.js → cdn/chunks/chunk.OOUCODFZ.js} +2 -1
  56. package/cdn/chunks/chunk.OQE2USZJ.js +41 -0
  57. package/cdn/chunks/chunk.OU4UPMYR.js +330 -0
  58. package/cdn/chunks/{chunk.6PIZJ2ZO.js → chunk.P7W2ODWK.js} +1 -1
  59. package/cdn/chunks/chunk.PJXIJK2G.js +102 -0
  60. package/cdn/chunks/{chunk.AURPVGI4.js → chunk.QQ33BJLG.js} +1 -1
  61. package/cdn/chunks/{chunk.NUMFOBCB.js → chunk.R3AE5AQ5.js} +4 -4
  62. package/cdn/chunks/{chunk.T3YOGGMB.js → chunk.RBKBAQOH.js} +5 -5
  63. package/cdn/chunks/{chunk.JSEQXKIQ.js → chunk.RDOXOIYG.js} +1 -1
  64. package/{dist/chunks/chunk.YNY2FQKA.js → cdn/chunks/chunk.RVJP24KU.js} +1 -1
  65. package/cdn/chunks/chunk.RYPAZDXE.js +61 -0
  66. package/cdn/chunks/chunk.SHS42OAD.js +620 -0
  67. package/cdn/chunks/{chunk.4CAXR33B.js → chunk.SJADWOCY.js} +1 -1
  68. package/cdn/chunks/{chunk.AY5ZYXPF.js → chunk.SMRM4VEQ.js} +1 -1
  69. package/{dist/chunks/chunk.DNBHAHKW.js → cdn/chunks/chunk.SQMSSGQI.js} +1 -1
  70. package/cdn/chunks/chunk.T322FDKI.js +300 -0
  71. package/cdn/chunks/{chunk.RRCPVEE3.js → chunk.TV2NZLRC.js} +4 -4
  72. package/cdn/chunks/{chunk.6JYG4IP3.js → chunk.UE4FYVUH.js} +1 -1
  73. package/cdn/chunks/{chunk.EPEFC6PC.js → chunk.UJBBUYTN.js} +1 -1
  74. package/cdn/chunks/{chunk.BSSVF7JN.js → chunk.UQVPFKN3.js} +7 -7
  75. package/cdn/chunks/chunk.UU46CLE7.js +120 -0
  76. package/cdn/chunks/{chunk.OFCNXAUR.js → chunk.VEUDIPUW.js} +1 -1
  77. package/cdn/chunks/chunk.WGFD2LHA.js +83 -0
  78. package/cdn/chunks/chunk.WNRL2JWN.js +21 -0
  79. package/{dist/chunks/chunk.J6NGZHLF.js → cdn/chunks/chunk.Y3WAKQQ3.js} +1 -1
  80. package/cdn/chunks/chunk.YOR2OZZR.js +11 -0
  81. package/{dist/chunks/chunk.YHSKQAEB.js → cdn/chunks/chunk.ZAHTEXVC.js} +1 -1
  82. package/cdn/chunks/chunk.ZCNMYQP2.js +113 -0
  83. package/cdn/chunks/chunk.ZGJAUXFV.js +39 -0
  84. package/cdn/chunks/chunk.ZK7QVWBI.js +37 -0
  85. package/{dist/chunks/chunk.BEIVIE7M.js → cdn/chunks/chunk.ZPPR6CPT.js} +1 -1
  86. package/cdn/chunks/chunk.ZQ5WJYY5.js +21 -0
  87. package/{dist/chunks/chunk.OZ37OLF4.js → cdn/chunks/chunk.ZVKNJQPF.js} +1 -1
  88. package/cdn/components/button/button.component.js +3 -3
  89. package/cdn/components/button/button.js +4 -4
  90. package/cdn/components/chip/chip.component.js +3 -3
  91. package/cdn/components/chip/chip.js +4 -4
  92. package/cdn/components/combobox/combobox.component.js +4 -4
  93. package/cdn/components/combobox/combobox.js +5 -5
  94. package/cdn/components/date-range-slider/date-range-slider.component.js +2 -2
  95. package/cdn/components/date-range-slider/date-range-slider.js +3 -3
  96. package/cdn/components/icon/icon.component.js +4 -4
  97. package/cdn/components/icon/icon.js +5 -5
  98. package/cdn/components/loader/loader.component.js +2 -2
  99. package/cdn/components/loader/loader.js +3 -3
  100. package/cdn/components/map/map.component.js +4 -4
  101. package/cdn/components/map/map.js +5 -5
  102. package/cdn/components/plot/plot.component.js +2 -2
  103. package/cdn/components/plot/plot.js +3 -3
  104. package/cdn/components/spatial-picker/spatial-picker.component.js +6 -6
  105. package/cdn/components/spatial-picker/spatial-picker.js +7 -7
  106. package/cdn/components/time-series/time-series.component.js +26 -26
  107. package/cdn/components/time-series/time-series.controller.js +1 -1
  108. package/cdn/components/time-series/time-series.js +27 -27
  109. package/cdn/components/variable-combobox/variable-combobox.component.js +12 -12
  110. package/cdn/components/variable-combobox/variable-combobox.js +13 -13
  111. package/cdn/custom-elements.json +973 -973
  112. package/cdn/react/button/index.js +4 -4
  113. package/cdn/react/chip/index.js +4 -4
  114. package/cdn/react/combobox/index.js +5 -5
  115. package/cdn/react/date-range-slider/index.js +3 -3
  116. package/cdn/react/icon/index.js +5 -5
  117. package/cdn/react/index.d.ts +3 -3
  118. package/cdn/react/index.js +50 -50
  119. package/cdn/react/loader/index.js +3 -3
  120. package/cdn/react/map/index.js +5 -5
  121. package/cdn/react/plot/index.js +3 -3
  122. package/cdn/react/spatial-picker/index.js +7 -7
  123. package/cdn/react/time-series/index.js +27 -27
  124. package/cdn/react/variable-combobox/index.js +13 -13
  125. package/cdn/terra-ui-components.js +54 -54
  126. package/cdn/types/vue/index.d.ts +98 -98
  127. package/cdn/utilities/animation.js +3 -3
  128. package/cdn/vscode.html-custom-data.json +111 -111
  129. package/cdn/web-types.json +205 -205
  130. package/dist/chunks/chunk.27YQ2AOA.js +251 -0
  131. package/dist/chunks/chunk.2O76GCUZ.js +21 -0
  132. package/dist/chunks/chunk.2WZAYHEX.js +214 -0
  133. package/dist/chunks/chunk.356SSUTI.js +11 -0
  134. package/dist/chunks/chunk.36AVAQOO.js +404 -0
  135. package/dist/chunks/chunk.3D66L46K.js +11 -0
  136. package/dist/chunks/chunk.3LUNFNDR.js +118 -0
  137. package/dist/chunks/chunk.4MN2BLJS.js +21 -0
  138. package/dist/chunks/chunk.5B33QFBB.js +83 -0
  139. package/dist/chunks/chunk.65A3A43G.js +21 -0
  140. package/dist/chunks/chunk.BB7N2ZYB.js +21 -0
  141. package/dist/chunks/chunk.D6FJH7WA.js +21 -0
  142. package/dist/chunks/chunk.DDPOISEU.js +179 -0
  143. package/dist/chunks/chunk.EBBV6NVD.js +11 -0
  144. package/dist/chunks/chunk.EMISRECR.js +214 -0
  145. package/dist/chunks/chunk.FZT3BVW7.js +21 -0
  146. package/dist/chunks/chunk.GHCQCYO6.js +179 -0
  147. package/dist/chunks/chunk.HO5CZIK5.js +11 -0
  148. package/dist/chunks/chunk.IEU4MULT.js +25 -0
  149. package/dist/chunks/chunk.IO4MLLEG.js +21 -0
  150. package/dist/chunks/chunk.IP3XWLQI.js +11 -0
  151. package/dist/chunks/chunk.J4B6HPXD.js +11 -0
  152. package/dist/chunks/chunk.J576Q62R.js +11 -0
  153. package/dist/chunks/chunk.JCZW2OWI.js +11 -0
  154. package/dist/chunks/chunk.K2HRGRYE.js +11 -0
  155. package/dist/chunks/chunk.KXNDHJXA.js +404 -0
  156. package/dist/chunks/chunk.MIAPAPCI.js +21 -0
  157. package/dist/chunks/chunk.MOJMTJF6.js +24 -0
  158. package/dist/chunks/chunk.MXAZ646L.js +11 -0
  159. package/dist/chunks/chunk.NNLAIN52.js +11 -0
  160. package/dist/chunks/chunk.NO35M7LF.js +21 -0
  161. package/dist/chunks/chunk.NOEGCTIS.js +194 -0
  162. package/dist/chunks/chunk.NU4LRV7F.js +21 -0
  163. package/dist/chunks/chunk.NZIGCRLS.js +11 -0
  164. package/dist/chunks/chunk.OIGE7CMM.js +11 -0
  165. package/dist/chunks/chunk.OOUCODFZ.js +179 -0
  166. package/dist/chunks/chunk.ORZO3BCW.js +102 -0
  167. package/dist/chunks/chunk.P25SJ6YA.js +478 -0
  168. package/dist/chunks/chunk.P4QMMCAR.js +24 -0
  169. package/dist/chunks/chunk.PGNCNTOA.js +21 -0
  170. package/dist/chunks/chunk.Q7F3GGVA.js +251 -0
  171. package/dist/chunks/chunk.QSCELHEQ.js +325 -0
  172. package/dist/chunks/chunk.RDOXOIYG.js +11 -0
  173. package/dist/chunks/chunk.SBTZE5QZ.js +21 -0
  174. package/dist/chunks/chunk.SCU5LFS3.js +325 -0
  175. package/dist/chunks/chunk.SJADWOCY.js +11 -0
  176. package/dist/chunks/chunk.SMRM4VEQ.js +11 -0
  177. package/dist/chunks/chunk.T7MOUOBT.js +11 -0
  178. package/dist/chunks/chunk.UE4FYVUH.js +25 -0
  179. package/dist/chunks/chunk.UJBBUYTN.js +11 -0
  180. package/dist/chunks/chunk.WL747XGE.js +194 -0
  181. package/dist/chunks/chunk.XKDGF53W.js +21 -0
  182. package/dist/chunks/chunk.XLYZ6HY4.js +179 -0
  183. package/dist/chunks/chunk.XXV47QL2.js +21 -0
  184. package/dist/chunks/chunk.Y3WAKQQ3.js +179 -0
  185. package/dist/chunks/chunk.Y5CHSR6B.js +21 -0
  186. package/dist/chunks/chunk.YDJ7Z7YW.js +478 -0
  187. package/dist/chunks/chunk.YDMA4OA3.js +11 -0
  188. package/dist/chunks/chunk.Z2WXDYZC.js +85 -0
  189. package/dist/components/button/button.component.js +3 -3
  190. package/dist/components/button/button.js +4 -4
  191. package/dist/components/chip/chip.component.js +2 -2
  192. package/dist/components/chip/chip.js +3 -3
  193. package/dist/components/combobox/combobox.component.js +4 -4
  194. package/dist/components/combobox/combobox.js +5 -5
  195. package/dist/components/date-range-slider/date-range-slider.component.js +2 -2
  196. package/dist/components/date-range-slider/date-range-slider.js +3 -3
  197. package/dist/components/icon/icon.component.js +3 -3
  198. package/dist/components/icon/icon.js +4 -4
  199. package/dist/components/loader/loader.component.js +2 -2
  200. package/dist/components/loader/loader.js +3 -3
  201. package/dist/components/map/map.component.js +4 -4
  202. package/dist/components/map/map.js +5 -5
  203. package/dist/components/plot/plot.component.js +2 -2
  204. package/dist/components/plot/plot.js +3 -3
  205. package/dist/components/spatial-picker/spatial-picker.component.js +6 -6
  206. package/dist/components/spatial-picker/spatial-picker.js +7 -7
  207. package/dist/components/time-series/time-series.component.js +22 -22
  208. package/dist/components/time-series/time-series.controller.js +1 -1
  209. package/dist/components/time-series/time-series.js +23 -23
  210. package/dist/components/variable-combobox/variable-combobox.component.js +9 -9
  211. package/dist/components/variable-combobox/variable-combobox.js +10 -10
  212. package/dist/custom-elements.json +973 -973
  213. package/dist/react/button/index.js +4 -4
  214. package/dist/react/chip/index.js +3 -3
  215. package/dist/react/combobox/index.js +5 -5
  216. package/dist/react/date-range-slider/index.js +3 -3
  217. package/dist/react/icon/index.js +4 -4
  218. package/dist/react/index.d.ts +3 -3
  219. package/dist/react/index.js +47 -47
  220. package/dist/react/loader/index.js +3 -3
  221. package/dist/react/map/index.js +5 -5
  222. package/dist/react/plot/index.js +3 -3
  223. package/dist/react/spatial-picker/index.js +7 -7
  224. package/dist/react/time-series/index.js +23 -23
  225. package/dist/react/variable-combobox/index.js +10 -10
  226. package/dist/terra-ui-components.js +46 -46
  227. package/dist/types/vue/index.d.ts +98 -98
  228. package/dist/vscode.html-custom-data.json +111 -111
  229. package/dist/web-types.json +205 -205
  230. package/package.json +1 -1
  231. package/{dist/chunks/chunk.HKHDBTIC.js → cdn/chunks/chunk.EMISRECR.js} +3 -3
  232. package/{dist/chunks/chunk.KRXFJQUH.js → cdn/chunks/chunk.GHCQCYO6.js} +3 -3
  233. package/{dist/chunks/chunk.I7ZPL3IO.js → cdn/chunks/chunk.P25SJ6YA.js} +3 -3
  234. package/{dist/chunks/chunk.OSC7AN4C.js → cdn/chunks/chunk.SCU5LFS3.js} +3 -3
  235. package/{dist/chunks/chunk.V3YTQSMP.js → cdn/chunks/chunk.WL747XGE.js} +3 -3
  236. package/cdn/chunks/{chunk.LQCRC4E2.js → chunk.XR56EMXH.js} +8 -8
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  TimeSeriesController
3
- } from "./chunk.WBXETWE4.js";
3
+ } from "./chunk.OOUCODFZ.js";
4
4
  import {
5
5
  time_series_styles_default
6
6
  } from "./chunk.ZGJAUXFV.js";
7
7
  import {
8
8
  TerraVariableCombobox
9
- } from "./chunk.2RBWEAYS.js";
10
- import {
11
- spatial_picker_default
12
- } from "./chunk.YHSKQAEB.js";
9
+ } from "./chunk.36AVAQOO.js";
13
10
  import {
14
11
  TerraPlot
15
12
  } from "./chunk.FGILL5W6.js";
13
+ import {
14
+ spatial_picker_default
15
+ } from "./chunk.IP3XWLQI.js";
16
16
  import {
17
17
  TerraDateRangeSlider
18
- } from "./chunk.KRXFJQUH.js";
18
+ } from "./chunk.GHCQCYO6.js";
19
19
  import {
20
20
  watch
21
21
  } from "./chunk.ZK7QVWBI.js";
@@ -16,7 +16,7 @@ import {
16
16
  import {
17
17
  TerraElement,
18
18
  component_styles_default
19
- } from "./chunk.OFCNXAUR.js";
19
+ } from "./chunk.VEUDIPUW.js";
20
20
  import {
21
21
  e,
22
22
  n
@@ -0,0 +1,85 @@
1
+ import {
2
+ loader_styles_default
3
+ } from "./chunk.I2NEFB34.js";
4
+ import {
5
+ TerraElement,
6
+ component_styles_default
7
+ } from "./chunk.PJXIJK2G.js";
8
+ import {
9
+ __decorateClass
10
+ } from "./chunk.RYPAZDXE.js";
11
+
12
+ // src/components/loader/loader.component.ts
13
+ import { property } from "lit/decorators.js";
14
+ import { html, nothing } from "lit";
15
+ import { classMap } from "lit/directives/class-map.js";
16
+ var TerraLoader = class extends TerraElement {
17
+ constructor() {
18
+ super(...arguments);
19
+ this.size = "large";
20
+ this.percent = 0;
21
+ this.label = "Loading request";
22
+ this.message = "";
23
+ }
24
+ formatPercent(percent) {
25
+ if (percent > 100) {
26
+ percent = 100;
27
+ }
28
+ return percent > 0 ? percent + "%" : "";
29
+ }
30
+ render() {
31
+ return html`
32
+ <div
33
+ class=${classMap({
34
+ loader: true,
35
+ "loader--small": this.size === "small",
36
+ "loader--large": this.size === "large",
37
+ "loader--light": this.theme === "light",
38
+ "loader--dark": this.theme === "dark"
39
+ })}
40
+ arial-lable=${this.label}
41
+ aria-valuetext="${this.message || nothing}"
42
+ ${this.message != "" ? "aria-valuetext=${this.message}" : ""}
43
+ aria-valuenow=${this.formatPercent(this.percent)}
44
+ role="progressbar"
45
+ tabindex="-1"
46
+ >
47
+ ${this.size === "large" ? html`
48
+ <div class="percent">
49
+ ${this.formatPercent(this.percent)}
50
+ </div>
51
+ ` : ``}
52
+
53
+ <svg
54
+ viewBox=${this.size == "small" ? "0 0 30 30" : "0 0 52 52"}
55
+ aria-hidden="true"
56
+ style="--progress: ${this.percent}"
57
+ class="circular-progress"
58
+ >
59
+ <circle class="bg"></circle>
60
+ <circle class="fg"></circle>
61
+ </svg>
62
+ </div>
63
+ `;
64
+ }
65
+ };
66
+ TerraLoader.styles = [component_styles_default, loader_styles_default];
67
+ __decorateClass([
68
+ property({ reflect: true })
69
+ ], TerraLoader.prototype, "size", 2);
70
+ __decorateClass([
71
+ property({ reflect: true })
72
+ ], TerraLoader.prototype, "theme", 2);
73
+ __decorateClass([
74
+ property({ type: Number })
75
+ ], TerraLoader.prototype, "percent", 2);
76
+ __decorateClass([
77
+ property({ type: String })
78
+ ], TerraLoader.prototype, "label", 2);
79
+ __decorateClass([
80
+ property({ type: String })
81
+ ], TerraLoader.prototype, "message", 2);
82
+
83
+ export {
84
+ TerraLoader
85
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  TerraPlot
3
- } from "./chunk.7FISIUEV.js";
3
+ } from "./chunk.KVY2Y3KE.js";
4
4
 
5
5
  // src/components/plot/plot.ts
6
6
  var plot_default = TerraPlot;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  TerraTimeSeries
3
- } from "./chunk.SZQ6DLHF.js";
3
+ } from "./chunk.27YQ2AOA.js";
4
4
 
5
5
  // src/react/time-series/index.ts
6
6
  import * as React from "react";
@@ -0,0 +1,7 @@
1
+ // src/utilities/animation.ts
2
+ import { getAnimationNames, getEasingNames } from "@shoelace-style/shoelace";
3
+
4
+ export {
5
+ getAnimationNames,
6
+ getEasingNames
7
+ };
@@ -11,12 +11,12 @@ import {
11
11
  renderSearchResult,
12
12
  walkToOption
13
13
  } from "./chunk.UU46CLE7.js";
14
- import {
15
- button_default
16
- } from "./chunk.WJPV6KQS.js";
17
14
  import {
18
15
  icon_default
19
- } from "./chunk.R4J62P4T.js";
16
+ } from "./chunk.SMRM4VEQ.js";
17
+ import {
18
+ button_default
19
+ } from "./chunk.MXAZ646L.js";
20
20
  import {
21
21
  watch
22
22
  } from "./chunk.ZK7QVWBI.js";
@@ -0,0 +1,273 @@
1
+ import {
2
+ __spreadValues
3
+ } from "./chunk.RYPAZDXE.js";
4
+
5
+ // src/components/map/leaflet-utils.ts
6
+ import * as L from "leaflet";
7
+ import "leaflet-draw";
8
+ globalThis.type = "";
9
+ function parseBoundingBox(inputString) {
10
+ const coords = inputString.split(",");
11
+ if (coords.length !== 2 && coords.length !== 4) {
12
+ throw new Error(
13
+ 'Input string must contain exactly two or four numerical values. e.g "9.51, 21.80" or "52.03, -9.38, 96.33, 32.90"'
14
+ );
15
+ }
16
+ if (coords.length == 2) {
17
+ return {
18
+ lat: parseFloat(coords[0]),
19
+ lng: parseFloat(coords[1])
20
+ };
21
+ }
22
+ const bounds = coords.map(function(coord) {
23
+ let num = parseFloat(coord);
24
+ if (isNaN(num)) {
25
+ throw new Error("All parts of the input string must be valid numbers.");
26
+ }
27
+ return num;
28
+ });
29
+ const leafletBounds = [
30
+ [bounds[1], bounds[0]],
31
+ [bounds[3], bounds[2]]
32
+ ];
33
+ return leafletBounds;
34
+ }
35
+ function StringifyBoundingBox(input) {
36
+ if ("_southWest" in input && "_northEast" in input) {
37
+ return `${input._southWest.lng.toFixed(2)}, ${input._southWest.lat.toFixed(
38
+ 2
39
+ )}, ${input._northEast.lng.toFixed(2)}, ${input._northEast.lat.toFixed(2)}`;
40
+ } else if ("lat" in input && "lng" in input) {
41
+ return `${input.lat.toFixed(2)}, ${input.lng.toFixed(2)}`;
42
+ } else {
43
+ throw new Error("Invalid input type");
44
+ }
45
+ }
46
+ var Leaflet = class {
47
+ constructor() {
48
+ this.listeners = [];
49
+ this.isMapReady = false;
50
+ this.handleShapeSelect = this.handleShapeSelect.bind(this);
51
+ }
52
+ // map initialization function
53
+ initializeMap(container, options) {
54
+ this.map = new L.Map(container, {
55
+ center: options.latitude && options.longitude ? L.latLng(options.latitude, options.longitude) : L.latLng(40.731253, -73.996139),
56
+ zoom: options.zoom,
57
+ attributionControl: false,
58
+ minZoom: options.minZoom,
59
+ maxZoom: options.maxZoom
60
+ });
61
+ L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png", {
62
+ maxZoom: options.maxZoom
63
+ }).addTo(this.map);
64
+ if (options.hasCoordTracker) {
65
+ this.addCoordTracker();
66
+ }
67
+ if (options.hasNavigation) {
68
+ this.addDrawControl();
69
+ }
70
+ this.map.whenReady((_e) => {
71
+ var _a;
72
+ this.isMapReady = true;
73
+ if (options.initialValue && "lat" in options.initialValue && "lng" in options.initialValue) {
74
+ L.marker(options.initialValue, {
75
+ icon: L.icon({
76
+ iconUrl: "https://unpkg.com/leaflet@1.9.4/dist/images/marker-icon.png",
77
+ iconAnchor: [15, 40],
78
+ shadowUrl: "https://unpkg.com/leaflet@1.9.4/dist/images/marker-shadow.png"
79
+ })
80
+ }).addTo(this.editableLayers);
81
+ this.map.setView(options.initialValue, 5);
82
+ return;
83
+ }
84
+ if (((_a = options.initialValue) == null ? void 0 : _a.length) > 0) {
85
+ L.rectangle(options.initialValue, {
86
+ stroke: true,
87
+ color: "#3388ff",
88
+ weight: 4,
89
+ opacity: 0.5,
90
+ fill: true,
91
+ fillOpacity: 0.2
92
+ }).addTo(this.editableLayers);
93
+ this.map.fitBounds(options.initialValue);
94
+ }
95
+ });
96
+ }
97
+ addCoordTracker() {
98
+ const CoordTracker = L.Control.extend({
99
+ options: {
100
+ position: "bottomright",
101
+ title: "Mouse Position",
102
+ exclude: [],
103
+ include: []
104
+ },
105
+ onAdd: function(map) {
106
+ this.div = L.DomUtil.create(
107
+ "div",
108
+ "leaflet-mouse-position-container leaflet-bar"
109
+ );
110
+ this.p = L.DomUtil.create(
111
+ "p",
112
+ "leaflet-mouse-position-text",
113
+ this.div
114
+ );
115
+ let content = "lat: 0, lng: 0";
116
+ this.p.innerHTML = content;
117
+ L.DomEvent.addListener(map, "mousemove", this._onChange, this);
118
+ return this.div;
119
+ },
120
+ _onChange: function(e) {
121
+ this.p.innerHTML = `lat: ${Math.round(
122
+ e.latlng.lat
123
+ )}, lng: ${Math.round(e.latlng.lng)}`;
124
+ }
125
+ });
126
+ const coordTracker = new CoordTracker();
127
+ coordTracker.addTo(this.map);
128
+ }
129
+ addDrawControl() {
130
+ this.editableLayers = new L.FeatureGroup();
131
+ this.editableLayers.addTo(this.map);
132
+ let drawControl = new L.Control.Draw({
133
+ position: "topright",
134
+ draw: {
135
+ polyline: false,
136
+ polygon: false,
137
+ circle: false,
138
+ // Turns off this drawing tool
139
+ circlemarker: false,
140
+ rectangle: {},
141
+ marker: {
142
+ icon: L.icon({
143
+ iconUrl: "https://unpkg.com/leaflet@1.9.4/dist/images/marker-icon.png",
144
+ iconAnchor: [15, 40],
145
+ shadowUrl: "https://unpkg.com/leaflet@1.9.4/dist/images/marker-shadow.png"
146
+ })
147
+ }
148
+ },
149
+ edit: {
150
+ featureGroup: this.editableLayers
151
+ //REQUIRED!!
152
+ }
153
+ });
154
+ this.map.addControl(drawControl);
155
+ this.map.on("draw:created", (event) => {
156
+ this.editableLayers.clearLayers();
157
+ const { layer, layerType } = event;
158
+ this.editableLayers.addLayer(layer);
159
+ const detail = __spreadValues(__spreadValues({
160
+ geoJson: layer.toGeoJSON()
161
+ }, layerType === "rectangle" && { bounds: layer.getBounds() }), layerType === "marker" && { latLng: layer._latlng });
162
+ this.dispatch("draw", detail);
163
+ });
164
+ this.map.on("draw:edited", (event) => {
165
+ const { layer, layerType } = event;
166
+ const detail = __spreadValues(__spreadValues({
167
+ geoJson: layer.toGeoJSON()
168
+ }, layerType === "rectangle" && { bounds: layer.getBounds() }), layerType === "marker" && { latLng: layer._latlng });
169
+ this.dispatch("draw", detail);
170
+ });
171
+ this.map.on("draw:deleted", (_event) => {
172
+ this.editableLayers.clearLayers();
173
+ this.dispatch("clear");
174
+ });
175
+ }
176
+ on(eventName, callback) {
177
+ this.listeners.push({
178
+ eventName,
179
+ callback
180
+ });
181
+ }
182
+ dispatch(eventName, detail = null) {
183
+ const eventTriggered = this.listeners.filter(
184
+ (listener) => listener.eventName === eventName
185
+ );
186
+ eventTriggered.forEach((listener) => {
187
+ listener.callback(detail);
188
+ });
189
+ }
190
+ transformShapeData(data) {
191
+ const shapes = data.shapes;
192
+ const shapefileID = data.shapefileID;
193
+ const transformedShapes = Object.keys(shapes).map((key) => {
194
+ const shape = shapes[key];
195
+ let name;
196
+ if (shapefileID === "lakes") {
197
+ name = shape.values[2];
198
+ } else if (shapefileID === "gpmLandMask" || shapefileID === "gpmSeaMask") {
199
+ name = shape.values.find(
200
+ (value) => typeof value === "string" && value.includes("deg")
201
+ );
202
+ } else if (shapefileID === "state_dept_countries_2017" || shapefileID === "world_regions" || shapefileID === "major_world_basins") {
203
+ name = shape.values[1];
204
+ } else if (shapefileID === "tl_2014_us_state") {
205
+ name = shape.values[6];
206
+ }
207
+ return {
208
+ name,
209
+ [data.uniqueShapeIDField]: key,
210
+ shapefileID
211
+ };
212
+ });
213
+ return transformedShapes;
214
+ }
215
+ async fetchSelectedShape(query) {
216
+ const url = new URL("http://localhost:9000/getGeoJSON");
217
+ const [key, value] = query.split("=");
218
+ if (key && value) {
219
+ url.searchParams.append(key, encodeURIComponent(value));
220
+ }
221
+ const data = await fetch(url.toString(), {
222
+ method: "GET",
223
+ mode: "cors"
224
+ });
225
+ const shape = await data.json();
226
+ return shape;
227
+ }
228
+ async handleShapeSelect(event) {
229
+ var _a;
230
+ event.preventDefault();
231
+ const selectedShape = event.target.value;
232
+ if (!selectedShape)
233
+ return;
234
+ const shapeGeoJson = await this.fetchSelectedShape(selectedShape);
235
+ if ((_a = this.selectedGeoJson) == null ? void 0 : _a.hasLayer) {
236
+ this.selectedGeoJson.remove();
237
+ }
238
+ this.selectedGeoJson = L.geoJson(shapeGeoJson.features).addTo(
239
+ this.editableLayers
240
+ );
241
+ this.map.fitBounds(this.selectedGeoJson.getBounds());
242
+ this.dispatch("draw", {
243
+ geoJson: this.selectedGeoJson.toGeoJSON(),
244
+ bounds: this.selectedGeoJson.getBounds()
245
+ });
246
+ }
247
+ drawRectangle(bounds) {
248
+ this.clearLayers();
249
+ L.rectangle(bounds, {
250
+ stroke: true,
251
+ color: "#3388ff",
252
+ weight: 4,
253
+ opacity: 0.5,
254
+ fill: true,
255
+ fillOpacity: 0.2
256
+ }).addTo(this.editableLayers);
257
+ }
258
+ setValue(value) {
259
+ if (this.isMapReady) {
260
+ this.drawRectangle(value);
261
+ this.map.fitBounds(value);
262
+ }
263
+ }
264
+ clearLayers() {
265
+ this.editableLayers.clearLayers();
266
+ }
267
+ };
268
+
269
+ export {
270
+ parseBoundingBox,
271
+ StringifyBoundingBox,
272
+ Leaflet
273
+ };
@@ -1,11 +1,11 @@
1
+ import {
2
+ icon_styles_default
3
+ } from "./chunk.4XR5KYKG.js";
1
4
  import {
2
5
  getIconLibrary,
3
6
  unwatchIcon,
4
7
  watchIcon
5
8
  } from "./chunk.MDRUDBRH.js";
6
- import {
7
- icon_styles_default
8
- } from "./chunk.4XR5KYKG.js";
9
9
  import {
10
10
  e
11
11
  } from "./chunk.6NYH4BZ2.js";
@@ -15,7 +15,7 @@ import {
15
15
  import {
16
16
  TerraElement,
17
17
  component_styles_default
18
- } from "./chunk.OFCNXAUR.js";
18
+ } from "./chunk.VEUDIPUW.js";
19
19
  import {
20
20
  n,
21
21
  r
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  TerraMap
3
- } from "./chunk.V3YTQSMP.js";
3
+ } from "./chunk.UQVPFKN3.js";
4
4
 
5
5
  // src/react/map/index.ts
6
6
  import * as React from "react";
@@ -0,0 +1,11 @@
1
+ import {
2
+ TerraPlot
3
+ } from "./chunk.FGILL5W6.js";
4
+
5
+ // src/components/plot/plot.ts
6
+ var plot_default = TerraPlot;
7
+ TerraPlot.define("terra-plot");
8
+
9
+ export {
10
+ plot_default
11
+ };
@@ -0,0 +1,20 @@
1
+ // src/components/icon/icon.styles.ts
2
+ import { css } from "lit";
3
+ var icon_styles_default = css`
4
+ :host {
5
+ display: inline-block;
6
+ width: 1em;
7
+ height: 1em;
8
+ box-sizing: content-box !important;
9
+ }
10
+
11
+ svg {
12
+ display: block;
13
+ height: 100%;
14
+ width: 100%;
15
+ }
16
+ `;
17
+
18
+ export {
19
+ icon_styles_default
20
+ };