@staticbolt/docs 0.0.1-beta.0 → 0.0.1-beta.1

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/README.md CHANGED
@@ -107,17 +107,17 @@ Copy this as `sources/layouts/document.layout.html` and edit the names:
107
107
 
108
108
  To change the page structure, copy `node_modules/@staticbolt/docs/sources/parts/document/document.part.html` into the project and point the layout at the copy; it references the other parts by package path, so it works as is.
109
109
 
110
- | Part | Role |
111
- | --------------------- | -------------------------------------------------------------------------------- |
112
- | `document` | The whole page. `title`, `minHeading`, `maxHeading`, slot `icons`, default slot. |
113
- | `header` | Takes `title`. Slot `icons` for the social links. |
114
- | `sidebar` | Filled by `contentPlugin`. Slot `icons` for the social links. |
115
- | `table-of-content` | `-desktop` takes `minHeading` and `maxHeading`, `-mobile` none. |
116
- | `pagination-links` | Previous/next links read from the sidebar. |
117
- | `callouts` | Build-time script turning collapsible callouts into accordions. |
118
- | `mermaid` | Renders ` ```mermaid ` fences. Removes itself from pages without. |
119
- | `color-scheme-switch` | Already inside header and sidebar. |
120
- | `badge` | Used by the sidebar for `data.badgeText` / `data.badgeVariant`. |
110
+ | Part | Role |
111
+ | --------------------- | -------------------------------------------------------------------------------------------- |
112
+ | `document` | The whole page. `title`, `minHeading`, `maxHeading`, `mermaid`, slot `icons`, default slot. |
113
+ | `header` | Takes `title`. Slot `icons` for the social links. |
114
+ | `sidebar` | Filled by `contentPlugin`. Slot `icons` for the social links. |
115
+ | `table-of-content` | `-desktop` takes `minHeading` and `maxHeading`, `-mobile` none. |
116
+ | `pagination-links` | Previous/next links read from the sidebar. |
117
+ | `callouts` | Build-time script turning collapsible callouts into accordions. |
118
+ | `mermaid` | Renders ` ```mermaid ` fences. Removes itself from pages without. Needs `mermaid` installed. |
119
+ | `color-scheme-switch` | Already inside header and sidebar. |
120
+ | `badge` | Used by the sidebar for `data.badgeText` / `data.badgeVariant`. |
121
121
 
122
122
  ## Styles
123
123
 
package/lib/index.d.mts CHANGED
@@ -244,8 +244,11 @@ declare function normalizeTitle(string: string): string;
244
244
  //#endregion
245
245
  //#region plugins/ec-cache.d.ts
246
246
  declare function sha1(input: string): string;
247
- /** Invalidates all cached entries when the expressive-code version or its configuration changes. */
248
- declare const ecCacheSalt: string;
247
+ /**
248
+ * Invalidates all cached entries when the expressive-code version or its configuration changes.\
249
+ * Functions in the options, plugin hooks included, count by name only.
250
+ */
251
+ declare function ecCacheSalt(options?: RehypeExpressiveCodeOptions): string;
249
252
  declare class PersistentCache {
250
253
  private readonly filePath;
251
254
  private readonly entries;
@@ -334,6 +337,9 @@ declare module "mdast" {
334
337
  interface PhrasingContentMap {
335
338
  obsidianTag: ObsidianTagNode;
336
339
  }
340
+ interface RootContentMap {
341
+ obsidianTag: ObsidianTagNode;
342
+ }
337
343
  }
338
344
  /**
339
345
  * Remark plugin that renders Obsidian tags.
package/lib/plugins.mjs CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staticbolt/docs",
3
- "version": "0.0.1-beta.0",
3
+ "version": "0.0.1-beta.1",
4
4
  "description": "Documentation theme for staticbolt: layout parts, styles, and plugins shared by every docs site.",
5
5
  "author": "Ahmed ALABSI",
6
6
  "license": "MIT",
@@ -3,6 +3,7 @@
3
3
  @attr title - Site name shown in the header.
4
4
  @attr minHeading - Lowest heading level in the table of contents. Default 2.
5
5
  @attr maxHeading - Highest heading level in the table of contents. Default 3.
6
+ @attr mermaid - Present to render mermaid fences. Needs the mermaid package.
6
7
  @slot - The page content.
7
8
  @slot logo - Rendered before the title in the header link.
8
9
  @slot icons - Links rendered in the header and the sidebar footer.
@@ -45,7 +46,10 @@
45
46
  </div>
46
47
 
47
48
  <part src="@staticbolt/docs/parts/callouts/callouts.part.html"></part>
49
+
50
+ {{ $data.mermaid === undefined ? "" : `
48
51
  <part src="@staticbolt/docs/parts/mermaid/mermaid.part.html"></part>
52
+ ` }}
49
53
 
50
54
  <!-- ::: Page title and skip link ::: -->
51
55
  <script build-time>