@grimoire-rs/indexer 0.4.3 → 0.5.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 (61) hide show
  1. package/CHANGELOG.md +190 -0
  2. package/NOTICE +30 -0
  3. package/README.md +76 -331
  4. package/dist/cli/init.d.ts.map +1 -1
  5. package/dist/cli/init.js +35 -4
  6. package/dist/cli/init.js.map +1 -1
  7. package/dist/config.d.ts +107 -7
  8. package/dist/config.d.ts.map +1 -1
  9. package/dist/config.js +181 -36
  10. package/dist/config.js.map +1 -1
  11. package/dist/renderer/astro/components/CardLogo.d.ts +5 -0
  12. package/dist/renderer/astro/components/CardLogo.js +58 -0
  13. package/dist/renderer/astro/components/CardLogo.tsx +96 -0
  14. package/dist/renderer/astro/components/Catalog.d.ts +14 -1
  15. package/dist/renderer/astro/components/Catalog.js +467 -108
  16. package/dist/renderer/astro/components/Catalog.tsx +756 -349
  17. package/dist/renderer/astro/components/CommandBar.astro +66 -0
  18. package/dist/renderer/astro/components/CopyButton.d.ts +7 -0
  19. package/dist/renderer/astro/components/CopyButton.js +28 -0
  20. package/dist/renderer/astro/components/CopyButton.tsx +56 -0
  21. package/dist/renderer/astro/components/KindMark.d.ts +69 -0
  22. package/dist/renderer/astro/components/KindMark.js +66 -0
  23. package/dist/renderer/astro/components/KindMark.tsx +141 -0
  24. package/dist/renderer/astro/components/PackageCard.d.ts +18 -0
  25. package/dist/renderer/astro/components/PackageCard.js +50 -0
  26. package/dist/renderer/astro/components/PackageCard.tsx +273 -0
  27. package/dist/renderer/astro/components/PackageRow.d.ts +10 -0
  28. package/dist/renderer/astro/components/PackageRow.js +32 -0
  29. package/dist/renderer/astro/components/PackageRow.tsx +126 -0
  30. package/dist/renderer/astro/components/PickerMenu.astro +5 -14
  31. package/dist/renderer/astro/components/SiteFooter.astro +64 -0
  32. package/dist/renderer/astro/components/SiteHeader.astro +74 -0
  33. package/dist/renderer/astro/components/VersionMenu.astro +2 -2
  34. package/dist/renderer/astro/layouts/Base.astro +860 -206
  35. package/dist/renderer/astro/lib/base.d.ts +25 -0
  36. package/dist/renderer/astro/lib/base.js +23 -0
  37. package/dist/renderer/astro/lib/base.ts +27 -0
  38. package/dist/renderer/astro/lib/catalog.d.ts +24 -0
  39. package/dist/renderer/astro/lib/catalog.js +36 -0
  40. package/dist/renderer/astro/lib/catalog.ts +37 -0
  41. package/dist/renderer/astro/lib/commands.d.ts +58 -0
  42. package/dist/renderer/astro/lib/commands.js +86 -0
  43. package/dist/renderer/astro/lib/commands.ts +117 -0
  44. package/dist/renderer/astro/lib/keywordRail.d.ts +44 -0
  45. package/dist/renderer/astro/lib/keywordRail.js +99 -0
  46. package/dist/renderer/astro/lib/keywordRail.ts +110 -0
  47. package/dist/renderer/astro/pages/index.astro +40 -87
  48. package/dist/renderer/astro/pages/p/[...slug].astro +340 -195
  49. package/dist/renderer/astro/styles/tokens.css +40 -5
  50. package/dist/renderer/index.d.ts +58 -0
  51. package/dist/renderer/index.d.ts.map +1 -1
  52. package/dist/renderer/index.js +547 -5
  53. package/dist/renderer/index.js.map +1 -1
  54. package/dist/renderer/types.d.ts +9 -0
  55. package/dist/renderer/types.d.ts.map +1 -1
  56. package/package.json +9 -4
  57. package/templates/README.md +6 -0
  58. package/templates/ci/github-ratings.yml +5 -0
  59. package/templates/gitignore +4 -1
  60. package/templates/theme/README.md +38 -0
  61. package/templates/tsconfig.json +47 -0
@@ -98,11 +98,46 @@
98
98
  --grim-text-xl: 1.5rem;
99
99
  --grim-text-2xl: 1.6rem;
100
100
 
101
- /* ---- Radius ---------------------------------------------------- */
102
- --grim-radius-sm: 4px;
103
- --grim-radius-md: 6px;
104
- --grim-radius-lg: 8px;
105
- --grim-radius-xl: 10px;
101
+ /* ---- Radius ----------------------------------------------------
102
+ Four steps named for the job each one does, all derived from one
103
+ knob, plus `pill`, which is not.
104
+
105
+ `--grim-radius-base` IS the round-or-square decision, and it is the
106
+ one primitive in this sheet. It exists because the four steps below
107
+ share a raw value — the condition under which a primitive tier stops
108
+ being an indirection with nothing behind it. Ship square by setting
109
+ it to `0px`; `4px` restores the rounding this renderer had through
110
+ `0.4.x`, and every step keeps its ratio at any setting.
111
+
112
+ base the knob. 0px is square, 4px is the old look
113
+ code an inline run of code
114
+ inset a control INSIDE another control — a menu item, an icon
115
+ button, the logo tile, the key hint in the search field
116
+ control a control or a popover: the search field, the install
117
+ bar, the sort pair, the view toggle, every menu panel
118
+ surface a content surface: a package card, the package list, the
119
+ detail page's panels
120
+ pill anything whose shape is its category — chips, badges,
121
+ the version marker
122
+
123
+ `pill` is deliberately off the knob. A chip is a pill because that
124
+ shape says "toggleable tag"; squaring it turns it into a button, so
125
+ it is a constant rather than a step on the scale.
126
+
127
+ The four steps stay overridable one by one — a full redeclaration
128
+ beats the derivation — so a consumer wanting square surfaces and
129
+ rounded controls sets `--grim-radius-control` and ignores the knob.
130
+
131
+ Pick by matching the job, never by eyeballing the corner: the same
132
+ radius on a shorter box reads as more curve, so two surfaces that
133
+ look different are usually the same step, and two that look alike
134
+ are not necessarily. A corner that is genuinely wrong beside another
135
+ is almost always two surfaces of one job wearing different steps. */
136
+ --grim-radius-base: 0px;
137
+ --grim-radius-code: calc(1 * var(--grim-radius-base));
138
+ --grim-radius-inset: calc(1.5 * var(--grim-radius-base));
139
+ --grim-radius-control: calc(2 * var(--grim-radius-base));
140
+ --grim-radius-surface: calc(2.5 * var(--grim-radius-base));
106
141
  --grim-radius-pill: 999px;
107
142
 
108
143
  /* ---- Border ----------------------------------------------------
@@ -28,6 +28,64 @@ export declare class RenderInputError extends Error {
28
28
  export declare const ASTRO_SRC_DIR: string;
29
29
  /** Default `public/` layer; holds the fallback favicon. */
30
30
  export declare const DEFAULT_PUBLIC_DIR: string;
31
+ /**
32
+ * This package's own version, named in every C-004 overlay log line so a
33
+ * theme author can tell which release the file they replaced came from.
34
+ *
35
+ * Read from disk rather than imported, so `rootDir: src` stays intact.
36
+ * `../../package.json` reaches the package root from `src/renderer/` and
37
+ * `dist/renderer/` alike — both sit exactly two directories under it, the
38
+ * same hop `packageVersion()` makes in `src/cli/main.ts`. Deliberately a
39
+ * second copy of those four lines rather than an import: `main.ts` is the
40
+ * commander entry point and it already imports this module, so reaching the
41
+ * other way would close a cycle and drag the CLI into every render.
42
+ */
43
+ export declare function indexerVersion(): string;
44
+ /**
45
+ * Directory in the index repo whose contents are laid over the renderer's
46
+ * own Astro sources — the structural half of the theming contract, where
47
+ * `customCss` is the CSS half.
48
+ *
49
+ * A file here either adds one (`theme/pages/setup.astro` becomes `/setup/`)
50
+ * or replaces the shipped file of the same path. What that costs is stated
51
+ * in the docs, not enforced here: page routes and the `@grim/*` specifier
52
+ * are contract, component paths and props are not yet.
53
+ */
54
+ export declare const THEME_DIR = "theme";
55
+ /**
56
+ * Theme-relative paths `overlayTheme` refuses to copy, no matter what an
57
+ * index repo puts under `theme/`.
58
+ *
59
+ * `lib` is the renderer's own helper tree (`astro/lib/*`, reached from a
60
+ * page or component through `@grim/lib/...`) — letting a theme silently
61
+ * replace one of those changes behaviour for every importer, not just the
62
+ * overridden path, with no doc describing it. `content.config.ts` is
63
+ * Astro's single content-collection entrypoint; a themed one would have to
64
+ * reproduce the `./enrich` glob loader `stage` already wires up, and one
65
+ * that gets it wrong breaks every collection at once with no traceable
66
+ * cause. This list is decided once, here, before the first consumer exists
67
+ * — narrowing it later breaks whoever already overrode a path that becomes
68
+ * newly excluded, so it is not loosened or tightened per bug report.
69
+ *
70
+ * Every entry means one thing: *this root-relative path, and everything
71
+ * under it*. One rule, so a third entry works the day it is added and
72
+ * cannot silently do nothing — which is exactly what a list read
73
+ * positionally (`[0]` a directory, `[1]` a basename) would have done. It
74
+ * also settles `content.config.ts` at the **root only**: the deny exists
75
+ * because Astro resolves exactly one content-collection entrypoint there,
76
+ * and `components/content.config.ts` carries no such meaning.
77
+ *
78
+ * Entries are lowercase because the comparison is. APFS and NTFS are
79
+ * case-insensitive, so `theme/LIB/data.ts` names the same file to the
80
+ * filesystem that serves it, and CI is `ubuntu-latest` only — it can never
81
+ * catch a case bypass, which is why the check has to be right rather than
82
+ * tested into shape.
83
+ *
84
+ * Not a security boundary, and no doc may call it one: `fs.cp` does not
85
+ * dereference symlinks, so `theme/lib -> ../../..` is copied through as a
86
+ * live symlink whatever this list says. It is a compatibility guard.
87
+ */
88
+ export declare const OVERLAY_DENY: readonly ["lib", "content.config.ts"];
31
89
  /** Render the catalog site from `<outDir>/all.json` into `outDir`. */
32
90
  export declare function buildSite(opts: BuildSiteOptions): Promise<void>;
33
91
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/renderer/index.ts"],"names":[],"mappings":"AAWA,OAAO,EAAiB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAa9D,MAAM,WAAW,gBAAgB;IAC/B,2EAA2E;IAC3E,IAAI,EAAE,MAAM,CAAC;IACb,oEAAoE;IACpE,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,UAAU,CAAC;CACpB;AAED,MAAM,WAAW,cAAe,SAAQ,gBAAgB;IACtD;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wEAAwE;AACxE,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACvB;AAED,+DAA+D;AAC/D,qBAAa,gBAAiB,SAAQ,KAAK;gBAC7B,OAAO,EAAE,MAAM;CAI5B;AA4BD,mEAAmE;AACnE,eAAO,MAAM,aAAa,QAA2B,CAAC;AACtD,2DAA2D;AAC3D,eAAO,MAAM,kBAAkB,QAA4B,CAAC;AAuU5D,sEAAsE;AACtE,wBAAsB,SAAS,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CA6BrE;AAED;;;;;;;GAOG;AACH,wBAAsB,OAAO,CAAC,IA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