vue3-sphinx-xml 0.3.0 → 0.3.1

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 CHANGED
@@ -44,8 +44,6 @@ npm install --save vue-highlightjs
44
44
  and edit your `main.js` application file to have the following:
45
45
 
46
46
  ```javascript
47
- import store from './store'
48
-
49
47
  import { installVue3SphinxXml } from 'vue3-sphinx-xml'
50
48
  import 'vue3-sphinx-xml/dist/style.css'
51
49
 
@@ -55,7 +53,7 @@ import 'highlight.js/styles/xcode.css'
55
53
 
56
54
  createApp(App)
57
55
  .use(store)
58
- .use(installVue3SphinxXml, { store })
56
+ .use(installVue3SphinxXml)
59
57
  .use(VueHighlightJS)
60
58
  .mount('#app')
61
59
  ```
@@ -82,6 +80,8 @@ import { SphinxPage } from 'vue3-sphinx-xml'
82
80
 
83
81
  ```
84
82
 
83
+ In this example the XML source files would be in the directory **public/sphinx-xml-files**.
84
+
85
85
  #### SphinxPage API
86
86
 
87
87
  - props
@@ -0,0 +1,71 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+ import { toRefs, openBlock, createElementBlock, mergeProps, unref, Fragment, renderList, createBlock, resolveDynamicComponent } from "vue";
21
+ import { u as useMethods } from "./methods.js";
22
+ import { u as useClasses, a as useChildren } from "./entry.js";
23
+ import "@hsorby/vue3-katex";
24
+ import "katex/dist/katex.min.css";
25
+ import "vue-router";
26
+ import "axios";
27
+ import "path-to-regexp";
28
+ const _hoisted_1 = ["id"];
29
+ const _sfc_main = {
30
+ props: {
31
+ node: {
32
+ type: void 0,
33
+ default: null
34
+ },
35
+ componentName: {
36
+ type: String
37
+ },
38
+ properties: {
39
+ type: Object
40
+ }
41
+ },
42
+ setup(__props) {
43
+ const props = __props;
44
+ const { node } = toRefs(props);
45
+ const { extractId } = useMethods();
46
+ const { classes } = useClasses(node);
47
+ const { id } = extractId(node.value);
48
+ const { children } = useChildren(node);
49
+ const combinedClasses = computed(() => {
50
+ return ["admonition", ...classes.value];
51
+ });
52
+ const result = dataObject(node.value, combinedClasses.value);
53
+ attrs.value = __spreadProps(__spreadValues({}, result.attrs), {
54
+ class: result.class.join(" ")
55
+ });
56
+ return (_ctx, _cache) => {
57
+ return openBlock(), createElementBlock("div", mergeProps({ id: unref(id) }, _ctx.attrs), [
58
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(children), (c, index) => {
59
+ return openBlock(), createBlock(resolveDynamicComponent(c.component), {
60
+ key: "admonition_component_" + index,
61
+ node: c.node,
62
+ componentName: c.name,
63
+ properties: c.properties
64
+ }, null, 8, ["node", "componentName", "properties"]);
65
+ }), 128))
66
+ ], 16, _hoisted_1);
67
+ };
68
+ }
69
+ };
70
+ export { _sfc_main as default };
71
+ //# sourceMappingURL=Admonition.js.map
@@ -0,0 +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 }\n})\n\nconst { node } = toRefs(props)\n\nconst { 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)\nattrs.value = {\n ...result.attrs,\n class: result.class.join(' '),\n }\n\n</script>\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCA,UAAM,EAAE,SAAS,OAAO,KAAK;AAE7B,UAAM,EAAE,cAAc,WAAY;AAClC,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;AAC3D,UAAM,QAAQ,iCACP,OAAO,QADA;AAAA,MAEV,OAAO,OAAO,MAAM,KAAK,GAAG;AAAA,IAC7B;;;;;;;;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { toRefs, openBlock, createElementBlock, createElementVNode, Fragment, renderList, unref, createBlock, resolveDynamicComponent } from "vue";
2
- import { u as useChildren } from "./entry.js";
2
+ import { a as useChildren } from "./entry.js";
3
3
  import "@hsorby/vue3-katex";
4
4
  import "katex/dist/katex.min.css";
5
5
  import "vue-router";
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import { toRefs, ref, computed, openBlock, createElementBlock, normalizeProps, guardReactiveProps, Fragment, renderList, unref, createBlock, resolveDynamicComponent } from "vue";
21
- import { a as useClasses, u as useChildren } from "./entry.js";
21
+ import { u as useClasses, a as useChildren } from "./entry.js";
22
22
  import { u as useMethods } from "./methods.js";
23
23
  import "@hsorby/vue3-katex";
24
24
  import "katex/dist/katex.min.css";
package/dist/Compound.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { toRefs, openBlock, createElementBlock, Fragment, renderList, unref, createBlock, resolveDynamicComponent } from "vue";
2
- import { u as useChildren } from "./entry.js";
2
+ import { a as useChildren } from "./entry.js";
3
3
  import "@hsorby/vue3-katex";
4
4
  import "katex/dist/katex.min.css";
5
5
  import "vue-router";
package/dist/Container.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { toRefs, ref, onMounted, openBlock, createElementBlock, normalizeClass, toHandlerKey, Fragment, renderList, unref, createBlock, resolveDynamicComponent } from "vue";
2
- import { _ as _export_sfc, u as useChildren, a as useClasses } from "./entry.js";
2
+ import { _ as _export_sfc, a as useChildren, u as useClasses } from "./entry.js";
3
3
  import { u as useMethods } from "./methods.js";
4
4
  import "@hsorby/vue3-katex";
5
5
  import "katex/dist/katex.min.css";
package/dist/Figure.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { toRefs, ref, computed, openBlock, createElementBlock, normalizeProps, guardReactiveProps, Fragment, renderList, unref, createBlock, resolveDynamicComponent } from "vue";
2
- import { a as useClasses, u as useChildren } from "./entry.js";
2
+ import { u as useClasses, a as useChildren } from "./entry.js";
3
3
  import { u as useMethods } from "./methods.js";
4
4
  import "@hsorby/vue3-katex";
5
5
  import "katex/dist/katex.min.css";
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import { toRefs, ref, computed, openBlock, createElementBlock, normalizeProps, guardReactiveProps, Fragment, renderList, unref, createBlock, resolveDynamicComponent } from "vue";
21
- import { a as useClasses, u as useChildren } from "./entry.js";
21
+ import { u as useClasses, a as useChildren } from "./entry.js";
22
22
  import { u as useMethods } from "./methods.js";
23
23
  import "@hsorby/vue3-katex";
24
24
  import "katex/dist/katex.min.css";
package/dist/Footnote.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { toRefs, ref, openBlock, createElementBlock, normalizeProps, guardReactiveProps, Fragment, renderList, unref, createBlock, resolveDynamicComponent } from "vue";
2
2
  import { u as useMethods } from "./methods.js";
3
- import { u as useChildren } from "./entry.js";
3
+ import { a as useChildren } from "./entry.js";
4
4
  import "@hsorby/vue3-katex";
5
5
  import "katex/dist/katex.min.css";
6
6
  import "vue-router";
package/dist/Image.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { toRefs, ref, computed, openBlock, createElementBlock, normalizeProps, guardReactiveProps } from "vue";
2
2
  import { useRoute } from "vue-router";
3
- import { u as useChildren, b as useSphinxStore, d as determineRouteUrl } from "./entry.js";
3
+ import { a as useChildren, b as useSphinxStore, d as determineRouteUrl } from "./entry.js";
4
4
  import { u as useMethods } from "./methods.js";
5
5
  import "@hsorby/vue3-katex";
6
6
  import "katex/dist/katex.min.css";
package/dist/Legend.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { toRefs, openBlock, createElementBlock, normalizeClass, unref, Fragment, renderList, createBlock, resolveDynamicComponent } from "vue";
2
- import { u as useChildren, a as useClasses } from "./entry.js";
2
+ import { a as useChildren, u as useClasses } from "./entry.js";
3
3
  import "@hsorby/vue3-katex";
4
4
  import "katex/dist/katex.min.css";
5
5
  import "vue-router";
package/dist/LineBlock.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { toRefs, ref, openBlock, createElementBlock, normalizeProps, guardReactiveProps, Fragment, renderList, unref, createBlock, resolveDynamicComponent } from "vue";
2
- import { u as useChildren } from "./entry.js";
2
+ import { a as useChildren } from "./entry.js";
3
3
  import { u as useMethods } from "./methods.js";
4
4
  import "@hsorby/vue3-katex";
5
5
  import "katex/dist/katex.min.css";
@@ -1,6 +1,6 @@
1
1
  import { toRefs, ref, openBlock, createElementBlock, normalizeProps, guardReactiveProps, Fragment, renderList, unref, createBlock, resolveDynamicComponent } from "vue";
2
2
  import { u as useMethods } from "./methods.js";
3
- import { u as useChildren } from "./entry.js";
3
+ import { a as useChildren } from "./entry.js";
4
4
  import "@hsorby/vue3-katex";
5
5
  import "katex/dist/katex.min.css";
6
6
  import "vue-router";
package/dist/Literal.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { toRefs, openBlock, createElementBlock, createElementVNode, Fragment, renderList, unref, createBlock, resolveDynamicComponent } from "vue";
2
2
  import { u as useMethods } from "./methods.js";
3
- import { u as useChildren } from "./entry.js";
3
+ import { a as useChildren } from "./entry.js";
4
4
  import "@hsorby/vue3-katex";
5
5
  import "katex/dist/katex.min.css";
6
6
  import "vue-router";
package/dist/Note.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { toRefs, openBlock, createElementBlock, normalizeProps, guardReactiveProps, Fragment, renderList, unref, createBlock, resolveDynamicComponent, createElementVNode } from "vue";
2
2
  import { u as useMethods } from "./methods.js";
3
- import { u as useChildren } from "./entry.js";
3
+ import { a as useChildren } from "./entry.js";
4
4
  import "@hsorby/vue3-katex";
5
5
  import "katex/dist/katex.min.css";
6
6
  import "vue-router";
package/dist/Reference.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { ref, toRefs, onMounted, resolveComponent, unref, openBlock, createBlock, withCtx, createTextVNode, toDisplayString, createElementBlock, Fragment, renderList, resolveDynamicComponent } from "vue";
2
2
  import { useRoute } from "vue-router";
3
- import { u as useChildren } from "./entry.js";
3
+ import { a as useChildren } from "./entry.js";
4
4
  import { u as useMethods } from "./methods.js";
5
5
  import { u as useBaseReference } from "./basereference.js";
6
6
  import "@hsorby/vue3-katex";
package/dist/Section.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { toRefs, openBlock, createElementBlock, unref, Fragment, renderList, createBlock, resolveDynamicComponent } from "vue";
2
2
  import { u as useMethods } from "./methods.js";
3
- import { u as useChildren } from "./entry.js";
3
+ import { a as useChildren } from "./entry.js";
4
4
  import "@hsorby/vue3-katex";
5
5
  import "katex/dist/katex.min.css";
6
6
  import "vue-router";
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import { toRefs, ref, openBlock, createBlock, resolveDynamicComponent, unref, mergeProps, toHandlerKey, withCtx, createElementBlock, Fragment, renderList } from "vue";
21
- import { u as useChildren, n as nodeNameTagNameMap } from "./entry.js";
21
+ import { a as useChildren, n as nodeNameTagNameMap } from "./entry.js";
22
22
  import { u as useMethods } from "./methods.js";
23
23
  import "@hsorby/vue3-katex";
24
24
  import "katex/dist/katex.min.css";
package/dist/Title.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { toRefs, computed, openBlock, createBlock, resolveDynamicComponent, unref, normalizeClass, withCtx, createElementBlock, Fragment, renderList } from "vue";
2
- import { u as useChildren } from "./entry.js";
2
+ import { a as useChildren } from "./entry.js";
3
3
  import "@hsorby/vue3-katex";
4
4
  import "katex/dist/katex.min.css";
5
5
  import "vue-router";
package/dist/TodoNode.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { toRefs, openBlock, createElementBlock, unref, Fragment, renderList, createBlock, resolveDynamicComponent } from "vue";
2
2
  import { u as useMethods } from "./methods.js";
3
- import { u as useChildren } from "./entry.js";
3
+ import { a as useChildren } from "./entry.js";
4
4
  import "@hsorby/vue3-katex";
5
5
  import "katex/dist/katex.min.css";
6
6
  import "vue-router";
package/dist/Topic.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { toRefs, openBlock, createElementBlock, unref, normalizeClass, Fragment, renderList, createBlock, resolveDynamicComponent } from "vue";
2
- import { u as useChildren, a as useClasses } from "./entry.js";
2
+ import { a as useChildren, u as useClasses } from "./entry.js";
3
3
  import { u as useMethods } from "./methods.js";
4
4
  import "@hsorby/vue3-katex";
5
5
  import "katex/dist/katex.min.css";
@@ -0,0 +1,54 @@
1
+ import { toRefs, openBlock, createElementBlock, unref, Fragment, renderList, createBlock, resolveDynamicComponent } from "vue";
2
+ import { u as useMethods } from "./methods.js";
3
+ import { a as useChildren } from "./entry.js";
4
+ import "@hsorby/vue3-katex";
5
+ import "katex/dist/katex.min.css";
6
+ import "vue-router";
7
+ import "axios";
8
+ import "path-to-regexp";
9
+ const _hoisted_1 = ["id"];
10
+ const _hoisted_2 = ["id"];
11
+ const _sfc_main = {
12
+ props: {
13
+ node: {
14
+ type: void 0,
15
+ default: null
16
+ },
17
+ componentName: {
18
+ type: String
19
+ },
20
+ properties: {
21
+ type: Object
22
+ }
23
+ },
24
+ setup(__props) {
25
+ const props = __props;
26
+ const { node } = toRefs(props);
27
+ const { extractId } = useMethods();
28
+ const { id } = extractId(node.value);
29
+ const { children } = useChildren(node);
30
+ return (_ctx, _cache) => {
31
+ return openBlock(), createElementBlock("div", {
32
+ id: unref(id),
33
+ class: "admonition warning"
34
+ }, [
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
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(children), (c, index) => {
42
+ return openBlock(), createBlock(resolveDynamicComponent(c.component), {
43
+ key: "warning_component_" + index,
44
+ node: c.node,
45
+ componentName: c.name,
46
+ properties: c.properties
47
+ }, null, 8, ["node", "componentName", "properties"]);
48
+ }), 128))
49
+ ], 8, _hoisted_1);
50
+ };
51
+ }
52
+ };
53
+ export { _sfc_main as default };
54
+ //# sourceMappingURL=Warning.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Warning.js","sources":["../src/components/templates/Warning.vue"],"sourcesContent":["<template>\n <div :id=\"id\" class=\"admonition warning\">\n <span v-for=\"(s, index) in extraIds\" :key=\"'id_span_' + index\" :id=\"s\" />\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":";;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,UAAM,EAAE,SAAS,OAAO,KAAK;AAE7B,UAAM,EAAE,cAAc,WAAY;AAClC,UAAM,EAAE,OAAO,UAAU,KAAK,KAAK;AAEnC,UAAM,EAAE,aAAa,YAAY,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/entry.js CHANGED
@@ -45165,6 +45165,8 @@ const nodeNameTemplateNameMap = /* @__PURE__ */ new Map([
45165
45165
  ]);
45166
45166
  function __variableDynamicImportRuntime1__(path) {
45167
45167
  switch (path) {
45168
+ case "../components/templates/Admonition.vue":
45169
+ return import("./Admonition.js");
45168
45170
  case "../components/templates/BlockQuote.vue":
45169
45171
  return import("./BlockQuote.js");
45170
45172
  case "../components/templates/CaptionNumber.vue":
@@ -45235,6 +45237,8 @@ function __variableDynamicImportRuntime1__(path) {
45235
45237
  return import("./Topic.js");
45236
45238
  case "../components/templates/Transition.vue":
45237
45239
  return import("./Transition.js");
45240
+ case "../components/templates/Warning.vue":
45241
+ return import("./Warning.js");
45238
45242
  default:
45239
45243
  return new Promise(function(resolve, reject) {
45240
45244
  (typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(reject.bind(null, new Error("Unknown variable dynamic import: " + path)));
@@ -45243,6 +45247,8 @@ function __variableDynamicImportRuntime1__(path) {
45243
45247
  }
45244
45248
  function __variableDynamicImportRuntime0__(path) {
45245
45249
  switch (path) {
45250
+ case "../components/templates/Admonition.vue":
45251
+ return import("./Admonition.js");
45246
45252
  case "../components/templates/BlockQuote.vue":
45247
45253
  return import("./BlockQuote.js");
45248
45254
  case "../components/templates/CaptionNumber.vue":
@@ -45313,6 +45319,8 @@ function __variableDynamicImportRuntime0__(path) {
45313
45319
  return import("./Topic.js");
45314
45320
  case "../components/templates/Transition.vue":
45315
45321
  return import("./Transition.js");
45322
+ case "../components/templates/Warning.vue":
45323
+ return import("./Warning.js");
45316
45324
  default:
45317
45325
  return new Promise(function(resolve, reject) {
45318
45326
  (typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(reject.bind(null, new Error("Unknown variable dynamic import: " + path)));
@@ -45624,5 +45632,5 @@ function installVue3SphinxXml(app, options = {}) {
45624
45632
  app.use(Vue3Katex, options.katex);
45625
45633
  app.use(am);
45626
45634
  }
45627
- export { _export_sfc as _, useClasses as a, useSphinxStore as b, constructPageNameFromRoute as c, determineRouteUrl as d, decodeHTML as e, _sfc_main as f, installVue3SphinxXml as i, nodeNameTagNameMap as n, useChildren as u };
45635
+ export { _export_sfc as _, useChildren as a, useSphinxStore as b, constructPageNameFromRoute as c, determineRouteUrl as d, decodeHTML as e, _sfc_main as f, installVue3SphinxXml as i, nodeNameTagNameMap as n, useClasses as u };
45628
45636
  //# sourceMappingURL=entry.js.map