@warlock.js/grimoire 5.63.0 → 5.64.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.
Files changed (194) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/esm/book/build.d.mts.map +1 -1
  3. package/esm/book/build.mjs +24 -2
  4. package/esm/book/build.mjs.map +1 -1
  5. package/esm/check/check-grimoire.d.mts.map +1 -1
  6. package/esm/check/check-grimoire.mjs +11 -1
  7. package/esm/check/check-grimoire.mjs.map +1 -1
  8. package/esm/check/rules/api-snapshot.mjs +39 -0
  9. package/esm/check/rules/api-snapshot.mjs.map +1 -0
  10. package/esm/check/rules/code-rules.mjs +45 -0
  11. package/esm/check/rules/code-rules.mjs.map +1 -0
  12. package/esm/check/rules/drift.mjs +54 -0
  13. package/esm/check/rules/drift.mjs.map +1 -0
  14. package/esm/check/rules/focused-tests.mjs +39 -0
  15. package/esm/check/rules/focused-tests.mjs.map +1 -0
  16. package/esm/check/rules/shows.mjs +52 -0
  17. package/esm/check/rules/shows.mjs.map +1 -0
  18. package/esm/codes/codes.d.mts +48 -0
  19. package/esm/codes/codes.d.mts.map +1 -1
  20. package/esm/codes/codes.mjs +26 -1
  21. package/esm/codes/codes.mjs.map +1 -1
  22. package/esm/contracts/adapter.d.mts +6 -0
  23. package/esm/contracts/adapter.d.mts.map +1 -1
  24. package/esm/contracts/guard.d.mts +104 -0
  25. package/esm/contracts/guard.d.mts.map +1 -0
  26. package/esm/contracts/index.mjs +5 -0
  27. package/esm/contracts/matrix.d.mts +75 -0
  28. package/esm/contracts/matrix.d.mts.map +1 -0
  29. package/esm/contracts/scry.d.mts +21 -0
  30. package/esm/contracts/scry.d.mts.map +1 -1
  31. package/esm/contracts/settings.d.mts +71 -0
  32. package/esm/contracts/settings.d.mts.map +1 -0
  33. package/esm/contracts/settings.mjs +67 -0
  34. package/esm/contracts/settings.mjs.map +1 -0
  35. package/esm/contracts/shots.d.mts +146 -0
  36. package/esm/contracts/shots.d.mts.map +1 -0
  37. package/esm/contracts/snapshot.d.mts +10 -0
  38. package/esm/contracts/snapshot.d.mts.map +1 -1
  39. package/esm/contracts/written.d.mts +13 -0
  40. package/esm/contracts/written.d.mts.map +1 -1
  41. package/esm/contracts/written.mjs +7 -1
  42. package/esm/contracts/written.mjs.map +1 -1
  43. package/esm/devtools/approvals.mjs +59 -0
  44. package/esm/devtools/approvals.mjs.map +1 -0
  45. package/esm/devtools/data.mjs +2 -0
  46. package/esm/devtools/data.mjs.map +1 -1
  47. package/esm/devtools/graphs.mjs +13 -3
  48. package/esm/devtools/graphs.mjs.map +1 -1
  49. package/esm/devtools/index.d.mts.map +1 -1
  50. package/esm/devtools/index.mjs +32 -2
  51. package/esm/devtools/index.mjs.map +1 -1
  52. package/esm/devtools/matrix.mjs +207 -0
  53. package/esm/devtools/matrix.mjs.map +1 -0
  54. package/esm/devtools/product-map.d.mts.map +1 -1
  55. package/esm/devtools/product-map.mjs +87 -1
  56. package/esm/devtools/product-map.mjs.map +1 -1
  57. package/esm/devtools/site.d.mts.map +1 -1
  58. package/esm/devtools/site.mjs +12 -3
  59. package/esm/devtools/site.mjs.map +1 -1
  60. package/esm/devtools/snapshot-source.mjs +5 -1
  61. package/esm/devtools/snapshot-source.mjs.map +1 -1
  62. package/esm/git/index.d.mts +20 -0
  63. package/esm/git/index.d.mts.map +1 -0
  64. package/esm/git/index.mjs +280 -0
  65. package/esm/git/index.mjs.map +1 -0
  66. package/esm/guard/api.mjs +70 -0
  67. package/esm/guard/api.mjs.map +1 -0
  68. package/esm/guard/assertions.mjs +18 -0
  69. package/esm/guard/assertions.mjs.map +1 -0
  70. package/esm/guard/collect.mjs +139 -0
  71. package/esm/guard/collect.mjs.map +1 -0
  72. package/esm/guard/format.mjs +27 -0
  73. package/esm/guard/format.mjs.map +1 -0
  74. package/esm/guard/glob.mjs +79 -0
  75. package/esm/guard/glob.mjs.map +1 -0
  76. package/esm/guard/index.mjs +9 -0
  77. package/esm/guard/rules.mjs +310 -0
  78. package/esm/guard/rules.mjs.map +1 -0
  79. package/esm/guard/scope.mjs +95 -0
  80. package/esm/guard/scope.mjs.map +1 -0
  81. package/esm/index.d.mts +10 -3
  82. package/esm/index.mjs +6 -2
  83. package/esm/paths/index.d.mts +15 -1
  84. package/esm/paths/index.d.mts.map +1 -1
  85. package/esm/paths/index.mjs +27 -3
  86. package/esm/paths/index.mjs.map +1 -1
  87. package/esm/proves/index.mjs +2 -1
  88. package/esm/proves/scan-proofs.mjs +1 -1
  89. package/esm/proves/scan-proofs.mjs.map +1 -1
  90. package/esm/proves/scan-shows.d.mts +21 -0
  91. package/esm/proves/scan-shows.d.mts.map +1 -0
  92. package/esm/proves/scan-shows.mjs +168 -0
  93. package/esm/proves/scan-shows.mjs.map +1 -0
  94. package/esm/releases/index.d.mts.map +1 -1
  95. package/esm/releases/index.mjs +5 -3
  96. package/esm/releases/index.mjs.map +1 -1
  97. package/esm/releases/stamp.mjs +121 -0
  98. package/esm/releases/stamp.mjs.map +1 -0
  99. package/esm/rules/focused.mjs +26 -0
  100. package/esm/rules/focused.mjs.map +1 -0
  101. package/esm/rules/index.mjs +88 -0
  102. package/esm/rules/index.mjs.map +1 -0
  103. package/esm/rules/logical-css.mjs +112 -0
  104. package/esm/rules/logical-css.mjs.map +1 -0
  105. package/esm/rules/no-js-imports.mjs +22 -0
  106. package/esm/rules/no-js-imports.mjs.map +1 -0
  107. package/esm/rules/scan.mjs +196 -0
  108. package/esm/rules/scan.mjs.map +1 -0
  109. package/esm/rules/specific-errors.mjs +51 -0
  110. package/esm/rules/specific-errors.mjs.map +1 -0
  111. package/esm/rules/type-discriminator.mjs +27 -0
  112. package/esm/rules/type-discriminator.mjs.map +1 -0
  113. package/esm/scry/also-changes.mjs +106 -0
  114. package/esm/scry/also-changes.mjs.map +1 -0
  115. package/esm/scry/format.d.mts.map +1 -1
  116. package/esm/scry/format.mjs +22 -0
  117. package/esm/scry/format.mjs.map +1 -1
  118. package/esm/scry/query.d.mts.map +1 -1
  119. package/esm/scry/query.mjs +7 -2
  120. package/esm/scry/query.mjs.map +1 -1
  121. package/esm/scry/search.d.mts.map +1 -1
  122. package/esm/scry/search.mjs +43 -11
  123. package/esm/scry/search.mjs.map +1 -1
  124. package/esm/shots/approve.mjs +195 -0
  125. package/esm/shots/approve.mjs.map +1 -0
  126. package/esm/shots/drift.mjs +174 -0
  127. package/esm/shots/drift.mjs.map +1 -0
  128. package/esm/shots/png.mjs +166 -0
  129. package/esm/shots/png.mjs.map +1 -0
  130. package/esm/shots/state.mjs +43 -0
  131. package/esm/shots/state.mjs.map +1 -0
  132. package/esm/shots/store.mjs +66 -0
  133. package/esm/shots/store.mjs.map +1 -0
  134. package/esm/shots/touched.mjs +38 -0
  135. package/esm/shots/touched.mjs.map +1 -0
  136. package/esm/warlock/adapter.d.mts.map +1 -1
  137. package/esm/warlock/adapter.mjs +15 -2
  138. package/esm/warlock/adapter.mjs.map +1 -1
  139. package/esm/warlock/api-command.mjs +41 -0
  140. package/esm/warlock/api-command.mjs.map +1 -0
  141. package/esm/warlock/approve-command.mjs +80 -0
  142. package/esm/warlock/approve-command.mjs.map +1 -0
  143. package/esm/warlock/commands.d.mts +1 -1
  144. package/esm/warlock/commands.d.mts.map +1 -1
  145. package/esm/warlock/commands.mjs +61 -8
  146. package/esm/warlock/commands.mjs.map +1 -1
  147. package/esm/warlock/guard-command.mjs +116 -0
  148. package/esm/warlock/guard-command.mjs.map +1 -0
  149. package/esm/warlock/index.d.mts +2 -1
  150. package/esm/warlock/index.mjs +2 -1
  151. package/esm/warlock/languages.mjs +75 -0
  152. package/esm/warlock/languages.mjs.map +1 -0
  153. package/esm/warlock/mcp-tools.mjs +2 -2
  154. package/esm/warlock/mcp-tools.mjs.map +1 -1
  155. package/esm/warlock/release-command.mjs +65 -0
  156. package/esm/warlock/release-command.mjs.map +1 -0
  157. package/esm/warlock/shows.d.mts +35 -0
  158. package/esm/warlock/shows.d.mts.map +1 -0
  159. package/esm/warlock/shows.mjs +195 -0
  160. package/esm/warlock/shows.mjs.map +1 -0
  161. package/esm/workspace/cache.mjs +4 -1
  162. package/esm/workspace/cache.mjs.map +1 -1
  163. package/esm/workspace/derived.mjs +11 -6
  164. package/esm/workspace/derived.mjs.map +1 -1
  165. package/esm/workspace/index.d.mts.map +1 -1
  166. package/esm/workspace/index.mjs +8 -1
  167. package/esm/workspace/index.mjs.map +1 -1
  168. package/esm/workspace/stored.mjs +4 -1
  169. package/esm/workspace/stored.mjs.map +1 -1
  170. package/esm/written/features.mjs +21 -5
  171. package/esm/written/features.mjs.map +1 -1
  172. package/esm/written/index.mjs +2 -1
  173. package/esm/written/parse-grimoire.d.mts.map +1 -1
  174. package/esm/written/parse-grimoire.mjs +16 -3
  175. package/esm/written/parse-grimoire.mjs.map +1 -1
  176. package/esm/written/settings.d.mts +11 -0
  177. package/esm/written/settings.d.mts.map +1 -0
  178. package/esm/written/settings.mjs +88 -0
  179. package/esm/written/settings.mjs.map +1 -0
  180. package/llms-full.txt +276 -39
  181. package/llms.txt +2 -0
  182. package/package.json +3 -3
  183. package/skills/backfill-a-grimoire/SKILL.md +4 -0
  184. package/skills/describe-an-app/SKILL.md +4 -1
  185. package/skills/guard-a-change/SKILL.md +85 -0
  186. package/skills/index.md +7 -3
  187. package/skills/record-a-change/SKILL.md +52 -16
  188. package/skills/review-a-change/SKILL.md +53 -0
  189. package/skills/use-the-grimoire/SKILL.md +21 -18
  190. package/skills/write-a-feature/SKILL.md +42 -1
  191. package/ui/grimoire-view.js +756 -40
  192. package/ui/grimoire.css +303 -28
  193. package/ui/product-map.css +43 -7
  194. package/ui/product-map.js +212 -37
package/ui/product-map.js CHANGED
@@ -333,14 +333,41 @@ function productShots(ctx, kit, list, lightbox) {
333
333
  );
334
334
  }
335
335
 
336
+ /**
337
+ * One row per page or screen, not per block: the blocks that show the flow are
338
+ * listed under the page, and a screenshot the blocks share is shown once.
339
+ */
340
+ function productPlaces(items) {
341
+ const places = new Map();
342
+
343
+ for (const item of items) {
344
+ const key = `${item.type}|${item.id}`;
345
+ let place = places.get(key);
346
+
347
+ if (!place) {
348
+ place = { ...item, blocks: [], flows: [], screenshots: [] };
349
+ places.set(key, place);
350
+ }
351
+
352
+ if (item.block && !place.blocks.includes(item.block)) place.blocks.push(item.block);
353
+ if (item.flow && !place.flows.includes(item.flow)) place.flows.push(item.flow);
354
+
355
+ for (const shot of item.screenshots ?? []) {
356
+ if (!place.screenshots.some((known) => known.src === shot.src)) place.screenshots.push(shot);
357
+ }
358
+ }
359
+
360
+ return [...places.values()];
361
+ }
362
+
336
363
  function productAppearances(ctx, kit, appearances, lightbox, withFlowLinks) {
337
364
  if (!appearances || appearances.length === 0) return null;
338
365
 
339
366
  const byApp = new Map();
340
367
 
341
368
  for (const item of appearances) {
342
- if (!byApp.has(item.app)) byApp.set(item.app, []);
343
- byApp.get(item.app).push(item);
369
+ if (!byApp.has(item.app)) byApp.set(item.app, { title: item.appTitle ?? null, items: [] });
370
+ byApp.get(item.app).items.push(item);
344
371
  }
345
372
 
346
373
  return productSection(
@@ -349,25 +376,36 @@ function productAppearances(ctx, kit, appearances, lightbox, withFlowLinks) {
349
376
  kit.el(
350
377
  "div",
351
378
  { class: "pm-apps" },
352
- [...byApp.entries()].map(([app, items]) =>
379
+ [...byApp.entries()].map(([app, group]) =>
353
380
  kit.el("div", { class: "pm-app" }, [
354
- kit.el("h4", { text: app }),
381
+ kit.el("h4", { text: group.title ?? app }),
355
382
  kit.el(
356
383
  "ul",
357
384
  { class: "pm-places" },
358
- items.map((item) =>
385
+ productPlaces(group.items).map((item) =>
359
386
  kit.el("li", { class: "pm-place" }, [
360
387
  kit.el("div", { class: "pm-place-head" }, [
361
388
  kit.el("strong", { text: item.title ?? item.id }),
362
389
  item.route ? kit.el("span", { class: "pm-place-route", text: item.route }) : null,
363
- withFlowLinks && item.flow
364
- ? kit.link(
365
- `product/flow/${item.flow.split("/").map(productEncode).join("/")}`,
366
- "See the story",
367
- { class: "pm-place-flow" },
390
+ ...(withFlowLinks
391
+ ? item.flows.map((flow) =>
392
+ kit.link(
393
+ `product/flow/${flow.split("/").map(productEncode).join("/")}`,
394
+ item.flows.length > 1
395
+ ? `See the story of ${flow.split("/").pop()}`
396
+ : "See the story",
397
+ { class: "pm-place-flow" },
398
+ ),
368
399
  )
369
- : null,
400
+ : []),
370
401
  ]),
402
+ item.blocks.length > 0
403
+ ? kit.el(
404
+ "ul",
405
+ { class: "pm-place-blocks", "aria-label": "Blocks that show it" },
406
+ item.blocks.map((block) => kit.el("li", { text: block })),
407
+ )
408
+ : null,
371
409
  productShots(ctx, kit, item.screenshots, lightbox),
372
410
  ]),
373
411
  ),
@@ -565,13 +603,16 @@ function productMapPage(ctx, kit, answer) {
565
603
  text: "What the product does, who it is for and how healthy each part is, in plain words.",
566
604
  }),
567
605
  ]),
568
- share
569
- ? kit.el("a", {
570
- class: "pm-button pm-button--primary",
571
- href: share.manageHref,
572
- text: "Share this map",
573
- })
574
- : null,
606
+ kit.el("div", { class: "pm-hero-actions" }, [
607
+ kit.link("product/whats-new", "What's new", { class: "pm-button" }),
608
+ share
609
+ ? kit.el("a", {
610
+ class: "pm-button pm-button--primary",
611
+ href: share.manageHref,
612
+ text: "Share this map",
613
+ })
614
+ : null,
615
+ ]),
575
616
  ]);
576
617
 
577
618
  if (features.length === 0) {
@@ -826,20 +867,15 @@ function productTimeline(kit, releases) {
826
867
  kit.el(
827
868
  "ul",
828
869
  { class: "pm-changes" },
829
- groups.get(word).map((change) => {
830
- const { text, refs } = productSplitRefs(change.text);
831
-
832
- return kit.el("li", {}, [
833
- kit.el("span", { class: "pm-change-text", text }),
834
- !kit.shared && refs.length > 0
835
- ? kit.el(
836
- "span",
837
- { class: "pm-refs" },
838
- refs.map((ref) => kit.el("code", { class: "pm-ref", text: ref })),
839
- )
840
- : null,
841
- ]);
842
- }),
870
+ // Criterion and task ids are for developers: this list is for people who read the product, not the code.
871
+ groups.get(word).map((change) =>
872
+ kit.el("li", {}, [
873
+ kit.el("span", {
874
+ class: "pm-change-text",
875
+ text: productSplitRefs(change.text).text,
876
+ }),
877
+ ]),
878
+ ),
843
879
  ),
844
880
  ]),
845
881
  ),
@@ -849,6 +885,105 @@ function productTimeline(kit, releases) {
849
885
  );
850
886
  }
851
887
 
888
+ /** One release of the What's new view: its date, the brief, then the changes per feature in plain words. */
889
+ function productWhatsNewRelease(kit, release, alone) {
890
+ const date = productDate(release.date);
891
+ const name = release.release === null ? "Not released yet" : `Version ${release.release}`;
892
+
893
+ return kit.el("li", { class: `pm-release${release.release === null ? " is-unreleased" : ""}` }, [
894
+ kit.el("div", { class: "pm-release-head" }, [
895
+ release.release === null || alone
896
+ ? kit.el("h3", { class: "pm-release-version", text: name })
897
+ : kit.el("h3", { class: "pm-release-version" }, [
898
+ kit.link(`product/whats-new/${productEncode(release.release)}`, name),
899
+ ]),
900
+ date ? kit.el("span", { class: "pm-muted pm-release-state", text: date }) : null,
901
+ release.release === null
902
+ ? kit.el("span", { class: "pm-chip pm-chip--soft pm-release-state", text: "Unreleased" })
903
+ : null,
904
+ ]),
905
+ release.brief ? kit.el("p", { class: "pm-prose", text: release.brief }) : null,
906
+ release.features.length === 0
907
+ ? kit.el("p", { class: "pm-muted", text: "No changes are listed for this version." })
908
+ : kit.el(
909
+ "div",
910
+ { class: "pm-whatsnew-features" },
911
+ release.features.map((feature) => {
912
+ const groups = new Map();
913
+
914
+ for (const change of feature.changes)
915
+ groups.set(change.word, [...(groups.get(change.word) ?? []), change]);
916
+
917
+ const words = [
918
+ ...PRODUCT_CHANGE_ORDER.filter((word) => groups.has(word)),
919
+ ...[...groups.keys()].filter((word) => !PRODUCT_CHANGE_ORDER.includes(word)),
920
+ ];
921
+
922
+ return kit.el("div", { class: "pm-whatsnew-feature" }, [
923
+ kit.el("h4", {}, [
924
+ kit.link(`product/feature/${productEncode(feature.id)}`, feature.title),
925
+ ]),
926
+ kit.el(
927
+ "ul",
928
+ { class: "pm-changes" },
929
+ words.flatMap((word) =>
930
+ groups.get(word).map((change) =>
931
+ kit.el("li", {}, [
932
+ kit.el("span", {
933
+ class: `pm-change-type pm-change--${word}`,
934
+ text: PRODUCT_CHANGE[word] ?? word,
935
+ }),
936
+ kit.el("span", {
937
+ class: "pm-change-text",
938
+ text: `${change.flow ? `${change.flow}: ` : ""}${productSplitRefs(change.text).text}`,
939
+ }),
940
+ ]),
941
+ ),
942
+ ),
943
+ ),
944
+ ]);
945
+ }),
946
+ ),
947
+ ]);
948
+ }
949
+
950
+ /** `#grimoire/product/whats-new[/<release>]`: the releases newest first, or one release. */
951
+ function productWhatsNewPage(kit, answer, only) {
952
+ const releases = only
953
+ ? answer.releases.filter((release) => release.release === only)
954
+ : answer.releases;
955
+ const trail = [{ text: "Product map", to: "product" }];
956
+
957
+ if (only)
958
+ trail.push({ text: "What's new", to: "product/whats-new" }, { text: `Version ${only}` });
959
+ else trail.push({ text: "What's new" });
960
+
961
+ return kit.el("div", { class: "pm-page" }, [
962
+ productBreadcrumb(kit, trail),
963
+ kit.el("header", { class: "pm-title" }, [
964
+ kit.el("h2", { text: "What's new" }),
965
+ kit.el("p", {
966
+ class: "pm-lead",
967
+ text: "What changed in each release, in plain words, newest first.",
968
+ }),
969
+ ]),
970
+ releases.length === 0
971
+ ? kit.el("div", { class: "pm-empty" }, [
972
+ kit.el("h3", { text: only ? `No release "${only}" is written` : "No releases yet" }),
973
+ kit.el("p", {
974
+ text: only
975
+ ? "Open What's new for the list of releases."
976
+ : "When a release is stamped (warlock grimoire release --stamp), its changes are listed here.",
977
+ }),
978
+ ])
979
+ : kit.el(
980
+ "ol",
981
+ { class: "pm-timeline pm-whatsnew" },
982
+ releases.map((release) => productWhatsNewRelease(kit, release, Boolean(only))),
983
+ ),
984
+ ]);
985
+ }
986
+
852
987
  /** The host the adapter reported, or `null` when there is none. */
853
988
  function productHost(host) {
854
989
  return host && typeof host === "object" ? host : null;
@@ -1028,19 +1163,42 @@ function productStory(ctx, kit, story, lightbox) {
1028
1163
  );
1029
1164
  }
1030
1165
 
1166
+ /** The fixed case questions as the plain question a reader asks. A flow's own label is shown as written. */
1167
+ const PRODUCT_CASE_SENTENCES = {
1168
+ "invalid input": "What if the input is not valid?",
1169
+ "not allowed": "What if the person is not allowed to do this?",
1170
+ "not found": "What if it cannot be found?",
1171
+ duplicate: "What if it already exists?",
1172
+ limits: "What if a limit is reached?",
1173
+ expiry: "What if it has expired?",
1174
+ "double submit": "What if it is sent twice?",
1175
+ "outside service down": "What if an outside service is down?",
1176
+ "server unreachable": "What if the server cannot be reached?",
1177
+ "server error": "What if the server fails?",
1178
+ };
1179
+
1180
+ function productCaseSentence(question) {
1181
+ const text = String(question ?? "").trim();
1182
+ const known = PRODUCT_CASE_SENTENCES[text.toLowerCase()];
1183
+
1184
+ if (known) return known;
1185
+
1186
+ return text === "" ? text : `${text.charAt(0).toUpperCase()}${text.slice(1)}`;
1187
+ }
1188
+
1031
1189
  function productCases(kit, cases) {
1032
1190
  const handled = cases.filter((item) => item.handled);
1033
1191
  const skipped = cases.filter((item) => !item.handled);
1034
1192
  const item = (entry) =>
1035
1193
  kit.el("li", {}, [
1036
- kit.el("strong", { text: entry.question }),
1194
+ kit.el("strong", { text: productCaseSentence(entry.question) }),
1037
1195
  kit.el("p", {
1038
1196
  text: entry.handled ? entry.answer : entry.answer.replace(/^does not apply\b[:\s—-]*/i, ""),
1039
1197
  }),
1040
1198
  entry.criteria.length > 0
1041
1199
  ? kit.el("span", {
1042
1200
  class: "pm-chip pm-chip--soft",
1043
- text: `Checked by ${entry.criteria.join(", ")}`,
1201
+ text: `Checked by ${productPlural(entry.criteria.length, "check")}`,
1044
1202
  })
1045
1203
  : null,
1046
1204
  ]);
@@ -1097,7 +1255,7 @@ function productFlowPage(ctx, kit, answer, lightbox) {
1097
1255
  productStatusChip(kit, flow.status),
1098
1256
  ]),
1099
1257
  kit.el("p", { class: "pm-lead", text: flow.summary ?? "No summary yet." }),
1100
- kit.el("p", { class: "pm-muted", text: `For ${flow.who} · since version ${flow.since}` }),
1258
+ kit.el("p", { class: "pm-muted", text: `${flow.who} · since version ${flow.since}` }),
1101
1259
  ]),
1102
1260
  kit.el("section", { class: "pm-section pm-callout", "aria-label": "Health" }, [
1103
1261
  productHealth(kit, answer.health),
@@ -1196,6 +1354,11 @@ export async function productMapView(ctx, parts = []) {
1196
1354
  }
1197
1355
 
1198
1356
  main.append(el("div", { class: "pm-page" }, body));
1357
+ } else if (kind === "whats-new") {
1358
+ const answer = await ctx.api("product/whats-new");
1359
+
1360
+ answerHost = answer.host;
1361
+ main.append(productWhatsNewPage(kit, answer, first || null));
1199
1362
  } else if (kind === "flow" && first && second) {
1200
1363
  const answer = await ctx.api(
1201
1364
  `product/flows/${productEncode(first)}/${productEncode(second)}`,
@@ -1223,7 +1386,13 @@ export async function productMapView(ctx, parts = []) {
1223
1386
  productLoadError(
1224
1387
  ctx,
1225
1388
  kit,
1226
- kind === "feature" ? "this feature" : kind === "flow" ? "this flow" : "the product map",
1389
+ kind === "feature"
1390
+ ? "this feature"
1391
+ : kind === "flow"
1392
+ ? "this flow"
1393
+ : kind === "whats-new"
1394
+ ? "what's new"
1395
+ : "the product map",
1227
1396
  error,
1228
1397
  ),
1229
1398
  );
@@ -1255,7 +1424,13 @@ export async function productMapView(ctx, parts = []) {
1255
1424
  async function renderProductMap(context) {
1256
1425
  const parts = (context.route ?? "").split("/").filter(Boolean);
1257
1426
 
1258
- if (parts[0] === "share" && (parts.length === 1 || parts[1] === "feature" || parts[1] === "flow"))
1427
+ if (
1428
+ parts[0] === "share" &&
1429
+ (parts.length === 1 ||
1430
+ parts[1] === "feature" ||
1431
+ parts[1] === "flow" ||
1432
+ parts[1] === "whats-new")
1433
+ )
1259
1434
  parts.shift();
1260
1435
  if (parts[0] === "product") parts.shift();
1261
1436