@canopy-iiif/app 0.10.16 → 0.10.17

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/lib/build/mdx.js CHANGED
@@ -365,6 +365,18 @@ async function compileMdxFile(filePath, outPath, Layout, extraProps = {}) {
365
365
  const mod = await import(pathToFileURL(tmpFile).href + bust);
366
366
  const MDXContent = mod.default || mod.MDXContent || mod;
367
367
  const components = await loadUiComponents();
368
+ const markdownTableComponent =
369
+ components &&
370
+ (components.MarkdownTable ||
371
+ components.DocsMarkdownTable ||
372
+ components.MarkdownTables ||
373
+ components.MDXMarkdownTable);
374
+ const codeBlockComponent =
375
+ components &&
376
+ (components.DocsCodeBlock ||
377
+ components.CodeBlock ||
378
+ components.MarkdownCodeBlock ||
379
+ components.MDXCodeBlock);
368
380
  const rawHeadings = Array.isArray(extraProps && extraProps.page && extraProps.page.headings)
369
381
  ? extraProps.page.headings
370
382
  .map((heading) => (heading ? { ...heading } : heading))
@@ -467,6 +479,12 @@ async function compileMdxFile(filePath, outPath, Layout, extraProps = {}) {
467
479
  : withLayout;
468
480
  const withApp = React.createElement(app.App, null, withContext);
469
481
  const compMap = { ...components, ...headingComponents, a: Anchor };
482
+ if (markdownTableComponent && !compMap.table) {
483
+ compMap.table = markdownTableComponent;
484
+ }
485
+ if (codeBlockComponent && !compMap.pre) {
486
+ compMap.pre = codeBlockComponent;
487
+ }
470
488
  const page = MDXProvider
471
489
  ? React.createElement(MDXProvider, { components: compMap }, withApp)
472
490
  : withApp;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@canopy-iiif/app",
3
- "version": "0.10.16",
3
+ "version": "0.10.17",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "Mat Jordan <mat@northwestern.edu>",
@@ -41,3 +41,21 @@
41
41
  color: var(--color-gray-900);
42
42
  }
43
43
  }
44
+
45
+ section[data-footnotes],
46
+ .footnotes {
47
+ margin-top: 2.618rem;
48
+ padding-top: 2.168rem;
49
+ border-top: 1px solid var(--color-gray-200);
50
+
51
+ ol,
52
+ ul {
53
+ list-style: decimal;
54
+ padding-left: 1.618rem;
55
+
56
+ li {
57
+ list-style: decimal;
58
+ margin-bottom: 0.618rem;
59
+ }
60
+ }
61
+ }
@@ -180,6 +180,27 @@
180
180
  color: var(--color-gray-900);
181
181
  }
182
182
 
183
+ section[data-footnotes],
184
+ .footnotes {
185
+ margin-top: 2.618rem;
186
+ padding-top: 2.168rem;
187
+ border-top: 1px solid var(--color-gray-200);
188
+ }
189
+ section[data-footnotes] ol,
190
+ section[data-footnotes] ul,
191
+ .footnotes ol,
192
+ .footnotes ul {
193
+ list-style: decimal;
194
+ padding-left: 1.618rem;
195
+ }
196
+ section[data-footnotes] ol li,
197
+ section[data-footnotes] ul li,
198
+ .footnotes ol li,
199
+ .footnotes ul li {
200
+ list-style: decimal;
201
+ margin-bottom: 0.618rem;
202
+ }
203
+
183
204
  @utility max-w-content {
184
205
  max-width: 1080px;
185
206
  }