Compare commits
4 commits
67b014587e
...
4efe62525a
Author | SHA1 | Date | |
---|---|---|---|
4efe62525a | |||
1bec37f3bd | |||
13240b3486 | |||
126d18983a |
48 changed files with 63 additions and 107 deletions
1
.npmrc
1
.npmrc
|
@ -1,2 +1,3 @@
|
||||||
engine-strict=true
|
engine-strict=true
|
||||||
auto-install-peers=true
|
auto-install-peers=true
|
||||||
|
publish-branch=slim
|
||||||
|
|
12
README.md
12
README.md
|
@ -21,7 +21,9 @@
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<a href="https://beartocode.github.io/carta/">📚 Documentation</a>
|
<a href="https://beartocode.github.io/carta/">📚 Documentation</a>
|
||||||
<span> · </span>
|
<span> · </span>
|
||||||
<a href="https://github.com/BearToCode/carta">GitHub</a>
|
<a href="https://code.thetadev.de/ThetaDev/carta">Source code</a>
|
||||||
|
<span> · </span>
|
||||||
|
<a href="https://github.com/BearToCode/carta">Original GitHub</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
@ -36,6 +38,12 @@
|
||||||
Carta is a **lightweight**, **fast** and **extensible** Svelte Markdown editor and viewer. It is powered by [unified](https://github.com/unifiedjs/unified), [remark](https://github.com/remarkjs/remark) and [rehype](https://github.com/rehypejs/rehype). Check out the [examples](http://beartocode.github.io/carta/examples) to see it in action.
|
Carta is a **lightweight**, **fast** and **extensible** Svelte Markdown editor and viewer. It is powered by [unified](https://github.com/unifiedjs/unified), [remark](https://github.com/remarkjs/remark) and [rehype](https://github.com/rehypejs/rehype). Check out the [examples](http://beartocode.github.io/carta/examples) to see it in action.
|
||||||
Differently from most editors, Carta does not include a code editor, but it is _just_ a textarea with syntax highlighting, shortcuts and more.
|
Differently from most editors, Carta does not include a code editor, but it is _just_ a textarea with syntax highlighting, shortcuts and more.
|
||||||
|
|
||||||
|
This is a fork of carta which applies the following changes:
|
||||||
|
|
||||||
|
- Replace Shiki syntax higlighter with Prism.js (much more lightweight, 90kB vs 385kB bundle size for minimal test application)
|
||||||
|
- Make markdown renderer class configurable and set it to `prose` by default (for Tailwind support)
|
||||||
|
- Make markdown input usable without JS
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- 🌈 Markdown syntax highlighting ([Shiki](https://shiki.style/));
|
- 🌈 Markdown syntax highlighting ([Shiki](https://shiki.style/));
|
||||||
|
@ -100,7 +108,7 @@ npm i @cartamd/plugin-name
|
||||||
|
|
||||||
```svelte
|
```svelte
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Carta, MarkdownEditor } from '@thetadev256/carta-md';
|
import { Carta, MarkdownEditor } from '@thetadev/carta-md';
|
||||||
// Component default theme
|
// Component default theme
|
||||||
import 'carta-md/default.css';
|
import 'carta-md/default.css';
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Carta, MarkdownEditor } from '@thetadev256/carta-md';
|
import { Carta, MarkdownEditor } from '@thetadev/carta-md';
|
||||||
import { emoji } from '@cartamd/plugin-emoji';
|
import { emoji } from '@cartamd/plugin-emoji';
|
||||||
import { code } from '@cartamd/plugin-code';
|
import { code } from '@cartamd/plugin-code';
|
||||||
import PlusCircled from './assets/PlusIcon.svelte';
|
import PlusCircled from './assets/PlusIcon.svelte';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Carta, MarkdownEditor } from '@thetadev256/carta-md';
|
import { Carta, MarkdownEditor } from '@thetadev/carta-md';
|
||||||
import { attachment } from '@cartamd/plugin-attachment';
|
import { attachment } from '@cartamd/plugin-attachment';
|
||||||
import { emoji } from '@cartamd/plugin-emoji';
|
import { emoji } from '@cartamd/plugin-emoji';
|
||||||
import { slash } from '@cartamd/plugin-slash';
|
import { slash } from '@cartamd/plugin-slash';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Carta, MarkdownEditor, Markdown } from '@thetadev256/carta-md';
|
import { Carta, MarkdownEditor, Markdown } from '@thetadev/carta-md';
|
||||||
import placeholder from './math-stack-exchange-placeholder.tex?raw';
|
import placeholder from './math-stack-exchange-placeholder.tex?raw';
|
||||||
import { math } from '@cartamd/plugin-math';
|
import { math } from '@cartamd/plugin-math';
|
||||||
import { tikz } from '@cartamd/plugin-tikz';
|
import { tikz } from '@cartamd/plugin-tikz';
|
||||||
|
|
|
@ -37,7 +37,7 @@ Setup a basic editor:
|
||||||
|
|
||||||
```svelte
|
```svelte
|
||||||
<script>
|
<script>
|
||||||
import { Carta, MarkdownEditor } from '@thetadev256/carta-md';
|
import { Carta, MarkdownEditor } from '@thetadev/carta-md';
|
||||||
import 'carta-md/default.css'; /* Default theme */
|
import 'carta-md/default.css'; /* Default theme */
|
||||||
|
|
||||||
const carta = new Carta({
|
const carta = new Carta({
|
||||||
|
@ -68,7 +68,7 @@ Or, if you just want to render content:
|
||||||
|
|
||||||
```svelte
|
```svelte
|
||||||
<script>
|
<script>
|
||||||
import { Carta, Markdown } from '@thetadev256/carta-md';
|
import { Carta, Markdown } from '@thetadev/carta-md';
|
||||||
|
|
||||||
const carta = new Carta({
|
const carta = new Carta({
|
||||||
/* ... */
|
/* ... */
|
||||||
|
|
|
@ -39,7 +39,7 @@ import '@cartamd/plugin-anchor/default.css';
|
||||||
|
|
||||||
```svelte
|
```svelte
|
||||||
<script>
|
<script>
|
||||||
import { Carta, MarkdownEditor } from '@thetadev256/carta-md';
|
import { Carta, MarkdownEditor } from '@thetadev/carta-md';
|
||||||
import { anchor } from '@cartamd/plugin-anchor';
|
import { anchor } from '@cartamd/plugin-anchor';
|
||||||
|
|
||||||
const carta = new Carta({
|
const carta = new Carta({
|
||||||
|
|
|
@ -35,7 +35,7 @@ import '@cartamd/plugin-attachment/default.css';
|
||||||
|
|
||||||
```svelte
|
```svelte
|
||||||
<script>
|
<script>
|
||||||
import { Carta, MarkdownEditor } from '@thetadev256/carta-md';
|
import { Carta, MarkdownEditor } from '@thetadev/carta-md';
|
||||||
import { attachment } from '@cartamd/plugin-attachment';
|
import { attachment } from '@cartamd/plugin-attachment';
|
||||||
|
|
||||||
const carta = new Carta({
|
const carta = new Carta({
|
||||||
|
|
|
@ -62,7 +62,7 @@ It is no longer possible to specify a custom highlighter in this plugin. However
|
||||||
|
|
||||||
```svelte
|
```svelte
|
||||||
<script>
|
<script>
|
||||||
import { Carta, MarkdownEditor } from '@thetadev256/carta-md';
|
import { Carta, MarkdownEditor } from '@thetadev/carta-md';
|
||||||
import { code } from '@cartamd/plugin-code';
|
import { code } from '@cartamd/plugin-code';
|
||||||
|
|
||||||
const carta = new Carta({
|
const carta = new Carta({
|
||||||
|
|
|
@ -39,7 +39,7 @@ import '@cartamd/plugin-emoji/default.css';
|
||||||
|
|
||||||
```svelte
|
```svelte
|
||||||
<script>
|
<script>
|
||||||
import { Carta, MarkdownEditor } from '@thetadev256/carta-md';
|
import { Carta, MarkdownEditor } from '@thetadev/carta-md';
|
||||||
import { emoji } from '@cartamd/plugin-emoji';
|
import { emoji } from '@cartamd/plugin-emoji';
|
||||||
|
|
||||||
const carta = new Carta({
|
const carta = new Carta({
|
||||||
|
|
|
@ -5,7 +5,7 @@ title: Math
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Code from '$lib/components/code/Code.svelte';
|
import Code from '$lib/components/code/Code.svelte';
|
||||||
import { Markdown, Carta } from '@thetadev256/carta-md';
|
import { Markdown, Carta } from '@thetadev/carta-md';
|
||||||
import { math } from '@cartamd/plugin-math';
|
import { math } from '@cartamd/plugin-math';
|
||||||
import 'katex/dist/katex.css';
|
import 'katex/dist/katex.css';
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ or by using a content delivery network:
|
||||||
|
|
||||||
```svelte
|
```svelte
|
||||||
<script>
|
<script>
|
||||||
import { Carta, MarkdownEditor } from '@thetadev256/carta-md';
|
import { Carta, MarkdownEditor } from '@thetadev/carta-md';
|
||||||
import { math } from '@cartamd/plugin-math';
|
import { math } from '@cartamd/plugin-math';
|
||||||
|
|
||||||
const carta = new Carta({
|
const carta = new Carta({
|
||||||
|
|
|
@ -39,7 +39,7 @@ import '@cartamd/plugin-slash/default.css';
|
||||||
|
|
||||||
```svelte
|
```svelte
|
||||||
<script>
|
<script>
|
||||||
import { Carta, MarkdownEditor } from '@thetadev256/carta-md';
|
import { Carta, MarkdownEditor } from '@thetadev/carta-md';
|
||||||
import { slash } from '@cartamd/plugin-slash';
|
import { slash } from '@cartamd/plugin-slash';
|
||||||
|
|
||||||
const carta = new Carta({
|
const carta = new Carta({
|
||||||
|
|
|
@ -29,7 +29,7 @@ npm i @cartamd/plugin-tikz
|
||||||
|
|
||||||
```svelte
|
```svelte
|
||||||
<script>
|
<script>
|
||||||
import { Carta, MarkdownEditor } from '@thetadev256/carta-md';
|
import { Carta, MarkdownEditor } from '@thetadev/carta-md';
|
||||||
import { tikz } from '@cartamd/plugin-tikz';
|
import { tikz } from '@cartamd/plugin-tikz';
|
||||||
import '@cartamd/plugin-tikz/fonts.css';
|
import '@cartamd/plugin-tikz/fonts.css';
|
||||||
|
|
||||||
|
|
|
@ -113,7 +113,7 @@ Unified plugins need to be wrapped inside a `UnifiedTransformer` type, to be abl
|
||||||
<Code>
|
<Code>
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
import type { UnifiedTransformer } from '@thetadev256/carta-md';
|
import type { UnifiedTransformer } from '@thetadev/carta-md';
|
||||||
|
|
||||||
const hashtagTransformer: UnifiedTransformer<'sync'> = {
|
const hashtagTransformer: UnifiedTransformer<'sync'> = {
|
||||||
execution: 'sync', // Sync, since the plugin is synchronous
|
execution: 'sync', // Sync, since the plugin is synchronous
|
||||||
|
@ -158,7 +158,7 @@ To do that, we create a listener that:
|
||||||
<Code>
|
<Code>
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
import type { Listener } from '@thetadev256/carta-md';
|
import type { Listener } from '@thetadev/carta-md';
|
||||||
import Hashtag from './Hashtag.svelte';
|
import Hashtag from './Hashtag.svelte';
|
||||||
|
|
||||||
const convertHashtags: Listener<'carta-render'> = [
|
const convertHashtags: Listener<'carta-render'> = [
|
||||||
|
@ -193,7 +193,7 @@ Let's now create a Plugin with the transformer and the listener:
|
||||||
<Code>
|
<Code>
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
import type { Plugin } from '@thetadev256/carta-md';
|
import type { Plugin } from '@thetadev/carta-md';
|
||||||
|
|
||||||
export const hashtag = (): Plugin => ({
|
export const hashtag = (): Plugin => ({
|
||||||
transformers: [hashtagTransformer],
|
transformers: [hashtagTransformer],
|
||||||
|
@ -206,7 +206,7 @@ export const hashtag = (): Plugin => ({
|
||||||
We can now use the plugin with the following:
|
We can now use the plugin with the following:
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
import { Carta } from '@thetadev256/carta-md';
|
import { Carta } from '@thetadev/carta-md';
|
||||||
|
|
||||||
const carta = new Carta({
|
const carta = new Carta({
|
||||||
// ...
|
// ...
|
||||||
|
|
|
@ -100,7 +100,7 @@ npm i @cartamd/plugin-name
|
||||||
|
|
||||||
```svelte
|
```svelte
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Carta, MarkdownEditor } from '@thetadev256/carta-md';
|
import { Carta, MarkdownEditor } from '@thetadev/carta-md';
|
||||||
// Component default theme
|
// Component default theme
|
||||||
import 'carta-md/default.css';
|
import 'carta-md/default.css';
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git+https://github.com/BearToCode/carta.git"
|
"url": "git+https://code.thetadev.de/ThetaDev/carta.git"
|
||||||
},
|
},
|
||||||
"exports": {
|
"exports": {
|
||||||
".": {
|
".": {
|
||||||
|
@ -14,7 +14,8 @@
|
||||||
"svelte": "./dist/index.js",
|
"svelte": "./dist/index.js",
|
||||||
"import": "./dist/index.js"
|
"import": "./dist/index.js"
|
||||||
},
|
},
|
||||||
"./default.css": "./dist/default.css"
|
"./default.css": "./dist/default.css",
|
||||||
|
"./highlight.css": "./dist/highlight.css"
|
||||||
},
|
},
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -20,7 +20,7 @@ import '@cartamd/plugin-anchor/default.css';
|
||||||
|
|
||||||
```svelte
|
```svelte
|
||||||
<script>
|
<script>
|
||||||
import { Carta, MarkdownEditor } from '@thetadev256/carta-md';
|
import { Carta, MarkdownEditor } from '@thetadev/carta-md';
|
||||||
import { anchor } from '@cartamd/plugin-anchor';
|
import { anchor } from '@cartamd/plugin-anchor';
|
||||||
|
|
||||||
const carta = new Carta({
|
const carta = new Carta({
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
"rehype-slug": "^6.0.0"
|
"rehype-slug": "^6.0.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@thetadev256/carta-md": "^4.0.0",
|
"@thetadev/carta-md": "^4.0.0",
|
||||||
"svelte": "^3.54.0 || ^4.0.0"
|
"svelte": "^3.54.0 || ^4.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import rehypeSlug, { type Options as SlugOptions } from 'rehype-slug';
|
import rehypeSlug, { type Options as SlugOptions } from 'rehype-slug';
|
||||||
import rehypeAutolinkHeadings, { type Options as AutolinkOptions } from 'rehype-autolink-headings';
|
import rehypeAutolinkHeadings, { type Options as AutolinkOptions } from 'rehype-autolink-headings';
|
||||||
import type { Plugin } from '@thetadev256/carta-md';
|
import type { Plugin } from '@thetadev/carta-md';
|
||||||
export * from './default.css?inline';
|
export * from './default.css?inline';
|
||||||
|
|
||||||
export interface AnchorExtensionOptions {
|
export interface AnchorExtensionOptions {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Carta, MarkdownEditor } from '@thetadev256/carta-md';
|
import { Carta, MarkdownEditor } from '@thetadev/carta-md';
|
||||||
import { anchor } from '$lib';
|
import { anchor } from '$lib';
|
||||||
import 'carta-md/default.css';
|
import 'carta-md/default.css';
|
||||||
import '$lib/default.css';
|
import '$lib/default.css';
|
||||||
|
|
|
@ -20,7 +20,7 @@ import '@cartamd/plugin-attachment/default.css';
|
||||||
|
|
||||||
```svelte
|
```svelte
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Carta, MarkdownEditor } from '@thetadev256/carta-md';
|
import { Carta, MarkdownEditor } from '@thetadev/carta-md';
|
||||||
import { attachment } from '@cartamd/plugin-attachment';
|
import { attachment } from '@cartamd/plugin-attachment';
|
||||||
|
|
||||||
const carta = new Carta({
|
const carta = new Carta({
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
"!dist/**/*.spec.*"
|
"!dist/**/*.spec.*"
|
||||||
],
|
],
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@thetadev256/carta-md": "^4.0.0",
|
"@thetadev/carta-md": "^4.0.0",
|
||||||
"marked": "^9.1.5",
|
"marked": "^9.1.5",
|
||||||
"svelte": "^3.54.0 || ^4.0.0"
|
"svelte": "^3.54.0 || ^4.0.0"
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type { Carta } from '@thetadev256/carta-md';
|
import type { Carta } from '@thetadev/carta-md';
|
||||||
import type { Writable } from 'svelte/store';
|
import type { Writable } from 'svelte/store';
|
||||||
import UploadIcon from './icons/UploadIcon.svelte';
|
import UploadIcon from './icons/UploadIcon.svelte';
|
||||||
import type { SvelteComponent } from 'svelte';
|
import type { SvelteComponent } from 'svelte';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type { Carta } from '@thetadev256/carta-md';
|
import type { Carta } from '@thetadev/carta-md';
|
||||||
import SpinnerIcon from './icons/SpinnerIcon.svelte';
|
import SpinnerIcon from './icons/SpinnerIcon.svelte';
|
||||||
import type { Writable } from 'svelte/store';
|
import type { Writable } from 'svelte/store';
|
||||||
import type { SvelteComponent } from 'svelte';
|
import type { SvelteComponent } from 'svelte';
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import type { Carta, Plugin, Listener } from '@thetadev256/carta-md';
|
import type { Carta, Plugin, Listener } from '@thetadev/carta-md';
|
||||||
import { get, writable, type Writable } from 'svelte/store';
|
import { get, writable, type Writable } from 'svelte/store';
|
||||||
import type { SvelteComponent } from 'svelte';
|
import type { SvelteComponent } from 'svelte';
|
||||||
import DropOverlay from './DropOverlay.svelte';
|
import DropOverlay from './DropOverlay.svelte';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { attachment } from '$lib';
|
import { attachment } from '$lib';
|
||||||
import { Carta, MarkdownEditor } from '@thetadev256/carta-md';
|
import { Carta, MarkdownEditor } from '@thetadev/carta-md';
|
||||||
|
|
||||||
import 'carta-md/default.css';
|
import 'carta-md/default.css';
|
||||||
import '$lib/default.css';
|
import '$lib/default.css';
|
||||||
|
|
|
@ -42,7 +42,7 @@ It is no longer possible to specify a custom highlighter in this plugin. However
|
||||||
|
|
||||||
```svelte
|
```svelte
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Carta, MarkdownEditor } from '@thetadev256/carta-md';
|
import { Carta, MarkdownEditor } from '@thetadev/carta-md';
|
||||||
import { code } from '@cartamd/plugin-code';
|
import { code } from '@cartamd/plugin-code';
|
||||||
|
|
||||||
const carta = new Carta({
|
const carta = new Carta({
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
"typescript-cp": "^0.1.8"
|
"typescript-cp": "^0.1.8"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@thetadev256/carta-md": "^4.0.0"
|
"@thetadev/carta-md": "^4.0.0"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"dist"
|
"dist"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import type { DualTheme, Theme, Plugin } from '@thetadev256/carta-md';
|
import type { DualTheme, Theme, Plugin } from '@thetadev/carta-md';
|
||||||
import type { RehypeShikiOptions } from '@shikijs/rehype';
|
import type { RehypeShikiOptions } from '@shikijs/rehype';
|
||||||
import rehypeShikiFromHighlighter from '@shikijs/rehype/core';
|
import rehypeShikiFromHighlighter from '@shikijs/rehype/core';
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ import '@cartamd/plugin-emoji/default.css';
|
||||||
|
|
||||||
```svelte
|
```svelte
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Carta, MarkdownEditor } from '@thetadev256/carta-md';
|
import { Carta, MarkdownEditor } from '@thetadev/carta-md';
|
||||||
import { emoji } from '@cartamd/plugin-emoji';
|
import { emoji } from '@cartamd/plugin-emoji';
|
||||||
|
|
||||||
const carta = new Carta({
|
const carta = new Carta({
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
"remark-gemoji": "^8.0.0"
|
"remark-gemoji": "^8.0.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@thetadev256/carta-md": "^4.0.0",
|
"@thetadev/carta-md": "^4.0.0",
|
||||||
"svelte": "^3.54.0 || ^4.0.0"
|
"svelte": "^3.54.0 || ^4.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type { Carta } from '@thetadev256/carta-md';
|
import type { Carta } from '@thetadev/carta-md';
|
||||||
import { onDestroy, onMount } from 'svelte';
|
import { onDestroy, onMount } from 'svelte';
|
||||||
import nodeEmoji from 'node-emoji';
|
import nodeEmoji from 'node-emoji';
|
||||||
import type { TransitionConfig } from 'svelte/transition';
|
import type { TransitionConfig } from 'svelte/transition';
|
||||||
|
|
|
@ -3,7 +3,7 @@ import type {
|
||||||
ExtensionComponent,
|
ExtensionComponent,
|
||||||
GrammarRule,
|
GrammarRule,
|
||||||
HighlightingRule
|
HighlightingRule
|
||||||
} from '@thetadev256/carta-md';
|
} from '@thetadev/carta-md';
|
||||||
import remarkGemoji from 'remark-gemoji';
|
import remarkGemoji from 'remark-gemoji';
|
||||||
import { fade, scale, type TransitionConfig } from 'svelte/transition';
|
import { fade, scale, type TransitionConfig } from 'svelte/transition';
|
||||||
import Emoji from './Emoji.svelte';
|
import Emoji from './Emoji.svelte';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Carta, MarkdownEditor } from '@thetadev256/carta-md';
|
import { Carta, MarkdownEditor } from '@thetadev/carta-md';
|
||||||
import { emoji } from '$lib';
|
import { emoji } from '$lib';
|
||||||
import 'carta-md/default.css';
|
import 'carta-md/default.css';
|
||||||
import '$lib/default.css';
|
import '$lib/default.css';
|
||||||
|
|
|
@ -38,7 +38,7 @@ or by using a content delivery network:
|
||||||
|
|
||||||
```svelte
|
```svelte
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Carta, MarkdownEditor } from '@thetadev256/carta-md';
|
import { Carta, MarkdownEditor } from '@thetadev/carta-md';
|
||||||
import { math } from '@cartamd/plugin-math';
|
import { math } from '@cartamd/plugin-math';
|
||||||
|
|
||||||
const carta = new Carta({
|
const carta = new Carta({
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
"typescript": "^5.0.4"
|
"typescript": "^5.0.4"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@thetadev256/carta-md": "^4.0.0"
|
"@thetadev/carta-md": "^4.0.0"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"dist"
|
"dist"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import type { Plugin } from '@thetadev256/carta-md';
|
import type { Plugin } from '@thetadev/carta-md';
|
||||||
import remarkMath, { type Options as RemarkMathOptions } from 'remark-math';
|
import remarkMath, { type Options as RemarkMathOptions } from 'remark-math';
|
||||||
import rehypeKatex, { type Options as RehypeKatexOptions } from 'rehype-katex';
|
import rehypeKatex, { type Options as RehypeKatexOptions } from 'rehype-katex';
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ import '@cartamd/plugin-slash/default.css';
|
||||||
|
|
||||||
```svelte
|
```svelte
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Carta, MarkdownEditor } from '@thetadev256/carta-md';
|
import { Carta, MarkdownEditor } from '@thetadev/carta-md';
|
||||||
import { slash } from '@cartamd/plugin-slash';
|
import { slash } from '@cartamd/plugin-slash';
|
||||||
|
|
||||||
const carta = new Carta({
|
const carta = new Carta({
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
"bezier-easing": "^2.1.0"
|
"bezier-easing": "^2.1.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@thetadev256/carta-md": "^4.0.0",
|
"@thetadev/carta-md": "^4.0.0",
|
||||||
"svelte": "^3.54.0 || ^4.0.0"
|
"svelte": "^3.54.0 || ^4.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type { Carta } from '@thetadev256/carta-md';
|
import type { Carta } from '@thetadev/carta-md';
|
||||||
import type { SlashSnippet } from './snippets';
|
import type { SlashSnippet } from './snippets';
|
||||||
import type { TransitionConfig } from 'svelte/transition';
|
import type { TransitionConfig } from 'svelte/transition';
|
||||||
import { onDestroy, onMount } from 'svelte';
|
import { onDestroy, onMount } from 'svelte';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { fade, scale, type TransitionConfig } from 'svelte/transition';
|
import { fade, scale, type TransitionConfig } from 'svelte/transition';
|
||||||
import SlashComponent from './Slash.svelte';
|
import SlashComponent from './Slash.svelte';
|
||||||
import type { Plugin, ExtensionComponent } from '@thetadev256/carta-md';
|
import type { Plugin, ExtensionComponent } from '@thetadev/carta-md';
|
||||||
import BezierEasing from 'bezier-easing';
|
import BezierEasing from 'bezier-easing';
|
||||||
import { defaultSnippets, type DefaultSnippetId, type SlashSnippet } from './snippets';
|
import { defaultSnippets, type DefaultSnippetId, type SlashSnippet } from './snippets';
|
||||||
export * from './default.css?inline';
|
export * from './default.css?inline';
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import type { InputEnhancer } from '@thetadev256/carta-md';
|
import type { InputEnhancer } from '@thetadev/carta-md';
|
||||||
|
|
||||||
export interface SlashSnippet {
|
export interface SlashSnippet {
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Carta, MarkdownEditor } from '@thetadev256/carta-md';
|
import { Carta, MarkdownEditor } from '@thetadev/carta-md';
|
||||||
import { slash } from '$lib';
|
import { slash } from '$lib';
|
||||||
import 'carta-md/default.css';
|
import 'carta-md/default.css';
|
||||||
import '$lib/default.css';
|
import '$lib/default.css';
|
||||||
|
|
|
@ -16,7 +16,7 @@ npm i @cartamd/plugin-tikz
|
||||||
|
|
||||||
```svelte
|
```svelte
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Carta, MarkdownEditor } from '@thetadev256/carta-md';
|
import { Carta, MarkdownEditor } from '@thetadev/carta-md';
|
||||||
import { tikz } from '@cartamd/plugin-tikz';
|
import { tikz } from '@cartamd/plugin-tikz';
|
||||||
|
|
||||||
import '@cartamd/plugin-tikz/fonts.css';
|
import '@cartamd/plugin-tikz/fonts.css';
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
"vite-raw-plugin": "^1.0.2"
|
"vite-raw-plugin": "^1.0.2"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@thetadev256/carta-md": "^4.0.0"
|
"@thetadev/carta-md": "^4.0.0"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"dist"
|
"dist"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import type { Carta, Event, Plugin } from '@thetadev256/carta-md';
|
import type { Carta, Event, Plugin } from '@thetadev/carta-md';
|
||||||
import type { Plugin as UnifiedPlugin } from 'unified';
|
import type { Plugin as UnifiedPlugin } from 'unified';
|
||||||
import { visit, SKIP } from 'unist-util-visit';
|
import { visit, SKIP } from 'unist-util-visit';
|
||||||
import { fromDom } from 'hast-util-from-dom';
|
import { fromDom } from 'hast-util-from-dom';
|
||||||
|
|
|
@ -211,9 +211,6 @@ importers:
|
||||||
|
|
||||||
packages/plugin-anchor:
|
packages/plugin-anchor:
|
||||||
dependencies:
|
dependencies:
|
||||||
carta-md:
|
|
||||||
specifier: ^4.0.0
|
|
||||||
version: 4.0.2(svelte@4.2.2)
|
|
||||||
rehype-autolink-headings:
|
rehype-autolink-headings:
|
||||||
specifier: ^7.1.0
|
specifier: ^7.1.0
|
||||||
version: 7.1.0
|
version: 7.1.0
|
||||||
|
@ -259,10 +256,6 @@ importers:
|
||||||
version: 5.1.6(@types/node@18.16.3)(sass@1.69.5)
|
version: 5.1.6(@types/node@18.16.3)(sass@1.69.5)
|
||||||
|
|
||||||
packages/plugin-attachment:
|
packages/plugin-attachment:
|
||||||
dependencies:
|
|
||||||
carta-md:
|
|
||||||
specifier: ^4.0.0
|
|
||||||
version: 4.0.2(svelte@4.2.12)
|
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@sveltejs/adapter-auto':
|
'@sveltejs/adapter-auto':
|
||||||
specifier: ^3.1.1
|
specifier: ^3.1.1
|
||||||
|
@ -309,9 +302,6 @@ importers:
|
||||||
'@shikijs/rehype':
|
'@shikijs/rehype':
|
||||||
specifier: ^1.4.0
|
specifier: ^1.4.0
|
||||||
version: 1.4.0
|
version: 1.4.0
|
||||||
carta-md:
|
|
||||||
specifier: ^4.0.0
|
|
||||||
version: 4.0.2(svelte@4.2.12)
|
|
||||||
unified:
|
unified:
|
||||||
specifier: ^11.0.4
|
specifier: ^11.0.4
|
||||||
version: 11.0.4
|
version: 11.0.4
|
||||||
|
@ -334,9 +324,6 @@ importers:
|
||||||
bezier-easing:
|
bezier-easing:
|
||||||
specifier: ^2.1.0
|
specifier: ^2.1.0
|
||||||
version: 2.1.0
|
version: 2.1.0
|
||||||
carta-md:
|
|
||||||
specifier: ^4.0.0
|
|
||||||
version: 4.0.2(svelte@4.2.12)
|
|
||||||
node-emoji:
|
node-emoji:
|
||||||
specifier: ^1.11.0
|
specifier: ^1.11.0
|
||||||
version: 1.11.0
|
version: 1.11.0
|
||||||
|
@ -386,9 +373,6 @@ importers:
|
||||||
|
|
||||||
packages/plugin-math:
|
packages/plugin-math:
|
||||||
dependencies:
|
dependencies:
|
||||||
carta-md:
|
|
||||||
specifier: ^4.0.0
|
|
||||||
version: 4.0.2(svelte@4.2.12)
|
|
||||||
rehype-katex:
|
rehype-katex:
|
||||||
specifier: ^7.0.0
|
specifier: ^7.0.0
|
||||||
version: 7.0.0
|
version: 7.0.0
|
||||||
|
@ -408,9 +392,6 @@ importers:
|
||||||
bezier-easing:
|
bezier-easing:
|
||||||
specifier: ^2.1.0
|
specifier: ^2.1.0
|
||||||
version: 2.1.0
|
version: 2.1.0
|
||||||
carta-md:
|
|
||||||
specifier: ^4.0.0
|
|
||||||
version: 4.0.2(svelte@4.2.12)
|
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@sveltejs/adapter-auto':
|
'@sveltejs/adapter-auto':
|
||||||
specifier: ^3.1.1
|
specifier: ^3.1.1
|
||||||
|
@ -454,9 +435,6 @@ importers:
|
||||||
|
|
||||||
packages/plugin-tikz:
|
packages/plugin-tikz:
|
||||||
dependencies:
|
dependencies:
|
||||||
carta-md:
|
|
||||||
specifier: ^4.0.0
|
|
||||||
version: 4.0.2(svelte@4.2.12)
|
|
||||||
hast-util-from-dom:
|
hast-util-from-dom:
|
||||||
specifier: ^5.0.0
|
specifier: ^5.0.0
|
||||||
version: 5.0.0
|
version: 5.0.0
|
||||||
|
@ -2332,38 +2310,6 @@ packages:
|
||||||
redeyed: 2.1.1
|
redeyed: 2.1.1
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/carta-md@4.0.2(svelte@4.2.12):
|
|
||||||
resolution: {integrity: sha512-wMlw0r5RZiVwvF3dyxE/vHj9pXlXbzpijJ3m/o9zqZe7Cf6D96AjyBHBpa0A0OPj/uEJVF3k0R6ctopBJCpCQg==}
|
|
||||||
peerDependencies:
|
|
||||||
svelte: ^3.54.0 || ^4.0.0
|
|
||||||
dependencies:
|
|
||||||
rehype-stringify: 10.0.0
|
|
||||||
remark-gfm: 4.0.0
|
|
||||||
remark-parse: 11.0.0
|
|
||||||
remark-rehype: 11.1.0
|
|
||||||
shiki: 1.4.0
|
|
||||||
svelte: 4.2.12
|
|
||||||
unified: 11.0.4
|
|
||||||
transitivePeerDependencies:
|
|
||||||
- supports-color
|
|
||||||
dev: false
|
|
||||||
|
|
||||||
/carta-md@4.0.2(svelte@4.2.2):
|
|
||||||
resolution: {integrity: sha512-wMlw0r5RZiVwvF3dyxE/vHj9pXlXbzpijJ3m/o9zqZe7Cf6D96AjyBHBpa0A0OPj/uEJVF3k0R6ctopBJCpCQg==}
|
|
||||||
peerDependencies:
|
|
||||||
svelte: ^3.54.0 || ^4.0.0
|
|
||||||
dependencies:
|
|
||||||
rehype-stringify: 10.0.0
|
|
||||||
remark-gfm: 4.0.0
|
|
||||||
remark-parse: 11.0.0
|
|
||||||
remark-rehype: 11.1.0
|
|
||||||
shiki: 1.4.0
|
|
||||||
svelte: 4.2.2
|
|
||||||
unified: 11.0.4
|
|
||||||
transitivePeerDependencies:
|
|
||||||
- supports-color
|
|
||||||
dev: false
|
|
||||||
|
|
||||||
/ccount@2.0.1:
|
/ccount@2.0.1:
|
||||||
resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==}
|
resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==}
|
||||||
dev: false
|
dev: false
|
||||||
|
|
|
@ -34,7 +34,7 @@ export const execAsync = (command, cwd = undefined, options = { showLog: false }
|
||||||
* List of all the packages.
|
* List of all the packages.
|
||||||
*/
|
*/
|
||||||
export const packages = [
|
export const packages = [
|
||||||
'@thetadev256/carta-md',
|
'@thetadev/carta-md',
|
||||||
'plugin-math',
|
'plugin-math',
|
||||||
'plugin-slash',
|
'plugin-slash',
|
||||||
'plugin-emoji',
|
'plugin-emoji',
|
||||||
|
|
Loading…
Reference in a new issue