@brillout/docpress 0.3.4 → 0.3.6

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.
Binary file
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Emoji
3
- } from "./chunk-MWMYEK3D.js";
3
+ } from "./chunk-KH64XPM2.js";
4
4
  import {
5
5
  assert
6
6
  } from "./chunk-2ZTPUQGS.js";
@@ -108,13 +108,10 @@ function findParentHeadings(heading, headings) {
108
108
  return parentHeadings;
109
109
  }
110
110
  function assertHeadingsUrl(headings) {
111
- const urls = {};
112
111
  headings.forEach((heading) => {
113
112
  if (heading.url) {
114
113
  const { url } = heading;
115
114
  assert(url.startsWith("/"));
116
- assert(!urls[url], { url });
117
- urls[url] = true;
118
115
  }
119
116
  });
120
117
  }
@@ -119,7 +119,7 @@ var engine_default = "/assets/engine-6Q6VSCVA.png";
119
119
 
120
120
  // src/utils/Emoji/Emoji.ts
121
121
  function Emoji({ name, style }) {
122
- const emoji = name === "warning" && Unicode(9888, { fontFamily: "emoji" }) || name === "lab" && Unicode(9879) || name === "info" && Unicode(8505, { fontFamily: "emoji" }) || name === "package" && Unicode(128230) || name === "gift" && Unicode(127873) || name === "sparkling-heart" && Unicode(128150) || name === "red-circle" && Unicode(11093) || name === "engine" && Img(engine_default) || name === "typescript" && Img(typescript_default) || name === "shield" && Img(shield_default) || name === "road-fork" && Img(road_fork_default, "1.4em") || name === "writing-hang" && Unicode(9997) || name === "dizzy" && Unicode(128171) || name === "mechanical-arm" && Img(mechanical_arm_default) || name === "rocket" && Unicode(128640) || name === "wrench" && Unicode(128295) || name === "compass" && Img(compass_default, "1.4em") || name === "seedling" && Unicode(127793) || name === "books" && Unicode(128218) || name === "plug" && Unicode(128268) || name === "earth" && Unicode(127757) || name === "gear" && Unicode(9881) || name === "red-heart" && Unicode(10084, { fontFamily: "emoji" }) || name === "high-voltage" && Unicode(9889) || name === "sparkles" && Unicode(10024) || name === "gem-stone" && Unicode(128142) || name === "trophy" && Unicode(127942) || false;
122
+ const emoji = name === "warning" && Unicode(9888, { fontFamily: "emoji" }) || name === "lab" && Unicode(9879) || name === "info" && Unicode(8505, { fontFamily: "emoji" }) || name === "package" && Unicode(128230) || name === "gift" && Unicode(127873) || name === "sparkling-heart" && Unicode(128150) || name === "red-circle" && Unicode(11093) || name === "engine" && Img(engine_default) || name === "typescript" && Img(typescript_default) || name === "shield" && Img(shield_default) || name === "road-fork" && Img(road_fork_default, "1.4em") || name === "writing-hang" && Unicode(9997) || name === "dizzy" && Unicode(128171) || name === "mechanical-arm" && Img(mechanical_arm_default) || name === "rocket" && Unicode(128640) || name === "wrench" && Unicode(128295) || name === "compass" && Img(compass_default, "1.4em") || name === "seedling" && Unicode(127793) || name === "books" && Unicode(128218) || name === "plug" && Unicode(128268) || name === "earth" && Unicode(127757) || name === "gear" && Unicode(9881) || name === "red-heart" && Unicode(10084, { fontFamily: "emoji" }) || name === "high-voltage" && Unicode(9889) || name === "sparkles" && Unicode(10024) || name === "gem-stone" && Unicode(128142) || name === "trophy" && Unicode(127942) || name === "ribbon" && Unicode(127895, { fontFamily: "emoji" }) || false;
123
123
  assert(emoji, { name });
124
124
  return emoji;
125
125
  function Unicode(codePoint, styleAddendum) {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  determineSectionUrlHash
3
- } from "./chunk-MWMYEK3D.js";
3
+ } from "./chunk-KH64XPM2.js";
4
4
  import {
5
5
  assert
6
6
  } from "./chunk-2ZTPUQGS.js";
package/dist/cli/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  vite_config_default
3
- } from "../chunk-REPAOCCC.js";
4
- import "../chunk-MWMYEK3D.js";
3
+ } from "../chunk-Q3E6B5TM.js";
4
+ import "../chunk-KH64XPM2.js";
5
5
  import "../chunk-2ZTPUQGS.js";
6
6
  import "../chunk-3QC7HYIF.js";
7
7
 
@@ -16,7 +16,7 @@ Error.stackTraceLimit = Infinity;
16
16
  cli();
17
17
  async function cli() {
18
18
  if (isDev) {
19
- await import("../devServer-MLU3NNYM.js");
19
+ await import("../devServer-OXABOEEC.js");
20
20
  } else if (isBuild) {
21
21
  await build(vite_config_default);
22
22
  await build({ ...vite_config_default, build: { ssr: true } });
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  vite_config_default
3
- } from "./chunk-REPAOCCC.js";
4
- import "./chunk-MWMYEK3D.js";
3
+ } from "./chunk-Q3E6B5TM.js";
4
+ import "./chunk-KH64XPM2.js";
5
5
  import "./chunk-2ZTPUQGS.js";
6
6
  import "./chunk-3QC7HYIF.js";
7
7
 
package/dist/index.d.ts CHANGED
@@ -18,7 +18,7 @@ declare function objectAssign<Obj extends Object, ObjAddendum>(obj: Obj, objAdde
18
18
 
19
19
  declare function crawlAllFiles(dir: string): Promise<string[]>;
20
20
 
21
- type EmojiName = 'warning' | 'typescript' | 'shield' | 'mechanical-arm' | 'mountain' | 'rocket' | 'wrench' | 'compass' | 'seedling' | 'books' | 'plug' | 'earth' | 'gear' | 'red-heart' | 'high-voltage' | 'gem-stone' | 'dizzy' | 'sparkles' | 'writing-hang' | 'road-fork' | 'engine' | 'red-circle' | 'sparkling-heart' | 'gift' | 'package' | 'info' | 'lab' | 'trophy';
21
+ type EmojiName = 'warning' | 'typescript' | 'shield' | 'mechanical-arm' | 'mountain' | 'rocket' | 'wrench' | 'compass' | 'seedling' | 'books' | 'plug' | 'earth' | 'gear' | 'red-heart' | 'high-voltage' | 'gem-stone' | 'dizzy' | 'sparkles' | 'writing-hang' | 'road-fork' | 'engine' | 'red-circle' | 'sparkling-heart' | 'gift' | 'package' | 'info' | 'lab' | 'trophy' | 'ribbon';
22
22
  declare function Emoji({ name, style }: {
23
23
  name: EmojiName;
24
24
  style?: React$1.CSSProperties;
@@ -129,6 +129,17 @@ declare function HorizontalLine({ primary }: {
129
129
  primary?: true;
130
130
  }): JSX.Element;
131
131
 
132
+ type Plan = 'indie' | 'bronze' | 'silver' | 'gold' | 'platinum';
133
+ type SponsorCompany = {
134
+ companyName: string;
135
+ companyLogo: string;
136
+ website: string;
137
+ plan: Plan;
138
+ };
139
+ type SponsorIndividual = {
140
+ username: string;
141
+ };
142
+ type Sponsor = SponsorCompany | SponsorIndividual;
132
143
  declare function Sponsors(): JSX.Element;
133
144
 
134
145
  declare function CodeBlock({ children, lineBreak }: {
@@ -136,4 +147,4 @@ declare function CodeBlock({ children, lineBreak }: {
136
147
  lineBreak?: true;
137
148
  }): JSX.Element;
138
149
 
139
- export { CodeBlock, Config, DocLink, Emoji, EmojiName, HeadingDefinition, HeadingWithoutLink, HorizontalLine, ImportMeta, Info, Link, Note, P, ReadingRecommendation, RepoLink, Sponsors, assert, assertUsage, assertWarning, crawlAllFiles, determineSectionTitle, determineSectionUrlHash, filter, isBrowser, isRepoLink, jsxToTextContent, objectAssign };
150
+ export { CodeBlock, Config, DocLink, Emoji, EmojiName, HeadingDefinition, HeadingWithoutLink, HorizontalLine, ImportMeta, Info, Link, Note, P, ReadingRecommendation, RepoLink, Sponsor, Sponsors, assert, assertUsage, assertWarning, crawlAllFiles, determineSectionTitle, determineSectionUrlHash, filter, isBrowser, isRepoLink, jsxToTextContent, objectAssign };
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  isRepoLink,
5
5
  parseTitle,
6
6
  usePageContext
7
- } from "./chunk-YNTER77S.js";
7
+ } from "./chunk-IZDN24FQ.js";
8
8
  import {
9
9
  FeatureList
10
10
  } from "./chunk-NVJING6T.js";
@@ -16,7 +16,7 @@ import {
16
16
  filter,
17
17
  jsxToTextContent,
18
18
  objectAssign
19
- } from "./chunk-MWMYEK3D.js";
19
+ } from "./chunk-KH64XPM2.js";
20
20
  import {
21
21
  assert,
22
22
  assertUsage,
@@ -250,8 +250,20 @@ var mfqs_default = "/assets/mfqs-2EAEE7N6.svg";
250
250
  // src/components/Sponsors/companyLogos/repora.svg
251
251
  var repora_default = "/assets/repora-UNKQZ6QP.svg";
252
252
 
253
- // src/components/Sponsors.tsx
254
- var sponsors = [
253
+ // src/components/Sponsors/companyLogos/burdaforward.png
254
+ var burdaforward_default = "/assets/burdaforward-EUGURYZY.png";
255
+
256
+ // src/components/Sponsors/companyLogos/inlang.png
257
+ var inlang_default = "/assets/inlang-GFRWND6X.png";
258
+
259
+ // src/components/Sponsors/sponsorList.ts
260
+ var sponsorList = [
261
+ {
262
+ companyName: "BurdaFoward",
263
+ companyLogo: burdaforward_default,
264
+ plan: "platinum",
265
+ website: "https://www.burda-forward.de"
266
+ },
255
267
  {
256
268
  companyName: "Contra",
257
269
  companyLogo: contra_default,
@@ -276,6 +288,15 @@ var sponsors = [
276
288
  plan: "bronze",
277
289
  website: "https://www.repora.com"
278
290
  },
291
+ {
292
+ companyName: "Inlang",
293
+ companyLogo: inlang_default,
294
+ plan: "indie",
295
+ website: "https://inlang.com/"
296
+ },
297
+ {
298
+ username: "samuelstroschein"
299
+ },
279
300
  {
280
301
  username: "DannyZB"
281
302
  },
@@ -304,9 +325,13 @@ var sponsors = [
304
325
  username: "zgfdev"
305
326
  }
306
327
  ];
328
+
329
+ // src/components/Sponsors.tsx
307
330
  function Sponsors() {
308
331
  const pageContext = usePageContext();
309
332
  const { projectInfo } = pageContext.config;
333
+ const sponsorsCompany = sponsorList.filter((sponsor) => !("username" in sponsor));
334
+ const sponsorsHumanidual = sponsorList.filter((sponsor) => "username" in sponsor);
310
335
  return /* @__PURE__ */ React9.createElement("div", {
311
336
  style: { textAlign: "center", marginTop: 19 }
312
337
  }, /* @__PURE__ */ React9.createElement("a", {
@@ -327,8 +352,13 @@ function Sponsors() {
327
352
  }, "Sponsor")), /* @__PURE__ */ React9.createElement("div", null), /* @__PURE__ */ React9.createElement("div", {
328
353
  style: { maxWidth: 400, display: "inline-block", marginTop: 12, marginBottom: 12 }
329
354
  }, projectInfo.projectNameJsx || projectInfo.projectName, " is free and open source, made possible by wonderful sponsors."), /* @__PURE__ */ React9.createElement("div", {
330
- style: { display: "flex", flexWrap: "wrap", justifyContent: "center", alignItems: "end" }
331
- }, sponsors.map((sponsor, i) => /* @__PURE__ */ React9.createElement(SponsorDiv, {
355
+ style: { display: "flex", flexWrap: "wrap", justifyContent: "space-evenly", alignItems: "end" }
356
+ }, sponsorsCompany.map((sponsor, i) => /* @__PURE__ */ React9.createElement(SponsorDiv, {
357
+ sponsor,
358
+ key: i
359
+ }))), /* @__PURE__ */ React9.createElement("div", {
360
+ style: { display: "flex", flexWrap: "wrap", justifyContent: "center", alignItems: "end", marginTop: 20 }
361
+ }, sponsorsHumanidual.map((sponsor, i) => /* @__PURE__ */ React9.createElement(SponsorDiv, {
332
362
  sponsor,
333
363
  key: i
334
364
  }))));
@@ -381,7 +411,7 @@ function SponsorDiv({ sponsor }) {
381
411
  justifyContent: "center"
382
412
  }
383
413
  }, /* @__PURE__ */ React9.createElement("img", {
384
- style: { width: `calc(100% - ${padding}px)`, height: height - padding, zIndex: 2 },
414
+ style: { width: `calc(100% - ${padding}px)`, height: height - padding, zIndex: 2, objectFit: "contain" },
385
415
  src: imgSrc,
386
416
  alt: imgAlt
387
417
  })));
@@ -413,7 +443,10 @@ function getLabelText(sponsor) {
413
443
  if (sponsor.plan === "platinum") {
414
444
  return /* @__PURE__ */ React9.createElement(React9.Fragment, null);
415
445
  }
416
- const letterSpacing = ["bronze", "silver", "gold"].includes(sponsor.plan) ? 1 : void 0;
446
+ let letterSpacing = void 0;
447
+ if (["bronze", "silver", "gold", "indie"].includes(sponsor.plan)) {
448
+ letterSpacing = 1;
449
+ }
417
450
  return /* @__PURE__ */ React9.createElement(React9.Fragment, null, " ", /* @__PURE__ */ React9.createElement("span", {
418
451
  style: {
419
452
  zIndex: 1,
@@ -433,6 +466,11 @@ function getLabelIcon(sponsor) {
433
466
  name: "trophy",
434
467
  style: { fontSize: "1.3em" }
435
468
  });
469
+ } else if (sponsor.plan === "indie") {
470
+ return /* @__PURE__ */ React9.createElement(Emoji, {
471
+ name: "ribbon",
472
+ style: { fontSize: "0.9em" }
473
+ });
436
474
  } else if (sponsor.plan === "gold") {
437
475
  medalSrc = medalGold_default;
438
476
  } else if (sponsor.plan === "silver") {
@@ -449,7 +487,7 @@ function getLabelIcon(sponsor) {
449
487
  }
450
488
  function getSize(plan) {
451
489
  if (plan === "platinum") {
452
- assert(false);
490
+ return { width: 500, height: 180, padding: 100 };
453
491
  }
454
492
  if (plan === "gold") {
455
493
  return { width: 400, height: 150, padding: 95 };
@@ -460,8 +498,8 @@ function getSize(plan) {
460
498
  if (plan === "bronze") {
461
499
  return { width: 200, height: 70, padding: 30 };
462
500
  }
463
- if (plan === "FREE_SLOT") {
464
- return { width: 150, height: 40, padding: 15 };
501
+ if (plan === "indie") {
502
+ return { width: 140, height: 50, padding: 20 };
465
503
  }
466
504
  assert(false);
467
505
  }
Binary file
@@ -4,12 +4,12 @@ import {
4
4
  getHeadings,
5
5
  parseTitle,
6
6
  usePageContext
7
- } from "../chunk-YNTER77S.js";
7
+ } from "../chunk-IZDN24FQ.js";
8
8
  import {
9
9
  Emoji,
10
10
  jsxToTextContent,
11
11
  objectAssign
12
- } from "../chunk-MWMYEK3D.js";
12
+ } from "../chunk-KH64XPM2.js";
13
13
  import {
14
14
  assert,
15
15
  assertUsage,
@@ -311,7 +311,7 @@ function DetachedPageNote() {
311
311
  }
312
312
  }, /* @__PURE__ */ React3.createElement(Emoji, {
313
313
  name: "info"
314
- }), " ", /* @__PURE__ */ React3.createElement("em", null, "Detached"), /* @__PURE__ */ React3.createElement("span", {
314
+ }), " ", /* @__PURE__ */ React3.createElement("b", null, /* @__PURE__ */ React3.createElement("em", null, "Detached")), /* @__PURE__ */ React3.createElement("span", {
315
315
  style: {
316
316
  opacity: 0.8
317
317
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brillout/docpress",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
4
  "exports": {
5
5
  "./renderer/_default.page.server.js": "./dist/renderer/_default.page.server.js",
6
6
  "./renderer/_default.page.client.js": "./dist/renderer/_default.page.client.js",