@brillout/docpress 0.5.12 → 0.5.14

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/index.d.ts CHANGED
@@ -89,6 +89,7 @@ type Config = {
89
89
  twitterHandle: string;
90
90
  globalNote?: React.ReactNode;
91
91
  i18n?: true;
92
+ pressKit?: true;
92
93
  };
93
94
 
94
95
  declare function Link({ href, text, noBreadcrumb, doNotInferSectionTitle, titleNormalCase, children }: {
package/dist/index.js CHANGED
@@ -316,6 +316,8 @@ var alignable_default = "/assets/alignable-B4QZV4X7.svg";
316
316
 
317
317
  // src/components/Sponsors/sponsorsList.ts
318
318
  var individuals = [
319
+ { username: "EralChen" },
320
+ { username: "3dyuval" },
319
321
  { username: "talzion12" },
320
322
  { username: "felixhaeberle" },
321
323
  { username: "apappas1129" },
@@ -244,18 +244,6 @@ table th {
244
244
  margin-right: 3px !important;
245
245
  margin-left: 1px !important;
246
246
  }
247
- #docsearch-mobile {
248
- margin-left: auto !important;
249
- padding-right: 20px !important;
250
- }
251
- #docsearch-mobile .DocSearch-Button {
252
- margin-left: 0px !important;
253
- }
254
- @media screen and (max-width: 339px) {
255
- #docsearch-mobile {
256
- padding-right: 6px !important;
257
- }
258
- }
259
247
 
260
248
  /* src/components/Note.css */
261
249
  blockquote {
@@ -178,6 +178,7 @@ activateNavigationMask();
178
178
  activateMenuToggle();
179
179
  initNavigationFullscreen();
180
180
  autoHideNavigationOverlayOnLinkClick();
181
+ navHeaderRightClickInterceptor();
181
182
  function activateMenuToggle() {
182
183
  const menuToggle = document.getElementById("menu-toggle");
183
184
  menuToggle.onclick = navigationOverlayToggle;
@@ -202,3 +203,14 @@ function navigationOverlayToggle() {
202
203
  function navigationOverlayHide() {
203
204
  document.body.classList.remove("show-menu");
204
205
  }
206
+ function navHeaderRightClickInterceptor() {
207
+ const navHeader = document.getElementById("navigation-header");
208
+ if (!navHeader.classList.contains("press-kit"))
209
+ return;
210
+ if (window.location.pathname === "/press")
211
+ return;
212
+ navHeader.oncontextmenu = (ev) => {
213
+ ev.preventDefault();
214
+ window.location.href = "/press";
215
+ };
216
+ }
@@ -53,6 +53,7 @@ function NavigationHeader() {
53
53
  const pageContext = usePageContext();
54
54
  return /* @__PURE__ */ React.createElement("div", {
55
55
  id: "navigation-header",
56
+ className: pageContext.config.pressKit && "press-kit",
56
57
  style: {
57
58
  display: "flex",
58
59
  flexDirection: "column",
@@ -356,9 +357,7 @@ function MobileHeader() {
356
357
  justifyContent: "left",
357
358
  textDecoration: "none"
358
359
  }
359
- }, pageContext.config.navHeaderMobile), /* @__PURE__ */ React4.createElement("div", {
360
- id: "docsearch-mobile"
361
- })));
360
+ }, pageContext.config.navHeaderMobile)));
362
361
  }
363
362
  function MenuToggle() {
364
363
  return /* @__PURE__ */ React4.createElement("div", {
@@ -575,10 +574,10 @@ function getDocSearchJS(pageContext) {
575
574
  let docSearchJS = !algolia ? "" : escapeInject(_a || (_a = __template([`
576
575
  <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@docsearch/js@alpha"><\/script>
577
576
  <script type="text/javascript">
578
- const appId = '`, "';\n const apiKey = '", "';\n const indexName = '", "';\n const transformItems = ", ";\n docsearch({\n container: '#docsearch-desktop',\n appId, apiKey, indexName, transformItems\n });\n docsearch({\n container: '#docsearch-mobile',\n appId, apiKey, indexName, transformItems\n });\n <\/script>\n "])), algolia.appId || "FAKE", algolia.apiKey || "FAKE", algolia.indexName || "FAKE", dangerouslySkipEscape(getTransformItems()));
577
+ const appId = '`, "';\n const apiKey = '", "';\n const indexName = '", "';\n const transformItems = ", ";\n docsearch({\n container: '#docsearch-desktop',\n appId, apiKey, indexName, transformItems,\n insights: true,\n });\n <\/script>\n "])), algolia.appId || "FAKE", algolia.apiKey || "FAKE", algolia.indexName || "FAKE", dangerouslySkipEscape(getTransformItems()));
579
578
  if (algolia == null ? void 0 : algolia.PENDING_APPROVAL) {
580
579
  docSearchJS = escapeInject(_b || (_b = __template(["\n ", `
581
- <script>[document.getElementById('docsearch-desktop'), document.getElementById('docsearch-mobile')].forEach(el => el.addEventListener('click', () => window.alert("Algolia approval is pending: the search results may be empty until the approval process is completed.")))<\/script>
580
+ <script>document.getElementById('docsearch-desktop').addEventListener('click', () => window.alert("Algolia approval is pending: the search results may be empty until the approval process is completed."))<\/script>
582
581
  `])), docSearchJS);
583
582
  }
584
583
  return docSearchJS;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brillout/docpress",
3
- "version": "0.5.12",
3
+ "version": "0.5.14",
4
4
  "scripts": {
5
5
  "// Check types while developing": "",
6
6
  "types": "tsc --noEmit --watch",