@refrakt-md/types 0.31.0 → 0.33.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/config.d.ts +264 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +2 -0
- package/dist/config.js.map +1 -0
- package/dist/distribution.d.ts +1 -1
- package/dist/distribution.d.ts.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/pipeline.d.ts +8 -0
- package/dist/pipeline.d.ts.map +1 -1
- package/dist/theme.d.ts +1 -248
- package/dist/theme.d.ts.map +1 -1
- package/dist/theme.js.map +1 -1
- package/package.json +1 -1
- package/dist/types.d.ts +0 -2
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Project configuration — the shape of `refrakt.config.json`.
|
|
3
|
+
*
|
|
4
|
+
* These types are the source of truth `refrakt.config.schema.json` is
|
|
5
|
+
* drift-tested against (`packages/transform/test/config-schema.test.ts`), and
|
|
6
|
+
* the documented configuration reference is generated from that schema. They
|
|
7
|
+
* used to live in `theme.ts`, left there by the mechanical module split in
|
|
8
|
+
* `c3fe915` because `SiteConfig` references `SiteThemeConfig`. A reader
|
|
9
|
+
* following the docs → schema → types chain landed in a file whose name said it
|
|
10
|
+
* was about something else (WORK-541).
|
|
11
|
+
*
|
|
12
|
+
* `SiteThemeConfig` stays in `theme.ts`: it is genuinely a theme type, and it
|
|
13
|
+
* is the reference direction that dragged everything else in with it.
|
|
14
|
+
*/
|
|
15
|
+
import type { SiteThemeConfig } from './theme.js';
|
|
16
|
+
/** A declarative entity → page route (SPEC-069). Generates one page per
|
|
17
|
+
* registered entity matching `type` + optional `filter`. `{name}` placeholders
|
|
18
|
+
* in `url` / `title` / `frontmatter` interpolate entity fields; `$item` is
|
|
19
|
+
* bound in `render` / `render-template`. `render` and `render-template` are
|
|
20
|
+
* mutually exclusive. */
|
|
21
|
+
export interface EntityRoute {
|
|
22
|
+
/** Entity type(s) the rule matches, comma-separated for multiple. */
|
|
23
|
+
type: string;
|
|
24
|
+
/** Optional field:value filter (SPEC-070 grammar). */
|
|
25
|
+
filter?: string;
|
|
26
|
+
/** Templated route, site-root-relative (basePath applied by the loader). */
|
|
27
|
+
url: string;
|
|
28
|
+
/** Templated page title; falls back to the rendered content's heading. */
|
|
29
|
+
title?: string;
|
|
30
|
+
/** Inline markdoc body, with `$item` bound. */
|
|
31
|
+
render?: string;
|
|
32
|
+
/** Markdoc partial used as the body instead of `render`. */
|
|
33
|
+
'render-template'?: string;
|
|
34
|
+
/** Frontmatter for the generated page (`{name}` placeholders interpolate). */
|
|
35
|
+
frontmatter?: Record<string, unknown>;
|
|
36
|
+
}
|
|
37
|
+
/** Per-site configuration. A project may declare a single site (via `site`) or
|
|
38
|
+
* multiple named sites (via `sites: { name: SiteConfig }`).
|
|
39
|
+
* Only `contentDir` and `theme` are strictly required for the site to load. */
|
|
40
|
+
export interface SiteConfig {
|
|
41
|
+
/** Path to content directory, relative to project root */
|
|
42
|
+
contentDir: string;
|
|
43
|
+
/** Active theme — accepts either a package name string (legacy shorthand)
|
|
44
|
+
* or a full {@link SiteThemeConfig} with presets, token overrides, mode
|
|
45
|
+
* overlays, and `colorScheme`. */
|
|
46
|
+
theme: string | SiteThemeConfig;
|
|
47
|
+
/** Documentation-only adapter hint (`svelte`, `astro`, `next`, `nuxt`, `eleventy`, `html`).
|
|
48
|
+
* No adapter reads or validates this field today; it serves as an in-config record of
|
|
49
|
+
* which adapter the site is intended for. Slated for removal in v1.0. */
|
|
50
|
+
target?: string;
|
|
51
|
+
/** Component overrides — maps typeof names to relative paths of replacement components */
|
|
52
|
+
overrides?: Record<string, string>;
|
|
53
|
+
/** Route-to-layout mapping rules, evaluated in order (first match wins) */
|
|
54
|
+
routeRules?: RouteRule[];
|
|
55
|
+
/** Declarative entity → page routes (SPEC-069). Each rule generates one page
|
|
56
|
+
* per registered entity matching `type` + optional `filter`. */
|
|
57
|
+
entityRoutes?: EntityRoute[];
|
|
58
|
+
/** Whether to render the site-wide search UI — the header search button
|
|
59
|
+
* plus the Cmd/Ctrl+K dialog, powered by Pagefind. Defaults to `true`.
|
|
60
|
+
*
|
|
61
|
+
* Set to `false` to omit the search chrome entirely: the `search` client
|
|
62
|
+
* behavior is never initialized and the trigger button is not rendered in
|
|
63
|
+
* any layout. Leave it enabled (the default) to keep the button; note that
|
|
64
|
+
* results only appear once a Pagefind index has been built and served at
|
|
65
|
+
* `/pagefind/` — see the "Setting up search" guide. Until then the button
|
|
66
|
+
* opens to a graceful "Search is not available." message. */
|
|
67
|
+
search?: boolean;
|
|
68
|
+
/** Syntax highlighting options */
|
|
69
|
+
highlight?: {
|
|
70
|
+
theme?: string | {
|
|
71
|
+
light: string;
|
|
72
|
+
dark: string;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
/** Custom icon SVGs — merged into the theme's global icon group */
|
|
76
|
+
icons?: Record<string, string>;
|
|
77
|
+
/** Plugins to merge into this site's ThemeConfig (runes, layouts, hooks, etc.) */
|
|
78
|
+
plugins?: string[];
|
|
79
|
+
/** SPEC-035 — active locale (BCP 47, e.g. `'de'`). Selects first-party and
|
|
80
|
+
* plugin translation bundles and drives locale-aware formatting. Defaults to
|
|
81
|
+
* `'en'` (zero-config English). */
|
|
82
|
+
locale?: string;
|
|
83
|
+
/** SPEC-035 — site-level translation overrides, keyed by the auto-derived
|
|
84
|
+
* i18n key (`{scope}.{block}.{ref}`). Highest precedence — these win over
|
|
85
|
+
* first-party and plugin bundles (Decision D5). Values are `string` or a
|
|
86
|
+
* CLDR plural-category map. */
|
|
87
|
+
strings?: Record<string, string | Record<string, string>>;
|
|
88
|
+
/** Project-level tint presets — merged after theme tints (last wins).
|
|
89
|
+
* Field shape matches `TintDefinition` from `@refrakt-md/transform` per
|
|
90
|
+
* SPEC-053; `Record<string, unknown>` is used here to avoid a cross-package
|
|
91
|
+
* type dependency in `@refrakt-md/types`. */
|
|
92
|
+
tints?: Record<string, Record<string, unknown>>;
|
|
93
|
+
/** Project-level background presets — merged after theme backgrounds (last wins) */
|
|
94
|
+
backgrounds?: Record<string, Record<string, unknown>>;
|
|
95
|
+
/** Sandbox configuration. The runtime program-source directory (SPEC-104). */
|
|
96
|
+
sandbox?: {
|
|
97
|
+
/** Directory of sandbox program sources, scanned at build time
|
|
98
|
+
* (ADR-022). Relative to the project root. */
|
|
99
|
+
dir?: string;
|
|
100
|
+
/** @deprecated Renamed to `dir` (ADR-022). Still accepted as input — the
|
|
101
|
+
* config normalizer coalesces it into `dir` and emits a deprecation
|
|
102
|
+
* warning — but will be removed in a future release. */
|
|
103
|
+
examplesDir?: string;
|
|
104
|
+
};
|
|
105
|
+
/** Base URL for canonical links and og:url */
|
|
106
|
+
baseUrl?: string;
|
|
107
|
+
/** Human-readable site name for og:site_name */
|
|
108
|
+
siteName?: string;
|
|
109
|
+
/** Default og:image for pages without their own image */
|
|
110
|
+
defaultImage?: string;
|
|
111
|
+
/** Site logo for Organization JSON-LD schema */
|
|
112
|
+
logo?: string;
|
|
113
|
+
/** Canonical GitHub (or compatible) repository URL — e.g.
|
|
114
|
+
* `"https://github.com/owner/repo"`. Used by file-ref (SPEC-078) to
|
|
115
|
+
* build deep-link "View source" URLs of the form
|
|
116
|
+
* `{repoUrl}/blob/{repoBranch}/{path}#L{start}-L{end}`. When absent,
|
|
117
|
+
* `file-ref` falls back to a no-href link / in-page anchor with a
|
|
118
|
+
* build warning. */
|
|
119
|
+
repoUrl?: string;
|
|
120
|
+
/** Git ref appended to GitHub source URLs (branch / tag / commit SHA).
|
|
121
|
+
* Defaults to `"main"` when omitted. Use a commit SHA for archival
|
|
122
|
+
* URLs that won't drift when the file is edited later. */
|
|
123
|
+
repoBranch?: string;
|
|
124
|
+
/** Rune resolution configuration */
|
|
125
|
+
runes?: {
|
|
126
|
+
prefer?: Record<string, string>;
|
|
127
|
+
aliases?: Record<string, string>;
|
|
128
|
+
local?: Record<string, string>;
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
/** Plan-management configuration. Optional — when absent, plan tooling falls
|
|
132
|
+
* back to autodetecting `./plan` from the working directory. */
|
|
133
|
+
export interface PlanConfig {
|
|
134
|
+
/** Plan directory, relative to project root. Default: `plan` */
|
|
135
|
+
dir?: string;
|
|
136
|
+
}
|
|
137
|
+
/** Project-level configuration (refrakt.config.json).
|
|
138
|
+
*
|
|
139
|
+
* Three valid input shapes — all collapse to the same normalized internal form:
|
|
140
|
+
* - **Flat** (legacy): top-level `contentDir`, `theme`, `target`, …
|
|
141
|
+
* - **Singular**: `{ "site": { contentDir, theme, target, … } }`
|
|
142
|
+
* - **Plural**: `{ "sites": { "main": { … }, "blog": { … } } }`
|
|
143
|
+
*
|
|
144
|
+
* Flat and singular shapes both collapse to `sites.default`. Plural projects
|
|
145
|
+
* must reference sites by name in CLI commands and adapter options. */
|
|
146
|
+
export interface RefraktConfig {
|
|
147
|
+
/** Plugins for this project — npm packages that contribute runes, layouts,
|
|
148
|
+
* pipeline hooks, behaviors, and/or CLI commands and MCP tools.
|
|
149
|
+
* When set, this is authoritative; when absent, plugin discovery falls back
|
|
150
|
+
* to scanning `package.json` for `@refrakt-md/*` dependencies. */
|
|
151
|
+
plugins?: string[];
|
|
152
|
+
/** Plan-management configuration. */
|
|
153
|
+
plan?: PlanConfig;
|
|
154
|
+
/** Cross-reference URL templates. Patterns are tried in array order when an
|
|
155
|
+
* xref's ID isn't found in the registry (or when the registry-found entity
|
|
156
|
+
* has no usable `sourceUrl`). First match wins. See {@link XrefPattern}. */
|
|
157
|
+
xrefs?: XrefPattern[];
|
|
158
|
+
/** Named file roots — directories that file-reading runes can reach via
|
|
159
|
+
* a `namespace:filename` syntax. Markdoc partials extend `{% partial %}`
|
|
160
|
+
* to honor namespaced refs (`shared:footer.md`); the snippet rune
|
|
161
|
+
* ({% ref "SPEC-062" /%}) consumes the same resolver when its v2 lands.
|
|
162
|
+
*
|
|
163
|
+
* Keys are namespace names; values are paths relative to the config
|
|
164
|
+
* file's directory (i.e. the project root). Paths must point to existing
|
|
165
|
+
* directories. The namespace `site` is reserved for future site-level
|
|
166
|
+
* resolution. See SPEC-063 for the full resolution model. */
|
|
167
|
+
fileRoots?: Record<string, string>;
|
|
168
|
+
/** Singular-site declaration. Mutually exclusive with `sites`. */
|
|
169
|
+
site?: SiteConfig;
|
|
170
|
+
/** Multi-site declaration keyed by site name. Mutually exclusive with `site`. */
|
|
171
|
+
sites?: Record<string, SiteConfig>;
|
|
172
|
+
/** @deprecated Shorthand for `sites.default.contentDir`. Undefined for multi-site configs — use `resolveSite(config).site.contentDir`. */
|
|
173
|
+
contentDir?: string;
|
|
174
|
+
/** @deprecated Shorthand for `sites.default.theme`. Undefined for multi-site configs — use `resolveSite(config).site.theme`. Accepts the same `string | SiteThemeConfig` shape as the per-site field. */
|
|
175
|
+
theme?: string | SiteThemeConfig;
|
|
176
|
+
/** @deprecated Shorthand for `sites.default.target`. Undefined for multi-site configs — use `resolveSite(config).site.target`. The field itself is also under review (v0.11.0 follow-up): adapters do not validate it and it is increasingly vestigial; treat it as documentation-only for now. */
|
|
177
|
+
target?: string;
|
|
178
|
+
/** @deprecated Shorthand for `sites.default.overrides` */
|
|
179
|
+
overrides?: Record<string, string>;
|
|
180
|
+
/** @deprecated Shorthand for `sites.default.routeRules` */
|
|
181
|
+
routeRules?: RouteRule[];
|
|
182
|
+
/** @deprecated Shorthand for `sites.default.search` */
|
|
183
|
+
search?: boolean;
|
|
184
|
+
/** @deprecated Shorthand for `sites.default.highlight` */
|
|
185
|
+
highlight?: {
|
|
186
|
+
theme?: string | {
|
|
187
|
+
light: string;
|
|
188
|
+
dark: string;
|
|
189
|
+
};
|
|
190
|
+
};
|
|
191
|
+
/** @deprecated Shorthand for `sites.default.icons` */
|
|
192
|
+
icons?: Record<string, string>;
|
|
193
|
+
/** @deprecated Shorthand for `sites.default.backgrounds` */
|
|
194
|
+
backgrounds?: Record<string, Record<string, unknown>>;
|
|
195
|
+
/** @deprecated Shorthand for `sites.default.sandbox` */
|
|
196
|
+
sandbox?: {
|
|
197
|
+
dir?: string;
|
|
198
|
+
/** @deprecated Renamed to `dir` (ADR-022). */
|
|
199
|
+
examplesDir?: string;
|
|
200
|
+
};
|
|
201
|
+
/** @deprecated Shorthand for `sites.default.baseUrl` */
|
|
202
|
+
baseUrl?: string;
|
|
203
|
+
/** @deprecated Shorthand for `sites.default.siteName` */
|
|
204
|
+
siteName?: string;
|
|
205
|
+
/** @deprecated Shorthand for `sites.default.defaultImage` */
|
|
206
|
+
defaultImage?: string;
|
|
207
|
+
/** @deprecated Shorthand for `sites.default.logo` */
|
|
208
|
+
logo?: string;
|
|
209
|
+
/** @deprecated Shorthand for `sites.default.repoUrl` */
|
|
210
|
+
repoUrl?: string;
|
|
211
|
+
/** @deprecated Shorthand for `sites.default.repoBranch` */
|
|
212
|
+
repoBranch?: string;
|
|
213
|
+
/** @deprecated Shorthand for `sites.default.runes` */
|
|
214
|
+
runes?: {
|
|
215
|
+
prefer?: Record<string, string>;
|
|
216
|
+
aliases?: Record<string, string>;
|
|
217
|
+
local?: Record<string, string>;
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
/** A single cross-reference resolution pattern. Configures how unresolved xref
|
|
221
|
+
* IDs (those without a matching registry entity) are turned into URLs.
|
|
222
|
+
*
|
|
223
|
+
* Example: route GitHub-style refs to issue pages.
|
|
224
|
+
* ```jsonc
|
|
225
|
+
* {
|
|
226
|
+
* "match": "^GH-(?<num>\\d+)$",
|
|
227
|
+
* "template": "https://github.com/myuser/myrepo/issues/{num}",
|
|
228
|
+
* "type": "github-issue",
|
|
229
|
+
* "label": "GitHub #{num}"
|
|
230
|
+
* }
|
|
231
|
+
* ```
|
|
232
|
+
*
|
|
233
|
+
* See SPEC-065 for the full resolution model. */
|
|
234
|
+
export interface XrefPattern {
|
|
235
|
+
/** Regex pattern matched against the ID. Anchored to whole-string match by
|
|
236
|
+
* default — `^` and `$` are auto-applied unless explicit anchors are
|
|
237
|
+
* present at the start/end. Named groups (`(?<name>...)`) are extractable
|
|
238
|
+
* in `template` and `label` as `{name}`. */
|
|
239
|
+
match: string;
|
|
240
|
+
/** URL template. Supports `{id}` (the full matched ID) and `{name}` for
|
|
241
|
+
* named groups. Each substituted value is encoded per URL segment (split
|
|
242
|
+
* on `/`, encode each segment, rejoin) so path-shaped captures preserve
|
|
243
|
+
* slashes. */
|
|
244
|
+
template: string;
|
|
245
|
+
/** CSS modifier class — applied as `rf-xref--{type}`. Default: `"external"`.
|
|
246
|
+
* The value `"unresolved"` is reserved and rejected at config load. */
|
|
247
|
+
type?: string;
|
|
248
|
+
/** Template for the rendered link text. Same placeholder syntax as
|
|
249
|
+
* `template`. Default: `"{id}"`. The rune's `label=` attribute (if set)
|
|
250
|
+
* still overrides this. */
|
|
251
|
+
label?: string;
|
|
252
|
+
}
|
|
253
|
+
export interface RouteRule {
|
|
254
|
+
/** Glob-style pattern matched against the page URL (e.g. "docs/**", "**") */
|
|
255
|
+
pattern: string;
|
|
256
|
+
/** Name of the layout to use (key in manifest.layouts) */
|
|
257
|
+
layout: string;
|
|
258
|
+
/** Register pages matching this pattern as registry entities of this type,
|
|
259
|
+
* in addition to their `page` registration (SPEC-092). A page's own
|
|
260
|
+
* frontmatter `type` overrides the rule. Lets a project type a whole section
|
|
261
|
+
* by convention (e.g. `runes/**` → `rune`) without per-page frontmatter. */
|
|
262
|
+
entity?: string;
|
|
263
|
+
}
|
|
264
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD;;;;0BAI0B;AAC1B,M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C;IACjB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6DAA6D;IAC7D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qDAAqD;IACrD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2DAA2D;IAC3D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sDAAsD;IACtD,KAAK,CAAC,EAAE;QACP,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAChC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACjC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KAC/B,CAAC;CACF;AAED;;;;;;;;;;;;;kDAakD;AAClD,MAAM,WAAW,WAAW;IAC3B;;;iDAG6C;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd;;;mBAGe;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB;4EACwE;IACxE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;gCAE4B;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,SAAS;IACzB,6EAA6E;IAC7E,OAAO,EAAE,MAAM,CAAC;IAChB,0DAA0D;IAC1D,MAAM,EAAE,MAAM,CAAC;IACf;;;iFAG6E;IAC7E,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB"}
|
package/dist/config.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":""}
|
package/dist/distribution.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* (ADR-023). A package may declare several capabilities at once — Lumina is a
|
|
8
8
|
* theme that *also* ships a preset pack — so these are independent manifests,
|
|
9
9
|
* not a single `kind` discriminator (SPEC-111 §1). */
|
|
10
|
-
import type { SiteConfig } from './
|
|
10
|
+
import type { SiteConfig } from './config.js';
|
|
11
11
|
/** Site-template manifest — `template.json` (SPEC-109 §2).
|
|
12
12
|
*
|
|
13
13
|
* A full-site template **is a site**: its payload is a `SiteConfig` partial,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"distribution.d.ts","sourceRoot":"","sources":["../src/distribution.ts"],"names":[],"mappings":"AAAA;;;;;;;;uDAQuD;AAEvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"distribution.d.ts","sourceRoot":"","sources":["../src/distribution.ts"],"names":[],"mappings":"AAAA;;;;;;;;uDAQuD;AAEvD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9C;;;;;;;oCAOoC;AACpC,MAAM,WAAW,gBAAgB;IAChC;;iCAE6B;IAC7B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sDAAsD;IACtD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gEAAgE;IAChE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,yDAAyD;IACzD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;wDACoD;IACpD,IAAI,EAAE,kBAAkB,CAAC;CACzB;AAED;;;8BAG8B;AAC9B,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC,CAAC;AAErF;;;;mFAImF;AACnF,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE/C,mEAAmE;AACnE,MAAM,WAAW,WAAW;IAC3B,iDAAiD;IACjD,EAAE,EAAE,MAAM,CAAC;IACX,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,8EAA8E;IAC9E,KAAK,EAAE,WAAW,CAAC;IACnB;;mDAE+C;IAC/C,MAAM,EAAE,MAAM,CAAC;IACf;+EAC2E;IAC3E,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;+DAC+D;AAC/D,MAAM,WAAW,kBAAkB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,gEAAgE;IAChE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,WAAW,EAAE,CAAC;CACvB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export { Newable, NodeType, } from './interfaces.js';
|
|
2
2
|
export type { DesignTokens } from './tokens.js';
|
|
3
3
|
export type { TokenContract, PartialTokenContract, ThemeTokensConfig, ThemeTokensModeOverlay, SentimentTokens, SyntaxTokens, DeepPartial, } from './token-contract.js';
|
|
4
|
-
export type { RefraktConfig, SiteConfig,
|
|
4
|
+
export type { RefraktConfig, SiteConfig, PlanConfig, XrefPattern, RouteRule, EntityRoute, } from './config.js';
|
|
5
|
+
export type { SiteThemeConfig, ThemeManifest, LayoutDefinition, ComponentDefinition, } from './theme.js';
|
|
5
6
|
export { getThemePackage } from './theme.js';
|
|
6
7
|
export type { Plugin, PluginRune, PluginAttribute, RuneExtension, PluginThemeConfig, PluginLocalizedValue, } from './package.js';
|
|
7
8
|
export type { SerializedTag, RendererNode } from './serialized.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,OAAO,EACP,QAAQ,GACT,MAAM,iBAAiB,CAAC;AAIzB,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,YAAY,EACV,aAAa,EACb,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EACtB,eAAe,EACf,YAAY,EACZ,WAAW,GACZ,MAAM,qBAAqB,CAAC;AAG7B,YAAY,EACV,aAAa,EACb,UAAU,EACV,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,OAAO,EACP,QAAQ,GACT,MAAM,iBAAiB,CAAC;AAIzB,YAAY,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,YAAY,EACV,aAAa,EACb,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EACtB,eAAe,EACf,YAAY,EACZ,WAAW,GACZ,MAAM,qBAAqB,CAAC;AAG7B,YAAY,EACV,aAAa,EACb,UAAU,EACV,UAAU,EACV,WAAW,EACX,SAAS,EACT,WAAW,GACZ,MAAM,aAAa,CAAC;AAGrB,YAAY,EACV,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAG7C,YAAY,EACV,MAAM,EACN,UAAU,EACV,eAAe,EACf,aAAa,EACb,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,cAAc,CAAC;AAGtB,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGnE,YAAY,EACX,kBAAkB,EAClB,gBAAgB,EAChB,qBAAqB,GACrB,MAAM,sBAAsB,CAAC;AAG9B,YAAY,EACX,sBAAsB,EACtB,aAAa,EACb,mBAAmB,EACnB,cAAc,EACd,sBAAsB,EACtB,aAAa,EACb,aAAa,EACb,cAAc,EACd,WAAW,EACX,mBAAmB,EACnB,SAAS,EACT,oBAAoB,EACpB,wBAAwB,EACxB,iBAAiB,EACjB,qBAAqB,EACrB,uBAAuB,EACvB,sBAAsB,EACtB,YAAY,EACZ,aAAa,EACb,eAAe,GACf,MAAM,oBAAoB,CAAC;AAG5B,YAAY,EACX,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,cAAc,EACd,UAAU,EACV,YAAY,EACZ,cAAc,EACd,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,sBAAsB,EACtB,iBAAiB,EACjB,cAAc,EACd,sBAAsB,EACtB,eAAe,GACf,MAAM,eAAe,CAAC;AAGvB,YAAY,EACX,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,GACX,MAAM,iBAAiB,CAAC;AAGzB,YAAY,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAGtD,YAAY,EACX,gBAAgB,EAChB,kBAAkB,EAClB,WAAW,EACX,WAAW,EACX,kBAAkB,GAClB,MAAM,mBAAmB,CAAC;AAG3B,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAK/E,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAsCA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AA2E7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAatD,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/pipeline.d.ts
CHANGED
|
@@ -203,6 +203,14 @@ export interface PreprocessContext extends PipelineContext {
|
|
|
203
203
|
* Variable nodes that aren't resolvable here render as empty strings,
|
|
204
204
|
* matching transform-time behaviour. */
|
|
205
205
|
variables?: Record<string, unknown>;
|
|
206
|
+
/** Parsed partial ASTs, keyed exactly as `config.partials` keys them —
|
|
207
|
+
* unprefixed for the site's `_partials/` (`footer.md`), namespaced for a
|
|
208
|
+
* registered file root (`shared:footer.md`). Exposed at preprocess time so
|
|
209
|
+
* `include` (SPEC-129) can paste a file's AST *before* the other
|
|
210
|
+
* preprocessors run, reading the same directory and roots `{% partial %}`
|
|
211
|
+
* does. Values are Markdoc `Node`s; typed as `unknown` because this package
|
|
212
|
+
* does not depend on Markdoc. */
|
|
213
|
+
partials?: Record<string, unknown>;
|
|
206
214
|
}
|
|
207
215
|
/** Per-page metadata handed to {@link PluginPipelineHooks.preprocess}. */
|
|
208
216
|
export interface PreprocessPage {
|
package/dist/pipeline.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../src/pipeline.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAEvD,wDAAwD;AACxD,MAAM,WAAW,mBAAmB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACX;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC/B,iEAAiE;IACjE,GAAG,EAAE,MAAM,CAAC;IACZ,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,QAAQ,EAAE,mBAAmB,EAAE,CAAC;IAChC,6BAA6B;IAC7B,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC;;;;;OAKG;IACH,UAAU,EAAE,OAAO,CAAC;CACpB;AAED;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IAClC,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAC;IACb;sEACkE;IAClE,EAAE,EAAE,MAAM,CAAC;IACX;;;;;;;;;qDASiD;IACjD,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;;;;;;;+DAQ2D;I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,EAAE,QAAQ,CAAC,cAAc,CAAC,EAClC,GAAG,EAAE,eAAe,KAChB,OAAO,CAAC;IAEb;;;;;OAKG;IACH,WAAW,CAAC,EAAE,CACb,IAAI,EAAE,eAAe,EACrB,UAAU,EAAE,cAAc,EAC1B,GAAG,EAAE,eAAe,KAChB,eAAe,CAAC;CACrB;AAED,gFAAgF;AAChF,MAAM,WAAW,sBAAuB,SAAQ,eAAe;IAC9D,mEAAmE;IACnE,QAAQ,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC;IACnC,8EAA8E;IAC9E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;oEACgE;IAChE,UAAU,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;kFACkF;AAClF,MAAM,WAAW,eAAe;IAC/B,oEAAoE;IACpE,GAAG,EAAE,MAAM,CAAC;IACZ,6EAA6E;IAC7E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACtC,wCAAwC;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB;kFAC8E;IAC9E,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,wDAAwD;IACxD,MAAM,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACjD"}
|
package/dist/theme.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { RouteRule } from './config.js';
|
|
1
2
|
/** Extract the theme package identifier from a `SiteConfig.theme` value.
|
|
2
3
|
* Accepts either the legacy string form or the new {@link SiteThemeConfig}
|
|
3
4
|
* object form (where the identifier lives in `package`). Useful at call sites
|
|
@@ -42,243 +43,6 @@ export interface SiteThemeConfig {
|
|
|
42
43
|
colorScheme?: 'auto' | 'light' | 'dark';
|
|
43
44
|
};
|
|
44
45
|
}
|
|
45
|
-
/** A declarative entity → page route (SPEC-069). Generates one page per
|
|
46
|
-
* registered entity matching `type` + optional `filter`. `{name}` placeholders
|
|
47
|
-
* in `url` / `title` / `frontmatter` interpolate entity fields; `$item` is
|
|
48
|
-
* bound in `render` / `render-template`. `render` and `render-template` are
|
|
49
|
-
* mutually exclusive. */
|
|
50
|
-
export interface EntityRoute {
|
|
51
|
-
/** Entity type(s) the rule matches, comma-separated for multiple. */
|
|
52
|
-
type: string;
|
|
53
|
-
/** Optional field:value filter (SPEC-070 grammar). */
|
|
54
|
-
filter?: string;
|
|
55
|
-
/** Templated route, site-root-relative (basePath applied by the loader). */
|
|
56
|
-
url: string;
|
|
57
|
-
/** Templated page title; falls back to the rendered content's heading. */
|
|
58
|
-
title?: string;
|
|
59
|
-
/** Inline markdoc body, with `$item` bound. */
|
|
60
|
-
render?: string;
|
|
61
|
-
/** Markdoc partial used as the body instead of `render`. */
|
|
62
|
-
'render-template'?: string;
|
|
63
|
-
/** Frontmatter for the generated page (`{name}` placeholders interpolate). */
|
|
64
|
-
frontmatter?: Record<string, unknown>;
|
|
65
|
-
}
|
|
66
|
-
/** Per-site configuration. A project may declare a single site (via `site`) or
|
|
67
|
-
* multiple named sites (via `sites: { name: SiteConfig }`).
|
|
68
|
-
* Only `contentDir` and `theme` are strictly required for the site to load. */
|
|
69
|
-
export interface SiteConfig {
|
|
70
|
-
/** Path to content directory, relative to project root */
|
|
71
|
-
contentDir: string;
|
|
72
|
-
/** Active theme — accepts either a package name string (legacy shorthand)
|
|
73
|
-
* or a full {@link SiteThemeConfig} with presets, token overrides, mode
|
|
74
|
-
* overlays, and `colorScheme`. */
|
|
75
|
-
theme: string | SiteThemeConfig;
|
|
76
|
-
/** Documentation-only adapter hint (`svelte`, `astro`, `next`, `nuxt`, `eleventy`, `html`).
|
|
77
|
-
* No adapter reads or validates this field today; it serves as an in-config record of
|
|
78
|
-
* which adapter the site is intended for. Slated for removal in v1.0. */
|
|
79
|
-
target?: string;
|
|
80
|
-
/** Component overrides — maps typeof names to relative paths of replacement components */
|
|
81
|
-
overrides?: Record<string, string>;
|
|
82
|
-
/** Route-to-layout mapping rules, evaluated in order (first match wins) */
|
|
83
|
-
routeRules?: RouteRule[];
|
|
84
|
-
/** Declarative entity → page routes (SPEC-069). Each rule generates one page
|
|
85
|
-
* per registered entity matching `type` + optional `filter`. */
|
|
86
|
-
entityRoutes?: EntityRoute[];
|
|
87
|
-
/** Whether to render the site-wide search UI — the header search button
|
|
88
|
-
* plus the Cmd/Ctrl+K dialog, powered by Pagefind. Defaults to `true`.
|
|
89
|
-
*
|
|
90
|
-
* Set to `false` to omit the search chrome entirely: the `search` client
|
|
91
|
-
* behavior is never initialized and the trigger button is not rendered in
|
|
92
|
-
* any layout. Leave it enabled (the default) to keep the button; note that
|
|
93
|
-
* results only appear once a Pagefind index has been built and served at
|
|
94
|
-
* `/pagefind/` — see the "Setting up search" guide. Until then the button
|
|
95
|
-
* opens to a graceful "Search is not available." message. */
|
|
96
|
-
search?: boolean;
|
|
97
|
-
/** Syntax highlighting options */
|
|
98
|
-
highlight?: {
|
|
99
|
-
theme?: string | {
|
|
100
|
-
light: string;
|
|
101
|
-
dark: string;
|
|
102
|
-
};
|
|
103
|
-
};
|
|
104
|
-
/** Custom icon SVGs — merged into the theme's global icon group */
|
|
105
|
-
icons?: Record<string, string>;
|
|
106
|
-
/** Plugins to merge into this site's ThemeConfig (runes, layouts, hooks, etc.) */
|
|
107
|
-
plugins?: string[];
|
|
108
|
-
/** SPEC-035 — active locale (BCP 47, e.g. `'de'`). Selects first-party and
|
|
109
|
-
* plugin translation bundles and drives locale-aware formatting. Defaults to
|
|
110
|
-
* `'en'` (zero-config English). */
|
|
111
|
-
locale?: string;
|
|
112
|
-
/** SPEC-035 — site-level translation overrides, keyed by the auto-derived
|
|
113
|
-
* i18n key (`{scope}.{block}.{ref}`). Highest precedence — these win over
|
|
114
|
-
* first-party and plugin bundles (Decision D5). Values are `string` or a
|
|
115
|
-
* CLDR plural-category map. */
|
|
116
|
-
strings?: Record<string, string | Record<string, string>>;
|
|
117
|
-
/** Project-level tint presets — merged after theme tints (last wins).
|
|
118
|
-
* Field shape matches `TintDefinition` from `@refrakt-md/transform` per
|
|
119
|
-
* SPEC-053; `Record<string, unknown>` is used here to avoid a cross-package
|
|
120
|
-
* type dependency in `@refrakt-md/types`. */
|
|
121
|
-
tints?: Record<string, Record<string, unknown>>;
|
|
122
|
-
/** Project-level background presets — merged after theme backgrounds (last wins) */
|
|
123
|
-
backgrounds?: Record<string, Record<string, unknown>>;
|
|
124
|
-
/** Sandbox configuration. The runtime program-source directory (SPEC-104). */
|
|
125
|
-
sandbox?: {
|
|
126
|
-
/** Directory of sandbox program sources, scanned at build time
|
|
127
|
-
* (ADR-022). Relative to the project root. */
|
|
128
|
-
dir?: string;
|
|
129
|
-
/** @deprecated Renamed to `dir` (ADR-022). Still accepted as input — the
|
|
130
|
-
* config normalizer coalesces it into `dir` and emits a deprecation
|
|
131
|
-
* warning — but will be removed in a future release. */
|
|
132
|
-
examplesDir?: string;
|
|
133
|
-
};
|
|
134
|
-
/** Base URL for canonical links and og:url */
|
|
135
|
-
baseUrl?: string;
|
|
136
|
-
/** Human-readable site name for og:site_name */
|
|
137
|
-
siteName?: string;
|
|
138
|
-
/** Default og:image for pages without their own image */
|
|
139
|
-
defaultImage?: string;
|
|
140
|
-
/** Site logo for Organization JSON-LD schema */
|
|
141
|
-
logo?: string;
|
|
142
|
-
/** Canonical GitHub (or compatible) repository URL — e.g.
|
|
143
|
-
* `"https://github.com/owner/repo"`. Used by file-ref (SPEC-078) to
|
|
144
|
-
* build deep-link "View source" URLs of the form
|
|
145
|
-
* `{repoUrl}/blob/{repoBranch}/{path}#L{start}-L{end}`. When absent,
|
|
146
|
-
* `file-ref` falls back to a no-href link / in-page anchor with a
|
|
147
|
-
* build warning. */
|
|
148
|
-
repoUrl?: string;
|
|
149
|
-
/** Git ref appended to GitHub source URLs (branch / tag / commit SHA).
|
|
150
|
-
* Defaults to `"main"` when omitted. Use a commit SHA for archival
|
|
151
|
-
* URLs that won't drift when the file is edited later. */
|
|
152
|
-
repoBranch?: string;
|
|
153
|
-
/** Rune resolution configuration */
|
|
154
|
-
runes?: {
|
|
155
|
-
prefer?: Record<string, string>;
|
|
156
|
-
aliases?: Record<string, string>;
|
|
157
|
-
local?: Record<string, string>;
|
|
158
|
-
};
|
|
159
|
-
}
|
|
160
|
-
/** Plan-management configuration. Optional — when absent, plan tooling falls
|
|
161
|
-
* back to autodetecting `./plan` from the working directory. */
|
|
162
|
-
export interface PlanConfig {
|
|
163
|
-
/** Plan directory, relative to project root. Default: `plan` */
|
|
164
|
-
dir?: string;
|
|
165
|
-
}
|
|
166
|
-
/** Project-level configuration (refrakt.config.json).
|
|
167
|
-
*
|
|
168
|
-
* Three valid input shapes — all collapse to the same normalized internal form:
|
|
169
|
-
* - **Flat** (legacy): top-level `contentDir`, `theme`, `target`, …
|
|
170
|
-
* - **Singular**: `{ "site": { contentDir, theme, target, … } }`
|
|
171
|
-
* - **Plural**: `{ "sites": { "main": { … }, "blog": { … } } }`
|
|
172
|
-
*
|
|
173
|
-
* Flat and singular shapes both collapse to `sites.default`. Plural projects
|
|
174
|
-
* must reference sites by name in CLI commands and adapter options. */
|
|
175
|
-
export interface RefraktConfig {
|
|
176
|
-
/** Plugins for this project — npm packages that contribute runes, layouts,
|
|
177
|
-
* pipeline hooks, behaviors, and/or CLI commands and MCP tools.
|
|
178
|
-
* When set, this is authoritative; when absent, plugin discovery falls back
|
|
179
|
-
* to scanning `package.json` for `@refrakt-md/*` dependencies. */
|
|
180
|
-
plugins?: string[];
|
|
181
|
-
/** Plan-management configuration. */
|
|
182
|
-
plan?: PlanConfig;
|
|
183
|
-
/** Cross-reference URL templates. Patterns are tried in array order when an
|
|
184
|
-
* xref's ID isn't found in the registry (or when the registry-found entity
|
|
185
|
-
* has no usable `sourceUrl`). First match wins. See {@link XrefPattern}. */
|
|
186
|
-
xrefs?: XrefPattern[];
|
|
187
|
-
/** Named file roots — directories that file-reading runes can reach via
|
|
188
|
-
* a `namespace:filename` syntax. Markdoc partials extend `{% partial %}`
|
|
189
|
-
* to honor namespaced refs (`shared:footer.md`); the snippet rune
|
|
190
|
-
* ({% ref "SPEC-062" /%}) consumes the same resolver when its v2 lands.
|
|
191
|
-
*
|
|
192
|
-
* Keys are namespace names; values are paths relative to the config
|
|
193
|
-
* file's directory (i.e. the project root). Paths must point to existing
|
|
194
|
-
* directories. The namespace `site` is reserved for future site-level
|
|
195
|
-
* resolution. See SPEC-063 for the full resolution model. */
|
|
196
|
-
fileRoots?: Record<string, string>;
|
|
197
|
-
/** Singular-site declaration. Mutually exclusive with `sites`. */
|
|
198
|
-
site?: SiteConfig;
|
|
199
|
-
/** Multi-site declaration keyed by site name. Mutually exclusive with `site`. */
|
|
200
|
-
sites?: Record<string, SiteConfig>;
|
|
201
|
-
/** @deprecated Shorthand for `sites.default.contentDir`. Undefined for multi-site configs — use `resolveSite(config).site.contentDir`. */
|
|
202
|
-
contentDir?: string;
|
|
203
|
-
/** @deprecated Shorthand for `sites.default.theme`. Undefined for multi-site configs — use `resolveSite(config).site.theme`. Accepts the same `string | SiteThemeConfig` shape as the per-site field. */
|
|
204
|
-
theme?: string | SiteThemeConfig;
|
|
205
|
-
/** @deprecated Shorthand for `sites.default.target`. Undefined for multi-site configs — use `resolveSite(config).site.target`. The field itself is also under review (v0.11.0 follow-up): adapters do not validate it and it is increasingly vestigial; treat it as documentation-only for now. */
|
|
206
|
-
target?: string;
|
|
207
|
-
/** @deprecated Shorthand for `sites.default.overrides` */
|
|
208
|
-
overrides?: Record<string, string>;
|
|
209
|
-
/** @deprecated Shorthand for `sites.default.routeRules` */
|
|
210
|
-
routeRules?: RouteRule[];
|
|
211
|
-
/** @deprecated Shorthand for `sites.default.search` */
|
|
212
|
-
search?: boolean;
|
|
213
|
-
/** @deprecated Shorthand for `sites.default.highlight` */
|
|
214
|
-
highlight?: {
|
|
215
|
-
theme?: string | {
|
|
216
|
-
light: string;
|
|
217
|
-
dark: string;
|
|
218
|
-
};
|
|
219
|
-
};
|
|
220
|
-
/** @deprecated Shorthand for `sites.default.icons` */
|
|
221
|
-
icons?: Record<string, string>;
|
|
222
|
-
/** @deprecated Shorthand for `sites.default.backgrounds` */
|
|
223
|
-
backgrounds?: Record<string, Record<string, unknown>>;
|
|
224
|
-
/** @deprecated Shorthand for `sites.default.sandbox` */
|
|
225
|
-
sandbox?: {
|
|
226
|
-
dir?: string;
|
|
227
|
-
/** @deprecated Renamed to `dir` (ADR-022). */
|
|
228
|
-
examplesDir?: string;
|
|
229
|
-
};
|
|
230
|
-
/** @deprecated Shorthand for `sites.default.baseUrl` */
|
|
231
|
-
baseUrl?: string;
|
|
232
|
-
/** @deprecated Shorthand for `sites.default.siteName` */
|
|
233
|
-
siteName?: string;
|
|
234
|
-
/** @deprecated Shorthand for `sites.default.defaultImage` */
|
|
235
|
-
defaultImage?: string;
|
|
236
|
-
/** @deprecated Shorthand for `sites.default.logo` */
|
|
237
|
-
logo?: string;
|
|
238
|
-
/** @deprecated Shorthand for `sites.default.repoUrl` */
|
|
239
|
-
repoUrl?: string;
|
|
240
|
-
/** @deprecated Shorthand for `sites.default.repoBranch` */
|
|
241
|
-
repoBranch?: string;
|
|
242
|
-
/** @deprecated Shorthand for `sites.default.runes` */
|
|
243
|
-
runes?: {
|
|
244
|
-
prefer?: Record<string, string>;
|
|
245
|
-
aliases?: Record<string, string>;
|
|
246
|
-
local?: Record<string, string>;
|
|
247
|
-
};
|
|
248
|
-
}
|
|
249
|
-
/** A single cross-reference resolution pattern. Configures how unresolved xref
|
|
250
|
-
* IDs (those without a matching registry entity) are turned into URLs.
|
|
251
|
-
*
|
|
252
|
-
* Example: route GitHub-style refs to issue pages.
|
|
253
|
-
* ```jsonc
|
|
254
|
-
* {
|
|
255
|
-
* "match": "^GH-(?<num>\\d+)$",
|
|
256
|
-
* "template": "https://github.com/myuser/myrepo/issues/{num}",
|
|
257
|
-
* "type": "github-issue",
|
|
258
|
-
* "label": "GitHub #{num}"
|
|
259
|
-
* }
|
|
260
|
-
* ```
|
|
261
|
-
*
|
|
262
|
-
* See SPEC-065 for the full resolution model. */
|
|
263
|
-
export interface XrefPattern {
|
|
264
|
-
/** Regex pattern matched against the ID. Anchored to whole-string match by
|
|
265
|
-
* default — `^` and `$` are auto-applied unless explicit anchors are
|
|
266
|
-
* present at the start/end. Named groups (`(?<name>...)`) are extractable
|
|
267
|
-
* in `template` and `label` as `{name}`. */
|
|
268
|
-
match: string;
|
|
269
|
-
/** URL template. Supports `{id}` (the full matched ID) and `{name}` for
|
|
270
|
-
* named groups. Each substituted value is encoded per URL segment (split
|
|
271
|
-
* on `/`, encode each segment, rejoin) so path-shaped captures preserve
|
|
272
|
-
* slashes. */
|
|
273
|
-
template: string;
|
|
274
|
-
/** CSS modifier class — applied as `rf-xref--{type}`. Default: `"external"`.
|
|
275
|
-
* The value `"unresolved"` is reserved and rejected at config load. */
|
|
276
|
-
type?: string;
|
|
277
|
-
/** Template for the rendered link text. Same placeholder syntax as
|
|
278
|
-
* `template`. Default: `"{id}"`. The rune's `label=` attribute (if set)
|
|
279
|
-
* still overrides this. */
|
|
280
|
-
label?: string;
|
|
281
|
-
}
|
|
282
46
|
/** Theme manifest — the universal contract between content and rendering */
|
|
283
47
|
export interface ThemeManifest {
|
|
284
48
|
name: string;
|
|
@@ -321,17 +85,6 @@ export interface LayoutDefinition {
|
|
|
321
85
|
/** Regions that must be provided for this layout to render correctly */
|
|
322
86
|
requiredRegions?: string[];
|
|
323
87
|
}
|
|
324
|
-
export interface RouteRule {
|
|
325
|
-
/** Glob-style pattern matched against the page URL (e.g. "docs/**", "**") */
|
|
326
|
-
pattern: string;
|
|
327
|
-
/** Name of the layout to use (key in manifest.layouts) */
|
|
328
|
-
layout: string;
|
|
329
|
-
/** Register pages matching this pattern as registry entities of this type,
|
|
330
|
-
* in addition to their `page` registration (SPEC-092). A page's own
|
|
331
|
-
* frontmatter `type` overrides the rule. Lets a project type a whole section
|
|
332
|
-
* by convention (e.g. `runes/**` → `rune`) without per-page frontmatter. */
|
|
333
|
-
entity?: string;
|
|
334
|
-
}
|
|
335
88
|
export interface ComponentDefinition {
|
|
336
89
|
/** Relative path to component file */
|
|
337
90
|
component: string;
|
package/dist/theme.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"AAAA;;;yEAGyE;AACzE,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,eAAe,GAAG,MAAM,CAEvE;AAED;;;;;;;2DAO2D;AAC3D,MAAM,WAAW,eAAe;IAC/B,oDAAoD;IACpD,OAAO,EAAE,MAAM,CAAC;IAChB;;wDAEoD;IACpD,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB;;;oFAGgF;IAChF,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;IACxC;oEACgE;IAChE,MAAM,CAAC,EAAE,OAAO,qBAAqB,EAAE,iBAAiB,CAAC;IACzD;sCACkC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,qBAAqB,EAAE,oBAAoB,CAAC,CAAC;IAC3E,0CAA0C;IAC1C,IAAI,CAAC,EAAE;QACN;;;;;;;yEAOiE;QACjE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC;KACxC,CAAC;CACF;AAED
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;;yEAGyE;AACzE,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,eAAe,GAAG,MAAM,CAEvE;AAED;;;;;;;2DAO2D;AAC3D,MAAM,WAAW,eAAe;IAC/B,oDAAoD;IACpD,OAAO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AAM,CAAC;IAC9D,gEAAgE;IAChE,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,gBAAgB;IAChC,6CAA6C;IAC7C,SAAS,EAAE,MAAM,CAAC;IAClB,4CAA4C;IAC5C,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,wEAAwE;IACxE,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,mBAAmB;IACnC,sCAAsC;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,wDAAwD;IACxD,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,8CAA8C;IAC9C,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,qEAAqE;IACrE,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACzD"}
|
package/dist/theme.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"AAEA;;;yEAGyE;AACzE,MAAM,UAAU,eAAe,CAAC,KAA+B;IAC9D,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC;AAC1D,CAAC"}
|
package/package.json
CHANGED
package/dist/types.d.ts
DELETED
package/dist/types.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
package/dist/types.js
DELETED
package/dist/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|