@10x-media/analytics 0.1.0-beta.0 → 0.1.0-beta.2

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 (285) hide show
  1. package/CHANGELOG.md +127 -0
  2. package/README.md +38 -357
  3. package/dist/adapters/ga4/ga4.d.ts +20 -0
  4. package/dist/adapters/ga4/ga4.js +187 -0
  5. package/dist/adapters/ga4/ga4.js.map +1 -0
  6. package/dist/{fetchJson-DZb2_Puj.js → adapters/http/fetchJson.js} +2 -2
  7. package/dist/adapters/http/fetchJson.js.map +1 -0
  8. package/dist/adapters/plausible/plausible.d.ts +15 -0
  9. package/dist/adapters/plausible/plausible.js +148 -0
  10. package/dist/adapters/plausible/plausible.js.map +1 -0
  11. package/dist/adapters/posthog/posthog.d.ts +23 -0
  12. package/dist/adapters/posthog/posthog.js +132 -0
  13. package/dist/adapters/posthog/posthog.js.map +1 -0
  14. package/dist/{series-zytbzPoc.js → adapters/series.js} +2 -2
  15. package/dist/adapters/series.js.map +1 -0
  16. package/dist/adapters/umami/umami.d.ts +18 -0
  17. package/dist/adapters/umami/umami.js +139 -0
  18. package/dist/{exports/adapters → adapters/umami}/umami.js.map +1 -1
  19. package/dist/binding/resolvePath.js +61 -0
  20. package/dist/binding/resolvePath.js.map +1 -0
  21. package/dist/binding/types.d.ts +55 -0
  22. package/dist/charts/BarList.d.ts +20 -0
  23. package/dist/charts/BarList.js +73 -0
  24. package/dist/charts/BarList.js.map +1 -0
  25. package/dist/charts/TrendChart.d.ts +25 -0
  26. package/dist/charts/TrendChart.js +195 -0
  27. package/dist/charts/TrendChart.js.map +1 -0
  28. package/dist/charts/bars.d.ts +9 -0
  29. package/dist/charts/bars.js +19 -0
  30. package/dist/charts/bars.js.map +1 -0
  31. package/dist/charts/bucket.js +86 -0
  32. package/dist/charts/bucket.js.map +1 -0
  33. package/dist/charts/spline.js +84 -0
  34. package/dist/charts/spline.js.map +1 -0
  35. package/dist/charts/styles.js +42 -0
  36. package/dist/charts/styles.js.map +1 -0
  37. package/dist/core/cacheKey.js +28 -0
  38. package/dist/core/cacheKey.js.map +1 -0
  39. package/dist/core/capabilities.d.ts +12 -0
  40. package/dist/core/capabilities.js +12 -0
  41. package/dist/core/capabilities.js.map +1 -0
  42. package/dist/{contract-CWZPKWuR.d.ts → core/contract.d.ts} +42 -5
  43. package/dist/core/contract.js +10 -0
  44. package/dist/core/contract.js.map +1 -0
  45. package/dist/core/granularity.js +17 -0
  46. package/dist/core/granularity.js.map +1 -0
  47. package/dist/core/options.d.ts +140 -0
  48. package/dist/core/options.js +114 -0
  49. package/dist/core/options.js.map +1 -0
  50. package/dist/core/registry.js +24 -0
  51. package/dist/core/registry.js.map +1 -0
  52. package/dist/core/scopedRead.js +57 -0
  53. package/dist/core/scopedRead.js.map +1 -0
  54. package/dist/exports/adapters/ga4.d.ts +2 -20
  55. package/dist/exports/adapters/ga4.js +1 -176
  56. package/dist/exports/adapters/native.d.ts +2 -22
  57. package/dist/exports/adapters/native.js +1 -848
  58. package/dist/exports/adapters/plausible.d.ts +2 -15
  59. package/dist/exports/adapters/plausible.js +1 -142
  60. package/dist/exports/adapters/posthog.d.ts +2 -17
  61. package/dist/exports/adapters/posthog.js +1 -118
  62. package/dist/exports/adapters/umami.d.ts +2 -18
  63. package/dist/exports/adapters/umami.js +1 -138
  64. package/dist/exports/client.d.ts +5 -77
  65. package/dist/exports/client.js +4 -386
  66. package/dist/exports/geo.d.ts +4 -19
  67. package/dist/exports/geo.js +3 -1
  68. package/dist/exports/i18n.d.ts +3 -63
  69. package/dist/exports/i18n.js +2 -2
  70. package/dist/exports/next.d.ts +2 -0
  71. package/dist/exports/next.js +2 -0
  72. package/dist/exports/rsc.d.ts +16 -120
  73. package/dist/exports/rsc.js +14 -598
  74. package/dist/exports/types.d.ts +6 -4
  75. package/dist/exports/types.js +2 -1
  76. package/dist/fields/AnalyticsPanelClient.js +193 -0
  77. package/dist/fields/AnalyticsPanelClient.js.map +1 -0
  78. package/dist/fields/AnalyticsPanelField.d.ts +28 -0
  79. package/dist/fields/AnalyticsPanelField.js +54 -0
  80. package/dist/fields/AnalyticsPanelField.js.map +1 -0
  81. package/dist/fields/AnalyticsStatField.d.ts +31 -0
  82. package/dist/fields/AnalyticsStatField.js +104 -0
  83. package/dist/fields/AnalyticsStatField.js.map +1 -0
  84. package/dist/fields/dateRange/field.js +55 -0
  85. package/dist/fields/dateRange/field.js.map +1 -0
  86. package/dist/fields/dateRange/styles.js +23 -0
  87. package/dist/fields/dateRange/styles.js.map +1 -0
  88. package/dist/fields/dateRange/types.d.ts +11 -0
  89. package/dist/fields/dateRange/ui.d.ts +9 -0
  90. package/dist/fields/dateRange/ui.js +373 -0
  91. package/dist/fields/dateRange/ui.js.map +1 -0
  92. package/dist/fields/emptyState.js +46 -0
  93. package/dist/fields/emptyState.js.map +1 -0
  94. package/dist/fields/factories.d.ts +60 -0
  95. package/dist/fields/factories.js +94 -0
  96. package/dist/fields/factories.js.map +1 -0
  97. package/dist/fields/format.d.ts +7 -0
  98. package/dist/fields/format.js +22 -0
  99. package/dist/fields/format.js.map +1 -0
  100. package/dist/fields/readForDocument.d.ts +57 -0
  101. package/dist/fields/readForDocument.js +147 -0
  102. package/dist/fields/readForDocument.js.map +1 -0
  103. package/dist/index.d.ts +18 -3
  104. package/dist/index.js +83 -1028
  105. package/dist/index.js.map +1 -1
  106. package/dist/native/collections/events.js +101 -0
  107. package/dist/native/collections/events.js.map +1 -0
  108. package/dist/native/collections/rollups.js +115 -0
  109. package/dist/native/collections/rollups.js.map +1 -0
  110. package/dist/native/collections/seen.js +47 -0
  111. package/dist/native/collections/seen.js.map +1 -0
  112. package/dist/native/geo/composeGeoResolvers.d.ts +7 -0
  113. package/dist/native/geo/composeGeoResolvers.js +14 -0
  114. package/dist/native/geo/composeGeoResolvers.js.map +1 -0
  115. package/dist/{geoResolver-CasIa4T9.d.ts → native/geo/geoResolver.d.ts} +2 -2
  116. package/dist/native/geo/geoResolver.js +11 -0
  117. package/dist/native/geo/geoResolver.js.map +1 -0
  118. package/dist/native/geo/maxmindResolver.d.ts +16 -0
  119. package/dist/native/geo/maxmindResolver.js +55 -0
  120. package/dist/native/geo/maxmindResolver.js.map +1 -0
  121. package/dist/native/ingest/device.js +15 -0
  122. package/dist/native/ingest/device.js.map +1 -0
  123. package/dist/native/ingest/endpoint.js +30 -0
  124. package/dist/native/ingest/endpoint.js.map +1 -0
  125. package/dist/native/ingest/flushBatch.js +69 -0
  126. package/dist/native/ingest/flushBatch.js.map +1 -0
  127. package/dist/native/ingest/normalizeEvent.js +39 -0
  128. package/dist/native/ingest/normalizeEvent.js.map +1 -0
  129. package/dist/native/ingest/salt.js +14 -0
  130. package/dist/native/ingest/salt.js.map +1 -0
  131. package/dist/native/ingest/source.js +22 -0
  132. package/dist/native/ingest/source.js.map +1 -0
  133. package/dist/native/ingest/visitorHash.js +12 -0
  134. package/dist/native/ingest/visitorHash.js.map +1 -0
  135. package/dist/native/ingest/writeBuffer.js +55 -0
  136. package/dist/native/ingest/writeBuffer.js.map +1 -0
  137. package/dist/native/ingest/writeEvent.js +14 -0
  138. package/dist/native/ingest/writeEvent.js.map +1 -0
  139. package/dist/native/nativeAdapter.d.ts +22 -0
  140. package/dist/native/nativeAdapter.js +216 -0
  141. package/dist/native/nativeAdapter.js.map +1 -0
  142. package/dist/native/realtime/buildRealtime.js +53 -0
  143. package/dist/native/realtime/buildRealtime.js.map +1 -0
  144. package/dist/native/retention/pruneTask.js +29 -0
  145. package/dist/native/retention/pruneTask.js.map +1 -0
  146. package/dist/native/rollupAcc.js +53 -0
  147. package/dist/native/rollupAcc.js.map +1 -0
  148. package/dist/native/rollups/applyDistinctDeltas.js +9 -0
  149. package/dist/native/rollups/applyDistinctDeltas.js.map +1 -0
  150. package/dist/native/rollups/bumpRollup.js +52 -0
  151. package/dist/native/rollups/bumpRollup.js.map +1 -0
  152. package/dist/native/rollups/deltas.js +31 -0
  153. package/dist/native/rollups/deltas.js.map +1 -0
  154. package/dist/native/rollups/insertIfNew.js +19 -0
  155. package/dist/native/rollups/insertIfNew.js.map +1 -0
  156. package/dist/next/posthogProxyRewrites.d.ts +36 -0
  157. package/dist/next/posthogProxyRewrites.js +50 -0
  158. package/dist/next/posthogProxyRewrites.js.map +1 -0
  159. package/dist/plugin/documentEndpoint.js +80 -0
  160. package/dist/plugin/documentEndpoint.js.map +1 -0
  161. package/dist/plugin/paths.js +11 -0
  162. package/dist/plugin/paths.js.map +1 -0
  163. package/dist/plugin/realtimeEndpoint.js +36 -0
  164. package/dist/plugin/realtimeEndpoint.js.map +1 -0
  165. package/dist/plugin/registerTranslations.js +19 -0
  166. package/dist/plugin/registerTranslations.js.map +1 -0
  167. package/dist/plugin/runtime.js +21 -0
  168. package/dist/plugin/runtime.js.map +1 -0
  169. package/dist/plugin/warmTask.js +165 -0
  170. package/dist/plugin/warmTask.js.map +1 -0
  171. package/dist/providers/collection.js +159 -0
  172. package/dist/providers/collection.js.map +1 -0
  173. package/dist/providers/factory.js +62 -0
  174. package/dist/providers/factory.js.map +1 -0
  175. package/dist/providers/resolver.js +67 -0
  176. package/dist/providers/resolver.js.map +1 -0
  177. package/dist/providers/secrets.js +27 -0
  178. package/dist/providers/secrets.js.map +1 -0
  179. package/dist/surfacing/cacheStore.js +26 -0
  180. package/dist/surfacing/cacheStore.js.map +1 -0
  181. package/dist/surfacing/coalesce.js +15 -0
  182. package/dist/surfacing/coalesce.js.map +1 -0
  183. package/dist/surfacing/engine.js +63 -0
  184. package/dist/surfacing/engine.js.map +1 -0
  185. package/dist/surfacing/queue.js +44 -0
  186. package/dist/surfacing/queue.js.map +1 -0
  187. package/dist/sync/collection.js +70 -0
  188. package/dist/sync/collection.js.map +1 -0
  189. package/dist/sync/syncTask.js +123 -0
  190. package/dist/sync/syncTask.js.map +1 -0
  191. package/dist/testing/memoryAdapter.d.ts +1 -1
  192. package/dist/timeframe/presets.d.ts +6 -0
  193. package/dist/timeframe/presets.js +59 -0
  194. package/dist/timeframe/presets.js.map +1 -0
  195. package/dist/timeframe/tz.js +110 -0
  196. package/dist/timeframe/tz.js.map +1 -0
  197. package/dist/translations/de.js +78 -0
  198. package/dist/translations/de.js.map +1 -0
  199. package/dist/{translations-keiKtSjF.js → translations/en.js} +30 -25
  200. package/dist/translations/en.js.map +1 -0
  201. package/dist/translations/index.d.ts +15 -0
  202. package/dist/translations/index.js +30 -0
  203. package/dist/translations/index.js.map +1 -0
  204. package/dist/translations/keys.d.ts +81 -0
  205. package/dist/{keys-DEqL4LOT.js → translations/keys.js} +29 -5
  206. package/dist/translations/keys.js.map +1 -0
  207. package/dist/translations/metricKeys.js +28 -0
  208. package/dist/translations/metricKeys.js.map +1 -0
  209. package/dist/translations/server.js +13 -0
  210. package/dist/translations/server.js.map +1 -0
  211. package/dist/translations/useTranslation.js +12 -0
  212. package/dist/translations/useTranslation.js.map +1 -0
  213. package/dist/widgets/AnalyticsBreakdownWidget.d.ts +7 -0
  214. package/dist/widgets/AnalyticsBreakdownWidget.js +85 -0
  215. package/dist/widgets/AnalyticsBreakdownWidget.js.map +1 -0
  216. package/dist/widgets/AnalyticsMetricWidget.d.ts +7 -0
  217. package/dist/widgets/AnalyticsMetricWidget.js +89 -0
  218. package/dist/widgets/AnalyticsMetricWidget.js.map +1 -0
  219. package/dist/widgets/AnalyticsRealtimeWidget.d.ts +7 -0
  220. package/dist/widgets/AnalyticsRealtimeWidget.js +64 -0
  221. package/dist/widgets/AnalyticsRealtimeWidget.js.map +1 -0
  222. package/dist/widgets/AnalyticsTrendWidget.d.ts +7 -0
  223. package/dist/widgets/AnalyticsTrendWidget.js +99 -0
  224. package/dist/widgets/AnalyticsTrendWidget.js.map +1 -0
  225. package/dist/widgets/ComparisonDelta.js +83 -0
  226. package/dist/widgets/ComparisonDelta.js.map +1 -0
  227. package/dist/widgets/RealtimeCounter.d.ts +19 -0
  228. package/dist/widgets/RealtimeCounter.js +76 -0
  229. package/dist/widgets/RealtimeCounter.js.map +1 -0
  230. package/dist/widgets/breakdownTypes.js +29 -0
  231. package/dist/widgets/breakdownTypes.js.map +1 -0
  232. package/dist/widgets/cardChrome.d.ts +8 -0
  233. package/dist/widgets/cardChrome.js +22 -0
  234. package/dist/widgets/cardChrome.js.map +1 -0
  235. package/dist/widgets/comparison.js +43 -0
  236. package/dist/widgets/comparison.js.map +1 -0
  237. package/dist/widgets/customWidget.d.ts +20 -0
  238. package/dist/widgets/customWidget.js +30 -0
  239. package/dist/widgets/customWidget.js.map +1 -0
  240. package/dist/widgets/defaults.d.ts +12 -0
  241. package/dist/widgets/defaults.js +72 -0
  242. package/dist/widgets/defaults.js.map +1 -0
  243. package/dist/widgets/range.js +28 -0
  244. package/dist/widgets/range.js.map +1 -0
  245. package/dist/widgets/readForWidget.d.ts +31 -0
  246. package/dist/widgets/readForWidget.js +72 -0
  247. package/dist/widgets/readForWidget.js.map +1 -0
  248. package/dist/widgets/readForWidgetBreakdown.d.ts +38 -0
  249. package/dist/widgets/readForWidgetBreakdown.js +80 -0
  250. package/dist/widgets/readForWidgetBreakdown.js.map +1 -0
  251. package/dist/{readForWidgetRealtime-D1BD37ST.d.ts → widgets/readForWidgetRealtime.d.ts} +5 -3
  252. package/dist/widgets/readForWidgetRealtime.js +63 -0
  253. package/dist/widgets/readForWidgetRealtime.js.map +1 -0
  254. package/dist/widgets/readForWidgetSeries.d.ts +44 -0
  255. package/dist/widgets/readForWidgetSeries.js +117 -0
  256. package/dist/widgets/readForWidgetSeries.js.map +1 -0
  257. package/dist/widgets/realtimePoll.js +26 -0
  258. package/dist/widgets/realtimePoll.js.map +1 -0
  259. package/dist/widgets/registerWidgets.js +228 -0
  260. package/dist/widgets/registerWidgets.js.map +1 -0
  261. package/dist/widgets/types.js +13 -0
  262. package/dist/widgets/types.js.map +1 -0
  263. package/package.json +19 -5
  264. package/dist/RealtimeCounter-BJrjMPSa.js +0 -473
  265. package/dist/RealtimeCounter-BJrjMPSa.js.map +0 -1
  266. package/dist/dist-B6HruP5v.js +0 -4731
  267. package/dist/dist-B6HruP5v.js.map +0 -1
  268. package/dist/exports/adapters/ga4.js.map +0 -1
  269. package/dist/exports/adapters/native.js.map +0 -1
  270. package/dist/exports/adapters/plausible.js.map +0 -1
  271. package/dist/exports/adapters/posthog.js.map +0 -1
  272. package/dist/exports/client.js.map +0 -1
  273. package/dist/exports/rsc.js.map +0 -1
  274. package/dist/fetchJson-DZb2_Puj.js.map +0 -1
  275. package/dist/index-CZdCT0WJ.d.ts +0 -98
  276. package/dist/keys-DEqL4LOT.js.map +0 -1
  277. package/dist/lib-CE5x1zLQ.js +0 -1058
  278. package/dist/lib-CE5x1zLQ.js.map +0 -1
  279. package/dist/maxmindResolver-CXYXXdul.js +0 -99
  280. package/dist/maxmindResolver-CXYXXdul.js.map +0 -1
  281. package/dist/presets-CBfq_uJX.d.ts +0 -38
  282. package/dist/series-zytbzPoc.js.map +0 -1
  283. package/dist/server-Cuvhgz-S.js +0 -492
  284. package/dist/server-Cuvhgz-S.js.map +0 -1
  285. package/dist/translations-keiKtSjF.js.map +0 -1
@@ -1,388 +1,6 @@
1
1
  "use client";
2
- import { n as TrendChart, r as BarList, t as RealtimeCounter } from "../RealtimeCounter-BJrjMPSa.js";
3
- import { forwardRef, useCallback, useMemo, useState } from "react";
4
- import { jsx, jsxs } from "react/jsx-runtime";
5
- import { FieldDescription, FieldError, FieldLabel, TimezonePicker, useConfig, useForm, useFormFields, useTranslation, withCondition } from "@payloadcms/ui";
6
- import { mergeFieldStyles } from "@payloadcms/ui/shared";
7
- import ReactDatePicker from "react-datepicker";
8
- //#region src/fields/dateRange/styles.tsx
9
- const DATE_RANGE_CSS = `
10
- @layer payload-default {
11
- .date-range-picker .react-datepicker__input-container input { cursor: pointer; }
12
- .date-range-calendar__header { position: relative; display: flex; align-items: center; justify-content: center; }
13
- .date-range-calendar__header .react-datepicker__navigation { position: absolute; top: 50%; transform: translateY(-50%); }
14
- .date-range-calendar__header .react-datepicker__navigation--previous { left: 0; }
15
- .date-range-calendar__header .react-datepicker__navigation--next { right: 0; }
16
- .date-range-calendar__month-label { padding: 10px 0; font-size: 0.8rem; height: 37px !important; display: flex; align-items: center; justify-content: center; font-family: var(--font-body) !important; color: var(--theme-elevation-1000); }
17
- .date-range-calendar .react-datepicker__day--in-range { background-color: var(--theme-elevation-150); color: var(--theme-elevation-1000); border-radius: 0; }
18
- .date-range-calendar .react-datepicker__day--in-selecting-range:not(.react-datepicker__day--range-start, .react-datepicker__day--range-end) { background-color: var(--theme-elevation-100); border-radius: 0; }
19
- .date-range-calendar .react-datepicker__day--range-start, .date-range-calendar .react-datepicker__day--range-end, .date-range-calendar .react-datepicker__day--selecting-range-start { background-color: var(--theme-elevation-800) !important; color: var(--theme-elevation-0) !important; font-weight: bold; border-radius: 0 !important; }
20
- }
21
- `;
22
- function DateRangeStyles() {
23
- return /* @__PURE__ */ jsx("style", { dangerouslySetInnerHTML: { __html: DATE_RANGE_CSS } });
24
- }
25
- //#endregion
26
- //#region src/fields/dateRange/ui.tsx
27
- const baseClass = "date-time-field";
28
- const pickerClass = "date-time-picker";
29
- const YEARS = Array.from({ length: 201 }, (_, i) => 1900 + i);
30
- const getMonthNames = (locale) => Array.from({ length: 12 }, (_, i) => new Intl.DateTimeFormat(locale, { month: "long" }).format(new Date(2e3, i)));
31
- const APPEARANCE_CONFIG = {
32
- default: { dateFormat: "MM/dd/yyyy" },
33
- dayOnly: { dateFormat: "MMM dd" },
34
- monthOnly: {
35
- dateFormat: "MMMM yyyy",
36
- showMonthYearPicker: true
37
- }
38
- };
39
- /** Pin a picked date to noon UTC so the stored ISO date does not shift a day across timezones. */
40
- const normalizeDate = (date) => {
41
- if (!date) return null;
42
- const normalized = new Date(date);
43
- normalized.setUTCHours(12, 0, 0, 0);
44
- return normalized;
45
- };
46
- const makeDefaultHeader = (months) => ({ monthDate, customHeaderCount, changeMonth, changeYear, decreaseMonth, increaseMonth, prevMonthButtonDisabled, nextMonthButtonDisabled }) => {
47
- const month = monthDate.getMonth();
48
- const year = monthDate.getFullYear();
49
- if (customHeaderCount === 1) return /* @__PURE__ */ jsxs("div", {
50
- className: "date-range-calendar__header",
51
- children: [/* @__PURE__ */ jsxs("div", {
52
- className: "react-datepicker__header__dropdown date-range-calendar__month-label",
53
- children: [
54
- months[month],
55
- " ",
56
- year
57
- ]
58
- }), /* @__PURE__ */ jsx("button", {
59
- "aria-label": "Next Month",
60
- className: "react-datepicker__navigation react-datepicker__navigation--next",
61
- disabled: nextMonthButtonDisabled,
62
- onClick: increaseMonth,
63
- type: "button",
64
- children: /* @__PURE__ */ jsx("span", {
65
- className: "react-datepicker__navigation-icon react-datepicker__navigation-icon--next",
66
- children: "Next Month"
67
- })
68
- })]
69
- });
70
- return /* @__PURE__ */ jsxs("div", {
71
- className: "date-range-calendar__header",
72
- children: [/* @__PURE__ */ jsx("button", {
73
- "aria-label": "Previous Month",
74
- className: "react-datepicker__navigation react-datepicker__navigation--previous",
75
- disabled: prevMonthButtonDisabled,
76
- onClick: decreaseMonth,
77
- type: "button",
78
- children: /* @__PURE__ */ jsx("span", {
79
- className: "react-datepicker__navigation-icon react-datepicker__navigation-icon--previous",
80
- children: "Previous Month"
81
- })
82
- }), /* @__PURE__ */ jsxs("div", {
83
- className: "react-datepicker__header__dropdown react-datepicker__header__dropdown--select",
84
- children: [/* @__PURE__ */ jsx("div", {
85
- className: "react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--select",
86
- children: /* @__PURE__ */ jsx("select", {
87
- className: "react-datepicker__month-select",
88
- onChange: (e) => changeMonth(Number(e.target.value)),
89
- value: month,
90
- children: months.map((name, index) => /* @__PURE__ */ jsx("option", {
91
- value: index,
92
- children: name
93
- }, name))
94
- })
95
- }), /* @__PURE__ */ jsx("div", {
96
- className: "react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--select",
97
- children: /* @__PURE__ */ jsx("select", {
98
- className: "react-datepicker__year-select",
99
- onChange: (e) => changeYear(Number(e.target.value)),
100
- value: year,
101
- children: YEARS.map((y) => /* @__PURE__ */ jsx("option", {
102
- value: y,
103
- children: y
104
- }, y))
105
- })
106
- })]
107
- })]
108
- });
109
- };
110
- const renderMonthOnlyHeader = ({ monthDate, customHeaderCount, changeYear, decreaseYear, increaseYear, prevYearButtonDisabled, nextYearButtonDisabled }) => {
111
- const year = monthDate.getFullYear();
112
- if (customHeaderCount === 1) return /* @__PURE__ */ jsxs("div", {
113
- className: "date-range-calendar__header",
114
- children: [/* @__PURE__ */ jsx("div", {
115
- className: "react-datepicker__header__dropdown date-range-calendar__month-label",
116
- children: year
117
- }), /* @__PURE__ */ jsx("button", {
118
- "aria-label": "Next Year",
119
- className: "react-datepicker__navigation react-datepicker__navigation--next",
120
- disabled: nextYearButtonDisabled,
121
- onClick: increaseYear,
122
- type: "button",
123
- children: /* @__PURE__ */ jsx("span", {
124
- className: "react-datepicker__navigation-icon react-datepicker__navigation-icon--next",
125
- children: "Next Year"
126
- })
127
- })]
128
- });
129
- return /* @__PURE__ */ jsxs("div", {
130
- className: "date-range-calendar__header",
131
- children: [/* @__PURE__ */ jsx("button", {
132
- "aria-label": "Previous Year",
133
- className: "react-datepicker__navigation react-datepicker__navigation--previous",
134
- disabled: prevYearButtonDisabled,
135
- onClick: decreaseYear,
136
- type: "button",
137
- children: /* @__PURE__ */ jsx("span", {
138
- className: "react-datepicker__navigation-icon react-datepicker__navigation-icon--previous",
139
- children: "Previous Year"
140
- })
141
- }), /* @__PURE__ */ jsx("div", {
142
- className: "react-datepicker__header__dropdown react-datepicker__header__dropdown--select",
143
- children: /* @__PURE__ */ jsx("div", {
144
- className: "react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--select",
145
- children: /* @__PURE__ */ jsx("select", {
146
- className: "react-datepicker__year-select",
147
- onChange: (e) => changeYear(Number(e.target.value)),
148
- value: year,
149
- children: YEARS.map((y) => /* @__PURE__ */ jsx("option", {
150
- value: y,
151
- children: y
152
- }, y))
153
- })
154
- })
155
- })]
156
- });
157
- };
158
- const formatByAppearance = (date, appearance, locale) => {
159
- if (!date) return "";
160
- switch (appearance) {
161
- case "dayOnly": return date.toLocaleDateString(locale, {
162
- month: "short",
163
- day: "2-digit"
164
- });
165
- case "monthOnly": return date.toLocaleDateString(locale, {
166
- month: "long",
167
- year: "numeric"
168
- });
169
- default: return date.toLocaleDateString(locale, {
170
- month: "2-digit",
171
- day: "2-digit",
172
- year: "numeric"
173
- });
174
- }
175
- };
176
- const RangeInput = forwardRef(({ appearance, endDate, locale, onClick, startDate }, ref) => {
177
- return /* @__PURE__ */ jsx("input", {
178
- onChange: () => {},
179
- onClick,
180
- placeholder: "Select date range...",
181
- readOnly: true,
182
- ref,
183
- value: startDate || endDate ? `${formatByAppearance(startDate, appearance, locale)} → ${formatByAppearance(endDate, appearance, locale) || "..."}` : ""
184
- });
185
- });
186
- RangeInput.displayName = "RangeInput";
187
- const DateRangeFieldComponent = (props) => {
188
- const { field: { admin: { className, description } = {}, label }, path, readOnly, pickerAppearance = "default", timezone = false } = props;
189
- const { config } = useConfig();
190
- const { i18n } = useTranslation();
191
- const { dispatchFields, setModified } = useForm();
192
- const locale = i18n.language;
193
- const fromValue = useFormFields(([fields]) => fields[`${path}.from`]?.value);
194
- const toValue = useFormFields(([fields]) => fields[`${path}.to`]?.value);
195
- const tzValue = useFormFields(([fields]) => timezone ? fields[`${path}._tz`]?.value : null);
196
- const startDate = fromValue ? new Date(fromValue) : null;
197
- const endDate = toValue ? new Date(toValue) : null;
198
- const hasValue = Boolean(startDate ?? endDate);
199
- const [pickerKey, setPickerKey] = useState(0);
200
- const onCalendarClose = useCallback(() => setPickerKey((k) => k + 1), []);
201
- const onChange = useCallback((dates) => {
202
- if (readOnly) return;
203
- const [start, end] = dates;
204
- dispatchFields({
205
- type: "UPDATE",
206
- path: `${path}.from`,
207
- value: normalizeDate(start)?.toISOString() ?? null
208
- });
209
- dispatchFields({
210
- type: "UPDATE",
211
- path: `${path}.to`,
212
- value: normalizeDate(end)?.toISOString() ?? null
213
- });
214
- setModified(true);
215
- }, [
216
- path,
217
- readOnly,
218
- dispatchFields,
219
- setModified
220
- ]);
221
- const onClear = useCallback(() => {
222
- if (readOnly) return;
223
- dispatchFields({
224
- type: "UPDATE",
225
- path: `${path}.from`,
226
- value: null
227
- });
228
- dispatchFields({
229
- type: "UPDATE",
230
- path: `${path}.to`,
231
- value: null
232
- });
233
- setModified(true);
234
- }, [
235
- path,
236
- readOnly,
237
- dispatchFields,
238
- setModified
239
- ]);
240
- const onTimezoneChange = useCallback((tz) => {
241
- dispatchFields({
242
- type: "UPDATE",
243
- path: `${path}._tz`,
244
- value: tz
245
- });
246
- setModified(true);
247
- }, [
248
- path,
249
- dispatchFields,
250
- setModified
251
- ]);
252
- const appearanceConfig = APPEARANCE_CONFIG[pickerAppearance];
253
- const customHeader = useMemo(() => {
254
- if (pickerAppearance === "monthOnly") return renderMonthOnlyHeader;
255
- return makeDefaultHeader(getMonthNames(locale));
256
- }, [pickerAppearance, locale]);
257
- const supportedTimezones = useMemo(() => config.admin.timezones?.supportedTimezones ?? [], [config.admin.timezones]);
258
- const style = useMemo(() => mergeFieldStyles(props.field), [props.field]);
259
- return /* @__PURE__ */ jsxs("div", {
260
- className: [
261
- "field-type",
262
- baseClass,
263
- className,
264
- readOnly && "read-only"
265
- ].filter(Boolean).join(" "),
266
- style,
267
- children: [
268
- /* @__PURE__ */ jsx(DateRangeStyles, {}),
269
- /* @__PURE__ */ jsx(FieldLabel, {
270
- label,
271
- path
272
- }),
273
- /* @__PURE__ */ jsxs("div", {
274
- className: "field-type__wrap",
275
- id: `field-${path.replace(/\./g, "__")}`,
276
- children: [
277
- /* @__PURE__ */ jsx(FieldError, { path }),
278
- /* @__PURE__ */ jsxs("div", {
279
- className: `${pickerClass} ${pickerClass}__appearance--${pickerAppearance} date-range-picker`,
280
- children: [/* @__PURE__ */ jsxs("div", {
281
- className: `${pickerClass}__icon-wrap`,
282
- children: [hasValue && !readOnly && /* @__PURE__ */ jsx("button", {
283
- className: `${pickerClass}__clear-button`,
284
- onClick: onClear,
285
- type: "button",
286
- children: /* @__PURE__ */ jsxs("svg", {
287
- "aria-hidden": "true",
288
- className: "icon icon--x",
289
- fill: "none",
290
- stroke: "currentColor",
291
- strokeWidth: "1.5",
292
- viewBox: "0 0 25 25",
293
- xmlns: "http://www.w3.org/2000/svg",
294
- children: [/* @__PURE__ */ jsx("line", {
295
- x1: "6",
296
- x2: "19",
297
- y1: "6",
298
- y2: "19"
299
- }), /* @__PURE__ */ jsx("line", {
300
- x1: "19",
301
- x2: "6",
302
- y1: "6",
303
- y2: "19"
304
- })]
305
- })
306
- }), /* @__PURE__ */ jsxs("svg", {
307
- "aria-hidden": "true",
308
- className: "icon icon--calendar",
309
- fill: "none",
310
- stroke: "currentColor",
311
- strokeWidth: "1.5",
312
- viewBox: "0 0 25 25",
313
- xmlns: "http://www.w3.org/2000/svg",
314
- children: [
315
- /* @__PURE__ */ jsx("rect", {
316
- height: "18",
317
- rx: "1",
318
- width: "18",
319
- x: "3.5",
320
- y: "4.5"
321
- }),
322
- /* @__PURE__ */ jsx("line", {
323
- x1: "16",
324
- x2: "16",
325
- y1: "3",
326
- y2: "6"
327
- }),
328
- /* @__PURE__ */ jsx("line", {
329
- x1: "9",
330
- x2: "9",
331
- y1: "3",
332
- y2: "6"
333
- }),
334
- /* @__PURE__ */ jsx("line", {
335
- x1: "3.5",
336
- x2: "21.5",
337
- y1: "9.5",
338
- y2: "9.5"
339
- })
340
- ]
341
- })]
342
- }), /* @__PURE__ */ jsx("div", {
343
- className: `${pickerClass}__input-wrapper`,
344
- children: /* @__PURE__ */ jsx(ReactDatePicker, {
345
- calendarClassName: "date-range-calendar",
346
- customInput: /* @__PURE__ */ jsx(RangeInput, {
347
- appearance: pickerAppearance,
348
- endDate,
349
- locale,
350
- startDate
351
- }),
352
- disabled: readOnly,
353
- endDate: endDate ?? void 0,
354
- monthsShown: 2,
355
- onCalendarClose,
356
- onChange,
357
- openToDate: startDate ?? void 0,
358
- popperPlacement: "bottom-start",
359
- renderCustomHeader: customHeader,
360
- selectsRange: true,
361
- selected: startDate,
362
- showPopperArrow: false,
363
- startDate: startDate ?? void 0,
364
- ...appearanceConfig
365
- }, pickerKey)
366
- })]
367
- }),
368
- timezone && supportedTimezones.length > 0 && /* @__PURE__ */ jsx(TimezonePicker, {
369
- id: `${path}-timezone-picker`,
370
- onChange: onTimezoneChange,
371
- options: supportedTimezones,
372
- readOnly,
373
- selectedTimezone: tzValue ?? void 0
374
- }),
375
- /* @__PURE__ */ jsx(FieldDescription, {
376
- description,
377
- path
378
- })
379
- ]
380
- })
381
- ]
382
- });
383
- };
384
- const DateRangeField = withCondition(DateRangeFieldComponent);
385
- //#endregion
2
+ import { BarList } from "../charts/BarList.js";
3
+ import { TrendChart } from "../charts/TrendChart.js";
4
+ import { DateRangeField } from "../fields/dateRange/ui.js";
5
+ import { RealtimeCounter } from "../widgets/RealtimeCounter.js";
386
6
  export { BarList, DateRangeField, RealtimeCounter, TrendChart };
387
-
388
- //# sourceMappingURL=client.js.map
@@ -1,19 +1,4 @@
1
- import { i as platformHeaderResolver, n as GeoResolver, r as noopResolver, t as Geo } from "../geoResolver-CasIa4T9.js";
2
-
3
- //#region src/native/geo/composeGeoResolvers.d.ts
4
- declare function composeGeoResolvers(...resolvers: GeoResolver[]): GeoResolver;
5
- //#endregion
6
- //#region src/native/geo/maxmindResolver.d.ts
7
- interface MaxmindOptions {
8
- dbPath: string;
9
- }
10
- /**
11
- * Optional MaxMind GeoLite2 resolver. The mmdb and the maxmind lib are loaded
12
- * lazily on first use. Any failure (lib not installed, file missing/unreadable,
13
- * lookup error) degrades to empty geo after a single warning, so a missing or
14
- * unconfigured database never breaks ingestion.
15
- */
16
- declare function maxmindResolver(options: MaxmindOptions): GeoResolver;
17
- //#endregion
18
- export { type Geo, type GeoResolver, type MaxmindOptions, composeGeoResolvers, maxmindResolver, noopResolver, platformHeaderResolver };
19
- //# sourceMappingURL=geo.d.ts.map
1
+ import { Geo, GeoResolver, noopResolver, platformHeaderResolver } from "../native/geo/geoResolver.js";
2
+ import { composeGeoResolvers } from "../native/geo/composeGeoResolvers.js";
3
+ import { MaxmindOptions, maxmindResolver } from "../native/geo/maxmindResolver.js";
4
+ export { type Geo, type GeoResolver, type MaxmindOptions, composeGeoResolvers, maxmindResolver, noopResolver, platformHeaderResolver };
@@ -1,2 +1,4 @@
1
- import { i as composeGeoResolvers, n as noopResolver, r as platformHeaderResolver, t as maxmindResolver } from "../maxmindResolver-CXYXXdul.js";
1
+ import { composeGeoResolvers } from "../native/geo/composeGeoResolvers.js";
2
+ import { noopResolver, platformHeaderResolver } from "../native/geo/geoResolver.js";
3
+ import { maxmindResolver } from "../native/geo/maxmindResolver.js";
2
4
  export { composeGeoResolvers, maxmindResolver, noopResolver, platformHeaderResolver };
@@ -1,63 +1,3 @@
1
- //#region src/translations/keys.d.ts
2
- /**
3
- * Typed translation keys. Lookups must go through these constants, not string
4
- * literals (enforced by requireI18nKeysTyped.grit). Every key here must have a
5
- * value in every locale (`en.ts`), or it is a type error.
6
- */
7
- declare const keys: {
8
- readonly pluginName: "analytics:pluginName";
9
- readonly tabAnalytics: "analytics:tabAnalytics";
10
- readonly metricPageviews: "analytics:metricPageviews";
11
- readonly metricVisitors: "analytics:metricVisitors";
12
- readonly metricSessions: "analytics:metricSessions";
13
- readonly metricEvents: "analytics:metricEvents";
14
- readonly metricAvgDuration: "analytics:metricAvgDuration";
15
- readonly metricBounceRate: "analytics:metricBounceRate";
16
- readonly metricEntries: "analytics:metricEntries";
17
- readonly metricExits: "analytics:metricExits";
18
- readonly metricScrollDepth: "analytics:metricScrollDepth";
19
- readonly metricConversions: "analytics:metricConversions";
20
- readonly metricRevenue: "analytics:metricRevenue";
21
- readonly stateNoData: "analytics:stateNoData";
22
- readonly stateNotBound: "analytics:stateNotBound";
23
- readonly stateNotConfigured: "analytics:stateNotConfigured";
24
- readonly stateUnavailable: "analytics:stateUnavailable";
25
- readonly timeframeToday: "analytics:timeframeToday";
26
- readonly timeframeLast7Days: "analytics:timeframeLast7Days";
27
- readonly timeframeLast30Days: "analytics:timeframeLast30Days";
28
- readonly timeframeLast90Days: "analytics:timeframeLast90Days";
29
- readonly timeframeThisMonth: "analytics:timeframeThisMonth";
30
- readonly timeframeThisYear: "analytics:timeframeThisYear";
31
- readonly timeframeLastYear: "analytics:timeframeLastYear";
32
- readonly timeframeAllTime: "analytics:timeframeAllTime";
33
- readonly widgetMetricLabel: "analytics:widgetMetricLabel";
34
- readonly widgetTrendLabel: "analytics:widgetTrendLabel";
35
- readonly widgetBreakdownPages: "analytics:widgetBreakdownPages";
36
- readonly widgetBreakdownSources: "analytics:widgetBreakdownSources";
37
- readonly widgetBreakdownDevices: "analytics:widgetBreakdownDevices";
38
- readonly widgetBreakdownCountries: "analytics:widgetBreakdownCountries";
39
- readonly widgetFieldLimit: "analytics:widgetFieldLimit";
40
- readonly stateNoBreakdown: "analytics:stateNoBreakdown";
41
- readonly stateClamped: "analytics:stateClamped";
42
- readonly widgetFieldTitle: "analytics:widgetFieldTitle";
43
- readonly widgetFieldMetric: "analytics:widgetFieldMetric";
44
- readonly widgetFieldTimeframe: "analytics:widgetFieldTimeframe";
45
- readonly widgetFieldDataSource: "analytics:widgetFieldDataSource";
46
- readonly widgetFieldTitlePlaceholder: "analytics:widgetFieldTitlePlaceholder";
47
- readonly widgetTimeframeCustom: "analytics:widgetTimeframeCustom";
48
- readonly widgetFieldRange: "analytics:widgetFieldRange";
49
- readonly widgetFieldWindow: "analytics:widgetFieldWindow";
50
- readonly widgetRealtimeLabel: "analytics:widgetRealtimeLabel";
51
- readonly widgetRealtimeCaption: "analytics:widgetRealtimeCaption";
52
- readonly widgetRealtimePaused: "analytics:widgetRealtimePaused";
53
- };
54
- type TranslationKey = (typeof keys)[keyof typeof keys];
55
- //#endregion
56
- //#region src/translations/index.d.ts
57
- /** Per-locale messages merged into `config.i18n.translations`. English only for now. */
58
- declare const translations: {
59
- en: Record<string, Record<string, string>>;
60
- };
61
- //#endregion
62
- export { type TranslationKey as AnalyticsTranslationKeys, keys, translations };
63
- //# sourceMappingURL=i18n.d.ts.map
1
+ import { TranslationKey, keys } from "../translations/keys.js";
2
+ import { TranslationsOption, translations } from "../translations/index.js";
3
+ export { type TranslationKey as AnalyticsTranslationKeys, type TranslationKey, type TranslationsOption, keys, translations };
@@ -1,3 +1,3 @@
1
- import { t as keys } from "../keys-DEqL4LOT.js";
2
- import { t as translations } from "../translations-keiKtSjF.js";
1
+ import { keys } from "../translations/keys.js";
2
+ import { translations } from "../translations/index.js";
3
3
  export { keys, translations };
@@ -0,0 +1,2 @@
1
+ import { PosthogProxyRegion, PosthogProxyRewrite, PosthogProxyRewritesOptions, posthogProxyRewrites } from "../next/posthogProxyRewrites.js";
2
+ export { type PosthogProxyRegion, type PosthogProxyRewrite, type PosthogProxyRewritesOptions, posthogProxyRewrites };
@@ -0,0 +1,2 @@
1
+ import { posthogProxyRewrites } from "../next/posthogProxyRewrites.js";
2
+ export { posthogProxyRewrites };
@@ -1,120 +1,16 @@
1
- import { f as MetricKey, l as DateRange, u as DimensionKey } from "../contract-CWZPKWuR.js";
2
- import { a as readForWidgetRealtime, i as WidgetRealtimeStatus, n as RealtimePoint, r as WidgetRealtimeResult, t as ReadForWidgetRealtimeArgs } from "../readForWidgetRealtime-D1BD37ST.js";
3
- import { i as BindingDoc, s as CapabilityRequirement, t as TimeframePreset } from "../presets-CBfq_uJX.js";
4
- import { PayloadRequest, WidgetServerProps } from "payload";
5
-
6
- //#region src/fields/AnalyticsStatField.d.ts
7
- interface AnalyticsStatFieldProps {
8
- req: PayloadRequest;
9
- data: BindingDoc;
10
- collectionSlug: string;
11
- i18n: {
12
- t: unknown;
13
- language?: string;
14
- };
15
- metrics: MetricKey[];
16
- timeframe: TimeframePreset;
17
- variant: 'stat' | 'row';
18
- adapterId?: string;
19
- }
20
- /**
21
- * Read-only server component for a per-document analytics stat (or row of stats).
22
- * Resolves the document's bound path, reads through the surfacing engine, and renders
23
- * static markup. Interactivity (timeframe picker, refresh) is intentionally deferred.
24
- */
25
- declare const AnalyticsStatField: (props: AnalyticsStatFieldProps) => Promise<import("react/jsx-runtime").JSX.Element>;
26
- //#endregion
27
- //#region src/fields/format.d.ts
28
- declare const formatMetricValue: (metric: MetricKey, value: number, locale: string) => string;
29
- //#endregion
30
- //#region src/widgets/AnalyticsBreakdownWidget.d.ts
31
- declare function AnalyticsBreakdownWidget(props: WidgetServerProps): Promise<import("react/jsx-runtime").JSX.Element>;
32
- //#endregion
33
- //#region src/widgets/AnalyticsMetricWidget.d.ts
34
- declare function AnalyticsMetricWidget(props: WidgetServerProps): Promise<import("react/jsx-runtime").JSX.Element>;
35
- //#endregion
36
- //#region src/widgets/AnalyticsRealtimeWidget.d.ts
37
- declare function AnalyticsRealtimeWidget(props: WidgetServerProps): Promise<import("react/jsx-runtime").JSX.Element>;
38
- //#endregion
39
- //#region src/widgets/AnalyticsTrendWidget.d.ts
40
- declare function AnalyticsTrendWidget(props: WidgetServerProps): Promise<import("react/jsx-runtime").JSX.Element>;
41
- //#endregion
42
- //#region src/widgets/readForWidget.d.ts
43
- type WidgetReadStatus = 'ok' | 'not-configured' | 'unavailable';
44
- interface WidgetReadResult {
45
- status: WidgetReadStatus;
46
- adapterId: string;
47
- dateRange: DateRange;
48
- metrics: Partial<Record<MetricKey, number>>;
49
- clamped?: boolean;
50
- }
51
- interface ReadForWidgetArgs {
52
- req: PayloadRequest;
53
- metrics: MetricKey[];
54
- timeframe: TimeframePreset;
55
- adapterId?: string;
56
- now: Date;
57
- range?: DateRange;
58
- }
59
- declare const readForWidget: (args: ReadForWidgetArgs) => Promise<WidgetReadResult>;
60
- //#endregion
61
- //#region src/widgets/readForWidgetBreakdown.d.ts
62
- interface BreakdownRow {
63
- label: string;
64
- value: number;
65
- }
66
- interface WidgetBreakdownResult {
67
- status: WidgetReadStatus;
68
- adapterId: string;
69
- dateRange: DateRange;
70
- rows: BreakdownRow[];
71
- clamped?: boolean;
72
- }
73
- interface ReadForWidgetBreakdownArgs {
74
- req: PayloadRequest;
75
- metric: MetricKey;
76
- dimension: DimensionKey;
77
- timeframe: TimeframePreset;
78
- limit: number;
79
- adapterId?: string;
80
- now: Date;
81
- range?: DateRange;
82
- }
83
- /**
84
- * Site-wide ranked breakdown of one metric by one dimension, read through the engine.
85
- * Mirrors `readForWidget` but gates on the dimension too and maps each result row to a
86
- * `{ label, value }` pair the bar list renders. The adapter owns sorting and limiting.
87
- */
88
- declare const readForWidgetBreakdown: (args: ReadForWidgetBreakdownArgs) => Promise<WidgetBreakdownResult>;
89
- //#endregion
90
- //#region src/widgets/readForWidgetSeries.d.ts
91
- interface SeriesPoint {
92
- date: string;
93
- value: number;
94
- }
95
- interface WidgetSeriesResult {
96
- status: WidgetReadStatus;
97
- adapterId: string;
98
- dateRange: DateRange;
99
- points: SeriesPoint[];
100
- total: number;
101
- clamped?: boolean;
102
- }
103
- interface ReadForWidgetSeriesArgs {
104
- req: PayloadRequest;
105
- metric: MetricKey;
106
- timeframe: TimeframePreset;
107
- adapterId?: string;
108
- now: Date;
109
- range?: DateRange;
110
- }
111
- /**
112
- * Site-wide time-series read for a trend widget: resolve the timeframe, pick the
113
- * adapter, gate on the metric and day-granularity support, read through the engine,
114
- * then return a zero-filled daily series plus the headline total. Mirrors
115
- * `readForWidget` but yields points instead of a single value.
116
- */
117
- declare const readForWidgetSeries: (args: ReadForWidgetSeriesArgs) => Promise<WidgetSeriesResult>;
118
- //#endregion
119
- export { AnalyticsBreakdownWidget, AnalyticsMetricWidget, AnalyticsRealtimeWidget, AnalyticsStatField, AnalyticsTrendWidget, type BreakdownRow, type CapabilityRequirement, type DateRange, type DimensionKey, type MetricKey, type ReadForWidgetArgs, type ReadForWidgetBreakdownArgs, type ReadForWidgetRealtimeArgs, type ReadForWidgetSeriesArgs, type RealtimePoint, type SeriesPoint, type WidgetBreakdownResult, type WidgetReadResult, type WidgetReadStatus, type WidgetRealtimeResult, type WidgetRealtimeStatus, type WidgetSeriesResult, formatMetricValue, readForWidget, readForWidgetBreakdown, readForWidgetRealtime, readForWidgetSeries };
120
- //# sourceMappingURL=rsc.d.ts.map
1
+ import { DateRange, DimensionKey, MetricKey } from "../core/contract.js";
2
+ import { ReadForWidgetRealtimeArgs, RealtimePoint, WidgetRealtimeResult, WidgetRealtimeStatus, readForWidgetRealtime } from "../widgets/readForWidgetRealtime.js";
3
+ import { CapabilityRequirement } from "../core/capabilities.js";
4
+ import { AnalyticsStatField } from "../fields/AnalyticsStatField.js";
5
+ import { AnalyticsPanelField } from "../fields/AnalyticsPanelField.js";
6
+ import { formatMetricValue } from "../fields/format.js";
7
+ import { ReadForWidgetArgs, WidgetReadResult, WidgetReadStatus, readForWidget } from "../widgets/readForWidget.js";
8
+ import { ReadForWidgetSeriesArgs, SeriesPoint, WidgetSeriesResult, readForWidgetSeries } from "../widgets/readForWidgetSeries.js";
9
+ import { FieldReadResult, FieldReadStatus, ReadForFieldArgs, readForField } from "../fields/readForDocument.js";
10
+ import { AnalyticsBreakdownWidget } from "../widgets/AnalyticsBreakdownWidget.js";
11
+ import { AnalyticsMetricWidget } from "../widgets/AnalyticsMetricWidget.js";
12
+ import { AnalyticsRealtimeWidget } from "../widgets/AnalyticsRealtimeWidget.js";
13
+ import { AnalyticsTrendWidget } from "../widgets/AnalyticsTrendWidget.js";
14
+ import { cardStyle, labelStyle } from "../widgets/cardChrome.js";
15
+ import { BreakdownRow, ReadForWidgetBreakdownArgs, WidgetBreakdownResult, readForWidgetBreakdown } from "../widgets/readForWidgetBreakdown.js";
16
+ export { AnalyticsBreakdownWidget, AnalyticsMetricWidget, AnalyticsPanelField, AnalyticsRealtimeWidget, AnalyticsStatField, AnalyticsTrendWidget, type BreakdownRow, type CapabilityRequirement, type DateRange, type DimensionKey, type FieldReadResult, type FieldReadStatus, type MetricKey, type ReadForFieldArgs, type ReadForWidgetArgs, type ReadForWidgetBreakdownArgs, type ReadForWidgetRealtimeArgs, type ReadForWidgetSeriesArgs, type RealtimePoint, type SeriesPoint, type WidgetBreakdownResult, type WidgetReadResult, type WidgetReadStatus, type WidgetRealtimeResult, type WidgetRealtimeStatus, type WidgetSeriesResult, formatMetricValue, readForField, readForWidget, readForWidgetBreakdown, readForWidgetRealtime, readForWidgetSeries, cardStyle as widgetCardStyle, labelStyle as widgetLabelStyle };