@guardian/interactive-component-library 0.2.0-rc1 → 0.2.0-rc2

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 (335) hide show
  1. package/dist/_virtual/_commonjsHelpers.js +8 -0
  2. package/dist/_virtual/dayjs.min.js +4 -0
  3. package/dist/_virtual/relativeTime.js +4 -0
  4. package/dist/components/index.d.ts +3 -0
  5. package/dist/components/molecules/canvas-map/Map.d.ts +17 -0
  6. package/dist/components/molecules/canvas-map/Map.js +89 -0
  7. package/dist/components/molecules/canvas-map/context/MapContext.d.ts +19 -0
  8. package/dist/components/molecules/canvas-map/context/MapContext.js +20 -0
  9. package/dist/components/molecules/canvas-map/controls/ZoomControl.d.ts +6 -0
  10. package/dist/components/molecules/canvas-map/controls/ZoomControl.js +40 -0
  11. package/dist/components/molecules/canvas-map/controls/icons/index.d.ts +3 -0
  12. package/dist/components/molecules/canvas-map/controls/icons/minus.d.ts +1 -0
  13. package/dist/components/molecules/canvas-map/controls/icons/minus.js +25 -0
  14. package/dist/components/molecules/canvas-map/controls/icons/plus.d.ts +1 -0
  15. package/dist/components/molecules/canvas-map/controls/icons/plus.js +25 -0
  16. package/dist/components/molecules/canvas-map/controls/icons/reset.d.ts +3 -0
  17. package/dist/components/molecules/canvas-map/controls/icons/reset.js +25 -0
  18. package/dist/components/molecules/canvas-map/controls/index.d.ts +1 -0
  19. package/dist/components/molecules/canvas-map/controls/style.module.css.js +11 -0
  20. package/dist/components/molecules/canvas-map/index.d.ts +12 -0
  21. package/dist/components/molecules/canvas-map/lib/Feature.d.ts +38 -0
  22. package/dist/components/molecules/canvas-map/lib/Feature.js +104 -0
  23. package/dist/components/molecules/canvas-map/lib/FeatureCollection.d.ts +20 -0
  24. package/dist/components/molecules/canvas-map/lib/FeatureCollection.js +23 -0
  25. package/dist/components/molecules/canvas-map/lib/Map.d.ts +69 -0
  26. package/dist/components/molecules/canvas-map/lib/Map.js +254 -0
  27. package/dist/components/molecules/canvas-map/lib/View.d.ts +136 -0
  28. package/dist/components/molecules/canvas-map/lib/View.js +179 -0
  29. package/dist/components/molecules/canvas-map/lib/events/Dispatcher.d.ts +8 -0
  30. package/dist/components/molecules/canvas-map/lib/events/Dispatcher.js +35 -0
  31. package/dist/components/molecules/canvas-map/lib/events/MapEvent.d.ts +6 -0
  32. package/dist/components/molecules/canvas-map/lib/events/MapEvent.js +9 -0
  33. package/dist/components/molecules/canvas-map/lib/events/index.d.ts +2 -0
  34. package/dist/components/molecules/canvas-map/lib/formats/GeoJSON.d.ts +10 -0
  35. package/dist/components/molecules/canvas-map/lib/formats/GeoJSON.js +96 -0
  36. package/dist/components/molecules/canvas-map/lib/geometry/Geometry.d.ts +32 -0
  37. package/dist/components/molecules/canvas-map/lib/geometry/Geometry.js +41 -0
  38. package/dist/components/molecules/canvas-map/lib/geometry/LineString.d.ts +12 -0
  39. package/dist/components/molecules/canvas-map/lib/geometry/LineString.js +19 -0
  40. package/dist/components/molecules/canvas-map/lib/geometry/Point.d.ts +11 -0
  41. package/dist/components/molecules/canvas-map/lib/geometry/Point.js +16 -0
  42. package/dist/components/molecules/canvas-map/lib/geometry/Polygon.d.ts +16 -0
  43. package/dist/components/molecules/canvas-map/lib/geometry/Polygon.js +46 -0
  44. package/dist/components/molecules/canvas-map/lib/geometry/index.d.ts +4 -0
  45. package/dist/components/molecules/canvas-map/lib/interpolators/index.d.ts +2 -0
  46. package/dist/components/molecules/canvas-map/lib/interpolators/interpolateFeatures.d.ts +5 -0
  47. package/dist/components/molecules/canvas-map/lib/interpolators/interpolateFeatures.js +95 -0
  48. package/dist/components/molecules/canvas-map/lib/interpolators/interpolateStyles.d.ts +4 -0
  49. package/dist/components/molecules/canvas-map/lib/interpolators/interpolateStyles.js +65 -0
  50. package/dist/components/molecules/canvas-map/lib/layers/TextLayer.d.ts +52 -0
  51. package/dist/components/molecules/canvas-map/lib/layers/TextLayer.js +111 -0
  52. package/dist/components/molecules/canvas-map/lib/layers/VectorLayer.d.ts +53 -0
  53. package/dist/components/molecules/canvas-map/lib/layers/VectorLayer.js +132 -0
  54. package/dist/components/molecules/canvas-map/lib/layers/index.d.ts +3 -0
  55. package/dist/components/molecules/canvas-map/lib/projection/index.d.ts +22 -0
  56. package/dist/components/molecules/canvas-map/lib/projection/index.js +12 -0
  57. package/dist/components/molecules/canvas-map/lib/renderers/FeatureRenderer.d.ts +6 -0
  58. package/dist/components/molecules/canvas-map/lib/renderers/FeatureRenderer.js +46 -0
  59. package/dist/components/molecules/canvas-map/lib/renderers/MapRenderer.d.ts +6 -0
  60. package/dist/components/molecules/canvas-map/lib/renderers/MapRenderer.js +53 -0
  61. package/dist/components/molecules/canvas-map/lib/renderers/TextLayerRenderer.d.ts +17 -0
  62. package/dist/components/molecules/canvas-map/lib/renderers/TextLayerRenderer.js +119 -0
  63. package/dist/components/molecules/canvas-map/lib/renderers/VectorLayerRenderer.d.ts +10 -0
  64. package/dist/components/molecules/canvas-map/lib/renderers/VectorLayerRenderer.js +78 -0
  65. package/dist/components/molecules/canvas-map/lib/sources/VectorSource.d.ts +15 -0
  66. package/dist/components/molecules/canvas-map/lib/sources/VectorSource.js +56 -0
  67. package/dist/components/molecules/canvas-map/lib/styles/Fill.d.ts +7 -0
  68. package/dist/components/molecules/canvas-map/lib/styles/Fill.js +15 -0
  69. package/dist/components/molecules/canvas-map/lib/styles/Stroke.d.ts +8 -0
  70. package/dist/components/molecules/canvas-map/lib/styles/Stroke.js +16 -0
  71. package/dist/components/molecules/canvas-map/lib/styles/Style.d.ts +24 -0
  72. package/dist/components/molecules/canvas-map/lib/styles/Style.js +17 -0
  73. package/dist/components/molecules/canvas-map/lib/styles/Text.d.ts +10 -0
  74. package/dist/components/molecules/canvas-map/lib/styles/Text.js +14 -0
  75. package/dist/components/molecules/canvas-map/lib/styles/index.d.ts +4 -0
  76. package/dist/components/molecules/canvas-map/lib/util/array.d.ts +6 -0
  77. package/dist/components/molecules/canvas-map/lib/util/array.js +15 -0
  78. package/dist/components/molecules/canvas-map/lib/util/bboxFeature.d.ts +8 -0
  79. package/dist/components/molecules/canvas-map/lib/util/bboxFeature.js +26 -0
  80. package/dist/components/molecules/canvas-map/lib/util/debug.d.ts +11 -0
  81. package/dist/components/molecules/canvas-map/lib/util/debug.js +27 -0
  82. package/dist/components/molecules/canvas-map/lib/util/deflate.d.ts +36 -0
  83. package/dist/components/molecules/canvas-map/lib/util/distance.d.ts +1 -0
  84. package/dist/components/molecules/canvas-map/lib/util/distance.js +12 -0
  85. package/dist/components/molecules/canvas-map/lib/util/dom.d.ts +9 -0
  86. package/dist/components/molecules/canvas-map/lib/util/dom.js +28 -0
  87. package/dist/components/molecules/canvas-map/lib/util/extent.d.ts +21 -0
  88. package/dist/components/molecules/canvas-map/lib/util/extent.js +38 -0
  89. package/dist/components/molecules/canvas-map/lib/util/memoise.d.ts +10 -0
  90. package/dist/components/molecules/canvas-map/lib/util/memoise.js +20 -0
  91. package/dist/components/molecules/canvas-map/lib/util/resolution.d.ts +9 -0
  92. package/dist/components/molecules/canvas-map/lib/util/resolution.js +11 -0
  93. package/dist/components/molecules/canvas-map/lib/util/simplify.d.ts +114 -0
  94. package/dist/components/molecules/canvas-map/lib/util/size.d.ts +32 -0
  95. package/dist/components/molecules/canvas-map/lib/util/size.js +53 -0
  96. package/dist/components/molecules/canvas-map/lib/util/toRgba.d.ts +1 -0
  97. package/dist/components/molecules/canvas-map/lib/util/toRgba.js +25 -0
  98. package/dist/components/molecules/canvas-map/lib/util/uid.d.ts +5 -0
  99. package/dist/components/molecules/canvas-map/lib/util/uid.js +7 -0
  100. package/dist/components/molecules/canvas-map/lib/util/zoomLevel.d.ts +2 -0
  101. package/dist/components/molecules/canvas-map/lib/util/zoomLevel.js +14 -0
  102. package/dist/components/molecules/canvas-map/style.module.scss.js +20 -0
  103. package/dist/components/molecules/column-chart/column-chart-example.d.ts +35 -0
  104. package/dist/components/molecules/column-chart/column-chart-util.d.ts +1 -0
  105. package/dist/components/molecules/column-chart/index.d.ts +11 -0
  106. package/dist/components/molecules/column-chart/index.js +63 -0
  107. package/dist/components/molecules/column-chart/style.module.css.js +14 -0
  108. package/dist/components/molecules/control-change/index.d.ts +6 -0
  109. package/dist/components/molecules/control-change/index.js +29 -0
  110. package/dist/components/molecules/control-change/style.module.css.js +11 -0
  111. package/dist/components/molecules/dropdown/index.d.ts +11 -0
  112. package/dist/components/molecules/dropdown/index.js +191 -0
  113. package/dist/components/molecules/dropdown/style.module.css.js +50 -0
  114. package/dist/components/molecules/first-past-the-post-waffle/index.d.ts +5 -0
  115. package/dist/components/molecules/first-past-the-post-waffle/index.js +14 -0
  116. package/dist/components/molecules/first-past-the-post-waffle/style.module.css.js +14 -0
  117. package/dist/components/molecules/index.d.ts +17 -0
  118. package/dist/components/molecules/modal/index.d.ts +8 -0
  119. package/dist/components/molecules/modal/index.js +59 -0
  120. package/dist/components/molecules/modal/style.module.css.js +26 -0
  121. package/dist/components/molecules/page-section/index.d.ts +8 -0
  122. package/dist/components/molecules/page-section/index.js +52 -0
  123. package/dist/components/molecules/page-section/style.module.scss.js +20 -0
  124. package/dist/components/molecules/party-profile/index.d.ts +10 -0
  125. package/dist/components/molecules/party-profile/index.js +29 -0
  126. package/dist/components/molecules/party-profile/style.module.css.js +26 -0
  127. package/dist/components/molecules/refresh-indicator/index.d.ts +4 -0
  128. package/dist/components/molecules/refresh-indicator/index.js +18 -0
  129. package/dist/components/molecules/refresh-indicator/style.module.scss.js +17 -0
  130. package/dist/components/molecules/responsive-grid/index.d.ts +10 -0
  131. package/dist/components/molecules/responsive-grid/index.js +19 -0
  132. package/dist/components/molecules/responsive-grid/style.module.scss.js +8 -0
  133. package/dist/components/molecules/result-summary/index.d.ts +8 -0
  134. package/dist/components/molecules/result-summary/index.js +36 -0
  135. package/dist/components/molecules/result-summary/style.module.css.js +11 -0
  136. package/dist/components/molecules/search-input/icons/search.d.ts +1 -0
  137. package/dist/components/molecules/search-input/icons/search.js +24 -0
  138. package/dist/components/molecules/search-input/icons/search.module.css.js +11 -0
  139. package/dist/components/molecules/search-input/index.d.ts +11 -0
  140. package/dist/components/molecules/search-input/index.js +164 -0
  141. package/dist/components/molecules/search-input/style.module.css.js +32 -0
  142. package/dist/components/molecules/slope-chart/index.d.ts +16 -0
  143. package/dist/components/molecules/slope-chart/index.js +139 -0
  144. package/dist/components/molecules/slope-chart/style.module.css.js +35 -0
  145. package/dist/components/molecules/svg-map/context/MapContext.d.ts +1 -0
  146. package/dist/components/molecules/svg-map/context/MapContext.js +5 -0
  147. package/dist/components/molecules/svg-map/context/SVGMapProvider.d.ts +10 -0
  148. package/dist/components/molecules/svg-map/context/SVGMapProvider.js +88 -0
  149. package/dist/components/molecules/svg-map/helpers/bboxFeature.d.ts +8 -0
  150. package/dist/components/molecules/svg-map/helpers/bboxFeature.js +26 -0
  151. package/dist/components/molecules/svg-map/helpers/dynamicPropValue.d.ts +1 -0
  152. package/dist/components/molecules/svg-map/helpers/dynamicPropValue.js +9 -0
  153. package/dist/components/molecules/svg-map/helpers/geoMath.d.ts +4 -0
  154. package/dist/components/molecules/svg-map/helpers/saveSVG.d.ts +1 -0
  155. package/dist/components/molecules/svg-map/hooks/useCamera.d.ts +0 -0
  156. package/dist/components/molecules/svg-map/hooks/useThrowIfNonLayerChildren.d.ts +4 -0
  157. package/dist/components/molecules/svg-map/hooks/useThrowIfNonLayerChildren.js +19 -0
  158. package/dist/components/molecules/svg-map/index.d.ts +38 -0
  159. package/dist/components/molecules/svg-map/index.js +120 -0
  160. package/dist/components/molecules/svg-map/layers/CompositionBorders.d.ts +3 -0
  161. package/dist/components/molecules/svg-map/layers/CompositionBorders.js +14 -0
  162. package/dist/components/molecules/svg-map/layers/Line.d.ts +7 -0
  163. package/dist/components/molecules/svg-map/layers/Line.js +48 -0
  164. package/dist/components/molecules/svg-map/layers/Point.d.ts +10 -0
  165. package/dist/components/molecules/svg-map/layers/Point.js +59 -0
  166. package/dist/components/molecules/svg-map/layers/Polygon.d.ts +9 -0
  167. package/dist/components/molecules/svg-map/layers/Polygon.js +75 -0
  168. package/dist/components/molecules/svg-map/layers/Prerendered.d.ts +3 -0
  169. package/dist/components/molecules/svg-map/layers/Prerendered.js +11 -0
  170. package/dist/components/molecules/svg-map/layers/compositionBorders.module.scss.js +8 -0
  171. package/dist/components/molecules/svg-map/layers/index.d.ts +5 -0
  172. package/dist/components/molecules/svg-map/layers/index.js +12 -0
  173. package/dist/components/molecules/svg-map/renderers/SVGRenderer.d.ts +3 -0
  174. package/dist/components/molecules/svg-map/renderers/SVGRenderer.js +32 -0
  175. package/dist/components/molecules/svg-map/style.module.css.js +11 -0
  176. package/dist/components/molecules/table/index.d.ts +7 -0
  177. package/dist/components/molecules/table/index.js +90 -0
  178. package/dist/components/molecules/table/style.module.scss.js +29 -0
  179. package/dist/components/molecules/table/useTable.d.ts +8 -0
  180. package/dist/components/molecules/table/useTable.js +128 -0
  181. package/dist/components/molecules/tooltip/index.d.ts +82 -0
  182. package/dist/components/molecules/tooltip/index.js +117 -0
  183. package/dist/components/molecules/tooltip/style.module.css.js +8 -0
  184. package/dist/components/molecules/topline-result/index.d.ts +3 -0
  185. package/dist/components/molecules/topline-result/index.js +61 -0
  186. package/dist/components/molecules/topline-result/style.module.scss.js +38 -0
  187. package/dist/components/organisms/coalitions-tracker/index.d.ts +16 -0
  188. package/dist/components/organisms/coalitions-tracker/index.js +151 -0
  189. package/dist/components/organisms/coalitions-tracker/style.module.scss.js +32 -0
  190. package/dist/components/organisms/index.d.ts +2 -0
  191. package/dist/components/organisms/ticker/gradient/index.d.ts +1 -0
  192. package/dist/components/organisms/ticker/gradient/index.js +35 -0
  193. package/dist/components/organisms/ticker/gradient/style.module.scss.js +14 -0
  194. package/dist/components/organisms/ticker/index.d.ts +5 -0
  195. package/dist/components/organisms/ticker/index.js +102 -0
  196. package/dist/components/organisms/ticker/style.module.scss.js +32 -0
  197. package/dist/components/particles/ad-slot/index.d.ts +40 -0
  198. package/dist/components/particles/ad-slot/index.js +34 -0
  199. package/dist/components/particles/ad-slot/style.module.css.js +11 -0
  200. package/dist/components/particles/arrow-button/index.d.ts +6 -0
  201. package/dist/components/particles/arrow-button/index.js +32 -0
  202. package/dist/components/particles/arrow-button/style.module.css.js +11 -0
  203. package/dist/components/particles/aspect-ratio-box/index.d.ts +4 -0
  204. package/dist/components/particles/aspect-ratio-box/index.js +15 -0
  205. package/dist/components/particles/aspect-ratio-box/style.module.css.js +6 -0
  206. package/dist/components/particles/button/index.d.ts +6 -0
  207. package/dist/components/particles/button/index.js +10 -0
  208. package/dist/components/particles/button/style.module.css.js +11 -0
  209. package/dist/components/particles/change-bar/index.d.ts +8 -0
  210. package/dist/components/particles/change-bar/index.js +27 -0
  211. package/dist/components/particles/change-bar/style.module.scss.js +14 -0
  212. package/dist/components/particles/chevron/index.d.ts +6 -0
  213. package/dist/components/particles/chevron/index.js +78 -0
  214. package/dist/components/particles/chevron/style.module.css.js +20 -0
  215. package/dist/components/particles/circle-icon/index.d.ts +6 -0
  216. package/dist/components/particles/circle-icon/index.js +32 -0
  217. package/dist/components/particles/circle-icon/style.module.css.js +14 -0
  218. package/dist/components/particles/close-button/index.d.ts +5 -0
  219. package/dist/components/particles/close-button/index.js +35 -0
  220. package/dist/components/particles/close-button/style.module.css.js +17 -0
  221. package/dist/components/particles/container/index.d.ts +5 -0
  222. package/dist/components/particles/container/index.js +13 -0
  223. package/dist/components/particles/container/style.module.scss.js +11 -0
  224. package/dist/components/particles/gradient-icon/index.d.ts +1 -0
  225. package/dist/components/particles/gradient-icon/index.js +46 -0
  226. package/dist/components/particles/gradient-icon/style.module.css.js +14 -0
  227. package/dist/components/particles/index.d.ts +18 -0
  228. package/dist/components/particles/info-button/index.d.ts +3 -0
  229. package/dist/components/particles/info-button/index.js +19 -0
  230. package/dist/components/particles/info-button/style.module.css.js +11 -0
  231. package/dist/components/particles/legend-item/index.d.ts +6 -0
  232. package/dist/components/particles/legend-item/index.js +26 -0
  233. package/dist/components/particles/legend-item/style.module.css.js +17 -0
  234. package/dist/components/particles/relative-time-sentence/index.d.ts +4 -0
  235. package/dist/components/particles/relative-time-sentence/index.js +14 -0
  236. package/dist/components/particles/relative-time-sentence/style.module.css.js +8 -0
  237. package/dist/components/particles/square-cut-corner-icon/index.d.ts +6 -0
  238. package/dist/components/particles/square-cut-corner-icon/index.js +56 -0
  239. package/dist/components/particles/square-cut-corner-icon/style.module.scss.js +17 -0
  240. package/dist/components/particles/square-icon/index.d.ts +5 -0
  241. package/dist/components/particles/square-icon/index.js +28 -0
  242. package/dist/components/particles/square-icon/style.module.scss.js +11 -0
  243. package/dist/components/particles/stacked-bar/index.d.ts +23 -0
  244. package/dist/components/particles/stacked-bar/index.js +140 -0
  245. package/dist/components/particles/stacked-bar/style.module.css.js +17 -0
  246. package/dist/components/particles/stacked-grid/index.d.ts +6 -0
  247. package/dist/components/particles/stacked-grid/index.js +35 -0
  248. package/dist/components/particles/stacked-grid/style.module.css.js +20 -0
  249. package/dist/components/particles/waffle/index.d.ts +14 -0
  250. package/dist/components/particles/waffle/index.js +76 -0
  251. package/dist/components/particles/waffle/style.module.css.js +11 -0
  252. package/dist/index.d.ts +2 -0
  253. package/dist/index.js +128 -0
  254. package/dist/node_modules/.pnpm/d3-color@3.1.0/node_modules/d3-color/src/color.js +338 -0
  255. package/dist/node_modules/.pnpm/d3-color@3.1.0/node_modules/d3-color/src/define.js +13 -0
  256. package/dist/node_modules/.pnpm/d3-composite-projections@1.4.0/node_modules/d3-composite-projections/src/albersUk.js +108 -0
  257. package/dist/node_modules/.pnpm/d3-composite-projections@1.4.0/node_modules/d3-composite-projections/src/bounds.js +24 -0
  258. package/dist/node_modules/.pnpm/d3-composite-projections@1.4.0/node_modules/d3-composite-projections/src/fit.js +18 -0
  259. package/dist/node_modules/.pnpm/d3-composite-projections@1.4.0/node_modules/d3-composite-projections/src/math.js +4 -0
  260. package/dist/node_modules/.pnpm/d3-dispatch@3.0.1/node_modules/d3-dispatch/src/dispatch.js +70 -0
  261. package/dist/node_modules/.pnpm/d3-ease@3.0.1/node_modules/d3-ease/src/cubic.js +6 -0
  262. package/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/color.js +24 -0
  263. package/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/constant.js +4 -0
  264. package/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/number.js +8 -0
  265. package/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/rgb.js +20 -0
  266. package/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/string.js +43 -0
  267. package/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/decompose.js +28 -0
  268. package/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/index.js +59 -0
  269. package/dist/node_modules/.pnpm/d3-interpolate@3.0.1/node_modules/d3-interpolate/src/transform/parse.js +18 -0
  270. package/dist/node_modules/.pnpm/d3-path@2.0.0/node_modules/d3-path/src/path.js +73 -0
  271. package/dist/node_modules/.pnpm/d3-timer@3.0.1/node_modules/d3-timer/src/timeout.js +13 -0
  272. package/dist/node_modules/.pnpm/d3-timer@3.0.1/node_modules/d3-timer/src/timer.js +96 -0
  273. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/interrupt.js +21 -0
  274. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/index.js +5 -0
  275. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/interrupt.js +9 -0
  276. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/selection/transition.js +39 -0
  277. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/attr.js +55 -0
  278. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/attrTween.js +42 -0
  279. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/delay.js +18 -0
  280. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/duration.js +18 -0
  281. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/ease.js +14 -0
  282. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/easeVarying.js +15 -0
  283. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/end.js +23 -0
  284. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/filter.js +16 -0
  285. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/index.js +68 -0
  286. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/interpolate.js +11 -0
  287. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/merge.js +18 -0
  288. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/on.js +23 -0
  289. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/remove.js +13 -0
  290. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/schedule.js +125 -0
  291. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/select.js +20 -0
  292. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/selectAll.js +24 -0
  293. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/selection.js +8 -0
  294. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/style.js +47 -0
  295. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/styleTween.js +25 -0
  296. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/text.js +18 -0
  297. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/textTween.js +25 -0
  298. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/transition.js +22 -0
  299. package/dist/node_modules/.pnpm/d3-transition@3.0.1_d3-selection@3.0.0/node_modules/d3-transition/src/transition/tween.js +64 -0
  300. package/dist/node_modules/.pnpm/dayjs@1.11.12/node_modules/dayjs/dayjs.min.js +282 -0
  301. package/dist/node_modules/.pnpm/dayjs@1.11.12/node_modules/dayjs/plugin/relativeTime.js +48 -0
  302. package/dist/node_modules/.pnpm/flatbush@4.4.0/node_modules/flatbush/index.js +339 -0
  303. package/dist/node_modules/.pnpm/flatqueue@2.0.3/node_modules/flatqueue/index.js +67 -0
  304. package/dist/node_modules/.pnpm/preact-merge-refs@1.0.2_preact@10.21.0/node_modules/preact-merge-refs/lib/preact-merge-refs.modern.js +10 -0
  305. package/dist/node_modules/.pnpm/preact-transitioning@1.4.1_preact@10.21.0/node_modules/preact-transitioning/lib/preact-transitioning.modern.js +63 -0
  306. package/dist/node_modules/.pnpm/quickselect@2.0.0/node_modules/quickselect/index.js +47 -0
  307. package/dist/node_modules/.pnpm/rbush-knn@4.0.0/node_modules/rbush-knn/index.js +42 -0
  308. package/dist/node_modules/.pnpm/rbush@4.0.0/node_modules/rbush/index.js +378 -0
  309. package/dist/node_modules/.pnpm/tinyqueue@2.0.3/node_modules/tinyqueue/index.js +65 -0
  310. package/dist/shared/colors/index.d.ts +2 -0
  311. package/dist/shared/helpers/createStore.d.ts +1 -0
  312. package/dist/shared/helpers/geometry.d.ts +3 -0
  313. package/dist/shared/helpers/geometry.js +16 -0
  314. package/dist/shared/helpers/geometry.test.d.ts +1 -0
  315. package/dist/shared/helpers/labelsUtil.d.ts +54 -0
  316. package/dist/shared/helpers/labelsUtil.js +58 -0
  317. package/dist/shared/helpers/labelsUtils.test.d.ts +1 -0
  318. package/dist/shared/helpers/shouldUpdate.d.ts +7 -0
  319. package/dist/shared/hooks/index.d.ts +3 -0
  320. package/dist/shared/hooks/useContainerSize.d.ts +1 -0
  321. package/dist/shared/hooks/useContainerSize.js +24 -0
  322. package/dist/shared/hooks/useTouchOrHover.d.ts +6 -0
  323. package/dist/shared/hooks/useTouchOrHover.js +95 -0
  324. package/dist/shared/hooks/useWindowSize.d.ts +4 -0
  325. package/dist/shared/hooks/useWindowSize.js +27 -0
  326. package/dist/style.css +74 -74
  327. package/dist/styles/helpers/mergeStyles.d.ts +1 -0
  328. package/dist/styles/helpers/mergeStyles.js +22 -0
  329. package/dist/styles/helpers/mergeStyles.test.d.ts +1 -0
  330. package/dist/styles/theme.config.d.ts +124 -0
  331. package/package.json +6 -9
  332. package/dist/interactive-component-library.js +0 -7993
  333. package/dist/interactive-component-library.js.map +0 -1
  334. package/dist/interactive-component-library.umd.cjs +0 -7989
  335. package/dist/interactive-component-library.umd.cjs.map +0 -1
@@ -0,0 +1,16 @@
1
+ function rectsIntersect(rect1, rect2) {
2
+ if (rect1.width === 0 || rect1.height === 0 || rect2.width === 0 || rect2.height === 0) {
3
+ return false;
4
+ }
5
+ if (rect1.x + rect1.width <= rect2.x || rect2.x + rect2.width <= rect1.x || rect1.y + rect1.height <= rect2.y || rect2.y + rect2.height <= rect1.y) {
6
+ return false;
7
+ }
8
+ return true;
9
+ }
10
+ function pointInsideRect(point, rect) {
11
+ return point.x >= rect.x && point.x <= rect.x + rect.width && point.y >= rect.y && point.y <= rect.y + rect.height;
12
+ }
13
+ export {
14
+ pointInsideRect,
15
+ rectsIntersect
16
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,54 @@
1
+ /**
2
+ * @template {Record<string, unknown>} T
3
+ * @param {T[]} labelPositions
4
+ * @param {number} iteration
5
+ * @param {number} labelSize
6
+ * @param {string} coordinate
7
+ * @param {boolean} moveBothLabels
8
+ * @returns
9
+ */
10
+ export function preventOverlap<T extends Record<string, unknown>>(labelPositions: T[], iteration?: number, labelSize?: number, coordinate?: string, moveBothLabels?: boolean): T[];
11
+ /**
12
+ * Unique objects for a given key’s value;
13
+ *
14
+ * @example
15
+ * ```
16
+ * const labels = [
17
+ * {key: 'alpha', value: 1 },
18
+ * {key: 'alpha', value: 9 },
19
+ * {key: 'delta', value: 4 },
20
+ *];
21
+ * console.log(uniqueBy(labels, 'key'));
22
+ * // [
23
+ * // {key: 'alpha', value: 1 },
24
+ * // {key: 'delta', value: 4 },
25
+ * // ]
26
+ * ```
27
+ *
28
+ * @template T extends Record<string, unknown>
29
+ * @param {T[]} array
30
+ * @param {keyof T} key
31
+ * @returns {T[]}
32
+ */
33
+ export function uniqueBy<T>(array: T[], key: keyof T): T[];
34
+ /**
35
+ * @template {{ value: string }} T
36
+ * @param {T[]} labels
37
+ * @param {number} labelSize
38
+ * @param {string} coordinate
39
+ * @param {boolean} moveBothLabels
40
+ * @returns {T[]}
41
+ */
42
+ export function positionLabels<T extends {
43
+ value: string;
44
+ }>(labels: T[], labelSize?: number, coordinate?: string, moveBothLabels?: boolean): T[];
45
+ /**
46
+ * Create a function that maps a value from a source domain to a target range.
47
+ *
48
+ * same as this one https://gist.github.com/vectorsize/7031902
49
+ *
50
+ * @param {[number, number]} domain
51
+ * @param {[number, number]} range
52
+ * @returns {(x: number) => number}
53
+ */
54
+ export function scaleLinear(domain: [number, number], range: [number, number]): (x: number) => number;
@@ -0,0 +1,58 @@
1
+ function preventOverlap(labelPositions, iteration = 0, labelSize = 12, coordinate = "y", moveBothLabels = true) {
2
+ const maxIterations = 10;
3
+ let totalOverlap = 0;
4
+ if (!isArrayWithCoordinates(labelPositions, coordinate)) return labelPositions;
5
+ for (let index = 1; index < labelPositions.length; index++) {
6
+ const previousElement = labelPositions[index - 1];
7
+ const element = labelPositions[index];
8
+ const overlap = previousElement[coordinate] - (element[coordinate] - labelSize);
9
+ if (overlap < 0) {
10
+ continue;
11
+ }
12
+ if (moveBothLabels) {
13
+ previousElement[coordinate] -= overlap / 2;
14
+ element[coordinate] += overlap / 2;
15
+ } else {
16
+ previousElement[coordinate] -= overlap;
17
+ }
18
+ totalOverlap += overlap;
19
+ }
20
+ if (totalOverlap > 0 && iteration < maxIterations) {
21
+ return preventOverlap(
22
+ labelPositions,
23
+ iteration + 1,
24
+ labelSize,
25
+ coordinate,
26
+ moveBothLabels
27
+ );
28
+ }
29
+ return labelPositions;
30
+ }
31
+ function uniqueBy(array, key) {
32
+ return [...array.reduce((map, d) => map.set(d[key], d), /* @__PURE__ */ new Map()).values()];
33
+ }
34
+ function positionLabels(labels, labelSize = 12, coordinate = "y", moveBothLabels = true) {
35
+ labels = uniqueBy(labels, "value");
36
+ labels.sort((a, b) => a[coordinate] - b[coordinate]);
37
+ return preventOverlap(labels, 0, labelSize, coordinate, moveBothLabels);
38
+ }
39
+ function scaleLinear(domain, range) {
40
+ const [domainMin, domainMax] = domain;
41
+ const [rangeMin, rangeMax] = range;
42
+ const slope = (rangeMax - rangeMin) / (domainMax - domainMin);
43
+ const intercept = rangeMin - slope * domainMin;
44
+ return function(x) {
45
+ return slope * x + intercept;
46
+ };
47
+ }
48
+ function isArrayWithCoordinates(labelPositions, coordinate) {
49
+ return labelPositions.every(
50
+ (position) => typeof position[coordinate] === "number"
51
+ );
52
+ }
53
+ export {
54
+ positionLabels,
55
+ preventOverlap,
56
+ scaleLinear,
57
+ uniqueBy
58
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @template T
3
+ * @param {T} oldState
4
+ * @param {T} newState
5
+ * @returns {boolean}
6
+ */
7
+ export default function shouldUpdate<T>(oldState: T, newState: T): boolean;
@@ -0,0 +1,3 @@
1
+ export * from './useContainerSize';
2
+ export * from './useTouchOrHover';
3
+ export * from './useWindowSize';
@@ -0,0 +1 @@
1
+ export function useContainerSize(containerRef: any): undefined;
@@ -0,0 +1,24 @@
1
+ import { useState, useLayoutEffect } from "preact/hooks";
2
+ function useContainerSize(containerRef) {
3
+ const [containerSize, setContainerSize] = useState();
4
+ useLayoutEffect(() => {
5
+ const container = containerRef.current;
6
+ if (!container) return;
7
+ const observer = new ResizeObserver((entries) => {
8
+ for (let entry of entries) {
9
+ setContainerSize({
10
+ width: entry.contentRect.width,
11
+ height: entry.contentRect.height
12
+ });
13
+ }
14
+ });
15
+ observer.observe(container);
16
+ return () => {
17
+ observer.disconnect();
18
+ };
19
+ }, [containerRef]);
20
+ return containerSize;
21
+ }
22
+ export {
23
+ useContainerSize
24
+ };
@@ -0,0 +1,6 @@
1
+ export function useTouchOrHover(): {
2
+ touchOrHoverRef: import('preact/hooks').MutableRef<undefined>;
3
+ touchOrHoverIsActive: boolean;
4
+ touchRect: undefined;
5
+ positionInTarget: undefined;
6
+ };
@@ -0,0 +1,95 @@
1
+ import { useRef, useState, useEffect } from "preact/hooks";
2
+ import { pointInsideRect } from "../helpers/geometry.js";
3
+ function useTouchOrHover() {
4
+ const ref = useRef();
5
+ const [position, setPosition] = useState();
6
+ const [isActive, setIsActive] = useState(false);
7
+ const [touchRect, setTouchRect] = useState();
8
+ useEffect(() => {
9
+ const element = ref.current;
10
+ let touchCancelled = false;
11
+ const touchStarted = (event) => {
12
+ if (event.touches.length > 1) return;
13
+ touchCancelled = false;
14
+ const touch = event.touches[0];
15
+ const { clientX, clientY } = touch;
16
+ const rect = element.getBoundingClientRect();
17
+ const point = { x: clientX - rect.left, y: clientY - rect.top };
18
+ setPosition(point);
19
+ const touchRect2 = {
20
+ x: clientX - touch.radiusX,
21
+ y: clientY - touch.radiusY,
22
+ width: touch.radiusX * 2,
23
+ height: touch.radiusY * 2
24
+ };
25
+ setTouchRect(touchRect2);
26
+ setIsActive(true);
27
+ event.stopPropagation();
28
+ };
29
+ const touchMoved = (event) => {
30
+ if (touchCancelled || event.targetTouches.length !== 1) return;
31
+ const touch = event.targetTouches[0];
32
+ const { clientX, clientY } = touch;
33
+ const rect = element.getBoundingClientRect();
34
+ const point = { x: clientX - rect.left, y: clientY - rect.top };
35
+ if (!event.cancelable || !pointInsideRect(point, rect)) {
36
+ setIsActive(false);
37
+ touchCancelled = true;
38
+ } else {
39
+ setPosition(point);
40
+ setIsActive(true);
41
+ }
42
+ };
43
+ const touchEnded = (event) => {
44
+ if (event.cancelable) {
45
+ event.preventDefault();
46
+ }
47
+ setIsActive(false);
48
+ setPosition(null);
49
+ };
50
+ const mouseOver = (event) => {
51
+ const { clientX, clientY } = event;
52
+ const rect = element.getBoundingClientRect();
53
+ const x = clientX - rect.left;
54
+ const y = clientY - rect.top;
55
+ setPosition({ x, y });
56
+ setIsActive(true);
57
+ };
58
+ const mouseMoved = (event) => {
59
+ const { clientX, clientY } = event;
60
+ const rect = element.getBoundingClientRect();
61
+ const x = clientX - rect.left;
62
+ const y = clientY - rect.top;
63
+ setPosition({ x, y });
64
+ };
65
+ const mouseOut = () => {
66
+ setIsActive(false);
67
+ setPosition(null);
68
+ };
69
+ element.addEventListener("touchstart", touchStarted);
70
+ element.addEventListener("touchmove", touchMoved);
71
+ element.addEventListener("touchend", touchEnded);
72
+ element.addEventListener("touchcancel", touchEnded);
73
+ element.addEventListener("mouseover", mouseOver);
74
+ element.addEventListener("mousemove", mouseMoved);
75
+ element.addEventListener("mouseout", mouseOut);
76
+ return () => {
77
+ element.removeEventListener("touchstart", touchStarted);
78
+ element.removeEventListener("touchmove", touchMoved);
79
+ element.removeEventListener("touchend", mouseOut);
80
+ element.removeEventListener("touchcancel", mouseOut);
81
+ element.removeEventListener("mouseover", touchStarted);
82
+ element.removeEventListener("mousemove", mouseMoved);
83
+ element.removeEventListener("mouseout", mouseOut);
84
+ };
85
+ }, []);
86
+ return {
87
+ touchOrHoverRef: ref,
88
+ touchOrHoverIsActive: isActive,
89
+ touchRect,
90
+ positionInTarget: position
91
+ };
92
+ }
93
+ export {
94
+ useTouchOrHover
95
+ };
@@ -0,0 +1,4 @@
1
+ export function useWindowSize(): {
2
+ width: number;
3
+ height: number;
4
+ };
@@ -0,0 +1,27 @@
1
+ import { useState, useLayoutEffect } from "preact/hooks";
2
+ function useWindowSize() {
3
+ const [windowSize, setWindowSize] = useState(() => {
4
+ if (typeof window === "undefined") return { width: 0, height: 0 };
5
+ return {
6
+ width: window.innerWidth,
7
+ height: window.innerHeight
8
+ };
9
+ });
10
+ useLayoutEffect(() => {
11
+ if (typeof window === "undefined") return;
12
+ function handleResize() {
13
+ setWindowSize({
14
+ width: window.innerWidth,
15
+ height: window.innerHeight
16
+ });
17
+ }
18
+ window.addEventListener("resize", handleResize);
19
+ return () => {
20
+ window.removeEventListener("resize", handleResize);
21
+ };
22
+ }, []);
23
+ return windowSize;
24
+ }
25
+ export {
26
+ useWindowSize
27
+ };
package/dist/style.css CHANGED
@@ -2372,7 +2372,79 @@ body ._header_1xpz0_150._fullWidth_1xpz0_39 {
2372
2372
  line-height: var(--sans-line-height);
2373
2373
  color: var(--primary-text-color);
2374
2374
  }
2375
- ._svg_1dms8_1 {
2375
+ body {
2376
+ --top-inset: 0;
2377
+ }
2378
+
2379
+ body.android {
2380
+ --top-inset: 58px;
2381
+ }
2382
+
2383
+ ._path_1cwd5_9 {
2384
+ stroke: var(--secondary-line-color);
2385
+ fill: none;
2386
+ }._container_9pdyv_1 {
2387
+ width: 100%;
2388
+ height: 100%;
2389
+ position: relative;
2390
+ }
2391
+
2392
+ ._svg_9pdyv_7 {
2393
+ fill: none;
2394
+ stroke: #121212;
2395
+ stroke-width: 1;
2396
+ }
2397
+ body {
2398
+ --top-inset: 0;
2399
+ }
2400
+
2401
+ body.android {
2402
+ --top-inset: 58px;
2403
+ }
2404
+
2405
+ ._mapContainer_1ogf3_9 {
2406
+ position: relative;
2407
+ width: 100%;
2408
+ height: 100%;
2409
+ }
2410
+
2411
+ ._helpTextContainer_1ogf3_15 {
2412
+ position: absolute;
2413
+ width: 100%;
2414
+ height: 100%;
2415
+ top: 0;
2416
+ left: 0;
2417
+ z-index: 1;
2418
+ pointer-events: none;
2419
+ background-color: rgba(18, 18, 18, 0.4);
2420
+ display: flex;
2421
+ justify-content: center;
2422
+ align-items: center;
2423
+ transition: opacity 0.2s linear;
2424
+ }
2425
+
2426
+ ._helpText_1ogf3_15 {
2427
+ margin-top: var(--space-5);
2428
+ font-family: var(--text-sans);
2429
+ font-weight: 700;
2430
+ font-size: var(--sans-large);
2431
+ line-height: var(--sans-line-height);
2432
+ color: #fff !important;
2433
+ margin-bottom: var(--space-3);
2434
+ }
2435
+
2436
+ ._desktopHelpText_1ogf3_40 {
2437
+ display: none;
2438
+ }
2439
+
2440
+ @media (any-hover: hover) {
2441
+ ._desktopHelpText_1ogf3_40 {
2442
+ display: block;
2443
+ }
2444
+ ._mobileHelpText_1ogf3_48 {
2445
+ display: none;
2446
+ }
2447
+ }._svg_1dms8_1 {
2376
2448
  width: 100%;
2377
2449
  height: 100%;
2378
2450
  fill: var(--primary-text-color);
@@ -2817,79 +2889,7 @@ body.android {
2817
2889
  ._checkmarkPath_6u92g_120 {
2818
2890
  fill: var(--primary-text-color);
2819
2891
  }
2820
- body {
2821
- --top-inset: 0;
2822
- }
2823
-
2824
- body.android {
2825
- --top-inset: 58px;
2826
- }
2827
-
2828
- ._path_1cwd5_9 {
2829
- stroke: var(--secondary-line-color);
2830
- fill: none;
2831
- }._container_9pdyv_1 {
2832
- width: 100%;
2833
- height: 100%;
2834
- position: relative;
2835
- }
2836
-
2837
- ._svg_9pdyv_7 {
2838
- fill: none;
2839
- stroke: #121212;
2840
- stroke-width: 1;
2841
- }
2842
- body {
2843
- --top-inset: 0;
2844
- }
2845
-
2846
- body.android {
2847
- --top-inset: 58px;
2848
- }
2849
-
2850
- ._mapContainer_1ogf3_9 {
2851
- position: relative;
2852
- width: 100%;
2853
- height: 100%;
2854
- }
2855
-
2856
- ._helpTextContainer_1ogf3_15 {
2857
- position: absolute;
2858
- width: 100%;
2859
- height: 100%;
2860
- top: 0;
2861
- left: 0;
2862
- z-index: 1;
2863
- pointer-events: none;
2864
- background-color: rgba(18, 18, 18, 0.4);
2865
- display: flex;
2866
- justify-content: center;
2867
- align-items: center;
2868
- transition: opacity 0.2s linear;
2869
- }
2870
-
2871
- ._helpText_1ogf3_15 {
2872
- margin-top: var(--space-5);
2873
- font-family: var(--text-sans);
2874
- font-weight: 700;
2875
- font-size: var(--sans-large);
2876
- line-height: var(--sans-line-height);
2877
- color: #fff !important;
2878
- margin-bottom: var(--space-3);
2879
- }
2880
-
2881
- ._desktopHelpText_1ogf3_40 {
2882
- display: none;
2883
- }
2884
-
2885
- @media (any-hover: hover) {
2886
- ._desktopHelpText_1ogf3_40 {
2887
- display: block;
2888
- }
2889
- ._mobileHelpText_1ogf3_48 {
2890
- display: none;
2891
- }
2892
- }._zoomControl_13wd1_1 {
2892
+ ._zoomControl_13wd1_1 {
2893
2893
  display: inline-flex;
2894
2894
  flex-direction: column;
2895
2895
  gap: var(--space-2);
@@ -0,0 +1 @@
1
+ export function mergeStyles(firstStyle: any, secondStyle: any): any;
@@ -0,0 +1,22 @@
1
+ function mergeStyles(firstStyle, secondStyle) {
2
+ if (!firstStyle) return secondStyle;
3
+ if (!secondStyle) return firstStyle;
4
+ if (typeof firstStyle === "string") {
5
+ if (typeof secondStyle !== "string") {
6
+ throw new Error("Styles to merge must be of the same type");
7
+ }
8
+ return firstStyle.concat(" ", secondStyle);
9
+ }
10
+ const allKeys = /* @__PURE__ */ new Set([
11
+ ...Object.keys(firstStyle),
12
+ ...Object.keys(secondStyle)
13
+ ]);
14
+ const merged = Array.from(allKeys).reduce((result, key) => {
15
+ result[key] = mergeStyles(firstStyle[key], secondStyle[key]);
16
+ return result;
17
+ }, {});
18
+ return merged;
19
+ }
20
+ export {
21
+ mergeStyles
22
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,124 @@
1
+ declare namespace _default {
2
+ let resets: string;
3
+ let breakpoints: {
4
+ readonly mobile: 320;
5
+ readonly mobileMedium: 375;
6
+ readonly mobileLandscape: 480;
7
+ readonly phablet: 660;
8
+ readonly tablet: 740;
9
+ readonly desktop: 980;
10
+ readonly leftCol: 1140;
11
+ readonly wide: 1300;
12
+ };
13
+ let space: {
14
+ readonly 0: 2;
15
+ readonly 1: 4;
16
+ readonly 2: 8;
17
+ readonly 3: 12;
18
+ readonly 4: 16;
19
+ readonly 5: 20;
20
+ readonly 6: 24;
21
+ readonly 8: 32;
22
+ readonly 9: 36;
23
+ readonly 10: 40;
24
+ readonly 12: 48;
25
+ readonly 14: 56;
26
+ readonly 16: 64;
27
+ readonly 18: 72;
28
+ readonly 24: 96;
29
+ };
30
+ namespace fontFamily {
31
+ let sans: string[];
32
+ let serif: string[];
33
+ let headline: string[];
34
+ let titlepiece: string[];
35
+ }
36
+ namespace textSizes {
37
+ let headline_1: {
38
+ readonly xxxsmall: 17;
39
+ readonly xxsmall: 20;
40
+ readonly xsmall: 24;
41
+ readonly small: 28;
42
+ readonly medium: 34;
43
+ readonly large: 42;
44
+ readonly xlarge: 50;
45
+ };
46
+ export { headline_1 as headline };
47
+ let sans_1: {
48
+ readonly xxsmall: 12;
49
+ readonly xsmall: 14;
50
+ readonly small: 15;
51
+ readonly medium: 17;
52
+ readonly large: 20;
53
+ readonly xlarge: 24;
54
+ readonly xxlarge: 28;
55
+ readonly xxxlarge: 34;
56
+ };
57
+ export { sans_1 as sans };
58
+ let titlepiece_1: {
59
+ readonly small: 42;
60
+ readonly medium: 50;
61
+ readonly large: 70;
62
+ };
63
+ export { titlepiece_1 as titlepiece };
64
+ export let body: {
65
+ readonly xsmall: 14;
66
+ readonly small: 15;
67
+ readonly medium: 17;
68
+ };
69
+ }
70
+ namespace lineHeights {
71
+ let tight: number;
72
+ let regular: number;
73
+ let loose: number;
74
+ }
75
+ namespace defaultLineHeights {
76
+ let headline_2: string;
77
+ export { headline_2 as headline };
78
+ let sans_2: string;
79
+ export { sans_2 as sans };
80
+ let titlepiece_2: string;
81
+ export { titlepiece_2 as titlepiece };
82
+ let body_1: string;
83
+ export { body_1 as body };
84
+ }
85
+ namespace colors {
86
+ let transparent: string;
87
+ let current: string;
88
+ let white: string;
89
+ let neutral: {
90
+ 7: string;
91
+ 10: string;
92
+ 20: string;
93
+ 38: string;
94
+ 46: string;
95
+ 60: string;
96
+ 86: string;
97
+ 93: string;
98
+ 97: string;
99
+ 100: string;
100
+ };
101
+ namespace party {
102
+ let con: string;
103
+ let lab: string;
104
+ let ld: string;
105
+ let ukip: string;
106
+ let ind: string;
107
+ let snp: string;
108
+ let sdlp: string;
109
+ let pc: string;
110
+ let sf: string;
111
+ let dup: string;
112
+ let green: string;
113
+ let alliance: string;
114
+ let uup: string;
115
+ let reform: string;
116
+ let other: string;
117
+ }
118
+ namespace elex {
119
+ let nocontrol: string;
120
+ let undeclared: string;
121
+ }
122
+ }
123
+ }
124
+ export default _default;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@guardian/interactive-component-library",
3
3
  "private": false,
4
- "version": "0.2.0-rc1",
4
+ "version": "0.2.0-rc2",
5
5
  "packageManager": "pnpm@8.4.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -11,13 +11,10 @@
11
11
  "files": [
12
12
  "dist"
13
13
  ],
14
- "main": "./dist/interactive-component-library.umd.cjs",
15
- "module": "./dist/interactive-component-library.js",
14
+ "module": "./dist/index.js",
15
+ "types": "./dist/index.d.ts",
16
16
  "exports": {
17
- ".": {
18
- "import": "./dist/interactive-component-library.js",
19
- "require": "./dist/interactive-component-library.umd.cjs"
20
- },
17
+ ".": "./dist/index.js",
21
18
  "./dist/style.css": "./dist/style.css"
22
19
  },
23
20
  "engines": {
@@ -27,8 +24,8 @@
27
24
  "scripts": {
28
25
  "dev": "storybook dev -p 6006",
29
26
  "build": "storybook build",
30
- "build:lib": "vite build",
31
- "build:lib:watch": "vite build --watch",
27
+ "build:lib": "vite build --mode lib",
28
+ "build:lib:watch": "vite build --mode lib --watch",
32
29
  "lint": "eslint .",
33
30
  "format": "prettier . --write",
34
31
  "format:check": "prettier . --check",