@memorysmithapp/markdown-renderer 0.8.3 → 0.8.5
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/README.md +1 -1
- package/dist/Markdown.js +1 -1
- package/dist/NoteBody.js +2 -2
- package/dist/Transclusion.js +2 -2
- package/dist/diagnose.js +1 -1
- package/dist/edit/analyze.js +1 -1
- package/dist/edit/blocks.js +2 -2
- package/dist/{transclusion.js → embeds.js} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/remark-ring.d.ts +1 -1
- package/dist/remark-ring.js +1 -1
- package/dist/tasklist.js +1 -1
- package/package.json +2 -2
- /package/dist/{transclusion.d.ts → embeds.d.ts} +0 -0
- /package/dist/{markdown.d.ts → source.d.ts} +0 -0
- /package/dist/{markdown.js → source.js} +0 -0
package/README.md
CHANGED
|
@@ -138,7 +138,7 @@ const notices = await diagnose(note, {
|
|
|
138
138
|
|
|
139
139
|
A `notice` says the page will differ from the text — a fence never closed, a formula KaTeX cannot typeset, a diagram Mermaid cannot read, raw HTML, a footnote with no definition or no reference, a single-tilde strikethrough, a frontmatter never closed, a `name` that leaves the note unnamed or none at all, `aliases` or `tags` that are not a list, a body that does not start at `#` or skips a level. A `hint` says nothing is drawn wrong: no `aliases`, no `tags`, a link or an embed no note answers yet. Lines and columns count from 1 over the whole note, frontmatter included, and the `message` is English; a host words it in its own language from the `code`, which is stable. Mermaid is loaded only for a note that holds a diagram, and `diagrams: false` skips it.
|
|
140
140
|
|
|
141
|
-
The host contract, the stylesheet's properties, the slots and the decisions behind them are in the repository's [`ARCHITECTURE.md`](https://github.com/memorysmithapp/memorysmithapp-markdown/blob/main/ARCHITECTURE.md).
|
|
141
|
+
The host contract, the stylesheet's properties, the slots and the decisions behind them are in the repository's [`ARCHITECTURE.md`](https://github.com/memorysmithapp/memorysmithapp-markdown/blob/main/docs/ARCHITECTURE.md).
|
|
142
142
|
|
|
143
143
|
## Licence
|
|
144
144
|
|
package/dist/Markdown.js
CHANGED
|
@@ -12,7 +12,7 @@ import { highlightLanguage, highlightTree, languageToLoad, loadGrammar } from '.
|
|
|
12
12
|
import { useHost } from './host.js';
|
|
13
13
|
import { readDimensions, readImageAlt, sizedAttributes } from './image-dimensions.js';
|
|
14
14
|
import { choiceTargetOf, LinkChoice } from './LinkChoice.js';
|
|
15
|
-
import { toUnixNewlines } from './
|
|
15
|
+
import { toUnixNewlines } from './source.js';
|
|
16
16
|
import { MermaidDiagram } from './MermaidDiagram.js';
|
|
17
17
|
import { readingPlugins } from './reading.js';
|
|
18
18
|
import { CLOBBER_PREFIX, rehypeFootnoteRun, rehypeFootnoteSection } from './footnotes.js';
|
package/dist/NoteBody.js
CHANGED
|
@@ -7,14 +7,14 @@ import { HOST_KEYS, HostProvider, resolveHost, useHost } from './host.js';
|
|
|
7
7
|
import { planFootnotes } from './footnotes.js';
|
|
8
8
|
import { Markdown } from './Markdown.js';
|
|
9
9
|
import { readingPlugins } from './reading.js';
|
|
10
|
-
import { bodyStart, hideComments, remoteImageHosts, resolveWikilinks } from './
|
|
10
|
+
import { bodyStart, hideComments, remoteImageHosts, resolveWikilinks } from './source.js';
|
|
11
11
|
import { readProperties } from './properties.js';
|
|
12
12
|
import { Properties } from './PropertiesBlock.js';
|
|
13
13
|
import { useTaskSaves } from './task-saves.js';
|
|
14
14
|
import { taskBoxes } from './tasklist.js';
|
|
15
15
|
import { rootStyle } from './theme.js';
|
|
16
16
|
import { Transclusion } from './Transclusion.js';
|
|
17
|
-
import { splitEmbeds } from './
|
|
17
|
+
import { splitEmbeds } from './embeds.js';
|
|
18
18
|
import { wikilinkAddress } from './wikilink-address.js';
|
|
19
19
|
/** The editor, loaded the first time a note is edited, so a host that only draws never loads it. */
|
|
20
20
|
const NoteEditor = lazy(() => import('./edit/NoteEditor.js').then((module) => ({ default: module.NoteEditor })));
|
package/dist/Transclusion.js
CHANGED
|
@@ -3,8 +3,8 @@ import { useEffect, useState } from 'react';
|
|
|
3
3
|
import { useHost } from './host.js';
|
|
4
4
|
import { Markdown } from './Markdown.js';
|
|
5
5
|
import { drawSlot, useSlot } from './slots.js';
|
|
6
|
-
import { bodyStart, hideComments, resolveWikilinks } from './
|
|
7
|
-
import { blockOf, demoteEmbeds, isBlockAnchor, sectionOf } from './
|
|
6
|
+
import { bodyStart, hideComments, resolveWikilinks } from './source.js';
|
|
7
|
+
import { blockOf, demoteEmbeds, isBlockAnchor, sectionOf } from './embeds.js';
|
|
8
8
|
import { wikilinkAddress } from './wikilink-address.js';
|
|
9
9
|
/** The shape of what is coming, in the position it will occupy, while the host answers. */
|
|
10
10
|
function TransclusionSkeleton({ loading }) {
|
package/dist/diagnose.js
CHANGED
|
@@ -15,7 +15,7 @@ import { keptImageName } from './kept-image.js';
|
|
|
15
15
|
import katex from 'katex';
|
|
16
16
|
import remarkParse from 'remark-parse';
|
|
17
17
|
import { unified } from 'unified';
|
|
18
|
-
import { bodyStart, codeRegions, hideComments, insideCode, toUnixNewlines } from './
|
|
18
|
+
import { bodyStart, codeRegions, hideComments, insideCode, toUnixNewlines } from './source.js';
|
|
19
19
|
import { readProperties } from './properties.js';
|
|
20
20
|
import { readingPlugins } from './reading.js';
|
|
21
21
|
/** The table of §7.13, as `spec.json` carries it: a test holds the two equal. */
|
package/dist/edit/analyze.js
CHANGED
|
@@ -15,7 +15,7 @@ import remarkGfm from 'remark-gfm';
|
|
|
15
15
|
import remarkMath from 'remark-math';
|
|
16
16
|
import remarkParse from 'remark-parse';
|
|
17
17
|
import { unified } from 'unified';
|
|
18
|
-
import { codeRegions, commentRegions, insideCode } from '../
|
|
18
|
+
import { codeRegions, commentRegions, insideCode } from '../source.js';
|
|
19
19
|
import { CALLOUT_MARKER } from '../remark-callouts.js';
|
|
20
20
|
import { breaksDollarRule } from '../remark-ring.js';
|
|
21
21
|
let parser = null;
|
package/dist/edit/blocks.js
CHANGED
|
@@ -12,10 +12,10 @@ import { ChangeSet } from '@codemirror/state';
|
|
|
12
12
|
import { useEffect, useRef, useState } from 'react';
|
|
13
13
|
import { useHost } from '../host.js';
|
|
14
14
|
import { Markdown } from '../Markdown.js';
|
|
15
|
-
import { hideComments, resolveWikilinks } from '../
|
|
15
|
+
import { hideComments, resolveWikilinks } from '../source.js';
|
|
16
16
|
import { isTrue, readProperties } from '../properties.js';
|
|
17
17
|
import { Transclusion } from '../Transclusion.js';
|
|
18
|
-
import { splitEmbeds } from '../
|
|
18
|
+
import { splitEmbeds } from '../embeds.js';
|
|
19
19
|
import { wikilinkAddress } from '../wikilink-address.js';
|
|
20
20
|
import { ICON_OWN_SIZE, ICON_RATIO_FREE, ICON_RATIO_LOCKED, ICON_RESIZE } from '../mode-icons.js';
|
|
21
21
|
import { describeImage, MAX_IMAGE_WIDTH, readImageSize, resizeImage } from './image-size.js';
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* and never blocks (§4.1). Wherever expansion cannot happen the embed becomes
|
|
17
17
|
* a link and is never dropped, which is what `demoteEmbeds` does.
|
|
18
18
|
*/
|
|
19
|
-
import { codeRegions, fenceRegions, headingKey, insideCode, insideTable, outsideCode, tableRegions } from './
|
|
19
|
+
import { codeRegions, fenceRegions, headingKey, insideCode, insideTable, outsideCode, tableRegions } from './source.js';
|
|
20
20
|
/** Same shape the link extractor matches, plus the leading `!`. */
|
|
21
21
|
const EMBED = /!\[\[([^\]|#]+?)(?:#([^\]|]+?))?(?:\|[^\]]*?)?\]\]/g;
|
|
22
22
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export { ENGLISH, type EditorWords, type NoteStrings, type NoteStringsInput } fr
|
|
|
7
7
|
export { customPropertyOf, DEFAULT_THEME, defineTheme, THEME_PROPERTIES, THEME_SLOTS, type BlockquoteSlotProps, type CalloutSlotProps, type CodeBlockSlotProps, type DiagramSlotProps, type EmbedSlotProps, type FootnotesSlotProps, type HeadingSlotProps, type InlineCodeSlotProps, type ModeSwitchSlotProps, type AttachmentSlotProps, type PropertiesSlotProps, type Scheme, type TableSlotProps, type TaskBoxSlotProps, type Theme, type ThemeComponents, type ThemeProperties, type WikilinkSlotProps, } from './theme.js';
|
|
8
8
|
export { followable } from './address.js';
|
|
9
9
|
export { readDimensions, readImageAlt, writeDimensions, type Dimensions, type ImageAlt } from './image-dimensions.js';
|
|
10
|
-
export { codeRegions, fenceRegions, headingKey, remoteImageHosts, resolveWikilinks, splitFrontmatter, tableRegions, toUnixNewlines, type SplitDocument, } from './
|
|
10
|
+
export { codeRegions, fenceRegions, headingKey, remoteImageHosts, resolveWikilinks, splitFrontmatter, tableRegions, toUnixNewlines, type SplitDocument, } from './source.js';
|
|
11
11
|
export { ordinalAt, taskBoxes, taskCheckedAt, toggleTaskAt } from './tasklist.js';
|
|
12
12
|
export { readProperties, type NoteProperties, type PropertyEntry, type PropertyShape } from './properties.js';
|
|
13
13
|
export { DELEGATED_TO_THE_BASE_PARSER, unclassified } from './delegated.js';
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ export { ENGLISH } from './strings.js';
|
|
|
5
5
|
export { customPropertyOf, DEFAULT_THEME, defineTheme, THEME_PROPERTIES, THEME_SLOTS, } from './theme.js';
|
|
6
6
|
export { followable } from './address.js';
|
|
7
7
|
export { readDimensions, readImageAlt, writeDimensions } from './image-dimensions.js';
|
|
8
|
-
export { codeRegions, fenceRegions, headingKey, remoteImageHosts, resolveWikilinks, splitFrontmatter, tableRegions, toUnixNewlines, } from './
|
|
8
|
+
export { codeRegions, fenceRegions, headingKey, remoteImageHosts, resolveWikilinks, splitFrontmatter, tableRegions, toUnixNewlines, } from './source.js';
|
|
9
9
|
export { ordinalAt, taskBoxes, taskCheckedAt, toggleTaskAt } from './tasklist.js';
|
|
10
10
|
export { readProperties } from './properties.js';
|
|
11
11
|
export { DELEGATED_TO_THE_BASE_PARSER, unclassified } from './delegated.js';
|
package/dist/remark-ring.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* before it is parsed is how a notation starts firing inside examples.
|
|
9
9
|
*
|
|
10
10
|
* Comments (§7.6) are the one exception, and they are taken out before the
|
|
11
|
-
* parser by `hideComments` (`
|
|
11
|
+
* parser by `hideComments` (`source.ts`), which finds code first: a comment
|
|
12
12
|
* may hold markup and blank lines, and once parsed it is spread over nodes no
|
|
13
13
|
* plugin on a run of text can see whole.
|
|
14
14
|
*
|
package/dist/remark-ring.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* before it is parsed is how a notation starts firing inside examples.
|
|
9
9
|
*
|
|
10
10
|
* Comments (§7.6) are the one exception, and they are taken out before the
|
|
11
|
-
* parser by `hideComments` (`
|
|
11
|
+
* parser by `hideComments` (`source.ts`), which finds code first: a comment
|
|
12
12
|
* may hold markup and blank lines, and once parsed it is spread over nodes no
|
|
13
13
|
* plugin on a run of text can see whole.
|
|
14
14
|
*
|
package/dist/tasklist.js
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* by design, because it flattens lists for display, and rebuilding the
|
|
12
12
|
* document from it would hand the notebook a file nobody typed.
|
|
13
13
|
*/
|
|
14
|
-
import { commentRegions, fenceRegions } from './
|
|
14
|
+
import { commentRegions, fenceRegions } from './source.js';
|
|
15
15
|
/**
|
|
16
16
|
* A task item, as GFM defines it, at the start of a list item — after any
|
|
17
17
|
* block quote markers in front of it, because a callout is a block quote and a
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memorysmithapp/markdown-renderer",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.5",
|
|
4
4
|
"description": "A React component that draws a MemorySmith note exactly as MemorySmith's reading page does.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"markdown",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"unified": "11.0.5"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
|
-
"@memorysmithapp/markdown-spec": "0.8.
|
|
82
|
+
"@memorysmithapp/markdown-spec": "0.8.5",
|
|
83
83
|
"@types/hast": "3.0.5",
|
|
84
84
|
"@types/react": "19.2.18",
|
|
85
85
|
"@types/react-dom": "19.2.4",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|