@brillout/docpress 0.3.11 → 0.3.13

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
@@ -128,11 +128,17 @@ type SponsorCompany = {
128
128
  companyLogo: string;
129
129
  website: string;
130
130
  plan: Plan;
131
+ divSize?: Partial<DivSize>;
131
132
  };
132
133
  type SponsorIndividual = {
133
134
  username: string;
134
135
  };
135
136
  type Sponsor = SponsorCompany | SponsorIndividual;
137
+ type DivSize = {
138
+ width: number;
139
+ height: number;
140
+ padding: number;
141
+ };
136
142
  declare function Sponsors(): JSX.Element;
137
143
 
138
144
  declare function CodeBlock({ children, lineBreak }: {
package/dist/index.js CHANGED
@@ -253,6 +253,9 @@ var contra_default = "/assets/contra-WLZBOPBV.svg";
253
253
  // src/components/Sponsors/companyLogos/mfqs.svg
254
254
  var mfqs_default = "/assets/mfqs-2EAEE7N6.svg";
255
255
 
256
+ // src/components/Sponsors/companyLogos/optimizers.svg
257
+ var optimizers_default = "/assets/optimizers-SFEZF3NW.svg";
258
+
256
259
  // src/components/Sponsors/companyLogos/repora.svg
257
260
  var repora_default = "/assets/repora-UNKQZ6QP.svg";
258
261
 
@@ -263,42 +266,18 @@ var burdaforward_default = "/assets/burdaforward-EUGURYZY.png";
263
266
  var inlang_default = "/assets/inlang-GFRWND6X.png";
264
267
 
265
268
  // src/components/Sponsors/sponsorsList.ts
266
- var sponsorsList = [
269
+ var individuals = [
267
270
  {
268
- companyName: "BurdaFoward",
269
- companyLogo: burdaforward_default,
270
- plan: "platinum",
271
- website: "https://www.burda-forward.de"
271
+ username: "leonmondria"
272
272
  },
273
273
  {
274
- companyName: "Contra",
275
- companyLogo: contra_default,
276
- plan: "gold",
277
- website: "https://contra.com"
278
- },
279
- {
280
- companyName: "CREPE",
281
- companyLogo: crepe_default,
282
- plan: "silver",
283
- website: "https://crepe.cm"
284
- },
285
- {
286
- companyName: "My Favorite Quilt Store",
287
- companyLogo: mfqs_default,
288
- plan: "bronze",
289
- website: "https://myfavoritequiltstore.com"
274
+ username: "jscottsf"
290
275
  },
291
276
  {
292
- companyName: "Repora",
293
- companyLogo: repora_default,
294
- plan: "bronze",
295
- website: "https://www.repora.com"
277
+ username: "micah-redwood"
296
278
  },
297
279
  {
298
- companyName: "Inlang",
299
- companyLogo: inlang_default,
300
- plan: "indie",
301
- website: "https://inlang.com/"
280
+ username: "nicka-redwood"
302
281
  },
303
282
  {
304
283
  username: "ser1us"
@@ -306,6 +285,9 @@ var sponsorsList = [
306
285
  {
307
286
  username: "samuelstroschein"
308
287
  },
288
+ {
289
+ username: "npacucci"
290
+ },
309
291
  {
310
292
  username: "szarapka"
311
293
  },
@@ -340,13 +322,61 @@ var sponsorsList = [
340
322
  username: "zgfdev"
341
323
  }
342
324
  ];
325
+ var companies = [
326
+ {
327
+ companyName: "BurdaFoward",
328
+ companyLogo: burdaforward_default,
329
+ plan: "platinum",
330
+ website: "https://www.burda-forward.de"
331
+ },
332
+ {
333
+ companyName: "Contra",
334
+ companyLogo: contra_default,
335
+ plan: "gold",
336
+ website: "https://contra.com"
337
+ },
338
+ {
339
+ companyName: "CREPE",
340
+ companyLogo: crepe_default,
341
+ plan: "silver",
342
+ website: "https://crepe.cm"
343
+ },
344
+ {
345
+ companyName: "Optimizers",
346
+ companyLogo: optimizers_default,
347
+ plan: "bronze",
348
+ website: "https://www.optimizers.nl/",
349
+ divSize: {
350
+ padding: 20
351
+ }
352
+ },
353
+ {
354
+ companyName: "My Favorite Quilt Store",
355
+ companyLogo: mfqs_default,
356
+ plan: "bronze",
357
+ website: "https://myfavoritequiltstore.com"
358
+ },
359
+ {
360
+ companyName: "Repora",
361
+ companyLogo: repora_default,
362
+ plan: "bronze",
363
+ website: "https://www.repora.com"
364
+ },
365
+ {
366
+ companyName: "Inlang",
367
+ companyLogo: inlang_default,
368
+ plan: "indie",
369
+ website: "https://inlang.com/"
370
+ }
371
+ ];
372
+ var sponsorsList = [...companies, ...individuals];
343
373
 
344
374
  // src/components/Sponsors.tsx
345
375
  function Sponsors() {
346
376
  const pageContext = usePageContext();
347
377
  const { projectInfo } = pageContext.config;
348
- const sponsorsCompany = sponsorsList.filter((sponsor) => !("username" in sponsor));
349
- const sponsorsHumanidual = sponsorsList.filter((sponsor) => "username" in sponsor);
378
+ const sponsorsCompanies = sponsorsList.filter(isCompany);
379
+ const sponsorsIndividuals = sponsorsList.filter(isIndividual);
350
380
  return /* @__PURE__ */ React8.createElement("div", {
351
381
  style: { textAlign: "center", marginTop: 19 }
352
382
  }, /* @__PURE__ */ React8.createElement("a", {
@@ -368,12 +398,12 @@ function Sponsors() {
368
398
  style: { maxWidth: 400, display: "inline-block", marginTop: 12, marginBottom: 12 }
369
399
  }, projectInfo.projectNameJsx || projectInfo.projectName, " is free and open source, made possible by wonderful sponsors."), /* @__PURE__ */ React8.createElement("div", {
370
400
  style: { display: "flex", flexWrap: "wrap", justifyContent: "space-evenly", alignItems: "end" }
371
- }, sponsorsCompany.map((sponsor, i) => /* @__PURE__ */ React8.createElement(SponsorDiv, {
401
+ }, sponsorsCompanies.map((sponsor, i) => /* @__PURE__ */ React8.createElement(SponsorDiv, {
372
402
  sponsor,
373
403
  key: i
374
404
  }))), /* @__PURE__ */ React8.createElement("div", {
375
- style: { display: "flex", flexWrap: "wrap", justifyContent: "center", alignItems: "end", marginTop: 20 }
376
- }, sponsorsHumanidual.map((sponsor, i) => /* @__PURE__ */ React8.createElement(SponsorDiv, {
405
+ style: { display: "flex", flexWrap: "wrap", justifyContent: "center", alignItems: "end", marginTop: 10 }
406
+ }, sponsorsIndividuals.map((sponsor, i) => /* @__PURE__ */ React8.createElement(SponsorDiv, {
377
407
  sponsor,
378
408
  key: i
379
409
  }))));
@@ -385,32 +415,37 @@ function SponsorDiv({ sponsor }) {
385
415
  let height;
386
416
  let website;
387
417
  let padding;
418
+ let marginHeight;
419
+ let marginWidth;
388
420
  let backgroundColor = "#f0f0f0";
389
421
  let label = null;
390
- if ("username" in sponsor) {
422
+ if (isIndividual(sponsor)) {
391
423
  website = `https://github.com/${sponsor.username}`;
392
424
  imgSrc = `https://github.com/${sponsor.username}.png?size=30`;
393
425
  width = 30;
394
426
  height = 30;
395
427
  padding = 0;
428
+ marginHeight = 10;
429
+ marginWidth = 5;
396
430
  backgroundColor = "none";
397
431
  } else {
398
432
  imgSrc = sponsor.companyLogo;
399
433
  website = sponsor.website;
400
- const size = getSize(sponsor.plan);
434
+ const size = getSize(sponsor);
401
435
  width = size.width;
402
436
  height = size.height;
403
437
  padding = size.padding;
404
438
  imgAlt = sponsor.companyName;
439
+ marginHeight = 20;
440
+ marginWidth = 10;
405
441
  label = /* @__PURE__ */ React8.createElement(Label, {
406
442
  sponsor
407
443
  });
408
444
  }
409
- const marginWidth = 5;
410
445
  return /* @__PURE__ */ React8.createElement("a", {
411
446
  href: website,
412
447
  style: {
413
- margin: `10px ${marginWidth}px`
448
+ margin: `${marginHeight}px ${marginWidth}px`
414
449
  }
415
450
  }, label, /* @__PURE__ */ React8.createElement("div", {
416
451
  style: {
@@ -432,7 +467,7 @@ function SponsorDiv({ sponsor }) {
432
467
  })));
433
468
  }
434
469
  function Label({ sponsor }) {
435
- assert(!("username" in sponsor));
470
+ assert(isCompany(sponsor));
436
471
  const labelBg = getLabelBg(sponsor);
437
472
  const labelIcon = getLabelIcon(sponsor);
438
473
  const labelText = getLabelText(sponsor);
@@ -500,27 +535,39 @@ function getLabelIcon(sponsor) {
500
535
  style: { height: 15, zIndex: 1, marginRight: 5 }
501
536
  });
502
537
  }
503
- function getSize(plan) {
538
+ function getSize(sponsor) {
539
+ const { plan } = sponsor;
540
+ let divSize;
504
541
  if (plan === "platinum") {
505
- return { width: 500, height: 180, padding: 100 };
542
+ divSize = { width: 500, height: 180, padding: 100 };
506
543
  }
507
544
  if (plan === "gold") {
508
- return { width: 400, height: 150, padding: 95 };
545
+ divSize = { width: 400, height: 150, padding: 95 };
509
546
  }
510
547
  if (plan === "silver") {
511
- return { width: 300, height: 100, padding: 45 };
548
+ divSize = { width: 300, height: 100, padding: 45 };
512
549
  }
513
550
  if (plan === "bronze") {
514
- return { width: 200, height: 70, padding: 30 };
551
+ divSize = { width: 200, height: 70, padding: 30 };
515
552
  }
516
553
  if (plan === "indie") {
517
- return { width: 140, height: 50, padding: 20 };
554
+ divSize = { width: 140, height: 50, padding: 20 };
555
+ }
556
+ assert(divSize);
557
+ if (sponsor.divSize) {
558
+ Object.assign(divSize, sponsor.divSize);
518
559
  }
519
- assert(false);
560
+ return divSize;
520
561
  }
521
562
  function capitalizeFirstLetter(word) {
522
563
  return word[0].toUpperCase() + word.slice(1);
523
564
  }
565
+ function isCompany(sponsor) {
566
+ return !isIndividual(sponsor);
567
+ }
568
+ function isIndividual(sponsor) {
569
+ return "username" in sponsor;
570
+ }
524
571
 
525
572
  // src/components/CodeBlock.tsx
526
573
  import React9 from "react";
@@ -0,0 +1,17 @@
1
+ <svg id="logo-optimizers_white" width="753.61" height="294.71" data-name="logo-optimizers white" version="1.1" viewBox="0 0 753.61 294.71" xmlns="http://www.w3.org/2000/svg">
2
+ <rect width="753.61" height="294.71" fill="#02ce99"/>
3
+ <g>
4
+ <g transform="translate(84.437 88.053)" data-name="Group 4">
5
+ <path d="m353.29 14.221h-11.387v11.286h11.388zm-0.237 21.817h-10.914v61.925h10.914zm74.475 44.07a28.567 28.567 0 0 0 4.988 10.2 23.547 23.547 0 0 0 8.373 6.7 26.608 26.608 0 0 0 11.727 2.432 29.9 29.9 0 0 0 9.439-1.483 27.2 27.2 0 0 0 8.053-4.211 22.224 22.224 0 0 0 5.81-6.614 20.331 20.331 0 0 0 2.585-8.862h-10.85q-0.593 6.466-4.855 9.431a17.175 17.175 0 0 1-10.063 2.966 17.434 17.434 0 0 1-5.625-0.92 15.339 15.339 0 0 1-4.913-2.728 13.105 13.105 0 0 1-3.463-4.419 13.492 13.492 0 0 1-1.273-5.991v-6.584h41.52v-5.812a39.563 39.563 0 0 0-1.652-11.626 27.565 27.565 0 0 0-4.9-9.4 22.77 22.77 0 0 0-8.2-6.317 27.224 27.224 0 0 0-11.619-2.313 24.487 24.487 0 0 0-19.744 9.1 28.578 28.578 0 0 0-5.225 10.261 46.673 46.673 0 0 0-1.746 13.082 49.294 49.294 0 0 0 1.633 13.109m9.933-22.243a14.871 14.871 0 0 1 1.213-6.109 13.409 13.409 0 0 1 3.345-4.627 14.71 14.71 0 0 1 4.855-2.877 16.836 16.836 0 0 1 5.742-0.978 17.1 17.1 0 0 1 5.772 0.978 14.325 14.325 0 0 1 4.853 2.877 13.591 13.591 0 0 1 3.315 4.627 14.874 14.874 0 0 1 1.214 6.109v3.44h-30.31zm69.16 40.1v-52.497h18.862v-9.43h-29.78v61.924h10.914zm30.542-10.41a18.71 18.71 0 0 0 5.355 6.584 23.741 23.741 0 0 0 7.929 3.974 34.269 34.269 0 0 0 9.735 1.335 31.775 31.775 0 0 0 9.964-1.483 27.938 27.938 0 0 0 7.8-3.885 16.61 16.61 0 0 0 5.041-5.753 15.473 15.473 0 0 0 1.75-7.266q0-7.467-4.487-11.788t-13.755-6.263l-10.44-2.184q-4.609-0.959-6.677-2.995a7.621 7.621 0 0 1-2.067-5.69 7.485 7.485 0 0 1 3.529-6.407 14.733 14.733 0 0 1 8.63-2.456 14.53 14.53 0 0 1 8.571 2.521q3.588 2.521 3.825 8.689h10.914a20.021 20.021 0 0 0-2.106-8.986 18.061 18.061 0 0 0-5.279-6.2 22.572 22.572 0 0 0-7.473-3.588 32 32 0 0 0-8.571-1.157 28.681 28.681 0 0 0-9.223 1.394 24.28 24.28 0 0 0-7.177 3.766 16.434 16.434 0 0 0-4.686 5.605 15 15 0 0 0-1.632 6.851q0 7.295 4.123 11.6t11.774 5.9l10.2 2.076q6.227 1.187 8.66 3.441a8.36 8.36 0 0 1-1.6 13.049 18.022 18.022 0 0 1-9.49 2.432 16.285 16.285 0 0 1-9.876-3.055q-4.181-3.059-4.421-9.228h-10.911a21.527 21.527 0 0 0 2.071 9.164" data-name="Path 9"/>
6
+ <path d="m1.692 80.108a28.218 28.218 0 0 0 5.166 10.2 24.176 24.176 0 0 0 8.7 6.7 28.885 28.885 0 0 0 12.291 2.432 28.827 28.827 0 0 0 12.236-2.432 23.8 23.8 0 0 0 8.68-6.7 28.875 28.875 0 0 0 5.155-10.2 47 47 0 0 0 1.717-13.108 47.5 47.5 0 0 0-1.718-13.079 28.511 28.511 0 0 0-5.155-10.261 24.027 24.027 0 0 0-8.65-6.673 28.775 28.775 0 0 0-12.265-2.432 28.885 28.885 0 0 0-12.291 2.432 24.338 24.338 0 0 0-8.7 6.673 27.874 27.874 0 0 0-5.166 10.262 48.163 48.163 0 0 0-1.692 13.078 47.657 47.657 0 0 0 1.692 13.108m9.874-22.717a12.478 12.478 0 0 1 1.334-5.753 14.114 14.114 0 0 1 3.523-4.449 16.283 16.283 0 0 1 5.177-2.876 18.91 18.91 0 0 1 6.246-1.038 18.665 18.665 0 0 1 6.217 1.038 16.35 16.35 0 0 1 5.15 2.877 14.111 14.111 0 0 1 3.523 4.449 12.479 12.479 0 0 1 1.332 5.754v19.217a12.472 12.472 0 0 1-1.332 5.753 13.762 13.762 0 0 1-3.523 4.419 16.625 16.625 0 0 1-5.15 2.847 19.313 19.313 0 0 1-12.493 0 16.621 16.621 0 0 1-5.15-2.847 13.765 13.765 0 0 1-3.52-4.419 12.471 12.471 0 0 1-1.331-5.753v-19.218zm71.834 61.209v-30.721a21.244 21.244 0 0 0 7.829 8.571 22.64 22.64 0 0 0 11.981 3 21.968 21.968 0 0 0 10.825-2.551 22.549 22.549 0 0 0 7.651-6.94 31.553 31.553 0 0 0 4.567-10.261 50.765 50.765 0 0 0 1.51-12.698 51.333 51.333 0 0 0-1.513-12.663 31.149 31.149 0 0 0-4.567-10.321 22.586 22.586 0 0 0-7.683-6.91 22.011 22.011 0 0 0-10.8-2.551 22.64 22.64 0 0 0-11.981 3 21.255 21.255 0 0 0-7.819 8.567v-10.084h-10.918v82.562zm0-56.823q0-8.008 4.389-13.257t12.634-5.249a16.492 16.492 0 0 1 11.359 3.915 12.989 12.989 0 0 1 4.419 10.2v19.224a12.9 12.9 0 0 1-4.419 10.172 16.568 16.568 0 0 1-11.359 3.885q-8.245 0-12.634-5.219t-4.389-13.228v-10.439zm135.84-47.525h-11.388v11.286h11.388zm-0.237 21.786h-10.914v61.925h10.914z" data-name="Path 10"/>
7
+ </g>
8
+ <path d="m497.6 185.94v-9.281h-33.715l32.95-42.819v-9.222h-43.053v9.222h30.544l-32.952 42.819v9.281z" data-name="Path 11"/>
9
+ <g transform="translate(84.437 88.053)" data-name="Group 5">
10
+ <rect transform="translate(157.67 36.561)" width="10.489" height="24.975" data-name="Rectangle 85"/>
11
+ <rect transform="translate(157.67)" width="10.489" height="24.975" data-name="Rectangle 86"/>
12
+ <rect transform="translate(132.15 25.526)" width="24.975" height="10.489" data-name="Rectangle 87"/>
13
+ <rect transform="translate(168.7,25.526)" width="24.975" height="10.489" data-name="Rectangle 88"/>
14
+ </g>
15
+ <path d="m323.36 185.94v-61.172h10.781v10.081a19.406 19.406 0 0 1 6.328-8.291 17.2 17.2 0 0 1 10.723-3.252 19.248 19.248 0 0 1 10.749 3.043q4.674 3.047 6.718 9.551a19.585 19.585 0 0 1 6.575-8.994 18.088 18.088 0 0 1 11.447-3.6 22.853 22.853 0 0 1 7.478 1.2 15.4 15.4 0 0 1 6.071 3.838 17.916 17.916 0 0 1 4.017 6.768 30.778 30.778 0 0 1 1.438 10.049v40.779h-10.782v-39.61q0-6.737-2.585-10.576t-8.633-3.838a11.165 11.165 0 0 0-5.345 1.318 14.041 14.041 0 0 0-4.4 3.779 18.043 18.043 0 0 0-3 5.83 24.449 24.449 0 0 0-1.057 7.354v35.743h-10.781v-39.61q0-6.737-2.578-10.576t-8.555-3.838a11.114 11.114 0 0 0-5.332 1.318 14.02 14.02 0 0 0-4.395 3.779 18.505 18.505 0 0 0-3.018 5.83 23.886 23.886 0 0 0-1.084 7.354v35.743z" data-name="Path 12"/>
16
+ </g>
17
+ </svg>
package/package.json CHANGED
@@ -1,6 +1,32 @@
1
1
  {
2
2
  "name": "@brillout/docpress",
3
- "version": "0.3.11",
3
+ "version": "0.3.13",
4
+ "scripts": {
5
+ "// Check types while developing": "",
6
+ "types": "tsc --noEmit --watch",
7
+ "// Develop/preview Docpress using demo/": "",
8
+ "dev": "docpress dev",
9
+ "preview": "docpress build && docpress preview",
10
+ "// Build Docpress": "",
11
+ "build": "rimraf dist/ && framework-builder",
12
+ "// Release": "",
13
+ "release": "release-me patch"
14
+ },
15
+ "dependencies": {
16
+ "@mdx-js/mdx": "^2.0.0",
17
+ "@mdx-js/react": "^2.0.0",
18
+ "@mdx-js/rollup": "^2.0.0",
19
+ "@vitejs/plugin-react-swc": "^3.0.0",
20
+ "balloon-css": "^1.2.0",
21
+ "express": "^4.17.1",
22
+ "rehype-pretty-code": "^0.3.2",
23
+ "remark-gfm": "^3.0.1",
24
+ "shiki": "^0.10.1",
25
+ "twemoji": "^13.1.0",
26
+ "vite": "npm:@brillout/vite@4.0.1-fix",
27
+ "vite-plugin-ssr": "^0.4.65"
28
+ },
29
+ "type": "module",
4
30
  "exports": {
5
31
  "./renderer/_default.page.server.js": "./dist/renderer/_default.page.server.js",
6
32
  "./renderer/_default.page.client.js": "./dist/renderer/_default.page.client.js",
@@ -28,29 +54,6 @@
28
54
  ]
29
55
  }
30
56
  },
31
- "scripts": {
32
- "// Develop/preview Docpress using demo/": "",
33
- "dev": "docpress dev",
34
- "preview": "docpress build && docpress preview",
35
- "// Build Docpress": "",
36
- "build": "rimraf dist/ && framework-builder",
37
- "// Release": "",
38
- "release": "release-me patch"
39
- },
40
- "dependencies": {
41
- "@mdx-js/mdx": "^2.0.0",
42
- "@mdx-js/react": "^2.0.0",
43
- "@mdx-js/rollup": "^2.0.0",
44
- "@vitejs/plugin-react-swc": "^3.0.0",
45
- "balloon-css": "^1.2.0",
46
- "express": "^4.17.1",
47
- "rehype-pretty-code": "^0.3.2",
48
- "remark-gfm": "^3.0.1",
49
- "shiki": "^0.10.1",
50
- "twemoji": "^13.1.0",
51
- "vite": "npm:@brillout/vite@4.0.1-fix",
52
- "vite-plugin-ssr": "^0.4.65"
53
- },
54
57
  "peerDependencies": {
55
58
  "react": "18",
56
59
  "react-dom": "18"
@@ -79,7 +82,6 @@
79
82
  "bin.js",
80
83
  "dist/"
81
84
  ],
82
- "type": "module",
83
85
  "license": "MIT",
84
86
  "repository": "https://github.com/brillout/docpress",
85
87
  "publishConfig": {