paneltir 0.8.0 → 0.9.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.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // src/version.ts
2
- var PANELTIR_VERSION = "0.8.0";
3
- var PANELTIR_FINGERPRINT = "sha256:a252ef2a015240e0e8463c0ebb0ef7a8af80ad7ade66f2c48e71657500d506d5";
4
- var PANELTIR_FILE_COUNT = 153;
2
+ var PANELTIR_VERSION = "0.9.0";
3
+ var PANELTIR_FINGERPRINT = "sha256:f65d491a7350ddce22f6981dbcb91531f5e88fc66b7f9f8f83115d802773064f";
4
+ var PANELTIR_FILE_COUNT = 161;
5
5
  var paneltirBuild = {
6
6
  version: PANELTIR_VERSION,
7
7
  fingerprint: PANELTIR_FINGERPRINT,
@@ -667,9 +667,9 @@ function GuideTour({ notes, dismissed, onDismiss }) {
667
667
  useEffect4(() => {
668
668
  setReady(true);
669
669
  }, []);
670
- if (!ready && !controlled) return null;
670
+ if (!ready) return null;
671
671
  void version;
672
- const isDone = controlled ? (id) => dismissed.includes(id) : (id) => readDismissed(id);
672
+ const isDone = controlled ? (id) => dismissed.includes(id) || readDismissed(id) : (id) => readDismissed(id);
673
673
  const remaining = notes.filter((note) => !isDone(note.id));
674
674
  const current = remaining[0];
675
675
  if (!current) return null;
@@ -679,7 +679,7 @@ function GuideTour({ notes, dismissed, onDismiss }) {
679
679
  ...current,
680
680
  key: current.id,
681
681
  step: { index: notes.length - remaining.length + 1, total: notes.length },
682
- remember: !controlled,
682
+ remember: true,
683
683
  onDismissed: () => {
684
684
  onDismiss?.(current.id);
685
685
  setVersion((v) => v + 1);
@@ -720,9 +720,9 @@ function NotificationBell({ notifications, labels, seen: given, onSeen }) {
720
720
  const [open, setOpen] = useState3(false);
721
721
  const root = useRef4(null);
722
722
  useEffect5(() => {
723
- if (!controlled) setStored(readSeen());
724
- }, [controlled]);
725
- const seen = controlled ? new Set(given) : stored;
723
+ setStored(readSeen());
724
+ }, []);
725
+ const seen = stored === null ? controlled ? new Set(given) : null : controlled ? /* @__PURE__ */ new Set([...given, ...stored]) : stored;
726
726
  useEffect5(() => {
727
727
  if (!open) return;
728
728
  const onDown = (e) => {
@@ -740,10 +740,7 @@ function NotificationBell({ notifications, labels, seen: given, onSeen }) {
740
740
  }, [open]);
741
741
  const markSeen = useCallback3(
742
742
  (ids) => {
743
- if (controlled) {
744
- onSeen?.(ids);
745
- return;
746
- }
743
+ if (controlled) onSeen?.(ids);
747
744
  setStored((current) => {
748
745
  const next = new Set(current ?? []);
749
746
  for (const id of ids) next.add(id);
@@ -913,6 +910,89 @@ function SetupGuide({ requirements, readyMessage, labels }) {
913
910
  ] });
914
911
  }
915
912
 
913
+ // src/components/Setup/SetupWizard.tsx
914
+ import { useState as useState5 } from "react";
915
+
916
+ // src/components/Setup/wizard.ts
917
+ function wizardStep(requirements) {
918
+ const total = requirements.length;
919
+ const done = requirements.filter((requirement) => requirement.status === "ok");
920
+ const unknown = requirements.some((requirement) => requirement.status === "unknown");
921
+ const at = requirements.findIndex((requirement) => requirement.status !== "ok");
922
+ if (at === -1) {
923
+ return { current: null, index: 0, total, done, ready: total > 0, unknown: false };
924
+ }
925
+ return {
926
+ current: requirements[at],
927
+ index: at + 1,
928
+ total,
929
+ done,
930
+ ready: false,
931
+ unknown
932
+ };
933
+ }
934
+ function isFirstRun(board) {
935
+ return (board.cards?.length ?? 0) === 0 && (board.runs?.length ?? 0) === 0;
936
+ }
937
+
938
+ // src/components/Setup/SetupWizard.tsx
939
+ import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
940
+ function SetupWizard({ requirements, labels, onCheck, onClose }) {
941
+ const step = wizardStep(requirements);
942
+ const [checking, setChecking] = useState5(false);
943
+ const [checked, setChecked] = useState5(false);
944
+ const [copied, setCopied] = useState5(false);
945
+ async function check() {
946
+ setChecking(true);
947
+ try {
948
+ await onCheck();
949
+ setChecked(true);
950
+ } finally {
951
+ setChecking(false);
952
+ }
953
+ }
954
+ async function copyPrompt() {
955
+ try {
956
+ await navigator.clipboard.writeText(labels.stuckPrompt);
957
+ setCopied(true);
958
+ window.setTimeout(() => setCopied(false), 2e3);
959
+ } catch {
960
+ }
961
+ }
962
+ return /* @__PURE__ */ jsxs14("section", { className: "pt-wizard", "aria-labelledby": "pt-wizard-title", children: [
963
+ /* @__PURE__ */ jsxs14("header", { className: "pt-wizard__head", children: [
964
+ /* @__PURE__ */ jsx16("h2", { className: "pt-h2", id: "pt-wizard-title", children: labels.title }),
965
+ step.current && /* @__PURE__ */ jsx16("p", { className: "pt-wizard__progress", children: labels.progress(step.index, step.total) })
966
+ ] }),
967
+ step.current ? /* @__PURE__ */ jsxs14("div", { className: "pt-wizard__step", children: [
968
+ /* @__PURE__ */ jsx16("p", { className: "pt-wizard__now", children: labels.nowDo }),
969
+ /* @__PURE__ */ jsx16("h3", { className: "pt-wizard__label", children: step.current.label }),
970
+ step.current.variable && /* @__PURE__ */ jsx16("p", { className: "pt-wizard__var", children: step.current.variable }),
971
+ step.current.enables && /* @__PURE__ */ jsx16("p", { className: "pt-wizard__enables", children: step.current.enables }),
972
+ step.current.fix && /* @__PURE__ */ jsx16("div", { className: "pt-wizard__fix", children: step.current.fix }),
973
+ /* @__PURE__ */ jsxs14("div", { className: "pt-wizard__actions", children: [
974
+ /* @__PURE__ */ jsx16("button", { type: "button", className: "pt-btn pt-btn--primary", onClick: check, disabled: checking, children: checking ? labels.checking : labels.check }),
975
+ checked && !checking && /* @__PURE__ */ jsx16("p", { className: "pt-wizard__said", children: step.unknown ? labels.cannotTell : labels.stillMissing })
976
+ ] })
977
+ ] }) : /* @__PURE__ */ jsxs14("div", { className: "pt-wizard__step pt-wizard__step--done", children: [
978
+ /* @__PURE__ */ jsx16("h3", { className: "pt-wizard__label", children: labels.readyTitle }),
979
+ /* @__PURE__ */ jsx16("p", { className: "pt-wizard__enables", children: labels.readyBody }),
980
+ /* @__PURE__ */ jsx16("ol", { className: "pt-wizard__verify", children: labels.verify.map((line) => /* @__PURE__ */ jsx16("li", { children: line }, line)) })
981
+ ] }),
982
+ step.done.length > 0 && /* @__PURE__ */ jsxs14("div", { className: "pt-wizard__done", children: [
983
+ /* @__PURE__ */ jsx16("p", { className: "pt-wizard__done-title", children: labels.doneTitle }),
984
+ /* @__PURE__ */ jsx16("ul", { children: step.done.map((requirement) => /* @__PURE__ */ jsx16("li", { children: requirement.label }, requirement.id)) })
985
+ ] }),
986
+ /* @__PURE__ */ jsxs14("div", { className: "pt-wizard__stuck", children: [
987
+ /* @__PURE__ */ jsx16("p", { className: "pt-wizard__done-title", children: labels.stuckTitle }),
988
+ /* @__PURE__ */ jsx16("p", { className: "pt-wizard__enables", children: labels.stuckBody }),
989
+ /* @__PURE__ */ jsx16("pre", { className: "pt-wizard__prompt", children: labels.stuckPrompt }),
990
+ /* @__PURE__ */ jsx16("button", { type: "button", className: "pt-btn pt-btn--sm", onClick: copyPrompt, children: copied ? labels.copied : labels.copy })
991
+ ] }),
992
+ onClose && /* @__PURE__ */ jsx16("div", { className: "pt-wizard__actions", children: /* @__PURE__ */ jsx16("button", { type: "button", className: "pt-btn pt-btn--sm", onClick: onClose, children: labels.close }) })
993
+ ] });
994
+ }
995
+
916
996
  // src/hooks/useDelegatedClick.ts
917
997
  import { useEffect as useEffect7 } from "react";
918
998
  function useDelegatedClick(attribute, handler) {
@@ -932,9 +1012,9 @@ function useDelegatedClick(attribute, handler) {
932
1012
  }
933
1013
 
934
1014
  // src/hooks/useMediaQuery.ts
935
- import { useEffect as useEffect8, useState as useState5 } from "react";
1015
+ import { useEffect as useEffect8, useState as useState6 } from "react";
936
1016
  function useMediaQuery(query) {
937
- const [matches, setMatches] = useState5(() => typeof window !== "undefined" ? window.matchMedia(query).matches : false);
1017
+ const [matches, setMatches] = useState6(() => typeof window !== "undefined" ? window.matchMedia(query).matches : false);
938
1018
  useEffect8(() => {
939
1019
  const mql = window.matchMedia(query);
940
1020
  const handler = () => setMatches(mql.matches);
@@ -1300,10 +1380,34 @@ function isCard(value) {
1300
1380
  }
1301
1381
 
1302
1382
  // src/panel/PanelApp.tsx
1303
- import React12, { useCallback as useCallback5, useEffect as useEffect9, useMemo as useMemo5, useState as useState9 } from "react";
1383
+ import React13, { useCallback as useCallback5, useEffect as useEffect9, useMemo as useMemo5, useState as useState10 } from "react";
1304
1384
 
1305
1385
  // src/panel/updates.ts
1306
1386
  var REGISTRY_URL = "https://registry.npmjs.org/paneltir/latest";
1387
+ function readNotes(value) {
1388
+ if (typeof value !== "object" || value === null) return void 0;
1389
+ const candidate = value;
1390
+ if (typeof candidate.version !== "string" || typeof candidate.date !== "string") return void 0;
1391
+ if (!Array.isArray(candidate.entries) || candidate.entries.length === 0) return void 0;
1392
+ const kinds = /* @__PURE__ */ new Set(["breaking", "feature", "fix", "chore"]);
1393
+ const entries = [];
1394
+ for (const raw of candidate.entries) {
1395
+ if (typeof raw !== "object" || raw === null) return void 0;
1396
+ const item = raw;
1397
+ const text2 = item.text;
1398
+ if (typeof item.kind !== "string" || !kinds.has(item.kind)) return void 0;
1399
+ if (typeof text2?.en !== "string" || typeof text2?.es !== "string") return void 0;
1400
+ entries.push({ kind: item.kind, text: { en: text2.en, es: text2.es } });
1401
+ }
1402
+ return { version: candidate.version, date: candidate.date, entries };
1403
+ }
1404
+ function releaseShape(notes) {
1405
+ if (!notes?.entries.length) return null;
1406
+ for (const kind of ["breaking", "feature", "fix", "chore"]) {
1407
+ if (notes.entries.some((entry) => entry.kind === kind)) return kind;
1408
+ }
1409
+ return null;
1410
+ }
1307
1411
  function isNewer(candidate, current) {
1308
1412
  const parts = (value) => value.trim().replace(/^v/, "").split(/[-+]/)[0].split(".").map((piece) => Number.parseInt(piece, 10));
1309
1413
  const left = parts(candidate);
@@ -1323,7 +1427,7 @@ async function checkForUpdate(current, fetchImpl = fetch) {
1323
1427
  const body = await response.json();
1324
1428
  const latest = typeof body.version === "string" ? body.version : null;
1325
1429
  if (!latest) return null;
1326
- return { current, latest, behind: isNewer(latest, current) };
1430
+ return { current, latest, behind: isNewer(latest, current), notes: readNotes(body.paneltirRelease) };
1327
1431
  } catch {
1328
1432
  return null;
1329
1433
  }
@@ -1358,9 +1462,18 @@ var PRESET_PANEL_THEMES = Object.fromEntries(
1358
1462
  { label: PRESET_LABEL[name], tokens: THEME_PRESETS[name], form: PRESET_FORM[name], note: PRESET_NOTE[name] }
1359
1463
  ])
1360
1464
  );
1465
+ function offeredThemes(themes, extraThemes) {
1466
+ if (themes) return themes;
1467
+ if (!extraThemes) return PRESET_PANEL_THEMES;
1468
+ const offered = { ...extraThemes };
1469
+ for (const [name, preset] of Object.entries(PRESET_PANEL_THEMES)) {
1470
+ if (!(name in offered)) offered[name] = preset;
1471
+ }
1472
+ return offered;
1473
+ }
1361
1474
 
1362
1475
  // src/panel/AnalysisView.tsx
1363
- import { useMemo as useMemo3, useState as useState6 } from "react";
1476
+ import { useMemo as useMemo3, useState as useState7 } from "react";
1364
1477
 
1365
1478
  // src/panel/i18n.ts
1366
1479
  var STORAGE_KEY = "paneltir:lang";
@@ -1398,6 +1511,17 @@ var UI = {
1398
1511
  updateAsOrder: "Write it as an order, not a suggestion",
1399
1512
  updateAsOrderHow: "This does not update anything on its own \u2014 the panel cannot run npm. It decides whether the card it writes asks for the update or instructs it.",
1400
1513
  notifUpdate: "A newer Paneltir has been published",
1514
+ releaseTitle: (version) => `What v${version} changes`,
1515
+ releaseDate: (date) => `Published ${date}`,
1516
+ releaseShape: {
1517
+ breaking: "Contains a change that can break things",
1518
+ feature: "New things, and fixes",
1519
+ fix: "Small fixes",
1520
+ chore: "Housekeeping"
1521
+ },
1522
+ releaseKind: { breaking: "Breaking", feature: "New", fix: "Fix", chore: "Chore" },
1523
+ releaseClose: "Close",
1524
+ releaseNone: "This version was published without notes.",
1401
1525
  updateCardTitle: (version) => `Update Paneltir to v${version}`,
1402
1526
  updateCardBody: (version) => `Run \`npm install paneltir@${version}\` in this project, then check the panel still builds and renders. The version in use is reported by \`paneltirBuild\`, so it can be confirmed rather than assumed.`,
1403
1527
  cardDetail: "Card",
@@ -1480,6 +1604,28 @@ var UI = {
1480
1604
  fixTokenPaste: "Paste it into the hosting project as GH_TOKEN. Never into the repository: a token in a commit is a token to revoke.",
1481
1605
  fixTokenRedeploy: "Redeploy. Environment variables are read at deploy time, so a running deployment will not see a new one.",
1482
1606
  fixRepo: "Set PANEL_REPO in the hosting project to this project\u2019s owner/repo, then redeploy.",
1607
+ wizardTitle: "Setting this panel up",
1608
+ wizardProgress: (index, total) => `Step ${index} of ${total}`,
1609
+ wizardNowDo: "Do this next",
1610
+ wizardCheck: "Check it now",
1611
+ wizardChecking: "Asking the server\u2026",
1612
+ wizardStillMissing: "Still not there. If you have just added it, redeploy \u2014 a running deployment does not see a new variable.",
1613
+ wizardCannotTell: "The panel could not ask its own server, so it cannot say either way. That is a different problem from a missing variable, and worth fixing first.",
1614
+ wizardDoneTitle: "Already in place",
1615
+ wizardReadyTitle: "That is everything.",
1616
+ wizardReadyBody: "Saves will commit to the repository from now on. Two things are worth trying before you trust the door:",
1617
+ wizardVerify: [
1618
+ "Open /admin signed out. It should land on the sign-in screen, not on the panel.",
1619
+ "Signed out, ask for the panel\u2019s own JavaScript bundle. It should answer 401. A page that is protected while its bundle is not leaves the board readable by anyone who opens the HTML."
1620
+ ],
1621
+ wizardClose: "Close",
1622
+ wizardStuckTitle: "If any of this is unclear",
1623
+ wizardStuckBody: "This project has a Claude of its own, and `paneltir init` wrote it a guide covering exactly this. Paste the line below into a session in this repository and it will walk you through it, in whatever detail you need.",
1624
+ wizardStuckPrompt: "Read .claude/skills/panel/SKILL.md and set up the Paneltir panel with me: tell me each environment variable it needs, what it is for, where in this project to put it, and check the ones already set.",
1625
+ wizardCopy: "Copy the prompt",
1626
+ wizardCopied: "Copied",
1627
+ wizardOpen: "Walk me through it",
1628
+ wizardBanner: "This panel is not finished being set up: saving will fail until it is.",
1483
1629
  demoTourWelcomeTitle: "A real panel, and nothing is saved yet",
1484
1630
  demoTourWelcomeBody: "Everything here works. Move things, open things, break things \u2014 nothing is written anywhere yet, so nothing you do can damage anything.",
1485
1631
  demoTourBoardTitle: "Drag a card, then open one",
@@ -1554,6 +1700,20 @@ var UI = {
1554
1700
  strategy: "The paths open to it, the one chosen, and what is worth doing next.",
1555
1701
  market: "Who this is for, and who else is already there."
1556
1702
  },
1703
+ analysisRedo: "Ask for this again",
1704
+ analysisRedoAsked: "Asked for. It lands as a card, and the next session does the work.",
1705
+ analysisRedoTitle: {
1706
+ board: "Read the board again and say what it adds up to",
1707
+ project: "Revisit what this is for and how it is measured",
1708
+ strategy: "Work the strategy again and propose what is next",
1709
+ market: "A fresh market report"
1710
+ },
1711
+ analysisRedoBody: {
1712
+ board: "The board has moved since this was last read. Go through the cards, say what they now add up to, and write the questions worth asking that nobody has asked yet.",
1713
+ project: "Look again at the goals, the constraints and the metrics. Say which no longer match what the project has become, and propose the change rather than making it.",
1714
+ strategy: "Look at the strategies on record, whether the chosen one is still the right one, and what is worth doing next. Propose; the choice stays the owner\u2019s.",
1715
+ market: "Research the market again: who this is for, who else is there now, and what has changed since the last report. Write it into the Market screen."
1716
+ },
1557
1717
  analysisAnswered: (answered, total) => `${answered} of ${total} answered`,
1558
1718
  analysisAllDecided: "Every question on this screen has an answer.",
1559
1719
  choicesTitle: "Standing answers",
@@ -1672,6 +1832,17 @@ var UI = {
1672
1832
  updateAsOrder: "Escribirla como orden, no como sugerencia",
1673
1833
  updateAsOrderHow: "Esto no actualiza nada por su cuenta \u2014 el panel no puede ejecutar npm. Decide si la tarjeta que escribe pide la actualizaci\xF3n o la manda.",
1674
1834
  notifUpdate: "Se ha publicado un Paneltir m\xE1s nuevo",
1835
+ releaseTitle: (version) => `Qu\xE9 cambia la v${version}`,
1836
+ releaseDate: (date) => `Publicada el ${date}`,
1837
+ releaseShape: {
1838
+ breaking: "Trae un cambio que puede romper cosas",
1839
+ feature: "Novedades, y correcciones",
1840
+ fix: "Correcciones menores",
1841
+ chore: "Mantenimiento"
1842
+ },
1843
+ releaseKind: { breaking: "Rompe", feature: "Nuevo", fix: "Arreglo", chore: "Interno" },
1844
+ releaseClose: "Cerrar",
1845
+ releaseNone: "Esta versi\xF3n se public\xF3 sin notas.",
1675
1846
  updateCardTitle: (version) => `Actualizar Paneltir a la v${version}`,
1676
1847
  updateCardBody: (version) => `Ejecuta \`npm install paneltir@${version}\` en este proyecto y comprueba que el panel sigue construy\xE9ndose y dibuj\xE1ndose. La versi\xF3n en uso la reporta \`paneltirBuild\`, as\xED que se puede confirmar en vez de darla por hecha.`,
1677
1848
  cardDetail: "Tarjeta",
@@ -1754,6 +1925,28 @@ var UI = {
1754
1925
  fixTokenPaste: "P\xE9galo en el proyecto de hosting como GH_TOKEN. Nunca en el repositorio: un token en un commit es un token que hay que revocar.",
1755
1926
  fixTokenRedeploy: "Vuelve a desplegar. Las variables de entorno se leen al desplegar, as\xED que un despliegue en marcha no ver\xE1 una nueva.",
1756
1927
  fixRepo: "Pon PANEL_REPO en el proyecto de hosting con el owner/repo de este proyecto, y vuelve a desplegar.",
1928
+ wizardTitle: "Poniendo en marcha este panel",
1929
+ wizardProgress: (index, total) => `Paso ${index} de ${total}`,
1930
+ wizardNowDo: "Haz esto ahora",
1931
+ wizardCheck: "Compru\xE9balo ya",
1932
+ wizardChecking: "Preguntando al servidor\u2026",
1933
+ wizardStillMissing: "Sigue sin estar. Si acabas de ponerlo, vuelve a desplegar \u2014 un despliegue en marcha no ve una variable nueva.",
1934
+ wizardCannotTell: "El panel no pudo preguntarle a su propio servidor, as\xED que no puede decir ni que s\xED ni que no. \xC9se es otro problema distinto a que falte una variable, y merece arreglarse antes.",
1935
+ wizardDoneTitle: "Ya est\xE1 puesto",
1936
+ wizardReadyTitle: "Eso es todo.",
1937
+ wizardReadyBody: "A partir de ahora los guardados se confirman en el repositorio. Dos cosas merecen probarse antes de fiarte de la puerta:",
1938
+ wizardVerify: [
1939
+ "Abre /admin sin sesi\xF3n. Debe llevarte a la pantalla de entrada, no al panel.",
1940
+ "Sin sesi\xF3n, pide el bundle de JavaScript del propio panel. Debe responder 401. Una p\xE1gina protegida cuyo bundle no lo est\xE1 deja el tablero legible para cualquiera que abra el HTML."
1941
+ ],
1942
+ wizardClose: "Cerrar",
1943
+ wizardStuckTitle: "Si algo de esto no queda claro",
1944
+ wizardStuckBody: "Este proyecto tiene su propio Claude, y `paneltir init` le dej\xF3 escrita una gu\xEDa que cubre justo esto. Pega la l\xEDnea de abajo en una sesi\xF3n dentro de este repositorio y te lo ir\xE1 explicando con el detalle que necesites.",
1945
+ wizardStuckPrompt: "Lee .claude/skills/panel/SKILL.md y pon en marcha conmigo el panel de Paneltir: dime cada variable de entorno que necesita, para qu\xE9 sirve, d\xF3nde ponerla en este proyecto, y comprueba las que ya est\xE1n.",
1946
+ wizardCopy: "Copiar el texto",
1947
+ wizardCopied: "Copiado",
1948
+ wizardOpen: "Gu\xEDame paso a paso",
1949
+ wizardBanner: "A este panel le falta terminar de configurarse: guardar fallar\xE1 hasta que lo est\xE9.",
1757
1950
  demoTourWelcomeTitle: "Un panel de verdad, y a\xFAn no se guarda nada",
1758
1951
  demoTourWelcomeBody: "Aqu\xED funciona todo: la empresa de transporte es inventada, el panel no. Mueve cosas, abre cosas, r\xF3mpelas \u2014 no puedes estropear nada.",
1759
1952
  demoTourBoardTitle: "Arrastra una tarjeta, y luego abre una",
@@ -1828,6 +2021,20 @@ var UI = {
1828
2021
  strategy: "Los caminos abiertos, el elegido, y lo que merece la pena hacer ahora.",
1829
2022
  market: "Para qui\xE9n es esto, y qui\xE9n m\xE1s est\xE1 ya ah\xED."
1830
2023
  },
2024
+ analysisRedo: "Pedirlo otra vez",
2025
+ analysisRedoAsked: "Pedido. Cae como tarjeta, y la siguiente sesi\xF3n hace el trabajo.",
2026
+ analysisRedoTitle: {
2027
+ board: "Leer el tablero otra vez y decir qu\xE9 suma",
2028
+ project: "Revisar para qu\xE9 es esto y c\xF3mo se mide",
2029
+ strategy: "Trabajar la estrategia otra vez y proponer qu\xE9 sigue",
2030
+ market: "Un informe de mercado nuevo"
2031
+ },
2032
+ analysisRedoBody: {
2033
+ board: "El tablero se ha movido desde la \xFAltima lectura. Repasa las tarjetas, di qu\xE9 suman ahora, y escribe las preguntas que merecen respuesta y nadie ha hecho.",
2034
+ project: "Mira otra vez los objetivos, las restricciones y las m\xE9tricas. Di cu\xE1les ya no encajan con lo que el proyecto ha llegado a ser, y prop\xF3n el cambio en vez de hacerlo.",
2035
+ strategy: "Mira las estrategias registradas, si la elegida sigue siendo la buena, y qu\xE9 merece la pena hacer ahora. Prop\xF3n; la elecci\xF3n sigue siendo del due\xF1o.",
2036
+ market: "Investiga el mercado otra vez: para qui\xE9n es esto, qui\xE9n m\xE1s est\xE1 ahora, y qu\xE9 ha cambiado desde el \xFAltimo informe. Escr\xEDbelo en la pantalla de Mercado."
2037
+ },
1831
2038
  analysisAnswered: (answered, total) => `${answered} de ${total} contestadas`,
1832
2039
  analysisAllDecided: "Todas las preguntas de esta pantalla tienen respuesta.",
1833
2040
  choicesTitle: "Respuestas fijas",
@@ -1930,7 +2137,7 @@ var UI = {
1930
2137
  };
1931
2138
 
1932
2139
  // src/panel/AnalysisView.tsx
1933
- import { Fragment as Fragment3, jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
2140
+ import { Fragment as Fragment3, jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
1934
2141
  var SUGGESTION_STATUSES = ["new", "doing", "done", "dismissed"];
1935
2142
  function MetricTile({ metric, lang, ui }) {
1936
2143
  const { latest, delta, against } = trendOf(metric);
@@ -1939,23 +2146,23 @@ function MetricTile({ metric, lang, ui }) {
1939
2146
  const height = 34;
1940
2147
  const path = points.map((point) => `${(point.x * width).toFixed(1)},${(point.y * (height - 6) + 3).toFixed(1)}`);
1941
2148
  const last = points[points.length - 1];
1942
- return /* @__PURE__ */ jsxs14("article", { className: "pt-metric", children: [
1943
- /* @__PURE__ */ jsx16("p", { className: "pt-metric__label", children: text(metric.label, lang) }),
1944
- /* @__PURE__ */ jsxs14("p", { className: "pt-metric__value", children: [
2149
+ return /* @__PURE__ */ jsxs15("article", { className: "pt-metric", children: [
2150
+ /* @__PURE__ */ jsx17("p", { className: "pt-metric__label", children: text(metric.label, lang) }),
2151
+ /* @__PURE__ */ jsxs15("p", { className: "pt-metric__value", children: [
1945
2152
  latest ? latest.value : "\u2014",
1946
- /* @__PURE__ */ jsx16("span", { className: "pt-metric__unit", children: metric.unit })
2153
+ /* @__PURE__ */ jsx17("span", { className: "pt-metric__unit", children: metric.unit })
1947
2154
  ] }),
1948
- delta !== null && /* @__PURE__ */ jsxs14("p", { className: `pt-metric__delta${against ? " is-against" : " is-with"}`, children: [
2155
+ delta !== null && /* @__PURE__ */ jsxs15("p", { className: `pt-metric__delta${against ? " is-against" : " is-with"}`, children: [
1949
2156
  delta > 0 ? "\u25B2" : delta < 0 ? "\u25BC" : "\u25A0",
1950
2157
  " ",
1951
2158
  delta > 0 ? "+" : "",
1952
2159
  delta,
1953
- /* @__PURE__ */ jsxs14("span", { className: "pt-metric__since", children: [
2160
+ /* @__PURE__ */ jsxs15("span", { className: "pt-metric__since", children: [
1954
2161
  " \xB7 ",
1955
2162
  against ? ui.metricAgainst : ui.metricWith
1956
2163
  ] })
1957
2164
  ] }),
1958
- points.length > 1 && /* @__PURE__ */ jsxs14(
2165
+ points.length > 1 && /* @__PURE__ */ jsxs15(
1959
2166
  "svg",
1960
2167
  {
1961
2168
  className: "pt-metric__spark",
@@ -1965,12 +2172,12 @@ function MetricTile({ metric, lang, ui }) {
1965
2172
  role: "img",
1966
2173
  "aria-label": `${text(metric.label, lang)}: ${metric.readings.map((r) => `${r.date} ${r.value}`).join(", ")}`,
1967
2174
  children: [
1968
- /* @__PURE__ */ jsx16("polyline", { points: path.join(" "), fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinejoin: "round" }),
1969
- last && /* @__PURE__ */ jsx16("circle", { cx: last.x * width, cy: last.y * (height - 6) + 3, r: "3.5", className: "pt-metric__point" })
2175
+ /* @__PURE__ */ jsx17("polyline", { points: path.join(" "), fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinejoin: "round" }),
2176
+ last && /* @__PURE__ */ jsx17("circle", { cx: last.x * width, cy: last.y * (height - 6) + 3, r: "3.5", className: "pt-metric__point" })
1970
2177
  ]
1971
2178
  }
1972
2179
  ),
1973
- latest?.note && /* @__PURE__ */ jsx16("p", { className: "pt-metric__note", children: text(latest.note, lang) })
2180
+ latest?.note && /* @__PURE__ */ jsx17("p", { className: "pt-metric__note", children: text(latest.note, lang) })
1974
2181
  ] });
1975
2182
  }
1976
2183
  function ChoiceCard({
@@ -1981,11 +2188,11 @@ function ChoiceCard({
1981
2188
  onDecide
1982
2189
  }) {
1983
2190
  const answered = choice.options.find((option) => option.id === choice.value);
1984
- return /* @__PURE__ */ jsxs14("article", { className: `pt-choice${answered ? " is-decided" : ""}`, children: [
1985
- /* @__PURE__ */ jsx16("p", { className: "pt-choice__state", children: answered ? ui.choiceDecidedAt(choice.decidedAt ?? "") : ui.choiceOpen }),
1986
- /* @__PURE__ */ jsx16("p", { className: "pt-choice__question", children: text(choice.question, lang) }),
1987
- choice.why && /* @__PURE__ */ jsx16("p", { className: "pt-choice__why", children: text(choice.why, lang) }),
1988
- /* @__PURE__ */ jsx16("div", { className: "pt-panel-row pt-choice__options", children: choice.options.map((option) => /* @__PURE__ */ jsx16(
2191
+ return /* @__PURE__ */ jsxs15("article", { className: `pt-choice${answered ? " is-decided" : ""}`, children: [
2192
+ /* @__PURE__ */ jsx17("p", { className: "pt-choice__state", children: answered ? ui.choiceDecidedAt(choice.decidedAt ?? "") : ui.choiceOpen }),
2193
+ /* @__PURE__ */ jsx17("p", { className: "pt-choice__question", children: text(choice.question, lang) }),
2194
+ choice.why && /* @__PURE__ */ jsx17("p", { className: "pt-choice__why", children: text(choice.why, lang) }),
2195
+ /* @__PURE__ */ jsx17("div", { className: "pt-panel-row pt-choice__options", children: choice.options.map((option) => /* @__PURE__ */ jsx17(
1989
2196
  FilterChip,
1990
2197
  {
1991
2198
  label: text(option.label, lang),
@@ -1994,8 +2201,8 @@ function ChoiceCard({
1994
2201
  },
1995
2202
  option.id
1996
2203
  )) }),
1997
- answered?.detail && /* @__PURE__ */ jsx16("p", { className: "pt-choice__detail", children: text(answered.detail, lang) }),
1998
- answered && /* @__PURE__ */ jsx16(
2204
+ answered?.detail && /* @__PURE__ */ jsx17("p", { className: "pt-choice__detail", children: text(answered.detail, lang) }),
2205
+ answered && /* @__PURE__ */ jsx17(
1999
2206
  "button",
2000
2207
  {
2001
2208
  type: "button",
@@ -2014,10 +2221,10 @@ function Choices({
2014
2221
  onDecide
2015
2222
  }) {
2016
2223
  const choices = analysis.choices?.[section] ?? [];
2017
- return /* @__PURE__ */ jsxs14("section", { children: [
2018
- /* @__PURE__ */ jsx16("h3", { className: "pt-cap__title", children: ui.choicesTitle }),
2019
- /* @__PURE__ */ jsx16("p", { className: "pt-sub", children: ui.choicesIntro }),
2020
- choices.length === 0 ? /* @__PURE__ */ jsx16("p", { className: "pt-analysis__empty", children: ui.choicesNone }) : /* @__PURE__ */ jsx16("div", { className: "pt-choice-grid", children: choices.map((choice) => /* @__PURE__ */ jsx16(
2224
+ return /* @__PURE__ */ jsxs15("section", { children: [
2225
+ /* @__PURE__ */ jsx17("h3", { className: "pt-cap__title", children: ui.choicesTitle }),
2226
+ /* @__PURE__ */ jsx17("p", { className: "pt-sub", children: ui.choicesIntro }),
2227
+ choices.length === 0 ? /* @__PURE__ */ jsx17("p", { className: "pt-analysis__empty", children: ui.choicesNone }) : /* @__PURE__ */ jsx17("div", { className: "pt-choice-grid", children: choices.map((choice) => /* @__PURE__ */ jsx17(
2021
2228
  ChoiceCard,
2022
2229
  {
2023
2230
  section,
@@ -2040,26 +2247,28 @@ function AnalysisView({
2040
2247
  onChooseStrategy,
2041
2248
  onSuggestionStatus,
2042
2249
  onDecide,
2043
- onOpenCard
2250
+ onOpenCard,
2251
+ onRequestReport
2044
2252
  }) {
2045
2253
  const t = (value) => text(value, lang);
2046
- const [section, setSection] = useState6("board");
2254
+ const [section, setSection] = useState7("board");
2047
2255
  const facts = useMemo3(() => boardFacts(cards, columns, today2), [cards, columns, today2]);
2048
2256
  const answers = useMemo3(() => decided(analysis), [analysis]);
2049
2257
  const open = useMemo3(() => undecided(analysis), [analysis]);
2050
2258
  const total = answers.length + open.length;
2051
2259
  const here = analysis.choices?.[section] ?? [];
2052
2260
  const answeredHere = here.filter((choice) => choice.options.some((option) => option.id === choice.value)).length;
2053
- return /* @__PURE__ */ jsxs14("div", { className: "pt-panel-page pt-panel-section pt-analysis", children: [
2054
- /* @__PURE__ */ jsxs14("section", { children: [
2055
- /* @__PURE__ */ jsx16("p", { className: "pt-eyebrow", children: ui.analysisEyebrow }),
2056
- /* @__PURE__ */ jsx16("h2", { className: "pt-h2", children: ui.analysisSections[section] }),
2057
- /* @__PURE__ */ jsx16("p", { className: "pt-sub", children: ui.analysisSectionHints[section] }),
2058
- /* @__PURE__ */ jsx16("nav", { className: "pt-analysis__nav", "aria-label": ui.analysis, children: ANALYSIS_SECTIONS.map((id) => {
2261
+ return /* @__PURE__ */ jsxs15("div", { className: "pt-panel-page pt-panel-section pt-analysis", children: [
2262
+ /* @__PURE__ */ jsxs15("section", { children: [
2263
+ /* @__PURE__ */ jsx17("p", { className: "pt-eyebrow", children: ui.analysisEyebrow }),
2264
+ /* @__PURE__ */ jsx17("h2", { className: "pt-h2", children: ui.analysisSections[section] }),
2265
+ /* @__PURE__ */ jsx17("p", { className: "pt-sub", children: ui.analysisSectionHints[section] }),
2266
+ onRequestReport && /* @__PURE__ */ jsx17("p", { className: "pt-panel-row", children: /* @__PURE__ */ jsx17("button", { type: "button", className: "pt-btn pt-btn--sm", onClick: () => onRequestReport(section), children: ui.analysisRedo }) }),
2267
+ /* @__PURE__ */ jsx17("nav", { className: "pt-analysis__nav", "aria-label": ui.analysis, children: ANALYSIS_SECTIONS.map((id) => {
2059
2268
  const count = (analysis.choices?.[id] ?? []).filter(
2060
2269
  (choice) => !choice.options.some((option) => option.id === choice.value)
2061
2270
  ).length;
2062
- return /* @__PURE__ */ jsxs14(
2271
+ return /* @__PURE__ */ jsxs15(
2063
2272
  "button",
2064
2273
  {
2065
2274
  type: "button",
@@ -2068,110 +2277,110 @@ function AnalysisView({
2068
2277
  onClick: () => setSection(id),
2069
2278
  children: [
2070
2279
  ui.analysisSections[id],
2071
- count > 0 && /* @__PURE__ */ jsx16("span", { className: "pt-analysis__open", "aria-hidden": "true", children: count })
2280
+ count > 0 && /* @__PURE__ */ jsx17("span", { className: "pt-analysis__open", "aria-hidden": "true", children: count })
2072
2281
  ]
2073
2282
  },
2074
2283
  id
2075
2284
  );
2076
2285
  }) }),
2077
- here.length > 0 && /* @__PURE__ */ jsxs14("p", { className: "pt-analysis__stage", children: [
2286
+ here.length > 0 && /* @__PURE__ */ jsxs15("p", { className: "pt-analysis__stage", children: [
2078
2287
  ui.analysisAnswered(answeredHere, here.length),
2079
- answeredHere === here.length && /* @__PURE__ */ jsxs14(Fragment3, { children: [
2288
+ answeredHere === here.length && /* @__PURE__ */ jsxs15(Fragment3, { children: [
2080
2289
  " \xB7 ",
2081
2290
  ui.analysisAllDecided
2082
2291
  ] })
2083
2292
  ] })
2084
2293
  ] }),
2085
- section === "board" && /* @__PURE__ */ jsxs14(Fragment3, { children: [
2086
- /* @__PURE__ */ jsxs14("section", { children: [
2087
- /* @__PURE__ */ jsx16("h3", { className: "pt-cap__title", children: ui.boardFactsTitle }),
2088
- /* @__PURE__ */ jsx16("p", { className: "pt-sub", children: ui.boardFactsIntro }),
2089
- /* @__PURE__ */ jsx16("div", { className: "pt-fact-grid", children: [
2294
+ section === "board" && /* @__PURE__ */ jsxs15(Fragment3, { children: [
2295
+ /* @__PURE__ */ jsxs15("section", { children: [
2296
+ /* @__PURE__ */ jsx17("h3", { className: "pt-cap__title", children: ui.boardFactsTitle }),
2297
+ /* @__PURE__ */ jsx17("p", { className: "pt-sub", children: ui.boardFactsIntro }),
2298
+ /* @__PURE__ */ jsx17("div", { className: "pt-fact-grid", children: [
2090
2299
  [ui.factOpen, String(facts.open)],
2091
2300
  [ui.factWaiting, String(facts.waitingOnOwner)],
2092
2301
  [ui.factOrders, String(facts.orders)],
2093
2302
  [ui.factHighRisk, String(facts.highRisk)]
2094
- ].map(([label, value]) => /* @__PURE__ */ jsxs14("article", { className: "pt-fact", children: [
2095
- /* @__PURE__ */ jsx16("p", { className: "pt-fact__label", children: label }),
2096
- /* @__PURE__ */ jsx16("p", { className: "pt-fact__value", children: value })
2303
+ ].map(([label, value]) => /* @__PURE__ */ jsxs15("article", { className: "pt-fact", children: [
2304
+ /* @__PURE__ */ jsx17("p", { className: "pt-fact__label", children: label }),
2305
+ /* @__PURE__ */ jsx17("p", { className: "pt-fact__value", children: value })
2097
2306
  ] }, label)) }),
2098
- /* @__PURE__ */ jsx16("h4", { className: "pt-analysis__minor", children: ui.factColumnsTitle }),
2099
- /* @__PURE__ */ jsx16("ul", { className: "pt-analysis__list", children: facts.byColumn.map((column) => /* @__PURE__ */ jsxs14("li", { className: "pt-analysis__goal", children: [
2100
- /* @__PURE__ */ jsx16("span", { children: t(column.title) }),
2101
- /* @__PURE__ */ jsx16("span", { className: "pt-analysis__weight", children: column.count })
2307
+ /* @__PURE__ */ jsx17("h4", { className: "pt-analysis__minor", children: ui.factColumnsTitle }),
2308
+ /* @__PURE__ */ jsx17("ul", { className: "pt-analysis__list", children: facts.byColumn.map((column) => /* @__PURE__ */ jsxs15("li", { className: "pt-analysis__goal", children: [
2309
+ /* @__PURE__ */ jsx17("span", { children: t(column.title) }),
2310
+ /* @__PURE__ */ jsx17("span", { className: "pt-analysis__weight", children: column.count })
2102
2311
  ] }, column.id)) }),
2103
- facts.oldestOpen && facts.oldestOpenDays !== null && /* @__PURE__ */ jsxs14("p", { className: "pt-analysis__stage", children: [
2312
+ facts.oldestOpen && facts.oldestOpenDays !== null && /* @__PURE__ */ jsxs15("p", { className: "pt-analysis__stage", children: [
2104
2313
  ui.factOldest,
2105
2314
  ": ",
2106
- /* @__PURE__ */ jsx16("strong", { children: ui.factDays(facts.oldestOpenDays) }),
2315
+ /* @__PURE__ */ jsx17("strong", { children: ui.factDays(facts.oldestOpenDays) }),
2107
2316
  " \xB7 ",
2108
2317
  t(facts.oldestOpen.title)
2109
2318
  ] })
2110
2319
  ] }),
2111
- /* @__PURE__ */ jsxs14("section", { children: [
2112
- /* @__PURE__ */ jsx16("h3", { className: "pt-cap__title", children: ui.factClaimedTitle }),
2113
- /* @__PURE__ */ jsx16("p", { className: "pt-sub", children: ui.factClaimedIntro }),
2114
- facts.claimed.length === 0 ? /* @__PURE__ */ jsx16("p", { className: "pt-analysis__empty", children: ui.factClaimedNone }) : /* @__PURE__ */ jsx16("ul", { className: "pt-analysis__list", children: facts.claimed.map((card) => /* @__PURE__ */ jsxs14("li", { className: "pt-analysis__goal", children: [
2115
- /* @__PURE__ */ jsx16("button", { type: "button", className: "pt-analysis__link", onClick: () => onOpenCard?.(card.id), children: t(card.title) || ui.untitled }),
2116
- /* @__PURE__ */ jsx16("span", { className: "pt-analysis__weight", children: ui.neverStarted })
2320
+ /* @__PURE__ */ jsxs15("section", { children: [
2321
+ /* @__PURE__ */ jsx17("h3", { className: "pt-cap__title", children: ui.factClaimedTitle }),
2322
+ /* @__PURE__ */ jsx17("p", { className: "pt-sub", children: ui.factClaimedIntro }),
2323
+ facts.claimed.length === 0 ? /* @__PURE__ */ jsx17("p", { className: "pt-analysis__empty", children: ui.factClaimedNone }) : /* @__PURE__ */ jsx17("ul", { className: "pt-analysis__list", children: facts.claimed.map((card) => /* @__PURE__ */ jsxs15("li", { className: "pt-analysis__goal", children: [
2324
+ /* @__PURE__ */ jsx17("button", { type: "button", className: "pt-analysis__link", onClick: () => onOpenCard?.(card.id), children: t(card.title) || ui.untitled }),
2325
+ /* @__PURE__ */ jsx17("span", { className: "pt-analysis__weight", children: ui.neverStarted })
2117
2326
  ] }, card.id)) })
2118
2327
  ] })
2119
2328
  ] }),
2120
- section === "project" && /* @__PURE__ */ jsxs14(Fragment3, { children: [
2121
- /* @__PURE__ */ jsxs14("section", { children: [
2122
- /* @__PURE__ */ jsx16("h3", { className: "pt-cap__title", children: ui.briefTitle }),
2123
- /* @__PURE__ */ jsx16("p", { className: "pt-sub", children: t(analysis.brief) }),
2124
- /* @__PURE__ */ jsxs14("p", { className: "pt-analysis__stage", children: [
2329
+ section === "project" && /* @__PURE__ */ jsxs15(Fragment3, { children: [
2330
+ /* @__PURE__ */ jsxs15("section", { children: [
2331
+ /* @__PURE__ */ jsx17("h3", { className: "pt-cap__title", children: ui.briefTitle }),
2332
+ /* @__PURE__ */ jsx17("p", { className: "pt-sub", children: t(analysis.brief) }),
2333
+ /* @__PURE__ */ jsxs15("p", { className: "pt-analysis__stage", children: [
2125
2334
  ui.stage,
2126
2335
  ": ",
2127
- /* @__PURE__ */ jsx16("strong", { children: analysis.stage })
2336
+ /* @__PURE__ */ jsx17("strong", { children: analysis.stage })
2128
2337
  ] })
2129
2338
  ] }),
2130
- /* @__PURE__ */ jsxs14("section", { className: "pt-analysis__split", children: [
2131
- /* @__PURE__ */ jsxs14("div", { className: "pt-cap pt-hud", children: [
2132
- /* @__PURE__ */ jsx16("h3", { className: "pt-cap__title", children: ui.goalsTitle }),
2133
- /* @__PURE__ */ jsx16("ul", { className: "pt-analysis__list", children: analysis.goals.map((goal) => /* @__PURE__ */ jsxs14("li", { className: `pt-analysis__goal is-${goal.weight}`, children: [
2134
- /* @__PURE__ */ jsx16("span", { children: t(goal.label) }),
2135
- /* @__PURE__ */ jsx16("span", { className: "pt-analysis__weight", children: ui.weights[goal.weight] })
2339
+ /* @__PURE__ */ jsxs15("section", { className: "pt-analysis__split", children: [
2340
+ /* @__PURE__ */ jsxs15("div", { className: "pt-cap pt-hud", children: [
2341
+ /* @__PURE__ */ jsx17("h3", { className: "pt-cap__title", children: ui.goalsTitle }),
2342
+ /* @__PURE__ */ jsx17("ul", { className: "pt-analysis__list", children: analysis.goals.map((goal) => /* @__PURE__ */ jsxs15("li", { className: `pt-analysis__goal is-${goal.weight}`, children: [
2343
+ /* @__PURE__ */ jsx17("span", { children: t(goal.label) }),
2344
+ /* @__PURE__ */ jsx17("span", { className: "pt-analysis__weight", children: ui.weights[goal.weight] })
2136
2345
  ] }, goal.id)) })
2137
2346
  ] }),
2138
- /* @__PURE__ */ jsxs14("div", { className: "pt-cap pt-hud", children: [
2139
- /* @__PURE__ */ jsx16("h3", { className: "pt-cap__title", children: ui.constraintsTitle }),
2140
- /* @__PURE__ */ jsx16("ul", { className: "pt-analysis__list", children: analysis.constraints.map((constraint) => /* @__PURE__ */ jsxs14("li", { className: `pt-analysis__goal${constraint.on ? "" : " is-off"}`, children: [
2141
- /* @__PURE__ */ jsx16("span", { children: t(constraint.label) }),
2142
- /* @__PURE__ */ jsx16("span", { className: "pt-analysis__weight", children: constraint.on ? ui.constraintOn : ui.constraintOff })
2347
+ /* @__PURE__ */ jsxs15("div", { className: "pt-cap pt-hud", children: [
2348
+ /* @__PURE__ */ jsx17("h3", { className: "pt-cap__title", children: ui.constraintsTitle }),
2349
+ /* @__PURE__ */ jsx17("ul", { className: "pt-analysis__list", children: analysis.constraints.map((constraint) => /* @__PURE__ */ jsxs15("li", { className: `pt-analysis__goal${constraint.on ? "" : " is-off"}`, children: [
2350
+ /* @__PURE__ */ jsx17("span", { children: t(constraint.label) }),
2351
+ /* @__PURE__ */ jsx17("span", { className: "pt-analysis__weight", children: constraint.on ? ui.constraintOn : ui.constraintOff })
2143
2352
  ] }, constraint.id)) })
2144
2353
  ] })
2145
2354
  ] }),
2146
- /* @__PURE__ */ jsxs14("section", { children: [
2147
- /* @__PURE__ */ jsx16("h3", { className: "pt-cap__title", children: ui.metricsTitle }),
2148
- /* @__PURE__ */ jsx16("p", { className: "pt-sub", children: ui.metricsIntro }),
2149
- /* @__PURE__ */ jsx16("div", { className: "pt-metric-grid", children: analysis.metrics.map((metric) => /* @__PURE__ */ jsx16(MetricTile, { metric, lang, ui }, metric.id)) })
2355
+ /* @__PURE__ */ jsxs15("section", { children: [
2356
+ /* @__PURE__ */ jsx17("h3", { className: "pt-cap__title", children: ui.metricsTitle }),
2357
+ /* @__PURE__ */ jsx17("p", { className: "pt-sub", children: ui.metricsIntro }),
2358
+ /* @__PURE__ */ jsx17("div", { className: "pt-metric-grid", children: analysis.metrics.map((metric) => /* @__PURE__ */ jsx17(MetricTile, { metric, lang, ui }, metric.id)) })
2150
2359
  ] })
2151
2360
  ] }),
2152
- section === "strategy" && /* @__PURE__ */ jsxs14(Fragment3, { children: [
2153
- /* @__PURE__ */ jsxs14("section", { children: [
2154
- /* @__PURE__ */ jsx16("h3", { className: "pt-cap__title", children: ui.strategiesTitle }),
2155
- /* @__PURE__ */ jsx16("p", { className: "pt-sub", children: analysis.chosen ? ui.strategyChosenHint : ui.strategyOpenHint }),
2156
- /* @__PURE__ */ jsx16("div", { className: "pt-strategy-grid", children: analysis.strategies.map((strategy) => {
2361
+ section === "strategy" && /* @__PURE__ */ jsxs15(Fragment3, { children: [
2362
+ /* @__PURE__ */ jsxs15("section", { children: [
2363
+ /* @__PURE__ */ jsx17("h3", { className: "pt-cap__title", children: ui.strategiesTitle }),
2364
+ /* @__PURE__ */ jsx17("p", { className: "pt-sub", children: analysis.chosen ? ui.strategyChosenHint : ui.strategyOpenHint }),
2365
+ /* @__PURE__ */ jsx17("div", { className: "pt-strategy-grid", children: analysis.strategies.map((strategy) => {
2157
2366
  const chosen = analysis.chosen === strategy.id;
2158
- return /* @__PURE__ */ jsxs14("article", { className: `pt-strategy pt-hud${chosen ? " is-chosen" : ""}`, children: [
2159
- /* @__PURE__ */ jsx16("h4", { className: "pt-strategy__title", children: t(strategy.title) }),
2160
- /* @__PURE__ */ jsx16("p", { className: "pt-panel-text", children: t(strategy.thesis) }),
2161
- /* @__PURE__ */ jsx16("dl", { className: "pt-strategy__meters", children: [
2367
+ return /* @__PURE__ */ jsxs15("article", { className: `pt-strategy pt-hud${chosen ? " is-chosen" : ""}`, children: [
2368
+ /* @__PURE__ */ jsx17("h4", { className: "pt-strategy__title", children: t(strategy.title) }),
2369
+ /* @__PURE__ */ jsx17("p", { className: "pt-panel-text", children: t(strategy.thesis) }),
2370
+ /* @__PURE__ */ jsx17("dl", { className: "pt-strategy__meters", children: [
2162
2371
  [ui.effort, strategy.effort],
2163
2372
  [ui.riskShort, strategy.risk],
2164
2373
  [ui.upside, strategy.upside]
2165
- ].map(([label, value]) => /* @__PURE__ */ jsxs14("div", { children: [
2166
- /* @__PURE__ */ jsx16("dt", { children: label }),
2167
- /* @__PURE__ */ jsxs14("dd", { children: [
2168
- /* @__PURE__ */ jsx16("span", { className: "pt-strategy__track", children: /* @__PURE__ */ jsx16("span", { className: "pt-strategy__fill", style: { width: `${value * 10}%` } }) }),
2169
- /* @__PURE__ */ jsx16("b", { children: value })
2374
+ ].map(([label, value]) => /* @__PURE__ */ jsxs15("div", { children: [
2375
+ /* @__PURE__ */ jsx17("dt", { children: label }),
2376
+ /* @__PURE__ */ jsxs15("dd", { children: [
2377
+ /* @__PURE__ */ jsx17("span", { className: "pt-strategy__track", children: /* @__PURE__ */ jsx17("span", { className: "pt-strategy__fill", style: { width: `${value * 10}%` } }) }),
2378
+ /* @__PURE__ */ jsx17("b", { children: value })
2170
2379
  ] })
2171
2380
  ] }, label)) }),
2172
- /* @__PURE__ */ jsx16("p", { className: "pt-strategy__horizon", children: t(strategy.horizon) }),
2173
- /* @__PURE__ */ jsx16("ul", { className: "pt-cap__list", children: strategy.moves.map((move) => /* @__PURE__ */ jsx16("li", { children: t(move) }, t(move))) }),
2174
- /* @__PURE__ */ jsx16(
2381
+ /* @__PURE__ */ jsx17("p", { className: "pt-strategy__horizon", children: t(strategy.horizon) }),
2382
+ /* @__PURE__ */ jsx17("ul", { className: "pt-cap__list", children: strategy.moves.map((move) => /* @__PURE__ */ jsx17("li", { children: t(move) }, t(move))) }),
2383
+ /* @__PURE__ */ jsx17(
2175
2384
  FilterChip,
2176
2385
  {
2177
2386
  label: chosen ? ui.strategyChosen : ui.strategyChoose,
@@ -2182,19 +2391,19 @@ function AnalysisView({
2182
2391
  ] }, strategy.id);
2183
2392
  }) })
2184
2393
  ] }),
2185
- /* @__PURE__ */ jsxs14("section", { children: [
2186
- /* @__PURE__ */ jsx16("h3", { className: "pt-cap__title", children: ui.suggestionsTitle }),
2187
- /* @__PURE__ */ jsx16("p", { className: "pt-sub", children: ui.suggestionsIntro }),
2188
- /* @__PURE__ */ jsx16("ul", { className: "pt-analysis__suggestions", children: analysis.suggestions.map((suggestion) => /* @__PURE__ */ jsxs14("li", { className: `pt-suggestion pt-hud is-${suggestion.severity}`, children: [
2189
- /* @__PURE__ */ jsxs14("p", { className: "pt-suggestion__meta", children: [
2394
+ /* @__PURE__ */ jsxs15("section", { children: [
2395
+ /* @__PURE__ */ jsx17("h3", { className: "pt-cap__title", children: ui.suggestionsTitle }),
2396
+ /* @__PURE__ */ jsx17("p", { className: "pt-sub", children: ui.suggestionsIntro }),
2397
+ /* @__PURE__ */ jsx17("ul", { className: "pt-analysis__suggestions", children: analysis.suggestions.map((suggestion) => /* @__PURE__ */ jsxs15("li", { className: `pt-suggestion pt-hud is-${suggestion.severity}`, children: [
2398
+ /* @__PURE__ */ jsxs15("p", { className: "pt-suggestion__meta", children: [
2190
2399
  suggestion.area,
2191
2400
  " \xB7 ",
2192
2401
  ui.severities[suggestion.severity],
2193
2402
  " \xB7 ",
2194
2403
  suggestion.date
2195
2404
  ] }),
2196
- /* @__PURE__ */ jsx16("p", { className: "pt-panel-text", children: t(suggestion.text) }),
2197
- /* @__PURE__ */ jsx16("div", { className: "pt-panel-row", children: SUGGESTION_STATUSES.map((status) => /* @__PURE__ */ jsx16(
2405
+ /* @__PURE__ */ jsx17("p", { className: "pt-panel-text", children: t(suggestion.text) }),
2406
+ /* @__PURE__ */ jsx17("div", { className: "pt-panel-row", children: SUGGESTION_STATUSES.map((status) => /* @__PURE__ */ jsx17(
2198
2407
  FilterChip,
2199
2408
  {
2200
2409
  label: ui.suggestionStatuses[status],
@@ -2206,67 +2415,67 @@ function AnalysisView({
2206
2415
  ] }, suggestion.id)) })
2207
2416
  ] })
2208
2417
  ] }),
2209
- section === "market" && /* @__PURE__ */ jsx16("section", { children: analysis.market ? /* @__PURE__ */ jsxs14(Fragment3, { children: [
2210
- /* @__PURE__ */ jsxs14("div", { className: "pt-analysis__split", children: [
2211
- /* @__PURE__ */ jsxs14("div", { className: "pt-cap pt-hud", children: [
2212
- /* @__PURE__ */ jsx16("h3", { className: "pt-cap__title", children: ui.audienceTitle }),
2213
- /* @__PURE__ */ jsx16("p", { className: "pt-panel-text", children: t(analysis.market.audience) })
2418
+ section === "market" && /* @__PURE__ */ jsx17("section", { children: analysis.market ? /* @__PURE__ */ jsxs15(Fragment3, { children: [
2419
+ /* @__PURE__ */ jsxs15("div", { className: "pt-analysis__split", children: [
2420
+ /* @__PURE__ */ jsxs15("div", { className: "pt-cap pt-hud", children: [
2421
+ /* @__PURE__ */ jsx17("h3", { className: "pt-cap__title", children: ui.audienceTitle }),
2422
+ /* @__PURE__ */ jsx17("p", { className: "pt-panel-text", children: t(analysis.market.audience) })
2214
2423
  ] }),
2215
- /* @__PURE__ */ jsxs14("div", { className: "pt-cap pt-hud", children: [
2216
- /* @__PURE__ */ jsx16("h3", { className: "pt-cap__title", children: ui.positioningTitle }),
2217
- /* @__PURE__ */ jsx16("p", { className: "pt-panel-text", children: t(analysis.market.positioning) })
2424
+ /* @__PURE__ */ jsxs15("div", { className: "pt-cap pt-hud", children: [
2425
+ /* @__PURE__ */ jsx17("h3", { className: "pt-cap__title", children: ui.positioningTitle }),
2426
+ /* @__PURE__ */ jsx17("p", { className: "pt-panel-text", children: t(analysis.market.positioning) })
2218
2427
  ] })
2219
2428
  ] }),
2220
- /* @__PURE__ */ jsx16("h3", { className: "pt-cap__title pt-analysis__minor", children: ui.competitorsTitle }),
2221
- /* @__PURE__ */ jsx16("p", { className: "pt-sub", children: ui.marketIntro }),
2222
- /* @__PURE__ */ jsx16("div", { className: "pt-rival-grid", children: analysis.market.competitors.map((rival) => /* @__PURE__ */ jsxs14("article", { className: "pt-rival pt-hud", children: [
2223
- /* @__PURE__ */ jsx16("h4", { className: "pt-rival__name", children: rival.name }),
2224
- /* @__PURE__ */ jsxs14("p", { className: "pt-rival__line", children: [
2225
- /* @__PURE__ */ jsx16("span", { className: "pt-rival__tag", children: ui.competitorStrength }),
2429
+ /* @__PURE__ */ jsx17("h3", { className: "pt-cap__title pt-analysis__minor", children: ui.competitorsTitle }),
2430
+ /* @__PURE__ */ jsx17("p", { className: "pt-sub", children: ui.marketIntro }),
2431
+ /* @__PURE__ */ jsx17("div", { className: "pt-rival-grid", children: analysis.market.competitors.map((rival) => /* @__PURE__ */ jsxs15("article", { className: "pt-rival pt-hud", children: [
2432
+ /* @__PURE__ */ jsx17("h4", { className: "pt-rival__name", children: rival.name }),
2433
+ /* @__PURE__ */ jsxs15("p", { className: "pt-rival__line", children: [
2434
+ /* @__PURE__ */ jsx17("span", { className: "pt-rival__tag", children: ui.competitorStrength }),
2226
2435
  t(rival.strength)
2227
2436
  ] }),
2228
- /* @__PURE__ */ jsxs14("p", { className: "pt-rival__line is-gap", children: [
2229
- /* @__PURE__ */ jsx16("span", { className: "pt-rival__tag", children: ui.competitorGap }),
2437
+ /* @__PURE__ */ jsxs15("p", { className: "pt-rival__line is-gap", children: [
2438
+ /* @__PURE__ */ jsx17("span", { className: "pt-rival__tag", children: ui.competitorGap }),
2230
2439
  t(rival.gap)
2231
2440
  ] })
2232
2441
  ] }, rival.id)) }),
2233
- analysis.market.pricing && /* @__PURE__ */ jsxs14(Fragment3, { children: [
2234
- /* @__PURE__ */ jsx16("h3", { className: "pt-cap__title pt-analysis__minor", children: ui.pricingTitle }),
2235
- /* @__PURE__ */ jsx16("p", { className: "pt-panel-text", children: t(analysis.market.pricing) })
2442
+ analysis.market.pricing && /* @__PURE__ */ jsxs15(Fragment3, { children: [
2443
+ /* @__PURE__ */ jsx17("h3", { className: "pt-cap__title pt-analysis__minor", children: ui.pricingTitle }),
2444
+ /* @__PURE__ */ jsx17("p", { className: "pt-panel-text", children: t(analysis.market.pricing) })
2236
2445
  ] }),
2237
- analysis.market.notes && analysis.market.notes.length > 0 && /* @__PURE__ */ jsxs14(Fragment3, { children: [
2238
- /* @__PURE__ */ jsx16("h3", { className: "pt-cap__title pt-analysis__minor", children: ui.marketNotesTitle }),
2239
- /* @__PURE__ */ jsx16("ul", { className: "pt-cap__list", children: analysis.market.notes.map((note) => /* @__PURE__ */ jsx16("li", { children: t(note) }, t(note))) })
2446
+ analysis.market.notes && analysis.market.notes.length > 0 && /* @__PURE__ */ jsxs15(Fragment3, { children: [
2447
+ /* @__PURE__ */ jsx17("h3", { className: "pt-cap__title pt-analysis__minor", children: ui.marketNotesTitle }),
2448
+ /* @__PURE__ */ jsx17("ul", { className: "pt-cap__list", children: analysis.market.notes.map((note) => /* @__PURE__ */ jsx17("li", { children: t(note) }, t(note))) })
2240
2449
  ] })
2241
- ] }) : /* @__PURE__ */ jsx16("p", { className: "pt-analysis__empty", children: ui.marketEmpty }) }),
2242
- /* @__PURE__ */ jsx16(Choices, { section, analysis, lang, ui, onDecide }),
2243
- total > 0 && /* @__PURE__ */ jsxs14("section", { className: "pt-analysis__split", children: [
2244
- /* @__PURE__ */ jsxs14("div", { className: "pt-cap pt-hud", children: [
2245
- /* @__PURE__ */ jsx16("h3", { className: "pt-cap__title", children: ui.claudeReadsTitle }),
2246
- /* @__PURE__ */ jsx16("p", { className: "pt-sub", children: ui.claudeReadsIntro }),
2247
- /* @__PURE__ */ jsxs14("ul", { className: "pt-analysis__list", children: [
2248
- answers.map(({ section: from, choice, option }) => /* @__PURE__ */ jsxs14("li", { className: "pt-analysis__goal is-primary", children: [
2249
- /* @__PURE__ */ jsxs14("span", { children: [
2250
- /* @__PURE__ */ jsx16("span", { className: "pt-analysis__from", children: ui.analysisSections[from] }),
2450
+ ] }) : /* @__PURE__ */ jsx17("p", { className: "pt-analysis__empty", children: ui.marketEmpty }) }),
2451
+ /* @__PURE__ */ jsx17(Choices, { section, analysis, lang, ui, onDecide }),
2452
+ total > 0 && /* @__PURE__ */ jsxs15("section", { className: "pt-analysis__split", children: [
2453
+ /* @__PURE__ */ jsxs15("div", { className: "pt-cap pt-hud", children: [
2454
+ /* @__PURE__ */ jsx17("h3", { className: "pt-cap__title", children: ui.claudeReadsTitle }),
2455
+ /* @__PURE__ */ jsx17("p", { className: "pt-sub", children: ui.claudeReadsIntro }),
2456
+ /* @__PURE__ */ jsxs15("ul", { className: "pt-analysis__list", children: [
2457
+ answers.map(({ section: from, choice, option }) => /* @__PURE__ */ jsxs15("li", { className: "pt-analysis__goal is-primary", children: [
2458
+ /* @__PURE__ */ jsxs15("span", { children: [
2459
+ /* @__PURE__ */ jsx17("span", { className: "pt-analysis__from", children: ui.analysisSections[from] }),
2251
2460
  t(choice.question)
2252
2461
  ] }),
2253
- /* @__PURE__ */ jsx16("span", { className: "pt-analysis__weight", children: t(option.label) })
2462
+ /* @__PURE__ */ jsx17("span", { className: "pt-analysis__weight", children: t(option.label) })
2254
2463
  ] }, choice.id)),
2255
- answers.length === 0 && /* @__PURE__ */ jsx16("li", { className: "pt-analysis__goal is-off", children: ui.choicesNone })
2464
+ answers.length === 0 && /* @__PURE__ */ jsx17("li", { className: "pt-analysis__goal is-off", children: ui.choicesNone })
2256
2465
  ] })
2257
2466
  ] }),
2258
- /* @__PURE__ */ jsxs14("div", { className: "pt-cap pt-hud", children: [
2259
- /* @__PURE__ */ jsx16("h3", { className: "pt-cap__title", children: ui.claudeOpenTitle }),
2260
- /* @__PURE__ */ jsx16("p", { className: "pt-sub", children: ui.claudeOpenIntro }),
2261
- /* @__PURE__ */ jsxs14("ul", { className: "pt-analysis__list", children: [
2262
- open.map(({ section: from, choice }) => /* @__PURE__ */ jsxs14("li", { className: "pt-analysis__goal", children: [
2263
- /* @__PURE__ */ jsxs14("button", { type: "button", className: "pt-analysis__link", onClick: () => setSection(from), children: [
2264
- /* @__PURE__ */ jsx16("span", { className: "pt-analysis__from", children: ui.analysisSections[from] }),
2467
+ /* @__PURE__ */ jsxs15("div", { className: "pt-cap pt-hud", children: [
2468
+ /* @__PURE__ */ jsx17("h3", { className: "pt-cap__title", children: ui.claudeOpenTitle }),
2469
+ /* @__PURE__ */ jsx17("p", { className: "pt-sub", children: ui.claudeOpenIntro }),
2470
+ /* @__PURE__ */ jsxs15("ul", { className: "pt-analysis__list", children: [
2471
+ open.map(({ section: from, choice }) => /* @__PURE__ */ jsxs15("li", { className: "pt-analysis__goal", children: [
2472
+ /* @__PURE__ */ jsxs15("button", { type: "button", className: "pt-analysis__link", onClick: () => setSection(from), children: [
2473
+ /* @__PURE__ */ jsx17("span", { className: "pt-analysis__from", children: ui.analysisSections[from] }),
2265
2474
  t(choice.question)
2266
2475
  ] }),
2267
- /* @__PURE__ */ jsx16("span", { className: "pt-analysis__weight", children: ui.choiceOpen })
2476
+ /* @__PURE__ */ jsx17("span", { className: "pt-analysis__weight", children: ui.choiceOpen })
2268
2477
  ] }, choice.id)),
2269
- open.length === 0 && /* @__PURE__ */ jsx16("li", { className: "pt-analysis__goal is-off", children: ui.analysisAllDecided })
2478
+ open.length === 0 && /* @__PURE__ */ jsx17("li", { className: "pt-analysis__goal is-off", children: ui.analysisAllDecided })
2270
2479
  ] })
2271
2480
  ] })
2272
2481
  ] })
@@ -2274,7 +2483,7 @@ function AnalysisView({
2274
2483
  }
2275
2484
 
2276
2485
  // src/panel/MarketplaceView.tsx
2277
- import { useMemo as useMemo4, useState as useState7 } from "react";
2486
+ import { useMemo as useMemo4, useState as useState8 } from "react";
2278
2487
 
2279
2488
  // src/panel/marketplace.ts
2280
2489
  var MARKETPLACE_NAME = "dfklabs";
@@ -2317,39 +2526,39 @@ function ageInWords(seconds, lang) {
2317
2526
  }
2318
2527
 
2319
2528
  // src/panel/MarketplaceView.tsx
2320
- import { Fragment as Fragment4, jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
2529
+ import { Fragment as Fragment4, jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
2321
2530
  function ToolRow({
2322
2531
  tool,
2323
2532
  lang,
2324
2533
  ui,
2325
2534
  onInstall
2326
2535
  }) {
2327
- return /* @__PURE__ */ jsxs15("article", { className: `pt-tool${tool.state ? ` is-${tool.state}` : " is-command"}`, children: [
2328
- /* @__PURE__ */ jsxs15("div", { className: "pt-tool__head", children: [
2329
- /* @__PURE__ */ jsx17("h3", { className: "pt-tool__name", children: tool.name }),
2330
- /* @__PURE__ */ jsx17("span", { className: "pt-tool__state", children: tool.state ? ui.installStates[tool.state] : ui.toolCommandOnly })
2536
+ return /* @__PURE__ */ jsxs16("article", { className: `pt-tool${tool.state ? ` is-${tool.state}` : " is-command"}`, children: [
2537
+ /* @__PURE__ */ jsxs16("div", { className: "pt-tool__head", children: [
2538
+ /* @__PURE__ */ jsx18("h3", { className: "pt-tool__name", children: tool.name }),
2539
+ /* @__PURE__ */ jsx18("span", { className: "pt-tool__state", children: tool.state ? ui.installStates[tool.state] : ui.toolCommandOnly })
2331
2540
  ] }),
2332
- tool.summary && /* @__PURE__ */ jsx17("p", { className: "pt-panel-text", children: tool.summary }),
2333
- /* @__PURE__ */ jsxs15("p", { className: "pt-tool__meta", children: [
2334
- /* @__PURE__ */ jsx17("span", { className: "pt-tool__id", children: tool.id }),
2335
- tool.claudePlugin && /* @__PURE__ */ jsxs15(Fragment4, { children: [
2541
+ tool.summary && /* @__PURE__ */ jsx18("p", { className: "pt-panel-text", children: tool.summary }),
2542
+ /* @__PURE__ */ jsxs16("p", { className: "pt-tool__meta", children: [
2543
+ /* @__PURE__ */ jsx18("span", { className: "pt-tool__id", children: tool.id }),
2544
+ tool.claudePlugin && /* @__PURE__ */ jsxs16(Fragment4, { children: [
2336
2545
  " \xB7 ",
2337
- tool.version ? /* @__PURE__ */ jsxs15("span", { className: "pt-tool__version", children: [
2546
+ tool.version ? /* @__PURE__ */ jsxs16("span", { className: "pt-tool__version", children: [
2338
2547
  "v",
2339
2548
  tool.version
2340
2549
  ] }) : (
2341
2550
  // Never a version we made up. A blank here is the plugin's own
2342
2551
  // manifest failing to answer, and it says so on hover.
2343
- /* @__PURE__ */ jsx17("span", { className: "pt-tool__version is-unknown", title: tool.versionError ?? void 0, children: ui.versionUnknown })
2552
+ /* @__PURE__ */ jsx18("span", { className: "pt-tool__version is-unknown", title: tool.versionError ?? void 0, children: ui.versionUnknown })
2344
2553
  )
2345
2554
  ] }),
2346
- tool.repo && /* @__PURE__ */ jsxs15(Fragment4, { children: [
2555
+ tool.repo && /* @__PURE__ */ jsxs16(Fragment4, { children: [
2347
2556
  " \xB7 ",
2348
- /* @__PURE__ */ jsx17("a", { className: "pt-tool__repo", href: `https://github.com/${tool.repo}`, target: "_blank", rel: "noreferrer", children: tool.repo })
2557
+ /* @__PURE__ */ jsx18("a", { className: "pt-tool__repo", href: `https://github.com/${tool.repo}`, target: "_blank", rel: "noreferrer", children: tool.repo })
2349
2558
  ] })
2350
2559
  ] }),
2351
- tool.tags.length > 0 && /* @__PURE__ */ jsx17("p", { className: "pt-tool__tags", children: tool.tags.map((tag) => /* @__PURE__ */ jsx17("span", { className: "pt-tool__tag", children: tag }, tag)) }),
2352
- !tool.claudePlugin && tool.standaloneCommand && /* @__PURE__ */ jsx17(
2560
+ tool.tags.length > 0 && /* @__PURE__ */ jsx18("p", { className: "pt-tool__tags", children: tool.tags.map((tag) => /* @__PURE__ */ jsx18("span", { className: "pt-tool__tag", children: tag }, tag)) }),
2561
+ !tool.claudePlugin && tool.standaloneCommand && /* @__PURE__ */ jsx18(
2353
2562
  CopyBlock,
2354
2563
  {
2355
2564
  text: tool.standaloneCommand,
@@ -2357,16 +2566,16 @@ function ToolRow({
2357
2566
  labels: { copy: ui.copy, copied: ui.copied, selected: ui.copySelected }
2358
2567
  }
2359
2568
  ),
2360
- /* @__PURE__ */ jsxs15("div", { className: "pt-panel-row pt-tool__actions", children: [
2361
- /* @__PURE__ */ jsx17("button", { type: "button", className: "pt-btn pt-btn--sm", onClick: () => onInstall(tool), children: tool.claudePlugin ? ui.install : ui.howToRun }),
2362
- tool.homepage && /* @__PURE__ */ jsx17("a", { className: "pt-btn pt-btn--sm", href: tool.homepage, target: "_blank", rel: "noreferrer", children: ui.learnMore })
2569
+ /* @__PURE__ */ jsxs16("div", { className: "pt-panel-row pt-tool__actions", children: [
2570
+ /* @__PURE__ */ jsx18("button", { type: "button", className: "pt-btn pt-btn--sm", onClick: () => onInstall(tool), children: tool.claudePlugin ? ui.install : ui.howToRun }),
2571
+ tool.homepage && /* @__PURE__ */ jsx18("a", { className: "pt-btn pt-btn--sm", href: tool.homepage, target: "_blank", rel: "noreferrer", children: ui.learnMore })
2363
2572
  ] }),
2364
- tool.state === "misconfigured" && /* @__PURE__ */ jsx17("p", { className: "pt-warn", children: ui.stateMisconfiguredWhy })
2573
+ tool.state === "misconfigured" && /* @__PURE__ */ jsx18("p", { className: "pt-warn", children: ui.stateMisconfiguredWhy })
2365
2574
  ] });
2366
2575
  }
2367
2576
  function MarketplaceView({ report, loading, failure, lang, ui, onRefresh }) {
2368
- const [filter, setFilter] = useState7("all");
2369
- const [open, setOpen] = useState7(null);
2577
+ const [filter, setFilter] = useState8("all");
2578
+ const [open, setOpen] = useState8(null);
2370
2579
  const tools = report?.tools ?? [];
2371
2580
  const shown = useMemo4(() => {
2372
2581
  if (filter === "plugins") return tools.filter((tool) => tool.claudePlugin);
@@ -2383,39 +2592,39 @@ function MarketplaceView({ report, loading, failure, lang, ui, onRefresh }) {
2383
2592
  }),
2384
2593
  [tools]
2385
2594
  );
2386
- return /* @__PURE__ */ jsxs15("div", { className: "pt-panel-page pt-panel-section pt-marketplace", children: [
2387
- /* @__PURE__ */ jsxs15("section", { children: [
2388
- /* @__PURE__ */ jsx17("p", { className: "pt-eyebrow", children: report?.marketplace.name ?? ui.marketplaceEyebrow }),
2389
- /* @__PURE__ */ jsx17("h2", { className: "pt-h2", children: ui.marketplaceTitle }),
2390
- /* @__PURE__ */ jsx17("p", { className: "pt-sub", children: ui.marketplaceIntro }),
2391
- /* @__PURE__ */ jsxs15("div", { className: "pt-panel-row pt-marketplace__status", children: [
2392
- onRefresh && /* @__PURE__ */ jsx17("button", { type: "button", className: "pt-btn pt-btn--sm", onClick: onRefresh, disabled: loading, children: loading ? ui.refreshing : ui.refresh }),
2393
- report && onRefresh && /* @__PURE__ */ jsx17("span", { className: "pt-marketplace__age", children: ui.readAt(ageInWords(report.ageSeconds, lang)) })
2595
+ return /* @__PURE__ */ jsxs16("div", { className: "pt-panel-page pt-panel-section pt-marketplace", children: [
2596
+ /* @__PURE__ */ jsxs16("section", { children: [
2597
+ /* @__PURE__ */ jsx18("p", { className: "pt-eyebrow", children: report?.marketplace.name ?? ui.marketplaceEyebrow }),
2598
+ /* @__PURE__ */ jsx18("h2", { className: "pt-h2", children: ui.marketplaceTitle }),
2599
+ /* @__PURE__ */ jsx18("p", { className: "pt-sub", children: ui.marketplaceIntro }),
2600
+ /* @__PURE__ */ jsxs16("div", { className: "pt-panel-row pt-marketplace__status", children: [
2601
+ onRefresh && /* @__PURE__ */ jsx18("button", { type: "button", className: "pt-btn pt-btn--sm", onClick: onRefresh, disabled: loading, children: loading ? ui.refreshing : ui.refresh }),
2602
+ report && onRefresh && /* @__PURE__ */ jsx18("span", { className: "pt-marketplace__age", children: ui.readAt(ageInWords(report.ageSeconds, lang)) })
2394
2603
  ] }),
2395
- report?.stale && !report.unavailable && /* @__PURE__ */ jsx17("p", { className: "pt-warn", children: ui.catalogueStale(ageInWords(report.ageSeconds, lang)) }),
2396
- report?.unavailable && /* @__PURE__ */ jsx17("p", { className: "pt-warn", children: ui.catalogueUnavailable }),
2397
- failure && /* @__PURE__ */ jsx17("p", { className: "pt-warn", children: ui.catalogueFailed })
2604
+ report?.stale && !report.unavailable && /* @__PURE__ */ jsx18("p", { className: "pt-warn", children: ui.catalogueStale(ageInWords(report.ageSeconds, lang)) }),
2605
+ report?.unavailable && /* @__PURE__ */ jsx18("p", { className: "pt-warn", children: ui.catalogueUnavailable }),
2606
+ failure && /* @__PURE__ */ jsx18("p", { className: "pt-warn", children: ui.catalogueFailed })
2398
2607
  ] }),
2399
- report && /* @__PURE__ */ jsxs15("section", { children: [
2400
- /* @__PURE__ */ jsxs15("p", { className: "pt-marketplace__project", children: [
2608
+ report && /* @__PURE__ */ jsxs16("section", { children: [
2609
+ /* @__PURE__ */ jsxs16("p", { className: "pt-marketplace__project", children: [
2401
2610
  ui.stateFrom(report.project.repo, SETTINGS_PATH),
2402
- report.project.settingsStatus === "absent" && /* @__PURE__ */ jsxs15(Fragment4, { children: [
2611
+ report.project.settingsStatus === "absent" && /* @__PURE__ */ jsxs16(Fragment4, { children: [
2403
2612
  " \xB7 ",
2404
2613
  ui.settingsAbsent
2405
2614
  ] }),
2406
- report.project.settingsStatus === "unreadable" && /* @__PURE__ */ jsxs15(Fragment4, { children: [
2615
+ report.project.settingsStatus === "unreadable" && /* @__PURE__ */ jsxs16(Fragment4, { children: [
2407
2616
  " \xB7 ",
2408
2617
  ui.settingsUnreadable
2409
2618
  ] }),
2410
- report.project.settingsStatus === "unparseable" && /* @__PURE__ */ jsxs15(Fragment4, { children: [
2619
+ report.project.settingsStatus === "unparseable" && /* @__PURE__ */ jsxs16(Fragment4, { children: [
2411
2620
  " \xB7 ",
2412
2621
  ui.settingsUnparseable
2413
2622
  ] })
2414
2623
  ] }),
2415
- report.project.detail && /* @__PURE__ */ jsx17("p", { className: "pt-marketplace__detail", children: report.project.detail }),
2416
- /* @__PURE__ */ jsxs15("div", { className: "pt-panel-row pt-marketplace__filters", children: [
2417
- /* @__PURE__ */ jsx17(FilterChip, { label: ui.all, count: counts.all, active: filter === "all", onClick: () => setFilter("all") }),
2418
- /* @__PURE__ */ jsx17(
2624
+ report.project.detail && /* @__PURE__ */ jsx18("p", { className: "pt-marketplace__detail", children: report.project.detail }),
2625
+ /* @__PURE__ */ jsxs16("div", { className: "pt-panel-row pt-marketplace__filters", children: [
2626
+ /* @__PURE__ */ jsx18(FilterChip, { label: ui.all, count: counts.all, active: filter === "all", onClick: () => setFilter("all") }),
2627
+ /* @__PURE__ */ jsx18(
2419
2628
  FilterChip,
2420
2629
  {
2421
2630
  label: ui.filterPlugins,
@@ -2424,7 +2633,7 @@ function MarketplaceView({ report, loading, failure, lang, ui, onRefresh }) {
2424
2633
  onClick: () => setFilter("plugins")
2425
2634
  }
2426
2635
  ),
2427
- /* @__PURE__ */ jsx17(
2636
+ /* @__PURE__ */ jsx18(
2428
2637
  FilterChip,
2429
2638
  {
2430
2639
  label: ui.filterActive,
@@ -2433,7 +2642,7 @@ function MarketplaceView({ report, loading, failure, lang, ui, onRefresh }) {
2433
2642
  onClick: () => setFilter("active")
2434
2643
  }
2435
2644
  ),
2436
- /* @__PURE__ */ jsx17(
2645
+ /* @__PURE__ */ jsx18(
2437
2646
  FilterChip,
2438
2647
  {
2439
2648
  label: ui.filterStandalone,
@@ -2443,12 +2652,12 @@ function MarketplaceView({ report, loading, failure, lang, ui, onRefresh }) {
2443
2652
  }
2444
2653
  )
2445
2654
  ] }),
2446
- loading && tools.length === 0 ? /* @__PURE__ */ jsx17("p", { className: "pt-analysis__empty", children: ui.catalogueLoading }) : shown.length === 0 ? /* @__PURE__ */ jsx17("p", { className: "pt-analysis__empty", children: ui.catalogueEmpty }) : /* @__PURE__ */ jsx17("div", { className: "pt-tool-grid", children: shown.map((tool) => /* @__PURE__ */ jsx17(ToolRow, { tool, lang, ui, onInstall: setOpen }, tool.id)) })
2655
+ loading && tools.length === 0 ? /* @__PURE__ */ jsx18("p", { className: "pt-analysis__empty", children: ui.catalogueLoading }) : shown.length === 0 ? /* @__PURE__ */ jsx18("p", { className: "pt-analysis__empty", children: ui.catalogueEmpty }) : /* @__PURE__ */ jsx18("div", { className: "pt-tool-grid", children: shown.map((tool) => /* @__PURE__ */ jsx18(ToolRow, { tool, lang, ui, onInstall: setOpen }, tool.id)) })
2447
2656
  ] }),
2448
- open && /* @__PURE__ */ jsxs15(DetailSheet, { open: true, onClose: () => setOpen(null), ariaLabel: `${ui.installTitle} \u2014 ${open.name}`, children: [
2449
- /* @__PURE__ */ jsx17("p", { className: "pt-eyebrow", children: ui.installTitle }),
2450
- /* @__PURE__ */ jsx17("h2", { className: "pt-h2", children: open.name }),
2451
- /* @__PURE__ */ jsx17(
2657
+ open && /* @__PURE__ */ jsxs16(DetailSheet, { open: true, onClose: () => setOpen(null), ariaLabel: `${ui.installTitle} \u2014 ${open.name}`, children: [
2658
+ /* @__PURE__ */ jsx18("p", { className: "pt-eyebrow", children: ui.installTitle }),
2659
+ /* @__PURE__ */ jsx18("h2", { className: "pt-h2", children: open.name }),
2660
+ /* @__PURE__ */ jsx18(
2452
2661
  InstallSheet,
2453
2662
  {
2454
2663
  tool: open,
@@ -2457,7 +2666,7 @@ function MarketplaceView({ report, loading, failure, lang, ui, onRefresh }) {
2457
2666
  registered: report?.project.marketplaceRegistered ?? false
2458
2667
  }
2459
2668
  ),
2460
- /* @__PURE__ */ jsx17("button", { type: "button", className: "pt-btn pt-btn--sm", onClick: () => setOpen(null), children: ui.close })
2669
+ /* @__PURE__ */ jsx18("button", { type: "button", className: "pt-btn pt-btn--sm", onClick: () => setOpen(null), children: ui.close })
2461
2670
  ] })
2462
2671
  ] });
2463
2672
  }
@@ -2468,9 +2677,9 @@ function InstallSheet({
2468
2677
  registered
2469
2678
  }) {
2470
2679
  const copy = { copy: ui.copy, copied: ui.copied, selected: ui.copySelected };
2471
- return /* @__PURE__ */ jsxs15(Fragment4, { children: [
2472
- tool.claudePlugin ? /* @__PURE__ */ jsxs15(Fragment4, { children: [
2473
- /* @__PURE__ */ jsx17(DetailSection, { title: ui.installRepoTitle, subtitle: ui.installRepoHint, children: /* @__PURE__ */ jsx17(
2680
+ return /* @__PURE__ */ jsxs16(Fragment4, { children: [
2681
+ tool.claudePlugin ? /* @__PURE__ */ jsxs16(Fragment4, { children: [
2682
+ /* @__PURE__ */ jsx18(DetailSection, { title: ui.installRepoTitle, subtitle: ui.installRepoHint, children: /* @__PURE__ */ jsx18(
2474
2683
  CopyBlock,
2475
2684
  {
2476
2685
  text: repositorySnippet(tool.id, marketplace),
@@ -2479,24 +2688,24 @@ function InstallSheet({
2479
2688
  labels: copy
2480
2689
  }
2481
2690
  ) }),
2482
- /* @__PURE__ */ jsx17(DetailSection, { title: ui.installCliTitle, subtitle: ui.installCliHint, children: /* @__PURE__ */ jsx17(CopyBlock, { text: commandSnippet(tool.id, marketplace), labels: copy }) })
2483
- ] }) : /* @__PURE__ */ jsx17("p", { className: "pt-panel-text", children: ui.installNoPlugin }),
2484
- tool.standaloneCommand ? /* @__PURE__ */ jsx17(DetailSection, { title: ui.installStandaloneTitle, subtitle: ui.installStandaloneHint, children: /* @__PURE__ */ jsx17(CopyBlock, { text: tool.standaloneCommand, labels: copy }) }) : /* @__PURE__ */ jsx17(DetailSection, { title: ui.installStandaloneTitle, children: /* @__PURE__ */ jsx17("p", { className: "pt-panel-text", children: ui.installNoStandalone }) }),
2485
- /* @__PURE__ */ jsx17("p", { className: "pt-marketplace__source", children: ui.marketplaceSource(marketplace.url) })
2691
+ /* @__PURE__ */ jsx18(DetailSection, { title: ui.installCliTitle, subtitle: ui.installCliHint, children: /* @__PURE__ */ jsx18(CopyBlock, { text: commandSnippet(tool.id, marketplace), labels: copy }) })
2692
+ ] }) : /* @__PURE__ */ jsx18("p", { className: "pt-panel-text", children: ui.installNoPlugin }),
2693
+ tool.standaloneCommand ? /* @__PURE__ */ jsx18(DetailSection, { title: ui.installStandaloneTitle, subtitle: ui.installStandaloneHint, children: /* @__PURE__ */ jsx18(CopyBlock, { text: tool.standaloneCommand, labels: copy }) }) : /* @__PURE__ */ jsx18(DetailSection, { title: ui.installStandaloneTitle, children: /* @__PURE__ */ jsx18("p", { className: "pt-panel-text", children: ui.installNoStandalone }) }),
2694
+ /* @__PURE__ */ jsx18("p", { className: "pt-marketplace__source", children: ui.marketplaceSource(marketplace.url) })
2486
2695
  ] });
2487
2696
  }
2488
2697
 
2489
2698
  // src/panel/CardSheet.tsx
2490
- import { useState as useState8 } from "react";
2491
- import { jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
2699
+ import { useState as useState9 } from "react";
2700
+ import { jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
2492
2701
  var LEVEL_LABEL = (ui) => ({
2493
2702
  high: ui.levelHigh,
2494
2703
  medium: ui.levelMedium,
2495
2704
  low: ui.levelLow
2496
2705
  });
2497
2706
  function CardSheet({ card, state, lang, ui, onChange, onDelete, onClose }) {
2498
- const [step, setStep] = useState8("");
2499
- const [note, setNote] = useState8("");
2707
+ const [step, setStep] = useState9("");
2708
+ const [note, setNote] = useState9("");
2500
2709
  if (!card) return null;
2501
2710
  const patch = (changes) => onChange({ ...card, ...changes, updatedAt: today() });
2502
2711
  const levelLabel = LEVEL_LABEL(ui);
@@ -2515,9 +2724,9 @@ function CardSheet({ card, state, lang, ui, onChange, onDelete, onClose }) {
2515
2724
  });
2516
2725
  setNote("");
2517
2726
  }
2518
- return /* @__PURE__ */ jsxs16(DetailSheet, { open: true, onClose, ariaLabel: ui.cardDetail, children: [
2519
- /* @__PURE__ */ jsxs16(DetailSection, { title: ui.title, children: [
2520
- /* @__PURE__ */ jsx18(
2727
+ return /* @__PURE__ */ jsxs17(DetailSheet, { open: true, onClose, ariaLabel: ui.cardDetail, children: [
2728
+ /* @__PURE__ */ jsxs17(DetailSection, { title: ui.title, children: [
2729
+ /* @__PURE__ */ jsx19(
2521
2730
  "input",
2522
2731
  {
2523
2732
  className: "pt-input",
@@ -2526,9 +2735,9 @@ function CardSheet({ card, state, lang, ui, onChange, onDelete, onClose }) {
2526
2735
  onChange: (event) => patch({ title: writeText(lang, event.target.value) })
2527
2736
  }
2528
2737
  ),
2529
- untranslated(card.title) && /* @__PURE__ */ jsx18("span", { className: "pt-flag", children: ui.untranslatedBadge })
2738
+ untranslated(card.title) && /* @__PURE__ */ jsx19("span", { className: "pt-flag", children: ui.untranslatedBadge })
2530
2739
  ] }),
2531
- /* @__PURE__ */ jsx18(DetailSection, { title: ui.detail, children: /* @__PURE__ */ jsx18(
2740
+ /* @__PURE__ */ jsx19(DetailSection, { title: ui.detail, children: /* @__PURE__ */ jsx19(
2532
2741
  "textarea",
2533
2742
  {
2534
2743
  className: "pt-textarea",
@@ -2538,7 +2747,7 @@ function CardSheet({ card, state, lang, ui, onChange, onDelete, onClose }) {
2538
2747
  onChange: (event) => patch({ body: writeText(lang, event.target.value) })
2539
2748
  }
2540
2749
  ) }),
2541
- /* @__PURE__ */ jsx18(DetailSection, { title: ui.areaLabel, children: /* @__PURE__ */ jsx18("div", { className: "pt-panel-row", children: state.areas.map((area) => /* @__PURE__ */ jsx18(
2750
+ /* @__PURE__ */ jsx19(DetailSection, { title: ui.areaLabel, children: /* @__PURE__ */ jsx19("div", { className: "pt-panel-row", children: state.areas.map((area) => /* @__PURE__ */ jsx19(
2542
2751
  FilterChip,
2543
2752
  {
2544
2753
  label: text(area.label, lang),
@@ -2547,7 +2756,7 @@ function CardSheet({ card, state, lang, ui, onChange, onDelete, onClose }) {
2547
2756
  },
2548
2757
  area.id
2549
2758
  )) }) }),
2550
- /* @__PURE__ */ jsx18(DetailSection, { title: ui.priority, children: /* @__PURE__ */ jsx18("div", { className: "pt-panel-row", children: LEVELS.map((level) => /* @__PURE__ */ jsx18(
2759
+ /* @__PURE__ */ jsx19(DetailSection, { title: ui.priority, children: /* @__PURE__ */ jsx19("div", { className: "pt-panel-row", children: LEVELS.map((level) => /* @__PURE__ */ jsx19(
2551
2760
  FilterChip,
2552
2761
  {
2553
2762
  label: levelLabel[level],
@@ -2556,7 +2765,7 @@ function CardSheet({ card, state, lang, ui, onChange, onDelete, onClose }) {
2556
2765
  },
2557
2766
  level
2558
2767
  )) }) }),
2559
- /* @__PURE__ */ jsx18(DetailSection, { title: ui.risk, subtitle: ui.riskHint, children: /* @__PURE__ */ jsx18("div", { className: "pt-panel-row", children: LEVELS.map((level) => /* @__PURE__ */ jsx18(
2768
+ /* @__PURE__ */ jsx19(DetailSection, { title: ui.risk, subtitle: ui.riskHint, children: /* @__PURE__ */ jsx19("div", { className: "pt-panel-row", children: LEVELS.map((level) => /* @__PURE__ */ jsx19(
2560
2769
  FilterChip,
2561
2770
  {
2562
2771
  label: levelLabel[level],
@@ -2565,7 +2774,7 @@ function CardSheet({ card, state, lang, ui, onChange, onDelete, onClose }) {
2565
2774
  },
2566
2775
  level
2567
2776
  )) }) }),
2568
- /* @__PURE__ */ jsx18(DetailSection, { title: ui.dependsOn, children: /* @__PURE__ */ jsx18("div", { className: "pt-panel-row", children: OWNERS.map((owner) => /* @__PURE__ */ jsx18(
2777
+ /* @__PURE__ */ jsx19(DetailSection, { title: ui.dependsOn, children: /* @__PURE__ */ jsx19("div", { className: "pt-panel-row", children: OWNERS.map((owner) => /* @__PURE__ */ jsx19(
2569
2778
  FilterChip,
2570
2779
  {
2571
2780
  label: ownerLabel[owner],
@@ -2574,14 +2783,14 @@ function CardSheet({ card, state, lang, ui, onChange, onDelete, onClose }) {
2574
2783
  },
2575
2784
  owner
2576
2785
  )) }) }),
2577
- /* @__PURE__ */ jsx18(DetailSection, { title: ui.orderTitle, children: /* @__PURE__ */ jsxs16("div", { className: "pt-panel-row", children: [
2578
- /* @__PURE__ */ jsx18(FilterChip, { label: `\u26A1 ${ui.orderOn}`, active: card.order, onClick: () => patch({ order: true }) }),
2579
- /* @__PURE__ */ jsx18(FilterChip, { label: ui.orderOff, active: !card.order, onClick: () => patch({ order: false }) })
2786
+ /* @__PURE__ */ jsx19(DetailSection, { title: ui.orderTitle, children: /* @__PURE__ */ jsxs17("div", { className: "pt-panel-row", children: [
2787
+ /* @__PURE__ */ jsx19(FilterChip, { label: `\u26A1 ${ui.orderOn}`, active: card.order, onClick: () => patch({ order: true }) }),
2788
+ /* @__PURE__ */ jsx19(FilterChip, { label: ui.orderOff, active: !card.order, onClick: () => patch({ order: false }) })
2580
2789
  ] }) }),
2581
- /* @__PURE__ */ jsxs16(DetailSection, { title: ui.intentTitle, subtitle: ui.intentHint, children: [
2582
- /* @__PURE__ */ jsxs16("div", { className: "pt-panel-row", children: [
2583
- /* @__PURE__ */ jsx18(FilterChip, { label: ui.intentNone, active: card.intent === null, onClick: () => patch({ intent: null }) }),
2584
- INTENTS.map((intent) => /* @__PURE__ */ jsx18(
2790
+ /* @__PURE__ */ jsxs17(DetailSection, { title: ui.intentTitle, subtitle: ui.intentHint, children: [
2791
+ /* @__PURE__ */ jsxs17("div", { className: "pt-panel-row", children: [
2792
+ /* @__PURE__ */ jsx19(FilterChip, { label: ui.intentNone, active: card.intent === null, onClick: () => patch({ intent: null }) }),
2793
+ INTENTS.map((intent) => /* @__PURE__ */ jsx19(
2585
2794
  FilterChip,
2586
2795
  {
2587
2796
  label: INTENT_COPY[intent].label[lang],
@@ -2591,12 +2800,12 @@ function CardSheet({ card, state, lang, ui, onChange, onDelete, onClose }) {
2591
2800
  intent
2592
2801
  ))
2593
2802
  ] }),
2594
- card.intent && /* @__PURE__ */ jsx18("p", { className: "pt-panel-text pt-meaning", children: INTENT_COPY[card.intent].meaning[lang] })
2803
+ card.intent && /* @__PURE__ */ jsx19("p", { className: "pt-panel-text pt-meaning", children: INTENT_COPY[card.intent].meaning[lang] })
2595
2804
  ] }),
2596
- /* @__PURE__ */ jsxs16(DetailSection, { title: ui.checklist, children: [
2597
- card.checks.length > 0 && /* @__PURE__ */ jsx18("ul", { className: "pt-checks", children: card.checks.map((check) => /* @__PURE__ */ jsxs16("li", { children: [
2598
- /* @__PURE__ */ jsxs16("label", { children: [
2599
- /* @__PURE__ */ jsx18(
2805
+ /* @__PURE__ */ jsxs17(DetailSection, { title: ui.checklist, children: [
2806
+ card.checks.length > 0 && /* @__PURE__ */ jsx19("ul", { className: "pt-checks", children: card.checks.map((check) => /* @__PURE__ */ jsxs17("li", { children: [
2807
+ /* @__PURE__ */ jsxs17("label", { children: [
2808
+ /* @__PURE__ */ jsx19(
2600
2809
  "input",
2601
2810
  {
2602
2811
  type: "checkbox",
@@ -2608,9 +2817,9 @@ function CardSheet({ card, state, lang, ui, onChange, onDelete, onClose }) {
2608
2817
  })
2609
2818
  }
2610
2819
  ),
2611
- /* @__PURE__ */ jsx18("span", { className: check.done ? "is-done" : void 0, children: text(check.text, lang) })
2820
+ /* @__PURE__ */ jsx19("span", { className: check.done ? "is-done" : void 0, children: text(check.text, lang) })
2612
2821
  ] }),
2613
- /* @__PURE__ */ jsx18(
2822
+ /* @__PURE__ */ jsx19(
2614
2823
  "button",
2615
2824
  {
2616
2825
  type: "button",
@@ -2621,8 +2830,8 @@ function CardSheet({ card, state, lang, ui, onChange, onDelete, onClose }) {
2621
2830
  }
2622
2831
  )
2623
2832
  ] }, check.id)) }),
2624
- /* @__PURE__ */ jsxs16("div", { className: "pt-compose", children: [
2625
- /* @__PURE__ */ jsx18(
2833
+ /* @__PURE__ */ jsxs17("div", { className: "pt-compose", children: [
2834
+ /* @__PURE__ */ jsx19(
2626
2835
  "input",
2627
2836
  {
2628
2837
  className: "pt-input",
@@ -2637,19 +2846,19 @@ function CardSheet({ card, state, lang, ui, onChange, onDelete, onClose }) {
2637
2846
  }
2638
2847
  }
2639
2848
  ),
2640
- /* @__PURE__ */ jsx18("button", { type: "button", className: "pt-btn pt-btn--sm pt-btn--primary", onClick: addStep, children: ui.addStep })
2849
+ /* @__PURE__ */ jsx19("button", { type: "button", className: "pt-btn pt-btn--sm pt-btn--primary", onClick: addStep, children: ui.addStep })
2641
2850
  ] })
2642
2851
  ] }),
2643
- /* @__PURE__ */ jsxs16(DetailSection, { title: ui.notes, children: [
2644
- card.notes.map((entry) => /* @__PURE__ */ jsxs16("div", { className: "pt-note", children: [
2645
- /* @__PURE__ */ jsxs16("p", { className: "pt-note__meta", children: [
2852
+ /* @__PURE__ */ jsxs17(DetailSection, { title: ui.notes, children: [
2853
+ card.notes.map((entry) => /* @__PURE__ */ jsxs17("div", { className: "pt-note", children: [
2854
+ /* @__PURE__ */ jsxs17("p", { className: "pt-note__meta", children: [
2646
2855
  entry.by === "claude" ? "Claude" : ui.ownerYou,
2647
2856
  " \xB7 ",
2648
2857
  entry.date
2649
2858
  ] }),
2650
- /* @__PURE__ */ jsx18("p", { className: "pt-panel-text", children: text(entry.text, lang) })
2859
+ /* @__PURE__ */ jsx19("p", { className: "pt-panel-text", children: text(entry.text, lang) })
2651
2860
  ] }, entry.id)),
2652
- /* @__PURE__ */ jsx18(
2861
+ /* @__PURE__ */ jsx19(
2653
2862
  "textarea",
2654
2863
  {
2655
2864
  className: "pt-textarea",
@@ -2659,10 +2868,10 @@ function CardSheet({ card, state, lang, ui, onChange, onDelete, onClose }) {
2659
2868
  onChange: (event) => setNote(event.target.value)
2660
2869
  }
2661
2870
  ),
2662
- /* @__PURE__ */ jsx18("button", { type: "button", className: "pt-btn pt-btn--sm pt-btn--primary", onClick: addNote, children: ui.leaveNote })
2871
+ /* @__PURE__ */ jsx19("button", { type: "button", className: "pt-btn pt-btn--sm pt-btn--primary", onClick: addNote, children: ui.leaveNote })
2663
2872
  ] }),
2664
- /* @__PURE__ */ jsxs16(DetailSection, { title: ui.columnTitle, children: [
2665
- /* @__PURE__ */ jsx18("div", { className: "pt-panel-row", children: state.columns.map((column) => /* @__PURE__ */ jsx18(
2873
+ /* @__PURE__ */ jsxs17(DetailSection, { title: ui.columnTitle, children: [
2874
+ /* @__PURE__ */ jsx19("div", { className: "pt-panel-row", children: state.columns.map((column) => /* @__PURE__ */ jsx19(
2666
2875
  FilterChip,
2667
2876
  {
2668
2877
  label: text(column.title, lang),
@@ -2673,16 +2882,16 @@ function CardSheet({ card, state, lang, ui, onChange, onDelete, onClose }) {
2673
2882
  },
2674
2883
  column.id
2675
2884
  )) }),
2676
- (card.startedAt || card.completedAt) && /* @__PURE__ */ jsxs16("p", { className: "pt-panel-text pt-stamps", children: [
2885
+ (card.startedAt || card.completedAt) && /* @__PURE__ */ jsxs17("p", { className: "pt-panel-text pt-stamps", children: [
2677
2886
  card.startedAt && `${ui.started}: ${card.startedAt}`,
2678
2887
  card.startedAt && card.completedAt && " \xB7 ",
2679
2888
  card.completedAt && `${ui.completed}: ${card.completedAt}`
2680
2889
  ] }),
2681
- claimedWithoutStarting(card) && /* @__PURE__ */ jsx18("p", { className: "pt-warn", children: ui.neverStarted })
2890
+ claimedWithoutStarting(card) && /* @__PURE__ */ jsx19("p", { className: "pt-warn", children: ui.neverStarted })
2682
2891
  ] }),
2683
- /* @__PURE__ */ jsxs16("div", { className: "pt-sheet-actions", children: [
2684
- /* @__PURE__ */ jsx18("button", { type: "button", className: "pt-btn pt-btn--sm", onClick: onClose, children: ui.close }),
2685
- /* @__PURE__ */ jsx18("button", { type: "button", className: "pt-btn pt-btn--sm pt-danger", onClick: () => onDelete(card.id), children: ui.deleteCard })
2892
+ /* @__PURE__ */ jsxs17("div", { className: "pt-sheet-actions", children: [
2893
+ /* @__PURE__ */ jsx19("button", { type: "button", className: "pt-btn pt-btn--sm", onClick: onClose, children: ui.close }),
2894
+ /* @__PURE__ */ jsx19("button", { type: "button", className: "pt-btn pt-btn--sm pt-danger", onClick: () => onDelete(card.id), children: ui.deleteCard })
2686
2895
  ] })
2687
2896
  ] });
2688
2897
  }
@@ -2706,10 +2915,45 @@ function applyMove(cards, move, visible) {
2706
2915
  const at = rest.findIndex((card) => card.id === anchor.id);
2707
2916
  return [...rest.slice(0, at), moved, ...rest.slice(at)];
2708
2917
  }
2918
+ function resolveTheme(saved, stored, themes, hasImported, fallback) {
2919
+ for (const name of [saved, stored]) {
2920
+ if (name === "imported" && hasImported) return "imported";
2921
+ if (name && name in themes) return name;
2922
+ }
2923
+ return fallback ?? Object.keys(themes)[0];
2924
+ }
2709
2925
 
2710
2926
  // src/panel/PanelApp.tsx
2711
- import { Fragment as Fragment5, jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
2927
+ import { Fragment as Fragment5, jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
2712
2928
  var IMPORTED = "imported";
2929
+ var WIZARD_KEY = "paneltir:setup-done";
2930
+ var THEME_KEY = "paneltir:theme";
2931
+ function readStoredTheme() {
2932
+ try {
2933
+ return window.localStorage.getItem(THEME_KEY);
2934
+ } catch {
2935
+ return null;
2936
+ }
2937
+ }
2938
+ function storeTheme(name) {
2939
+ try {
2940
+ window.localStorage.setItem(THEME_KEY, name);
2941
+ } catch {
2942
+ }
2943
+ }
2944
+ function wizardClosed() {
2945
+ try {
2946
+ return window.localStorage.getItem(WIZARD_KEY) === "closed";
2947
+ } catch {
2948
+ return false;
2949
+ }
2950
+ }
2951
+ function closeWizard() {
2952
+ try {
2953
+ window.localStorage.setItem(WIZARD_KEY, "closed");
2954
+ } catch {
2955
+ }
2956
+ }
2713
2957
  function parseJson(body) {
2714
2958
  try {
2715
2959
  const parsed = JSON.parse(body);
@@ -2731,7 +2975,8 @@ var PRIORITY_TONE = {
2731
2975
  };
2732
2976
  function PanelApp({
2733
2977
  state: initialState,
2734
- themes = PRESET_PANEL_THEMES,
2978
+ themes: exactThemes,
2979
+ extraThemes,
2735
2980
  defaultTheme,
2736
2981
  brand,
2737
2982
  decoration,
@@ -2748,35 +2993,41 @@ function PanelApp({
2748
2993
  marketplaceReport,
2749
2994
  fingerprint
2750
2995
  }) {
2751
- const [themeName, setThemeName] = useState9(() => {
2752
- const saved = initialState.preferences?.theme;
2753
- if (saved === IMPORTED && initialState.importedTheme) return IMPORTED;
2754
- return saved && saved in themes ? saved : defaultTheme ?? Object.keys(themes)[0];
2755
- });
2756
- const [lang, setLang] = useState9(
2996
+ const themes = useMemo5(() => offeredThemes(exactThemes, extraThemes), [exactThemes, extraThemes]);
2997
+ const [themeName, setThemeName] = useState10(
2998
+ () => resolveTheme(
2999
+ initialState.preferences?.theme,
3000
+ readStoredTheme(),
3001
+ themes,
3002
+ Boolean(initialState.importedTheme),
3003
+ defaultTheme
3004
+ )
3005
+ );
3006
+ const [lang, setLang] = useState10(
2757
3007
  () => initialState.preferences?.lang ?? (showLanguage ? readStoredLang() : "en")
2758
3008
  );
2759
- const [state, setState] = useState9(initialState);
2760
- const [filter, setFilter] = useState9("all");
2761
- const [openCardId, setOpenCardId] = useState9(null);
2762
- const [settingsOpen, setSettingsOpen] = useState9(false);
2763
- const [update, setUpdate] = useState9(null);
2764
- const [helpOpen, setHelpOpen] = useState9(false);
2765
- const [setup, setSetup] = useState9(null);
2766
- const [signOut, setSignOut] = useState9("idle");
2767
- const [view, setView] = useState9("board");
2768
- const [market, setMarket] = useState9(marketplaceReport ?? null);
2769
- const [marketLoading, setMarketLoading] = useState9(false);
2770
- const [marketFailure, setMarketFailure] = useState9(null);
2771
- const [marketAsked, setMarketAsked] = useState9(false);
2772
- const [noticeVisible, setNoticeVisible] = useState9(Boolean(initialState.notice));
2773
- const [savedSnapshot, setSavedSnapshot] = useState9(() => JSON.stringify(initialState));
2774
- const [save, setSave] = useState9({ status: "idle" });
3009
+ const [state, setState] = useState10(initialState);
3010
+ const [filter, setFilter] = useState10("all");
3011
+ const [openCardId, setOpenCardId] = useState10(null);
3012
+ const [settingsOpen, setSettingsOpen] = useState10(false);
3013
+ const [update, setUpdate] = useState10(null);
3014
+ const [releaseOpen, setReleaseOpen] = useState10(false);
3015
+ const [helpOpen, setHelpOpen] = useState10(false);
3016
+ const [wizardOpen, setWizardOpen] = useState10(false);
3017
+ const [setup, setSetup] = useState10(null);
3018
+ const [signOut, setSignOut] = useState10("idle");
3019
+ const [view, setView] = useState10("board");
3020
+ const [market, setMarket] = useState10(marketplaceReport ?? null);
3021
+ const [marketLoading, setMarketLoading] = useState10(false);
3022
+ const [marketFailure, setMarketFailure] = useState10(null);
3023
+ const [marketAsked, setMarketAsked] = useState10(false);
3024
+ const [noticeVisible, setNoticeVisible] = useState10(Boolean(initialState.notice));
3025
+ const [savedSnapshot, setSavedSnapshot] = useState10(() => JSON.stringify(initialState));
3026
+ const [save, setSave] = useState10({ status: "idle" });
2775
3027
  const imported = themeName === IMPORTED ? state.importedTheme : void 0;
2776
- const preset = themeName === IMPORTED ? "nightCity" : themeName;
2777
- const chosen = themes[preset] ?? Object.values(themes)[0];
3028
+ const chosen = themes[themeName] ?? Object.values(themes)[0];
2778
3029
  const theme = imported?.tokens ?? chosen.tokens;
2779
- const form = imported?.form ?? chosen.form;
3030
+ const form = imported?.form ?? (imported ? THEME_FORMS.panel : chosen.form);
2780
3031
  const ui = UI[lang];
2781
3032
  const t = useCallback5((value) => text(value, lang), [lang]);
2782
3033
  const dirty = JSON.stringify(state) !== savedSnapshot;
@@ -2800,11 +3051,11 @@ function PanelApp({
2800
3051
  status: state_("GH_TOKEN"),
2801
3052
  variable: "GH_TOKEN",
2802
3053
  enables: ui.needTokenEnables,
2803
- fix: /* @__PURE__ */ jsxs17("ol", { children: [
2804
- /* @__PURE__ */ jsx19("li", { children: ui.fixTokenCreate }),
2805
- /* @__PURE__ */ jsx19("li", { children: ui.fixTokenScope }),
2806
- /* @__PURE__ */ jsx19("li", { children: ui.fixTokenPaste }),
2807
- /* @__PURE__ */ jsx19("li", { children: ui.fixTokenRedeploy })
3054
+ fix: /* @__PURE__ */ jsxs18("ol", { children: [
3055
+ /* @__PURE__ */ jsx20("li", { children: ui.fixTokenCreate }),
3056
+ /* @__PURE__ */ jsx20("li", { children: ui.fixTokenScope }),
3057
+ /* @__PURE__ */ jsx20("li", { children: ui.fixTokenPaste }),
3058
+ /* @__PURE__ */ jsx20("li", { children: ui.fixTokenRedeploy })
2808
3059
  ] })
2809
3060
  },
2810
3061
  {
@@ -2813,7 +3064,7 @@ function PanelApp({
2813
3064
  status: state_("PANEL_REPO"),
2814
3065
  variable: "PANEL_REPO",
2815
3066
  enables: ui.needRepoEnables,
2816
- fix: /* @__PURE__ */ jsx19("p", { children: ui.fixRepo })
3067
+ fix: /* @__PURE__ */ jsx20("p", { children: ui.fixRepo })
2817
3068
  }
2818
3069
  ];
2819
3070
  }, [setup, ui]);
@@ -2974,6 +3225,29 @@ function PanelApp({
2974
3225
  setState((current) => ({ ...current, updatedAt: today(), cards: [...current.cards, card] }));
2975
3226
  setOpenCardId(id);
2976
3227
  }, [update, state.cards, state.areas, state.preferences?.updateAsOrder]);
3228
+ const requestReport = useCallback5(
3229
+ (section) => {
3230
+ const id = `report-${section}-${today()}`;
3231
+ if (state.cards.some((card2) => card2.id === id)) {
3232
+ setOpenCardId(id);
3233
+ return;
3234
+ }
3235
+ const card = {
3236
+ ...emptyCard("next", state.areas[0]?.id ?? "general"),
3237
+ id,
3238
+ title: { en: UI.en.analysisRedoTitle[section], es: UI.es.analysisRedoTitle[section] },
3239
+ body: { en: UI.en.analysisRedoBody[section], es: UI.es.analysisRedoBody[section] },
3240
+ priority: "medium",
3241
+ risk: "low",
3242
+ owner: "claude",
3243
+ order: true,
3244
+ intent: "do"
3245
+ };
3246
+ setState((current) => ({ ...current, updatedAt: today(), cards: [...current.cards, card] }));
3247
+ setOpenCardId(id);
3248
+ },
3249
+ [state.cards, state.areas]
3250
+ );
2977
3251
  const moveCard = useCallback5(
2978
3252
  (move) => {
2979
3253
  setState((current) => {
@@ -3009,6 +3283,7 @@ function PanelApp({
3009
3283
  const chooseTheme = useCallback5(
3010
3284
  (name) => {
3011
3285
  setThemeName(name);
3286
+ storeTheme(name);
3012
3287
  setPreference("theme", name);
3013
3288
  },
3014
3289
  [setPreference]
@@ -3097,24 +3372,45 @@ function PanelApp({
3097
3372
  if (!checkForUpdates || !fingerprint?.version) return;
3098
3373
  let cancelled = false;
3099
3374
  void checkForUpdate(fingerprint.version).then((status2) => {
3100
- if (!cancelled) setUpdate(status2);
3375
+ if (cancelled) return;
3376
+ setUpdate(status2);
3377
+ if (!status2?.behind) return;
3378
+ try {
3379
+ const key = "pt_release_seen";
3380
+ if (window.localStorage.getItem(key) !== status2.latest) {
3381
+ window.localStorage.setItem(key, status2.latest);
3382
+ setReleaseOpen(true);
3383
+ }
3384
+ } catch {
3385
+ setReleaseOpen(true);
3386
+ }
3101
3387
  });
3102
3388
  return () => {
3103
3389
  cancelled = true;
3104
3390
  };
3105
3391
  }, [checkForUpdates, fingerprint?.version]);
3392
+ const readSetup = useCallback5(async () => {
3393
+ if (!saveEndpoint) return;
3394
+ try {
3395
+ const response = await fetch(saveEndpoint, { headers: { accept: "application/json" } });
3396
+ if (!response.ok) throw new Error(String(response.status));
3397
+ setSetup(await response.json());
3398
+ } catch {
3399
+ setSetup({ ready: false, missing: [], repo: null, branch: "", file: "", unknown: true });
3400
+ }
3401
+ }, [saveEndpoint]);
3106
3402
  useEffect9(() => {
3107
3403
  if (!helpOpen || !saveEndpoint || setup) return;
3108
- let cancelled = false;
3109
- fetch(saveEndpoint, { headers: { accept: "application/json" } }).then((response) => response.ok ? response.json() : Promise.reject(new Error(String(response.status)))).then((body) => {
3110
- if (!cancelled) setSetup(body);
3111
- }).catch(() => {
3112
- if (!cancelled) setSetup({ ready: false, missing: [], repo: null, branch: "", file: "", unknown: true });
3113
- });
3114
- return () => {
3115
- cancelled = true;
3116
- };
3117
- }, [helpOpen, saveEndpoint, setup]);
3404
+ void readSetup();
3405
+ }, [helpOpen, saveEndpoint, setup, readSetup]);
3406
+ useEffect9(() => {
3407
+ if (!saveEndpoint || setup || !isFirstRun(initialState)) return;
3408
+ void readSetup();
3409
+ }, [saveEndpoint, setup, initialState, readSetup]);
3410
+ useEffect9(() => {
3411
+ if (!setup || setup.ready || !isFirstRun(initialState) || wizardClosed()) return;
3412
+ setWizardOpen(true);
3413
+ }, [setup, initialState]);
3118
3414
  const endSession = useCallback5(async () => {
3119
3415
  setSignOut("working");
3120
3416
  try {
@@ -3142,7 +3438,8 @@ function PanelApp({
3142
3438
  const conflict = response.status === 409;
3143
3439
  throw Object.assign(new Error(saveError(response.status, data, body)), { conflict });
3144
3440
  }
3145
- setSavedSnapshot(JSON.stringify(state));
3441
+ setSavedSnapshot(JSON.stringify(next));
3442
+ setState(next);
3146
3443
  setSave({
3147
3444
  status: "saved",
3148
3445
  at: (/* @__PURE__ */ new Date()).toLocaleTimeString(lang === "es" ? "es-ES" : "en-GB", {
@@ -3177,21 +3474,21 @@ function PanelApp({
3177
3474
  state.updatedAt,
3178
3475
  save.status === "saved" ? ui.savedAt(save.at) : dirty ? ui.unsaved : ""
3179
3476
  ].filter(Boolean).join(" \xB7 ");
3180
- return /* @__PURE__ */ jsxs17(DashboardThemeProvider, { tokens: theme, form, className, children: [
3181
- decoration,
3182
- /* @__PURE__ */ jsx19(
3477
+ return /* @__PURE__ */ jsxs18(DashboardThemeProvider, { tokens: theme, form, className, children: [
3478
+ typeof decoration === "function" ? decoration(themeName) : decoration,
3479
+ /* @__PURE__ */ jsx20(
3183
3480
  DashboardHeader,
3184
3481
  {
3185
3482
  wordmark: (
3186
3483
  /* A board belongs to a project, so its name is what goes here. A
3187
3484
  caller with a mark of its own passes `brand`; drawing one here
3188
3485
  would be the kit deciding what somebody else's panel is called. */
3189
- brand ?? /* @__PURE__ */ jsx19("span", { className: "pt-panel-brand", children: state.project })
3486
+ brand ?? /* @__PURE__ */ jsx20("span", { className: "pt-panel-brand", children: state.project })
3190
3487
  ),
3191
3488
  status,
3192
- controls: /* @__PURE__ */ jsxs17(Fragment5, { children: [
3193
- (initialState.analysis || hasMarketplace || showHistory) && /* @__PURE__ */ jsxs17("span", { className: "pt-views", children: [
3194
- /* @__PURE__ */ jsx19(
3489
+ controls: /* @__PURE__ */ jsxs18(Fragment5, { children: [
3490
+ (initialState.analysis || hasMarketplace || showHistory) && /* @__PURE__ */ jsxs18("span", { className: "pt-views", children: [
3491
+ /* @__PURE__ */ jsx20(
3195
3492
  "button",
3196
3493
  {
3197
3494
  type: "button",
@@ -3201,7 +3498,7 @@ function PanelApp({
3201
3498
  children: ui.board
3202
3499
  }
3203
3500
  ),
3204
- initialState.analysis && /* @__PURE__ */ jsx19(
3501
+ initialState.analysis && /* @__PURE__ */ jsx20(
3205
3502
  "button",
3206
3503
  {
3207
3504
  type: "button",
@@ -3211,7 +3508,7 @@ function PanelApp({
3211
3508
  children: ui.analysis
3212
3509
  }
3213
3510
  ),
3214
- hasMarketplace && /* @__PURE__ */ jsx19(
3511
+ hasMarketplace && /* @__PURE__ */ jsx20(
3215
3512
  "button",
3216
3513
  {
3217
3514
  type: "button",
@@ -3221,7 +3518,7 @@ function PanelApp({
3221
3518
  children: ui.marketplace
3222
3519
  }
3223
3520
  ),
3224
- showHistory && /* @__PURE__ */ jsx19(
3521
+ showHistory && /* @__PURE__ */ jsx20(
3225
3522
  "button",
3226
3523
  {
3227
3524
  type: "button",
@@ -3232,7 +3529,7 @@ function PanelApp({
3232
3529
  }
3233
3530
  )
3234
3531
  ] }),
3235
- showLanguage && LANGS.map((code) => /* @__PURE__ */ jsx19(
3532
+ showLanguage && LANGS.map((code) => /* @__PURE__ */ jsx20(
3236
3533
  "button",
3237
3534
  {
3238
3535
  type: "button",
@@ -3243,7 +3540,7 @@ function PanelApp({
3243
3540
  },
3244
3541
  code
3245
3542
  )),
3246
- /* @__PURE__ */ jsx19(
3543
+ /* @__PURE__ */ jsx20(
3247
3544
  NotificationBell,
3248
3545
  {
3249
3546
  notifications,
@@ -3257,8 +3554,8 @@ function PanelApp({
3257
3554
  }
3258
3555
  }
3259
3556
  ),
3260
- saveEndpoint && /* @__PURE__ */ jsx19("button", { type: "button", className: "pt-lang", onClick: () => setHelpOpen(true), children: ui.help }),
3261
- saveEndpoint && (dirty || save.status === "saving") && /* @__PURE__ */ jsx19(
3557
+ saveEndpoint && /* @__PURE__ */ jsx20("button", { type: "button", className: "pt-lang", onClick: () => setHelpOpen(true), children: ui.help }),
3558
+ saveEndpoint && (dirty || save.status === "saving") && /* @__PURE__ */ jsx20(
3262
3559
  "button",
3263
3560
  {
3264
3561
  type: "button",
@@ -3273,7 +3570,7 @@ function PanelApp({
3273
3570
  onLinkClick: () => setSettingsOpen(true)
3274
3571
  }
3275
3572
  ),
3276
- state.notice && /* @__PURE__ */ jsx19(
3573
+ state.notice && /* @__PURE__ */ jsx20(
3277
3574
  AlertBanner,
3278
3575
  {
3279
3576
  visible: noticeVisible,
@@ -3282,8 +3579,17 @@ function PanelApp({
3282
3579
  onAction: () => setNoticeVisible(false)
3283
3580
  }
3284
3581
  ),
3285
- save.status === "error" && /* @__PURE__ */ jsx19(AlertBanner, { visible: true, message: `${ui.saveFailed}: ${save.message}` }),
3286
- view === "board" && !saveEndpoint && /* @__PURE__ */ jsx19(
3582
+ save.status === "error" && /* @__PURE__ */ jsx20(AlertBanner, { visible: true, message: `${ui.saveFailed}: ${save.message}` }),
3583
+ saveEndpoint && setup && !setup.ready && !setup.unknown && !wizardOpen && /* @__PURE__ */ jsx20(
3584
+ AlertBanner,
3585
+ {
3586
+ visible: true,
3587
+ message: ui.wizardBanner,
3588
+ actionLabel: ui.wizardOpen,
3589
+ onAction: () => setWizardOpen(true)
3590
+ }
3591
+ ),
3592
+ view === "board" && !saveEndpoint && /* @__PURE__ */ jsx20(
3287
3593
  GuideTour,
3288
3594
  {
3289
3595
  dismissed: state.preferences?.guideDismissed,
@@ -3292,32 +3598,32 @@ function PanelApp({
3292
3598
  {
3293
3599
  id: "demo-welcome",
3294
3600
  title: ui.demoTourWelcomeTitle,
3295
- children: /* @__PURE__ */ jsx19("p", { children: ui.demoTourWelcomeBody }),
3601
+ children: /* @__PURE__ */ jsx20("p", { children: ui.demoTourWelcomeBody }),
3296
3602
  dismissLabel: ui.gotIt
3297
3603
  },
3298
3604
  {
3299
3605
  id: "demo-board",
3300
3606
  title: ui.demoTourBoardTitle,
3301
- children: /* @__PURE__ */ jsx19("p", { children: ui.demoTourBoardBody }),
3607
+ children: /* @__PURE__ */ jsx20("p", { children: ui.demoTourBoardBody }),
3302
3608
  dismissLabel: ui.gotIt
3303
3609
  },
3304
3610
  {
3305
3611
  id: "demo-theme",
3306
3612
  title: ui.demoTourThemeTitle,
3307
- children: /* @__PURE__ */ jsx19("p", { children: ui.demoTourThemeBody }),
3613
+ children: /* @__PURE__ */ jsx20("p", { children: ui.demoTourThemeBody }),
3308
3614
  dismissLabel: ui.gotIt,
3309
3615
  action: { label: ui.settings, onClick: () => setSettingsOpen(true) }
3310
3616
  },
3311
3617
  {
3312
3618
  id: "demo-keep",
3313
3619
  title: ui.demoTourKeepTitle,
3314
- children: /* @__PURE__ */ jsx19("p", { children: ui.demoTourKeepBody }),
3620
+ children: /* @__PURE__ */ jsx20("p", { children: ui.demoTourKeepBody }),
3315
3621
  dismissLabel: ui.gotIt
3316
3622
  }
3317
3623
  ]
3318
3624
  }
3319
3625
  ),
3320
- view === "board" && saveEndpoint && /* @__PURE__ */ jsx19(
3626
+ view === "board" && saveEndpoint && /* @__PURE__ */ jsx20(
3321
3627
  GuideTour,
3322
3628
  {
3323
3629
  dismissed: state.preferences?.guideDismissed,
@@ -3326,38 +3632,38 @@ function PanelApp({
3326
3632
  {
3327
3633
  id: "welcome",
3328
3634
  title: ui.tourWelcomeTitle,
3329
- children: /* @__PURE__ */ jsx19("p", { children: ui.tourWelcomeBody }),
3635
+ children: /* @__PURE__ */ jsx20("p", { children: ui.tourWelcomeBody }),
3330
3636
  dismissLabel: ui.gotIt
3331
3637
  },
3332
3638
  {
3333
3639
  id: "board",
3334
3640
  title: ui.tourBoardTitle,
3335
- children: /* @__PURE__ */ jsx19("p", { children: ui.tourBoardBody }),
3641
+ children: /* @__PURE__ */ jsx20("p", { children: ui.tourBoardBody }),
3336
3642
  dismissLabel: ui.gotIt
3337
3643
  },
3338
3644
  {
3339
3645
  id: "orders",
3340
3646
  title: ui.tourOrdersTitle,
3341
- children: /* @__PURE__ */ jsx19("p", { children: ui.tourOrdersBody }),
3647
+ children: /* @__PURE__ */ jsx20("p", { children: ui.tourOrdersBody }),
3342
3648
  dismissLabel: ui.gotIt
3343
3649
  },
3344
3650
  {
3345
3651
  id: "save",
3346
3652
  title: ui.tourSaveTitle,
3347
- children: /* @__PURE__ */ jsx19("p", { children: ui.tourSaveBody }),
3653
+ children: /* @__PURE__ */ jsx20("p", { children: ui.tourSaveBody }),
3348
3654
  dismissLabel: ui.gotIt
3349
3655
  },
3350
3656
  {
3351
3657
  id: "theme",
3352
3658
  title: ui.tourThemeTitle,
3353
- children: /* @__PURE__ */ jsx19("p", { children: ui.tourThemeBody }),
3659
+ children: /* @__PURE__ */ jsx20("p", { children: ui.tourThemeBody }),
3354
3660
  dismissLabel: ui.gotIt,
3355
3661
  action: { label: ui.settings, onClick: () => setSettingsOpen(true) }
3356
3662
  }
3357
3663
  ]
3358
3664
  }
3359
3665
  ),
3360
- view === "marketplace" && hasMarketplace && /* @__PURE__ */ jsx19(
3666
+ view === "marketplace" && hasMarketplace && /* @__PURE__ */ jsx20(
3361
3667
  MarketplaceView,
3362
3668
  {
3363
3669
  report: market,
@@ -3368,9 +3674,10 @@ function PanelApp({
3368
3674
  onRefresh: marketplaceEndpoint ? () => loadMarketplace(true) : void 0
3369
3675
  }
3370
3676
  ),
3371
- view === "analysis" && state.analysis && /* @__PURE__ */ jsx19(
3677
+ view === "analysis" && state.analysis && /* @__PURE__ */ jsx20(
3372
3678
  AnalysisView,
3373
3679
  {
3680
+ onRequestReport: saveEndpoint ? requestReport : void 0,
3374
3681
  analysis: state.analysis,
3375
3682
  cards: state.cards,
3376
3683
  columns: state.columns,
@@ -3383,20 +3690,20 @@ function PanelApp({
3383
3690
  onOpenCard: setOpenCardId
3384
3691
  }
3385
3692
  ),
3386
- view === "board" && /* @__PURE__ */ jsxs17(Fragment5, { children: [
3387
- /* @__PURE__ */ jsxs17("div", { className: "pt-panel-page", children: [
3388
- /* @__PURE__ */ jsxs17(StatTileGrid, { children: [
3389
- /* @__PURE__ */ jsx19(StatTile, { label: ui.statOpen, value: counts.open, isZero: counts.open === 0 }),
3390
- /* @__PURE__ */ jsx19(StatTile, { label: ui.statOrders, value: counts.orders, tone: "warning", isZero: counts.orders === 0 }),
3391
- /* @__PURE__ */ jsx19(StatTile, { label: ui.statYours, value: counts.yours, tone: "danger", isZero: counts.yours === 0 }),
3392
- /* @__PURE__ */ jsx19(StatTile, { label: ui.statDecisions, value: counts.decisions, tone: "warning", isZero: counts.decisions === 0 }),
3393
- /* @__PURE__ */ jsx19(StatTile, { label: ui.statHighRisk, value: counts.highRisk, tone: "danger", isZero: counts.highRisk === 0 }),
3394
- /* @__PURE__ */ jsx19(StatTile, { label: ui.statDone, value: counts.done, tone: "success", isZero: counts.done === 0 })
3693
+ view === "board" && /* @__PURE__ */ jsxs18(Fragment5, { children: [
3694
+ /* @__PURE__ */ jsxs18("div", { className: "pt-panel-page", children: [
3695
+ /* @__PURE__ */ jsxs18(StatTileGrid, { children: [
3696
+ /* @__PURE__ */ jsx20(StatTile, { label: ui.statOpen, value: counts.open, isZero: counts.open === 0 }),
3697
+ /* @__PURE__ */ jsx20(StatTile, { label: ui.statOrders, value: counts.orders, tone: "warning", isZero: counts.orders === 0 }),
3698
+ /* @__PURE__ */ jsx20(StatTile, { label: ui.statYours, value: counts.yours, tone: "danger", isZero: counts.yours === 0 }),
3699
+ /* @__PURE__ */ jsx20(StatTile, { label: ui.statDecisions, value: counts.decisions, tone: "warning", isZero: counts.decisions === 0 }),
3700
+ /* @__PURE__ */ jsx20(StatTile, { label: ui.statHighRisk, value: counts.highRisk, tone: "danger", isZero: counts.highRisk === 0 }),
3701
+ /* @__PURE__ */ jsx20(StatTile, { label: ui.statDone, value: counts.done, tone: "success", isZero: counts.done === 0 })
3395
3702
  ] }),
3396
- /* @__PURE__ */ jsx19(HealthPillRow, { children: state.health.map((pill) => /* @__PURE__ */ jsx19(HealthPill, { label: t(pill.label), value: t(pill.value), status: pill.status }, t(pill.label))) }),
3397
- /* @__PURE__ */ jsxs17(FilterChipRow, { children: [
3398
- /* @__PURE__ */ jsx19(FilterChip, { label: ui.all, count: state.cards.length, active: filter === "all", onClick: () => setFilter("all") }),
3399
- /* @__PURE__ */ jsx19(
3703
+ /* @__PURE__ */ jsx20(HealthPillRow, { children: state.health.map((pill) => /* @__PURE__ */ jsx20(HealthPill, { label: t(pill.label), value: t(pill.value), status: pill.status }, t(pill.label))) }),
3704
+ /* @__PURE__ */ jsxs18(FilterChipRow, { children: [
3705
+ /* @__PURE__ */ jsx20(FilterChip, { label: ui.all, count: state.cards.length, active: filter === "all", onClick: () => setFilter("all") }),
3706
+ /* @__PURE__ */ jsx20(
3400
3707
  FilterChip,
3401
3708
  {
3402
3709
  label: `\u26A1 ${ui.filterForClaude}`,
@@ -3405,7 +3712,7 @@ function PanelApp({
3405
3712
  onClick: () => setFilter("orders")
3406
3713
  }
3407
3714
  ),
3408
- /* @__PURE__ */ jsx19(
3715
+ /* @__PURE__ */ jsx20(
3409
3716
  FilterChip,
3410
3717
  {
3411
3718
  label: ui.filterYours,
@@ -3414,7 +3721,7 @@ function PanelApp({
3414
3721
  onClick: () => setFilter("yours")
3415
3722
  }
3416
3723
  ),
3417
- /* @__PURE__ */ jsx19(
3724
+ /* @__PURE__ */ jsx20(
3418
3725
  FilterChip,
3419
3726
  {
3420
3727
  label: ui.filterHighRisk,
@@ -3423,7 +3730,7 @@ function PanelApp({
3423
3730
  onClick: () => setFilter("risk")
3424
3731
  }
3425
3732
  ),
3426
- state.areas.map((area) => /* @__PURE__ */ jsx19(
3733
+ state.areas.map((area) => /* @__PURE__ */ jsx20(
3427
3734
  FilterChip,
3428
3735
  {
3429
3736
  label: t(area.label),
@@ -3435,13 +3742,13 @@ function PanelApp({
3435
3742
  ))
3436
3743
  ] })
3437
3744
  ] }),
3438
- /* @__PURE__ */ jsx19(
3745
+ /* @__PURE__ */ jsx20(
3439
3746
  Board,
3440
3747
  {
3441
3748
  columns: boardColumns,
3442
3749
  onMove: moveCard,
3443
3750
  onAddCard: addCard,
3444
- renderCard: (card, index, columnId) => /* @__PURE__ */ jsx19(
3751
+ renderCard: (card, index, columnId) => /* @__PURE__ */ jsx20(
3445
3752
  Card,
3446
3753
  {
3447
3754
  cardId: card.id,
@@ -3458,39 +3765,39 @@ function PanelApp({
3458
3765
  }
3459
3766
  ),
3460
3767
  extras,
3461
- capabilities && capabilities.length > 0 && /* @__PURE__ */ jsxs17("section", { className: "pt-panel-page pt-panel-section", id: "functions", children: [
3462
- /* @__PURE__ */ jsxs17("div", { children: [
3463
- /* @__PURE__ */ jsx19("p", { className: "pt-eyebrow", children: ui.functionsEyebrow }),
3464
- /* @__PURE__ */ jsx19("h2", { className: "pt-h2", children: ui.functionsTitle }),
3465
- /* @__PURE__ */ jsx19("p", { className: "pt-sub", children: ui.functionsIntro })
3768
+ capabilities && capabilities.length > 0 && /* @__PURE__ */ jsxs18("section", { className: "pt-panel-page pt-panel-section", id: "functions", children: [
3769
+ /* @__PURE__ */ jsxs18("div", { children: [
3770
+ /* @__PURE__ */ jsx20("p", { className: "pt-eyebrow", children: ui.functionsEyebrow }),
3771
+ /* @__PURE__ */ jsx20("h2", { className: "pt-h2", children: ui.functionsTitle }),
3772
+ /* @__PURE__ */ jsx20("p", { className: "pt-sub", children: ui.functionsIntro })
3466
3773
  ] }),
3467
- /* @__PURE__ */ jsx19("div", { className: "pt-cap-list", children: capabilities.map((capability) => /* @__PURE__ */ jsxs17("article", { className: "pt-cap pt-hud", children: [
3468
- /* @__PURE__ */ jsx19("h3", { className: "pt-cap__title", children: t(capability.title) }),
3469
- /* @__PURE__ */ jsx19("p", { className: "pt-cap__summary", children: t(capability.summary) }),
3470
- /* @__PURE__ */ jsx19("ul", { className: "pt-cap__list", children: capability.points.map((point) => /* @__PURE__ */ jsx19("li", { children: t(point) }, t(point))) }),
3471
- capability.code && /* @__PURE__ */ jsxs17("div", { className: "pt-cap__code", children: [
3472
- /* @__PURE__ */ jsx19("p", { className: "pt-cap__caption", children: t(capability.code.caption) }),
3473
- /* @__PURE__ */ jsx19("pre", { children: /* @__PURE__ */ jsx19("code", { children: capability.code.body }) })
3774
+ /* @__PURE__ */ jsx20("div", { className: "pt-cap-list", children: capabilities.map((capability) => /* @__PURE__ */ jsxs18("article", { className: "pt-cap pt-hud", children: [
3775
+ /* @__PURE__ */ jsx20("h3", { className: "pt-cap__title", children: t(capability.title) }),
3776
+ /* @__PURE__ */ jsx20("p", { className: "pt-cap__summary", children: t(capability.summary) }),
3777
+ /* @__PURE__ */ jsx20("ul", { className: "pt-cap__list", children: capability.points.map((point) => /* @__PURE__ */ jsx20("li", { children: t(point) }, t(point))) }),
3778
+ capability.code && /* @__PURE__ */ jsxs18("div", { className: "pt-cap__code", children: [
3779
+ /* @__PURE__ */ jsx20("p", { className: "pt-cap__caption", children: t(capability.code.caption) }),
3780
+ /* @__PURE__ */ jsx20("pre", { children: /* @__PURE__ */ jsx20("code", { children: capability.code.body }) })
3474
3781
  ] })
3475
3782
  ] }, capability.id)) })
3476
3783
  ] })
3477
3784
  ] }),
3478
- view === "history" && showHistory && /* @__PURE__ */ jsxs17("section", { className: "pt-panel-page pt-panel-section", id: "revisions", children: [
3479
- /* @__PURE__ */ jsxs17("div", { children: [
3480
- /* @__PURE__ */ jsx19("p", { className: "pt-eyebrow", children: ui.historyEyebrow }),
3481
- /* @__PURE__ */ jsx19("h2", { className: "pt-h2", children: ui.historyTitle }),
3482
- /* @__PURE__ */ jsx19("p", { className: "pt-sub", children: ui.historyIntro })
3785
+ view === "history" && showHistory && /* @__PURE__ */ jsxs18("section", { className: "pt-panel-page pt-panel-section", id: "revisions", children: [
3786
+ /* @__PURE__ */ jsxs18("div", { children: [
3787
+ /* @__PURE__ */ jsx20("p", { className: "pt-eyebrow", children: ui.historyEyebrow }),
3788
+ /* @__PURE__ */ jsx20("h2", { className: "pt-h2", children: ui.historyTitle }),
3789
+ /* @__PURE__ */ jsx20("p", { className: "pt-sub", children: ui.historyIntro })
3483
3790
  ] }),
3484
- state.runs.length === 0 ? /* @__PURE__ */ jsx19("p", { className: "pt-panel-text", children: ui.historyEmpty }) : /* @__PURE__ */ jsx19("ol", { className: "pt-runs", children: [...state.runs].reverse().map((run) => /* @__PURE__ */ jsxs17("li", { className: "pt-run pt-hud", children: [
3485
- /* @__PURE__ */ jsxs17("p", { className: "pt-run__meta", children: [
3791
+ state.runs.length === 0 ? /* @__PURE__ */ jsx20("p", { className: "pt-panel-text", children: ui.historyEmpty }) : /* @__PURE__ */ jsx20("ol", { className: "pt-runs", children: [...state.runs].reverse().map((run) => /* @__PURE__ */ jsxs18("li", { className: "pt-run pt-hud", children: [
3792
+ /* @__PURE__ */ jsxs18("p", { className: "pt-run__meta", children: [
3486
3793
  run.date,
3487
3794
  " \xB7 ",
3488
3795
  run.by === "claude" ? "Claude" : ui.ownerYou,
3489
3796
  run.fingerprint ? ` \xB7 ${run.fingerprint.replace("sha256:", "").slice(0, 12)}` : ""
3490
3797
  ] }),
3491
- /* @__PURE__ */ jsx19("p", { className: "pt-panel-text", children: t(run.summary) }),
3492
- run.cards.length > 0 && /* @__PURE__ */ jsxs17("p", { className: "pt-run__cards", children: [
3493
- /* @__PURE__ */ jsxs17("span", { children: [
3798
+ /* @__PURE__ */ jsx20("p", { className: "pt-panel-text", children: t(run.summary) }),
3799
+ run.cards.length > 0 && /* @__PURE__ */ jsxs18("p", { className: "pt-run__cards", children: [
3800
+ /* @__PURE__ */ jsxs18("span", { children: [
3494
3801
  ui.historyTouched,
3495
3802
  ":"
3496
3803
  ] }),
@@ -3502,7 +3809,7 @@ function PanelApp({
3502
3809
  ] })
3503
3810
  ] }, run.id)) })
3504
3811
  ] }),
3505
- /* @__PURE__ */ jsx19(
3812
+ /* @__PURE__ */ jsx20(
3506
3813
  CardSheet,
3507
3814
  {
3508
3815
  card: openCard,
@@ -3514,9 +3821,50 @@ function PanelApp({
3514
3821
  onClose: () => setOpenCardId(null)
3515
3822
  }
3516
3823
  ),
3517
- /* @__PURE__ */ jsxs17(DetailSheet, { open: helpOpen, onClose: () => setHelpOpen(false), ariaLabel: ui.helpTitle, children: [
3518
- /* @__PURE__ */ jsx19(DetailSection, { title: ui.helpTitle, children: !setup ? /* @__PURE__ */ jsx19("p", { className: "pt-panel-text", children: ui.setupChecking }) : /* @__PURE__ */ jsxs17(Fragment5, { children: [
3519
- /* @__PURE__ */ jsx19(
3824
+ /* @__PURE__ */ jsx20(
3825
+ DetailSheet,
3826
+ {
3827
+ open: wizardOpen,
3828
+ onClose: () => {
3829
+ closeWizard();
3830
+ setWizardOpen(false);
3831
+ },
3832
+ ariaLabel: ui.wizardTitle,
3833
+ children: /* @__PURE__ */ jsx20(
3834
+ SetupWizard,
3835
+ {
3836
+ requirements,
3837
+ onCheck: readSetup,
3838
+ onClose: () => {
3839
+ closeWizard();
3840
+ setWizardOpen(false);
3841
+ },
3842
+ labels: {
3843
+ title: ui.wizardTitle,
3844
+ progress: ui.wizardProgress,
3845
+ nowDo: ui.wizardNowDo,
3846
+ check: ui.wizardCheck,
3847
+ checking: ui.wizardChecking,
3848
+ stillMissing: ui.wizardStillMissing,
3849
+ cannotTell: ui.wizardCannotTell,
3850
+ doneTitle: ui.wizardDoneTitle,
3851
+ readyTitle: ui.wizardReadyTitle,
3852
+ readyBody: ui.wizardReadyBody,
3853
+ verify: ui.wizardVerify,
3854
+ close: ui.wizardClose,
3855
+ stuckTitle: ui.wizardStuckTitle,
3856
+ stuckBody: ui.wizardStuckBody,
3857
+ stuckPrompt: ui.wizardStuckPrompt,
3858
+ copy: ui.wizardCopy,
3859
+ copied: ui.wizardCopied
3860
+ }
3861
+ }
3862
+ )
3863
+ }
3864
+ ),
3865
+ /* @__PURE__ */ jsxs18(DetailSheet, { open: helpOpen, onClose: () => setHelpOpen(false), ariaLabel: ui.helpTitle, children: [
3866
+ /* @__PURE__ */ jsx20(DetailSection, { title: ui.helpTitle, children: !setup ? /* @__PURE__ */ jsx20("p", { className: "pt-panel-text", children: ui.setupChecking }) : /* @__PURE__ */ jsxs18(Fragment5, { children: [
3867
+ /* @__PURE__ */ jsx20(
3520
3868
  SetupGuide,
3521
3869
  {
3522
3870
  requirements,
@@ -3529,9 +3877,21 @@ function PanelApp({
3529
3877
  }
3530
3878
  }
3531
3879
  ),
3532
- setup.repo && /* @__PURE__ */ jsx19("p", { className: "pt-panel-text", style: { marginTop: 12 }, children: ui.setupWriteTarget(setup.repo, setup.branch, setup.file) })
3880
+ setup.repo && /* @__PURE__ */ jsx20("p", { className: "pt-panel-text", style: { marginTop: 12 }, children: ui.setupWriteTarget(setup.repo, setup.branch, setup.file) }),
3881
+ !setup.ready && /* @__PURE__ */ jsx20("div", { className: "pt-panel-row", style: { marginTop: 12 }, children: /* @__PURE__ */ jsx20(
3882
+ "button",
3883
+ {
3884
+ type: "button",
3885
+ className: "pt-btn pt-btn--sm pt-btn--primary",
3886
+ onClick: () => {
3887
+ setHelpOpen(false);
3888
+ setWizardOpen(true);
3889
+ },
3890
+ children: ui.wizardOpen
3891
+ }
3892
+ ) })
3533
3893
  ] }) }),
3534
- /* @__PURE__ */ jsx19(DetailSection, { title: ui.guideSection, children: /* @__PURE__ */ jsx19("div", { className: "pt-panel-row", children: /* @__PURE__ */ jsx19(
3894
+ /* @__PURE__ */ jsx20(DetailSection, { title: ui.guideSection, children: /* @__PURE__ */ jsx20("div", { className: "pt-panel-row", children: /* @__PURE__ */ jsx20(
3535
3895
  "button",
3536
3896
  {
3537
3897
  type: "button",
@@ -3549,9 +3909,43 @@ function PanelApp({
3549
3909
  }
3550
3910
  ) }) })
3551
3911
  ] }),
3552
- /* @__PURE__ */ jsxs17(DetailSheet, { open: settingsOpen, onClose: () => setSettingsOpen(false), ariaLabel: ui.panelSettings, children: [
3553
- saveEndpoint ? /* @__PURE__ */ jsxs17(DetailSection, { title: ui.saveSection, subtitle: ui.saveSubtitle, children: [
3554
- /* @__PURE__ */ jsx19("div", { className: "pt-panel-row", children: /* @__PURE__ */ jsx19(
3912
+ update?.behind && /* @__PURE__ */ jsxs18(
3913
+ DetailSheet,
3914
+ {
3915
+ open: releaseOpen,
3916
+ onClose: () => setReleaseOpen(false),
3917
+ ariaLabel: ui.releaseTitle(update.latest),
3918
+ children: [
3919
+ /* @__PURE__ */ jsxs18("div", { children: [
3920
+ /* @__PURE__ */ jsx20("p", { className: "pt-eyebrow", children: releaseShape(update.notes) ? ui.releaseShape[releaseShape(update.notes)] : "" }),
3921
+ /* @__PURE__ */ jsx20("h2", { className: "pt-h2", children: ui.releaseTitle(update.latest) }),
3922
+ update.notes?.date && /* @__PURE__ */ jsx20("p", { className: "pt-sub", children: ui.releaseDate(update.notes.date) })
3923
+ ] }),
3924
+ update.notes ? /* @__PURE__ */ jsx20("ul", { className: "pt-runs", children: update.notes.entries.map((item, index) => /* @__PURE__ */ jsxs18("li", { className: "pt-run pt-hud", children: [
3925
+ /* @__PURE__ */ jsx20("p", { className: "pt-run__meta", children: ui.releaseKind[item.kind] }),
3926
+ /* @__PURE__ */ jsx20("p", { className: "pt-panel-text", children: item.text[lang] })
3927
+ ] }, index)) }) : /* @__PURE__ */ jsx20("p", { className: "pt-panel-text", children: ui.releaseNone }),
3928
+ /* @__PURE__ */ jsxs18("div", { className: "pt-panel-row", style: { marginTop: 16 }, children: [
3929
+ /* @__PURE__ */ jsx20(
3930
+ "button",
3931
+ {
3932
+ type: "button",
3933
+ className: "pt-btn",
3934
+ onClick: () => {
3935
+ setReleaseOpen(false);
3936
+ setSettingsOpen(true);
3937
+ },
3938
+ children: ui.updateCreateCard
3939
+ }
3940
+ ),
3941
+ /* @__PURE__ */ jsx20("button", { type: "button", className: "pt-btn", onClick: () => setReleaseOpen(false), children: ui.releaseClose })
3942
+ ] })
3943
+ ]
3944
+ }
3945
+ ),
3946
+ /* @__PURE__ */ jsxs18(DetailSheet, { open: settingsOpen, onClose: () => setSettingsOpen(false), ariaLabel: ui.panelSettings, children: [
3947
+ saveEndpoint ? /* @__PURE__ */ jsxs18(DetailSection, { title: ui.saveSection, subtitle: ui.saveSubtitle, children: [
3948
+ /* @__PURE__ */ jsx20("div", { className: "pt-panel-row", children: /* @__PURE__ */ jsx20(
3555
3949
  "button",
3556
3950
  {
3557
3951
  type: "button",
@@ -3561,15 +3955,15 @@ function PanelApp({
3561
3955
  children: save.status === "saving" ? ui.saving : ui.save
3562
3956
  }
3563
3957
  ) }),
3564
- /* @__PURE__ */ jsxs17("p", { className: "pt-panel-text", style: { marginTop: 10 }, children: [
3958
+ /* @__PURE__ */ jsxs18("p", { className: "pt-panel-text", style: { marginTop: 10 }, children: [
3565
3959
  save.status === "error" ? `${ui.saveFailed}: ${save.message}` : save.status === "saved" ? ui.savedWithCommit : dirty ? ui.saveHelp : ui.upToDate,
3566
- save.status === "saved" && save.url && /* @__PURE__ */ jsxs17(Fragment5, { children: [
3960
+ save.status === "saved" && save.url && /* @__PURE__ */ jsxs18(Fragment5, { children: [
3567
3961
  " ",
3568
- /* @__PURE__ */ jsx19("a", { href: save.url, children: "commit" })
3962
+ /* @__PURE__ */ jsx20("a", { href: save.url, children: "commit" })
3569
3963
  ] })
3570
3964
  ] })
3571
- ] }) : /* @__PURE__ */ jsx19(DetailSection, { title: ui.saveSection, subtitle: ui.saveSubtitle, children: /* @__PURE__ */ jsx19("p", { className: "pt-panel-text", children: ui.demoNotice }) }),
3572
- showLanguage && /* @__PURE__ */ jsx19(DetailSection, { title: ui.language, subtitle: ui.languageSubtitle, children: /* @__PURE__ */ jsx19("div", { className: "pt-panel-row", children: LANGS.map((code) => /* @__PURE__ */ jsx19(
3965
+ ] }) : /* @__PURE__ */ jsx20(DetailSection, { title: ui.saveSection, subtitle: ui.saveSubtitle, children: /* @__PURE__ */ jsx20("p", { className: "pt-panel-text", children: ui.demoNotice }) }),
3966
+ showLanguage && /* @__PURE__ */ jsx20(DetailSection, { title: ui.language, subtitle: ui.languageSubtitle, children: /* @__PURE__ */ jsx20("div", { className: "pt-panel-row", children: LANGS.map((code) => /* @__PURE__ */ jsx20(
3573
3967
  FilterChip,
3574
3968
  {
3575
3969
  label: LANG_LABELS[code],
@@ -3578,9 +3972,9 @@ function PanelApp({
3578
3972
  },
3579
3973
  code
3580
3974
  )) }) }),
3581
- /* @__PURE__ */ jsxs17(DetailSection, { title: ui.theme, subtitle: ui.themeSubtitle, children: [
3582
- /* @__PURE__ */ jsxs17("div", { className: "pt-panel-row", children: [
3583
- Object.entries(themes).map(([name, entry]) => /* @__PURE__ */ jsx19(
3975
+ /* @__PURE__ */ jsxs18(DetailSection, { title: ui.theme, subtitle: ui.themeSubtitle, children: [
3976
+ /* @__PURE__ */ jsxs18("div", { className: "pt-panel-row", children: [
3977
+ Object.entries(themes).map(([name, entry]) => /* @__PURE__ */ jsx20(
3584
3978
  FilterChip,
3585
3979
  {
3586
3980
  label: entry.label,
@@ -3589,7 +3983,7 @@ function PanelApp({
3589
3983
  },
3590
3984
  name
3591
3985
  )),
3592
- state.importedTheme && /* @__PURE__ */ jsx19(
3986
+ state.importedTheme && /* @__PURE__ */ jsx20(
3593
3987
  FilterChip,
3594
3988
  {
3595
3989
  label: t(state.importedTheme.label),
@@ -3598,21 +3992,21 @@ function PanelApp({
3598
3992
  }
3599
3993
  )
3600
3994
  ] }),
3601
- /* @__PURE__ */ jsx19("p", { className: "pt-panel-text", style: { marginTop: 10 }, children: themeName === IMPORTED ? t(imported?.from.reasoning) : [chosen.note, ui.themeNote].filter(Boolean).join(". ") }),
3602
- state.importedTheme && /* @__PURE__ */ jsxs17("div", { className: "pt-cap pt-hud", style: { marginTop: 14 }, children: [
3603
- /* @__PURE__ */ jsx19("h3", { className: "pt-cap__title", children: ui.importedTheme }),
3604
- /* @__PURE__ */ jsx19("p", { className: "pt-panel-text", children: ui.importedFrom(state.importedTheme.importedAt, state.importedTheme.from.files.join(", ")) }),
3605
- state.importedTheme.from.colours.length > 0 && /* @__PURE__ */ jsx19("p", { className: "pt-tool__tags", children: state.importedTheme.from.colours.map((colour) => /* @__PURE__ */ jsx19("span", { className: "pt-tool__tag", children: colour }, colour)) }),
3606
- state.importedTheme.refreshRequested ? /* @__PURE__ */ jsx19("p", { className: "pt-warn", children: ui.importedRefreshAsked(state.importedTheme.refreshRequested) }) : /* @__PURE__ */ jsx19("div", { className: "pt-panel-row", style: { marginTop: 10 }, children: /* @__PURE__ */ jsx19("button", { type: "button", className: "pt-btn pt-btn--sm", onClick: requestThemeRefresh, children: ui.importedRefresh }) }),
3607
- /* @__PURE__ */ jsx19("p", { className: "pt-marketplace__detail", children: ui.importedRefreshHow })
3995
+ /* @__PURE__ */ jsx20("p", { className: "pt-panel-text", style: { marginTop: 10 }, children: themeName === IMPORTED ? t(imported?.from.reasoning) : [chosen.note, ui.themeNote].filter(Boolean).join(". ") }),
3996
+ state.importedTheme && /* @__PURE__ */ jsxs18("div", { className: "pt-cap pt-hud", style: { marginTop: 14 }, children: [
3997
+ /* @__PURE__ */ jsx20("h3", { className: "pt-cap__title", children: ui.importedTheme }),
3998
+ /* @__PURE__ */ jsx20("p", { className: "pt-panel-text", children: ui.importedFrom(state.importedTheme.importedAt, state.importedTheme.from.files.join(", ")) }),
3999
+ state.importedTheme.from.colours.length > 0 && /* @__PURE__ */ jsx20("p", { className: "pt-tool__tags", children: state.importedTheme.from.colours.map((colour) => /* @__PURE__ */ jsx20("span", { className: "pt-tool__tag", children: colour }, colour)) }),
4000
+ state.importedTheme.refreshRequested ? /* @__PURE__ */ jsx20("p", { className: "pt-warn", children: ui.importedRefreshAsked(state.importedTheme.refreshRequested) }) : /* @__PURE__ */ jsx20("div", { className: "pt-panel-row", style: { marginTop: 10 }, children: /* @__PURE__ */ jsx20("button", { type: "button", className: "pt-btn pt-btn--sm", onClick: requestThemeRefresh, children: ui.importedRefresh }) }),
4001
+ /* @__PURE__ */ jsx20("p", { className: "pt-marketplace__detail", children: ui.importedRefreshHow })
3608
4002
  ] })
3609
4003
  ] }),
3610
- checkForUpdates && fingerprint?.version && /* @__PURE__ */ jsxs17(DetailSection, { title: ui.updateTitle, subtitle: ui.updateSubtitle, children: [
3611
- /* @__PURE__ */ jsx19("p", { className: "pt-panel-text", children: ui.updateCurrent(fingerprint.version) }),
3612
- /* @__PURE__ */ jsx19("p", { className: "pt-panel-text", style: { marginTop: 8 }, children: !update ? ui.updateUnknown : update.behind ? ui.updateAvailable(update.latest) : ui.updateUpToDate }),
3613
- update?.behind && (state.cards.some((card) => card.id === updateCardId(update.latest)) ? /* @__PURE__ */ jsx19("p", { className: "pt-panel-text", style: { marginTop: 8 }, children: ui.updateCardExists }) : /* @__PURE__ */ jsx19("div", { className: "pt-panel-row", style: { marginTop: 12 }, children: /* @__PURE__ */ jsx19("button", { type: "button", className: "pt-btn", onClick: addUpdateCard, children: ui.updateCreateCard }) })),
3614
- /* @__PURE__ */ jsxs17("label", { className: "pt-panel-row", style: { marginTop: 12 }, children: [
3615
- /* @__PURE__ */ jsx19(
4004
+ checkForUpdates && fingerprint?.version && /* @__PURE__ */ jsxs18(DetailSection, { title: ui.updateTitle, subtitle: ui.updateSubtitle, children: [
4005
+ /* @__PURE__ */ jsx20("p", { className: "pt-panel-text", children: ui.updateCurrent(fingerprint.version) }),
4006
+ /* @__PURE__ */ jsx20("p", { className: "pt-panel-text", style: { marginTop: 8 }, children: !update ? ui.updateUnknown : update.behind ? ui.updateAvailable(update.latest) : ui.updateUpToDate }),
4007
+ update?.behind && (state.cards.some((card) => card.id === updateCardId(update.latest)) ? /* @__PURE__ */ jsx20("p", { className: "pt-panel-text", style: { marginTop: 8 }, children: ui.updateCardExists }) : /* @__PURE__ */ jsx20("div", { className: "pt-panel-row", style: { marginTop: 12 }, children: /* @__PURE__ */ jsx20("button", { type: "button", className: "pt-btn", onClick: addUpdateCard, children: ui.updateCreateCard }) })),
4008
+ /* @__PURE__ */ jsxs18("label", { className: "pt-panel-row", style: { marginTop: 12 }, children: [
4009
+ /* @__PURE__ */ jsx20(
3616
4010
  "input",
3617
4011
  {
3618
4012
  type: "checkbox",
@@ -3620,16 +4014,16 @@ function PanelApp({
3620
4014
  onChange: (event) => setPreference("updateAsOrder", event.target.checked)
3621
4015
  }
3622
4016
  ),
3623
- /* @__PURE__ */ jsx19("span", { className: "pt-panel-text", children: ui.updateAsOrder })
4017
+ /* @__PURE__ */ jsx20("span", { className: "pt-panel-text", children: ui.updateAsOrder })
3624
4018
  ] }),
3625
- /* @__PURE__ */ jsx19("p", { className: "pt-marketplace__detail", children: ui.updateAsOrderHow })
4019
+ /* @__PURE__ */ jsx20("p", { className: "pt-marketplace__detail", children: ui.updateAsOrderHow })
3626
4020
  ] }),
3627
- fingerprint && /* @__PURE__ */ jsxs17(DetailSection, { title: ui.fingerprint, subtitle: ui.fingerprintSubtitle, children: [
3628
- /* @__PURE__ */ jsx19("p", { className: "pt-panel-mono", children: fingerprint.hash }),
3629
- /* @__PURE__ */ jsx19("p", { className: "pt-panel-text", style: { marginTop: 8 }, children: ui.trackedFiles(fingerprint.fileCount, fingerprint.version) })
4021
+ fingerprint && /* @__PURE__ */ jsxs18(DetailSection, { title: ui.fingerprint, subtitle: ui.fingerprintSubtitle, children: [
4022
+ /* @__PURE__ */ jsx20("p", { className: "pt-panel-mono", children: fingerprint.hash }),
4023
+ /* @__PURE__ */ jsx20("p", { className: "pt-panel-text", style: { marginTop: 8 }, children: ui.trackedFiles(fingerprint.fileCount, fingerprint.version) })
3630
4024
  ] }),
3631
- saveEndpoint && /* @__PURE__ */ jsxs17(DetailSection, { title: ui.session, subtitle: ui.sessionSubtitle, children: [
3632
- /* @__PURE__ */ jsx19("div", { className: "pt-panel-row", children: /* @__PURE__ */ jsx19(
4025
+ saveEndpoint && /* @__PURE__ */ jsxs18(DetailSection, { title: ui.session, subtitle: ui.sessionSubtitle, children: [
4026
+ /* @__PURE__ */ jsx20("div", { className: "pt-panel-row", children: /* @__PURE__ */ jsx20(
3633
4027
  "button",
3634
4028
  {
3635
4029
  type: "button",
@@ -3639,11 +4033,11 @@ function PanelApp({
3639
4033
  children: signOut === "working" ? ui.signingOut : ui.signOut
3640
4034
  }
3641
4035
  ) }),
3642
- signOut === "failed" && /* @__PURE__ */ jsx19("p", { className: "pt-panel-text", style: { marginTop: 10 }, children: ui.signOutFailed })
4036
+ signOut === "failed" && /* @__PURE__ */ jsx20("p", { className: "pt-panel-text", style: { marginTop: 10 }, children: ui.signOutFailed })
3643
4037
  ] }),
3644
- links && links.length > 0 && /* @__PURE__ */ jsx19(DetailSection, { title: ui.links, children: /* @__PURE__ */ jsx19("p", { className: "pt-panel-text", children: links.map((link, index) => /* @__PURE__ */ jsxs17(React12.Fragment, { children: [
4038
+ links && links.length > 0 && /* @__PURE__ */ jsx20(DetailSection, { title: ui.links, children: /* @__PURE__ */ jsx20("p", { className: "pt-panel-text", children: links.map((link, index) => /* @__PURE__ */ jsxs18(React13.Fragment, { children: [
3645
4039
  index > 0 && " \xB7 ",
3646
- /* @__PURE__ */ jsx19("a", { href: link.href, children: link.label })
4040
+ /* @__PURE__ */ jsx20("a", { href: link.href, children: link.label })
3647
4041
  ] }, link.href)) }) })
3648
4042
  ] }),
3649
4043
  footer
@@ -3846,6 +4240,7 @@ export {
3846
4240
  PRESET_PANEL_THEMES,
3847
4241
  PanelApp,
3848
4242
  SetupGuide,
4243
+ SetupWizard,
3849
4244
  StatTile,
3850
4245
  StatTileGrid,
3851
4246
  THEME_FORMS,
@@ -3863,10 +4258,12 @@ export {
3863
4258
  emptyCard,
3864
4259
  explainBoard,
3865
4260
  isCard,
4261
+ isFirstRun,
3866
4262
  ledgerForm,
3867
4263
  midnightTheme,
3868
4264
  moveCardInColumns,
3869
4265
  newId,
4266
+ offeredThemes,
3870
4267
  oldMoneyTheme,
3871
4268
  panelForm,
3872
4269
  paneltirBuild,
@@ -3889,5 +4286,6 @@ export {
3889
4286
  useGuideNote,
3890
4287
  useMediaQuery,
3891
4288
  validateBoard,
4289
+ wizardStep,
3892
4290
  writeText
3893
4291
  };