React with Native

Bringing together React and React Native

GitHub

README

Markdown

markdown (

OperationClassification

TODO: Ensure embedding this will embed the actual docs in my markdown renderer. I guess it might already do so!

TODO: It would be great to learn more about this topic and see if I can make more cross-environment packages. A great use case would be to create a wrapper around the current fs-orm to enable using it at the frontend too.

OperationClassification ui-esm)

markdown

this uses react-markdown to render markdown in the browser with react...

This is a ui-esm operation. This means it's a ui operation that builds to javascript with ESM module resolving... It was based on this example: https://prateeksurana.me/blog/react-library-with-typescript/

Api reference
renderMarkdownContent()

Renders a markdown string (without frontmatter)

TODO:

  • Show selection prompt-results In renderMarkdownContent, augment the alineas with the ContextualPromptResult. Would be great to see the results when hovering over the selected thing, or maybe showing it with a button, or inline, even.
Input
contentstring
OutputJSX.Element
📄 renderMarkdownContent (exported const)

Renders a markdown string (without frontmatter)

TODO:

  • Show selection prompt-results In renderMarkdownContent, augment the alineas with the ContextualPromptResult. Would be great to see the results when hovering over the selected thing, or maybe showing it with a button, or inline, even.
<MarkdownCodeblock />

Renders a markdown codeblock with a text as content and an optional extension

Input
props{ text: string,
extension?: string,
minimalMode?: CodeblockMode,
expandedMode?: CodeblockMode,
isInitiallyExpanded?: boolean,
isModeStatic?: boolean,
}
OutputJSX.Element
📄 MarkdownCodeblock (exported const)

Renders a markdown codeblock with a text as content and an optional extension

getRealSrc()

Based on markdown info, gest the real source for an asset

Input
src (optional)string
Outputstring
🔹 MarkdownParseRenderConfig

Properties:

NameTypeDescription
disableSelectionContextMenu (optional)boolean
projectRelativeBaseFolderPath (optional)string
projectRelativeMarkdownFilePath (optional)string
augmentedWordObject (optional)object
selectionPrompts (optional)array
selectionContextualPromptResults (optional)array
fileContextualPromptResults (optional)array
isStatic (optional)boolean
isDev (optional)boolean
big (optional)boolean
📄 getRealSrc (exported const)

Based on markdown info, gest the real source for an asset

Internal
Show internal (21)
getUrlFromRelativeUrl()

gets the renderable asset url from the relative url

Input
relativeUrlstring
Outputstring
getYoutubeId()
Input
url (optional)string
Outputstring
<HtmlHeader />
Input
-
OutputJSX.Element
<Parameter />

In markdown, if you wish to refer to a parameter, you can backtick it and put a "." in front. You can also add a value to it if you wish, by adding the ":" and the value afterwards.

Input
props{ text: string,
}
OutputJSX.Element
renderFrontmatter()

Renders markdown frontmatter parameters (and optionally a spacer)

Input
parametersFrontmatter
OutputJSX.Element
renderMarkdownChunk()

renders a MarkdownChunk interface

Input
chunkMarkdownChunk
OutputJSX.Element
renderMarkdownParse()

renders the MardkownParse interface (including frontmatter)

Input
markdownParseMarkdownParse
OutputJSX.Element
renderMarkdownTitle()

renders a markdown title (level should be 1 for h1 and 6 for h6)

Input
titlestring
OutputJSX.Element
useOpenHashDetails()
Input
-
Output
🔹 CodeblockMode
📄 defaultExpandedMode (exported const)
📄 defaultMinimalMode (exported const)
📄 getUrlFromRelativeUrl (exported const)

gets the renderable asset url from the relative url

📄 getYoutubeId (exported const)
📄 HtmlHeader (exported const)
📄 Parameter (exported const)

In markdown, if you wish to refer to a parameter, you can backtick it and put a "." in front. You can also add a value to it if you wish, by adding the ":" and the value afterwards.

📄 renderFrontmatter (exported const)

Renders markdown frontmatter parameters (and optionally a spacer)

📄 renderMarkdownChunk (exported const)

renders a MarkdownChunk interface

📄 renderMarkdownParse (exported const)

renders the MardkownParse interface (including frontmatter)

📄 renderMarkdownTitle (exported const)

renders a markdown title (level should be 1 for h1 and 6 for h6)

📄 useOpenHashDetails (exported const)