docus 1.0.7 → 2.1.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.
Files changed (160) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +9 -24
  3. package/dist/index.cjs +549 -0
  4. package/dist/index.d.ts +25 -0
  5. package/dist/index.mjs +523 -0
  6. package/dist/runtime/app/components/DocusContent.vue +215 -0
  7. package/dist/runtime/app/components/DocusContent.vue.d.ts +25 -0
  8. package/dist/runtime/app/components/Error.vue +19 -0
  9. package/dist/runtime/app/components/Error.vue.d.ts +9 -0
  10. package/dist/runtime/app/components/Markdown.vue +56 -0
  11. package/dist/runtime/app/components/Markdown.vue.d.ts +25 -0
  12. package/dist/runtime/app/components/Page.vue +29 -0
  13. package/dist/runtime/app/components/Page.vue.d.ts +2 -0
  14. package/dist/runtime/app/components/Props.vue +130 -0
  15. package/dist/runtime/app/components/Props.vue.d.ts +80 -0
  16. package/dist/runtime/app/components/prose/ProseA.vue +41 -0
  17. package/dist/runtime/app/components/prose/ProseA.vue.d.ts +23 -0
  18. package/dist/runtime/app/components/prose/ProseBlockquote.vue +5 -0
  19. package/dist/runtime/app/components/prose/ProseCode.vue +5 -0
  20. package/dist/runtime/app/components/prose/ProseCodeInline.vue +5 -0
  21. package/dist/runtime/app/components/prose/ProseEm.vue +5 -0
  22. package/dist/runtime/app/components/prose/ProseH1.vue +3 -0
  23. package/dist/runtime/app/components/prose/ProseH2.vue +3 -0
  24. package/dist/runtime/app/components/prose/ProseH3.vue +3 -0
  25. package/dist/runtime/app/components/prose/ProseH4.vue +3 -0
  26. package/dist/runtime/app/components/prose/ProseH5.vue +3 -0
  27. package/dist/runtime/app/components/prose/ProseH6.vue +3 -0
  28. package/dist/runtime/app/components/prose/ProseHr.vue +3 -0
  29. package/dist/runtime/app/components/prose/ProseImg.vue +32 -0
  30. package/dist/runtime/app/components/prose/ProseImg.vue.d.ts +21 -0
  31. package/dist/runtime/app/components/prose/ProseLi.vue +3 -0
  32. package/dist/runtime/app/components/prose/ProseOl.vue +5 -0
  33. package/dist/runtime/app/components/prose/ProseParagraph.vue +3 -0
  34. package/dist/runtime/app/components/prose/ProseStrong.vue +5 -0
  35. package/dist/runtime/app/components/prose/ProseTable.vue +5 -0
  36. package/dist/runtime/app/components/prose/ProseTbody.vue +5 -0
  37. package/dist/runtime/app/components/prose/ProseTd.vue +5 -0
  38. package/dist/runtime/app/components/prose/ProseTh.vue +5 -0
  39. package/dist/runtime/app/components/prose/ProseThead.vue +5 -0
  40. package/dist/runtime/app/components/prose/ProseTr.vue +5 -0
  41. package/dist/runtime/app/components/prose/ProseUl.vue +5 -0
  42. package/dist/runtime/app/composables/helpers.d.ts +4 -0
  43. package/dist/runtime/app/composables/helpers.js +66 -0
  44. package/dist/runtime/app/composables/helpers.mjs +40 -0
  45. package/dist/runtime/app/composables/index.d.ts +90 -0
  46. package/dist/runtime/app/composables/index.js +108 -0
  47. package/dist/runtime/app/composables/index.mjs +63 -0
  48. package/dist/runtime/app/composables/navigation.d.ts +37 -0
  49. package/dist/runtime/app/composables/navigation.js +227 -0
  50. package/dist/runtime/app/composables/navigation.mjs +148 -0
  51. package/dist/runtime/app/composables/store.d.ts +7 -0
  52. package/dist/runtime/app/composables/store.js +52 -0
  53. package/dist/runtime/app/composables/store.mjs +35 -0
  54. package/dist/runtime/app/composables/style.d.ts +11 -0
  55. package/dist/runtime/app/composables/style.js +117 -0
  56. package/dist/runtime/app/composables/style.mjs +71 -0
  57. package/dist/runtime/app/composables/theme-colors.d.ts +30 -0
  58. package/dist/runtime/app/composables/theme-colors.js +80 -0
  59. package/dist/runtime/app/composables/theme-colors.mjs +48 -0
  60. package/dist/runtime/app/composables/websocket.d.ts +3 -0
  61. package/dist/runtime/app/composables/websocket.js +79 -0
  62. package/dist/runtime/app/composables/websocket.mjs +63 -0
  63. package/dist/runtime/app/layouts/default.vue +5 -0
  64. package/dist/runtime/app/layouts/error.vue +33 -0
  65. package/dist/runtime/app/layouts/error.vue.d.ts +21 -0
  66. package/dist/runtime/app/pages/_.vue +222 -0
  67. package/dist/runtime/app/pages/_.vue.d.ts +2 -0
  68. package/dist/runtime/context.d.ts +1 -0
  69. package/dist/runtime/context.js +17 -0
  70. package/dist/runtime/context.mjs +5 -0
  71. package/dist/runtime/database/Query.d.ts +18 -0
  72. package/dist/runtime/database/Query.js +68 -0
  73. package/dist/runtime/database/Query.mjs +49 -0
  74. package/dist/runtime/database/index.d.ts +4 -0
  75. package/dist/runtime/database/index.js +45 -0
  76. package/dist/runtime/database/index.mjs +25 -0
  77. package/dist/runtime/database/providers/local/Query.d.ts +14 -0
  78. package/dist/runtime/database/providers/local/Query.js +85 -0
  79. package/dist/runtime/database/providers/local/Query.mjs +60 -0
  80. package/dist/runtime/database/providers/local/index.d.ts +3 -0
  81. package/dist/runtime/database/providers/local/index.js +63 -0
  82. package/dist/runtime/database/providers/local/index.mjs +39 -0
  83. package/dist/runtime/database/providers/local/operations.d.ts +2 -0
  84. package/dist/runtime/database/providers/local/operations.js +83 -0
  85. package/dist/runtime/database/providers/local/operations.mjs +53 -0
  86. package/dist/runtime/database/providers/local/utils.d.ts +8 -0
  87. package/dist/runtime/database/providers/local/utils.js +28 -0
  88. package/dist/runtime/database/providers/local/utils.mjs +17 -0
  89. package/dist/runtime/index.d.ts +3 -0
  90. package/dist/runtime/index.js +44 -0
  91. package/dist/runtime/index.mjs +3 -0
  92. package/dist/runtime/navigation.d.ts +4 -0
  93. package/dist/runtime/navigation.js +176 -0
  94. package/dist/runtime/navigation.mjs +137 -0
  95. package/dist/runtime/server/api/get.d.ts +10 -0
  96. package/dist/runtime/server/api/get.js +24 -0
  97. package/dist/runtime/server/api/get.mjs +13 -0
  98. package/dist/runtime/server/api/list.d.ts +9 -0
  99. package/dist/runtime/server/api/list.js +34 -0
  100. package/dist/runtime/server/api/list.mjs +18 -0
  101. package/dist/runtime/server/api/navigation.d.ts +7 -0
  102. package/dist/runtime/server/api/navigation.js +20 -0
  103. package/dist/runtime/server/api/navigation.mjs +10 -0
  104. package/dist/runtime/server/api/preview.d.ts +3 -0
  105. package/dist/runtime/server/api/preview.js +54 -0
  106. package/dist/runtime/server/api/preview.mjs +31 -0
  107. package/dist/runtime/server/api/reload.d.ts +6 -0
  108. package/dist/runtime/server/api/reload.js +27 -0
  109. package/dist/runtime/server/api/reload.mjs +11 -0
  110. package/dist/runtime/server/api/search.d.ts +6 -0
  111. package/dist/runtime/server/api/search.js +27 -0
  112. package/dist/runtime/server/api/search.mjs +13 -0
  113. package/dist/runtime/server/content.d.ts +46 -0
  114. package/dist/runtime/server/content.js +175 -0
  115. package/dist/runtime/server/content.mjs +114 -0
  116. package/dist/runtime/server/socket.d.ts +9 -0
  117. package/dist/runtime/server/socket.js +33 -0
  118. package/dist/runtime/server/socket.mjs +20 -0
  119. package/dist/runtime/server/utils/cache.d.ts +19 -0
  120. package/dist/runtime/server/utils/cache.js +110 -0
  121. package/dist/runtime/server/utils/cache.mjs +75 -0
  122. package/dist/runtime/server/utils/index.d.ts +4 -0
  123. package/dist/runtime/server/utils/index.js +18 -0
  124. package/dist/runtime/server/utils/index.mjs +8 -0
  125. package/dist/runtime/transformers/index.d.ts +1 -0
  126. package/dist/runtime/transformers/index.js +26 -0
  127. package/dist/runtime/transformers/index.mjs +11 -0
  128. package/dist/runtime/transformers/json.d.ts +3 -0
  129. package/dist/runtime/transformers/json.js +15 -0
  130. package/dist/runtime/transformers/json.mjs +5 -0
  131. package/dist/runtime/transformers/markdown/index.d.ts +8 -0
  132. package/dist/runtime/transformers/markdown/index.js +25 -0
  133. package/dist/runtime/transformers/markdown/index.mjs +16 -0
  134. package/dist/runtime/transformers/utils/index.d.ts +1 -0
  135. package/dist/runtime/transformers/utils/index.js +18 -0
  136. package/dist/runtime/transformers/utils/index.mjs +1 -0
  137. package/dist/runtime/transformers/utils/path.d.ts +26 -0
  138. package/dist/runtime/transformers/utils/path.js +88 -0
  139. package/dist/runtime/transformers/utils/path.mjs +56 -0
  140. package/dist/runtime/utils/index.d.ts +1 -0
  141. package/dist/runtime/utils/index.js +18 -0
  142. package/dist/runtime/utils/index.mjs +1 -0
  143. package/dist/runtime/utils/log.d.ts +1 -0
  144. package/dist/runtime/utils/log.js +14 -0
  145. package/dist/runtime/utils/log.mjs +2 -0
  146. package/dist/runtime/utils/object.d.ts +9 -0
  147. package/dist/runtime/utils/object.js +22 -0
  148. package/dist/runtime/utils/object.mjs +4 -0
  149. package/dist/templates/content.mjs +50 -0
  150. package/dist/templates/docus.mjs +13 -0
  151. package/dist/templates/hot.mjs +16 -0
  152. package/dist/templates/i18n.mjs +23 -0
  153. package/dist/templates/options.mjs +46 -0
  154. package/package.json +78 -59
  155. package/shims.d.ts +24 -0
  156. package/types.d.ts +397 -0
  157. package/dist/create-docus/create-docus.js +0 -7
  158. package/dist/create-docus/helpers.js +0 -244
  159. package/dist/create-docus/index.js +0 -87
  160. package/dist/index.js +0 -10
@@ -0,0 +1,215 @@
1
+ <script>
2
+ "use strict";
3
+
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ module.exports = void 0;
8
+
9
+ var _vue = _interopRequireDefault(require("vue"));
10
+
11
+ var _scule = require("scule");
12
+
13
+ var _propertyInformation = require("property-information");
14
+
15
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
+
17
+ const rootKeys = ["class-name", "class", "className", "style"];
18
+ const rxOn = /^@|^v-on:/;
19
+ const rxBind = /^:|^v-bind:/;
20
+ const rxModel = /^v-model/;
21
+ const nativeInputs = ["select", "textarea", "input"];
22
+
23
+ const number = d => +d;
24
+
25
+ const trim = d => d.trim();
26
+
27
+ const noop = d => d;
28
+
29
+ const lazyComponents = new Set();
30
+
31
+ function valueInContext(code, context) {
32
+ return code.split(".").reduce((o, k) => o && o[k], context);
33
+ }
34
+
35
+ function evalInContext(code, context) {
36
+ let result = valueInContext(code, context);
37
+
38
+ if (typeof result === "undefined") {
39
+ try {
40
+ result = JSON.parse(code);
41
+ } catch (e) {
42
+ console.error(`Error evaluating ${code}`, e);
43
+ result = code;
44
+ }
45
+ }
46
+
47
+ return result;
48
+ }
49
+
50
+ function propsToData(node, doc) {
51
+ const {
52
+ tag = "",
53
+ props = {}
54
+ } = node;
55
+ return Object.keys(props).reduce(function (data, key) {
56
+ const k = key.replace(/.*:/, "");
57
+ let obj = rootKeys.includes(k) ? data : data.attrs;
58
+ const value = props[key];
59
+ const {
60
+ attribute
61
+ } = (0, _propertyInformation.find)(_propertyInformation.html, key);
62
+ const native = nativeInputs.includes(tag);
63
+
64
+ if (rxModel.test(key) && value in doc && !native) {
65
+ const mods = key.replace(rxModel, "").split(".").filter(d => d).reduce((d, k2) => {
66
+ d[k2] = true;
67
+ return d;
68
+ }, {});
69
+ const field = "value";
70
+ const event = mods.lazy ? "change" : "input";
71
+ const processor = mods.number ? number : mods.trim ? trim : noop;
72
+ obj[field] = evalInContext(value, doc);
73
+ data.on = data.on || {};
74
+
75
+ data.on[event] = e => doc[value] = processor(e);
76
+ } else if (key === "v-bind") {
77
+ const val = evalInContext(value, doc);
78
+ obj = Object.assign(obj, val);
79
+ } else if (rxOn.test(key)) {
80
+ key = key.replace(rxOn, "");
81
+ data.on = data.on || {};
82
+
83
+ data.on[key] = () => evalInContext(value, doc);
84
+ } else if (rxBind.test(key)) {
85
+ key = key.replace(rxBind, "");
86
+ obj[key] = evalInContext(value, doc);
87
+ } else if (Array.isArray(value)) {
88
+ obj[attribute] = value.join(" ");
89
+ } else if (typeof value === "string") {
90
+ obj[attribute] = valueInContext(value, doc) || value;
91
+ } else {
92
+ obj[attribute] = value;
93
+ }
94
+
95
+ return data;
96
+ }, {
97
+ attrs: {}
98
+ });
99
+ }
100
+
101
+ function slotsToData(node, h, doc) {
102
+ const data = {};
103
+ const children = node.children || [];
104
+ children.forEach(child => {
105
+ if (!isTemplate(child) || isDefaultTemplate(child)) return;
106
+ data.scopedSlots = data.scopedSlots || {};
107
+ const template = child;
108
+ const name = getSlotName(template);
109
+ const vDomTree = template.content.map(tmplNode => processNode(tmplNode, h, doc));
110
+
111
+ data.scopedSlots[name] = function () {
112
+ return vDomTree;
113
+ };
114
+ });
115
+ return data;
116
+ }
117
+
118
+ function processNode(node, h, doc) {
119
+ if (node.type === "text") return node.value;
120
+ const slotData = slotsToData(node || {}, h, doc);
121
+ const propData = propsToData(node || {}, doc);
122
+ const data = Object.assign({}, slotData, propData);
123
+ const children = [];
124
+
125
+ for (const child of node.children) {
126
+ if (isTemplate(child) && !isDefaultTemplate(child)) continue;
127
+ const processQueue = isDefaultTemplate(child) ? child.content : [child];
128
+ children.push(...processQueue.map(node2 => processNode(node2, h, doc)));
129
+ }
130
+
131
+ if (process.server && typeof _vue.default.component((0, _scule.pascalCase)(node.tag)) === "function") {
132
+ lazyComponents.add((0, _scule.pascalCase)(node.tag));
133
+ }
134
+
135
+ return h(node.tag, data, children);
136
+ }
137
+
138
+ const DEFAULT_SLOT = "default";
139
+
140
+ function isDefaultTemplate(node) {
141
+ return isTemplate(node) && getSlotName(node) === DEFAULT_SLOT;
142
+ }
143
+
144
+ function isTemplate(node) {
145
+ return node.tag === "template";
146
+ }
147
+
148
+ function getSlotName(node) {
149
+ let name = "";
150
+
151
+ for (const propName of Object.keys(node.props || {})) {
152
+ if (!propName.startsWith("#") && !propName.startsWith("v-slot:")) continue;
153
+ name = propName.split(/[:#]/, 2)[1];
154
+ break;
155
+ }
156
+
157
+ return name || DEFAULT_SLOT;
158
+ }
159
+
160
+ var _default = {
161
+ name: "DocusContent",
162
+ functional: true,
163
+ props: {
164
+ document: {
165
+ type: [Object, String],
166
+ required: true
167
+ },
168
+ tag: {
169
+ type: String,
170
+ default: void 0
171
+ }
172
+ },
173
+
174
+ render(h, {
175
+ data,
176
+ props,
177
+ parent,
178
+ _v
179
+ }) {
180
+ const {
181
+ tag,
182
+ document
183
+ } = props;
184
+ if (!document) return;
185
+ if (typeof document === "string") return _v(document);
186
+ let body = document.body || document;
187
+ body = body.ast || body;
188
+ let classes = [];
189
+
190
+ if (Array.isArray(data.class)) {
191
+ classes = data.class;
192
+ } else if (typeof data.class === "object") {
193
+ const keys = Object.keys(data.class);
194
+ classes = keys.filter(key => data.class[key]);
195
+ } else {
196
+ classes = [data.class];
197
+ }
198
+
199
+ data.class = classes;
200
+ data.props = Object.assign({ ...body.props
201
+ }, data.props);
202
+ const children = (body.children || []).map(child => processNode(child, h, document));
203
+
204
+ if (process.server) {
205
+ ;
206
+ parent.$root.context.beforeSerialize(nuxtState => {
207
+ if (nuxtState.fetch._lazyComponents) lazyComponents.forEach(name => nuxtState.fetch._lazyComponents.add(name));else nuxtState.fetch._lazyComponents = lazyComponents;
208
+ });
209
+ }
210
+
211
+ return h(tag || body.tag || "div", data, children);
212
+ }
213
+
214
+ };
215
+ module.exports = _default;</script>
@@ -0,0 +1,25 @@
1
+ import type { CreateElement, RenderContext } from 'vue';
2
+ declare const _default: {
3
+ name: string;
4
+ functional: boolean;
5
+ props: {
6
+ /**
7
+ *
8
+ */
9
+ document: {
10
+ type: (StringConstructor | ObjectConstructor)[];
11
+ required: boolean;
12
+ };
13
+ tag: {
14
+ type: StringConstructor;
15
+ default: any;
16
+ };
17
+ };
18
+ render(h: CreateElement, { data, props, parent, _v }: RenderContext<import("vue/types/options").DefaultProps> & {
19
+ _v: any;
20
+ }): any;
21
+ };
22
+ /**
23
+ * DocusContent component
24
+ */
25
+ export default _default;
@@ -0,0 +1,19 @@
1
+ <template>
2
+ <div>{{ error.message }}</div>
3
+ </template>
4
+ <script>
5
+ "use strict";
6
+
7
+ Object.defineProperty(exports, "__esModule", {
8
+ value: true
9
+ });
10
+ module.exports = void 0;
11
+ var _default = {
12
+ props: {
13
+ error: {
14
+ type: Object,
15
+ required: true
16
+ }
17
+ }
18
+ };
19
+ module.exports = _default;</script>
@@ -0,0 +1,9 @@
1
+ declare namespace _default {
2
+ namespace props {
3
+ namespace error {
4
+ const type: ObjectConstructor;
5
+ const required: boolean;
6
+ }
7
+ }
8
+ }
9
+ export default _default;
@@ -0,0 +1,56 @@
1
+ <script>
2
+ "use strict";
3
+
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ module.exports = void 0;
8
+
9
+ var _utils = require("@docus/mdc/utils");
10
+
11
+ var _default = {
12
+ name: "Markdown",
13
+ functional: true,
14
+ props: {
15
+ use: {
16
+ type: [String, Object, Function, Array],
17
+ default: "default"
18
+ },
19
+ unwrap: {
20
+ type: String,
21
+ default: ""
22
+ }
23
+ },
24
+ render: (_, ctx) => {
25
+ const slot = ctx.props.use || "default";
26
+ let node = typeof slot === "string" ? ctx.parent.$scopedSlots[slot] || ctx.parent.$slots[slot] || ctx.parent.$parent?.$scopedSlots[slot] || ctx.parent.$parent?.$slots[slot] : slot;
27
+ if (typeof node === "function") node = node();
28
+ if (typeof node === "string") return [node];
29
+
30
+ if (node && ctx.props.unwrap) {
31
+ const tags = (0, _utils.expandTags)(ctx.props.unwrap.split(/[,\s]/), ctx.parent.$config.$docus.tagMap);
32
+ const first = Array.isArray(node) && node[0];
33
+ const requireSplitor = ctx.scopedSlots.between && first && !first.text && !["span", "strong", "em", "a", "code"].some(tag => (0, _utils.isTag)(first, tag));
34
+
35
+ if (requireSplitor) {
36
+ node = node.flatMap((n, i) => i === 0 ? (0, _utils.unwrap)(n, tags) : [ctx.scopedSlots.between(), (0, _utils.unwrap)(n, tags)]);
37
+ } else {
38
+ node = (0, _utils.flatUnwrap)(node, tags);
39
+ }
40
+ }
41
+
42
+ if (Array.isArray(node) && node.length > 1 && (ctx.data.staticClass || ctx.data.class)) {
43
+ console.warn("Markdown: `class` prop is ignored because there is multiple elements on component root.");
44
+ console.warn("Markdown: This is likely to happen when you use `unwrap` attribute.");
45
+ } else {
46
+ const tmpNode = Array.isArray(node) ? node[0] : node;
47
+
48
+ if (tmpNode?.data) {
49
+ Object.assign(tmpNode.data, ctx.data);
50
+ }
51
+ }
52
+
53
+ return node;
54
+ }
55
+ };
56
+ module.exports = _default;</script>
@@ -0,0 +1,25 @@
1
+ declare const _default: {
2
+ name: string;
3
+ functional: boolean;
4
+ props: {
5
+ /**
6
+ * A slot name or function
7
+ */
8
+ use: {
9
+ type: (StringConstructor | ArrayConstructor | ObjectConstructor | FunctionConstructor)[];
10
+ default: string;
11
+ };
12
+ /**
13
+ *
14
+ */
15
+ unwrap: {
16
+ type: StringConstructor;
17
+ default: string;
18
+ };
19
+ };
20
+ render: (_: any, ctx: any) => any;
21
+ };
22
+ /**
23
+ * Markdown component
24
+ */
25
+ export default _default;
@@ -0,0 +1,29 @@
1
+ <template>
2
+ <DocusContent :document="page" />
3
+ </template>
4
+
5
+ <script>
6
+ "use strict";
7
+
8
+ Object.defineProperty(exports, "__esModule", {
9
+ value: true
10
+ });
11
+ module.exports = void 0;
12
+
13
+ var _app = require("#app");
14
+
15
+ var _default = (0, _app.defineComponent)({
16
+ props: {
17
+ page: {
18
+ type: Object,
19
+ required: true
20
+ }
21
+ },
22
+ templateOptions: {
23
+ aside: false,
24
+ asideClass: "",
25
+ fluid: false
26
+ }
27
+ });
28
+
29
+ module.exports = _default;</script>
@@ -0,0 +1,2 @@
1
+ declare const _default: any;
2
+ export default _default;
@@ -0,0 +1,130 @@
1
+ <template>
2
+ <ProseTable v-if="component">
3
+ <ProseThead>
4
+ <ProseTr>
5
+ <ProseTh>Prop</ProseTh>
6
+ <ProseTh>Type</ProseTh>
7
+ <ProseTh v-if="showRequired">Required</ProseTh>
8
+ <ProseTh v-if="showDefault">Default</ProseTh>
9
+ <ProseTh v-if="showValues">Values</ProseTh>
10
+ <ProseTh v-if="showDescription">Description</ProseTh>
11
+ </ProseTr>
12
+ </ProseThead>
13
+ <ProseTbody>
14
+ <ProseTr v-for="prop in properties" :key="prop.name">
15
+ <ProseTd>
16
+ <ProseCodeInline>{{ prop.name }}</ProseCodeInline>
17
+ </ProseTd>
18
+ <ProseTd>
19
+ <ProseCodeInline>{{ prop.type.join(' | ') }}</ProseCodeInline>
20
+ </ProseTd>
21
+ <ProseTd v-if="showRequired">{{ prop.required ? 'Yes' : 'No' }}</ProseTd>
22
+ <ProseTd v-if="showDefault">
23
+ <ProseCodeInline v-if="prop.default">{{ prop.default }}</ProseCodeInline>
24
+ </ProseTd>
25
+ <ProseTd v-if="showValues">
26
+ <ProseCodeInline v-if="prop.values">{{
27
+ prop.values && JSON.stringify(prop.values).replace(/,/g, ', ')
28
+ }}</ProseCodeInline>
29
+ <span v-else>-</span>
30
+ </ProseTd>
31
+ <ProseTd v-if="showDescription">
32
+ <div v-html="prop.description"></div>
33
+ </ProseTd>
34
+ </ProseTr>
35
+ </ProseTbody>
36
+ </ProseTable>
37
+ </template>
38
+
39
+ <script>
40
+ "use strict";
41
+
42
+ Object.defineProperty(exports, "__esModule", {
43
+ value: true
44
+ });
45
+ module.exports = void 0;
46
+
47
+ var _compositionApi = require("@vue/composition-api");
48
+
49
+ var _nuxtComponentMeta = require("nuxt-component-meta");
50
+
51
+ var _default = (0, _compositionApi.defineComponent)({
52
+ props: {
53
+ of: {
54
+ type: String,
55
+ required: true
56
+ },
57
+ required: {
58
+ type: Boolean,
59
+ default: undefined,
60
+ description: 'Toggle required column.'
61
+ },
62
+ values: {
63
+ type: Boolean,
64
+ default: undefined,
65
+ description: 'Toggle values column.'
66
+ },
67
+ description: {
68
+ type: Boolean,
69
+ default: undefined,
70
+ description: 'Toggle description column.'
71
+ },
72
+ default: {
73
+ type: Boolean,
74
+ default: undefined,
75
+ description: 'Toggle default column.'
76
+ }
77
+ },
78
+
79
+ setup(props) {
80
+ const component = (0, _compositionApi.computed)(() => (0, _nuxtComponentMeta.getComponent)(props.of));
81
+ const properties = (0, _compositionApi.computed)(() => component.value.props.map(prop => ({
82
+ name: prop.name,
83
+ type: prop.type,
84
+ default: prop.default,
85
+ required: prop.required,
86
+ values: prop.values,
87
+ description: prop.description,
88
+ internal: prop.internal
89
+ })).filter(prop => prop.internal !== true));
90
+ const showRequired = (0, _compositionApi.computed)(() => {
91
+ if (props.required !== undefined) {
92
+ return props.required;
93
+ }
94
+
95
+ return properties.value?.find(prop => prop.required !== undefined);
96
+ });
97
+ const showValues = (0, _compositionApi.computed)(() => {
98
+ if (props.values !== undefined) {
99
+ return props.values;
100
+ }
101
+
102
+ return properties.value?.find(prop => prop.values);
103
+ });
104
+ const showDescription = (0, _compositionApi.computed)(() => {
105
+ if (props.description !== undefined) {
106
+ return props.description;
107
+ }
108
+
109
+ return properties.value?.find(prop => prop.description);
110
+ });
111
+ const showDefault = (0, _compositionApi.computed)(() => {
112
+ if (props.default !== undefined) {
113
+ return props.default;
114
+ }
115
+
116
+ return properties.value?.find(prop => prop.default);
117
+ });
118
+ return {
119
+ component,
120
+ properties,
121
+ showRequired,
122
+ showValues,
123
+ showDescription,
124
+ showDefault
125
+ };
126
+ }
127
+
128
+ });
129
+
130
+ module.exports = _default;</script>
@@ -0,0 +1,80 @@
1
+ declare var _default: import("vue").ComponentOptions<import("vue").default, import("@vue/composition-api").ShallowUnwrapRef<{
2
+ component: import("@vue/composition-api").ComputedRef<import("nuxt-component-meta").ComponentMeta>;
3
+ properties: import("@vue/composition-api").ComputedRef<{
4
+ name: string;
5
+ type: string[];
6
+ default: string;
7
+ required: boolean;
8
+ values: string[];
9
+ description: string;
10
+ internal: any;
11
+ }[]>;
12
+ showRequired: import("@vue/composition-api").ComputedRef<any>;
13
+ showValues: import("@vue/composition-api").ComputedRef<any>;
14
+ showDescription: import("@vue/composition-api").ComputedRef<any>;
15
+ showDefault: import("@vue/composition-api").ComputedRef<any>;
16
+ }> & import("@vue/composition-api").Data, {}, {}, {
17
+ of: {
18
+ type: StringConstructor;
19
+ required: true;
20
+ };
21
+ required: {
22
+ type: BooleanConstructor;
23
+ default: any;
24
+ description: string;
25
+ };
26
+ values: {
27
+ type: BooleanConstructor;
28
+ default: any;
29
+ description: string;
30
+ };
31
+ description: {
32
+ type: BooleanConstructor;
33
+ default: any;
34
+ description: string;
35
+ };
36
+ default: {
37
+ type: BooleanConstructor;
38
+ default: any;
39
+ description: string;
40
+ };
41
+ }, {
42
+ default: boolean;
43
+ of: string;
44
+ required: boolean;
45
+ description: boolean;
46
+ values: boolean;
47
+ } & {}> & Omit<import("vue").VueConstructor<import("vue").default>, never> & (new (...args: any[]) => import("@vue/composition-api").ComponentRenderProxy<{
48
+ default: boolean;
49
+ of: string;
50
+ required: boolean;
51
+ description: boolean;
52
+ values: boolean;
53
+ } & {}, import("@vue/composition-api").ShallowUnwrapRef<{
54
+ component: import("@vue/composition-api").ComputedRef<import("nuxt-component-meta").ComponentMeta>;
55
+ properties: import("@vue/composition-api").ComputedRef<{
56
+ name: string;
57
+ type: string[];
58
+ default: string;
59
+ required: boolean;
60
+ values: string[];
61
+ description: string;
62
+ internal: any;
63
+ }[]>;
64
+ showRequired: import("@vue/composition-api").ComputedRef<any>;
65
+ showValues: import("@vue/composition-api").ComputedRef<any>;
66
+ showDescription: import("@vue/composition-api").ComputedRef<any>;
67
+ showDefault: import("@vue/composition-api").ComputedRef<any>;
68
+ }>, import("@vue/composition-api").Data, {}, {}, {}, {}, {}, {
69
+ default: boolean;
70
+ of: string;
71
+ required: boolean;
72
+ description: boolean;
73
+ values: boolean;
74
+ } & {}, {
75
+ default: boolean;
76
+ required: boolean;
77
+ description: boolean;
78
+ values: boolean;
79
+ }, true>);
80
+ export default _default;
@@ -0,0 +1,41 @@
1
+ <template>
2
+ <a v-if="remote || static" target="blank" :href="href"><slot /></a>
3
+ <NuxtLink v-else :to="href" :target="blank" :static="static">
4
+ <!-- TODO: implement static & remote logic -->
5
+ <slot />
6
+ </NuxtLink>
7
+ </template>
8
+
9
+ <script>
10
+ "use strict";
11
+
12
+ Object.defineProperty(exports, "__esModule", {
13
+ value: true
14
+ });
15
+ module.exports = void 0;
16
+
17
+ var _ufo = require("ufo");
18
+
19
+ var _default = {
20
+ props: {
21
+ href: {
22
+ type: String,
23
+ default: ""
24
+ },
25
+ blank: {
26
+ type: Boolean,
27
+ default: false
28
+ },
29
+ static: {
30
+ type: Boolean,
31
+ default: false
32
+ }
33
+ },
34
+ computed: {
35
+ remote() {
36
+ return (0, _ufo.hasProtocol)(this.href, true);
37
+ }
38
+
39
+ }
40
+ };
41
+ module.exports = _default;</script>
@@ -0,0 +1,23 @@
1
+ declare const _default: {
2
+ props: {
3
+ href: {
4
+ type: StringConstructor;
5
+ default: string;
6
+ };
7
+ blank: {
8
+ type: BooleanConstructor;
9
+ default: boolean;
10
+ };
11
+ /**
12
+ * `true` if `href` points to a static file
13
+ */
14
+ static: {
15
+ type: BooleanConstructor;
16
+ default: boolean;
17
+ };
18
+ };
19
+ computed: {
20
+ remote(): boolean;
21
+ };
22
+ };
23
+ export default _default;
@@ -0,0 +1,5 @@
1
+ <template>
2
+ <blockquote>
3
+ <slot />
4
+ </blockquote>
5
+ </template>
@@ -0,0 +1,5 @@
1
+ <template>
2
+ <div class="docus-highlight group">
3
+ <slot />
4
+ </div>
5
+ </template>
@@ -0,0 +1,5 @@
1
+ <template>
2
+ <code>
3
+ <slot />
4
+ </code>
5
+ </template>
@@ -0,0 +1,5 @@
1
+ <template>
2
+ <em>
3
+ <slot />
4
+ </em>
5
+ </template>
@@ -0,0 +1,3 @@
1
+ <template>
2
+ <h1><slot /></h1>
3
+ </template>