vue3-sphinx-xml 0.3.1 → 0.3.2
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/Admonition.js +4 -3
- package/dist/Admonition.js.map +1 -1
- package/dist/BlockQuote.js +1 -1
- package/dist/BlockQuote.js.map +1 -1
- package/dist/Literal.js +9 -5
- package/dist/Literal.js.map +1 -1
- package/dist/Warning.js +0 -7
- package/dist/Warning.js.map +1 -1
- package/package.json +1 -1
package/dist/Admonition.js
CHANGED
|
@@ -17,7 +17,7 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
-
import { toRefs, openBlock, createElementBlock, mergeProps, unref, Fragment, renderList, createBlock, resolveDynamicComponent } from "vue";
|
|
20
|
+
import { toRefs, computed, ref, openBlock, createElementBlock, mergeProps, unref, Fragment, renderList, createBlock, resolveDynamicComponent } from "vue";
|
|
21
21
|
import { u as useMethods } from "./methods.js";
|
|
22
22
|
import { u as useClasses, a as useChildren } from "./entry.js";
|
|
23
23
|
import "@hsorby/vue3-katex";
|
|
@@ -42,7 +42,7 @@ const _sfc_main = {
|
|
|
42
42
|
setup(__props) {
|
|
43
43
|
const props = __props;
|
|
44
44
|
const { node } = toRefs(props);
|
|
45
|
-
const { extractId } = useMethods();
|
|
45
|
+
const { dataObject, extractId } = useMethods();
|
|
46
46
|
const { classes } = useClasses(node);
|
|
47
47
|
const { id } = extractId(node.value);
|
|
48
48
|
const { children } = useChildren(node);
|
|
@@ -50,11 +50,12 @@ const _sfc_main = {
|
|
|
50
50
|
return ["admonition", ...classes.value];
|
|
51
51
|
});
|
|
52
52
|
const result = dataObject(node.value, combinedClasses.value);
|
|
53
|
+
const attrs = ref({});
|
|
53
54
|
attrs.value = __spreadProps(__spreadValues({}, result.attrs), {
|
|
54
55
|
class: result.class.join(" ")
|
|
55
56
|
});
|
|
56
57
|
return (_ctx, _cache) => {
|
|
57
|
-
return openBlock(), createElementBlock("div", mergeProps({ id: unref(id) },
|
|
58
|
+
return openBlock(), createElementBlock("div", mergeProps({ id: unref(id) }, attrs.value), [
|
|
58
59
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(children), (c, index) => {
|
|
59
60
|
return openBlock(), createBlock(resolveDynamicComponent(c.component), {
|
|
60
61
|
key: "admonition_component_" + index,
|
package/dist/Admonition.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Admonition.js","sources":["../src/components/templates/Admonition.vue"],"sourcesContent":["<template>\n <div :id=\"id\" :=\"attrs\">\n <component\n v-for=\"(c, index) in children\"\n :key=\"'admonition_component_' + index\"\n :is=\"c.component\"\n :node=\"c.node\"\n :componentName=\"c.name\"\n :properties=\"c.properties\"\n />\n </div>\n</template>\n\n<script setup>\nimport { toRefs } from 'vue'\n\nimport { useMethods } from '../../composables/methods'\nimport { useChildren, useClasses } from '../../composables/computed'\n\nconst props = defineProps({\n node: {\n type: undefined,\n default: null,\n },\n componentName: {\n type: String,\n },\n properties: {\n type: Object,\n }
|
|
1
|
+
{"version":3,"file":"Admonition.js","sources":["../src/components/templates/Admonition.vue"],"sourcesContent":["<template>\n <div :id=\"id\" :=\"attrs\">\n <component\n v-for=\"(c, index) in children\"\n :key=\"'admonition_component_' + index\"\n :is=\"c.component\"\n :node=\"c.node\"\n :componentName=\"c.name\"\n :properties=\"c.properties\"\n />\n </div>\n</template>\n\n<script setup>\nimport { computed, toRefs, ref } from 'vue'\n\nimport { useMethods } from '../../composables/methods'\nimport { useChildren, useClasses } from '../../composables/computed'\n\nconst props = defineProps({\n node: {\n type: undefined,\n default: null,\n },\n componentName: {\n type: String,\n },\n properties: {\n type: Object,\n },\n})\n\nconst { node } = toRefs(props)\n\nconst { dataObject, extractId } = useMethods()\nconst { classes } = useClasses(node)\n\nconst { id } = extractId(node.value)\n\nconst { children } = useChildren(node)\n\nconst combinedClasses = computed(() => {\n return ['admonition', ...classes.value]\n})\n\nconst result = dataObject(node.value, combinedClasses.value)\n\nconst attrs = ref({})\nattrs.value = {\n ...result.attrs,\n class: result.class.join(' '),\n}\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,UAAM,EAAE,SAAS,OAAO,KAAK;AAE7B,UAAM,EAAE,YAAY,cAAc,WAAY;AAC9C,UAAM,EAAE,YAAY,WAAW,IAAI;AAEnC,UAAM,EAAE,OAAO,UAAU,KAAK,KAAK;AAEnC,UAAM,EAAE,aAAa,YAAY,IAAI;AAErC,UAAM,kBAAkB,SAAS,MAAM;AACrC,aAAO,CAAC,cAAc,GAAG,QAAQ,KAAK;AAAA,IACxC,CAAC;AAED,UAAM,SAAS,WAAW,KAAK,OAAO,gBAAgB,KAAK;AAE3D,UAAM,QAAQ,IAAI,EAAE;AACpB,UAAM,QAAQ,iCACT,OAAO,QADE;AAAA,MAEZ,OAAO,OAAO,MAAM,KAAK,GAAG;AAAA,IAC9B;;;;;;;;;;;;;;;;"}
|
package/dist/BlockQuote.js
CHANGED
|
@@ -27,7 +27,7 @@ const _sfc_main = {
|
|
|
27
27
|
createElementVNode("div", null, [
|
|
28
28
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(children), (c, index) => {
|
|
29
29
|
return openBlock(), createBlock(resolveDynamicComponent(c.component), {
|
|
30
|
-
key: "
|
|
30
|
+
key: "blockquote_component_" + index,
|
|
31
31
|
node: c.node,
|
|
32
32
|
componentName: c.name,
|
|
33
33
|
properties: c.properties
|
package/dist/BlockQuote.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlockQuote.js","sources":["../src/components/templates/BlockQuote.vue"],"sourcesContent":["<template>\n <blockquote>\n <div>\n <component\n v-for=\"(c, index) in children\"\n :key=\"'
|
|
1
|
+
{"version":3,"file":"BlockQuote.js","sources":["../src/components/templates/BlockQuote.vue"],"sourcesContent":["<template>\n <blockquote>\n <div>\n <component\n v-for=\"(c, index) in children\"\n :key=\"'blockquote_component_' + index\"\n :is=\"c.component\"\n :node=\"c.node\"\n :componentName=\"c.name\"\n :properties=\"c.properties\"\n />\n </div>\n </blockquote>\n</template>\n\n<script setup>\nimport { toRefs } from 'vue'\n\nimport { useChildren } from '../../composables/computed'\n\nconst props = defineProps({\n node: {\n type: undefined,\n default: null,\n },\n componentName: {\n type: String,\n },\n properties: {\n type: Object,\n }\n})\n\nconst { node } = toRefs(props)\n\nconst { children } = useChildren(node)\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAiCA,UAAM,EAAE,SAAS,OAAO,KAAK;AAE7B,UAAM,EAAE,aAAa,YAAY,IAAI;;;;;;;;;;;;;;;;;;"}
|
package/dist/Literal.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { toRefs, openBlock, createElementBlock, createElementVNode, Fragment, renderList, unref, createBlock, resolveDynamicComponent } from "vue";
|
|
1
|
+
import { toRefs, ref, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, unref, createBlock, resolveDynamicComponent } from "vue";
|
|
2
2
|
import { u as useMethods } from "./methods.js";
|
|
3
3
|
import { a as useChildren } from "./entry.js";
|
|
4
4
|
import "@hsorby/vue3-katex";
|
|
@@ -25,6 +25,7 @@ const _sfc_main = {
|
|
|
25
25
|
const { node } = toRefs(props);
|
|
26
26
|
const { dataObject } = useMethods();
|
|
27
27
|
const { children } = useChildren(node);
|
|
28
|
+
const classes = ref(["literal", "notranslate"]);
|
|
28
29
|
const v = dataObject(node.value);
|
|
29
30
|
const isEmpty = (d) => {
|
|
30
31
|
for (const i in d) {
|
|
@@ -36,11 +37,14 @@ const _sfc_main = {
|
|
|
36
37
|
return true;
|
|
37
38
|
};
|
|
38
39
|
if (!isEmpty(v)) {
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
if (v.attrs && v.attrs.role) {
|
|
41
|
+
classes.value.push(v.attrs.role);
|
|
42
|
+
}
|
|
41
43
|
}
|
|
42
44
|
return (_ctx, _cache) => {
|
|
43
|
-
return openBlock(), createElementBlock("code",
|
|
45
|
+
return openBlock(), createElementBlock("code", {
|
|
46
|
+
class: normalizeClass(classes.value)
|
|
47
|
+
}, [
|
|
44
48
|
createElementVNode("span", _hoisted_1, [
|
|
45
49
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(children), (c, index) => {
|
|
46
50
|
return openBlock(), createBlock(resolveDynamicComponent(c.component), {
|
|
@@ -51,7 +55,7 @@ const _sfc_main = {
|
|
|
51
55
|
}, null, 8, ["node", "componentName", "properties"]);
|
|
52
56
|
}), 128))
|
|
53
57
|
])
|
|
54
|
-
]);
|
|
58
|
+
], 2);
|
|
55
59
|
};
|
|
56
60
|
}
|
|
57
61
|
};
|
package/dist/Literal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Literal.js","sources":["../src/components/templates/Literal.vue"],"sourcesContent":["<template>\n <code>\n <span class=\"pre\">\n <component\n v-for=\"(c, index) in children\"\n :key=\"'code_component_' + index\"\n :is=\"c.component\"\n :node=\"c.node\"\n :componentName=\"c.name\"\n :properties=\"c.properties\"\n />\n </span>\n </code>\n</template>\n\n<script setup>\nimport { toRefs } from 'vue'\n\nimport { useMethods } from '../../composables/methods'\nimport { useChildren } from '../../composables/computed'\n\nconst props = defineProps({\n node: {\n type: undefined,\n default: null,\n },\n componentName: {\n type: String,\n },\n properties: {\n type: Object,\n },\n})\n\nconst { node } = toRefs(props)\n\nconst { dataObject } = useMethods()\n\nconst { children } = useChildren(node)\n\nconst v = dataObject(node.value)\nconst isEmpty = (d) => {\n for (const i in d) {\n if (d[i].language === '') {\n continue\n }\n return false\n }\n\n return true\n}\n\nif (!isEmpty(v)) {\n
|
|
1
|
+
{"version":3,"file":"Literal.js","sources":["../src/components/templates/Literal.vue"],"sourcesContent":["<template>\n <code :class=\"classes\">\n <span class=\"pre\">\n <component\n v-for=\"(c, index) in children\"\n :key=\"'code_component_' + index\"\n :is=\"c.component\"\n :node=\"c.node\"\n :componentName=\"c.name\"\n :properties=\"c.properties\"\n />\n </span>\n </code>\n</template>\n\n<script setup>\nimport { toRefs, ref } from 'vue'\n\nimport { useMethods } from '../../composables/methods'\nimport { useChildren } from '../../composables/computed'\n\nconst props = defineProps({\n node: {\n type: undefined,\n default: null,\n },\n componentName: {\n type: String,\n },\n properties: {\n type: Object,\n },\n})\n\nconst { node } = toRefs(props)\n\nconst { dataObject } = useMethods()\n\nconst { children } = useChildren(node)\n\nconst classes = ref(['literal', 'notranslate'])\n\nconst v = dataObject(node.value)\nconst isEmpty = (d) => {\n for (const i in d) {\n if (d[i].language === '') {\n continue\n }\n return false\n }\n\n return true\n}\n\nif (!isEmpty(v)) {\n if (v.attrs && v.attrs.role) {\n classes.value.push(v.attrs.role)\n }\n}\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAkCA,UAAM,EAAE,SAAS,OAAO,KAAK;AAE7B,UAAM,EAAE,eAAe,WAAY;AAEnC,UAAM,EAAE,aAAa,YAAY,IAAI;AAErC,UAAM,UAAU,IAAI,CAAC,WAAW,aAAa,CAAC;AAE9C,UAAM,IAAI,WAAW,KAAK,KAAK;AAC/B,UAAM,UAAU,CAAC,MAAM;AACrB,iBAAW,KAAK,GAAG;AACjB,YAAI,EAAE,GAAG,aAAa,IAAI;AACxB;AAAA,QACD;AACD,eAAO;AAAA,MACR;AAED,aAAO;AAAA,IACT;AAEA,QAAI,CAAC,QAAQ,CAAC,GAAG;AACf,UAAI,EAAE,SAAS,EAAE,MAAM,MAAM;AAC3B,gBAAQ,MAAM,KAAK,EAAE,MAAM,IAAI;AAAA,MAChC;AAAA,IACH;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/Warning.js
CHANGED
|
@@ -7,7 +7,6 @@ import "vue-router";
|
|
|
7
7
|
import "axios";
|
|
8
8
|
import "path-to-regexp";
|
|
9
9
|
const _hoisted_1 = ["id"];
|
|
10
|
-
const _hoisted_2 = ["id"];
|
|
11
10
|
const _sfc_main = {
|
|
12
11
|
props: {
|
|
13
12
|
node: {
|
|
@@ -32,12 +31,6 @@ const _sfc_main = {
|
|
|
32
31
|
id: unref(id),
|
|
33
32
|
class: "admonition warning"
|
|
34
33
|
}, [
|
|
35
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.extraIds, (s, index) => {
|
|
36
|
-
return openBlock(), createElementBlock("span", {
|
|
37
|
-
key: "id_span_" + index,
|
|
38
|
-
id: s
|
|
39
|
-
}, null, 8, _hoisted_2);
|
|
40
|
-
}), 128)),
|
|
41
34
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(children), (c, index) => {
|
|
42
35
|
return openBlock(), createBlock(resolveDynamicComponent(c.component), {
|
|
43
36
|
key: "warning_component_" + index,
|
package/dist/Warning.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Warning.js","sources":["../src/components/templates/Warning.vue"],"sourcesContent":["<template>\n <div :id=\"id\" class=\"admonition warning\">\n <
|
|
1
|
+
{"version":3,"file":"Warning.js","sources":["../src/components/templates/Warning.vue"],"sourcesContent":["<template>\n <div :id=\"id\" class=\"admonition warning\">\n <component\n v-for=\"(c, index) in children\"\n :key=\"'warning_component_' + index\"\n :is=\"c.component\"\n :node=\"c.node\"\n :componentName=\"c.name\"\n :properties=\"c.properties\"\n />\n </div>\n</template>\n\n<script setup>\nimport { toRefs } from 'vue'\n\nimport { useMethods } from '../../composables/methods'\nimport { useChildren } from '../../composables/computed'\n\nconst props = defineProps({\n node: {\n type: undefined,\n default: null,\n },\n componentName: {\n type: String,\n },\n properties: {\n type: Object,\n }\n})\n\nconst { node } = toRefs(props)\n\nconst { extractId } = useMethods()\nconst { id } = extractId(node.value)\n\nconst { children } = useChildren(node)\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAgCA,UAAM,EAAE,SAAS,OAAO,KAAK;AAE7B,UAAM,EAAE,cAAc,WAAY;AAClC,UAAM,EAAE,OAAO,UAAU,KAAK,KAAK;AAEnC,UAAM,EAAE,aAAa,YAAY,IAAI;;;;;;;;;;;;;;;;;;;"}
|