@refrakt-md/runes 0.12.0 → 0.14.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 CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { ThemeConfig } from '@refrakt-md/transform';
2
- import type { PluginPipelineHooks } from '@refrakt-md/types';
2
+ import type { PluginPipelineHooks, EntityRegistry, PipelineContext } from '@refrakt-md/types';
3
3
  /** Core theme configuration — universal rune-to-BEM-block mappings shared by all themes.
4
4
  * Icons are empty; themes provide their own icon SVGs via mergeThemeConfig. */
5
5
  export declare const coreConfig: ThemeConfig;
@@ -11,6 +11,40 @@ export interface PageTreeNode {
11
11
  title: string;
12
12
  children: PageTreeNode[];
13
13
  }
14
+ interface BlogPostData {
15
+ title: string;
16
+ url: string;
17
+ date: string;
18
+ description: string;
19
+ draft: boolean;
20
+ frontmatter: Record<string, unknown>;
21
+ }
22
+ /**
23
+ * Apply core auto-resolutions (breadcrumb, nav, collapsible, cards, pagination,
24
+ * blog, xref) to an arbitrary renderable tree using the same aggregated data
25
+ * the pipeline produces.
26
+ *
27
+ * Used by callers that need to resolve sentinels in renderables outside the
28
+ * per-page pipeline — most notably layout regions, which are parsed once but
29
+ * need per-page URL context for auto-open and auto-pagination.
30
+ */
31
+ export declare function resolveCoreSentinels(renderable: unknown, pageUrl: string, coreData: {
32
+ breadcrumbPaths: Map<string, string[]>;
33
+ pagesByUrl: Map<string, {
34
+ url: string;
35
+ title: string;
36
+ parentUrl: string;
37
+ description?: string;
38
+ icon?: string;
39
+ order?: number;
40
+ }>;
41
+ allPosts: BlogPostData[];
42
+ registry: Readonly<EntityRegistry>;
43
+ }, ctx: PipelineContext,
44
+ /** Extra trees (e.g. layout regions + page content) to scan when looking
45
+ * for nav sequences during auto-pagination. Required when calling against
46
+ * a layout region where the sidebar nav lives in a different region. */
47
+ navSearchScope?: unknown[]): unknown;
14
48
  /**
15
49
  * Core cross-page pipeline hooks.
16
50
  * Run for every site, before any plugin hooks.
@@ -18,4 +52,5 @@ export interface PageTreeNode {
18
52
  * and resolves blog post listings.
19
53
  */
20
54
  export declare const corePipelineHooks: PluginPipelineHooks;
55
+ export {};
21
56
  //# sourceMappingURL=config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAA+B,MAAM,uBAAuB,CAAC;AAEtF,OAAO,KAAK,EAAE,mBAAmB,EAAoE,MAAM,mBAAmB,CAAC;AAgF/H;gFACgF;AAChF,eAAO,MAAM,UAAU,EAAE,WAksBxB,CAAC;AAEF,sGAAsG;AACtG,eAAO,MAAM,UAAU,aAAa,CAAC;AAIrC,gEAAgE;AAChE,MAAM,WAAW,YAAY;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,YAAY,EAAE,CAAC;CACzB;AAgbD;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,mBA8H/B,CAAC"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAA+B,MAAM,uBAAuB,CAAC;AAEtF,OAAO,KAAK,EAAE,mBAAmB,EAAmB,cAAc,EAAkB,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAiF/H;gFACgF;AAChF,eAAO,MAAM,UAAU,EAAE,WA4sBxB,CAAC;AAEF,sGAAsG;AACtG,eAAO,MAAM,UAAU,aAAa,CAAC;AAIrC,gEAAgE;AAChE,MAAM,WAAW,YAAY;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,YAAY,EAAE,CAAC;CACzB;AAs3BD,UAAU,YAAY;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAA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