@stacksjs/bunpress 0.1.21 → 0.2.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 (54) hide show
  1. package/dist/bin/cli.d.ts +3 -0
  2. package/dist/bin/cli.js +1 -1
  3. package/dist/{chunk-kxr6zf7e.js → chunk-2ns9va8d.js} +1315 -464
  4. package/dist/{chunk-qdmkac4z.js → chunk-av14gbps.js} +10 -11
  5. package/dist/{chunk-m0g9vk1e.js → chunk-avg4ftb9.js} +159 -194
  6. package/dist/chunk-fyb5bzsp.js +10 -0
  7. package/dist/chunk-n0ebp7d8.js +38 -0
  8. package/dist/{chunk-qrp18ybj.js → chunk-trhgd2dy.js} +1 -1
  9. package/dist/chunk-w615shtf.js +2 -0
  10. package/dist/chunk-x5m3c6jd.js +469 -0
  11. package/dist/src/build-manifest.d.ts +22 -0
  12. package/dist/src/config.d.ts +12 -0
  13. package/dist/src/data-loader.d.ts +6 -3
  14. package/dist/src/highlighter.d.ts +2 -1
  15. package/dist/src/i18n.d.ts +67 -0
  16. package/dist/src/index.d.ts +2 -0
  17. package/dist/src/index.js +1 -1
  18. package/dist/src/page-meta.d.ts +19 -0
  19. package/dist/src/search-index.d.ts +61 -0
  20. package/dist/src/serve.d.ts +20 -5
  21. package/dist/src/toc.d.ts +6 -2
  22. package/dist/src/types.d.ts +80 -8
  23. package/dist/templates/blocks/alerts/caution.stx +2 -2
  24. package/dist/templates/blocks/alerts/important.stx +2 -2
  25. package/dist/templates/blocks/alerts/note.stx +2 -2
  26. package/dist/templates/blocks/alerts/tip.stx +2 -2
  27. package/dist/templates/blocks/alerts/warning.stx +2 -2
  28. package/dist/templates/blocks/containers/danger.stx +2 -2
  29. package/dist/templates/blocks/containers/details.stx +2 -2
  30. package/dist/templates/blocks/containers/info.stx +2 -2
  31. package/dist/templates/blocks/containers/raw.stx +1 -1
  32. package/dist/templates/blocks/containers/tip.stx +2 -2
  33. package/dist/templates/blocks/containers/warning.stx +2 -2
  34. package/dist/templates/copy-page.stx +81 -0
  35. package/dist/templates/doc-footer.stx +51 -0
  36. package/dist/templates/footer.stx +45 -0
  37. package/dist/templates/hero.stx +9 -2
  38. package/dist/templates/layout-doc.stx +8 -125
  39. package/dist/templates/layout-home.stx +7 -14
  40. package/dist/templates/layout-page.stx +7 -14
  41. package/dist/templates/locale-switcher.stx +115 -0
  42. package/dist/templates/navbar.stx +49 -0
  43. package/dist/templates/page-outline.stx +149 -0
  44. package/dist/templates/page-toc.stx +1 -1
  45. package/dist/templates/search-algolia.stx +85 -0
  46. package/dist/templates/search.stx +661 -0
  47. package/dist/templates/sidebar-section.stx +44 -11
  48. package/dist/templates/sidebar.stx +11 -2
  49. package/dist/themes/vitepress/index.ts +558 -165
  50. package/package.json +16 -7
  51. package/dist/chunk-9cm3e4r4.js +0 -688
  52. package/dist/chunk-mjhqecp5.js +0 -467
  53. package/dist/chunk-wmvgjzgh.js +0 -3
  54. package/dist/chunk-zmxtnx2v.js +0 -8
@@ -0,0 +1,85 @@
1
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@docsearch/css@3">
2
+
3
+ <style>
4
+ /* DocSearch renders its own button, but the nav already has one styled to
5
+ match the site — so the built-in trigger stays hidden and ours drives it. */
6
+ #bp-docsearch {
7
+ display: none;
8
+ }
9
+
10
+ /* Map DocSearch's palette onto the theme's variables so the modal belongs to
11
+ the site in both colour schemes instead of shipping its own blue. */
12
+ :root {
13
+ --docsearch-primary-color: var(--bp-c-brand-1);
14
+ --docsearch-text-color: var(--bp-c-text-1);
15
+ --docsearch-muted-color: var(--bp-c-text-2);
16
+ --docsearch-container-background: rgba(15, 15, 17, 0.55);
17
+ --docsearch-modal-background: var(--bp-c-bg);
18
+ --docsearch-modal-shadow: 0 16px 48px rgba(0, 0, 0, 0.24);
19
+ --docsearch-searchbox-background: var(--bp-c-bg-soft);
20
+ --docsearch-searchbox-focus-background: var(--bp-c-bg);
21
+ --docsearch-hit-color: var(--bp-c-text-1);
22
+ --docsearch-hit-background: var(--bp-c-bg-soft);
23
+ --docsearch-hit-shadow: none;
24
+ --docsearch-footer-background: var(--bp-c-bg-soft);
25
+ --docsearch-footer-shadow: 0 -1px 0 var(--bp-c-divider);
26
+ --docsearch-key-gradient: var(--bp-c-bg);
27
+ --docsearch-key-shadow: none;
28
+ }
29
+ </style>
30
+
31
+ <div id="bp-docsearch"></div>
32
+
33
+ <script type="application/json" id="bp-search-config">{!! runtimeConfig !!}</script>
34
+ <script src="https://cdn.jsdelivr.net/npm/@docsearch/js@3" defer></script>
35
+ <script>
36
+ (function () {
37
+ if (window.__bpSearchBound) return;
38
+ window.__bpSearchBound = true;
39
+
40
+ var CONFIG = (function () {
41
+ try { return JSON.parse(document.getElementById('bp-search-config').textContent); }
42
+ catch (_) { return {}; }
43
+ })();
44
+
45
+ var started = false;
46
+
47
+ function start() {
48
+ if (started || typeof window.docsearch !== 'function') return;
49
+ started = true;
50
+
51
+ window.docsearch({
52
+ container: '#bp-docsearch',
53
+ appId: CONFIG.algolia.appId,
54
+ apiKey: CONFIG.algolia.apiKey,
55
+ indexName: CONFIG.algolia.indexName,
56
+ searchParameters: CONFIG.algolia.searchParameters || {},
57
+ placeholder: CONFIG.placeholder,
58
+ // Results are same-origin, so route them through the SPA router instead
59
+ // of a full page load.
60
+ navigator: {
61
+ navigate: function (item) { window.location.assign(item.itemUrl); },
62
+ },
63
+ });
64
+ }
65
+
66
+ // DocSearch owns its own dialog and shortcut handling; the nav button just
67
+ // forwards a click to the trigger it renders.
68
+ function openDocSearch() {
69
+ start();
70
+ var trigger = document.querySelector('#bp-docsearch .DocSearch-Button');
71
+ if (trigger) trigger.click();
72
+ }
73
+
74
+ document.addEventListener('click', function (e) {
75
+ if (e.target.closest('.BPNavBarSearch')) {
76
+ e.preventDefault();
77
+ openDocSearch();
78
+ }
79
+ });
80
+
81
+ if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', start);
82
+ else start();
83
+ window.addEventListener('load', start);
84
+ })();
85
+ </script>