comark-ui 0.8.1 → 0.9.0
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 +3 -1
- package/dist/client.d.mts +2 -2
- package/dist/client.mjs +2 -2
- package/dist/editor-vue.mjs +1 -4
- package/dist/html.d.mts +2 -2
- package/dist/html.mjs +3 -3
- package/dist/{index-DVGSDzBS.d.mts → index-Cq3zytGw.d.mts} +70 -6
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +3 -3
- package/dist/nodes-CwDBFXnO.mjs +5 -0
- package/dist/react.d.mts +2 -2
- package/dist/react.mjs +3 -3
- package/dist/skills/comark-ui/SKILL.md +1 -1
- package/dist/skills/comark-ui/references/code.md +2 -2
- package/dist/skills/comark-ui/references/markdown-it-to-comark.md +28 -0
- package/dist/skills/comark-ui/references/marked-to-comark.md +28 -0
- package/dist/skills/comark-ui/references/migrate-to-comark.md +33 -0
- package/dist/skills/comark-ui/references/quiz.md +1 -1
- package/dist/skills/comark-ui/references/remark-to-comark.md +9 -3
- package/dist/skills/comark-ui/references/ui.md +2 -1
- package/dist/skills.mjs +18 -6
- package/dist/src-MvpWiv9v.mjs +293 -0
- package/dist/svelte/index.d.ts +1 -1
- package/dist/svelte/index.js +1 -1
- package/dist/{typeset-css-blSNpFNK.mjs → typeset-css-BOtdXbMg.mjs} +24 -7
- package/dist/{typeset-css-DdOGL7WF.d.mts → typeset-css-DtOLAa1Z.d.mts} +7 -1
- package/dist/typeset.css +1 -0
- package/dist/vue.d.mts +2 -2
- package/dist/vue.mjs +7 -7
- package/package.json +50 -47
- package/dist/src-PkmYCSNu.mjs +0 -120
package/dist/typeset.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer comark{@layer typeset{@scope (.comark-typeset){:where(:scope){--_comark-background:var(--comark-background,var(--ui-bg,var(--background,#fff)));--_comark-foreground:var(--comark-foreground,var(--ui-text-highlighted,var(--foreground,#0a0a0a)));--_comark-muted:var(--comark-muted,var(--ui-text-muted,var(--muted-foreground,#737373)));--_comark-border:var(--comark-border,var(--ui-border,var(--border,#e5e5e5)));--_comark-accent:var(--comark-accent,var(--ui-bg-elevated,var(--accent,#f5f5f5)));--_comark-ring:var(--comark-ring,var(--ui-primary,var(--ring,#a1a1a1)));--_comark-primary:var(--comark-primary,var(--ui-primary,var(--primary,var(--_comark-foreground))));--_comark-primary-foreground:var(--comark-primary-foreground,var(--ui-text-inverted,var(--primary-foreground,var(--_comark-background))));--_comark-secondary:var(--comark-secondary,var(--ui-secondary,var(--_comark-muted)));--_comark-radius:var(--comark-radius,calc(var(--ui-radius,calc(var(--radius,.625rem)/2))*2));--_comark-font:var(--comark-font,var(--font-sans,ui-sans-serif,system-ui,sans-serif))}@media(prefers-color-scheme:dark){:where(:not(.light,.light *)):is(:where(:scope)){--_comark-background:var(--comark-background,var(--ui-bg,var(--background,#0a0a0a)));--_comark-foreground:var(--comark-foreground,var(--ui-text-highlighted,var(--foreground,#fafafa)));--_comark-muted:var(--comark-muted,var(--ui-text-muted,var(--muted-foreground,#a1a1a1)));--_comark-border:var(--comark-border,var(--ui-border,var(--border,rgb(255 255 255/.1))));--_comark-accent:var(--comark-accent,var(--ui-bg-elevated,var(--accent,#262626)));--_comark-ring:var(--comark-ring,var(--ui-primary,var(--ring,#737373)));--_comark-primary:var(--comark-primary,var(--ui-primary,var(--primary,var(--_comark-foreground))));--_comark-primary-foreground:var(--comark-primary-foreground,var(--ui-text-inverted,var(--primary-foreground,var(--_comark-background))));--_comark-secondary:var(--comark-secondary,var(--ui-secondary,var(--_comark-muted)))}}:where(.dark,.dark *):is(:where(:scope)){--_comark-background:var(--comark-background,var(--ui-bg,var(--background,#0a0a0a)));--_comark-foreground:var(--comark-foreground,var(--ui-text-highlighted,var(--foreground,#fafafa)));--_comark-muted:var(--comark-muted,var(--ui-text-muted,var(--muted-foreground,#a1a1a1)));--_comark-border:var(--comark-border,var(--ui-border,var(--border,rgb(255 255 255/.1))));--_comark-accent:var(--comark-accent,var(--ui-bg-elevated,var(--accent,#262626)));--_comark-ring:var(--comark-ring,var(--ui-primary,var(--ring,#737373)));--_comark-primary:var(--comark-primary,var(--ui-primary,var(--primary,var(--_comark-foreground))));--_comark-primary-foreground:var(--comark-primary-foreground,var(--ui-text-inverted,var(--primary-foreground,var(--_comark-background))));--_comark-secondary:var(--comark-secondary,var(--ui-secondary,var(--_comark-muted)))}:scope{--_ty-flow:var(--typeset-flow,1.25em);--_ty-muted:var(--_comark-muted);--_ty-rule:var(--_comark-border);--_ty-surface:var(--_comark-accent);--_ty-radius:calc(var(--_comark-radius) * 0.8);--_ty-mono:var(--comark-font-mono,var(--font-mono,ui-monospace,SFMono-Regular,Menlo,Consolas,monospace));font-family:var(--_comark-font);font-size:calc(var(--typeset-size,1em) * 1.125);line-height:var(--typeset-leading,1.75);color:var(--_comark-foreground);overflow-wrap:break-word;background-image:var(--comark-grain,url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E"));background-repeat:repeat;background-size:var(--comark-grain-size,256px 256px);@media(min-width:48rem),print{font-size:var(--typeset-size,1em);}}:scope *:not(:where(.not-typeset,[data-not-typeset],.not-typeset *,[data-not-typeset] *)){&:where(p){margin-block:var(--_ty-flow) 0;}&:where(h1,h2,h3,h4,h5,h6){color:var(--_comark-foreground);font-family:var(--comark-font-heading,var(--font-heading,inherit));font-weight:600;margin-block-end:0;}&:where(h1){font-size:1.75em;line-height:1.3;margin-block-start:var(--_ty-flow);}&:where(h2){font-size:1.25em;line-height:1.4;margin-block-start:calc(var(--_ty-flow) * 1.4);}&:where(h3){font-size:1.125em;line-height:1.45;margin-block-start:var(--_ty-flow);}&:where(h4){font-size:1em;line-height:1.5;margin-block-start:var(--_ty-flow);}&:where(h5){font-size:0.875em;line-height:1.5;font-weight:500;color:var(--_ty-muted);margin-block-start:calc(var(--_ty-flow) / 0.875);}&:where(h6){font-size:0.8125em;line-height:1.5;font-weight:500;letter-spacing:0.08em;text-transform:uppercase;color:var(--_ty-muted);margin-block-start:calc(var(--_ty-flow) / 0.8125);}&:where([id]){scroll-margin-block-start:var(--_ty-flow);}&:where(h1 + *,h2 + *,h3 + *,h4 + *,h5 + *,h6 + *){margin-block-start:1em;}&:where(:is(h1,h2,h3,h4) code){font-size:0.9em;}&:where(a){color:inherit;font-weight:500;text-decoration-line:underline;text-decoration-color:color-mix(in oklab,currentColor 30%,transparent);}&:where(a:hover){text-decoration-color:currentColor;}&:where(a:focus-visible){outline:2px solid var(--_comark-ring);outline-offset:2px;border-radius:0.125em;}&:where(:is(h1,h2,h3,h4,h5,h6) a){font-weight:inherit;}&:where(strong,b){font-weight:600;}&:where(mark){background-color:color-mix(in oklab,oklch(0.86 0.17 95) 40%,transparent);color:inherit;padding:0.05em 0.15em;border-radius:0.2em;}&:where(abbr[title]){text-decoration-line:underline;text-decoration-style:dotted;text-underline-offset:0.2em;cursor:help;}&:where(del,s){color:var(--_ty-muted);text-decoration-line:line-through;}&:where(sup,sub){font-size:0.75em;line-height:0;position:relative;vertical-align:baseline;}&:where(sup){top:-0.5em;}&:where(sub){bottom:-0.25em;}&:where(sup a){text-decoration-line:none;font-weight:500;}&:where(ul){list-style-type:disc;}&:where(ol){list-style-type:decimal;}&:where(ul ul){list-style-type:circle;}&:where(ul ul ul){list-style-type:square;}&:where(ol[type="a" i]){list-style-type:lower-alpha;}&:where(ol[type="i" i]){list-style-type:lower-roman;}&:where(ol[type="A" s]){list-style-type:upper-alpha;}&:where(ol[type="I" s]){list-style-type:upper-roman;}&:where(ul,ol){margin-block:var(--_ty-flow) 0;padding-inline-start:1.5em;}&:where(li){margin-block-start:0.5em;padding-inline-start:0.4em;}&:where(li>p,li>ul,li>ol){margin-block-start:0.5em;}&:where(ul>li,ol>li)::marker{color:var(--_ty-muted);}&:where(ul.contains-task-list){list-style-type:none;padding-inline-start:0.25em;}&:where(li.task-list-item>input[type="checkbox"]){margin-inline-end:0.5em;vertical-align:-0.1em;accent-color:var(--_comark-primary);}&:where(details){margin-block:var(--_ty-flow) 0;}&:where(summary){cursor:pointer;font-weight:500;}&:where(summary)::marker{color:var(--_ty-muted);}&:where(kbd){font-family:inherit;font-size:0.85em;font-weight:500;border:1px solid var(--_ty-rule);border-block-end-width:2px;border-radius:0.35em;padding:0.0625em 0.35em;}&:where(dl){margin-block:var(--_ty-flow) 0;}&:where(dt){font-weight:500;margin-block-start:1em;}&:where(dt + dt){margin-block-start:0.25em;}&:where(dd){margin-block-start:0.25em;margin-inline-start:0;padding-inline-start:1em;color:var(--_ty-muted);}&:where(:not(pre)>code){background-color:var(--_ty-surface);font-family:var(--_ty-mono);font-size:0.85em;border-radius:0.35em;padding:0.125em 0.3em;}&:where(pre){background-color:var(--_ty-surface);font-family:var(--_ty-mono);font-size:0.875em;line-height:1.5;tab-size:2;direction:ltr;border-radius:var(--_ty-radius);padding:0.75em 1em;overflow-x:auto;margin-block:calc(var(--_ty-flow) / 0.875) 0;}&:where(pre code){background-color:transparent;font-family:inherit;font-size:inherit;padding:0;border-radius:0;}&:where(blockquote){border-inline-start:2px solid var(--_ty-rule);padding-inline-start:1em;margin-block:var(--_ty-flow) 0;margin-inline:0;}&:where(hr){border:0;border-block-start:1px solid var(--_ty-rule);margin-block:calc(var(--_ty-flow) * 2.4) 0;}&:where(hr + h1,hr + h2,hr + h3,hr + h4){margin-block-start:var(--_ty-flow);}&:where(.footnotes,[data-footnotes]){margin-block-start:calc(var(--_ty-flow) * 2);font-size:0.875em;color:var(--_ty-muted);}&:where(.footnotes>hr:first-child){margin-block-start:0;}&:where(.footnote-ref a,.footnote-backref){text-decoration-line:none;}&:where(math[display="block"]){margin-block:var(--_ty-flow) 0;overflow-x:auto;overflow-y:hidden;padding-block:0.25em;}&:where(img,video){border-radius:var(--_ty-radius);max-width:100%;height:auto;margin-block:var(--_ty-flow) 0;}&:where(:is(p,li,td,th,a) img){margin-block-start:0;}&:where(figure){margin-block:var(--_ty-flow) 0;margin-inline:0;}&:where(figcaption,caption){color:var(--_ty-muted);font-size:0.875em;text-align:center;margin-block-start:calc(0.75em / 0.875);}&:where(caption){caption-side:bottom;}&:where(table){display:block;width:max-content;max-width:100%;overflow-x:auto;font-size:1em;line-height:1.5;font-variant-numeric:tabular-nums;border-collapse:separate;border-spacing:0;border-block-end:1px solid var(--_ty-rule);margin-block:var(--_ty-flow) 0;}&:where(thead th){font-weight:500;text-align:start;padding:0.65em 1em;}&:where(:is(tbody,tfoot) :is(td,th)){padding:0.75em 1em;text-align:start;vertical-align:top;border-block-start:1px solid var(--_ty-rule);}&:where(tbody th,tfoot th){font-weight:500;}&:where(th:first-child,td:first-child){padding-inline-start:0;}&:where(th[align="center"],td[align="center"]){text-align:center;}&:where(th[align="right"],td[align="right"]){text-align:end;}&:where(li>blockquote,li>table,li>figure){margin-block-start:0.5em;}&:where(li>pre){margin-block-start:calc(0.5em / 0.875);}@media print{&:where(pre,table,blockquote,figure){break-inside:avoid;}&:where(h1,h2,h3,h4){break-after:avoid;}}@media(forced-colors:active){&:where(:not(pre)>code){border:1px solid;}}}.shiki:where(.dark *) span{&[style*="--shiki-dark:"]{color:var(--shiki-dark) !important;}&[style*="--shiki-dark-font-style:"]{font-style:var(--shiki-dark-font-style) !important;}&[style*="--shiki-dark-font-weight:"]{font-weight:var(--shiki-dark-font-weight) !important;}}@media(prefers-color-scheme:dark){.shiki:not(:where(.light *)) span{&[style*="--shiki-dark:"]{color:var(--shiki-dark) !important;}&[style*="--shiki-dark-font-style:"]{font-style:var(--shiki-dark-font-style) !important;}&[style*="--shiki-dark-font-weight:"]{font-weight:var(--shiki-dark-font-weight) !important;}}}:scope>[data-wide],:scope>:is(h2,h3,h4,.cl-heading:has(>:is(h2,h3,h4))):has(+ .ca-compare,+ style + .ca-compare){--_ty-start:max(0px,var(--comark-wide-start,0px));--_ty-end:max(0px,var(--comark-wide-end,0px));--_ty-wide:max(100%,min(var(--comark-wide-width,100vw),var(--comark-wide-max,72rem),100% + var(--_ty-start) + var(--_ty-end)));width:var(--_ty-wide);margin-inline:clamp(-1 * var(--_ty-start),(100% - var(--_ty-wide)) / 2,100% + var(--_ty-end) - var(--_ty-wide)) 0;}:scope>:where(:first-child):not(:where(.not-typeset,[data-not-typeset],.not-typeset *,[data-not-typeset] *)),:scope>:where(:first-child)>:where(:first-child):not(:where(.not-typeset,[data-not-typeset],.not-typeset *,[data-not-typeset] *)),:scope :where(li>:first-child,blockquote>:first-child,td>:first-child,th>:first-child,dd>:first-child,figure>:first-child,figure>picture>img ):not(:where(.not-typeset,[data-not-typeset],.not-typeset *,[data-not-typeset] *)){margin-block-start:0;}}}}
|
package/dist/vue.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as
|
|
1
|
+
import { a as commentsCss, n as Preset, o as criticCss, r as PresetOptions } from "./index-Cq3zytGw.mjs";
|
|
2
2
|
import { Component } from "vue";
|
|
3
3
|
//#region src/vue.d.ts
|
|
4
4
|
/** Every plugin with components for `@comark/vue`, which leaves out annotate, comments, diff, and quiz. */
|
|
5
5
|
declare const _default: (options?: PresetOptions) => Preset<Component>;
|
|
6
6
|
//#endregion
|
|
7
|
-
export { type PresetOptions, criticCss, _default as default };
|
|
7
|
+
export { type PresetOptions, commentsCss, criticCss, _default as default };
|
package/dist/vue.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import {
|
|
1
|
+
import { n as criticCss, r as preset, t as commentsCss } from "./src-MvpWiv9v.mjs";
|
|
2
|
+
import { t as typesetCss } from "./typeset-css-BOtdXbMg.mjs";
|
|
3
3
|
import { i as startMermaid, n as mermaidBar, t as addMermaidStyles } from "./client-kUEiRbtp.mjs";
|
|
4
4
|
import * as properties from "comark-properties/vue";
|
|
5
|
-
import { defineComponent, h, onBeforeUnmount, onMounted } from "vue";
|
|
5
|
+
import { defineAsyncComponent, defineComponent, h, onBeforeUnmount, onMounted } from "vue";
|
|
6
6
|
import * as badge from "comark-badge/vue";
|
|
7
7
|
import * as cards from "comark-cards/vue";
|
|
8
8
|
import * as carousel from "comark-carousel/vue";
|
|
@@ -24,7 +24,7 @@ import * as magicMove from "comark-magic-move/vue";
|
|
|
24
24
|
import * as mark from "comark-mark/vue";
|
|
25
25
|
import * as math from "comark-mathml/vue";
|
|
26
26
|
import * as media from "comark-media/vue";
|
|
27
|
-
import pele
|
|
27
|
+
import pele from "comark-pele";
|
|
28
28
|
import * as metrics from "comark-metrics/vue";
|
|
29
29
|
import * as outline from "comark-outline/vue";
|
|
30
30
|
import * as qr from "comark-qr/vue";
|
|
@@ -35,10 +35,10 @@ import * as tabs from "comark-tabs/vue";
|
|
|
35
35
|
import * as tests from "comark-tests/vue";
|
|
36
36
|
import * as zoom from "comark-zoom/vue";
|
|
37
37
|
//#region src/vue.ts
|
|
38
|
-
const Pele = createPeleComponent({
|
|
38
|
+
const Pele = defineAsyncComponent(() => import("comark-pele/vue").then(({ createPeleComponent }) => createPeleComponent({
|
|
39
39
|
onRender: addMermaidStyles,
|
|
40
40
|
onError: addMermaidStyles
|
|
41
|
-
});
|
|
41
|
+
})));
|
|
42
42
|
const Mermaid = defineComponent({
|
|
43
43
|
name: "ComarkMermaid",
|
|
44
44
|
inheritAttrs: false,
|
|
@@ -110,4 +110,4 @@ var vue_default = (options) => preset({
|
|
|
110
110
|
zoom
|
|
111
111
|
}, options);
|
|
112
112
|
//#endregion
|
|
113
|
-
export { criticCss, vue_default as default };
|
|
113
|
+
export { commentsCss, criticCss, vue_default as default };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "comark-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Every comark-ui block in one install: annotated screenshots, charts, diffs, tabs, zoom, and more, registered in the order they need with shared icons. Turn any of them off or pass its options.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"comark",
|
|
@@ -23,7 +23,9 @@
|
|
|
23
23
|
"dist"
|
|
24
24
|
],
|
|
25
25
|
"type": "module",
|
|
26
|
-
"sideEffects":
|
|
26
|
+
"sideEffects": [
|
|
27
|
+
"*.css"
|
|
28
|
+
],
|
|
27
29
|
"exports": {
|
|
28
30
|
".": "./dist/index.mjs",
|
|
29
31
|
"./client": "./dist/client.mjs",
|
|
@@ -40,7 +42,8 @@
|
|
|
40
42
|
"./vue": "./dist/vue.mjs",
|
|
41
43
|
"./package.json": "./package.json",
|
|
42
44
|
"./skills": "./dist/skills.mjs",
|
|
43
|
-
"./skills/*": "./dist/skills/*"
|
|
45
|
+
"./skills/*": "./dist/skills/*",
|
|
46
|
+
"./typeset.css": "./dist/typeset.css"
|
|
44
47
|
},
|
|
45
48
|
"publishConfig": {
|
|
46
49
|
"access": "public",
|
|
@@ -48,50 +51,50 @@
|
|
|
48
51
|
},
|
|
49
52
|
"dependencies": {
|
|
50
53
|
"comark-pele": "^1.1.0",
|
|
51
|
-
"comark-
|
|
52
|
-
"comark-
|
|
53
|
-
"comark-
|
|
54
|
-
"comark-
|
|
55
|
-
"comark-charts": "^0.
|
|
56
|
-
"comark-
|
|
57
|
-
"comark-chips": "^0.
|
|
58
|
-
"comark-cjk": "^0.
|
|
59
|
-
"comark-code-notes": "^0.
|
|
60
|
-
"comark-
|
|
61
|
-
"comark-
|
|
62
|
-
"comark-
|
|
63
|
-
"comark-
|
|
64
|
-
"comark-
|
|
65
|
-
"comark-details": "^0.
|
|
66
|
-
"comark-
|
|
67
|
-
"comark-
|
|
68
|
-
"comark-
|
|
69
|
-
"comark-figure": "^0.
|
|
70
|
-
"comark-
|
|
71
|
-
"comark-file-tree": "^0.
|
|
72
|
-
"comark-
|
|
73
|
-
"comark-
|
|
74
|
-
"comark-
|
|
75
|
-
"comark-
|
|
76
|
-
"comark-
|
|
77
|
-
"comark-
|
|
78
|
-
"comark-
|
|
79
|
-
"comark-
|
|
80
|
-
"comark-
|
|
81
|
-
"comark-
|
|
82
|
-
"comark-
|
|
83
|
-
"comark-
|
|
84
|
-
"comark-
|
|
85
|
-
"comark-
|
|
86
|
-
"comark-
|
|
87
|
-
"comark-
|
|
88
|
-
"comark-
|
|
89
|
-
"comark-sources": "^0.
|
|
90
|
-
"comark-
|
|
91
|
-
"comark-
|
|
92
|
-
"comark-
|
|
93
|
-
"comark-
|
|
94
|
-
"comark-
|
|
54
|
+
"comark-carousel": "^0.9.0",
|
|
55
|
+
"comark-cards": "^0.9.0",
|
|
56
|
+
"comark-badge": "^0.9.0",
|
|
57
|
+
"comark-cast": "^0.9.0",
|
|
58
|
+
"comark-charts": "^0.9.0",
|
|
59
|
+
"comark-annotate": "^0.9.0",
|
|
60
|
+
"comark-chips": "^0.9.0",
|
|
61
|
+
"comark-cjk": "^0.9.0",
|
|
62
|
+
"comark-code-notes": "^0.9.0",
|
|
63
|
+
"comark-code": "^0.9.0",
|
|
64
|
+
"comark-deflist": "^0.9.0",
|
|
65
|
+
"comark-critic": "^0.9.0",
|
|
66
|
+
"comark-comments": "^0.9.0",
|
|
67
|
+
"comark-colors": "^0.9.0",
|
|
68
|
+
"comark-details": "^0.9.0",
|
|
69
|
+
"comark-diff": "^0.9.0",
|
|
70
|
+
"comark-diagrams": "^0.9.0",
|
|
71
|
+
"comark-fields": "^0.9.0",
|
|
72
|
+
"comark-figure": "^0.9.0",
|
|
73
|
+
"comark-embed": "^0.9.0",
|
|
74
|
+
"comark-file-tree": "^0.9.0",
|
|
75
|
+
"comark-footnotes": "^0.9.0",
|
|
76
|
+
"comark-github": "^0.9.0",
|
|
77
|
+
"comark-icon": "^0.9.0",
|
|
78
|
+
"comark-include": "^0.9.0",
|
|
79
|
+
"comark-keys": "^0.9.0",
|
|
80
|
+
"comark-links": "^0.9.0",
|
|
81
|
+
"comark-magic-move": "^0.9.0",
|
|
82
|
+
"comark-mathml": "^0.9.0",
|
|
83
|
+
"comark-mark": "^0.9.0",
|
|
84
|
+
"comark-metrics": "^0.9.0",
|
|
85
|
+
"comark-media": "^0.9.0",
|
|
86
|
+
"comark-qr": "^0.9.0",
|
|
87
|
+
"comark-quiz": "^0.9.0",
|
|
88
|
+
"comark-reading-time": "^0.9.0",
|
|
89
|
+
"comark-outline": "^0.9.0",
|
|
90
|
+
"comark-properties": "^0.9.0",
|
|
91
|
+
"comark-steps": "^0.9.0",
|
|
92
|
+
"comark-sources": "^0.9.0",
|
|
93
|
+
"comark-tabs": "^0.9.0",
|
|
94
|
+
"comark-table": "^0.9.0",
|
|
95
|
+
"comark-xref": "^0.9.0",
|
|
96
|
+
"comark-zoom": "^0.9.0",
|
|
97
|
+
"comark-tests": "^0.9.0"
|
|
95
98
|
},
|
|
96
99
|
"devDependencies": {
|
|
97
100
|
"@comark/html": "^0.8.1",
|
package/dist/src-PkmYCSNu.mjs
DELETED
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import cjk from "comark-cjk";
|
|
2
|
-
import critic, { css as criticCss } from "comark-critic";
|
|
3
|
-
import deflist from "comark-deflist";
|
|
4
|
-
import figure from "comark-figure";
|
|
5
|
-
import footnotes from "comark-footnotes";
|
|
6
|
-
import { createIcons } from "comark-icon";
|
|
7
|
-
import include from "comark-include";
|
|
8
|
-
import keys from "comark-keys";
|
|
9
|
-
import readingTime from "comark-reading-time";
|
|
10
|
-
import xref from "comark-xref";
|
|
11
|
-
import { defineComarkPlugin } from "comark";
|
|
12
|
-
//#region src/typeset.ts
|
|
13
|
-
/** The node that adds the styles. The plugin adds one at the end of every document. */
|
|
14
|
-
const TYPESET_TAG = "typeset-styles";
|
|
15
|
-
/** Adds the node that writes the typeset styles at the end of the document. The preset turns it on by default. */
|
|
16
|
-
const typeset = defineComarkPlugin(() => ({
|
|
17
|
-
name: "comark-ui-typeset",
|
|
18
|
-
post(state) {
|
|
19
|
-
state.tree.nodes.push([TYPESET_TAG, {}]);
|
|
20
|
-
}
|
|
21
|
-
}));
|
|
22
|
-
//#endregion
|
|
23
|
-
//#region src/index.ts
|
|
24
|
-
const on = (value, fallback = true) => value === void 0 ? fallback : value !== false;
|
|
25
|
-
const optionsOf = (value) => value === true || value === false ? void 0 : value;
|
|
26
|
-
const noFiles = { read: () => void 0 };
|
|
27
|
-
/** Builds a renderer's preset. Use the one from `comark-ui/html`, `/vue`, `/react`, or `/svelte`. */
|
|
28
|
-
function preset(renderer, options = {}) {
|
|
29
|
-
const plugins = [];
|
|
30
|
-
const components = {};
|
|
31
|
-
const add = (part, value, settings = optionsOf(value)) => {
|
|
32
|
-
if (!part || !on(value)) return;
|
|
33
|
-
plugins.push(part.default(settings));
|
|
34
|
-
Object.assign(components, part.components);
|
|
35
|
-
};
|
|
36
|
-
const parse = (plugin, value) => {
|
|
37
|
-
if (on(value)) plugins.push(plugin(optionsOf(value)));
|
|
38
|
-
};
|
|
39
|
-
const icons = createIcons(optionsOf(options.icon));
|
|
40
|
-
if (on(options.include, false)) plugins.push(include(optionsOf(options.include)));
|
|
41
|
-
add(renderer.annotate, options.annotate);
|
|
42
|
-
add(renderer.carousel, options.carousel);
|
|
43
|
-
add(renderer.cast, options.cast, optionsOf(options.cast) ?? noFiles);
|
|
44
|
-
parse(cjk, options.cjk);
|
|
45
|
-
parse(deflist, options.deflist);
|
|
46
|
-
parse(figure, options.figure);
|
|
47
|
-
parse(critic, options.critic);
|
|
48
|
-
add(renderer.charts, options.charts);
|
|
49
|
-
add(renderer.chips, options.chips);
|
|
50
|
-
add(renderer.colors, options.colors);
|
|
51
|
-
add(renderer.diagrams, options.diagrams);
|
|
52
|
-
add(renderer.mermaid, options.mermaid);
|
|
53
|
-
add(renderer.diff, options.diff);
|
|
54
|
-
add(renderer.embed, options.embed);
|
|
55
|
-
parse(footnotes, options.footnotes);
|
|
56
|
-
if (on(options.github)) {
|
|
57
|
-
const github = optionsOf(options.github) ?? {};
|
|
58
|
-
if (on(github.callouts)) {
|
|
59
|
-
plugins.push(renderer.github.callouts(optionsOf(github.callouts)));
|
|
60
|
-
Object.assign(components, renderer.github.components);
|
|
61
|
-
}
|
|
62
|
-
if (on(github.references)) plugins.push(renderer.github.references(optionsOf(github.references)));
|
|
63
|
-
if (on(github.html)) plugins.push(renderer.github.html());
|
|
64
|
-
}
|
|
65
|
-
add(renderer.icon, options.icon, icons);
|
|
66
|
-
add(renderer.mark, options.mark);
|
|
67
|
-
add(renderer.math, options.math);
|
|
68
|
-
add(renderer.details, options.details, {
|
|
69
|
-
iconResolver: icons,
|
|
70
|
-
...optionsOf(options.details)
|
|
71
|
-
});
|
|
72
|
-
if (on(options.links)) {
|
|
73
|
-
const links = optionsOf(options.links) ?? {};
|
|
74
|
-
if (on(links.external)) plugins.push(renderer.links.external(optionsOf(links.external)));
|
|
75
|
-
if (on(links.anchors)) plugins.push(renderer.links.anchors(optionsOf(links.anchors)));
|
|
76
|
-
if (on(links.external) || on(links.anchors)) Object.assign(components, renderer.links.components);
|
|
77
|
-
}
|
|
78
|
-
add(renderer.fileTree, options.fileTree, {
|
|
79
|
-
iconResolver: icons,
|
|
80
|
-
...optionsOf(options.fileTree)
|
|
81
|
-
});
|
|
82
|
-
add(renderer.fields, options.fields);
|
|
83
|
-
add(renderer.properties, options.properties);
|
|
84
|
-
parse(keys, options.keys);
|
|
85
|
-
add(renderer.badge, options.badge);
|
|
86
|
-
add(renderer.media, options.media);
|
|
87
|
-
add(renderer.metrics, options.metrics);
|
|
88
|
-
add(renderer.table, options.table, optionsOf(options.table) ?? noFiles);
|
|
89
|
-
add(renderer.cards, options.cards, { iconResolver: icons });
|
|
90
|
-
add(renderer.qr, options.qr);
|
|
91
|
-
add(renderer.sources, options.sources);
|
|
92
|
-
add(renderer.steps, options.steps);
|
|
93
|
-
add(renderer.quiz, options.quiz);
|
|
94
|
-
parse(readingTime, options.readingTime);
|
|
95
|
-
add(renderer.tabs, options.tabs, {
|
|
96
|
-
iconResolver: icons,
|
|
97
|
-
...optionsOf(options.tabs)
|
|
98
|
-
});
|
|
99
|
-
add(renderer.magicMove, options.magicMove);
|
|
100
|
-
add(renderer.outline, options.outline);
|
|
101
|
-
parse(xref, options.xref);
|
|
102
|
-
add(renderer.tests, options.tests, optionsOf(options.tests) ?? noFiles);
|
|
103
|
-
add(renderer.zoom, options.zoom);
|
|
104
|
-
add(renderer.code, options.code, {
|
|
105
|
-
iconResolver: icons,
|
|
106
|
-
...optionsOf(options.code)
|
|
107
|
-
});
|
|
108
|
-
add(renderer.codeNotes, options.codeNotes);
|
|
109
|
-
add(renderer.comments, options.comments);
|
|
110
|
-
if (on(options.typeset)) {
|
|
111
|
-
plugins.push(typeset());
|
|
112
|
-
components[TYPESET_TAG] = renderer.typeset;
|
|
113
|
-
}
|
|
114
|
-
return {
|
|
115
|
-
plugins,
|
|
116
|
-
components
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
//#endregion
|
|
120
|
-
export { typeset as i, preset as n, TYPESET_TAG as r, criticCss as t };
|