open-index/open-npm huggingface dataset:
npm package: @myriaddreamin/typst.ts
Description: Run Typst in JavaScriptWorld.
Author: Myriad-Dreamin
Latest version: 0.7.0-rc2

# Typst.ts

Usage:

```typescript
import { $typst } from '@myriaddreamin/typst.ts';
console.log(
  (
    await $typst.svg({
      mainContent: 'Hello, typst!',
    })
  ).length,
);
// :-> 7317
```

See [Typst.ts](https://github.com/Myriad-Dreamin/typst.ts) and documentation for details:

- [Get Started](https://myriad-dreamin.github.io/typst.ts/cookery/get-started.html)
- [Compiler interfaces](https://myriad-dreamin.github.io/typst.ts/cookery/guide/compilers.html)
npm package: @myriaddreamin/typst.vue3
Description: This is a basic vue component for rendering typst documents.
Latest version: 0.7.0-rc2

# Typst.vue3 [WIP]

This is a basic vue component for rendering typst documents.

## Installation

```bash
yarn add @myriaddreamin/typst.ts
yarn add @myriaddreamin/typst.vue3
```

## Usage

use the component:

```vue
<template>
  <Typst v-bind:content="sourceCode" />
</template>
```

## Loading Wasm from Other Places

Set path to wasm files:

```ts
import { $typst } from '@myriaddreamin/typst.ts';

$typst.setCompilerInitOptions({
  beforeBuild: [],
  getModule: () =>
    'https://cdn.jsdelivr.net/npm/@myriaddreamin/typst-ts-web-compiler/pkg/typst_ts_web_compiler_bg.wasm',
});

$typst.setRendererInitOptions({
  beforeBuild: [],
  getModule: () =>
    'https://cdn.jsdelivr.net/npm/@myriaddreamin/typst-ts-renderer/pkg/typst_ts_renderer_bg.wasm',
});
```

## Documentation

See [Vue3 Library Docs](https://myriad-dreamin.github.io/typst.ts/cookery/guide/renderer/vue3.html).

## Development

Run the example project:

```bash
# At the root of the project, run the typst-ts-dev-server, serving local wasm files.
yarn dev
# In another terminal, run the example project.
cd packages/typst.vue3 && yarn dev
```