sk-clib 0.0.8 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +60 -60
- package/dist/docs/DocTree.svelte +67 -0
- package/dist/docs/DocTree.svelte.d.ts +20 -0
- package/dist/docs/_layouts/bare.svelte +12 -0
- package/dist/docs/_layouts/bare.svelte.d.ts +15 -0
- package/dist/docs/contributing/+page.svelte +12 -0
- package/dist/docs/contributing/documentation/+page.svelte +12 -0
- package/dist/docs/contributing/documentation/sublevel/+page.svelte +12 -0
- package/dist/docs/contributing/library/+page.svelte +12 -0
- package/dist/docs/contributing/library/other.svelte +12 -0
- package/dist/docs/getting_started/+page.svelte +13 -0
- package/dist/docs/getting_started/installation.svelte +12 -0
- package/dist/docs/getting_started/usage.svelte +18 -0
- package/dist/docs/handler/handler.d.ts +49 -0
- package/dist/docs/handler/handler.js +74 -0
- package/dist/docs/handler/index.d.ts +1 -0
- package/dist/docs/handler/index.js +1 -0
- package/dist/docs/index.d.ts +0 -0
- package/dist/docs/index.js +1 -0
- package/dist/prism.css +143 -0
- package/dist/prism.d.ts +46 -0
- package/dist/prism.js +22 -0
- package/dist/styles.css +70 -1
- package/dist/ui/frame/components/frame.svelte.d.ts +1 -1
- package/dist/ui/text/types.js +1 -1
- package/dist/utils.js +49 -36
- package/package.json +12 -6
package/README.md
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
# sk-clib
|
|
2
|
-
|
|
3
|
-
A flexible and modular component library built for my SvelteKit projects.
|
|
4
|
-
|
|
5
|
-
## 📦 Installation
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
bun install sk-clib
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## 🔧 Usage
|
|
12
|
-
|
|
13
|
-
Once installed, you can import and use components like this:
|
|
14
|
-
|
|
15
|
-
```svelte
|
|
16
|
-
<script>
|
|
17
|
-
import { Header, Text } from 'sk-clib';
|
|
18
|
-
</script>
|
|
19
|
-
|
|
20
|
-
<Header lg bold>Welp... Hi there :)</Header>
|
|
21
|
-
<Text size="lg" weight="bold">Hello World</Text>
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
If you're using path aliases, make sure to configure them properly in your `tsconfig.json` or `jsconfig.json`.
|
|
25
|
-
|
|
26
|
-
## 🛠 Development
|
|
27
|
-
|
|
28
|
-
To contribute or develop locally:
|
|
29
|
-
|
|
30
|
-
```bash
|
|
31
|
-
bun clone https://github.com/TreltaSev/sk-clib.git
|
|
32
|
-
cd sk-clib
|
|
33
|
-
bun install
|
|
34
|
-
bun run dev
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
This will launch the SvelteKit dev environment so you can view and test components live.
|
|
38
|
-
|
|
39
|
-
### Commands
|
|
40
|
-
|
|
41
|
-
* `npm run dev` – Start development server with live preview
|
|
42
|
-
* `npm run build` – Build the library for publishing
|
|
43
|
-
* `npm run lint` – Lint codebase
|
|
44
|
-
* `npm run check` – Run type checking
|
|
45
|
-
* `npm run test` – (If applicable) Run tests
|
|
46
|
-
|
|
47
|
-
## ✅ Publishing
|
|
48
|
-
|
|
49
|
-
Make sure everything builds correctly:
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
bun run build
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
Then publish:
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
bun publish
|
|
59
|
-
```
|
|
60
|
-
|
|
1
|
+
# sk-clib
|
|
2
|
+
|
|
3
|
+
A flexible and modular component library built for my SvelteKit projects.
|
|
4
|
+
|
|
5
|
+
## 📦 Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
bun install sk-clib
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## 🔧 Usage
|
|
12
|
+
|
|
13
|
+
Once installed, you can import and use components like this:
|
|
14
|
+
|
|
15
|
+
```svelte
|
|
16
|
+
<script>
|
|
17
|
+
import { Header, Text } from 'sk-clib';
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<Header lg bold>Welp... Hi there :)</Header>
|
|
21
|
+
<Text size="lg" weight="bold">Hello World</Text>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
If you're using path aliases, make sure to configure them properly in your `tsconfig.json` or `jsconfig.json`.
|
|
25
|
+
|
|
26
|
+
## 🛠 Development
|
|
27
|
+
|
|
28
|
+
To contribute or develop locally:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
bun clone https://github.com/TreltaSev/sk-clib.git
|
|
32
|
+
cd sk-clib
|
|
33
|
+
bun install
|
|
34
|
+
bun run dev
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
This will launch the SvelteKit dev environment so you can view and test components live.
|
|
38
|
+
|
|
39
|
+
### Commands
|
|
40
|
+
|
|
41
|
+
* `npm run dev` – Start development server with live preview
|
|
42
|
+
* `npm run build` – Build the library for publishing
|
|
43
|
+
* `npm run lint` – Lint codebase
|
|
44
|
+
* `npm run check` – Run type checking
|
|
45
|
+
* `npm run test` – (If applicable) Run tests
|
|
46
|
+
|
|
47
|
+
## ✅ Publishing
|
|
48
|
+
|
|
49
|
+
Make sure everything builds correctly:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
bun run build
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Then publish:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
bun publish
|
|
59
|
+
```
|
|
60
|
+
|
|
61
61
|
> Ensure your version is bumped and `package.json` is clean of any local dependencies before publishing.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// --- Components ---
|
|
3
|
+
import { Header } from '..';
|
|
4
|
+
import DocTree from "./DocTree.svelte"
|
|
5
|
+
|
|
6
|
+
// --- Logic ---
|
|
7
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
8
|
+
|
|
9
|
+
export type DocNode = {
|
|
10
|
+
root?: {
|
|
11
|
+
metadata?: {
|
|
12
|
+
order?: number;
|
|
13
|
+
title?: string;
|
|
14
|
+
};
|
|
15
|
+
component?: typeof import('svelte').SvelteComponent;
|
|
16
|
+
};
|
|
17
|
+
component?: typeof import('svelte').SvelteComponent;
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Sorts the children of a documentation node by their `order` metadata.
|
|
23
|
+
*/
|
|
24
|
+
function getSortedDocs(obj: Record<string, any>) {
|
|
25
|
+
return Object.entries(obj)
|
|
26
|
+
.filter(([key]) => key !== 'root')
|
|
27
|
+
.sort(([, a], [, b]) => {
|
|
28
|
+
const orderA = a?.root?.metadata?.order ?? a?.metadata?.order ?? 9999;
|
|
29
|
+
const orderB = b?.root?.metadata?.order ?? b?.metadata?.order ?? 9999;
|
|
30
|
+
return orderA - orderB;
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
export type tProps = HTMLAttributes<HTMLDivElement> & {
|
|
36
|
+
node: DocNode,
|
|
37
|
+
prev?: string,
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
let { children, node, prev = $bindable(''), ...rest }: tProps | any = $props();
|
|
41
|
+
</script>
|
|
42
|
+
|
|
43
|
+
{#if node.root}
|
|
44
|
+
{@const Component = node.root.component as any}
|
|
45
|
+
<Component prev/>
|
|
46
|
+
{/if}
|
|
47
|
+
|
|
48
|
+
{#each getSortedDocs(node) as [key, value]}
|
|
49
|
+
{#if value.root?.component}
|
|
50
|
+
<value.root.component prev={`${prev}${key ? '/' : ''}${key}`}/>
|
|
51
|
+
{:else if value.component}
|
|
52
|
+
<value.component prev={`${prev}${key ? '/' : ''}${key}`}/>
|
|
53
|
+
{/if}
|
|
54
|
+
|
|
55
|
+
{#each Object.entries(value).filter(([k]) => k !== 'root') as [subKey, subValue]}
|
|
56
|
+
{#if typeof subValue === 'object' && subValue !== null && 'component' in subValue}
|
|
57
|
+
<!-- Render actual doc file -->
|
|
58
|
+
{@const SubComponent = subValue.component as any}
|
|
59
|
+
<SubComponent prev={`${prev}${subKey ? '/' : ''}${subKey}`}/>
|
|
60
|
+
{:else if typeof subValue === 'object' && !['metadata'].includes(subKey)}
|
|
61
|
+
<!-- Recurse into folder-like object -->
|
|
62
|
+
<DocTree prev={`${prev}${subKey ? '/' : ''}${subKey}`} node={subValue}/>
|
|
63
|
+
{:else}
|
|
64
|
+
<!-- Not valid doc node -->
|
|
65
|
+
{/if}
|
|
66
|
+
{/each}
|
|
67
|
+
{/each}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import DocTree from "./DocTree.svelte";
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
export type DocNode = {
|
|
4
|
+
root?: {
|
|
5
|
+
metadata?: {
|
|
6
|
+
order?: number;
|
|
7
|
+
title?: string;
|
|
8
|
+
};
|
|
9
|
+
component?: typeof import('svelte').SvelteComponent;
|
|
10
|
+
};
|
|
11
|
+
component?: typeof import('svelte').SvelteComponent;
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
};
|
|
14
|
+
export type tProps = HTMLAttributes<HTMLDivElement> & {
|
|
15
|
+
node: DocNode;
|
|
16
|
+
prev?: string;
|
|
17
|
+
};
|
|
18
|
+
declare const DocTree: import("svelte").Component<any, {}, "prev">;
|
|
19
|
+
type DocTree = ReturnType<typeof DocTree>;
|
|
20
|
+
export default DocTree;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export default Bare;
|
|
2
|
+
type Bare = {
|
|
3
|
+
$on?(type: string, callback: (e: any) => void): () => void;
|
|
4
|
+
$set?(props: Partial<$$ComponentProps>): void;
|
|
5
|
+
};
|
|
6
|
+
declare const Bare: import("svelte").Component<{
|
|
7
|
+
children: any;
|
|
8
|
+
title?: string;
|
|
9
|
+
prev?: any;
|
|
10
|
+
}, {}, "title" | "prev">;
|
|
11
|
+
type $$ComponentProps = {
|
|
12
|
+
children: any;
|
|
13
|
+
title?: string;
|
|
14
|
+
prev?: any;
|
|
15
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script context="module">
|
|
2
|
+
export const metadata = {"title":"Contributing"};
|
|
3
|
+
const { title } = metadata;
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<script>
|
|
7
|
+
import Layout_MDSVEX_DEFAULT from '/home/runner/work/sk-clib/sk-clib/src/lib/docs/_layouts/bare.svelte';
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<Layout_MDSVEX_DEFAULT {...$$props} {...metadata}>
|
|
11
|
+
<p>You can choose to either contribute to the documentation or the library</p>
|
|
12
|
+
</Layout_MDSVEX_DEFAULT>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script context="module">
|
|
2
|
+
export const metadata = {"order":1,"title":"Contributing to Documentation"};
|
|
3
|
+
const { order, title } = metadata;
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<script>
|
|
7
|
+
import Layout_MDSVEX_DEFAULT from '/home/runner/work/sk-clib/sk-clib/src/lib/docs/_layouts/bare.svelte';
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<Layout_MDSVEX_DEFAULT {...$$props} {...metadata}>
|
|
11
|
+
<p>So, you want to contribute to the documentation?</p>
|
|
12
|
+
</Layout_MDSVEX_DEFAULT>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script context="module">
|
|
2
|
+
export const metadata = {"title":"This is a sub level","order":6};
|
|
3
|
+
const { title, order } = metadata;
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<script>
|
|
7
|
+
import Layout_MDSVEX_DEFAULT from '/home/runner/work/sk-clib/sk-clib/src/lib/docs/_layouts/bare.svelte';
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<Layout_MDSVEX_DEFAULT {...$$props} {...metadata}>
|
|
11
|
+
<p>This is a dope sub level</p>
|
|
12
|
+
</Layout_MDSVEX_DEFAULT>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script context="module">
|
|
2
|
+
export const metadata = {"order":2,"title":"Contributing to Library"};
|
|
3
|
+
const { order, title } = metadata;
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<script>
|
|
7
|
+
import Layout_MDSVEX_DEFAULT from '/home/runner/work/sk-clib/sk-clib/src/lib/docs/_layouts/bare.svelte';
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<Layout_MDSVEX_DEFAULT {...$$props} {...metadata}>
|
|
11
|
+
<p>So, you want to contribute to the library?</p>
|
|
12
|
+
</Layout_MDSVEX_DEFAULT>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script context="module">
|
|
2
|
+
export const metadata = {"title":"Other Doc Key","order":2};
|
|
3
|
+
const { title, order } = metadata;
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<script>
|
|
7
|
+
import Layout_MDSVEX_DEFAULT from '/home/runner/work/sk-clib/sk-clib/src/lib/docs/_layouts/bare.svelte';
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<Layout_MDSVEX_DEFAULT {...$$props} {...metadata}>
|
|
11
|
+
<p> sma lama duma</p>
|
|
12
|
+
</Layout_MDSVEX_DEFAULT>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<script context="module">
|
|
2
|
+
export const metadata = {"order":0,"strong":true,"title":null};
|
|
3
|
+
const { order, strong, title } = metadata;
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<script>
|
|
7
|
+
import Layout_MDSVEX_DEFAULT from '/home/runner/work/sk-clib/sk-clib/src/lib/docs/_layouts/bare.svelte';
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<Layout_MDSVEX_DEFAULT {...$$props} {...metadata}>
|
|
11
|
+
<header>sk-clib</header>
|
|
12
|
+
<p>A flexible and modular component library built for my SvelteKit projects.</p>
|
|
13
|
+
</Layout_MDSVEX_DEFAULT>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<script context="module">
|
|
2
|
+
export const metadata = {"title":"📦 Installation","order":1};
|
|
3
|
+
const { title, order } = metadata;
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<script>
|
|
7
|
+
import Layout_MDSVEX_DEFAULT from '/home/runner/work/sk-clib/sk-clib/src/lib/docs/_layouts/bare.svelte';
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<Layout_MDSVEX_DEFAULT {...$$props} {...metadata}>
|
|
11
|
+
<pre class="language-bash">{@html `<code class="language-bash">bun <span class="token function">install</span> sk-clib</code>`}</pre>
|
|
12
|
+
</Layout_MDSVEX_DEFAULT>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<script context="module">
|
|
2
|
+
export const metadata = {"title":"🔧 Usage","order":0};
|
|
3
|
+
const { title, order } = metadata;
|
|
4
|
+
</script>
|
|
5
|
+
|
|
6
|
+
<script>
|
|
7
|
+
import Layout_MDSVEX_DEFAULT from '/home/runner/work/sk-clib/sk-clib/src/lib/docs/_layouts/bare.svelte';
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<Layout_MDSVEX_DEFAULT {...$$props} {...metadata}>
|
|
11
|
+
<p>Once installed, you can import and use components like this:</p>
|
|
12
|
+
<pre class="language-html">{@html `<code class="language-html"><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>script</span><span class="token punctuation">></span></span><span class="token script"><span class="token language-javascript">
|
|
13
|
+
<span class="token keyword">import</span> <span class="token punctuation">{</span> Header<span class="token punctuation">,</span> Text <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">'sk-clib'</span><span class="token punctuation">;</span>
|
|
14
|
+
</span></span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span>script</span><span class="token punctuation">></span></span>
|
|
15
|
+
|
|
16
|
+
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>Header</span> <span class="token attr-name">lg</span> <span class="token attr-name">bold</span><span class="token punctuation">></span></span>Welp... Hi there :)<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>Header</span><span class="token punctuation">></span></span>
|
|
17
|
+
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>Text</span> <span class="token attr-name">size</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>lg<span class="token punctuation">"</span></span> <span class="token attr-name">weight</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>bold<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>Hello World<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>Text</span><span class="token punctuation">></span></span></code>`}</pre>
|
|
18
|
+
</Layout_MDSVEX_DEFAULT>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { SvelteComponent } from 'svelte';
|
|
2
|
+
/**
|
|
3
|
+
* Read DocComponent object, where `.component` is just a svelteComponent that can be rendered
|
|
4
|
+
*/
|
|
5
|
+
export type DocComponent = {
|
|
6
|
+
path: string;
|
|
7
|
+
component: typeof SvelteComponent;
|
|
8
|
+
metadata?: Record<string, unknown>;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Represents a Svelte component that has been dynamically imported.
|
|
12
|
+
*
|
|
13
|
+
* @property default - The default export of the imported module, which should be a Svelte component constructor.
|
|
14
|
+
*/
|
|
15
|
+
export type ImportedComponent = {
|
|
16
|
+
default: typeof SvelteComponent;
|
|
17
|
+
metadata: Record<string, unknown>;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Handles the discovery, parsing, organization, and setup of documentation components.
|
|
21
|
+
*
|
|
22
|
+
* The `DocsHandler` class is responsible for scanning the documentation directory,
|
|
23
|
+
* parsing all documentation files, and organizing them into a nested object structure
|
|
24
|
+
* that mirrors the folder hierarchy. It also provides access to the parsed documentation
|
|
25
|
+
* components and their metadata for rendering or further processing.
|
|
26
|
+
*
|
|
27
|
+
* Usage:
|
|
28
|
+
* ```ts
|
|
29
|
+
* const handler = new DocsHandler();
|
|
30
|
+
* const docs = handler.docs;
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare class DocsHandler {
|
|
34
|
+
docs: Record<string, any>;
|
|
35
|
+
constructor();
|
|
36
|
+
/**
|
|
37
|
+
* While the naming scheme of this method is kind-of uffed-scay
|
|
38
|
+
* Basically this runs all the methods below to not only find, but parse, sort, and setup
|
|
39
|
+
* all the doc components
|
|
40
|
+
*/
|
|
41
|
+
handle(): Record<string, any>;
|
|
42
|
+
/**
|
|
43
|
+
* Finds all the available documentation files, then uses the mdsvex pre-processor to convert
|
|
44
|
+
* them into render-able components before being passed through and casted to `DocComponent`
|
|
45
|
+
*
|
|
46
|
+
* @returns A list of doc components that can be rendered
|
|
47
|
+
*/
|
|
48
|
+
findAll(): DocComponent[];
|
|
49
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Handles the discovery, parsing, organization, and setup of documentation components.
|
|
3
|
+
*
|
|
4
|
+
* The `DocsHandler` class is responsible for scanning the documentation directory,
|
|
5
|
+
* parsing all documentation files, and organizing them into a nested object structure
|
|
6
|
+
* that mirrors the folder hierarchy. It also provides access to the parsed documentation
|
|
7
|
+
* components and their metadata for rendering or further processing.
|
|
8
|
+
*
|
|
9
|
+
* Usage:
|
|
10
|
+
* ```ts
|
|
11
|
+
* const handler = new DocsHandler();
|
|
12
|
+
* const docs = handler.docs;
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
var DocsHandler = /** @class */ (function () {
|
|
16
|
+
function DocsHandler() {
|
|
17
|
+
this.docs = this.handle();
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* While the naming scheme of this method is kind-of uffed-scay
|
|
21
|
+
* Basically this runs all the methods below to not only find, but parse, sort, and setup
|
|
22
|
+
* all the doc components
|
|
23
|
+
*/
|
|
24
|
+
DocsHandler.prototype.handle = function () {
|
|
25
|
+
var parsedDocs = this.findAll();
|
|
26
|
+
var root = {};
|
|
27
|
+
for (var _i = 0, parsedDocs_1 = parsedDocs; _i < parsedDocs_1.length; _i++) {
|
|
28
|
+
var entry = parsedDocs_1[_i];
|
|
29
|
+
// Remove leading slash and split path
|
|
30
|
+
var parts = entry.path.replace(/^\/?src\/lib\/docs\//, '').split('/');
|
|
31
|
+
var current = root;
|
|
32
|
+
for (var i = 0; i < parts.length; i++) {
|
|
33
|
+
var part = parts[i];
|
|
34
|
+
var isLast = i === parts.length - 1;
|
|
35
|
+
// If it's a +page.svx file, use 'root' as the key
|
|
36
|
+
if (isLast && part === '+page.svx') {
|
|
37
|
+
current['root'] = entry;
|
|
38
|
+
}
|
|
39
|
+
else if (isLast) {
|
|
40
|
+
// If it's another file, use the file name (without extension) as the key
|
|
41
|
+
var fileKey = part.replace(/\.[^/.]+$/, '');
|
|
42
|
+
current[fileKey] = entry;
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
// Folder: create if not exists
|
|
46
|
+
if (!current[part])
|
|
47
|
+
current[part] = {};
|
|
48
|
+
current = current[part];
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return root;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Finds all the available documentation files, then uses the mdsvex pre-processor to convert
|
|
56
|
+
* them into render-able components before being passed through and casted to `DocComponent`
|
|
57
|
+
*
|
|
58
|
+
* @returns A list of doc components that can be rendered
|
|
59
|
+
*/
|
|
60
|
+
DocsHandler.prototype.findAll = function () {
|
|
61
|
+
var imported_docs = import.meta.glob('@doc/**/**/*.{md,svx}', { eager: true });
|
|
62
|
+
var parsedDocs = Object.entries(imported_docs).map(function (_a) {
|
|
63
|
+
var path = _a[0], module = _a[1];
|
|
64
|
+
return {
|
|
65
|
+
path: path,
|
|
66
|
+
component: module.default,
|
|
67
|
+
metadata: module.metadata
|
|
68
|
+
};
|
|
69
|
+
});
|
|
70
|
+
return parsedDocs;
|
|
71
|
+
};
|
|
72
|
+
return DocsHandler;
|
|
73
|
+
}());
|
|
74
|
+
export { DocsHandler };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DocsHandler } from "./handler";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DocsHandler } from "./handler";
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
package/dist/prism.css
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* atom-dark theme for `prism.js`
|
|
3
|
+
* Based on Atom's `atom-dark` theme: https://github.com/atom/atom-dark-syntax
|
|
4
|
+
* @author Joe Gibson (@gibsjose)
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
code[class*="language-"],
|
|
8
|
+
pre[class*="language-"] {
|
|
9
|
+
color: #c5c8c6;
|
|
10
|
+
text-shadow: 0 1px rgba(0, 0, 0, 0.3);
|
|
11
|
+
font-family: Inconsolata, Monaco, Consolas, 'Courier New', Courier, monospace;
|
|
12
|
+
direction: ltr;
|
|
13
|
+
text-align: left;
|
|
14
|
+
white-space: pre;
|
|
15
|
+
word-spacing: normal;
|
|
16
|
+
word-break: normal;
|
|
17
|
+
line-height: 1.5;
|
|
18
|
+
|
|
19
|
+
-moz-tab-size: 4;
|
|
20
|
+
-o-tab-size: 4;
|
|
21
|
+
tab-size: 4;
|
|
22
|
+
|
|
23
|
+
-webkit-hyphens: none;
|
|
24
|
+
-moz-hyphens: none;
|
|
25
|
+
-ms-hyphens: none;
|
|
26
|
+
hyphens: none;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* Code blocks */
|
|
30
|
+
pre[class*="language-"] {
|
|
31
|
+
padding: 1em;
|
|
32
|
+
margin: .5em 0;
|
|
33
|
+
overflow: auto;
|
|
34
|
+
border-radius: 0.3em;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:not(pre) > code[class*="language-"],
|
|
38
|
+
pre[class*="language-"] {
|
|
39
|
+
background: #1d1f21;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* Inline code */
|
|
43
|
+
:not(pre) > code[class*="language-"] {
|
|
44
|
+
padding: .1em;
|
|
45
|
+
border-radius: .3em;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.token.comment,
|
|
49
|
+
.token.prolog,
|
|
50
|
+
.token.doctype,
|
|
51
|
+
.token.cdata {
|
|
52
|
+
color: #7C7C7C;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.token.punctuation {
|
|
56
|
+
color: #c5c8c6;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.namespace {
|
|
60
|
+
opacity: .7;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.token.property,
|
|
64
|
+
.token.keyword,
|
|
65
|
+
.token.tag {
|
|
66
|
+
color: var(--color-primary);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.token.class-name {
|
|
70
|
+
color: #FFFFB6;
|
|
71
|
+
text-decoration: underline;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.token.boolean,
|
|
75
|
+
.token.constant {
|
|
76
|
+
color: #99CC99;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.token.symbol,
|
|
80
|
+
.token.deleted {
|
|
81
|
+
color: #f92672;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.token.number {
|
|
85
|
+
color: #FF73FD;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.token.selector,
|
|
89
|
+
.token.attr-name,
|
|
90
|
+
.token.string,
|
|
91
|
+
.token.char,
|
|
92
|
+
.token.builtin,
|
|
93
|
+
.token.inserted {
|
|
94
|
+
color: var(--color-secondary);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.token.variable {
|
|
98
|
+
color: #C6C5FE;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.token.operator {
|
|
102
|
+
color: #EDEDED;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.token.entity {
|
|
106
|
+
color: #FFFFB6;
|
|
107
|
+
cursor: help;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.token.url {
|
|
111
|
+
color: #96CBFE;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.language-css .token.string,
|
|
115
|
+
.style .token.string {
|
|
116
|
+
color: #87C38A;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.token.atrule,
|
|
120
|
+
.token.attr-value {
|
|
121
|
+
color: #F9EE98;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.token.function {
|
|
125
|
+
color: #DAD085;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.token.regex {
|
|
129
|
+
color: #E9C062;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.token.important {
|
|
133
|
+
color: #fd971f;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.token.important,
|
|
137
|
+
.token.bold {
|
|
138
|
+
font-weight: bold;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.token.italic {
|
|
142
|
+
font-style: italic;
|
|
143
|
+
}
|
package/dist/prism.d.ts
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export namespace languages {
|
|
2
|
+
export namespace markup {
|
|
3
|
+
namespace tag { }
|
|
4
|
+
namespace doctype { }
|
|
5
|
+
}
|
|
6
|
+
import html = markup;
|
|
7
|
+
export { html };
|
|
8
|
+
import mathml = markup;
|
|
9
|
+
export { mathml };
|
|
10
|
+
import svg = markup;
|
|
11
|
+
export { svg };
|
|
12
|
+
export let xml: any;
|
|
13
|
+
import ssml = xml;
|
|
14
|
+
export { ssml };
|
|
15
|
+
import atom = xml;
|
|
16
|
+
export { atom };
|
|
17
|
+
import rss = xml;
|
|
18
|
+
export { rss };
|
|
19
|
+
export let clike: {
|
|
20
|
+
comment: {
|
|
21
|
+
pattern: RegExp;
|
|
22
|
+
lookbehind: boolean;
|
|
23
|
+
greedy: boolean;
|
|
24
|
+
}[];
|
|
25
|
+
string: {
|
|
26
|
+
pattern: RegExp;
|
|
27
|
+
greedy: boolean;
|
|
28
|
+
};
|
|
29
|
+
"class-name": {
|
|
30
|
+
pattern: RegExp;
|
|
31
|
+
lookbehind: boolean;
|
|
32
|
+
inside: {
|
|
33
|
+
punctuation: RegExp;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
keyword: RegExp;
|
|
37
|
+
boolean: RegExp;
|
|
38
|
+
function: RegExp;
|
|
39
|
+
number: RegExp;
|
|
40
|
+
operator: RegExp;
|
|
41
|
+
punctuation: RegExp;
|
|
42
|
+
};
|
|
43
|
+
export let javascript: any;
|
|
44
|
+
import js = javascript;
|
|
45
|
+
export { js };
|
|
46
|
+
}
|
package/dist/prism.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* PrismJS 1.30.0
|
|
2
|
+
https://prismjs.com/download#themes=prism&languages=markup+css+clike+javascript+bash+css-extras+diff+typescript&plugins=line-highlight+line-numbers+show-invisibles+autolinker+custom-class+highlight-keywords+inline-color+command-line+toolbar+download-button+match-braces */
|
|
3
|
+
var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(e){var n=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,t=0,r={},a={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof i?new i(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&").replace(/</g,"<").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++t}),e.__id},clone:function e(n,t){var r,i;switch(t=t||{},a.util.type(n)){case"Object":if(i=a.util.objId(n),t[i])return t[i];for(var l in r={},t[i]=r,n)n.hasOwnProperty(l)&&(r[l]=e(n[l],t));return r;case"Array":return i=a.util.objId(n),t[i]?t[i]:(r=[],t[i]=r,n.forEach((function(n,a){r[a]=e(n,t)})),r);default:return n}},getLanguage:function(e){for(;e;){var t=n.exec(e.className);if(t)return t[1].toLowerCase();e=e.parentElement}return"none"},setLanguage:function(e,t){e.className=e.className.replace(RegExp(n,"gi"),""),e.classList.add("language-"+t)},currentScript:function(){if("undefined"==typeof document)return null;if(document.currentScript&&"SCRIPT"===document.currentScript.tagName)return document.currentScript;try{throw new Error}catch(r){var e=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(r.stack)||[])[1];if(e){var n=document.getElementsByTagName("script");for(var t in n)if(n[t].src==e)return n[t]}return null}},isActive:function(e,n,t){for(var r="no-"+n;e;){var a=e.classList;if(a.contains(n))return!0;if(a.contains(r))return!1;e=e.parentElement}return!!t}},languages:{plain:r,plaintext:r,text:r,txt:r,extend:function(e,n){var t=a.util.clone(a.languages[e]);for(var r in n)t[r]=n[r];return t},insertBefore:function(e,n,t,r){var i=(r=r||a.languages)[e],l={};for(var o in i)if(i.hasOwnProperty(o)){if(o==n)for(var s in t)t.hasOwnProperty(s)&&(l[s]=t[s]);t.hasOwnProperty(o)||(l[o]=i[o])}var u=r[e];return r[e]=l,a.languages.DFS(a.languages,(function(n,t){t===u&&n!=e&&(this[n]=l)})),l},DFS:function e(n,t,r,i){i=i||{};var l=a.util.objId;for(var o in n)if(n.hasOwnProperty(o)){t.call(n,o,n[o],r||o);var s=n[o],u=a.util.type(s);"Object"!==u||i[l(s)]?"Array"!==u||i[l(s)]||(i[l(s)]=!0,e(s,t,o,i)):(i[l(s)]=!0,e(s,t,null,i))}}},plugins:{},highlightAll:function(e,n){a.highlightAllUnder(document,e,n)},highlightAllUnder:function(e,n,t){var r={callback:t,container:e,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};a.hooks.run("before-highlightall",r),r.elements=Array.prototype.slice.apply(r.container.querySelectorAll(r.selector)),a.hooks.run("before-all-elements-highlight",r);for(var i,l=0;i=r.elements[l++];)a.highlightElement(i,!0===n,r.callback)},highlightElement:function(n,t,r){var i=a.util.getLanguage(n),l=a.languages[i];a.util.setLanguage(n,i);var o=n.parentElement;o&&"pre"===o.nodeName.toLowerCase()&&a.util.setLanguage(o,i);var s={element:n,language:i,grammar:l,code:n.textContent};function u(e){s.highlightedCode=e,a.hooks.run("before-insert",s),s.element.innerHTML=s.highlightedCode,a.hooks.run("after-highlight",s),a.hooks.run("complete",s),r&&r.call(s.element)}if(a.hooks.run("before-sanity-check",s),(o=s.element.parentElement)&&"pre"===o.nodeName.toLowerCase()&&!o.hasAttribute("tabindex")&&o.setAttribute("tabindex","0"),!s.code)return a.hooks.run("complete",s),void(r&&r.call(s.element));if(a.hooks.run("before-highlight",s),s.grammar)if(t&&e.Worker){var c=new Worker(a.filename);c.onmessage=function(e){u(e.data)},c.postMessage(JSON.stringify({language:s.language,code:s.code,immediateClose:!0}))}else u(a.highlight(s.code,s.grammar,s.language));else u(a.util.encode(s.code))},highlight:function(e,n,t){var r={code:e,grammar:n,language:t};if(a.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=a.tokenize(r.code,r.grammar),a.hooks.run("after-tokenize",r),i.stringify(a.util.encode(r.tokens),r.language)},tokenize:function(e,n){var t=n.rest;if(t){for(var r in t)n[r]=t[r];delete n.rest}var a=new s;return u(a,a.head,e),o(e,a,n,a.head,0),function(e){for(var n=[],t=e.head.next;t!==e.tail;)n.push(t.value),t=t.next;return n}(a)},hooks:{all:{},add:function(e,n){var t=a.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=a.hooks.all[e];if(t&&t.length)for(var r,i=0;r=t[i++];)r(n)}},Token:i};function i(e,n,t,r){this.type=e,this.content=n,this.alias=t,this.length=0|(r||"").length}function l(e,n,t,r){e.lastIndex=n;var a=e.exec(t);if(a&&r&&a[1]){var i=a[1].length;a.index+=i,a[0]=a[0].slice(i)}return a}function o(e,n,t,r,s,g){for(var f in t)if(t.hasOwnProperty(f)&&t[f]){var h=t[f];h=Array.isArray(h)?h:[h];for(var d=0;d<h.length;++d){if(g&&g.cause==f+","+d)return;var v=h[d],p=v.inside,m=!!v.lookbehind,y=!!v.greedy,k=v.alias;if(y&&!v.pattern.global){var x=v.pattern.toString().match(/[imsuy]*$/)[0];v.pattern=RegExp(v.pattern.source,x+"g")}for(var b=v.pattern||v,w=r.next,A=s;w!==n.tail&&!(g&&A>=g.reach);A+=w.value.length,w=w.next){var P=w.value;if(n.length>e.length)return;if(!(P instanceof i)){var E,S=1;if(y){if(!(E=l(b,A,e,m))||E.index>=e.length)break;var L=E.index,O=E.index+E[0].length,C=A;for(C+=w.value.length;L>=C;)C+=(w=w.next).value.length;if(A=C-=w.value.length,w.value instanceof i)continue;for(var j=w;j!==n.tail&&(C<O||"string"==typeof j.value);j=j.next)S++,C+=j.value.length;S--,P=e.slice(A,C),E.index-=A}else if(!(E=l(b,0,P,m)))continue;L=E.index;var N=E[0],_=P.slice(0,L),M=P.slice(L+N.length),W=A+P.length;g&&W>g.reach&&(g.reach=W);var I=w.prev;if(_&&(I=u(n,I,_),A+=_.length),c(n,I,S),w=u(n,I,new i(f,p?a.tokenize(N,p):N,k,N)),M&&u(n,w,M),S>1){var T={cause:f+","+d,reach:W};o(e,n,t,w.prev,A,T),g&&T.reach>g.reach&&(g.reach=T.reach)}}}}}}function s(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function u(e,n,t){var r=n.next,a={value:t,prev:n,next:r};return n.next=a,r.prev=a,e.length++,a}function c(e,n,t){for(var r=n.next,a=0;a<t&&r!==e.tail;a++)r=r.next;n.next=r,r.prev=n,e.length-=a}if(e.Prism=a,i.stringify=function e(n,t){if("string"==typeof n)return n;if(Array.isArray(n)){var r="";return n.forEach((function(n){r+=e(n,t)})),r}var i={type:n.type,content:e(n.content,t),tag:"span",classes:["token",n.type],attributes:{},language:t},l=n.alias;l&&(Array.isArray(l)?Array.prototype.push.apply(i.classes,l):i.classes.push(l)),a.hooks.run("wrap",i);var o="";for(var s in i.attributes)o+=" "+s+'="'+(i.attributes[s]||"").replace(/"/g,""")+'"';return"<"+i.tag+' class="'+i.classes.join(" ")+'"'+o+">"+i.content+"</"+i.tag+">"},!e.document)return e.addEventListener?(a.disableWorkerMessageHandler||e.addEventListener("message",(function(n){var t=JSON.parse(n.data),r=t.language,i=t.code,l=t.immediateClose;e.postMessage(a.highlight(i,a.languages[r],r)),l&&e.close()}),!1),a):a;var g=a.util.currentScript();function f(){a.manual||a.highlightAll()}if(g&&(a.filename=g.src,g.hasAttribute("data-manual")&&(a.manual=!0)),!a.manual){var h=document.readyState;"loading"===h||"interactive"===h&&g&&g.defer?document.addEventListener("DOMContentLoaded",f):window.requestAnimationFrame?window.requestAnimationFrame(f):window.setTimeout(f,16)}return a}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism);
|
|
4
|
+
Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",(function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))})),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^<!\[CDATA\[|\]\]>$/i;var t={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:s}};t["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var n={};n[a]={pattern:RegExp("(<__[^>]*>)(?:<!\\[CDATA\\[(?:[^\\]]|\\](?!\\]>))*\\]\\]>|(?!<!\\[CDATA\\[)[^])*?(?=</__>)".replace(/__/g,(function(){return a})),"i"),lookbehind:!0,greedy:!0,inside:t},Prism.languages.insertBefore("markup","cdata",n)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(a,e){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp("(^|[\"'\\s])(?:"+a+")\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))","i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:Prism.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml;
|
|
5
|
+
!function(s){var e=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;s.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:[^;{\\s\"']|\\s+(?!\\s)|"+e.source+")*?(?:;|(?=\\s*\\{))"),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|(?:[^\\\\\r\n()\"']|\\\\[^])*)\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:{pattern:RegExp("(^|[{}\\s])[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+e.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:e,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},s.languages.css.atrule.inside.rest=s.languages.css;var t=s.languages.markup;t&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))}(Prism);
|
|
6
|
+
Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/};
|
|
7
|
+
Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp("(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])"),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp("((?:^|[^$\\w\\xA0-\\uFFFF.\"'\\])\\s]|\\b(?:return|yield))\\s*)/(?:(?:\\[(?:[^\\]\\\\\r\n]|\\\\.)*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}|(?:\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.|\\[(?:[^[\\]\\\\\r\n]|\\\\.)*\\])*\\])*\\]|\\\\.|[^/\\\\\\[\r\n])+/[dgimyus]{0,7}v[dgimyus]{0,7})(?=(?:\\s|/\\*(?:[^*]|\\*(?!/))*\\*/)*(?:$|[\r\n,.;:})\\]]|//))"),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)","javascript")),Prism.languages.js=Prism.languages.javascript;
|
|
8
|
+
!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",a={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},n={bash:a,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:n},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:a}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:n},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:n.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:n.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},a.inside=e.languages.bash;for(var s=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=n.variable[1].inside,i=0;i<s.length;i++)o[s[i]]=e.languages.bash[s[i]];e.languages.sh=e.languages.bash,e.languages.shell=e.languages.bash}(Prism);
|
|
9
|
+
!function(e){var a,n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:a={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[n,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=a,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}});var r={pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0},i={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|RebeccaPurple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:i,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:i})}(Prism);
|
|
10
|
+
!function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var n={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(n).forEach((function(a){var i=n[a],r=[];/^\w+$/.test(a)||r.push(/\w+/.exec(a)[0]),"diff"===a&&r.push("bold"),e.languages.diff[a]={pattern:RegExp("^(?:["+i+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:r,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(a)[0]}}}})),Object.defineProperty(e.languages.diff,"PREFIXES",{value:n})}(Prism);
|
|
11
|
+
!function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var s=e.languages.extend("typescript",{});delete s["class-name"],e.languages.typescript["class-name"].inside=s,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:s}}}}),e.languages.ts=e.languages.typescript}(Prism);
|
|
12
|
+
!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document&&document.querySelector){var e,t="line-numbers",i="linkable-line-numbers",n=/\n(?!$)/g,r=!0;Prism.plugins.lineHighlight={highlightLines:function(o,u,c){var h=(u="string"==typeof u?u:o.getAttribute("data-line")||"").replace(/\s+/g,"").split(",").filter(Boolean),d=+o.getAttribute("data-line-offset")||0,f=(function(){if(void 0===e){var t=document.createElement("div");t.style.fontSize="13px",t.style.lineHeight="1.5",t.style.padding="0",t.style.border="0",t.innerHTML=" <br /> ",document.body.appendChild(t),e=38===t.offsetHeight,document.body.removeChild(t)}return e}()?parseInt:parseFloat)(getComputedStyle(o).lineHeight),p=Prism.util.isActive(o,t),g=o.querySelector("code"),m=p?o:g||o,v=[],y=g.textContent.match(n),b=y?y.length+1:1,A=g&&m!=g?function(e,t){var i=getComputedStyle(e),n=getComputedStyle(t);function r(e){return+e.substr(0,e.length-2)}return t.offsetTop+r(n.borderTopWidth)+r(n.paddingTop)-r(i.paddingTop)}(o,g):0;h.forEach((function(e){var t=e.split("-"),i=+t[0],n=+t[1]||i;if(!((n=Math.min(b+d,n))<i)){var r=o.querySelector('.line-highlight[data-range="'+e+'"]')||document.createElement("div");if(v.push((function(){r.setAttribute("aria-hidden","true"),r.setAttribute("data-range",e),r.className=(c||"")+" line-highlight"})),p&&Prism.plugins.lineNumbers){var s=Prism.plugins.lineNumbers.getLine(o,i),l=Prism.plugins.lineNumbers.getLine(o,n);if(s){var a=s.offsetTop+A+"px";v.push((function(){r.style.top=a}))}if(l){var u=l.offsetTop-s.offsetTop+l.offsetHeight+"px";v.push((function(){r.style.height=u}))}}else v.push((function(){r.setAttribute("data-start",String(i)),n>i&&r.setAttribute("data-end",String(n)),r.style.top=(i-d-1)*f+A+"px",r.textContent=new Array(n-i+2).join(" \n")}));v.push((function(){r.style.width=o.scrollWidth+"px"})),v.push((function(){m.appendChild(r)}))}}));var P=o.id;if(p&&Prism.util.isActive(o,i)&&P){l(o,i)||v.push((function(){o.classList.add(i)}));var E=parseInt(o.getAttribute("data-start")||"1");s(".line-numbers-rows > span",o).forEach((function(e,t){var i=t+E;e.onclick=function(){var e=P+"."+i;r=!1,location.hash=e,setTimeout((function(){r=!0}),1)}}))}return function(){v.forEach(a)}}};var o=0;Prism.hooks.add("before-sanity-check",(function(e){var t=e.element.parentElement;if(u(t)){var i=0;s(".line-highlight",t).forEach((function(e){i+=e.textContent.length,e.parentNode.removeChild(e)})),i&&/^(?: \n)+$/.test(e.code.slice(-i))&&(e.code=e.code.slice(0,-i))}})),Prism.hooks.add("complete",(function e(i){var n=i.element.parentElement;if(u(n)){clearTimeout(o);var r=Prism.plugins.lineNumbers,s=i.plugins&&i.plugins.lineNumbers;l(n,t)&&r&&!s?Prism.hooks.add("line-numbers",e):(Prism.plugins.lineHighlight.highlightLines(n)(),o=setTimeout(c,1))}})),window.addEventListener("hashchange",c),window.addEventListener("resize",(function(){s("pre").filter(u).map((function(e){return Prism.plugins.lineHighlight.highlightLines(e)})).forEach(a)}))}function s(e,t){return Array.prototype.slice.call((t||document).querySelectorAll(e))}function l(e,t){return e.classList.contains(t)}function a(e){e()}function u(e){return!!(e&&/pre/i.test(e.nodeName)&&(e.hasAttribute("data-line")||e.id&&Prism.util.isActive(e,i)))}function c(){var e=location.hash.slice(1);s(".temporary.line-highlight").forEach((function(e){e.parentNode.removeChild(e)}));var t=(e.match(/\.([\d,-]+)$/)||[,""])[1];if(t&&!document.getElementById(e)){var i=e.slice(0,e.lastIndexOf(".")),n=document.getElementById(i);n&&(n.hasAttribute("data-line")||n.setAttribute("data-line",""),Prism.plugins.lineHighlight.highlightLines(n,t,"temporary ")(),r&&document.querySelector(".temporary.line-highlight").scrollIntoView())}}}();
|
|
13
|
+
!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var e="line-numbers",n=/\n(?!$)/g,t=Prism.plugins.lineNumbers={getLine:function(n,t){if("PRE"===n.tagName&&n.classList.contains(e)){var i=n.querySelector(".line-numbers-rows");if(i){var r=parseInt(n.getAttribute("data-start"),10)||1,s=r+(i.children.length-1);t<r&&(t=r),t>s&&(t=s);var l=t-r;return i.children[l]}}},resize:function(e){r([e])},assumeViewportIndependence:!0},i=void 0;window.addEventListener("resize",(function(){t.assumeViewportIndependence&&i===window.innerWidth||(i=window.innerWidth,r(Array.prototype.slice.call(document.querySelectorAll("pre.line-numbers"))))})),Prism.hooks.add("complete",(function(t){if(t.code){var i=t.element,s=i.parentNode;if(s&&/pre/i.test(s.nodeName)&&!i.querySelector(".line-numbers-rows")&&Prism.util.isActive(i,e)){i.classList.remove(e),s.classList.add(e);var l,o=t.code.match(n),a=o?o.length+1:1,u=new Array(a+1).join("<span></span>");(l=document.createElement("span")).setAttribute("aria-hidden","true"),l.className="line-numbers-rows",l.innerHTML=u,s.hasAttribute("data-start")&&(s.style.counterReset="linenumber "+(parseInt(s.getAttribute("data-start"),10)-1)),t.element.appendChild(l),r([s]),Prism.hooks.run("line-numbers",t)}}})),Prism.hooks.add("line-numbers",(function(e){e.plugins=e.plugins||{},e.plugins.lineNumbers=!0}))}function r(e){if(0!=(e=e.filter((function(e){var n,t=(n=e,n?window.getComputedStyle?getComputedStyle(n):n.currentStyle||null:null)["white-space"];return"pre-wrap"===t||"pre-line"===t}))).length){var t=e.map((function(e){var t=e.querySelector("code"),i=e.querySelector(".line-numbers-rows");if(t&&i){var r=e.querySelector(".line-numbers-sizer"),s=t.textContent.split(n);r||((r=document.createElement("span")).className="line-numbers-sizer",t.appendChild(r)),r.innerHTML="0",r.style.display="block";var l=r.getBoundingClientRect().height;return r.innerHTML="",{element:e,lines:s,lineHeights:[],oneLinerHeight:l,sizer:r}}})).filter(Boolean);t.forEach((function(e){var n=e.sizer,t=e.lines,i=e.lineHeights,r=e.oneLinerHeight;i[t.length-1]=void 0,t.forEach((function(e,t){if(e&&e.length>1){var s=n.appendChild(document.createElement("span"));s.style.display="block",s.textContent=e}else i[t]=r}))})),t.forEach((function(e){for(var n=e.sizer,t=e.lineHeights,i=0,r=0;r<t.length;r++)void 0===t[r]&&(t[r]=n.children[i++].getBoundingClientRect().height)})),t.forEach((function(e){var n=e.sizer,t=e.element.querySelector(".line-numbers-rows");n.style.display="none",n.innerHTML="",e.lineHeights.forEach((function(e,n){t.children[n].style.height=e+"px"}))}))}}}();
|
|
14
|
+
!function(){if("undefined"!=typeof Prism){var r={tab:/\t/,crlf:/\r\n/,lf:/\n/,cr:/\r/,space:/ /};Prism.hooks.add("before-highlight",(function(r){i(r.grammar)}))}function e(r,a){var n=r[a];switch(Prism.util.type(n)){case"RegExp":var t={};r[a]={pattern:n,inside:t},i(t);break;case"Array":for(var f=0,s=n.length;f<s;f++)e(n,f);break;default:i(t=n.inside||(n.inside={}))}}function i(a){if(a&&!a.tab){for(var n in r)r.hasOwnProperty(n)&&(a[n]=r[n]);for(var n in a)a.hasOwnProperty(n)&&!r[n]&&("rest"===n?i(a.rest):e(a,n))}}}();
|
|
15
|
+
!function(){if("undefined"!=typeof Prism){var i=/\b([a-z]{3,7}:\/\/|tel:)[\w\-+%~/.:=&!$'()*,;@]+(?:\?[\w\-+%~/.:=?&!$'()*,;@]*)?(?:#[\w\-+%~/.:#=?&!$'()*,;@]*)?/,n=/\b\S+@[\w.]+[a-z]{2}/,t=/\[([^\]]+)\]\(([^)]+)\)/,e=["comment","url","attr-value","string"];Prism.plugins.autolinker={processGrammar:function(r){r&&!r["url-link"]&&(Prism.languages.DFS(r,(function(r,a,l){e.indexOf(l)>-1&&!Array.isArray(a)&&(a.pattern||(a=this[r]={pattern:a}),a.inside=a.inside||{},"comment"==l&&(a.inside["md-link"]=t),"attr-value"==l?Prism.languages.insertBefore("inside","punctuation",{"url-link":i},a):a.inside["url-link"]=i,a.inside["email-link"]=n)})),r["url-link"]=i,r["email-link"]=n)}},Prism.hooks.add("before-highlight",(function(i){Prism.plugins.autolinker.processGrammar(i.grammar)})),Prism.hooks.add("wrap",(function(i){if(/-link$/.test(i.type)){i.tag="a";var n=i.content;if("email-link"==i.type&&0!=n.indexOf("mailto:"))n="mailto:"+n;else if("md-link"==i.type){var e=i.content.match(t);n=e[2],i.content=e[1]}i.attributes.href=n;try{i.content=decodeURIComponent(i.content)}catch(i){}}}))}}();
|
|
16
|
+
!function(){if("undefined"!=typeof Prism){var n,s,a="";Prism.plugins.customClass={add:function(s){n=s},map:function(n){s="function"==typeof n?n:function(s){return n[s]||s}},prefix:function(n){a=n||""},apply:t},Prism.hooks.add("wrap",(function(e){if(n){var u=n({content:e.content,type:e.type,language:e.language});Array.isArray(u)?e.classes.push.apply(e.classes,u):u&&e.classes.push(u)}(s||a)&&(e.classes=e.classes.map((function(n){return t(n,e.language)})))}))}function t(n,t){return a+(s?s(n,t):n)}}();
|
|
17
|
+
"undefined"!=typeof Prism&&Prism.hooks.add("wrap",(function(e){"keyword"===e.type&&e.classes.push("keyword-"+e.content)}));
|
|
18
|
+
!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var n=/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/g,r=/^#?((?:[\da-f]){3,4}|(?:[\da-f]{2}){3,4})$/i,o=[function(n){var o=r.exec(n);if(o){for(var s=(n=o[1]).length>=6?2:1,e=n.length/s,t=1==s?1/15:1/255,i=[],a=0;a<e;a++){var c=parseInt(n.substr(a*s,s),16);i.push(c*t)}return 3==e&&i.push(1),"rgba("+i.slice(0,3).map((function(n){return String(Math.round(255*n))})).join(",")+","+String(Number(i[3].toFixed(3)))+")"}},function(n){var r=(new Option).style;return r.color=n,r.color?n:void 0}];Prism.hooks.add("wrap",(function(r){if("color"===r.type||r.classes.indexOf("color")>=0){for(var s,e=r.content,t=e.split(n).join(""),i=0,a=o.length;i<a&&!s;i++)s=o[i](t);if(!s)return;var c='<span class="inline-color-wrapper"><span class="inline-color" style="background-color:'+s+';"></span></span>';r.content=c+e}}))}}();
|
|
19
|
+
!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var e=/(?:^|\s)command-line(?:\s|$)/,t="command-line-prompt",n="".startsWith?function(e,t){return e.startsWith(t)}:function(e,t){return 0===e.indexOf(t)},a="".endsWith?function(e,t){return e.endsWith(t)}:function(e,t){var n=e.length;return e.substring(n-t.length,n)===t};Prism.hooks.add("before-highlight",(function(i){var o=r(i);if(!o.complete&&i.code){var s=i.element.parentElement;if(s&&/pre/i.test(s.nodeName)&&(e.test(s.className)||e.test(i.element.className))){var l=i.element.querySelector("."+t);l&&l.remove();var m=i.code.split("\n");o.numberOfLines=m.length;var u=o.outputLines=[],c=s.getAttribute("data-output"),d=s.getAttribute("data-filter-output");if(null!==c)c.split(",").forEach((function(e){var t=e.split("-"),n=parseInt(t[0],10),a=2===t.length?parseInt(t[1],10):n;if(!isNaN(n)&&!isNaN(a)){n<1&&(n=1),a>m.length&&(a=m.length),a--;for(var r=--n;r<=a;r++)u[r]=m[r],m[r]=""}}));else if(d)for(var p=0;p<m.length;p++)n(m[p],d)&&(u[p]=m[p].slice(d.length),m[p]="");for(var f=o.continuationLineIndicies=new Set,h=s.getAttribute("data-continuation-str"),v=s.getAttribute("data-filter-continuation"),g=0;g<m.length;g++){var b=m[g];b&&(h&&a(b,h)&&f.add(g+1),g>0&&v&&n(b,v)&&(m[g]=b.slice(v.length),f.add(g)))}i.code=m.join("\n")}else o.complete=!0}else o.complete=!0})),Prism.hooks.add("before-insert",(function(e){var t=r(e);if(!t.complete){for(var n=e.highlightedCode.split("\n"),a=t.outputLines||[],i=0,o=n.length;i<o;i++)a.hasOwnProperty(i)?n[i]='<span class="token output">'+Prism.util.encode(a[i])+"</span>":n[i]='<span class="token command">'+n[i]+"</span>";e.highlightedCode=n.join("\n")}})),Prism.hooks.add("complete",(function(n){if(function(e){return"command-line"in(e.vars=e.vars||{})}(n)){var a=r(n);if(!a.complete){var i=n.element.parentElement;e.test(n.element.className)&&(n.element.className=n.element.className.replace(e," ")),e.test(i.className)||(i.className+=" command-line");var o,s="",l=a.numberOfLines||0,m=b("data-prompt","");o=""!==m?'<span data-prompt="'+m+'"></span>':'<span data-user="'+b("data-user","user")+'" data-host="'+b("data-host","localhost")+'"></span>';for(var u=a.continuationLineIndicies||new Set,c='<span data-continuation-prompt="'+b("data-continuation-prompt",">")+'"></span>',d=0;d<l;d++)u.has(d)?s+=c:s+=o;var p=document.createElement("span");p.className=t,p.innerHTML=s;for(var f=a.outputLines||[],h=0,v=f.length;h<v;h++)if(f.hasOwnProperty(h)){var g=p.children[h];g.removeAttribute("data-user"),g.removeAttribute("data-host"),g.removeAttribute("data-prompt")}n.element.insertBefore(p,n.element.firstChild),a.complete=!0}}function b(e,t){return(i.getAttribute(e)||t).replace(/"/g,""")}}))}function r(e){var t=e.vars=e.vars||{};return t["command-line"]=t["command-line"]||{}}}();
|
|
20
|
+
!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var e=[],t={},n=function(){};Prism.plugins.toolbar={};var a=Prism.plugins.toolbar.registerButton=function(n,a){var r;r="function"==typeof a?a:function(e){var t;return"function"==typeof a.onClick?((t=document.createElement("button")).type="button",t.addEventListener("click",(function(){a.onClick.call(this,e)}))):"string"==typeof a.url?(t=document.createElement("a")).href=a.url:t=document.createElement("span"),a.className&&t.classList.add(a.className),t.textContent=a.text,t},n in t?console.warn('There is a button with the key "'+n+'" registered already.'):e.push(t[n]=r)},r=Prism.plugins.toolbar.hook=function(a){var r=a.element.parentNode;if(r&&/pre/i.test(r.nodeName)&&!r.parentNode.classList.contains("code-toolbar")){var o=document.createElement("div");o.classList.add("code-toolbar"),r.parentNode.insertBefore(o,r),o.appendChild(r);var i=document.createElement("div");i.classList.add("toolbar");var l=e,d=function(e){for(;e;){var t=e.getAttribute("data-toolbar-order");if(null!=t)return(t=t.trim()).length?t.split(/\s*,\s*/g):[];e=e.parentElement}}(a.element);d&&(l=d.map((function(e){return t[e]||n}))),l.forEach((function(e){var t=e(a);if(t){var n=document.createElement("div");n.classList.add("toolbar-item"),n.appendChild(t),i.appendChild(n)}})),o.appendChild(i)}};a("label",(function(e){var t=e.element.parentNode;if(t&&/pre/i.test(t.nodeName)&&t.hasAttribute("data-label")){var n,a,r=t.getAttribute("data-label");try{a=document.querySelector("template#"+r)}catch(e){}return a?n=a.content:(t.hasAttribute("data-url")?(n=document.createElement("a")).href=t.getAttribute("data-url"):n=document.createElement("span"),n.textContent=r),n}})),Prism.hooks.add("complete",r)}}();
|
|
21
|
+
"undefined"!=typeof Prism&&"undefined"!=typeof document&&document.querySelector&&Prism.plugins.toolbar.registerButton("download-file",(function(t){var e=t.element.parentNode;if(e&&/pre/i.test(e.nodeName)&&e.hasAttribute("data-src")&&e.hasAttribute("data-download-link")){var n=e.getAttribute("data-src"),a=document.createElement("a");return a.textContent=e.getAttribute("data-download-link-label")||"Download",a.setAttribute("download",""),a.href=n,a}}));
|
|
22
|
+
!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var e={"(":")","[":"]","{":"}"},t={"(":"brace-round","[":"brace-square","{":"brace-curly"},n={"${":"{"},r=0,c=/^(pair-\d+-)(close|open)$/;Prism.hooks.add("complete",(function(c){var i=c.element,d=i.parentElement;if(d&&"PRE"==d.tagName){var u=[];if(Prism.util.isActive(i,"match-braces")&&u.push("(","[","{"),0!=u.length){d.__listenerAdded||(d.addEventListener("mousedown",(function(){var e=d.querySelector("code"),t=s("brace-selected");Array.prototype.slice.call(e.querySelectorAll("."+t)).forEach((function(e){e.classList.remove(t)}))})),Object.defineProperty(d,"__listenerAdded",{value:!0}));var f=Array.prototype.slice.call(i.querySelectorAll("span."+s("token")+"."+s("punctuation"))),h=[];u.forEach((function(c){for(var i=e[c],d=s(t[c]),u=[],p=[],v=0;v<f.length;v++){var m=f[v];if(0==m.childElementCount){var b=m.textContent;(b=n[b]||b)===c?(h.push({index:v,open:!0,element:m}),m.classList.add(d),m.classList.add(s("brace-open")),p.push(v)):b===i&&(h.push({index:v,open:!1,element:m}),m.classList.add(d),m.classList.add(s("brace-close")),p.length&&u.push([v,p.pop()]))}}u.forEach((function(e){var t="pair-"+r+++"-",n=f[e[0]],c=f[e[1]];n.id=t+"open",c.id=t+"close",[n,c].forEach((function(e){e.addEventListener("mouseenter",a),e.addEventListener("mouseleave",o),e.addEventListener("click",l)}))}))}));var p=0;h.sort((function(e,t){return e.index-t.index})),h.forEach((function(e){e.open?(e.element.classList.add(s("brace-level-"+(p%12+1))),p++):(p=Math.max(0,p-1),e.element.classList.add(s("brace-level-"+(p%12+1))))}))}}}))}function s(e){var t=Prism.plugins.customClass;return t?t.apply(e,"none"):e}function i(e){var t=c.exec(e.id);return document.querySelector("#"+t[1]+("open"==t[2]?"close":"open"))}function a(){Prism.util.isActive(this,"brace-hover",!0)&&[this,i(this)].forEach((function(e){e.classList.add(s("brace-hover"))}))}function o(){[this,i(this)].forEach((function(e){e.classList.remove(s("brace-hover"))}))}function l(){Prism.util.isActive(this,"brace-select",!0)&&[this,i(this)].forEach((function(e){e.classList.add(s("brace-selected"))}))}}();
|
package/dist/styles.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! tailwindcss v4.1.
|
|
1
|
+
/*! tailwindcss v4.1.7 | MIT License | https://tailwindcss.com */
|
|
2
2
|
@layer properties;
|
|
3
3
|
@layer theme, base, components, utilities;
|
|
4
4
|
@layer theme {
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
"Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
|
8
8
|
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
|
|
9
9
|
"Courier New", monospace;
|
|
10
|
+
--color-gray-400: oklch(70.7% 0.022 261.325);
|
|
10
11
|
--color-black: #000;
|
|
11
12
|
--color-white: #fff;
|
|
12
13
|
--spacing: 0.25rem;
|
|
@@ -30,6 +31,10 @@
|
|
|
30
31
|
--radius-md: 0.375rem;
|
|
31
32
|
--default-font-family: var(--font-sans);
|
|
32
33
|
--default-mono-font-family: var(--font-mono);
|
|
34
|
+
--color-primary: #ff7073;
|
|
35
|
+
--color-secondary: #70ff73;
|
|
36
|
+
--color-surface-0: #141212;
|
|
37
|
+
--color-surface-2: #262222;
|
|
33
38
|
}
|
|
34
39
|
}
|
|
35
40
|
@layer base {
|
|
@@ -199,6 +204,15 @@
|
|
|
199
204
|
max-width: 96rem;
|
|
200
205
|
}
|
|
201
206
|
}
|
|
207
|
+
.mt-5 {
|
|
208
|
+
margin-top: calc(var(--spacing) * 5);
|
|
209
|
+
}
|
|
210
|
+
.mt-20 {
|
|
211
|
+
margin-top: calc(var(--spacing) * 20);
|
|
212
|
+
}
|
|
213
|
+
.block {
|
|
214
|
+
display: block;
|
|
215
|
+
}
|
|
202
216
|
.flex {
|
|
203
217
|
display: flex;
|
|
204
218
|
}
|
|
@@ -209,6 +223,9 @@
|
|
|
209
223
|
width: 100%;
|
|
210
224
|
height: 100%;
|
|
211
225
|
}
|
|
226
|
+
.h-12 {
|
|
227
|
+
height: calc(var(--spacing) * 12);
|
|
228
|
+
}
|
|
212
229
|
.h-full {
|
|
213
230
|
height: 100%;
|
|
214
231
|
}
|
|
@@ -227,6 +244,9 @@
|
|
|
227
244
|
.cursor-pointer {
|
|
228
245
|
cursor: pointer;
|
|
229
246
|
}
|
|
247
|
+
.resize {
|
|
248
|
+
resize: both;
|
|
249
|
+
}
|
|
230
250
|
.flex-col {
|
|
231
251
|
flex-direction: column;
|
|
232
252
|
}
|
|
@@ -239,18 +259,37 @@
|
|
|
239
259
|
.justify-center {
|
|
240
260
|
justify-content: center;
|
|
241
261
|
}
|
|
262
|
+
.gap-0 {
|
|
263
|
+
gap: calc(var(--spacing) * 0);
|
|
264
|
+
}
|
|
265
|
+
.gap-5 {
|
|
266
|
+
gap: calc(var(--spacing) * 5);
|
|
267
|
+
}
|
|
242
268
|
.rounded-md {
|
|
243
269
|
border-radius: var(--radius-md);
|
|
244
270
|
}
|
|
271
|
+
.border {
|
|
272
|
+
border-style: var(--tw-border-style);
|
|
273
|
+
border-width: 1px;
|
|
274
|
+
}
|
|
245
275
|
.bg-\[var\(--color-primary\)\] {
|
|
246
276
|
background-color: var(--color-primary);
|
|
247
277
|
}
|
|
248
278
|
.bg-black {
|
|
249
279
|
background-color: var(--color-black);
|
|
250
280
|
}
|
|
281
|
+
.bg-surface-0 {
|
|
282
|
+
background-color: var(--color-surface-0);
|
|
283
|
+
}
|
|
284
|
+
.bg-surface-2 {
|
|
285
|
+
background-color: var(--color-surface-2);
|
|
286
|
+
}
|
|
251
287
|
.px-4 {
|
|
252
288
|
padding-inline: calc(var(--spacing) * 4);
|
|
253
289
|
}
|
|
290
|
+
.px-\[20\%\] {
|
|
291
|
+
padding-inline: 20%;
|
|
292
|
+
}
|
|
254
293
|
.py-2 {
|
|
255
294
|
padding-block: calc(var(--spacing) * 2);
|
|
256
295
|
}
|
|
@@ -301,6 +340,12 @@
|
|
|
301
340
|
.text-white {
|
|
302
341
|
color: var(--color-white);
|
|
303
342
|
}
|
|
343
|
+
.text-white\/80 {
|
|
344
|
+
color: color-mix(in srgb, #fff 80%, transparent);
|
|
345
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
346
|
+
color: color-mix(in oklab, var(--color-white) 80%, transparent);
|
|
347
|
+
}
|
|
348
|
+
}
|
|
304
349
|
.italic {
|
|
305
350
|
font-style: italic;
|
|
306
351
|
}
|
|
@@ -315,6 +360,29 @@
|
|
|
315
360
|
}
|
|
316
361
|
}
|
|
317
362
|
}
|
|
363
|
+
@layer base {
|
|
364
|
+
html, body {
|
|
365
|
+
width: 100%;
|
|
366
|
+
height: 100%;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
@layer docs {
|
|
370
|
+
header {
|
|
371
|
+
font-size: calc(var(--spacing) * 8);
|
|
372
|
+
color: var(--color-primary);
|
|
373
|
+
}
|
|
374
|
+
h1 {
|
|
375
|
+
color: var(--color-primary);
|
|
376
|
+
}
|
|
377
|
+
h2 {
|
|
378
|
+
color: var(--color-gray-400);
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
@property --tw-border-style {
|
|
382
|
+
syntax: "*";
|
|
383
|
+
inherits: false;
|
|
384
|
+
initial-value: solid;
|
|
385
|
+
}
|
|
318
386
|
@property --tw-font-weight {
|
|
319
387
|
syntax: "*";
|
|
320
388
|
inherits: false;
|
|
@@ -322,6 +390,7 @@
|
|
|
322
390
|
@layer properties {
|
|
323
391
|
@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
|
|
324
392
|
*, ::before, ::after, ::backdrop {
|
|
393
|
+
--tw-border-style: solid;
|
|
325
394
|
--tw-font-weight: initial;
|
|
326
395
|
}
|
|
327
396
|
}
|
|
@@ -17,6 +17,6 @@ import type { Props } from '..';
|
|
|
17
17
|
* This will create a flex container that is a row, centered, and fills the available space.
|
|
18
18
|
* The `class` prop can be used to add additional classes to the frame, and the `children` prop can be used to pass in child components.
|
|
19
19
|
*/
|
|
20
|
-
declare const Frame: import("svelte").Component<Props, {}, "
|
|
20
|
+
declare const Frame: import("svelte").Component<Props, {}, "flex" | "row" | "col" | "centerx" | "centery" | "center" | "fill" | "fillw" | "fillh" | "noshrink" | "aspectSquare" | "cursorAuto" | "cursorDefault" | "cursorPointer">;
|
|
21
21
|
type Frame = ReturnType<typeof Frame>;
|
|
22
22
|
export default Frame;
|
package/dist/ui/text/types.js
CHANGED
package/dist/utils.js
CHANGED
|
@@ -9,7 +9,11 @@ import { twMerge } from 'tailwind-merge';
|
|
|
9
9
|
* @param inputs All base classes
|
|
10
10
|
* @returns Merged classes
|
|
11
11
|
*/
|
|
12
|
-
export function cn(
|
|
12
|
+
export function cn() {
|
|
13
|
+
var inputs = [];
|
|
14
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
15
|
+
inputs[_i] = arguments[_i];
|
|
16
|
+
}
|
|
13
17
|
return twMerge(clsx(inputs));
|
|
14
18
|
}
|
|
15
19
|
/**
|
|
@@ -27,9 +31,8 @@ export function cn(...inputs) {
|
|
|
27
31
|
*
|
|
28
32
|
* ```
|
|
29
33
|
*/
|
|
30
|
-
|
|
31
|
-
selector
|
|
32
|
-
constructor(selector) {
|
|
34
|
+
var cn_a = /** @class */ (function () {
|
|
35
|
+
function cn_a(selector) {
|
|
33
36
|
this.selector = selector;
|
|
34
37
|
}
|
|
35
38
|
/**
|
|
@@ -37,60 +40,67 @@ export class cn_a {
|
|
|
37
40
|
* @param {string} classes tailwind/css classes string
|
|
38
41
|
* @returns
|
|
39
42
|
*/
|
|
40
|
-
build(classes) {
|
|
43
|
+
cn_a.prototype.build = function (classes) {
|
|
44
|
+
var _this = this;
|
|
41
45
|
// Make sure to stop if selector is not specified
|
|
42
46
|
if (!this.selector) {
|
|
43
47
|
console.warn('[classname_attribute_builder] Failed to build: Selector Undefined, Tried to build:', classes);
|
|
44
48
|
return '';
|
|
45
49
|
}
|
|
46
50
|
// Convert a class string such as "bg-black flex flex-col" into ["bg-black", "flex", "flex-col"]
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
classes_indexed.forEach((_class)
|
|
50
|
-
buffer.push(
|
|
51
|
+
var classes_indexed = classes.split(' ');
|
|
52
|
+
var buffer = [];
|
|
53
|
+
classes_indexed.forEach(function (_class) {
|
|
54
|
+
buffer.push("".concat(cn_a.wrap_selector(_this.selector || ''), ":").concat(_class)); // Join selector and class
|
|
51
55
|
});
|
|
52
56
|
return buffer.join(' '); // Return all the changes split
|
|
53
|
-
}
|
|
57
|
+
};
|
|
54
58
|
/**
|
|
55
59
|
*
|
|
56
60
|
* @param selector some sort of boolean expression like state=toggled...
|
|
57
61
|
* @returns `data-[${selector}]`
|
|
58
62
|
*/
|
|
59
|
-
|
|
60
|
-
return
|
|
61
|
-
}
|
|
63
|
+
cn_a.wrap_selector = function (selector) {
|
|
64
|
+
return "data-[".concat(selector, "]");
|
|
65
|
+
};
|
|
62
66
|
/**
|
|
63
67
|
*
|
|
64
68
|
* @param selector data attribute selector like state=toggled
|
|
65
69
|
* @param classes
|
|
66
70
|
*/
|
|
67
|
-
|
|
71
|
+
cn_a.buildx = function (selector, classes) {
|
|
68
72
|
// Convert a class string such as "bg-black flex flex-col" into ["bg-black", "flex", "flex-col"]
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
classes_indexed.forEach((_class)
|
|
72
|
-
buffer.push(
|
|
73
|
+
var classes_indexed = classes.split(' ');
|
|
74
|
+
var buffer = [];
|
|
75
|
+
classes_indexed.forEach(function (_class) {
|
|
76
|
+
buffer.push("".concat(cn_a.wrap_selector(selector || ''), ":").concat(_class)); // Join selector and class
|
|
73
77
|
});
|
|
74
78
|
return buffer.join(' '); // Return all the changes split
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
+
};
|
|
80
|
+
return cn_a;
|
|
81
|
+
}());
|
|
82
|
+
export { cn_a };
|
|
83
|
+
export function expand(node, params, _a) {
|
|
84
|
+
var _b = _a.duration, duration = _b === void 0 ? 300 : _b;
|
|
85
|
+
var height = node.scrollHeight;
|
|
79
86
|
return {
|
|
80
|
-
duration,
|
|
87
|
+
duration: duration,
|
|
81
88
|
easing: params.easing || cubicOut,
|
|
82
|
-
css: (t)
|
|
89
|
+
css: function (t) { return "height: ".concat(t * height, "px; opacity: ").concat(t, "; margin-top: ").concat(t * ((params.offset !== undefined) ? params.offset : 8), "px;"); }
|
|
83
90
|
};
|
|
84
91
|
}
|
|
85
92
|
export function uuidv4() {
|
|
86
|
-
return '10000000-1000-4000-8000-100000000000'.replace(/[018]/g,
|
|
93
|
+
return '10000000-1000-4000-8000-100000000000'.replace(/[018]/g, function (c) {
|
|
94
|
+
return (+c ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (+c / 4)))).toString(16);
|
|
95
|
+
});
|
|
87
96
|
}
|
|
88
|
-
export function reference_package_to_form(package_name, location
|
|
89
|
-
|
|
97
|
+
export function reference_package_to_form(package_name, location) {
|
|
98
|
+
if (location === void 0) { location = undefined; }
|
|
99
|
+
var buff = "?tour-package=".concat(package_name);
|
|
90
100
|
if (location !== undefined) {
|
|
91
|
-
buff +=
|
|
101
|
+
buff += "&location=".concat(location);
|
|
92
102
|
}
|
|
93
|
-
window.location.href =
|
|
103
|
+
window.location.href = "".concat(base, "/form").concat(buff);
|
|
94
104
|
return buff;
|
|
95
105
|
}
|
|
96
106
|
/**
|
|
@@ -106,13 +116,14 @@ export function reference_package_to_form(package_name, location = undefined) {
|
|
|
106
116
|
* <element class={cn(tokenInstance.className)}/>
|
|
107
117
|
* ```
|
|
108
118
|
*/
|
|
109
|
-
|
|
110
|
-
className = "";
|
|
119
|
+
var Tokenizer = /** @class */ (function () {
|
|
111
120
|
/**
|
|
112
121
|
* Initializes a new instance of the `Tokenizer` class with an optional initial class name.
|
|
113
122
|
* @param className The initial class name to start with. Defaults to an empty string.
|
|
114
123
|
*/
|
|
115
|
-
|
|
124
|
+
function Tokenizer(className) {
|
|
125
|
+
if (className === void 0) { className = ""; }
|
|
126
|
+
this.className = "";
|
|
116
127
|
this.className = className || "";
|
|
117
128
|
}
|
|
118
129
|
/**
|
|
@@ -120,9 +131,11 @@ export class Tokenizer {
|
|
|
120
131
|
* @param statement A condition that determines whether the token should be added.
|
|
121
132
|
* @param token The class token to add if the condition is met.
|
|
122
133
|
*/
|
|
123
|
-
addTokenIf(statement, token) {
|
|
134
|
+
Tokenizer.prototype.addTokenIf = function (statement, token) {
|
|
124
135
|
if (statement === true) {
|
|
125
|
-
this.className +=
|
|
136
|
+
this.className += " ".concat(token);
|
|
126
137
|
}
|
|
127
|
-
}
|
|
128
|
-
|
|
138
|
+
};
|
|
139
|
+
return Tokenizer;
|
|
140
|
+
}());
|
|
141
|
+
export { Tokenizer };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sk-clib",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"**/*.css"
|
|
28
28
|
],
|
|
29
29
|
"scripts": {
|
|
30
|
-
"build": "svelte-package &&
|
|
31
|
-
"prepublishOnly": "npm run build && publint",
|
|
30
|
+
"build": "svelte-package && npx tailwindcss -i ./src/app.css -o ./dist/styles.css",
|
|
31
|
+
"prepublishOnly": "npm run build && publint --skip-pack",
|
|
32
32
|
"dev": "vite dev",
|
|
33
33
|
"preview": "vite preview",
|
|
34
34
|
"check": "svelte-check --tsconfig ./tsconfig.json",
|
|
@@ -38,8 +38,7 @@
|
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"@sveltejs/kit": "^2.0.0",
|
|
41
|
-
"svelte": "^5.0.0"
|
|
42
|
-
"tailwindcss": "^4.1.5"
|
|
41
|
+
"svelte": "^5.0.0"
|
|
43
42
|
},
|
|
44
43
|
"devDependencies": {
|
|
45
44
|
"@sveltejs/kit": "^2.0.0",
|
|
@@ -51,7 +50,7 @@
|
|
|
51
50
|
"prettier": "^3.4.2",
|
|
52
51
|
"prettier-plugin-svelte": "^3.3.3",
|
|
53
52
|
"prettier-plugin-tailwindcss": "^0.6.11",
|
|
54
|
-
"publint": "^0.3.
|
|
53
|
+
"publint": "^0.3.12",
|
|
55
54
|
"svelte": "^5.0.0",
|
|
56
55
|
"svelte-check": "^4.0.0",
|
|
57
56
|
"typescript": "^5.0.0",
|
|
@@ -63,7 +62,14 @@
|
|
|
63
62
|
"library"
|
|
64
63
|
],
|
|
65
64
|
"dependencies": {
|
|
65
|
+
"@semantic-release/changelog": "^6.0.3",
|
|
66
|
+
"@semantic-release/git": "^10.0.1",
|
|
67
|
+
"@semantic-release/npm": "^12.0.1",
|
|
68
|
+
"@sveltejs/adapter-static": "^3.0.8",
|
|
66
69
|
"@tailwindcss/cli": "^4.1.5",
|
|
70
|
+
"@tailwindcss/vite": "^4.1.7",
|
|
71
|
+
"mdsvex": "^0.12.6",
|
|
72
|
+
"semantic-release": "^24.2.4",
|
|
67
73
|
"tailwind-merge": "^3.2.0"
|
|
68
74
|
}
|
|
69
75
|
}
|