@abreen/tada 1.1.0 → 1.3.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.
Files changed (94) hide show
  1. package/README.md +69 -17
  2. package/bin/tada.ts +317 -25
  3. package/bin/validators.test.ts +4 -3
  4. package/bin/validators.ts +4 -2
  5. package/build/apply-base-path-plugin.ts +24 -13
  6. package/build/build-manifest.test.ts +349 -0
  7. package/build/build-manifest.ts +165 -0
  8. package/build/bundle.ts +19 -20
  9. package/build/code.test.ts +7 -3
  10. package/build/content-watch.ts +6 -6
  11. package/build/copy.ts +2 -2
  12. package/build/deflist-id-plugin.ts +1 -1
  13. package/build/external-links-plugin.ts +2 -2
  14. package/build/features.ts +1 -1
  15. package/build/generate-content-assets.ts +12 -7
  16. package/build/generate-favicon.ts +13 -6
  17. package/build/generate-fonts.ts +2 -2
  18. package/build/generate-katex-assets.ts +35 -0
  19. package/build/generate-manifest.ts +2 -2
  20. package/build/globals.test.ts +10 -11
  21. package/build/globals.ts +14 -7
  22. package/build/json-schema.test.ts +1 -1
  23. package/build/log.test.ts +1 -1
  24. package/build/log.ts +2 -2
  25. package/build/markdown-plugins.test.ts +116 -10
  26. package/build/pagefind.test.ts +2 -2
  27. package/build/pagefind.ts +5 -5
  28. package/build/pdf-text.test.ts +52 -0
  29. package/build/pipeline.ts +42 -15
  30. package/build/reachability.test.ts +1 -1
  31. package/build/serve.ts +20 -8
  32. package/build/site-variables.ts +13 -5
  33. package/build/templates.ts +16 -7
  34. package/build/toc-plugin.test.ts +2 -2
  35. package/build/toc-plugin.ts +1 -1
  36. package/build/types.ts +15 -6
  37. package/build/util.ts +6 -6
  38. package/build/utils/code.ts +5 -5
  39. package/build/utils/content-files.ts +3 -3
  40. package/build/utils/derive-theme.test.ts +1 -1
  41. package/build/utils/derive-theme.ts +1 -1
  42. package/build/utils/file-types.test.ts +1 -1
  43. package/build/utils/front-matter.test.ts +1 -4
  44. package/build/utils/front-matter.ts +2 -2
  45. package/build/utils/jdi-runner/LiterateRunner.java +13 -0
  46. package/build/utils/literate-java.ts +24 -12
  47. package/build/utils/markdown.ts +41 -9
  48. package/build/utils/paths.test.ts +2 -2
  49. package/build/utils/paths.ts +5 -1
  50. package/build/utils/render.ts +57 -36
  51. package/build/utils/shiki-highlighter.ts +1 -1
  52. package/build/validate-internal-links-plugin.test.ts +1 -1
  53. package/build/validate-internal-links-plugin.ts +1 -1
  54. package/build/watch-reachability-state.test.ts +2 -2
  55. package/build/watch-reachability-state.ts +1 -1
  56. package/build/watch.ts +91 -110
  57. package/init/content/labs/00/VowelCounter.java.md +129 -0
  58. package/init/content/labs/00/index.md +29 -0
  59. package/init/content/labs/index.md +9 -0
  60. package/{content → init/content}/lectures/01/Pair.java.md +1 -0
  61. package/{content → init/content}/lectures/index.md +1 -1
  62. package/{content → init/content}/markdown.md +26 -7
  63. package/package.json +19 -7
  64. package/{templates → schema}/nav.schema.json +1 -2
  65. package/{build → schema}/site.schema.json +3 -5
  66. package/src/_alerts.scss +4 -0
  67. package/src/_base.scss +90 -6
  68. package/src/_layout.scss +39 -2
  69. package/src/anchor/index.ts +0 -1
  70. package/src/index.ts +3 -3
  71. package/src/question/style.scss +8 -3
  72. package/src/search/index.test.ts +203 -0
  73. package/src/search/index.ts +3 -79
  74. package/src/search/pdf-utils.ts +79 -0
  75. package/src/search/style.scss +2 -20
  76. package/src/style.scss +20 -101
  77. package/src/timezone/index.ts +9 -25
  78. package/src/util.ts +1 -1
  79. package/templates/_top.html +2 -1
  80. package/types/dev.d.ts +1 -3
  81. package/types/site-variables.d.ts +6 -10
  82. package/types/untyped-modules.d.ts +7 -0
  83. package/build/utils/jdi-runner/LiterateRunner.class +0 -0
  84. package/config/authors.json +0 -1
  85. package/config/nav.json +0 -28
  86. /package/{content → init/content}/index.md +0 -0
  87. /package/{content → init/content}/lectures/01/Rectangle.java +0 -0
  88. /package/{content → init/content}/lectures/01/demo.py +0 -0
  89. /package/{content → init/content}/lectures/01/index.md +0 -0
  90. /package/{content → init/content}/lectures/01/lecture1.pdf +0 -0
  91. /package/{content → init/content}/problem_sets/index.html +0 -0
  92. /package/{public → init/public}/avatars/alex.jpg +0 -0
  93. /package/{public → init/public}/test.txt +0 -0
  94. /package/{templates → schema}/authors.schema.json +0 -0
@@ -1,16 +1,12 @@
1
- interface TimezoneDef {
1
+ interface TimeZone {
2
2
  value: string;
3
3
  label: string;
4
4
  abbreviation: string;
5
5
  offsetMinutes?: number;
6
6
  }
7
7
 
8
- interface Window {
9
- siteVariables: {
10
- base: string;
11
- basePath: string;
12
- titlePostfix?: string;
13
- defaultTimeZone: string;
14
- timezones: TimezoneDef[];
15
- };
16
- }
8
+ declare const __SITE_BASE__: string;
9
+ declare const __SITE_BASE_PATH__: string;
10
+ declare const __SITE_TITLE_POSTFIX__: string;
11
+ declare const __SITE_DEFAULT_TIMEZONE__: string;
12
+ declare const __SITE_TIMEZONES__: TimeZone[];
@@ -22,6 +22,13 @@ declare module 'pagefind' {
22
22
  export function close(): Promise<void>;
23
23
  }
24
24
 
25
+ declare module 'katex/contrib/render-a11y-string' {
26
+ export default function renderA11yString(
27
+ text: string,
28
+ settings?: Record<string, unknown>,
29
+ ): string;
30
+ }
31
+
25
32
  declare module 'jsdom' {
26
33
  export class JSDOM {
27
34
  constructor(html?: string | Buffer, options?: Record<string, unknown>);
@@ -1 +0,0 @@
1
- { "alex": { "name": "Alex Breen", "avatar": "/avatars/alex.jpg" } }
package/config/nav.json DELETED
@@ -1,28 +0,0 @@
1
- [
2
- {
3
- "title": "Navigation",
4
- "links": [{ "text": "Home", "internal": "/index.html" }]
5
- },
6
- {
7
- "title": "Topics",
8
- "links": [
9
- { "text": "Lectures", "internal": "/lectures/index.html" },
10
- {
11
- "text": "Problem Sets",
12
- "internal": "/problem_sets/index.html",
13
- "disabled": true
14
- }
15
- ]
16
- },
17
- {
18
- "title": "Links",
19
- "links": [
20
- { "text": "Zoom", "external": "https://zoom.com" },
21
- {
22
- "text": "Canvas",
23
- "external": "https://www.instructure.com/",
24
- "disabled": true
25
- }
26
- ]
27
- }
28
- ]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes