tools.equationzone 0.0.2 → 0.0.3
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/dist/callouts/abstract.d.ts +14 -0
- package/dist/callouts/abstract.js +42 -0
- package/dist/callouts/caution.d.ts +13 -0
- package/dist/callouts/caution.js +35 -0
- package/dist/callouts/definition.d.ts +13 -0
- package/dist/callouts/definition.js +46 -0
- package/dist/callouts/done.d.ts +13 -0
- package/dist/callouts/done.js +55 -0
- package/dist/callouts/examplegraph.d.ts +13 -0
- package/dist/callouts/examplegraph.js +37 -0
- package/dist/callouts/important.d.ts +13 -0
- package/dist/callouts/important.js +37 -0
- package/dist/callouts/properties.d.ts +13 -0
- package/dist/callouts/properties.js +49 -0
- package/dist/callouts/remember.d.ts +13 -0
- package/dist/callouts/remember.js +38 -0
- package/dist/callouts/tip.d.ts +13 -0
- package/dist/callouts/tip.js +47 -0
- package/dist/index.d.ts +12 -2
- package/dist/index.js +15 -2
- package/dist/steps/step.d.ts +14 -0
- package/dist/steps/step.js +54 -0
- package/package.json +1 -1
- package/dist/H1.svelte +0 -1
- package/dist/H1.svelte.d.ts +0 -26
- /package/dist/{example.d.ts → callouts/example.d.ts} +0 -0
- /package/dist/{example.js → callouts/example.js} +0 -0
- /package/dist/{note.d.ts → callouts/note.d.ts} +0 -0
- /package/dist/{note.js → callouts/note.js} +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @returns
|
|
4
|
+
*/
|
|
5
|
+
export function abstract(): {
|
|
6
|
+
name: string;
|
|
7
|
+
validate: (params: string) => boolean;
|
|
8
|
+
openRender: (tokens: {
|
|
9
|
+
[x: string]: {
|
|
10
|
+
info: string;
|
|
11
|
+
};
|
|
12
|
+
}, index: string | number) => string;
|
|
13
|
+
closeRender: () => string;
|
|
14
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export function abstract() {
|
|
9
|
+
let name = 'abstract'
|
|
10
|
+
return {
|
|
11
|
+
name,
|
|
12
|
+
validate: (/** @type {string} */ params) =>
|
|
13
|
+
new RegExp(`^${name}(\\[(.+?)\\])?$`).test(params.trim()),
|
|
14
|
+
|
|
15
|
+
openRender: (/** @type {{ [x: string]: { info: string; }; }} */ tokens, /** @type {string | number} */ index) => {
|
|
16
|
+
const info = tokens[index].info.trim();
|
|
17
|
+
const match = info.match(new RegExp(`^${name}\\[(.+?)\\]$`));
|
|
18
|
+
const title = match ? match[1] : 'Abstract';
|
|
19
|
+
|
|
20
|
+
return `
|
|
21
|
+
<div class="not-prose bg-teal-50 border border-teal-200 text-sm text-teal-800 rounded-lg p-4 dark:bg-teal-500/20 dark:border-teal-900 dark:text-teal-500" role="alert" tabindex="-1" aria-labelledby="hs-with-description-label">
|
|
22
|
+
<div class="flex">
|
|
23
|
+
<div class="shrink-0">
|
|
24
|
+
<svg class="shrink-0 size-4 mt-1" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/></svg>
|
|
25
|
+
|
|
26
|
+
</div>
|
|
27
|
+
<div class="ms-4">
|
|
28
|
+
<h3 class=" font-bold">
|
|
29
|
+
${title}
|
|
30
|
+
</h3>
|
|
31
|
+
<div class="mt-1 prose dark:prose-invert text-teal-800 dark:text-teal-300">
|
|
32
|
+
`;
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
closeRender: () => `
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
</div>`
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
export function caution() {
|
|
8
|
+
let name = 'caution'
|
|
9
|
+
|
|
10
|
+
return {
|
|
11
|
+
name,
|
|
12
|
+
validate: (/** @type {string} */ params) =>
|
|
13
|
+
new RegExp(`^${name}(\\[(.+?)\\])?$`).test(params.trim()),
|
|
14
|
+
|
|
15
|
+
openRender: (/** @type {{ [x: string]: { info: string; }; }} */ tokens, /** @type {string | number} */ index) => {
|
|
16
|
+
const info = tokens[index].info.trim();
|
|
17
|
+
const match = info.match(new RegExp(`^${name}\\[(.+?)\\]$`));
|
|
18
|
+
const title = match ? match[1] : 'Title';
|
|
19
|
+
return `
|
|
20
|
+
<div class="not-prose bg-orange-50 border my-2 md:my-8 border-orange-200 text-orange-800 rounded-lg p-4 dark:bg-orange-500/20 dark:border-orange-900 dark:text-orange-500" role="alert" tabindex="-1" aria-labelledby="hs-with-description-label">
|
|
21
|
+
<div class="flex">
|
|
22
|
+
<div class="shrink-0">
|
|
23
|
+
<svg class="shrink-0 size-5 mt-0.5" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z"/><path d="M12 9v4"/><path d="M12 17h.01"/></svg>
|
|
24
|
+
</div>
|
|
25
|
+
<div class="ms-4 flex-1">
|
|
26
|
+
<h3 class="font-extrabold"> ${title} </h3>
|
|
27
|
+
<div class="mt-1 prose prose-sm md:prose-base dark:prose-invert max-w-none">
|
|
28
|
+
|
|
29
|
+
`;
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
closeRender: () => `</div></div></div></div>`
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @returns
|
|
5
|
+
*/
|
|
6
|
+
export function definition() {
|
|
7
|
+
let name = 'definition'
|
|
8
|
+
|
|
9
|
+
return {
|
|
10
|
+
name,
|
|
11
|
+
validate: (/** @type {string} */ params) =>
|
|
12
|
+
new RegExp(`^${name}(\\[(.+?)\\])?$`).test(params.trim()),
|
|
13
|
+
|
|
14
|
+
openRender: (/** @type {{ [x: string]: { info: string; }; }} */ tokens, /** @type {string | number} */ index) => {
|
|
15
|
+
const info = tokens[index].info.trim();
|
|
16
|
+
const match = info.match(new RegExp(`^${name}\\[(.+?)\\]$`));
|
|
17
|
+
const title = match ? match[1] : 'Definition';
|
|
18
|
+
|
|
19
|
+
// },
|
|
20
|
+
return `<div
|
|
21
|
+
class="not-prose group relative overflow-hidden rounded-2xl border-2 border-blue-400 bg-linear-to-br from-blue-50 to-indigo-50 shadow-md dark:border-blue-600 dark:from-blue-950/30 dark:to-indigo-950/30 my-6"
|
|
22
|
+
>
|
|
23
|
+
<div
|
|
24
|
+
class="absolute top-0 left-0 flex size-15 md:size-20 items-center justify-center bg-blue-500 dark:bg-blue-600"
|
|
25
|
+
>
|
|
26
|
+
<span class="text-3xl font-black text-white">D</span>
|
|
27
|
+
</div>
|
|
28
|
+
<div class="py-6 pr-6 pl-18 md:pl-24">
|
|
29
|
+
<div class="flex items-start gap-4">
|
|
30
|
+
<div class="flex-1 ">
|
|
31
|
+
<div class="mb-2 flex items-center gap-3">
|
|
32
|
+
<h3 class=" font-bold text-blue-900 dark:text-blue-300">${title}</h3>
|
|
33
|
+
<span
|
|
34
|
+
class="rounded bg-blue-500/20 px-2 py-1 font-mono text-xs text-blue-700 dark:bg-blue-500/30 dark:text-blue-300"
|
|
35
|
+
>
|
|
36
|
+
concept
|
|
37
|
+
</span>
|
|
38
|
+
</div>
|
|
39
|
+
<div class="prose text-slate-700 dark:text-slate-300">
|
|
40
|
+
|
|
41
|
+
`;
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
closeRender: () => `</div></div></div></div></div>`
|
|
45
|
+
};
|
|
46
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
export function done() {
|
|
8
|
+
let name = 'done'
|
|
9
|
+
|
|
10
|
+
return {
|
|
11
|
+
name,
|
|
12
|
+
validate: (/** @type {string} */ params) =>
|
|
13
|
+
new RegExp(`^${name}(\\[(.+?)\\])?$`).test(params.trim()),
|
|
14
|
+
|
|
15
|
+
openRender: (/** @type {{ [x: string]: { info: string; }; }} */ tokens, /** @type {string | number} */ index) => {
|
|
16
|
+
const info = tokens[index].info.trim();
|
|
17
|
+
const match = info.match(new RegExp(`^${name}\\[(.+?)\\]$`));
|
|
18
|
+
const title = match ? match[1] : 'Title';
|
|
19
|
+
|
|
20
|
+
// return `
|
|
21
|
+
// <div id="callout" class="callout " data-callout="${name}" >
|
|
22
|
+
|
|
23
|
+
// <div class="callout-title">
|
|
24
|
+
// <div class="callout-title-icon font-bold"> ${BEAR_CALLOUTS[name] }</div>
|
|
25
|
+
// <div class="callout-title-inner" >${md.renderInline(title)}</div>
|
|
26
|
+
// </div>
|
|
27
|
+
// <div class="callout-content ">`;
|
|
28
|
+
// },
|
|
29
|
+
return `
|
|
30
|
+
<div
|
|
31
|
+
class="not-prose group relative overflow-hidden rounded-2xl bg-green-50 border border-green-200 shadow-lg t dark:border-green-900 dark:bg-green-800/30 m-2 md:m-6"
|
|
32
|
+
>
|
|
33
|
+
<div class="absolute top-4 right-4 h-16 w-16">
|
|
34
|
+
<div
|
|
35
|
+
class="absolute inset-0 rounded-full border-2 border-green-500/30 dark:border-green-400/30"
|
|
36
|
+
></div>
|
|
37
|
+
<div
|
|
38
|
+
class="absolute inset-2 rounded-full border-2 border-green-500/50 dark:border-green-400/50"
|
|
39
|
+
style="animation: pulse-glow 2s ease-in-out infinite 0.5s;"
|
|
40
|
+
></div>
|
|
41
|
+
<div class="absolute inset-0 flex items-center justify-center">
|
|
42
|
+
<div class="h-3 w-3 rounded-full bg-green-500 dark:bg-green-400"></div>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
<div class="p-6 pr-24 flex-1 relative">
|
|
46
|
+
|
|
47
|
+
<div class="prose prose-sm md:prose-base max-w-none text-slate-700 dark:text-slate-300">`;
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
closeRender: () => `</div></div></div>`
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
//<div class="callout-title-icon">(ಠ_ಠ) ${ICONS[name] || ICONS.info}</div>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @returns
|
|
5
|
+
*/
|
|
6
|
+
export function eg() {
|
|
7
|
+
let name = 'eg'
|
|
8
|
+
|
|
9
|
+
return {
|
|
10
|
+
name,
|
|
11
|
+
validate: (/** @type {string} */ params) =>
|
|
12
|
+
new RegExp(`^${name}(\\[(.+?)\\])?$`).test(params.trim()),
|
|
13
|
+
|
|
14
|
+
openRender: (/** @type {{ [x: string]: { info: string; }; }} */ tokens, /** @type {string | number} */ index) => {
|
|
15
|
+
const info = tokens[index].info.trim();
|
|
16
|
+
const match = info.match(new RegExp(`^${name}\\[(.+?)\\]$`));
|
|
17
|
+
const title = match ? match[1] : 'Examples';
|
|
18
|
+
return `
|
|
19
|
+
<div
|
|
20
|
+
class="not-prose group relative overflow-hidden rounded-2xl border-l-4 border-cyan-500 bg-white shadow-md my:3 md:my-6 hover:shadow-lg dark:border-cyan-600 dark:bg-slate-900/20"
|
|
21
|
+
>
|
|
22
|
+
<div class="p-6">
|
|
23
|
+
<div class="flex items-start gap-4">
|
|
24
|
+
|
|
25
|
+
<div class="flex-1">
|
|
26
|
+
<div class="mb-3 font-bold text-cyan-900 dark:text-cyan-300">📝 ${title}</div>
|
|
27
|
+
<div class="prose [&_ul]:list-disc [&_ul]:pl-0 md:[&_ul]:pl-6 [&_ul]:list-outside prose-li:marker:text-slate-700 text-slate-700 dark:text-slate-300 max-w-none">
|
|
28
|
+
|
|
29
|
+
`;
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
closeRender: () => `</div></div></div></div></div>`
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
//<div class="callout-title-icon">(ಠ_ಠ) ${ICONS[name] || ICONS.info}</div>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @returns
|
|
5
|
+
*/
|
|
6
|
+
export function important() {
|
|
7
|
+
let name = 'important'
|
|
8
|
+
|
|
9
|
+
return {
|
|
10
|
+
name,
|
|
11
|
+
validate: (/** @type {string} */ params) =>
|
|
12
|
+
new RegExp(`^${name}(\\[(.+?)\\])?$`).test(params.trim()),
|
|
13
|
+
|
|
14
|
+
openRender: (/** @type {{ [x: string]: { info: string; }; }} */ tokens, /** @type {string | number} */ index) => {
|
|
15
|
+
const info = tokens[index].info.trim();
|
|
16
|
+
const match = info.match(new RegExp(`^${name}\\[(.+?)\\]$`));
|
|
17
|
+
const title = match ? match[1] : 'Important';
|
|
18
|
+
return `
|
|
19
|
+
<div
|
|
20
|
+
class="not-prose group my-6 overflow-hidden rounded-r-xl border-l-4 border-blue-500 bg-blue-50 dark:border-blue-600 dark:bg-blue-950/20"
|
|
21
|
+
>
|
|
22
|
+
<div class="p-6">
|
|
23
|
+
<div class="flex items-start gap-4">
|
|
24
|
+
<div class="flex-1 min-w-0 relative">
|
|
25
|
+
<h3 class="mb-2 font-bold text-blue-900 dark:text-blue-300">${title}</h3>
|
|
26
|
+
<div class="prose text-blue-900/80 dark:text-blue-200/80 [&_.katex-display]:my-6 [&_.katex-display]:text-center [&_.katex-display>span]:mx-auto [&_.katex-display>_.katex]:whitespace-normal! mx-auto">
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
`;
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
closeRender: () => `</div></div></div></div></div>`
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
//<div class="callout-title-icon">(ಠ_ಠ) ${ICONS[name] || ICONS.info}</div>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* @returns
|
|
4
|
+
*/
|
|
5
|
+
export function properties() {
|
|
6
|
+
let name = 'properties'
|
|
7
|
+
|
|
8
|
+
return {
|
|
9
|
+
name,
|
|
10
|
+
validate: (/** @type {string} */ params) =>
|
|
11
|
+
new RegExp(`^${name}(\\[(.+?)\\])?$`).test(params.trim()),
|
|
12
|
+
|
|
13
|
+
openRender: (/** @type {{ [x: string]: { info: string; }; }} */ tokens, /** @type {string | number} */ index) => {
|
|
14
|
+
const info = tokens[index].info.trim();
|
|
15
|
+
const match = info.match(new RegExp(`^${name}\\[(.+?)\\]$`));
|
|
16
|
+
const title = match ? match[1] : 'Title';
|
|
17
|
+
|
|
18
|
+
// },
|
|
19
|
+
return `
|
|
20
|
+
<div
|
|
21
|
+
class="not-prose group relative overflow-hidden rounded-2xl border border-cyan-300 bg-linear-to-br from-cyan-50 to-blue-50 shadow-lg dark:border-cyan-800 dark:from-cyan-950/20 dark:to-blue-950/20 "
|
|
22
|
+
>
|
|
23
|
+
<div class="p-6">
|
|
24
|
+
<div class="flex items-start gap-4">
|
|
25
|
+
<div class="shrink-0">
|
|
26
|
+
<div class="relative size-10">
|
|
27
|
+
<div
|
|
28
|
+
class=" absolute inset-0 rounded-full bg-cyan-400/20 blur-lg dark:bg-cyan-500/20"
|
|
29
|
+
></div>
|
|
30
|
+
<div
|
|
31
|
+
class="relative flex size-10 items-center justify-center rounded-full bg-linear-to-br from-cyan-400 to-blue-500 dark:from-cyan-500 dark:to-blue-600"
|
|
32
|
+
>
|
|
33
|
+
📑
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
<div class="flex-1">
|
|
38
|
+
<h3 class="mb-2 font-bold text-cyan-900 dark:text-cyan-300">${title}</h3>
|
|
39
|
+
<div class="prose text-slate-700 dark:text-slate-300">
|
|
40
|
+
|
|
41
|
+
`;
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
closeRender: () => `</div></div></div></div></div>`
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
//<div class="callout-title-icon">(ಠ_ಠ) ${ICONS[name] || ICONS.info}</div>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @returns
|
|
5
|
+
*/
|
|
6
|
+
export function remember() {
|
|
7
|
+
let name = 'remember'
|
|
8
|
+
|
|
9
|
+
return {
|
|
10
|
+
name,
|
|
11
|
+
validate: (/** @type {string} */ params) =>
|
|
12
|
+
new RegExp(`^${name}(\\[(.+?)\\])?$`).test(params.trim()),
|
|
13
|
+
|
|
14
|
+
openRender: (/** @type {{ [x: string]: { info: string; }; }} */ tokens, /** @type {string | number} */ index) => {
|
|
15
|
+
const info = tokens[index].info.trim();
|
|
16
|
+
const match = info.match(new RegExp(`^${name}\\[(.+?)\\]$`));
|
|
17
|
+
const title = match ? match[1] : 'Remember';
|
|
18
|
+
return `
|
|
19
|
+
<div class="group relative bg-violet-50 shadow-lg not-prose dark:bg-violet-800/30 mt-10 mb-6">
|
|
20
|
+
<div class="absolute -top-7 right-4 text-white">
|
|
21
|
+
<div class="bg-linear-to-r p-1 rounded-2xl from-indigo-500 via-purple-500 to-pink-500">
|
|
22
|
+
<div class="bg-gray-900 py-2 px-4 rounded-xl text-xl md:text-2xl">ʕ-ᴥ-ʔ</div>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
<div class="relative p-6">
|
|
26
|
+
<div class="flex items-start gap-4">
|
|
27
|
+
|
|
28
|
+
<div class="flex-1 overflow-hidden">
|
|
29
|
+
<h3 class="mb-2 font-bold text-violet-900 dark:text-violet-300">${title}</h3>
|
|
30
|
+
<div class="prose prose-sm md:prose-base text-slate-700 dark:text-slate-300 max-w-none min-w-0 prose-table:w-full prose-table:table-fixed [&_table]:w-full [&_table]:table-fixed">`;
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
closeRender: () => `</div></div></div></div></div>`
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
//<div class="callout-title-icon">(ಠ_ಠ) ${ICONS[name] || ICONS.info}</div>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* @returns
|
|
4
|
+
*/
|
|
5
|
+
export function tip() {
|
|
6
|
+
let name = 'tip'
|
|
7
|
+
|
|
8
|
+
return {
|
|
9
|
+
name,
|
|
10
|
+
validate: (/** @type {string} */ params) =>
|
|
11
|
+
new RegExp(`^${name}(\\[(.+?)\\])?$`).test(params.trim()),
|
|
12
|
+
|
|
13
|
+
openRender: (/** @type {{ [x: string]: { info: string; }; }} */ tokens, /** @type {string | number} */ index) => {
|
|
14
|
+
const info = tokens[index].info.trim();
|
|
15
|
+
const match = info.match(new RegExp(`^${name}\\[(.+?)\\]$`));
|
|
16
|
+
const title = match ? match[1] : 'Tip';
|
|
17
|
+
|
|
18
|
+
return `
|
|
19
|
+
<div class="not-prose group relative overflow-hidden rounded-xl border border-pink-500/50 bg-zinc-900 dark:border-pink-600/50 dark:bg-zinc-950 " data-callout="${name}">
|
|
20
|
+
<div class="absolute inset-0 bg-linear-to-br from-pink-500/5 via-transparent to-cyan-500/5"></div>
|
|
21
|
+
|
|
22
|
+
<div class="relative p-6">
|
|
23
|
+
<div class="flex-1">
|
|
24
|
+
<div class="flex items-center space-x-2">
|
|
25
|
+
<div class="shrink-0">
|
|
26
|
+
<div class="relative">
|
|
27
|
+
<div class="absolute inset-0 rounded-lg bg-pink-500 opacity-50 blur"></div>
|
|
28
|
+
<div class="relative flex size-8 md:size-9 items-center justify-center rounded-lg bg-pink-500 dark:bg-pink-600">
|
|
29
|
+
<svg class="h-5 w-5 animate-pulse text-white" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
30
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path>
|
|
31
|
+
</svg>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
<h3 class="text-white font-bold">${title}</h3>
|
|
36
|
+
</div>
|
|
37
|
+
<div class="leading-relaxed text-zinc-300 dark:text-zinc-400">
|
|
38
|
+
|
|
39
|
+
`;
|
|
40
|
+
},
|
|
41
|
+
|
|
42
|
+
closeRender: () => `</div></div></div></div>`
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
//<div class="callout-title-icon">(ಠ_ಠ) ${ICONS[name] || ICONS.info}</div>
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,12 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
1
|
+
export { abstract } from './callouts/abstract.js';
|
|
2
|
+
export { caution } from './callouts/caution.js';
|
|
3
|
+
export { definition } from './callouts/definition.js';
|
|
4
|
+
export { done } from './callouts/done.js';
|
|
5
|
+
export { example } from './callouts/example.js';
|
|
6
|
+
export { eg } from './callouts/examplegraph.js';
|
|
7
|
+
export { important } from './callouts/important.js';
|
|
8
|
+
export { note } from './callouts/note.js';
|
|
9
|
+
export { properties } from './callouts/properties.js';
|
|
10
|
+
export { remember } from './callouts/remember.js';
|
|
11
|
+
export { tip } from './callouts/tip.js';
|
|
12
|
+
export { step } from './steps/step.js';
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
1
|
// Reexport your entry components here
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
// Reexport your entry components here
|
|
3
|
+
// Callouts
|
|
4
|
+
export { abstract } from './callouts/abstract.js';
|
|
5
|
+
export { caution } from './callouts/caution.js';
|
|
6
|
+
export { definition } from './callouts/definition.js';
|
|
7
|
+
export { done } from './callouts/done.js';
|
|
8
|
+
export { example } from './callouts/example.js';
|
|
9
|
+
export { eg } from './callouts/examplegraph.js';
|
|
10
|
+
export { important } from './callouts/important.js';
|
|
11
|
+
export { note } from './callouts/note.js';
|
|
12
|
+
export { properties } from './callouts/properties.js';
|
|
13
|
+
export { remember } from './callouts/remember.js';
|
|
14
|
+
export { tip } from './callouts/tip.js';
|
|
15
|
+
// Steps
|
|
16
|
+
export { step } from './steps/step.js';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @returns
|
|
3
|
+
*/
|
|
4
|
+
export function step(): {
|
|
5
|
+
name: string;
|
|
6
|
+
marker: string;
|
|
7
|
+
validate: (params: string) => boolean;
|
|
8
|
+
openRender: (tokens: {
|
|
9
|
+
[x: string]: {
|
|
10
|
+
info: string;
|
|
11
|
+
};
|
|
12
|
+
}, index: string | number, _options: any) => string;
|
|
13
|
+
closeRender: () => string;
|
|
14
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
|
|
2
|
+
let stepIndex = 0;
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
export function step() {
|
|
8
|
+
let name = 'step'
|
|
9
|
+
|
|
10
|
+
return {
|
|
11
|
+
name,
|
|
12
|
+
marker: '~',
|
|
13
|
+
validate: (/** @type {string} */ params) => /^step\[(.+?)\]$/.test(params.trim()),
|
|
14
|
+
openRender: (/** @type {{ [x: string]: { info: string; }; }} */ tokens, /** @type {string | number} */ index, /** @type {any} */ _options) => {
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
stepIndex++;
|
|
18
|
+
const info = tokens[index].info.trim();
|
|
19
|
+
const match = info.match(/^step\[(.+?)\]$/);
|
|
20
|
+
const title = match ? match[1] : "Step";
|
|
21
|
+
return `<div role="listitem" class="step group/step relative flex items-start pb-5">
|
|
22
|
+
<div
|
|
23
|
+
data-component-part="step-line"
|
|
24
|
+
class="absolute top-11 h-[calc(100%-2.75rem)] w-px bg-gray-200/70 dark:bg-white/10"
|
|
25
|
+
contenteditable="false"
|
|
26
|
+
></div>
|
|
27
|
+
<div
|
|
28
|
+
class="absolute -ml-3.25 py-2"
|
|
29
|
+
data-component-part="step-number"
|
|
30
|
+
contenteditable="false"
|
|
31
|
+
>
|
|
32
|
+
<div
|
|
33
|
+
class="flex size-7 shrink-0 items-center justify-center rounded-full bg-gray-50 text-xs font-semibold text-gray-900 dark:bg-white/10 dark:text-gray-50"
|
|
34
|
+
>
|
|
35
|
+
${stepIndex}
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
<div class="w-full overflow-hidden pr-px pl-8">
|
|
39
|
+
<p
|
|
40
|
+
class="not-prose mt-2 font-semibold text-gray-900 dark:text-gray-200 dark:prose-invert"
|
|
41
|
+
|
|
42
|
+
>
|
|
43
|
+
${title}
|
|
44
|
+
</p>
|
|
45
|
+
|
|
46
|
+
<div data-component-part="step-content" class="prose prose-sm md:prose-base dark:prose-invert">`;
|
|
47
|
+
},
|
|
48
|
+
closeRender: () => {
|
|
49
|
+
|
|
50
|
+
return `</div>\n</div>\n</div>\n`;
|
|
51
|
+
},
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
package/package.json
CHANGED
package/dist/H1.svelte
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
H1
|
package/dist/H1.svelte.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export default H1;
|
|
2
|
-
type H1 = SvelteComponent<{
|
|
3
|
-
[x: string]: never;
|
|
4
|
-
}, {
|
|
5
|
-
[evt: string]: CustomEvent<any>;
|
|
6
|
-
}, {}> & {
|
|
7
|
-
$$bindings?: string | undefined;
|
|
8
|
-
};
|
|
9
|
-
declare const H1: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
-
[x: string]: never;
|
|
11
|
-
}, {
|
|
12
|
-
[evt: string]: CustomEvent<any>;
|
|
13
|
-
}, {}, {}, string>;
|
|
14
|
-
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
15
|
-
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
16
|
-
$$bindings?: Bindings;
|
|
17
|
-
} & Exports;
|
|
18
|
-
(internal: unknown, props: {
|
|
19
|
-
$$events?: Events;
|
|
20
|
-
$$slots?: Slots;
|
|
21
|
-
}): Exports & {
|
|
22
|
-
$set?: any;
|
|
23
|
-
$on?: any;
|
|
24
|
-
};
|
|
25
|
-
z_$$bindings?: Bindings;
|
|
26
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|