Compare commits

...

No commits in common. "master" and "gh-pages" have entirely different histories.

615 changed files with 18216 additions and 22188 deletions

View file

@ -1,2 +0,0 @@
dist
.svelte-kit

View file

@ -1,34 +0,0 @@
{
"env": {
"node": true,
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:svelte/recommended"
],
"overrides": [
{
"files": ["*.svelte"],
"parser": "svelte-eslint-parser",
"parserOptions": {
"parser": "@typescript-eslint/parser"
}
}
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"extraFileExtensions": [".svelte"]
},
"plugins": ["@typescript-eslint"],
"rules": {
"no-mixed-spaces-and-tabs": 0
},
"settings": {
"svelte3/typescript": true
}
}

View file

@ -1,28 +0,0 @@
name: Code Quality
on: [push, pull_request]
permissions:
contents: read
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Install dependendencies
run: pnpm i
- name: Build project
run: pnpm run build
- name: Run lint
run: pnpm run lint
- name: Run check
run: pnpm run check

View file

@ -1,36 +0,0 @@
name: gh-pages
on:
push:
branches: ['master']
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Install dependencies
run: pnpm i
- name: Build packages
run: pnpm run build
- name: Build docs
run: pnpm run build
working-directory: docs
- name: Deploy pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build

View file

@ -1,60 +0,0 @@
name: Release
on:
push:
branches:
- master
permissions:
contents: read
jobs:
verify:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Install dependendencies
run: pnpm i
- name: Build project
run: pnpm run build
- name: Run lint
run: pnpm run lint
- name: Run check
run: pnpm run check
release:
needs: verify
name: Release
runs-on: ubuntu-latest
permissions:
id-token: write
issues: write
pull-requests: write
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Install dependendencies
run: pnpm i
- name: Build all packages
run: pnpm build
- name: Release
run: npm run publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

16
.gitignore vendored
View file

@ -1,16 +0,0 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
.eslintcache
.pnpm-debug.log
**/dist
**/tsconfig.tsbuildinfo
**/.rollup.cache

View file

@ -1,5 +0,0 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
npx lint-staged
pnpm run check

0
.nojekyll Normal file
View file

2
.npmrc
View file

@ -1,2 +0,0 @@
engine-strict=true
auto-install-peers=true

View file

@ -1,14 +0,0 @@
.DS_Store
node_modules
build
.svelte-kit
package
.env
.env.*
!.env.example
dist
# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
package-lock.json
yarn.lock

View file

@ -1,8 +0,0 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}

26
.vscode/settings.json vendored
View file

@ -1,26 +0,0 @@
{
"cSpell.words": [
"Carta",
"cartamd",
"coldark",
"dompurify",
"flexsearch",
"Gemoji",
"gruvbox",
"iconify",
"Katex",
"mdsvex",
"oldschool",
"rehype",
"shiki",
"shikijs",
"tikz",
"tikzjax",
"typeof"
],
"typescript.tsdk": "node_modules\\typescript\\lib",
"[svelte]": {
"editor.defaultFormatter": "svelte.svelte-vscode"
},
"css.customData": [".vscode/tailwind.json"]
}

55
.vscode/tailwind.json vendored
View file

@ -1,55 +0,0 @@
{
"version": 1.1,
"atDirectives": [
{
"name": "@tailwind",
"description": "Use the `@tailwind` directive to insert Tailwind's `base`, `components`, `utilities` and `screens` styles into your CSS.",
"references": [
{
"name": "Tailwind Documentation",
"url": "https://tailwindcss.com/docs/functions-and-directives#tailwind"
}
]
},
{
"name": "@apply",
"description": "Use the `@apply` directive to inline any existing utility classes into your own custom CSS. This is useful when you find a common utility pattern in your HTML that youd like to extract to a new component.",
"references": [
{
"name": "Tailwind Documentation",
"url": "https://tailwindcss.com/docs/functions-and-directives#apply"
}
]
},
{
"name": "@responsive",
"description": "You can generate responsive variants of your own classes by wrapping their definitions in the `@responsive` directive:\n```css\n@responsive {\n .alert {\n background-color: #E53E3E;\n }\n}\n```\n",
"references": [
{
"name": "Tailwind Documentation",
"url": "https://tailwindcss.com/docs/functions-and-directives#responsive"
}
]
},
{
"name": "@screen",
"description": "The `@screen` directive allows you to create media queries that reference your breakpoints by **name** instead of duplicating their values in your own CSS:\n```css\n@screen sm {\n /* ... */\n}\n```\n…gets transformed into this:\n```css\n@media (min-width: 640px) {\n /* ... */\n}\n```\n",
"references": [
{
"name": "Tailwind Documentation",
"url": "https://tailwindcss.com/docs/functions-and-directives#screen"
}
]
},
{
"name": "@variants",
"description": "Generate `hover`, `focus`, `active` and other **variants** of your own utilities by wrapping their definitions in the `@variants` directive:\n```css\n@variants hover, focus {\n .btn-brand {\n background-color: #3182CE;\n }\n}\n```\n",
"references": [
{
"name": "Tailwind Documentation",
"url": "https://tailwindcss.com/docs/functions-and-directives#variants"
}
]
}
]
}

21
LICENSE
View file

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2023 Davide Basso
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

169
README.md
View file

@ -1,169 +0,0 @@
<div align="right">
<a href="https://www.npmjs.com/package/carta-md">
<img src="https://img.shields.io/npm/v/carta-md?color=ff7cc6&labelColor=171d27&logo=npm&logoColor=white" alt="npm">
</a>
<a href="https://bundlephobia.com/package/carta-md">
<img src="https://img.shields.io/bundlephobia/min/carta-md?color=4dacfa&labelColor=171d27&logo=javascript&logoColor=white" alt="bundle">
</a>
<a href="https://github.com/BearToCode/carta/blob/master/LICENSE">
<img src="https://img.shields.io/npm/l/carta-md?color=71d58a&labelColor=171d27&logo=git&logoColor=white" alt="license">
</a>
<a href="http://beartocode.github.io/carta/">
<img src="https://img.shields.io/readthedocs/carta?logo=svelte&color=b581fd&logoColor=ffffff&labelColor=171d27" alt="docs">
</a>
</div>
[![Carta.png](https://i.postimg.cc/nV6DMXKM/Carta.png)](https://beartocode.github.io/carta/)
<h1 align="center"><strong>Carta</strong></h1>
<div align="center">Modern, lightweight, powerful Markdown Editor.</div>
<br />
<div align="center">
<a href="https://beartocode.github.io/carta/">📚 Documentation</a>
<span> · </span>
<a href="https://github.com/BearToCode/carta">GitHub</a>
</div>
<br>
# Introduction
> [!NOTE]
> Carta has recently been updated to `v4`, which features numerous major changes.
>
> Follow the [Migration Guide](http://beartocode.github.io/carta/migration) to update your project.
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.
## Features
- 🌈 Markdown syntax highlighting ([Shiki](https://shiki.style/));
- 🛠️ Toolbar (extensible);
- ⌨️ Keyboard **shortcuts** (extensible);
- 📦 Supports **[150+ plugins](https://github.com/remarkjs/remark/blob/main/doc/plugins.md#list-of-plugins)** thanks to remark;
- 🔀 Scroll sync;
- ✅ Accessibility friendly;
- 🖥️ **SSR** compatible;
- ⚗️ **KaTeX** support (plugin);
- 🔨 **Slash** commands (plugin);
- 😄 **Emojis**, with included search (plugin);
- ✏️ **TikZ** support (plugin);
- 📂 **Attachment** support (plugin);
- ⚓ **Anchor** links in headings (plugin);
- 🌈 Code blocks **syntax highlighting** (plugin).
## Packages
| Package | Status | Docs |
| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| [carta-md](https://www.npmjs.com/package/carta-md) | ![carta-md](https://img.shields.io/npm/v/carta-md) | [/](https://beartocode.github.io/carta/introduction) |
| [plugin-math](https://www.npmjs.com/package/@cartamd/plugin-math) | ![plugin-math](https://img.shields.io/npm/v/@cartamd/plugin-math) | [/plugins/math](https://beartocode.github.io/carta/plugins/math) |
| [plugin-code](https://www.npmjs.com/package/@cartamd/plugin-code) | ![plugin-code](https://img.shields.io/npm/v/@cartamd/plugin-code) | [/plugins/code](https://beartocode.github.io/carta/plugins/code) |
| [plugin-emoji](https://www.npmjs.com/package/@cartamd/plugin-emoji) | ![plugin-emoji](https://img.shields.io/npm/v/@cartamd/plugin-emoji) | [/plugins/emoji](https://beartocode.github.io/carta/plugins/emoji) |
| [plugin-slash](https://www.npmjs.com/package/@cartamd/plugin-slash) | ![plugin-slash](https://img.shields.io/npm/v/@cartamd/plugin-slash) | [/plugins/slash](https://beartocode.github.io/carta/plugins/slash) |
| [plugin-tikz](https://www.npmjs.com/package/@cartamd/plugin-tikz) | ![plugin-tikz](https://img.shields.io/npm/v/@cartamd/plugin-tikz) | [/plugins/tikz](https://beartocode.github.io/carta/plugins/tikz) |
| [plugin-attachment](https://www.npmjs.com/package/@cartamd/plugin-attachment) | ![plugin-attachment](https://img.shields.io/npm/v/@cartamd/plugin-attachment) | [/plugins/attachment](https://beartocode.github.io/carta/plugins/attachment) |
| [plugin-anchor](https://www.npmjs.com/package/@cartamd/plugin-anchor) | ![plugin-anchor](https://img.shields.io/npm/v/@cartamd/plugin-anchor) | [/plugins/anchor](https://beartocode.github.io/carta/plugins/anchor) |
## Community plugins
| Plugin | Description |
| ----------------------------------------------------------------------------- | ---------------------------------- |
| [carta-plugin-video](https://github.com/maisonsmd/carta-plugin-video) | Render online videos |
| [carta-plugin-imsize](https://github.com/maisonsmd/carta-plugin-imsize) | Render images in specific sizes |
| [carta-plugin-subscript](https://github.com/maisonsmd/carta-plugin-subscript) | Render subscripts and superscripts |
| [carta-plugin-ins-del](https://github.com/maisonsmd/carta-plugin-ins-del) | `<ins>` and `<del>` tags support |
# Getting started
> [!WARNING]
> Sanitization is not dealt with by Carta. You need to provide a `sanitizer` in the options.
> Common sanitizers are [isomorphic-dompurify](https://www.npmjs.com/package/isomorphic-dompurify) (suggested) and [sanitize-html](https://www.npmjs.com/package/sanitize-html).
> Checkout the documentation for an example.
## Installation
Core package:
```
npm i carta-md
```
Plugins:
```
npm i @cartamd/plugin-name
```
## Basic configuration
```svelte
<script lang="ts">
import { Carta, MarkdownEditor } from 'carta-md';
// Component default theme
import 'carta-md/default.css';
const carta = new Carta({
// Remember to use a sanitizer to prevent XSS attacks
// sanitizer: mySanitizer
});
</script>
<MarkdownEditor {carta} />
<style>
/* Or in global stylesheet */
/* Set your custom monospace font */
:global(.carta-font-code) {
font-family: '...', monospace;
font-size: 1.1rem;
}
</style>
```
# Documentation
For the full documentation, examples, guides and more checkout the [website](https://beartocode.github.io/carta/).
- [Introduction](https://beartocode.github.io/carta/introduction)
- [Examples](https://beartocode.github.io/carta/examples)
- [Getting Started](https://beartocode.github.io/carta/getting-started)
- [Editing Styles](https://beartocode.github.io/carta/editing-styles)
- Plugins:
- [Math](https://beartocode.github.io/carta/plugins/math)
- [Code](https://beartocode.github.io/carta/plugins/code)
- [Emoji](https://beartocode.github.io/carta/plugins/emoji)
- [Slash](https://beartocode.github.io/carta/plugins/slash)
- [TikZ](https://beartocode.github.io/carta/plugins/tikz)
- [Attachment](https://beartocode.github.io/carta/plugins/attachment)
- [Anchor](https://beartocode.github.io/carta/plugins/anchor)
- API:
- [Utilities](https://beartocode.github.io/carta/api/utilities)
- [Core](https://beartocode.github.io/carta/api/core)
- [Extension](https://beartocode.github.io/carta/api/extension)
# Contributing & Development
Every contribution is well accepted. If you have a feature request you can open a new issue.
This package uses a [pnpm workspace](https://pnpm.io/workspaces), so pnpm is required to download and put everything together properly.
### Committing
This repository is [commitizen](https://github.com/commitizen/cz-cli) friendly. To commit use:
```
npm run commit
# or, if you have commitizen installed globally
git cz
```
### Running docs
If you want to preview the docs:
```
cd docs
npm run dev
```

1
_app/env.js Normal file
View file

@ -0,0 +1 @@
export const env={}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
.markdown .plugin-link>h1,.markdown .plugin-link>h2,.markdown .plugin-link>h3{margin-top:0;margin-bottom:0}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
.carta-renderer.svelte-r6n2gn{position:relative;word-wrap:break-word;word-break:break-word}.carta-input.svelte-3mukqg{position:relative}.carta-input-wrapper.svelte-3mukqg{height:100%;position:relative;font-family:monospace}textarea.svelte-3mukqg{position:relative;width:100%;max-width:100%;min-height:100%;overflow-y:hidden;resize:none;padding:0;margin:0;border:0;color:transparent;background:transparent;outline:none;-moz-tab-size:4;-o-tab-size:4;tab-size:4}.carta-highlight.svelte-3mukqg{position:absolute;left:0;right:0;top:0;bottom:0;margin:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;height:-moz-fit-content;height:fit-content;padding:inherit;margin:inherit;word-wrap:break-word;white-space:pre-wrap;word-break:break-word}.carta-highlight .shiki{margin:0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;background-color:transparent!important}.carta-highlight *{font-family:inherit;font-size:inherit;word-wrap:break-word;white-space:pre-wrap;word-break:break-word}#editor-unfocus-suggestion.svelte-3mukqg{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.carta-toolbar.svelte-1c77udu{height:2rem;display:flex;flex-shrink:0;overflow-x:auto;overflow-y:hidden}.carta-toolbar-left.svelte-1c77udu{display:flex;align-items:center;flex-wrap:nowrap;height:100%}.carta-filler.svelte-1c77udu{flex:1}.carta-toolbar-right.svelte-1c77udu{height:100%;display:flex;align-items:center;justify-content:flex-end}.carta-icon.svelte-1c77udu{display:flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;border-radius:3px;cursor:pointer;margin-left:4px}.carta-icon-full.svelte-1c77udu{display:flex;align-items:center;border-radius:3px;cursor:pointer}.carta-icons-menu.svelte-1c77udu{position:absolute;top:100%;right:0;display:flex;flex-direction:column;margin-right:.5rem;z-index:1}.carta-editor.svelte-11jlii3{position:relative;display:flex;flex-direction:column}.carta-container.mode-split>*{width:50%}.carta-container.mode-tabs>*{width:100%}.carta-container.svelte-11jlii3{display:flex;position:relative}

View file

@ -0,0 +1 @@
.carta-renderer.svelte-r6n2gn{position:relative;word-wrap:break-word;word-break:break-word}.carta-input.svelte-3mukqg{position:relative}.carta-input-wrapper.svelte-3mukqg{height:100%;position:relative;font-family:monospace}textarea.svelte-3mukqg{position:relative;width:100%;max-width:100%;min-height:100%;overflow-y:hidden;resize:none;padding:0;margin:0;border:0;color:transparent;background:transparent;outline:none;-moz-tab-size:4;-o-tab-size:4;tab-size:4}.carta-highlight.svelte-3mukqg{position:absolute;inset:0;margin:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;height:-moz-fit-content;height:fit-content;padding:inherit;margin:inherit;word-wrap:break-word;white-space:pre-wrap;word-break:break-word}.carta-highlight .shiki{margin:0;-moz-tab-size:4;-o-tab-size:4;tab-size:4;background-color:transparent!important}.carta-highlight *{font-family:inherit;font-size:inherit;word-wrap:break-word;white-space:pre-wrap;word-break:break-word}#editor-unfocus-suggestion.svelte-3mukqg{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.carta-toolbar.svelte-1c77udu{height:2rem;display:flex;flex-shrink:0;overflow-x:auto;overflow-y:hidden}.carta-toolbar-left.svelte-1c77udu{display:flex;align-items:center;flex-wrap:nowrap;height:100%}.carta-filler.svelte-1c77udu{flex:1}.carta-toolbar-right.svelte-1c77udu{height:100%;display:flex;align-items:center;justify-content:flex-end}.carta-icon.svelte-1c77udu{display:flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;border-radius:3px;cursor:pointer;margin-left:4px}.carta-icon-full.svelte-1c77udu{display:flex;align-items:center;border-radius:3px;cursor:pointer}.carta-icons-menu.svelte-1c77udu{position:absolute;top:100%;right:0;display:flex;flex-direction:column;margin-right:.5rem;z-index:1}.carta-editor.svelte-11jlii3{position:relative;display:flex;flex-direction:column}.carta-container.mode-split>*{width:50%}.carta-container.mode-tabs>*{width:100%}.carta-container.svelte-11jlii3{display:flex;position:relative}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
import{s as v,r as b,e as d,a as g,c as p,b as y,g as T,l as C,f as h,p as _,i as k,h as m,u as $,v as q,w,x,y as H}from"./scheduler.DKiYiPX0.js";import{S as L,i as M,t as S,b as B}from"./index.z4bt_ZBS.js";function D(i){let e,r,a,c='<iconify-icon icon="octicon:copy-16" class="p-2 text-lg"></iconify-icon>',n,u,f;const l=i[2].default,s=b(l,i,i[1],null);return{c(){e=d("div"),s&&s.c(),r=g(),a=d("button"),a.innerHTML=c,this.h()},l(t){e=p(t,"DIV",{class:!0});var o=y(e);s&&s.l(o),r=T(o),a=p(o,"BUTTON",{title:!0,class:!0,"data-svelte-h":!0}),C(a)!=="svelte-ms5nns"&&(a.innerHTML=c),o.forEach(h),this.h()},h(){_(a,"title","Copy"),_(a,"class","absolute right-4 top-[min(50%_,_32px)] aspect-square -translate-y-1/2 transform rounded hover:bg-neutral-800 hover:text-neutral-300 active:text-sky-300 "),_(e,"class","relative")},m(t,o){k(t,e,o),s&&s.m(e,null),m(e,r),m(e,a),i[4](e),n=!0,u||(f=$(a,"click",i[3]),u=!0)},p(t,[o]){s&&s.p&&(!n||o&2)&&q(s,l,t,t[1],n?x(l,t[1],o,null):w(t[1]),null)},i(t){n||(S(s,t),n=!0)},o(t){B(s,t),n=!1},d(t){t&&h(e),s&&s.d(t),i[4](null),u=!1,f()}}}function E(i,e,r){let{$$slots:a={},$$scope:c}=e,n;const u=()=>{navigator.clipboard.writeText(n.innerText)};function f(l){H[l?"unshift":"push"](()=>{n=l,r(0,n)})}return i.$$set=l=>{"$$scope"in l&&r(1,c=l.$$scope)},[n,c,a,u,f]}class O extends L{constructor(e){super(),M(this,e,E,D,v,{})}}export{O as C};

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
function e(n){return(n==null?void 0:n.length)!==void 0?n:Array.from(n)}var f=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function d(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}export{f as c,e,d as g};

View file

@ -0,0 +1,816 @@
const n=Object.freeze({displayName:"ABAP",fileTypes:["abap","ABAP"],foldingStartMarker:"/\\*\\*|\\{\\s*$",foldingStopMarker:"\\*\\*/|^\\s*\\}",name:"abap",patterns:[{captures:{1:{name:"punctuation.definition.comment.abap"}},match:"^\\*.*\\n?",name:"comment.line.full.abap"},{captures:{1:{name:"punctuation.definition.comment.abap"}},match:'".*\\n?',name:"comment.line.partial.abap"},{match:"(?<![^\\s])##.*?(?=([\\.:,\\s]))",name:"comment.line.pragma.abap"},{match:"(?i)(?<=(?:\\s|~|-))(?<=(?:->|=>))([a-z_\\/][a-z_0-9\\/]*)(?=\\s+(?:=|\\+=|-=|\\*=|\\/=|&&=|&=)\\s+)",name:"variable.other.abap"},{match:"\\b[0-9]+(\\b|\\.|,)",name:"constant.numeric.abap"},{match:"(?ix)(^|\\s+)((PUBLIC|PRIVATE|PROTECTED)\\sSECTION)(?=\\s+|:|\\.)",name:"storage.modifier.class.abap"},{begin:"(?<!\\\\)(\\|)(.*?)",beginCaptures:{1:{name:"constant.character.escape.abap"}},end:"(?<!\\\\)(\\||(\\\\\\\\\\|))",endCaptures:{1:{name:"constant.character.escape.abap"}},name:"string.interpolated.abap",patterns:[{match:"({ )|( })",name:"constant.character.escape"},{match:"(?<={ ).*?(?= })",name:"variable.other.abap"},{match:"\\\\\\|",name:"constant.character.escape.abap"}]},{begin:"'",end:"'",name:"string.quoted.single.abap",patterns:[{match:"''",name:"constant.character.escape.abap"}]},{begin:"`",end:"`",name:"string.quoted.single.abap",patterns:[{match:"``",name:"constant.character.escape.abap"}]},{begin:"(?i)^\\s*(class)\\s([a-z_\\/][a-z_0-9\\/]*)",beginCaptures:{1:{name:"storage.type.block.abap"},2:{name:"entity.name.type.block.abap"}},end:"\\s*\\.\\s*\\n?",name:"meta.block.begin.implementation.abap",patterns:[{match:"(?ix)(^|\\s+)(definition|implementation|public|inheriting\\s+from|final|deferred|abstract|shared\\s+memory\\s+enabled|(global|local)*\\s*friends|(create\\s+(public|protected|private))|for\\s+behavior\\s+of|for\\s+testing|risk\\s+level\\s+(critical|dangerous|harmless))|duration\\s(short|medium|long)(?=\\s+|\\.)",name:"storage.modifier.class.abap"},{begin:"(?=[A-Za-z_][A-Za-z0-9_]*)",contentName:"entity.name.type.block.abap",end:"(?![A-Za-z0-9_])",patterns:[{include:"#generic_names"}]}]},{begin:"(?ix)^\\s*(method)\\s(?:([a-z_\\/][a-z_0-9\\/]*)~)?([a-z_\\/][a-z_0-9\\/]*)",beginCaptures:{1:{name:"storage.type.block.abap"},2:{name:"entity.name.type.abap"},3:{name:"entity.name.function.abap"}},end:"\\s*\\.\\s*\\n?",patterns:[{match:"(?ix)(?<=^|\\s)(BY\\s+DATABASE(\\s+PROCEDURE|\\s+FUNCTION|\\s+GRAPH\\s+WORKSPACE)|BY\\s+KERNEL\\s+MODULE)(?=\\s+|\\.)",name:"storage.modifier.method.abap"},{match:"(?ix)(?<=^|\\s)(FOR\\s+(HDB|LLANG))(?=\\s+|\\.)",name:"storage.modifier.method.abap"},{match:"(?ix)(?<=\\s)(OPTIONS\\s+(READ-ONLY|DETERMINISTIC|SUPPRESS\\s+SYNTAX\\s+ERRORS))(?=\\s+|\\.)",name:"storage.modifier.method.abap"},{match:"(?ix)(?<=^|\\s)(LANGUAGE\\s+(SQLSCRIPT|SQL|GRAPH))(?=\\s+|\\.)",name:"storage.modifier.method.abap"},{captures:{1:{name:"storage.modifier.method.abap"}},match:"(?ix)(?<=\\s)(USING)\\s+([a-z_\\/][a-z_0-9\\/=\\>]*)+(?=\\s+|\\.)"},{begin:"(?=[A-Za-z_][A-Za-z0-9_]*)",end:"(?![A-Za-z0-9_])",patterns:[{include:"#generic_names"}]}]},{begin:"(?ix)^\\s*(INTERFACE)\\s([a-z_\\/][a-z_0-9\\/]*)",beginCaptures:{1:{name:"storage.type.block.abap"},2:{name:"entity.name.type.abap"}},end:"\\s*\\.\\s*\\n?",patterns:[{match:"(?ix)(?<=^|\\s)(DEFERRED|PUBLIC)(?=\\s+|\\.)",name:"storage.modifier.method.abap"}]},{begin:"(?ix)^\\s*(FORM)\\s([a-z_\\/][a-z_0-9\\/\\-\\?]*)",beginCaptures:{1:{name:"storage.type.block.abap"},2:{name:"entity.name.type.abap"}},end:"\\s*\\.\\s*\\n?",patterns:[{match:"(?ix)(?<=^|\\s)(USING|TABLES|CHANGING|RAISING|IMPLEMENTATION|DEFINITION)(?=\\s+|\\.)",name:"storage.modifier.form.abap"},{include:"#abaptypes"},{include:"#keywords_followed_by_braces"}]},{match:"(?i)(endclass|endmethod|endform|endinterface)",name:"storage.type.block.end.abap"},{match:"(?i)(<[A-Za-z_][A-Za-z0-9_]*>)",name:"variable.other.field.symbol.abap"},{include:"#keywords"},{include:"#abap_constants"},{include:"#reserved_names"},{include:"#operators"},{include:"#builtin_functions"},{include:"#abaptypes"},{include:"#system_fields"},{include:"#sql_functions"},{include:"#sql_types"}],repository:{abap_constants:{match:`(?ix)(?<=\\s)(initial|null|space|abap_true|abap_false|abap_undefined|table_line|
%_final|%_hints|%_predefined|col_background|col_group|col_heading|col_key|col_negative|col_normal|col_positive|col_total|
adabas|as400|db2|db6|hdb|oracle|sybase|mssqlnt|pos_low|pos_high)(?=\\s|\\.|,)`,name:"constant.language.abap"},abaptypes:{patterns:[{match:"(?ix)\\s(abap_bool|string|xstring|any|clike|csequence|numeric|xsequence|decfloat|decfloat16|decfloat34|utclong|simple|int8|c|n|i|p|f|d|t|x)(?=\\s|\\.|,)",name:"support.type.abap"},{match:"(?ix)\\s(TYPE|REF|TO|LIKE|LINE|OF|STRUCTURE|STANDARD|SORTED|HASHED|INDEX|TABLE|WITH|UNIQUE|NON-UNIQUE|SECONDARY|DEFAULT|KEY)(?=\\s|\\.|,)",name:"keyword.control.simple.abap"}]},arithmetic_operator:{match:"(?i)(?<=\\s)(\\+|\\-|\\*|\\*\\*|\\/|%|DIV|MOD|BIT-AND|BIT-OR|BIT-XOR|BIT-NOT)(?=\\s)",name:"keyword.control.simple.abap"},builtin_functions:{match:"(?ix)(?<=\\s)(abs|sign|ceil|floor|trunc|frac|acos|asin|atan|cos|sin|tan|cosh|sinh|tanh|exp|log|log10|sqrt|strlen|xstrlen|charlen|lines|numofchar|dbmaxlen|round|rescale|nmax|nmin|cmax|cmin|boolc|boolx|xsdbool|contains|contains_any_of|contains_any_not_of|matches|line_exists|ipow|char_off|count|count_any_of|count_any_not_of|distance|condense|concat_lines_of|escape|find|find_end|find_any_of|find_any_not_of|insert|match|repeat|replace|reverse|segment|shift_left|shift_right|substring|substring_after|substring_from|substring_before|substring_to|to_upper|to_lower|to_mixed|from_mixed|translate|bit-set|line_index)(?=\\()",name:"entity.name.function.builtin.abap"},comparison_operator:{match:"(?i)(?<=\\s)(<|>|<\\=|>\\=|\\=|<>|eq|ne|lt|le|gt|ge|cs|cp|co|cn|ca|na|ns|np|byte-co|byte-cn|byte-ca|byte-na|byte-cs|byte-ns|o|z|m)(?=\\s)",name:"keyword.control.simple.abap"},control_keywords:{match:`(?ix)(^|\\s)(
at|case|catch|continue|do|elseif|else|endat|endcase|endcatch|enddo|endif|
endloop|endon|endtry|endwhile|if|loop|on|raise|try|while)(?=\\s|\\.|:)`,name:"keyword.control.flow.abap"},generic_names:{match:"[A-Za-z_][A-Za-z0-9_]*"},keywords:{patterns:[{include:"#main_keywords"},{include:"#text_symbols"},{include:"#control_keywords"},{include:"#keywords_followed_by_braces"}]},keywords_followed_by_braces:{captures:{1:{name:"keyword.control.simple.abap"},2:{name:"variable.other.abap"}},match:"(?ix)\\b(data|value|field-symbol|final|reference|resumable)\\((<?[a-z_\\/][a-z_0-9\\/]*>?)\\)"},logical_operator:{match:"(?i)(?<=\\s)(not|or|and)(?=\\s)",name:"keyword.control.simple.abap"},main_keywords:{match:`(?ix)(?<=^|\\s)(
abap-source|
abstract|
accept|
accepting|
access|
according|
action|
activation|
actual|
add|
add-corresponding|
adjacent|
alias|
aliases|
align|
all|
allocate|
alpha|
amdp|
analysis|
analyzer|
append|
appending|
application|
archive|
area|
arithmetic|
as|
ascending|
assert|
assign|
assigned|
assigning|
association|
asynchronous|
at|
attributes|
authority|
authority-check|
authorization|
auto|
back|
background|
backward|
badi|
base|
before|
begin|
behavior|
between|
binary|
bit|
blank|
blanks|
block|
blocks|
bound|
boundaries|
bounds|
boxed|
break|
break-point|
buffer|
by|
bypassing|
byte|
byte-order|
call|
calling|
cast|
casting|
cds|
center|
centered|
change|
changing|
channels|
char-to-hex|
character|
check|
checkbox|
cid|
circular|
class|
class-data|
class-events|
class-method|
class-methods|
class-pool|
cleanup|
clear|
client|
clients|
clock|
clone|
close|
cnt|
code|
collect|
color|
column|
comment|
comments|
commit|
common|
communication|
comparing|
component|
components|
compression|
compute|
concatenate|
cond|
condense|
condition|
connection|
constant|
constants|
context|
contexts|
control|
controls|
conv|
conversion|
convert|
copy|
corresponding|
count|
country|
cover|
create|
currency|
current|
cursor|
customer-function|
data|
database|
datainfo|
dataset|
date|
daylight|
ddl|
deallocate|
decimals|
declarations|
deep|
default|
deferred|
define|
delete|
deleting|
demand|
descending|
describe|
destination|
detail|
determine|
dialog|
did|
directory|
discarding|
display|
display-mode|
distance|
distinct|
divide|
divide-corresponding|
dummy|
duplicate|
duplicates|
duration|
during|
dynpro|
edit|
editor-call|
empty|
enabled|
enabling|
encoding|
end|
end-enhancement-section|
end-of-definition|
end-of-page|
end-of-selection|
end-test-injection|
end-test-seam|
endenhancement|
endexec|
endfunction|
endian|
ending|
endmodule|
endprovide|
endselect|
endwith|
engineering|
enhancement|
enhancement-point|
enhancement-section|
enhancements|
entities|
entity|
entries|
entry|
enum|
environment|
equiv|
errors|
escape|
escaping|
event|
events|
exact|
except|
exception|
exception-table|
exceptions|
excluding|
exec|
execute|
exists|
exit|
exit-command|
expanding|
explicit|
exponent|
export|
exporting|
extended|
extension|
extract|
fail|
failed|
features|
fetch|
field|
field-groups|
field-symbols|
fields|
file|
fill|
filter|
filters|
final|
find|
first|
first-line|
fixed-point|
flush|
following|
for|
format|
forward|
found|
frame|
frames|
free|
from|
full|
function|
function-pool|
generate|
get|
giving|
graph|
group|
groups|
handle|
handler|
hashed|
having|
header|
headers|
heading|
help-id|
help-request|
hide|
hint|
hold|
hotspot|
icon|
id|
identification|
identifier|
ignore|
ignoring|
immediately|
implemented|
implicit|
import|
importing|
in|
inactive|
incl|
include|
includes|
increment|
index|
index-line|
indicators|
infotypes|
inheriting|
init|
initial|
initialization|
inner|
input|
insert|
instance|
instances|
intensified|
interface|
interface-pool|
interfaces|
internal|
intervals|
into|
inverse|
inverted-date|
is|
iso|
job|
join|
keep|
keeping|
kernel|
key|
keys|
keywords|
kind|
language|
last|
late|
layout|
leading|
leave|
left|
left-justified|
leftplus|
leftspace|
legacy|
length|
let|
level|
levels|
like|
line|
line-count|
line-selection|
line-size|
linefeed|
lines|
link|
list|
list-processing|
listbox|
load|
load-of-program|
local|
locale|
lock|
locks|
log-point|
logical|
lower|
mapped|
mapping|
margin|
mark|
mask|
match|
matchcode|
maximum|
members|
memory|
mesh|
message|
message-id|
messages|
messaging|
method|
methods|
mode|
modif|
modifier|
modify|
module|
move|
move-corresponding|
multiply|
multiply-corresponding|
name|
nametab|
native|
nested|
nesting|
new|
new-line|
new-page|
new-section|
next|
no|
no-display|
no-extension|
no-gap|
no-gaps|
no-grouping|
no-heading|
no-scrolling|
no-sign|
no-title|
no-zero|
nodes|
non-unicode|
non-unique|
number|
object|
objects|
objmgr|
obligatory|
occurence|
occurences|
occurrence|
occurrences|
occurs|
of|
offset|
on|
only|
open|
optional|
option|
options|
order|
others|
out|
outer|
output|
output-length|
overflow|
overlay|
pack|
package|
pad|
padding|
page|
parameter|
parameter-table|
parameters|
part|
partially|
pcre|
perform|
performing|
permissions|
pf-status|
places|
pool|
position|
pragmas|
preceeding|
precompiled|
preferred|
preserving|
primary|
print|
print-control|
private|
privileged|
procedure|
program|
property|
protected|
provide|
push|
pushbutton|
put|
query|
queue-only|
queueonly|
quickinfo|
radiobutton|
raising|
range|
ranges|
read|
read-only|
receive|
received|
receiving|
redefinition|
reduce|
ref|
reference|
refresh|
regex|
reject|
renaming|
replace|
replacement|
replacing|
report|
reported|
request|
requested|
required|
reserve|
reset|
resolution|
respecting|
response|
restore|
result|
results|
resumable|
resume|
retry|
return|
returning|
right|
right-justified|
rightplus|
rightspace|
rollback|
rows|
rp-provide-from-last|
run|
sap|
sap-spool|
save|
saving|
scale_preserving|
scale_preserving_scientific|
scan|
scientific|
scientific_with_leading_zero|
screen|
scroll|
scroll-boundary|
scrolling|
search|
seconds|
section|
select|
select-options|
selection|
selection-screen|
selection-set|
selection-sets|
selection-table|
selections|
send|
separate|
separated|
session|
set|
shared|
shift|
shortdump|
shortdump-id|
sign|
sign_as_postfix|
simple|
simulation|
single|
size|
skip|
skipping|
smart|
some|
sort|
sortable|
sorted|
source|
specified|
split|
spool|
spots|
sql|
stable|
stamp|
standard|
start-of-selection|
starting|
state|
statement|
statements|
static|
statics|
statusinfo|
step|
step-loop|
stop|
structure|
structures|
style|
subkey|
submatches|
submit|
subroutine|
subscreen|
substring|
subtract|
subtract-corresponding|
suffix|
sum|
summary|
supplied|
supply|
suppress|
switch|
symbol|
syntax-check|
syntax-trace|
system-call|
system-exceptions|
tab|
tabbed|
table|
tables|
tableview|
tabstrip|
target|
task|
tasks|
test|
test-injection|
test-seam|
testing|
text|
textpool|
then|
throw|
time|
times|
timestamp|
timezone|
title|
titlebar|
to|
tokens|
top-lines|
top-of-page|
trace-file|
trace-table|
trailing|
transaction|
transfer|
transformation|
translate|
transporting|
trmac|
truncate|
truncation|
type|
type-pool|
type-pools|
types|
uline|
unassign|
unbounded|
under|
unicode|
union|
unique|
unit|
unix|
unpack|
until|
unwind|
up|
update|
upper|
user|
user-command|
using|
utf-8|
uuid|
valid|
validate|
value|
value-request|
values|
vary|
varying|
version|
via|
visible|
wait|
when|
where|
width|
window|
windows|
with|
with-heading|
with-title|
without|
word|
work|
workspace|
write|
xml|
xsd|
yes|
zero|
zone
)(?=\\s|\\.|:|,)`,name:"keyword.control.simple.abap"},operators:{patterns:[{include:"#other_operator"},{include:"#arithmetic_operator"},{include:"#comparison_operator"},{include:"#logical_operator"}]},other_operator:{match:"(?<=\\s)(&&|&|\\?=|\\+=|-=|\\/=|\\*=|&&=|&=)(?=\\s)",name:"keyword.control.simple.abap"},reserved_names:{match:"(?ix)(?<=\\s)(me|super)(?=\\s|\\.|,|->)",name:"constant.language.abap"},sql_functions:{match:`(?ix)(?<=\\s)(
abap_system_timezone|
abap_user_timezone|
abs|
add_days|
add_months|
allow_precision_loss|
as_geo_json|
avg|
bintohex|
cast|
ceil|
coalesce|
concat_with_space|
concat|
corr_spearman|
corr|
count|
currency_conversion|
datn_add_days|
datn_add_months|
datn_days_between|
dats_add_days|
dats_add_months|
dats_days_between|
dats_from_datn|
dats_is_valid|
dats_tims_to_tstmp|
dats_to_datn|
dayname|
days_between|
dense_rank|
division|
div|
extract_day|
extract_hour|
extract_minute|
extract_month|
extract_second|
extract_year|
first_value|
floor|
grouping|
hextobin|
initcap|
instr|
is_valid|
lag|
last_value|
lead|
left|
length|
like_regexpr|
locate_regexpr_after|
locate_regexpr|
locate|
lower|
lpad|
ltrim|
max|
median|
min|
mod|
monthname|
ntile|
occurrences_regexpr|
over|
product|
rank|
replace_regexpr|
replace|
rigth|
round|
row_number|
rpad|
rtrim|
stddev|
string_agg|
substring_regexpr|
substring|
sum|
tims_from_timn|
tims_is_valid|
tims_to_timn|
to_blob|
to_clob|
tstmp_add_seconds|
tstmp_current_utctimestamp|
tstmp_is_valid|
tstmp_seconds_between|
tstmp_to_dats|
tstmp_to_dst|
tstmp_to_tims|
tstmpl_from_utcl|
tstmpl_to_utcl|
unit_conversion|
upper|
utcl_add_seconds|
utcl_current|
utcl_seconds_between|
uuid|
var|
weekday
)(?=\\()`,name:"entity.name.function.sql.abap"},sql_types:{match:"(?ix)(?<=\\s)(char|clnt|cuky|curr|datn|dats|dec|decfloat16|decfloat34|fltp|int1|int2|int4|int8|lang|numc|quan|raw|sstring|timn|tims|unit|utclong)(?=\\s|\\(|\\))",name:"entity.name.type.sql.abap"},system_fields:{captures:{1:{name:"variable.language.abap"},2:{name:"variable.language.abap"}},match:"(?ix)\\b(sy)-(abcde|batch|binpt|calld|callr|colno|cpage|cprog|cucol|curow|datar|datlo|datum|dayst|dbcnt|dbnam|dbsysc|dyngr|dynnr|fdayw|fdpos|host|index|langu|ldbpg|lilli|linct|linno|linsz|lisel|listi|loopc|lsind|macol|mandt|marow|modno|msgid|msgli|msgno|msgty|msgv[1-4]|opsysc|pagno|pfkey|repid|saprl|scols|slset|spono|srows|staco|staro|stepl|subrc|sysid|tabix|tcode|tfill|timlo|title|tleng|tvar[0-9]|tzone|ucomm|uline|uname|uzeit|vline|wtitl|zonlo)(?=\\.|\\s)"},text_symbols:{captures:{1:{name:"keyword.control.simple.abap"},2:{name:"constant.numeric.abap"}},match:"(?ix)(?<=^|\\s)(text)-([A-Z0-9]{1,3})(?=\\s|\\.|:|,)"}},scopeName:"source.abap"});var e=[n];export{e as default};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,19 @@
import{s as ps,e as c,a as u,H as I,c as i,l as w,g as r,b as z,m as B,f as a,p as f,i as p,n as U}from"./scheduler.DKiYiPX0.js";import{S as ls,i as os,c as D,a as F,m as G,t as J,b as K,d as N}from"./index.z4bt_ZBS.js";import{C as Q}from"./Code.tlNrnEug.js";function cs(H){let t,l,k='<code class="language-undefined">npm i @cartamd/plugin-anchor</code>';return{c(){t=c("pre"),l=new I(!1),this.h()},l(e){t=i(e,"PRE",{class:!0});var o=z(t);l=B(o,!1),o.forEach(a),this.h()},h(){l.a=null,f(t,"class","language-undefined")},m(e,o){p(e,t,o),l.m(k,t)},p:U,d(e){e&&a(t)}}}function is(H){let t,l,k=`<code class="language-ts"><span class="token keyword">import</span> <span class="token string">'@cartamd/plugin-anchor/default.css'</span><span class="token punctuation">;</span></code>`;return{c(){t=c("pre"),l=new I(!1),this.h()},l(e){t=i(e,"PRE",{class:!0});var o=z(t);l=B(o,!1),o.forEach(a),this.h()},h(){l.a=null,f(t,"class","language-ts")},m(e,o){p(e,t,o),l.m(k,t)},p:U,d(e){e&&a(t)}}}function us(H){let t,l,k=`<code class="language-svelte"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>script</span><span class="token punctuation">></span></span><span class="token script"><span class="token language-javascript">
<span class="token keyword">import</span> <span class="token punctuation">&#123;</span> Carta<span class="token punctuation">,</span> MarkdownEditor <span class="token punctuation">&#125;</span> <span class="token keyword">from</span> <span class="token string">'carta-md'</span><span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token punctuation">&#123;</span> anchor <span class="token punctuation">&#125;</span> <span class="token keyword">from</span> <span class="token string">'@cartamd/plugin-anchor'</span><span class="token punctuation">;</span>
<span class="token keyword">const</span> carta <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Carta</span><span class="token punctuation">(</span><span class="token punctuation">&#123;</span>
<span class="token literal-property property">extensions</span><span class="token operator">:</span> <span class="token punctuation">[</span><span class="token function">anchor</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">]</span>
<span class="token punctuation">&#125;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>script</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>MarkdownEditor</span> <span class="token language-javascript"><span class="token punctuation">&#123;</span>carta<span class="token punctuation">&#125;</span></span> <span class="token punctuation">/></span></span></code>`;return{c(){t=c("pre"),l=new I(!1),this.h()},l(e){t=i(e,"PRE",{class:!0});var o=z(t);l=B(o,!1),o.forEach(a),this.h()},h(){l.a=null,f(t,"class","language-svelte")},m(e,o){p(e,t,o),l.m(k,t)},p:U,d(e){e&&a(t)}}}function rs(H){let t,l="This plugin adds <code>id</code> attributes and permalinks to headings.",k,e,o='<a href="#installation">Installation</a>',T,m,C,d,V='<a href="#setup">Setup</a>',L,h,W='<a href="#styles">Styles</a>',E,x,X="Import the default theme, or create you own:",P,_,b,$,Y='<a href="#extension">Extension</a>',S,g,A,v,Z='<a href="#options">Options</a>',O,y,ss="Here are the options you can pass to <code>anchor()</code>:",R,M,j,es=`<code class="language-ts"><span class="token keyword">export</span> <span class="token keyword">interface</span> <span class="token class-name">AnchorExtensionOptions</span> <span class="token punctuation">&#123;</span>
<span class="token comment">/**
* rehype-slug options.
*/</span>
slug<span class="token operator">?</span><span class="token operator">:</span> SlugOptions<span class="token punctuation">;</span>
<span class="token comment">/**
* rehype-autolink-headings options.
*/</span>
autolink<span class="token operator">?</span><span class="token operator">:</span> AutolinkOptions<span class="token punctuation">;</span>
<span class="token punctuation">&#125;</span></code>`,q;return m=new Q({props:{$$slots:{default:[cs]},$$scope:{ctx:H}}}),_=new Q({props:{$$slots:{default:[is]},$$scope:{ctx:H}}}),g=new Q({props:{$$slots:{default:[us]},$$scope:{ctx:H}}}),{c(){t=c("p"),t.innerHTML=l,k=u(),e=c("h2"),e.innerHTML=o,T=u(),D(m.$$.fragment),C=u(),d=c("h2"),d.innerHTML=V,L=u(),h=c("h3"),h.innerHTML=W,E=u(),x=c("p"),x.textContent=X,P=u(),D(_.$$.fragment),b=u(),$=c("h3"),$.innerHTML=Y,S=u(),D(g.$$.fragment),A=u(),v=c("h2"),v.innerHTML=Z,O=u(),y=c("p"),y.innerHTML=ss,R=u(),M=c("pre"),j=new I(!1),this.h()},l(s){t=i(s,"P",{"data-svelte-h":!0}),w(t)!=="svelte-19bb0fh"&&(t.innerHTML=l),k=r(s),e=i(s,"H2",{id:!0,"data-svelte-h":!0}),w(e)!=="svelte-18vig38"&&(e.innerHTML=o),T=r(s),F(m.$$.fragment,s),C=r(s),d=i(s,"H2",{id:!0,"data-svelte-h":!0}),w(d)!=="svelte-1uj9ei1"&&(d.innerHTML=V),L=r(s),h=i(s,"H3",{id:!0,"data-svelte-h":!0}),w(h)!=="svelte-1obsuhg"&&(h.innerHTML=W),E=r(s),x=i(s,"P",{"data-svelte-h":!0}),w(x)!=="svelte-udn1pg"&&(x.textContent=X),P=r(s),F(_.$$.fragment,s),b=r(s),$=i(s,"H3",{id:!0,"data-svelte-h":!0}),w($)!=="svelte-1h1d05d"&&($.innerHTML=Y),S=r(s),F(g.$$.fragment,s),A=r(s),v=i(s,"H2",{id:!0,"data-svelte-h":!0}),w(v)!=="svelte-qvxcr2"&&(v.innerHTML=Z),O=r(s),y=i(s,"P",{"data-svelte-h":!0}),w(y)!=="svelte-1lpaao5"&&(y.innerHTML=ss),R=r(s),M=i(s,"PRE",{class:!0});var n=z(M);j=B(n,!1),n.forEach(a),this.h()},h(){f(e,"id","installation"),f(d,"id","setup"),f(h,"id","styles"),f($,"id","extension"),f(v,"id","options"),j.a=null,f(M,"class","language-ts")},m(s,n){p(s,t,n),p(s,k,n),p(s,e,n),p(s,T,n),G(m,s,n),p(s,C,n),p(s,d,n),p(s,L,n),p(s,h,n),p(s,E,n),p(s,x,n),p(s,P,n),G(_,s,n),p(s,b,n),p(s,$,n),p(s,S,n),G(g,s,n),p(s,A,n),p(s,v,n),p(s,O,n),p(s,y,n),p(s,R,n),p(s,M,n),j.m(es,M),q=!0},p(s,[n]){const ts={};n&1&&(ts.$$scope={dirty:n,ctx:s}),m.$set(ts);const ns={};n&1&&(ns.$$scope={dirty:n,ctx:s}),_.$set(ns);const as={};n&1&&(as.$$scope={dirty:n,ctx:s}),g.$set(as)},i(s){q||(J(m.$$.fragment,s),J(_.$$.fragment,s),J(g.$$.fragment,s),q=!0)},o(s){K(m.$$.fragment,s),K(_.$$.fragment,s),K(g.$$.fragment,s),q=!1},d(s){s&&(a(t),a(k),a(e),a(T),a(C),a(d),a(L),a(h),a(E),a(x),a(P),a(b),a($),a(S),a(A),a(v),a(O),a(y),a(R),a(M)),N(m,s),N(_,s),N(g,s)}}}const ds={section:"Plugins",title:"Anchor"};class hs extends ls{constructor(t){super(),os(this,t,null,rs,ps,{})}}export{hs as default,ds as metadata};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show more