@warlock.js/grimoire 5.57.0 → 5.58.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 (105) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/esm/book/build.d.mts.map +1 -1
  3. package/esm/book/build.mjs +2 -1
  4. package/esm/book/build.mjs.map +1 -1
  5. package/esm/book/render.mjs +10 -0
  6. package/esm/book/render.mjs.map +1 -1
  7. package/esm/bookmap/build.d.mts.map +1 -1
  8. package/esm/bookmap/build.mjs +2 -2
  9. package/esm/bookmap/build.mjs.map +1 -1
  10. package/esm/bookmap/steps.mjs +53 -38
  11. package/esm/bookmap/steps.mjs.map +1 -1
  12. package/esm/check/check-grimoire.d.mts.map +1 -1
  13. package/esm/check/check-grimoire.mjs +4 -1
  14. package/esm/check/check-grimoire.mjs.map +1 -1
  15. package/esm/check/rules/criteria.mjs +21 -2
  16. package/esm/check/rules/criteria.mjs.map +1 -1
  17. package/esm/check/rules/screenshots.mjs +57 -0
  18. package/esm/check/rules/screenshots.mjs.map +1 -0
  19. package/esm/codes/codes.d.mts +12 -0
  20. package/esm/codes/codes.d.mts.map +1 -1
  21. package/esm/codes/codes.mjs +6 -0
  22. package/esm/codes/codes.mjs.map +1 -1
  23. package/esm/contracts/adapter.d.mts +6 -0
  24. package/esm/contracts/adapter.d.mts.map +1 -1
  25. package/esm/contracts/book.d.mts +2 -0
  26. package/esm/contracts/book.d.mts.map +1 -1
  27. package/esm/contracts/book.mjs.map +1 -1
  28. package/esm/contracts/bookmap.d.mts +19 -1
  29. package/esm/contracts/bookmap.d.mts.map +1 -1
  30. package/esm/contracts/snapshot.d.mts +11 -0
  31. package/esm/contracts/snapshot.d.mts.map +1 -1
  32. package/esm/contracts/test-results.d.mts +34 -0
  33. package/esm/contracts/test-results.d.mts.map +1 -1
  34. package/esm/contracts/written.d.mts +44 -0
  35. package/esm/contracts/written.d.mts.map +1 -1
  36. package/esm/contracts/written.mjs.map +1 -1
  37. package/esm/devtools/data.mjs +94 -3
  38. package/esm/devtools/data.mjs.map +1 -1
  39. package/esm/devtools/index.d.mts +26 -0
  40. package/esm/devtools/index.d.mts.map +1 -1
  41. package/esm/devtools/index.mjs +88 -5
  42. package/esm/devtools/index.mjs.map +1 -1
  43. package/esm/devtools/product-map.d.mts +14 -0
  44. package/esm/devtools/product-map.d.mts.map +1 -0
  45. package/esm/devtools/product-map.mjs +385 -0
  46. package/esm/devtools/product-map.mjs.map +1 -0
  47. package/esm/devtools/site.d.mts.map +1 -1
  48. package/esm/devtools/site.mjs +85 -13
  49. package/esm/devtools/site.mjs.map +1 -1
  50. package/esm/devtools/snapshot-source.mjs +10 -6
  51. package/esm/devtools/snapshot-source.mjs.map +1 -1
  52. package/esm/graph/index.d.mts +10 -1
  53. package/esm/graph/index.d.mts.map +1 -1
  54. package/esm/graph/index.mjs +3 -2
  55. package/esm/graph/index.mjs.map +1 -1
  56. package/esm/index.d.mts +4 -4
  57. package/esm/paths/index.d.mts +2 -0
  58. package/esm/paths/index.d.mts.map +1 -1
  59. package/esm/paths/index.mjs +3 -1
  60. package/esm/paths/index.mjs.map +1 -1
  61. package/esm/scry/compact.mjs +169 -0
  62. package/esm/scry/compact.mjs.map +1 -0
  63. package/esm/scry/format.d.mts.map +1 -1
  64. package/esm/scry/format.mjs +7 -1
  65. package/esm/scry/format.mjs.map +1 -1
  66. package/esm/scry/query.d.mts.map +1 -1
  67. package/esm/scry/query.mjs +12 -1
  68. package/esm/scry/query.mjs.map +1 -1
  69. package/esm/test-results/index.d.mts +7 -2
  70. package/esm/test-results/index.d.mts.map +1 -1
  71. package/esm/test-results/index.mjs +79 -12
  72. package/esm/test-results/index.mjs.map +1 -1
  73. package/esm/vitest/index.d.mts +6 -0
  74. package/esm/vitest/index.d.mts.map +1 -1
  75. package/esm/vitest/index.mjs +22 -6
  76. package/esm/vitest/index.mjs.map +1 -1
  77. package/esm/warlock/adapter.d.mts.map +1 -1
  78. package/esm/warlock/adapter.mjs +6 -2
  79. package/esm/warlock/adapter.mjs.map +1 -1
  80. package/esm/warlock/mcp-tools.mjs +48 -12
  81. package/esm/warlock/mcp-tools.mjs.map +1 -1
  82. package/esm/workspace/index.d.mts.map +1 -1
  83. package/esm/workspace/index.mjs +4 -2
  84. package/esm/workspace/index.mjs.map +1 -1
  85. package/esm/written/apps.mjs +4 -2
  86. package/esm/written/apps.mjs.map +1 -1
  87. package/esm/written/features.mjs +119 -6
  88. package/esm/written/features.mjs.map +1 -1
  89. package/esm/written/markdown.mjs +66 -1
  90. package/esm/written/markdown.mjs.map +1 -1
  91. package/esm/written/parse-grimoire.d.mts.map +1 -1
  92. package/esm/written/parse-grimoire.mjs +1 -1
  93. package/esm/written/parse-grimoire.mjs.map +1 -1
  94. package/llms-full.txt +76 -3
  95. package/package.json +3 -3
  96. package/skills/backfill-a-grimoire/SKILL.md +5 -0
  97. package/skills/describe-an-app/SKILL.md +12 -0
  98. package/skills/record-a-change/SKILL.md +8 -0
  99. package/skills/use-the-grimoire/SKILL.md +14 -1
  100. package/skills/write-a-feature/SKILL.md +37 -2
  101. package/ui/grimoire-static.js +4 -0
  102. package/ui/grimoire-view.js +1016 -178
  103. package/ui/grimoire.css +427 -2
  104. package/ui/product-map.css +636 -0
  105. package/ui/product-map.js +817 -0
package/ui/grimoire.css CHANGED
@@ -11,6 +11,7 @@
11
11
  --gm-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
12
12
  --gm-focus: 0 0 0 2px var(--background), 0 0 0 4px var(--ring);
13
13
  display: grid;
14
+ grid-template-columns: minmax(0, 1fr);
14
15
  gap: var(--gm-gap);
15
16
  min-width: 0;
16
17
  max-width: 100%;
@@ -75,23 +76,56 @@
75
76
  /* Header: tabs and search */
76
77
  .grimoire-header {
77
78
  display: grid;
79
+ grid-template-columns: minmax(0, 1fr);
78
80
  gap: 12px;
81
+ min-width: 0;
79
82
  }
80
83
  .grimoire-tabs {
81
84
  display: flex;
82
85
  gap: 4px;
83
86
  padding: 4px;
84
87
  overflow-x: auto;
88
+ overscroll-behavior-x: contain;
89
+ scroll-snap-type: x proximity;
90
+ scrollbar-width: thin;
85
91
  border-radius: var(--gm-radius);
86
- background: var(--muted);
92
+ /* Scroll shadows: an edge darkens while more tabs sit past it (the "local" covers hide it at the ends). */
93
+ background-color: var(--muted);
94
+ background-image:
95
+ linear-gradient(to right, var(--muted) 40%, transparent),
96
+ linear-gradient(to left, var(--muted) 40%, transparent),
97
+ radial-gradient(
98
+ farthest-side at 0 50%,
99
+ color-mix(in srgb, var(--foreground) 28%, transparent),
100
+ transparent
101
+ ),
102
+ radial-gradient(
103
+ farthest-side at 100% 50%,
104
+ color-mix(in srgb, var(--foreground) 28%, transparent),
105
+ transparent
106
+ );
107
+ background-position:
108
+ left center,
109
+ right center,
110
+ left center,
111
+ right center;
112
+ background-size:
113
+ 32px 100%,
114
+ 32px 100%,
115
+ 14px 100%,
116
+ 14px 100%;
117
+ background-repeat: no-repeat;
118
+ background-attachment: local, local, scroll, scroll;
87
119
  }
88
120
  .grimoire-root .grimoire-tab {
89
121
  display: inline-flex;
90
122
  align-items: center;
91
123
  gap: 6px;
92
124
  flex: none;
125
+ scroll-snap-align: center;
93
126
  min-height: 40px;
94
127
  padding: 0 14px;
128
+ white-space: nowrap;
95
129
  border-radius: calc(var(--gm-radius) - 3px);
96
130
  color: var(--muted-foreground);
97
131
  font-weight: 600;
@@ -208,6 +242,7 @@
208
242
  }
209
243
  .grimoire-view {
210
244
  display: grid;
245
+ grid-template-columns: minmax(0, 1fr);
211
246
  gap: var(--gm-gap);
212
247
  min-width: 0;
213
248
  }
@@ -625,6 +660,287 @@
625
660
  overflow-wrap: anywhere;
626
661
  }
627
662
 
663
+
664
+ /* Inline code, ids that never wrap, headline */
665
+ .grimoire-root .grimoire-code {
666
+ padding: 1px 5px;
667
+ border-radius: 5px;
668
+ background: var(--secondary);
669
+ color: var(--secondary-foreground);
670
+ font-family: var(--gm-mono);
671
+ font-size: 0.88em;
672
+ overflow-wrap: anywhere;
673
+ }
674
+ .grimoire-root .grimoire-nowrap {
675
+ white-space: nowrap;
676
+ }
677
+ .grimoire-headline {
678
+ color: var(--muted-foreground);
679
+ font-size: 15px;
680
+ font-weight: 600;
681
+ }
682
+ .grimoire-subhead {
683
+ font-size: 14px;
684
+ color: var(--muted-foreground);
685
+ }
686
+ .grimoire-stat-small {
687
+ font-size: 20px;
688
+ }
689
+ div.grimoire-stat {
690
+ cursor: default;
691
+ }
692
+
693
+ /* Sub-tabs inside a view (file sets of a step) */
694
+ .grimoire-subtabs {
695
+ display: flex;
696
+ flex-wrap: wrap;
697
+ gap: 6px;
698
+ }
699
+ .grimoire-root .grimoire-subtab {
700
+ flex: none;
701
+ min-height: 36px;
702
+ padding: 0 12px;
703
+ border: 1px solid var(--input);
704
+ border-radius: 999px;
705
+ background: var(--card);
706
+ color: var(--foreground);
707
+ font: inherit;
708
+ font-size: 13px;
709
+ font-weight: 600;
710
+ cursor: pointer;
711
+ }
712
+ .grimoire-root .grimoire-subtab.is-active {
713
+ border-color: var(--brand);
714
+ background: var(--brand);
715
+ color: var(--brand-foreground);
716
+ }
717
+ .grimoire-root .grimoire-filter.is-active {
718
+ border-color: var(--brand);
719
+ background: var(--brand);
720
+ color: var(--brand-foreground);
721
+ }
722
+ .grimoire-root a.grimoire-filter {
723
+ display: inline-flex;
724
+ align-items: center;
725
+ text-decoration: none;
726
+ }
727
+
728
+ /* Flow page: mini header, switcher, health strip, fix next */
729
+ .grimoire-minihead {
730
+ display: none;
731
+ }
732
+ .grimoire-switcher {
733
+ display: inline-flex;
734
+ gap: 12px;
735
+ margin-left: auto;
736
+ }
737
+ .grimoire-pager {
738
+ display: flex;
739
+ justify-content: space-between;
740
+ gap: 12px;
741
+ padding-top: 8px;
742
+ border-top: 1px solid var(--border);
743
+ }
744
+ .grimoire-root .grimoire-neighbour {
745
+ display: inline-flex;
746
+ align-items: center;
747
+ min-height: 44px;
748
+ max-width: 100%;
749
+ overflow-wrap: anywhere;
750
+ font-weight: 600;
751
+ text-decoration: none;
752
+ }
753
+ .grimoire-root .grimoire-neighbour.is-next {
754
+ margin-left: auto;
755
+ text-align: right;
756
+ }
757
+ .grimoire-fixnext {
758
+ border-left: 4px solid var(--warning);
759
+ }
760
+ .grimoire-fixnext.is-good {
761
+ border-left-color: var(--success);
762
+ }
763
+ .grimoire-fixnext-lead {
764
+ overflow-wrap: anywhere;
765
+ }
766
+ .grimoire-copyline {
767
+ display: flex;
768
+ flex-wrap: wrap;
769
+ align-items: center;
770
+ gap: 8px;
771
+ }
772
+ .grimoire-copyline .grimoire-code {
773
+ flex: 1 1 260px;
774
+ padding: 8px 10px;
775
+ user-select: all;
776
+ }
777
+
778
+ /* Journey: a vertical stepper */
779
+ .grimoire-stepper {
780
+ display: grid;
781
+ gap: 0;
782
+ margin: 0;
783
+ padding: 0;
784
+ list-style: none;
785
+ }
786
+ .grimoire-step {
787
+ position: relative;
788
+ display: grid;
789
+ grid-template-columns: 36px minmax(0, 1fr);
790
+ gap: 12px;
791
+ padding-bottom: 18px;
792
+ }
793
+ .grimoire-step:not(:last-child)::before {
794
+ content: "";
795
+ position: absolute;
796
+ top: 36px;
797
+ bottom: 0;
798
+ left: 17px;
799
+ width: 2px;
800
+ background: var(--border);
801
+ }
802
+ .grimoire-step-marker {
803
+ display: inline-flex;
804
+ align-items: center;
805
+ justify-content: center;
806
+ width: 36px;
807
+ height: 36px;
808
+ border: 2px solid var(--brand);
809
+ border-radius: 50%;
810
+ background: var(--card);
811
+ color: var(--brand);
812
+ }
813
+ .grimoire-step-body {
814
+ display: grid;
815
+ align-content: start;
816
+ gap: 6px;
817
+ min-width: 0;
818
+ }
819
+ .grimoire-step-head,
820
+ .grimoire-step-counts {
821
+ display: flex;
822
+ flex-wrap: wrap;
823
+ align-items: center;
824
+ gap: 6px 10px;
825
+ min-width: 0;
826
+ }
827
+ .grimoire-step-target {
828
+ font-weight: 600;
829
+ overflow-wrap: anywhere;
830
+ }
831
+ .grimoire-linked {
832
+ padding: 8px 10px;
833
+ border-radius: calc(var(--gm-radius) - 2px);
834
+ background: var(--muted);
835
+ overflow-wrap: anywhere;
836
+ }
837
+ .grimoire-step-files {
838
+ display: grid;
839
+ gap: 10px;
840
+ padding: 10px;
841
+ border: 1px solid var(--border);
842
+ border-radius: calc(var(--gm-radius) - 2px);
843
+ background: var(--background);
844
+ }
845
+ .grimoire-step-files-body {
846
+ display: grid;
847
+ gap: 10px;
848
+ min-width: 0;
849
+ }
850
+ .grimoire-module-group h5 {
851
+ margin: 8px 0 4px;
852
+ color: var(--muted-foreground);
853
+ font-family: var(--gm-mono);
854
+ font-size: 12px;
855
+ overflow-wrap: anywhere;
856
+ }
857
+ .grimoire-expand {
858
+ display: grid;
859
+ min-width: 0;
860
+ }
861
+ .grimoire-expand:empty {
862
+ display: none;
863
+ }
864
+
865
+ /* Proof rows */
866
+ .grimoire-proofs,
867
+ .grimoire-proof-tests,
868
+ .grimoire-cases,
869
+ .grimoire-check-features {
870
+ display: grid;
871
+ gap: 10px;
872
+ margin: 0;
873
+ padding: 0;
874
+ list-style: none;
875
+ }
876
+ .grimoire-proof {
877
+ display: grid;
878
+ gap: 6px;
879
+ padding: 10px 12px;
880
+ border: 1px solid var(--border);
881
+ border-radius: calc(var(--gm-radius) - 2px);
882
+ background: var(--background);
883
+ scroll-margin-top: 72px;
884
+ }
885
+ .grimoire-proof-head {
886
+ display: flex;
887
+ flex-wrap: wrap;
888
+ align-items: center;
889
+ gap: 8px;
890
+ }
891
+ .grimoire-proof-text {
892
+ overflow-wrap: anywhere;
893
+ }
894
+ .grimoire-proof-tests {
895
+ gap: 4px;
896
+ font-size: 13px;
897
+ }
898
+ .grimoire-proof-tests li {
899
+ overflow-wrap: anywhere;
900
+ }
901
+ .grimoire-cases li {
902
+ overflow-wrap: anywhere;
903
+ }
904
+ .grimoire-details summary {
905
+ min-height: 32px;
906
+ color: var(--muted-foreground);
907
+ font-weight: 600;
908
+ cursor: pointer;
909
+ }
910
+ .grimoire-details[open] summary {
911
+ margin-bottom: 6px;
912
+ }
913
+
914
+ /* Check groups */
915
+ .grimoire-check-filters {
916
+ align-items: stretch;
917
+ }
918
+ .grimoire-check-head {
919
+ display: flex;
920
+ flex-wrap: wrap;
921
+ align-items: center;
922
+ gap: 6px 10px;
923
+ }
924
+ .grimoire-check-head h3 {
925
+ flex: 1 1 200px;
926
+ overflow-wrap: anywhere;
927
+ }
928
+ .grimoire-check-feature-row {
929
+ display: flex;
930
+ flex-wrap: wrap;
931
+ align-items: center;
932
+ gap: 6px 12px;
933
+ }
934
+ .grimoire-check-feature-row > :first-child {
935
+ flex: 1 1 140px;
936
+ overflow-wrap: anywhere;
937
+ }
938
+ .grimoire-paged {
939
+ display: grid;
940
+ gap: 8px;
941
+ margin-top: 8px;
942
+ }
943
+
628
944
  /* Small screens and touch */
629
945
  @media (max-width: 640px) {
630
946
  .grimoire-facts {
@@ -637,13 +953,119 @@
637
953
  .grimoire-root h2 {
638
954
  font-size: 19px;
639
955
  }
956
+ .grimoire-card {
957
+ padding: 12px;
958
+ }
959
+
960
+ /* No tables: every row is a card and every cell names its column. */
961
+ .grimoire-scroll:has(> .grimoire-table) {
962
+ overflow-x: visible;
963
+ }
964
+ .grimoire-table,
965
+ .grimoire-table tbody,
966
+ .grimoire-table tr,
967
+ .grimoire-table td {
968
+ display: block;
969
+ width: 100%;
970
+ }
971
+ .grimoire-table thead {
972
+ position: absolute;
973
+ width: 1px;
974
+ height: 1px;
975
+ overflow: hidden;
976
+ clip-path: inset(50%);
977
+ }
978
+ .grimoire-table tr {
979
+ margin-bottom: 10px;
980
+ padding: 6px 10px;
981
+ border: 1px solid var(--border);
982
+ border-radius: calc(var(--gm-radius) - 2px);
983
+ background: var(--background);
984
+ }
985
+ .grimoire-table td {
986
+ display: grid;
987
+ grid-template-columns: 88px minmax(0, 1fr);
988
+ gap: 8px;
989
+ padding: 5px 0;
990
+ border-bottom: 1px dashed var(--border);
991
+ overflow-wrap: anywhere;
992
+ }
993
+ .grimoire-table td:last-child {
994
+ border-bottom: 0;
995
+ }
996
+ .grimoire-table td::before {
997
+ content: attr(data-label);
998
+ color: var(--muted-foreground);
999
+ font-size: 12px;
1000
+ font-weight: 600;
1001
+ }
1002
+ .grimoire-table td:empty {
1003
+ display: none;
1004
+ }
1005
+ .grimoire-svg {
1006
+ min-width: 560px;
1007
+ }
1008
+
1009
+ /* The flow page keeps its title in view and moves prev/next to the bottom. */
1010
+ .grimoire-minihead {
1011
+ position: sticky;
1012
+ top: 0;
1013
+ z-index: 10;
1014
+ display: flex;
1015
+ flex-wrap: nowrap;
1016
+ align-items: center;
1017
+ gap: 8px;
1018
+ margin: 0 -2px;
1019
+ padding: 8px 10px;
1020
+ border: 1px solid var(--border);
1021
+ border-radius: calc(var(--gm-radius) - 2px);
1022
+ background: var(--card);
1023
+ box-shadow: 0 4px 12px color-mix(in srgb, var(--foreground) 10%, transparent);
1024
+ }
1025
+ .grimoire-minihead strong {
1026
+ flex: 1 1 auto;
1027
+ min-width: 0;
1028
+ overflow: hidden;
1029
+ text-overflow: ellipsis;
1030
+ white-space: nowrap;
1031
+ }
1032
+ .grimoire-minihead .grimoire-pill,
1033
+ .grimoire-minihead .grimoire-muted {
1034
+ flex: none;
1035
+ }
1036
+ .grimoire-switcher {
1037
+ display: none;
1038
+ }
1039
+ .grimoire-pager {
1040
+ flex-direction: column;
1041
+ }
1042
+ .grimoire-root .grimoire-neighbour.is-next {
1043
+ margin-left: 0;
1044
+ text-align: left;
1045
+ }
1046
+ .grimoire-step {
1047
+ grid-template-columns: 30px minmax(0, 1fr);
1048
+ gap: 10px;
1049
+ }
1050
+ .grimoire-step-marker {
1051
+ width: 30px;
1052
+ height: 30px;
1053
+ }
1054
+ .grimoire-step:not(:last-child)::before {
1055
+ top: 30px;
1056
+ left: 14px;
1057
+ }
1058
+ .grimoire-toolbar .grimoire-sort {
1059
+ width: 100%;
1060
+ }
640
1061
  }
641
1062
  @media (pointer: coarse) {
642
1063
  .grimoire-root .grimoire-tab,
643
1064
  .grimoire-root .grimoire-hit {
644
1065
  min-height: 44px;
645
1066
  }
646
- .grimoire-root .grimoire-more {
1067
+ .grimoire-root .grimoire-more,
1068
+ .grimoire-root .grimoire-subtab {
647
1069
  min-height: 44px;
648
1070
  }
649
1071
  }
@@ -651,4 +1073,7 @@
651
1073
  .grimoire-skeleton-block {
652
1074
  animation: none;
653
1075
  }
1076
+ .grimoire-tabs {
1077
+ scroll-behavior: auto;
1078
+ }
654
1079
  }