vue3-sphinx-xml 0.3.2 → 0.3.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/Warning.js +10 -2
- package/dist/Warning.js.map +1 -1
- package/dist/entry.js +12 -0
- package/dist/entry.js.map +1 -1
- package/package.json +1 -1
package/dist/Warning.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { toRefs, openBlock, createElementBlock, unref, Fragment, renderList,
|
|
1
|
+
import { toRefs, openBlock, createElementBlock, unref, createBlock, resolveDynamicComponent, withCtx, Fragment, renderList, createTextVNode } 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";
|
|
@@ -7,6 +7,7 @@ import "vue-router";
|
|
|
7
7
|
import "axios";
|
|
8
8
|
import "path-to-regexp";
|
|
9
9
|
const _hoisted_1 = ["id"];
|
|
10
|
+
const _hoisted_2 = /* @__PURE__ */ createTextVNode("Warning");
|
|
10
11
|
const _sfc_main = {
|
|
11
12
|
props: {
|
|
12
13
|
node: {
|
|
@@ -22,15 +23,22 @@ const _sfc_main = {
|
|
|
22
23
|
},
|
|
23
24
|
setup(__props) {
|
|
24
25
|
const props = __props;
|
|
25
|
-
const { node } = toRefs(props);
|
|
26
|
+
const { node, properties } = toRefs(props);
|
|
26
27
|
const { extractId } = useMethods();
|
|
27
28
|
const { id } = extractId(node.value);
|
|
28
29
|
const { children } = useChildren(node);
|
|
30
|
+
const tagName = "h" + properties.value.depth;
|
|
29
31
|
return (_ctx, _cache) => {
|
|
30
32
|
return openBlock(), createElementBlock("div", {
|
|
31
33
|
id: unref(id),
|
|
32
34
|
class: "admonition warning"
|
|
33
35
|
}, [
|
|
36
|
+
(openBlock(), createBlock(resolveDynamicComponent(tagName), null, {
|
|
37
|
+
default: withCtx(() => [
|
|
38
|
+
_hoisted_2
|
|
39
|
+
]),
|
|
40
|
+
_: 1
|
|
41
|
+
})),
|
|
34
42
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(children), (c, index) => {
|
|
35
43
|
return openBlock(), createBlock(resolveDynamicComponent(c.component), {
|
|
36
44
|
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 <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 }
|
|
1
|
+
{"version":3,"file":"Warning.js","sources":["../src/components/templates/Warning.vue"],"sourcesContent":["<template>\n <div :id=\"id\" class=\"admonition warning\">\n <component :is=\"tagName\">Warning</component>\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, properties } = toRefs(props)\n\nconst { extractId } = useMethods()\nconst { id } = extractId(node.value)\n\nconst { children } = useChildren(node)\nconst tagName = 'h' + properties.value.depth\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,UAAM,EAAE,MAAM,eAAe,OAAO,KAAK;AAEzC,UAAM,EAAE,cAAc,WAAY;AAClC,UAAM,EAAE,OAAO,UAAU,KAAK,KAAK;AAEnC,UAAM,EAAE,aAAa,YAAY,IAAI;AACrC,UAAM,UAAU,MAAM,WAAW,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/entry.js
CHANGED
|
@@ -45336,6 +45336,18 @@ function defineChildComponent(name, node) {
|
|
|
45336
45336
|
properties = {
|
|
45337
45337
|
text: node.nodeValue
|
|
45338
45338
|
};
|
|
45339
|
+
} else if (node.nodeName === "warning") {
|
|
45340
|
+
let parentNode = node.parentNode;
|
|
45341
|
+
let depth = 0;
|
|
45342
|
+
while (parentNode) {
|
|
45343
|
+
if (parentNode.nodeName === "section") {
|
|
45344
|
+
depth += 1;
|
|
45345
|
+
}
|
|
45346
|
+
parentNode = parentNode.parentNode;
|
|
45347
|
+
}
|
|
45348
|
+
properties = {
|
|
45349
|
+
depth
|
|
45350
|
+
};
|
|
45339
45351
|
} else if (node.nodeName === "title") {
|
|
45340
45352
|
let parentNode = node.parentNode;
|
|
45341
45353
|
let depth = 0;
|