tools.equationzone 0.0.1 → 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.
@@ -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,13 @@
1
+ /**
2
+ * @returns
3
+ */
4
+ export function caution(): {
5
+ name: string;
6
+ validate: (params: string) => boolean;
7
+ openRender: (tokens: {
8
+ [x: string]: {
9
+ info: string;
10
+ };
11
+ }, index: string | number) => string;
12
+ closeRender: () => string;
13
+ };
@@ -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,13 @@
1
+ /**
2
+ * @returns
3
+ */
4
+ export function definition(): {
5
+ name: string;
6
+ validate: (params: string) => boolean;
7
+ openRender: (tokens: {
8
+ [x: string]: {
9
+ info: string;
10
+ };
11
+ }, index: string | number) => string;
12
+ closeRender: () => string;
13
+ };
@@ -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,13 @@
1
+ /**
2
+ * @returns
3
+ */
4
+ export function done(): {
5
+ name: string;
6
+ validate: (params: string) => boolean;
7
+ openRender: (tokens: {
8
+ [x: string]: {
9
+ info: string;
10
+ };
11
+ }, index: string | number) => string;
12
+ closeRender: () => string;
13
+ };
@@ -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,13 @@
1
+ /**
2
+ * @returns
3
+ */
4
+ export function example(): {
5
+ name: string;
6
+ validate: (params: string) => boolean;
7
+ openRender: (tokens: {
8
+ [x: string]: {
9
+ info: string;
10
+ };
11
+ }, index: string | number) => string;
12
+ closeRender: () => string;
13
+ };
@@ -0,0 +1,60 @@
1
+ /**
2
+ * @returns
3
+ */
4
+ export function example() {
5
+ let name = 'example';
6
+
7
+ return {
8
+ name,
9
+ // Corregido: Permite opcionalmente un símbolo + o - al final
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
+
16
+ // Capturamos el título [1] y el estado (+/-) [3]
17
+ const match = info.match(new RegExp(`^${name}(\\[(.+?)\\])?(\\+|-)?$`));
18
+
19
+ const title = (match && match[2]) ? match[2] : 'Ejemplos';
20
+ const state = (match && match[3]) ? match[3] : ''; // "+" o "-" o ""
21
+
22
+ // Si tiene "+", el <details> debe estar abierto por defecto
23
+ const isOpen = state === '+' ? 'open' : '';
24
+
25
+ return `
26
+ <details
27
+ ${isOpen}
28
+ class="not-prose group mt-4 overflow-hidden rounded-xl border border-gray-200 bg-white transition-all dark:border-gray-800 dark:bg-[#0B0C0E]"
29
+ >
30
+ <summary
31
+ class="flex w-full cursor-pointer list-none items-center justify-between p-3.5 text-gray-600 transition-colors hover:bg-gray-50 hover:text-gray-900 dark:text-gray-400 dark:hover:bg-white/5 dark:hover:text-gray-200 [&::-webkit-details-marker]:hidden"
32
+ >
33
+ <div class="flex items-center">
34
+ <svg
35
+ class="h-3 w-3 text-gray-400 transition-transform duration-200 group-open:rotate-90"
36
+ xmlns="http://www.w3.org/2000/svg"
37
+ viewBox="0 0 24 24"
38
+ fill="none"
39
+ stroke="currentColor"
40
+ stroke-width="3"
41
+ stroke-linecap="round"
42
+ stroke-linejoin="round"
43
+ >
44
+ <polyline points="9 18 15 12 9 6"></polyline>
45
+ </svg>
46
+ <div class="ml-3 flex items-center gap-2">
47
+ <h3 class="font-semibold text-inherit">${title}</h3>
48
+ </div>
49
+ </div>
50
+ </summary>
51
+
52
+ <div
53
+ class="prose max-w-none prose-sm md:prose-base border-t border-gray-100 bg-gray-50/30 px-5 py-4 dark:border-white/5 dark:bg-black/10 prose-hr:my-3 pl-4 md:pl-6 [&_ul]:list-disc [&_ul]:pl-4 md:[&_ul]:pl-4 [&_ul]:list-outside prose-li:marker:text-slate-700 "
54
+ >
55
+ `;
56
+ },
57
+
58
+ closeRender: () => `</div></details>`
59
+ };
60
+ }
@@ -0,0 +1,13 @@
1
+ /**
2
+ * @returns
3
+ */
4
+ export function eg(): {
5
+ name: string;
6
+ validate: (params: string) => boolean;
7
+ openRender: (tokens: {
8
+ [x: string]: {
9
+ info: string;
10
+ };
11
+ }, index: string | number) => string;
12
+ closeRender: () => string;
13
+ };
@@ -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,13 @@
1
+ /**
2
+ * @returns
3
+ */
4
+ export function important(): {
5
+ name: string;
6
+ validate: (params: string) => boolean;
7
+ openRender: (tokens: {
8
+ [x: string]: {
9
+ info: string;
10
+ };
11
+ }, index: string | number) => string;
12
+ closeRender: () => string;
13
+ };
@@ -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,13 @@
1
+ /**
2
+ * @returns
3
+ */
4
+ export function properties(): {
5
+ name: string;
6
+ validate: (params: string) => boolean;
7
+ openRender: (tokens: {
8
+ [x: string]: {
9
+ info: string;
10
+ };
11
+ }, index: string | number) => string;
12
+ closeRender: () => string;
13
+ };
@@ -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,13 @@
1
+ /**
2
+ * @returns
3
+ */
4
+ export function remember(): {
5
+ name: string;
6
+ validate: (params: string) => boolean;
7
+ openRender: (tokens: {
8
+ [x: string]: {
9
+ info: string;
10
+ };
11
+ }, index: string | number) => string;
12
+ closeRender: () => string;
13
+ };
@@ -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,13 @@
1
+ /**
2
+ * @returns
3
+ */
4
+ export function tip(): {
5
+ name: string;
6
+ validate: (params: string) => boolean;
7
+ openRender: (tokens: {
8
+ [x: string]: {
9
+ info: string;
10
+ };
11
+ }, index: string | number) => string;
12
+ closeRender: () => string;
13
+ };
@@ -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 +1,12 @@
1
- export { note } from './note.js';
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,2 +1,16 @@
1
1
  // Reexport your entry components here
2
- export { note } from './note.js';
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tools.equationzone",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "files": [
5
5
  "dist",
6
6
  "!dist/**/*.test.*",
package/dist/H1.svelte DELETED
@@ -1 +0,0 @@
1
- H1
@@ -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