comark-ui 0.7.1 → 0.7.4
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 +2 -2
- package/dist/client-Bjd6VcGQ.mjs +241 -0
- package/dist/client.d.mts +11 -1
- package/dist/client.mjs +3 -26
- package/dist/{editor-BAdok66p.mjs → editor-DmxNPK7K.mjs} +522 -68
- package/dist/{editor-CNivEuMH.d.mts → editor-KD97dL_1.d.mts} +21 -3
- package/dist/editor-vue.d.mts +1 -1
- package/dist/editor-vue.mjs +1 -1
- package/dist/editor.d.mts +2 -2
- package/dist/editor.mjs +1 -1
- package/dist/html.d.mts +7 -1
- package/dist/html.mjs +29 -9
- package/dist/{index-B0YvApci.d.mts → index-BUDHsvnm.d.mts} +11 -2
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +2 -2
- package/dist/react.d.mts +2 -2
- package/dist/react.mjs +20 -6
- package/dist/skills/before-after-evidence/SKILL.md +72 -0
- package/dist/skills/before-after-evidence/agents/openai.yaml +3 -0
- package/dist/skills/before-after-evidence/references/blocks.md +54 -0
- package/dist/skills/before-after-evidence/references/example.md +37 -0
- package/dist/skills/before-after-evidence/references/measuring.md +50 -0
- package/dist/skills/comark-ui/SKILL.md +9 -2
- package/dist/skills/comark-ui/references/annotate.md +4 -2
- package/dist/skills/comark-ui/references/comments.md +43 -0
- package/dist/skills/comark-ui/references/diagrams.md +7 -1
- package/dist/skills/comark-ui/references/lint.md +1 -1
- package/dist/skills/comark-ui/references/outline.md +9 -1
- package/dist/skills/comark-ui/references/quiz.md +1 -1
- package/dist/skills/comark-ui/references/ui.md +1 -1
- package/dist/skills/review-document/SKILL.md +64 -0
- package/dist/skills/review-document/agents/openai.yaml +3 -0
- package/dist/skills/review-document/references/blocks.md +69 -0
- package/dist/skills/review-document/references/example.md +51 -0
- package/dist/skills/teach-lesson/SKILL.md +78 -0
- package/dist/skills/teach-lesson/agents/openai.yaml +3 -0
- package/dist/skills/teach-lesson/references/blocks.md +91 -0
- package/dist/skills/teach-lesson/references/example.md +70 -0
- package/dist/skills/visual-explanation/SKILL.md +67 -0
- package/dist/skills/visual-explanation/agents/openai.yaml +3 -0
- package/dist/skills/visual-explanation/references/blocks.md +89 -0
- package/dist/skills/visual-explanation/references/example.md +25 -0
- package/dist/skills.d.mts +18 -0
- package/dist/skills.mjs +326 -0
- package/dist/{src-DROB05U6.mjs → src-PkmYCSNu.mjs} +1 -0
- package/dist/svelte/Mermaid.svelte +16 -0
- package/dist/svelte/index.d.ts +1 -1
- package/dist/svelte/index.js +4 -8
- package/dist/{typeset-css-DPB0S1bV.mjs → typeset-css-5aJ7cSmh.mjs} +14 -0
- package/dist/vue.d.mts +2 -2
- package/dist/vue.mjs +33 -6
- package/package.json +46 -44
|
@@ -106,6 +106,7 @@ function preset(renderer, options = {}) {
|
|
|
106
106
|
...optionsOf(options.code)
|
|
107
107
|
});
|
|
108
108
|
add(renderer.codeNotes, options.codeNotes);
|
|
109
|
+
add(renderer.comments, options.comments);
|
|
109
110
|
if (on(options.typeset)) {
|
|
110
111
|
plugins.push(typeset());
|
|
111
112
|
components[TYPESET_TAG] = renderer.typeset;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!-- Pele's card in `.cmm` with the bar of buttons, as `comark-ui/html` draws it. In the browser Pele's own `mount()`
|
|
2
|
+
zooms the diagram in place, so it doesn't zoom with comark-zoom. -->
|
|
3
|
+
<script>
|
|
4
|
+
import { onMount } from "svelte";
|
|
5
|
+
import { createPeleComponent } from "comark-pele/svelte";
|
|
6
|
+
import { addMermaidStyles, mermaidBar, startMermaid } from "comark-ui/client";
|
|
7
|
+
|
|
8
|
+
const Pele = createPeleComponent({ onRender: addMermaidStyles, onError: addMermaidStyles });
|
|
9
|
+
let { content = "", ...rest } = $props();
|
|
10
|
+
onMount(() => startMermaid());
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<div class="cmm" data-source={content}>
|
|
14
|
+
<Pele {content} {...rest} />
|
|
15
|
+
<div class="cmm-bar">{@html mermaidBar()}</div>
|
|
16
|
+
</div>
|
package/dist/svelte/index.d.ts
CHANGED
|
@@ -4,6 +4,6 @@ import type { Preset, PresetOptions } from "comark-ui";
|
|
|
4
4
|
export { criticCss } from "comark-ui";
|
|
5
5
|
export type { PresetOptions } from "comark-ui";
|
|
6
6
|
|
|
7
|
-
/** Every plugin with components for `@comark/svelte`, which leaves out annotate, diff, and quiz. */
|
|
7
|
+
/** Every plugin with components for `@comark/svelte`, which leaves out annotate, comments, diff, and quiz. */
|
|
8
8
|
declare const comarkUi: (options?: PresetOptions) => Preset<Component>;
|
|
9
9
|
export default comarkUi;
|
package/dist/svelte/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
// Every plugin with components for `@comark/svelte`, which leaves out annotate, diff, and quiz.
|
|
1
|
+
// Every plugin with components for `@comark/svelte`, which leaves out annotate, comments, diff, and quiz.
|
|
2
2
|
import { preset } from "comark-ui";
|
|
3
|
-
import { addMermaidStyles } from "comark-ui/client";
|
|
4
3
|
import * as badge from "comark-badge/svelte";
|
|
5
4
|
import * as cards from "comark-cards/svelte";
|
|
6
5
|
import * as carousel from "comark-carousel/svelte";
|
|
@@ -22,7 +21,7 @@ import * as magicMove from "comark-magic-move/svelte";
|
|
|
22
21
|
import * as mark from "comark-mark/svelte";
|
|
23
22
|
import * as math from "comark-mathml/svelte";
|
|
24
23
|
import * as media from "comark-media/svelte";
|
|
25
|
-
import pele
|
|
24
|
+
import pele from "comark-pele/svelte";
|
|
26
25
|
import * as metrics from "comark-metrics/svelte";
|
|
27
26
|
import * as outline from "comark-outline/svelte";
|
|
28
27
|
import * as properties from "comark-properties/svelte";
|
|
@@ -33,15 +32,12 @@ import * as table from "comark-table/svelte";
|
|
|
33
32
|
import * as tabs from "comark-tabs/svelte";
|
|
34
33
|
import * as tests from "comark-tests/svelte";
|
|
35
34
|
import * as zoom from "comark-zoom/svelte";
|
|
35
|
+
import Mermaid from "./Mermaid.svelte";
|
|
36
36
|
import typeset from "./Typeset.svelte";
|
|
37
37
|
|
|
38
38
|
export { criticCss } from "comark-ui";
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
const mermaid = {
|
|
42
|
-
default: pele,
|
|
43
|
-
components: { pele: createPeleComponent({ onRender: addMermaidStyles }) },
|
|
44
|
-
};
|
|
40
|
+
const mermaid = { default: pele, components: { pele: Mermaid } };
|
|
45
41
|
|
|
46
42
|
export default (options) =>
|
|
47
43
|
preset(
|
|
@@ -181,6 +181,20 @@ const rules = `
|
|
|
181
181
|
.shiki:not(:where(.light *)) span[style*="--shiki-dark:"] { color: var(--shiki-dark) !important; }
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
+
/* A block marked data-wide, such as a before/after comparison or a diagram wider than the text, grows past the column
|
|
185
|
+
into the room the page gives it on each side, --comark-wide-start and --comark-wide-end, up to its own width
|
|
186
|
+
(--comark-wide-width) and --comark-wide-max. It stays centered on the column while both sides have room, and moves
|
|
187
|
+
toward the side that has more when one doesn't. Without room set, it keeps to the column. Only the document's own
|
|
188
|
+
blocks grow, not one inside a list or tabs. */
|
|
189
|
+
:scope > [data-wide] {
|
|
190
|
+
/* Room a page works out from the window can come out negative on a phone, where the column fills it: none, then. */
|
|
191
|
+
--_ty-start: max(0px, var(--comark-wide-start, 0px));
|
|
192
|
+
--_ty-end: max(0px, var(--comark-wide-end, 0px));
|
|
193
|
+
--_ty-wide: max(100%, min(var(--comark-wide-width, 100vw), var(--comark-wide-max, 72rem), 100% + var(--_ty-start) + var(--_ty-end)));
|
|
194
|
+
width: var(--_ty-wide);
|
|
195
|
+
margin-inline: clamp(-1 * var(--_ty-start), (100% - var(--_ty-wide)) / 2, 100% + var(--_ty-end) - var(--_ty-wide)) 0;
|
|
196
|
+
}
|
|
197
|
+
|
|
184
198
|
/* The first child adds no space above. Last, so it wins ties. */
|
|
185
199
|
:scope > :where(:first-child):not(${own}),
|
|
186
200
|
:scope > :where(:first-child) > :where(:first-child):not(${own}),
|
package/dist/vue.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as criticCss, n as Preset, r as PresetOptions } from "./index-
|
|
1
|
+
import { a as criticCss, n as Preset, r as PresetOptions } from "./index-BUDHsvnm.mjs";
|
|
2
2
|
import { Component } from "vue";
|
|
3
3
|
//#region src/vue.d.ts
|
|
4
|
-
/** Every plugin with components for `@comark/vue`, which leaves out annotate, diff, and quiz. */
|
|
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
7
|
export { type PresetOptions, criticCss, _default as default };
|
package/dist/vue.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as typesetCss } from "./typeset-css-
|
|
2
|
-
import { n as preset, t as criticCss } from "./src-
|
|
3
|
-
import { addMermaidStyles } from "./client.mjs";
|
|
4
|
-
import { defineComponent, h } from "vue";
|
|
1
|
+
import { t as typesetCss } from "./typeset-css-5aJ7cSmh.mjs";
|
|
2
|
+
import { n as preset, t as criticCss } from "./src-PkmYCSNu.mjs";
|
|
3
|
+
import { i as startMermaid, n as mermaidBar, t as addMermaidStyles } from "./client-Bjd6VcGQ.mjs";
|
|
4
|
+
import { defineComponent, h, onBeforeUnmount, onMounted } from "vue";
|
|
5
5
|
import * as badge from "comark-badge/vue";
|
|
6
6
|
import * as cards from "comark-cards/vue";
|
|
7
7
|
import * as carousel from "comark-carousel/vue";
|
|
@@ -35,9 +35,36 @@ 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({
|
|
39
|
+
onRender: addMermaidStyles,
|
|
40
|
+
onError: addMermaidStyles
|
|
41
|
+
});
|
|
42
|
+
const Mermaid = defineComponent({
|
|
43
|
+
name: "ComarkMermaid",
|
|
44
|
+
inheritAttrs: false,
|
|
45
|
+
props: { content: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: ""
|
|
48
|
+
} },
|
|
49
|
+
setup(props, { attrs }) {
|
|
50
|
+
let stop = () => {};
|
|
51
|
+
onMounted(() => stop = startMermaid());
|
|
52
|
+
onBeforeUnmount(() => stop());
|
|
53
|
+
return () => h("div", {
|
|
54
|
+
class: "cmm",
|
|
55
|
+
"data-source": props.content
|
|
56
|
+
}, [h(Pele, {
|
|
57
|
+
...attrs,
|
|
58
|
+
content: props.content
|
|
59
|
+
}), h("div", {
|
|
60
|
+
class: "cmm-bar",
|
|
61
|
+
innerHTML: mermaidBar()
|
|
62
|
+
})]);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
38
65
|
const mermaid = {
|
|
39
66
|
default: pele,
|
|
40
|
-
components: { pele:
|
|
67
|
+
components: { pele: Mermaid }
|
|
41
68
|
};
|
|
42
69
|
const typeset = defineComponent({
|
|
43
70
|
name: "ComarkTypeset",
|
|
@@ -46,7 +73,7 @@ const typeset = defineComponent({
|
|
|
46
73
|
innerHTML: typesetCss
|
|
47
74
|
})
|
|
48
75
|
});
|
|
49
|
-
/** Every plugin with components for `@comark/vue`, which leaves out annotate, diff, and quiz. */
|
|
76
|
+
/** Every plugin with components for `@comark/vue`, which leaves out annotate, comments, diff, and quiz. */
|
|
50
77
|
var vue_default = (options) => preset({
|
|
51
78
|
badge,
|
|
52
79
|
cards,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "comark-ui",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.4",
|
|
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",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
},
|
|
40
40
|
"./vue": "./dist/vue.mjs",
|
|
41
41
|
"./package.json": "./package.json",
|
|
42
|
+
"./skills": "./dist/skills.mjs",
|
|
42
43
|
"./skills/*": "./dist/skills/*"
|
|
43
44
|
},
|
|
44
45
|
"publishConfig": {
|
|
@@ -47,49 +48,50 @@
|
|
|
47
48
|
},
|
|
48
49
|
"dependencies": {
|
|
49
50
|
"comark-pele": "^1.1.0",
|
|
50
|
-
"comark-
|
|
51
|
-
"comark-
|
|
52
|
-
"comark-
|
|
53
|
-
"comark-
|
|
54
|
-
"comark-cast": "^0.7.
|
|
55
|
-
"comark-charts": "^0.7.
|
|
56
|
-
"comark-chips": "^0.7.
|
|
57
|
-
"comark-cjk": "^0.7.
|
|
58
|
-
"comark-code": "^0.7.
|
|
59
|
-
"comark-
|
|
60
|
-
"comark-
|
|
61
|
-
"comark-
|
|
62
|
-
"comark-
|
|
63
|
-
"comark-details": "^0.7.
|
|
64
|
-
"comark-
|
|
65
|
-
"comark-diagrams": "^0.7.
|
|
66
|
-
"comark-
|
|
67
|
-
"comark-
|
|
68
|
-
"comark-
|
|
69
|
-
"comark-
|
|
70
|
-
"comark-
|
|
71
|
-
"comark-
|
|
72
|
-
"comark-
|
|
73
|
-
"comark-keys": "^0.7.
|
|
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-table": "^0.7.
|
|
88
|
-
"comark-steps": "^0.7.
|
|
89
|
-
"comark-
|
|
90
|
-
"comark-
|
|
91
|
-
"comark-xref": "^0.7.
|
|
92
|
-
"comark-
|
|
51
|
+
"comark-annotate": "^0.7.4",
|
|
52
|
+
"comark-cards": "^0.7.4",
|
|
53
|
+
"comark-carousel": "^0.7.4",
|
|
54
|
+
"comark-badge": "^0.7.4",
|
|
55
|
+
"comark-cast": "^0.7.4",
|
|
56
|
+
"comark-charts": "^0.7.4",
|
|
57
|
+
"comark-chips": "^0.7.4",
|
|
58
|
+
"comark-cjk": "^0.7.4",
|
|
59
|
+
"comark-code": "^0.7.4",
|
|
60
|
+
"comark-colors": "^0.7.4",
|
|
61
|
+
"comark-code-notes": "^0.7.4",
|
|
62
|
+
"comark-deflist": "^0.7.4",
|
|
63
|
+
"comark-critic": "^0.7.4",
|
|
64
|
+
"comark-details": "^0.7.4",
|
|
65
|
+
"comark-comments": "^0.7.4",
|
|
66
|
+
"comark-diagrams": "^0.7.4",
|
|
67
|
+
"comark-embed": "^0.7.4",
|
|
68
|
+
"comark-fields": "^0.7.4",
|
|
69
|
+
"comark-figure": "^0.7.4",
|
|
70
|
+
"comark-diff": "^0.7.4",
|
|
71
|
+
"comark-file-tree": "^0.7.4",
|
|
72
|
+
"comark-footnotes": "^0.7.4",
|
|
73
|
+
"comark-github": "^0.7.4",
|
|
74
|
+
"comark-keys": "^0.7.4",
|
|
75
|
+
"comark-include": "^0.7.4",
|
|
76
|
+
"comark-icon": "^0.7.4",
|
|
77
|
+
"comark-mathml": "^0.7.4",
|
|
78
|
+
"comark-mark": "^0.7.4",
|
|
79
|
+
"comark-magic-move": "^0.7.4",
|
|
80
|
+
"comark-links": "^0.7.4",
|
|
81
|
+
"comark-media": "^0.7.4",
|
|
82
|
+
"comark-metrics": "^0.7.4",
|
|
83
|
+
"comark-outline": "^0.7.4",
|
|
84
|
+
"comark-properties": "^0.7.4",
|
|
85
|
+
"comark-sources": "^0.7.4",
|
|
86
|
+
"comark-quiz": "^0.7.4",
|
|
87
|
+
"comark-qr": "^0.7.4",
|
|
88
|
+
"comark-table": "^0.7.4",
|
|
89
|
+
"comark-steps": "^0.7.4",
|
|
90
|
+
"comark-reading-time": "^0.7.4",
|
|
91
|
+
"comark-tabs": "^0.7.4",
|
|
92
|
+
"comark-xref": "^0.7.4",
|
|
93
|
+
"comark-tests": "^0.7.4",
|
|
94
|
+
"comark-zoom": "^0.7.4"
|
|
93
95
|
},
|
|
94
96
|
"devDependencies": {
|
|
95
97
|
"@comark/html": "^0.8.1",
|