open-index/open-npm huggingface dataset:
npm package: @fileverse/content-processor
Description: Convert markdown files to Yjs-encoded strings compatible with ddoc Tiptap editor
Latest version: 0.1.0

# markdown-to-yjs

Convert markdown files to Yjs-encoded strings compatible with the ddoc Tiptap editor.

## Installation

```bash
npm install
```

## Build

```bash
npm run build
```

## Usage

```typescript
import { markdownToYjs } from 'markdown-to-yjs';
import fs from 'fs';

const markdown = fs.readFileSync('document.md', 'utf-8');
const yjsContent = markdownToYjs(markdown);

// yjsContent is a base64-encoded Yjs state string
// ready to be used with the ddoc editor
```

## API

### `markdownToYjs(markdown: string, options?: MarkdownToYjsOptions): string`

Converts a markdown string to a Yjs-encoded string.

**Options:**
- `wrapInDBlock` (boolean, default: `true`): Wrap content in dBlock nodes for ddoc compatibility.

### `mergeYjsUpdates(updates: string[]): string`

Merges multiple Yjs update strings into one.

### `applyYjsUpdate(existingContent: string, update: string): string`

Applies a Yjs update to existing content.

### `isYjsEncoded(content: string): boolean`

Checks if a string is Yjs-encoded (base64).

### `convertMarkdownToHTML(markdown: string): string`

Converts markdown to HTML (intermediate step).

### `stripFrontmatter(markdown: string): string`

Removes YAML frontmatter from markdown.

## Supported Markdown Features

- Headings (h1-h6)
- Bold, italic, strikethrough, underline
- Links and images
- Code blocks and inline code
- Bullet lists, ordered lists, task lists
- Blockquotes
- Tables
- Footnotes
- Superscript (`^text^`) and subscript (`~text~`)
- Page breaks (`===`)
- Callouts (`<aside class="callout">`)

## Test

```bash
npm test
```
npm package: @fileverse/excalidraw
Description: Excalidraw as a React component
Latest version: 1.3.5

# Excalidraw

Embed **Excalidraw** seamlessly into your projects with a ready-to-use component.

## Installation

You can use `npm`

```bash
npm install react react-dom @excalidraw/excalidraw
```

or via `yarn`

```bash
yarn add react react-dom @excalidraw/excalidraw
```

After installation you will see a folder `excalidraw-assets` and `excalidraw-assets-dev` in `dist` directory which contains the assets needed for this app in prod and dev mode respectively.

Move the folder `excalidraw-assets` and `excalidraw-assets-dev` to the path where your assets are served.

By default it will try to load the files from [`https://unpkg.com/@excalidraw/excalidraw/dist/`](https://unpkg.com/@excalidraw/excalidraw/dist)

If you want to load assets from a different path you can set a variable `window.EXCALIDRAW_ASSET_PATH` depending on environment (for example if you have different URL's for dev and prod) to the url from where you want to load the assets.

#### Note

**If you don't want to wait for the next stable release and try out the unreleased changes you can use `@excalidraw/excalidraw@next`.**

## Dimensions of Excalidraw

Excalidraw takes _100%_ of `width` and `height` of the containing block so make sure the container in which you render Excalidraw has non zero dimensions.

### Demo

[Try here](https://codesandbox.io/s/excalidraw-ehlz3).

## Integration

Head over to the [docs](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/integration)

## API

Head over to the [docs](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/api)
npm package: @fileverse/whiteboard
Description: Decentralized whiteboard
Latest version: 1.9.0

# Excalidraw

Embed **Excalidraw** seamlessly into your projects with a ready-to-use component.

## Installation

You can use `npm`

```bash
npm install react react-dom @excalidraw/excalidraw
```

or via `yarn`

```bash
yarn add react react-dom @excalidraw/excalidraw
```

After installation you will see a folder `excalidraw-assets` and `excalidraw-assets-dev` in `dist` directory which contains the assets needed for this app in prod and dev mode respectively.

Move the folder `excalidraw-assets` and `excalidraw-assets-dev` to the path where your assets are served.

By default it will try to load the files from [`https://unpkg.com/@excalidraw/excalidraw/dist/`](https://unpkg.com/@excalidraw/excalidraw/dist)

If you want to load assets from a different path you can set a variable `window.EXCALIDRAW_ASSET_PATH` depending on environment (for example if you have different URL's for dev and prod) to the url from where you want to load the assets.

#### Note

**If you don't want to wait for the next stable release and try out the unreleased changes you can use `@excalidraw/excalidraw@next`.**

## Dimensions of Excalidraw

Excalidraw takes _100%_ of `width` and `height` of the containing block so make sure the container in which you render Excalidraw has non zero dimensions.

### Demo

[Try here](https://codesandbox.io/s/excalidraw-ehlz3).

## Integration

Head over to the [docs](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/integration)

## API

Head over to the [docs](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/api)

## Contributing

Head over to the [docs](https://docs.excalidraw.com/docs/@excalidraw/excalidraw/contributing)
npm package: @fileviewer/react-highlight
Description: React component for syntax highlighting
Author: Alonzo Thomas
Latest version: 0.14.0

# react-highlight

React component for syntax highlighting using highlight.js

![Build Status](https://travis-ci.org/akiran/react-highlight.svg?branch=master)

### Latest version

`0.11.1`

## [Documentation](https://react-highlight.neostack.com/)

### CodeSandbox Example

[![Edit new](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/mj6wlmor9p)

### Installation

```bash
  npm install react-highlight --save
```

### Usage

#### Importing component

```js
import Highlight from 'react-highlight'
```

#### Adding styles

Choose the [theme](https://highlightjs.org/static/demo/) for syntax highlighting and add corresponding styles of highlight.js

```css
  <link rel="stylesheet" href="/path/to/styles/theme-name.css">
```

The styles will most likely be in `node_modules/highlight.js/styles` folder.

Props:

* className: custom class name
* innerHTML: enable to render markup with dangerouslySetInnerHTML
* element: render code snippet inside specified element

#### Syntax highlighting of single code snippet

Code snippet that requires syntax highlighting should be passed as children to Highlight component in string format. Language name of code snippet should be specified as className.

```html
<Highlight className='language-name-of-snippet'>
  {"code snippet to be highlighted"}
</Highlight>
```

#### Syntax highlighting of mutiple code snippets

Set `innerHTML=true` to highlight multiple code snippets at a time.
This is especially usefull if html with multiple code snippets is generated from preprocesser tools like markdown.

**Warning:** If innerHTML is set to true, make sure the html generated with code snippets is from trusted source.

```html
<Highlight innerHTML={true}>
  {"html with multiple code snippets"}
</Highlight>
```