@empoweredvote/ev-ui 0.2.3 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -4034,28 +4034,99 @@ var styles = {
4034
4034
 
4035
4035
  // src/TopicTierBadge.jsx
4036
4036
  import React18 from "react";
4037
- var TIER_LABELS = {
4038
- federal: { full: "Federal", compact: "F" },
4039
- state: { full: "State", compact: "S" },
4040
- local: { full: "Local", compact: "L" }
4037
+ function LandmarkIcon({ size = 14 }) {
4038
+ return /* @__PURE__ */ React18.createElement(
4039
+ "svg",
4040
+ {
4041
+ width: size,
4042
+ height: size,
4043
+ viewBox: "0 0 24 24",
4044
+ fill: "none",
4045
+ stroke: "currentColor",
4046
+ strokeWidth: "2",
4047
+ strokeLinecap: "round",
4048
+ strokeLinejoin: "round",
4049
+ xmlns: "http://www.w3.org/2000/svg",
4050
+ "aria-hidden": "true"
4051
+ },
4052
+ /* @__PURE__ */ React18.createElement("path", { d: "M10 18v-7" }),
4053
+ /* @__PURE__ */ React18.createElement("path", { d: "M11.12 2.198a2 2 0 0 1 1.76.006l7.866 3.847c.476.233.31.949-.22.949H3.474c-.53 0-.695-.716-.22-.949z" }),
4054
+ /* @__PURE__ */ React18.createElement("path", { d: "M14 18v-7" }),
4055
+ /* @__PURE__ */ React18.createElement("path", { d: "M18 18v-7" }),
4056
+ /* @__PURE__ */ React18.createElement("path", { d: "M3 22h18" }),
4057
+ /* @__PURE__ */ React18.createElement("path", { d: "M6 18v-7" })
4058
+ );
4059
+ }
4060
+ function Building2Icon({ size = 14 }) {
4061
+ return /* @__PURE__ */ React18.createElement(
4062
+ "svg",
4063
+ {
4064
+ width: size,
4065
+ height: size,
4066
+ viewBox: "0 0 24 24",
4067
+ fill: "none",
4068
+ stroke: "currentColor",
4069
+ strokeWidth: "2",
4070
+ strokeLinecap: "round",
4071
+ strokeLinejoin: "round",
4072
+ xmlns: "http://www.w3.org/2000/svg",
4073
+ "aria-hidden": "true"
4074
+ },
4075
+ /* @__PURE__ */ React18.createElement("path", { d: "M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z" }),
4076
+ /* @__PURE__ */ React18.createElement("path", { d: "M6 12H4a2 2 0 0 0-2 2v8h4" }),
4077
+ /* @__PURE__ */ React18.createElement("path", { d: "M18 9h2a2 2 0 0 1 2 2v11h-4" }),
4078
+ /* @__PURE__ */ React18.createElement("path", { d: "M10 6h4" }),
4079
+ /* @__PURE__ */ React18.createElement("path", { d: "M10 10h4" }),
4080
+ /* @__PURE__ */ React18.createElement("path", { d: "M10 14h4" }),
4081
+ /* @__PURE__ */ React18.createElement("path", { d: "M10 18h4" })
4082
+ );
4083
+ }
4084
+ function HomeIcon({ size = 14 }) {
4085
+ return /* @__PURE__ */ React18.createElement(
4086
+ "svg",
4087
+ {
4088
+ width: size,
4089
+ height: size,
4090
+ viewBox: "0 0 24 24",
4091
+ fill: "none",
4092
+ stroke: "currentColor",
4093
+ strokeWidth: "2",
4094
+ strokeLinecap: "round",
4095
+ strokeLinejoin: "round",
4096
+ xmlns: "http://www.w3.org/2000/svg",
4097
+ "aria-hidden": "true"
4098
+ },
4099
+ /* @__PURE__ */ React18.createElement("path", { d: "m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z" }),
4100
+ /* @__PURE__ */ React18.createElement("polyline", { points: "9 22 9 12 15 12 15 22" })
4101
+ );
4102
+ }
4103
+ var TIER_INFO = {
4104
+ federal: { label: "Federal", Icon: LandmarkIcon },
4105
+ state: { label: "State", Icon: Building2Icon },
4106
+ local: { label: "Local", Icon: HomeIcon }
4041
4107
  };
4042
4108
  var SIZE_STYLES = {
4043
4109
  xs: {
4110
+ iconSize: 12,
4044
4111
  fontSize: fontSizes.xs,
4045
- padding: `${spacing[1]} ${spacing[2]}`,
4046
- gap: spacing[1]
4112
+ pillPadding: `${spacing[1]} ${spacing[2]}`,
4113
+ gap: spacing[1],
4114
+ iconGap: "3px"
4047
4115
  },
4048
4116
  sm: {
4117
+ iconSize: 14,
4049
4118
  fontSize: fontSizes.xs,
4050
- padding: `${spacing[1]} ${spacing[2]}`,
4051
- gap: spacing[1]
4119
+ pillPadding: `${spacing[1]} ${spacing[2]}`,
4120
+ gap: spacing[2],
4121
+ iconGap: "4px"
4052
4122
  }
4053
4123
  };
4054
4124
  function TopicTierBadge({
4055
4125
  topic,
4056
4126
  tiers,
4057
4127
  size = "sm",
4058
- layout = "full",
4128
+ iconOnly = false,
4129
+ variant = "tinted",
4059
4130
  style = {}
4060
4131
  }) {
4061
4132
  const effectiveTiers = tiers != null ? tiers : topic ? [
@@ -4072,41 +4143,197 @@ function TopicTierBadge({
4072
4143
  flexWrap: "wrap",
4073
4144
  ...style
4074
4145
  };
4075
- const pillStyle = (tier) => ({
4076
- display: "inline-flex",
4077
- alignItems: "center",
4078
- padding: sizeStyle.padding,
4079
- borderRadius: borderRadius.full,
4080
- fontFamily: fonts.primary,
4081
- fontWeight: fontWeights.medium,
4082
- fontSize: sizeStyle.fontSize,
4083
- backgroundColor: tierColors[tier].bg,
4084
- color: tierColors[tier].text,
4085
- border: `1px solid ${tierColors[tier].text}`,
4086
- lineHeight: 1,
4087
- userSelect: "none"
4088
- });
4146
+ const itemStyle = (tier) => {
4147
+ const color = variant === "muted" ? "#6B7280" : tierColors[tier].text;
4148
+ return {
4149
+ display: "inline-flex",
4150
+ alignItems: "center",
4151
+ gap: sizeStyle.iconGap,
4152
+ fontFamily: fonts.primary,
4153
+ fontWeight: fontWeights.medium,
4154
+ fontSize: sizeStyle.fontSize,
4155
+ color,
4156
+ lineHeight: 1,
4157
+ userSelect: "none"
4158
+ };
4159
+ };
4089
4160
  return /* @__PURE__ */ React18.createElement(
4090
4161
  "span",
4091
4162
  {
4092
4163
  className: "ev-topic-tier-badge",
4093
4164
  style: containerStyle2,
4094
4165
  role: "group",
4095
- "aria-label": `Applies at: ${effectiveTiers.map((t) => TIER_LABELS[t].full).join(", ")}`
4166
+ "aria-label": `Applies at: ${effectiveTiers.map((t) => TIER_INFO[t].label).join(", ")}`
4096
4167
  },
4097
- effectiveTiers.map((tier) => /* @__PURE__ */ React18.createElement("span", { key: tier, style: pillStyle(tier) }, TIER_LABELS[tier][layout]))
4168
+ effectiveTiers.map((tier) => {
4169
+ const { label, Icon } = TIER_INFO[tier];
4170
+ return /* @__PURE__ */ React18.createElement("span", { key: tier, style: itemStyle(tier) }, /* @__PURE__ */ React18.createElement(Icon, { size: sizeStyle.iconSize }), !iconOnly && /* @__PURE__ */ React18.createElement("span", null, label));
4171
+ })
4098
4172
  );
4099
4173
  }
4100
4174
 
4175
+ // src/CompassCoverageCallout.jsx
4176
+ import React19, { useState as useState10 } from "react";
4177
+ var TIER_LABELS = {
4178
+ federal: "federal",
4179
+ state: "state",
4180
+ local: "local"
4181
+ };
4182
+ function CompassCoverageCallout({
4183
+ tier,
4184
+ count,
4185
+ totalSelected,
4186
+ compassUrl,
4187
+ onDismiss
4188
+ }) {
4189
+ const [dismissed, setDismissed] = useState10(false);
4190
+ if (dismissed) return null;
4191
+ const tierLabel = TIER_LABELS[tier] || tier;
4192
+ const tierStyle = tierColors[tier] || tierColors.federal;
4193
+ const containerStyle2 = {
4194
+ display: "flex",
4195
+ alignItems: "flex-start",
4196
+ gap: spacing[3],
4197
+ padding: `${spacing[3]} ${spacing[4]}`,
4198
+ borderLeft: `4px solid ${tierStyle.text}`,
4199
+ backgroundColor: tierStyle.bg,
4200
+ borderRadius: `0 ${borderRadius.md} ${borderRadius.md} 0`,
4201
+ fontFamily: fonts.primary,
4202
+ margin: `${spacing[3]} 0`
4203
+ };
4204
+ const textStyle = {
4205
+ flex: 1,
4206
+ fontSize: fontSizes.sm,
4207
+ color: "#2d3748",
4208
+ lineHeight: 1.5
4209
+ };
4210
+ const headlineStyle = {
4211
+ fontWeight: fontWeights.semibold,
4212
+ marginBottom: spacing[1],
4213
+ color: tierStyle.text
4214
+ };
4215
+ const ctaStyle = {
4216
+ display: "inline-block",
4217
+ marginTop: spacing[2],
4218
+ padding: `${spacing[2]} ${spacing[4]}`,
4219
+ backgroundColor: tierStyle.text,
4220
+ color: "#ffffff",
4221
+ borderRadius: borderRadius.full,
4222
+ fontSize: fontSizes.sm,
4223
+ fontWeight: fontWeights.semibold,
4224
+ textDecoration: "none",
4225
+ cursor: "pointer"
4226
+ };
4227
+ const closeStyle = {
4228
+ background: "none",
4229
+ border: "none",
4230
+ padding: spacing[1],
4231
+ cursor: "pointer",
4232
+ color: "#718096",
4233
+ fontSize: fontSizes.lg,
4234
+ lineHeight: 1
4235
+ };
4236
+ const handleDismiss = () => {
4237
+ setDismissed(true);
4238
+ if (onDismiss) onDismiss();
4239
+ };
4240
+ return /* @__PURE__ */ React19.createElement(
4241
+ "div",
4242
+ {
4243
+ className: "ev-compass-coverage-callout",
4244
+ role: "status",
4245
+ style: containerStyle2
4246
+ },
4247
+ /* @__PURE__ */ React19.createElement("div", { style: textStyle }, /* @__PURE__ */ React19.createElement("div", { style: headlineStyle }, "Your compass covers ", tierLabel, " issues lightly"), /* @__PURE__ */ React19.createElement("div", null, count === 0 ? `None of your ${totalSelected != null ? totalSelected : "selected"} compass topics apply at the ${tierLabel} level. ` : `Only ${count} of your ${totalSelected != null ? totalSelected : "selected"} compass topics apply at the ${tierLabel} level. `, "Add more ", tierLabel, "-applicable topics to get better comparisons with ", tierLabel, " officials."), /* @__PURE__ */ React19.createElement("a", { href: compassUrl, style: ctaStyle }, "Add ", tierLabel, " topics \u2192")),
4248
+ onDismiss !== void 0 && /* @__PURE__ */ React19.createElement(
4249
+ "button",
4250
+ {
4251
+ onClick: handleDismiss,
4252
+ style: closeStyle,
4253
+ "aria-label": "Dismiss coverage callout"
4254
+ },
4255
+ "\xD7"
4256
+ )
4257
+ );
4258
+ }
4259
+
4260
+ // src/ExpandCompassNudge.jsx
4261
+ import React20 from "react";
4262
+ function ExpandCompassNudge({
4263
+ politicianName,
4264
+ missingCount,
4265
+ compassUrl,
4266
+ style = {}
4267
+ }) {
4268
+ if (!missingCount || missingCount <= 0) return null;
4269
+ const containerStyle2 = {
4270
+ display: "flex",
4271
+ flexDirection: "column",
4272
+ alignItems: "flex-start",
4273
+ gap: spacing[2],
4274
+ padding: spacing[4],
4275
+ marginTop: spacing[4],
4276
+ backgroundColor: "#F5F9FA",
4277
+ borderRadius: borderRadius.lg,
4278
+ border: "1px solid #e0e6eb",
4279
+ fontFamily: fonts.primary,
4280
+ ...style
4281
+ };
4282
+ const headlineStyle = {
4283
+ fontSize: fontSizes.base,
4284
+ fontWeight: fontWeights.semibold,
4285
+ color: "#2d3748",
4286
+ margin: 0
4287
+ };
4288
+ const bodyStyle = {
4289
+ fontSize: fontSizes.sm,
4290
+ color: "#4a5568",
4291
+ lineHeight: 1.5,
4292
+ margin: 0
4293
+ };
4294
+ const ctaStyle = {
4295
+ display: "inline-block",
4296
+ marginTop: spacing[2],
4297
+ padding: `${spacing[2]} ${spacing[4]}`,
4298
+ backgroundColor: "#00657c",
4299
+ color: "#ffffff",
4300
+ borderRadius: borderRadius.full,
4301
+ fontSize: fontSizes.sm,
4302
+ fontWeight: fontWeights.semibold,
4303
+ textDecoration: "none",
4304
+ cursor: "pointer"
4305
+ };
4306
+ const topicsLabel = missingCount === 1 ? "topic" : "topics";
4307
+ const speakerName = politicianName || "This politician";
4308
+ return /* @__PURE__ */ React20.createElement("div", { className: "ev-expand-compass-nudge", style: containerStyle2, role: "region" }, /* @__PURE__ */ React20.createElement("p", { style: headlineStyle }, "Want a richer comparison?"), /* @__PURE__ */ React20.createElement("p", { style: bodyStyle }, speakerName, " has stances on ", missingCount, " more ", topicsLabel, " you haven't answered yet. Expand your compass to see where you stand on all of them."), /* @__PURE__ */ React20.createElement("a", { href: compassUrl, style: ctaStyle }, "Expand my compass \u2192"));
4309
+ }
4310
+
4311
+ // src/computeTierCoverage.js
4312
+ function computeTierCoverage(topics) {
4313
+ const counts = { federal: 0, state: 0, local: 0 };
4314
+ if (!Array.isArray(topics)) return counts;
4315
+ for (const t of topics) {
4316
+ if (!t) continue;
4317
+ const hasFlags = "applies_federal" in t || "applies_state" in t || "applies_local" in t;
4318
+ const f = hasFlags ? Boolean(t.applies_federal) : true;
4319
+ const s = hasFlags ? Boolean(t.applies_state) : true;
4320
+ const l = hasFlags ? Boolean(t.applies_local) : true;
4321
+ if (f) counts.federal++;
4322
+ if (s) counts.state++;
4323
+ if (l) counts.local++;
4324
+ }
4325
+ return counts;
4326
+ }
4327
+
4101
4328
  // src/StanceAccordion.jsx
4102
- import React20, { useState as useState10, useRef as useRef3, useCallback, useEffect as useEffect6 } from "react";
4329
+ import React22, { useState as useState11, useRef as useRef3, useCallback, useEffect as useEffect6 } from "react";
4103
4330
 
4104
4331
  // src/Favicon.jsx
4105
- import React19 from "react";
4332
+ import React21 from "react";
4106
4333
  function Favicon({ url, size = 16 }) {
4107
4334
  try {
4108
4335
  const domain = new URL(url).hostname;
4109
- return /* @__PURE__ */ React19.createElement(
4336
+ return /* @__PURE__ */ React21.createElement(
4110
4337
  "img",
4111
4338
  {
4112
4339
  src: `https://www.google.com/s2/favicons?sz=${size}&domain=${domain}`,
@@ -4117,7 +4344,7 @@ function Favicon({ url, size = 16 }) {
4117
4344
  }
4118
4345
  );
4119
4346
  } catch {
4120
- return /* @__PURE__ */ React19.createElement(
4347
+ return /* @__PURE__ */ React21.createElement(
4121
4348
  "svg",
4122
4349
  {
4123
4350
  width: size,
@@ -4128,8 +4355,8 @@ function Favicon({ url, size = 16 }) {
4128
4355
  strokeWidth: "1.5",
4129
4356
  style: { verticalAlign: "middle", flexShrink: 0 }
4130
4357
  },
4131
- /* @__PURE__ */ React19.createElement("circle", { cx: "12", cy: "12", r: "10" }),
4132
- /* @__PURE__ */ React19.createElement("path", { d: "M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z" })
4358
+ /* @__PURE__ */ React21.createElement("circle", { cx: "12", cy: "12", r: "10" }),
4359
+ /* @__PURE__ */ React21.createElement("path", { d: "M2 12h20M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z" })
4133
4360
  );
4134
4361
  }
4135
4362
  }
@@ -4160,9 +4387,9 @@ function StanceAccordion({
4160
4387
  apiUrl = "https://api.empowered.vote"
4161
4388
  }) {
4162
4389
  var _a;
4163
- const [expandedTopicId, setExpandedTopicId] = useState10(null);
4164
- const [loadingId, setLoadingId] = useState10(null);
4165
- const [showAll, setShowAll] = useState10(false);
4390
+ const [expandedTopicId, setExpandedTopicId] = useState11(null);
4391
+ const [loadingId, setLoadingId] = useState11(null);
4392
+ const [showAll, setShowAll] = useState11(false);
4166
4393
  const contextCache = useRef3(/* @__PURE__ */ new Map());
4167
4394
  const quotesCache = useRef3(null);
4168
4395
  const polAnswerMap = {};
@@ -4256,13 +4483,13 @@ function StanceAccordion({
4256
4483
  visibleTopics = [pinned, ...baseTopics.filter((t) => String(t.id) !== String(initialExpandedTopicId))];
4257
4484
  }
4258
4485
  }
4259
- return /* @__PURE__ */ React20.createElement(
4486
+ return /* @__PURE__ */ React22.createElement(
4260
4487
  "div",
4261
4488
  {
4262
4489
  className: "flex flex-col",
4263
4490
  style: { fontFamily: "'Manrope', sans-serif" }
4264
4491
  },
4265
- /* @__PURE__ */ React20.createElement(
4492
+ /* @__PURE__ */ React22.createElement(
4266
4493
  "h3",
4267
4494
  {
4268
4495
  className: "text-sm font-semibold text-neutral-400 uppercase tracking-wider mb-2",
@@ -4284,15 +4511,15 @@ function StanceAccordion({
4284
4511
  if (topic.topic_key) return q.issue === topic.topic_key;
4285
4512
  return topic.short_title && q.issue.toLowerCase() === topic.short_title.toLowerCase();
4286
4513
  }) : [];
4287
- return /* @__PURE__ */ React20.createElement("div", { key: topicId, className: "border-b border-neutral-100" }, /* @__PURE__ */ React20.createElement(
4514
+ return /* @__PURE__ */ React22.createElement("div", { key: topicId, className: "border-b border-neutral-100" }, /* @__PURE__ */ React22.createElement(
4288
4515
  "button",
4289
4516
  {
4290
4517
  type: "button",
4291
4518
  onClick: () => handleToggle(topicId),
4292
4519
  className: "w-full flex items-center justify-between py-3 px-2 text-left cursor-pointer hover:bg-neutral-50 transition-colors"
4293
4520
  },
4294
- /* @__PURE__ */ React20.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ React20.createElement("span", { className: "text-sm font-medium text-neutral-800 truncate" }, topic.short_title), questionText && /* @__PURE__ */ React20.createElement("span", { className: "text-xs text-neutral-400 mt-0.5" }, questionText), /* @__PURE__ */ React20.createElement("span", { className: "text-xs text-neutral-500 mt-0.5" }, label)),
4295
- /* @__PURE__ */ React20.createElement(
4521
+ /* @__PURE__ */ React22.createElement("div", { className: "flex flex-col min-w-0" }, /* @__PURE__ */ React22.createElement("span", { className: "text-sm font-medium text-neutral-800 truncate" }, topic.short_title), questionText && /* @__PURE__ */ React22.createElement("span", { className: "text-xs text-neutral-400 mt-0.5" }, questionText), /* @__PURE__ */ React22.createElement("span", { className: "text-xs text-neutral-500 mt-0.5" }, label)),
4522
+ /* @__PURE__ */ React22.createElement(
4296
4523
  "svg",
4297
4524
  {
4298
4525
  width: "16",
@@ -4309,9 +4536,9 @@ function StanceAccordion({
4309
4536
  transition: "transform 0.2s ease"
4310
4537
  }
4311
4538
  },
4312
- /* @__PURE__ */ React20.createElement("polyline", { points: "9 18 15 12 9 6" })
4539
+ /* @__PURE__ */ React22.createElement("polyline", { points: "9 18 15 12 9 6" })
4313
4540
  )
4314
- ), /* @__PURE__ */ React20.createElement(
4541
+ ), /* @__PURE__ */ React22.createElement(
4315
4542
  "div",
4316
4543
  {
4317
4544
  style: {
@@ -4320,7 +4547,7 @@ function StanceAccordion({
4320
4547
  transition: "grid-template-rows 0.25s ease"
4321
4548
  }
4322
4549
  },
4323
- /* @__PURE__ */ React20.createElement("div", { style: { overflow: "hidden" } }, /* @__PURE__ */ React20.createElement("div", { className: "px-2 pb-4" }, isLoading && /* @__PURE__ */ React20.createElement("div", { className: "flex items-center py-3" }, /* @__PURE__ */ React20.createElement(
4550
+ /* @__PURE__ */ React22.createElement("div", { style: { overflow: "hidden" } }, /* @__PURE__ */ React22.createElement("div", { className: "px-2 pb-4" }, isLoading && /* @__PURE__ */ React22.createElement("div", { className: "flex items-center py-3" }, /* @__PURE__ */ React22.createElement(
4324
4551
  "div",
4325
4552
  {
4326
4553
  style: {
@@ -4332,14 +4559,14 @@ function StanceAccordion({
4332
4559
  animation: "ev-spin 0.8s linear infinite"
4333
4560
  }
4334
4561
  }
4335
- )), !isLoading && cached && /* @__PURE__ */ React20.createElement(React20.Fragment, null, cached.reasoning ? /* @__PURE__ */ React20.createElement(
4562
+ )), !isLoading && cached && /* @__PURE__ */ React22.createElement(React22.Fragment, null, cached.reasoning ? /* @__PURE__ */ React22.createElement(
4336
4563
  "p",
4337
4564
  {
4338
4565
  className: "text-sm text-neutral-700 mb-3",
4339
4566
  style: { whiteSpace: "pre-wrap", lineHeight: 1.6 }
4340
4567
  },
4341
4568
  cached.reasoning
4342
- ) : null, cached.sources && cached.sources.length > 0 && /* @__PURE__ */ React20.createElement("div", { className: "mt-2" }, /* @__PURE__ */ React20.createElement("p", { className: "text-xs font-semibold text-neutral-500 uppercase tracking-wider mb-1.5" }, "References"), /* @__PURE__ */ React20.createElement("ol", { className: "list-decimal list-inside space-y-1" }, cached.sources.map((src, i) => /* @__PURE__ */ React20.createElement("li", { key: i, className: "text-xs text-neutral-600" }, /* @__PURE__ */ React20.createElement(
4569
+ ) : null, cached.sources && cached.sources.length > 0 && /* @__PURE__ */ React22.createElement("div", { className: "mt-2" }, /* @__PURE__ */ React22.createElement("p", { className: "text-xs font-semibold text-neutral-500 uppercase tracking-wider mb-1.5" }, "References"), /* @__PURE__ */ React22.createElement("ol", { className: "list-decimal list-inside space-y-1" }, cached.sources.map((src, i) => /* @__PURE__ */ React22.createElement("li", { key: i, className: "text-xs text-neutral-600" }, /* @__PURE__ */ React22.createElement(
4343
4570
  "a",
4344
4571
  {
4345
4572
  href: src,
@@ -4347,9 +4574,9 @@ function StanceAccordion({
4347
4574
  rel: "noreferrer",
4348
4575
  className: "inline-flex items-center gap-1.5 hover:text-[#00657c] transition-colors"
4349
4576
  },
4350
- /* @__PURE__ */ React20.createElement(Favicon, { url: src }),
4351
- /* @__PURE__ */ React20.createElement("span", { className: "underline underline-offset-2" }, getDisplayUrl(src))
4352
- ))))), topicQuotes.length > 0 && /* @__PURE__ */ React20.createElement("div", { style: { marginTop: "12px" } }, /* @__PURE__ */ React20.createElement(
4577
+ /* @__PURE__ */ React22.createElement(Favicon, { url: src }),
4578
+ /* @__PURE__ */ React22.createElement("span", { className: "underline underline-offset-2" }, getDisplayUrl(src))
4579
+ ))))), topicQuotes.length > 0 && /* @__PURE__ */ React22.createElement("div", { style: { marginTop: "12px" } }, /* @__PURE__ */ React22.createElement(
4353
4580
  "p",
4354
4581
  {
4355
4582
  style: {
@@ -4366,7 +4593,7 @@ function StanceAccordion({
4366
4593
  const verdict = verdictsByQuote ? verdictsByQuote[quote.id] : void 0;
4367
4594
  const borderColor = verdict === "agreed" ? "#0e7490" : verdict === "disagreed" ? "#b45309" : "#e2e8f0";
4368
4595
  const sourceName = quote.source_name || quote.sourceName;
4369
- return /* @__PURE__ */ React20.createElement(
4596
+ return /* @__PURE__ */ React22.createElement(
4370
4597
  "div",
4371
4598
  {
4372
4599
  key: quote.id,
@@ -4378,7 +4605,7 @@ function StanceAccordion({
4378
4605
  marginBottom: "8px"
4379
4606
  }
4380
4607
  },
4381
- /* @__PURE__ */ React20.createElement(
4608
+ /* @__PURE__ */ React22.createElement(
4382
4609
  "p",
4383
4610
  {
4384
4611
  style: {
@@ -4391,7 +4618,7 @@ function StanceAccordion({
4391
4618
  },
4392
4619
  quote.text
4393
4620
  ),
4394
- verdict === "agreed" && /* @__PURE__ */ React20.createElement(
4621
+ verdict === "agreed" && /* @__PURE__ */ React22.createElement(
4395
4622
  "span",
4396
4623
  {
4397
4624
  style: {
@@ -4408,10 +4635,10 @@ function StanceAccordion({
4408
4635
  flexShrink: 0
4409
4636
  }
4410
4637
  },
4411
- /* @__PURE__ */ React20.createElement("svg", { width: "11", height: "11", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React20.createElement("path", { d: "M5 13l4 4L19 7" })),
4638
+ /* @__PURE__ */ React22.createElement("svg", { width: "11", height: "11", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React22.createElement("path", { d: "M5 13l4 4L19 7" })),
4412
4639
  "Agreed"
4413
4640
  ),
4414
- verdict === "disagreed" && /* @__PURE__ */ React20.createElement(
4641
+ verdict === "disagreed" && /* @__PURE__ */ React22.createElement(
4415
4642
  "span",
4416
4643
  {
4417
4644
  style: {
@@ -4428,10 +4655,10 @@ function StanceAccordion({
4428
4655
  flexShrink: 0
4429
4656
  }
4430
4657
  },
4431
- /* @__PURE__ */ React20.createElement("svg", { width: "11", height: "11", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React20.createElement("path", { d: "M6 18L18 6M6 6l12 12" })),
4658
+ /* @__PURE__ */ React22.createElement("svg", { width: "11", height: "11", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2.5, strokeLinecap: "round", strokeLinejoin: "round" }, /* @__PURE__ */ React22.createElement("path", { d: "M6 18L18 6M6 6l12 12" })),
4432
4659
  "Disagreed"
4433
4660
  ),
4434
- sourceName && /* @__PURE__ */ React20.createElement(
4661
+ sourceName && /* @__PURE__ */ React22.createElement(
4435
4662
  "a",
4436
4663
  {
4437
4664
  href: quote.source_url || quote.sourceUrl,
@@ -4448,10 +4675,10 @@ function StanceAccordion({
4448
4675
  sourceName
4449
4676
  )
4450
4677
  );
4451
- })), !cached.reasoning && (!cached.sources || cached.sources.length === 0) && topicQuotes.length === 0 && /* @__PURE__ */ React20.createElement("p", { className: "text-sm text-neutral-400 italic py-2" }, "No detailed reasoning available for this topic."))))
4678
+ })), !cached.reasoning && (!cached.sources || cached.sources.length === 0) && topicQuotes.length === 0 && /* @__PURE__ */ React22.createElement("p", { className: "text-sm text-neutral-400 italic py-2" }, "No detailed reasoning available for this topic."))))
4452
4679
  ));
4453
4680
  }),
4454
- hasToggle && /* @__PURE__ */ React20.createElement(
4681
+ hasToggle && /* @__PURE__ */ React22.createElement(
4455
4682
  "button",
4456
4683
  {
4457
4684
  type: "button",
@@ -4465,9 +4692,9 @@ function StanceAccordion({
4465
4692
  }
4466
4693
 
4467
4694
  // src/icons.js
4468
- import React21 from "react";
4695
+ import React23 from "react";
4469
4696
  function BallotIcon({ size = 16, color = "currentColor" }) {
4470
- return /* @__PURE__ */ React21.createElement(
4697
+ return /* @__PURE__ */ React23.createElement(
4471
4698
  "svg",
4472
4699
  {
4473
4700
  width: size,
@@ -4480,13 +4707,13 @@ function BallotIcon({ size = 16, color = "currentColor" }) {
4480
4707
  strokeLinejoin: "round",
4481
4708
  xmlns: "http://www.w3.org/2000/svg"
4482
4709
  },
4483
- /* @__PURE__ */ React21.createElement("path", { d: "m9 12 2 2 4-4" }),
4484
- /* @__PURE__ */ React21.createElement("path", { d: "M5 7c0-1.1.9-2 2-2h10a2 2 0 0 1 2 2v12H5V7Z" }),
4485
- /* @__PURE__ */ React21.createElement("path", { d: "M22 19H2" })
4710
+ /* @__PURE__ */ React23.createElement("path", { d: "m9 12 2 2 4-4" }),
4711
+ /* @__PURE__ */ React23.createElement("path", { d: "M5 7c0-1.1.9-2 2-2h10a2 2 0 0 1 2 2v12H5V7Z" }),
4712
+ /* @__PURE__ */ React23.createElement("path", { d: "M22 19H2" })
4486
4713
  );
4487
4714
  }
4488
4715
  function CompassIcon({ size = 16, color = "currentColor" }) {
4489
- return /* @__PURE__ */ React21.createElement(
4716
+ return /* @__PURE__ */ React23.createElement(
4490
4717
  "svg",
4491
4718
  {
4492
4719
  width: size,
@@ -4499,27 +4726,27 @@ function CompassIcon({ size = 16, color = "currentColor" }) {
4499
4726
  strokeLinejoin: "round",
4500
4727
  xmlns: "http://www.w3.org/2000/svg"
4501
4728
  },
4502
- /* @__PURE__ */ React21.createElement("circle", { cx: "12", cy: "12", r: "10" }),
4503
- /* @__PURE__ */ React21.createElement("path", { d: "m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z" })
4729
+ /* @__PURE__ */ React23.createElement("circle", { cx: "12", cy: "12", r: "10" }),
4730
+ /* @__PURE__ */ React23.createElement("path", { d: "m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z" })
4504
4731
  );
4505
4732
  }
4506
4733
  function BranchIcon({ size = 16, color = "currentColor", branch }) {
4507
4734
  let paths;
4508
4735
  switch (branch) {
4509
4736
  case "executive":
4510
- paths = /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement("path", { d: "M3 21h18" }), /* @__PURE__ */ React21.createElement("path", { d: "M5 21V7l8-4v18" }), /* @__PURE__ */ React21.createElement("path", { d: "M19 21V11l-6-4" }), /* @__PURE__ */ React21.createElement("path", { d: "M9 9v.01" }), /* @__PURE__ */ React21.createElement("path", { d: "M9 12v.01" }), /* @__PURE__ */ React21.createElement("path", { d: "M9 15v.01" }), /* @__PURE__ */ React21.createElement("path", { d: "M9 18v.01" }), /* @__PURE__ */ React21.createElement("path", { d: "M5 21h14" }), /* @__PURE__ */ React21.createElement("line", { x1: "13", y1: "5", x2: "13", y2: "3" }), /* @__PURE__ */ React21.createElement("line", { x1: "13", y1: "3", x2: "15", y2: "4" }));
4737
+ paths = /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement("path", { d: "M3 21h18" }), /* @__PURE__ */ React23.createElement("path", { d: "M5 21V7l8-4v18" }), /* @__PURE__ */ React23.createElement("path", { d: "M19 21V11l-6-4" }), /* @__PURE__ */ React23.createElement("path", { d: "M9 9v.01" }), /* @__PURE__ */ React23.createElement("path", { d: "M9 12v.01" }), /* @__PURE__ */ React23.createElement("path", { d: "M9 15v.01" }), /* @__PURE__ */ React23.createElement("path", { d: "M9 18v.01" }), /* @__PURE__ */ React23.createElement("path", { d: "M5 21h14" }), /* @__PURE__ */ React23.createElement("line", { x1: "13", y1: "5", x2: "13", y2: "3" }), /* @__PURE__ */ React23.createElement("line", { x1: "13", y1: "3", x2: "15", y2: "4" }));
4511
4738
  break;
4512
4739
  case "legislative":
4513
- paths = /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement("path", { d: "M8 21h12a2 2 0 0 0 2-2v-2H10v2a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v3h4" }), /* @__PURE__ */ React21.createElement("path", { d: "M19 17V5a2 2 0 0 0-2-2H4" }), /* @__PURE__ */ React21.createElement("path", { d: "M15 8h-5" }), /* @__PURE__ */ React21.createElement("path", { d: "M15 12h-5" }));
4740
+ paths = /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement("path", { d: "M8 21h12a2 2 0 0 0 2-2v-2H10v2a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v3h4" }), /* @__PURE__ */ React23.createElement("path", { d: "M19 17V5a2 2 0 0 0-2-2H4" }), /* @__PURE__ */ React23.createElement("path", { d: "M15 8h-5" }), /* @__PURE__ */ React23.createElement("path", { d: "M15 12h-5" }));
4514
4741
  break;
4515
4742
  case "judicial":
4516
- paths = /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement("path", { d: "M12 3v19" }), /* @__PURE__ */ React21.createElement("path", { d: "M5 8l7-5 7 5" }), /* @__PURE__ */ React21.createElement("path", { d: "M3 13l2-5 2 5a3 3 0 0 1-4 0z" }), /* @__PURE__ */ React21.createElement("path", { d: "M17 13l2-5 2 5a3 3 0 0 1-4 0z" }), /* @__PURE__ */ React21.createElement("path", { d: "M8 21h8" }));
4743
+ paths = /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement("path", { d: "M12 3v19" }), /* @__PURE__ */ React23.createElement("path", { d: "M5 8l7-5 7 5" }), /* @__PURE__ */ React23.createElement("path", { d: "M3 13l2-5 2 5a3 3 0 0 1-4 0z" }), /* @__PURE__ */ React23.createElement("path", { d: "M17 13l2-5 2 5a3 3 0 0 1-4 0z" }), /* @__PURE__ */ React23.createElement("path", { d: "M8 21h8" }));
4517
4744
  break;
4518
4745
  default:
4519
- paths = /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement("path", { d: "M10 18v-7" }), /* @__PURE__ */ React21.createElement("path", { d: "M11.12 2.198a2 2 0 0 1 1.76.006l7.866 3.847c.476.233.31.949-.22.949H3.474c-.53 0-.695-.716-.22-.949z" }), /* @__PURE__ */ React21.createElement("path", { d: "M14 18v-7" }), /* @__PURE__ */ React21.createElement("path", { d: "M18 18v-7" }), /* @__PURE__ */ React21.createElement("path", { d: "M3 22h18" }), /* @__PURE__ */ React21.createElement("path", { d: "M6 18v-7" }));
4746
+ paths = /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement("path", { d: "M10 18v-7" }), /* @__PURE__ */ React23.createElement("path", { d: "M11.12 2.198a2 2 0 0 1 1.76.006l7.866 3.847c.476.233.31.949-.22.949H3.474c-.53 0-.695-.716-.22-.949z" }), /* @__PURE__ */ React23.createElement("path", { d: "M14 18v-7" }), /* @__PURE__ */ React23.createElement("path", { d: "M18 18v-7" }), /* @__PURE__ */ React23.createElement("path", { d: "M3 22h18" }), /* @__PURE__ */ React23.createElement("path", { d: "M6 18v-7" }));
4520
4747
  break;
4521
4748
  }
4522
- return /* @__PURE__ */ React21.createElement(
4749
+ return /* @__PURE__ */ React23.createElement(
4523
4750
  "svg",
4524
4751
  {
4525
4752
  width: size,
@@ -4541,7 +4768,9 @@ export {
4541
4768
  BranchIcon,
4542
4769
  CategorySection,
4543
4770
  CommitteeTable,
4771
+ CompassCoverageCallout,
4544
4772
  CompassIcon,
4773
+ ExpandCompassNudge,
4545
4774
  FilterSidebar,
4546
4775
  GovernmentBodySection,
4547
4776
  Header,
@@ -4563,6 +4792,7 @@ export {
4563
4792
  breakpoints,
4564
4793
  colorScales,
4565
4794
  colors,
4795
+ computeTierCoverage,
4566
4796
  dataVizPalette,
4567
4797
  defaultCtaButton,
4568
4798
  defaultNavItems,