docus 2.1.0 → 3.0.0-beta.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.
Files changed (274) hide show
  1. package/README.md +6 -4
  2. package/app/router.options.ts +18 -0
  3. package/assets/css/fonts.css +84 -0
  4. package/assets/css/main.css +11 -0
  5. package/assets/css/tailwind.css +282 -0
  6. package/components/app/Container.vue +25 -0
  7. package/components/app/Footer.vue +40 -0
  8. package/components/app/Navbar.vue +26 -0
  9. package/components/app/NavbarLogo.vue +33 -0
  10. package/components/app/Page.vue +7 -0
  11. package/components/app/PoweredByDocus.vue +11 -0
  12. package/components/content/Alert.vue +124 -0
  13. package/components/content/BlockHero.vue +54 -0
  14. package/components/content/ButtonLink.vue +45 -0
  15. package/components/content/Card.vue +46 -0
  16. package/components/content/CardGrid.vue +23 -0
  17. package/components/content/CodeBlock.vue +47 -0
  18. package/components/content/CodeGroup.vue +135 -0
  19. package/components/content/CopyButton.vue +49 -0
  20. package/{dist/runtime/app/components/prose/ProseOl.vue → components/content/List.vue} +2 -2
  21. package/components/content/NeedContribution.vue +23 -0
  22. package/components/content/ReadMore.vue +25 -0
  23. package/components/content/Sandbox.vue +102 -0
  24. package/components/content/TabsHeader.vue +44 -0
  25. package/components/content/Terminal.vue +64 -0
  26. package/components/content/VideoPlayer.vue +115 -0
  27. package/components/docs/DocsAside.vue +21 -0
  28. package/components/docs/DocsAsideTree.vue +102 -0
  29. package/components/docs/DocsHero.vue +39 -0
  30. package/components/docs/DocsPage.vue +22 -0
  31. package/components/docs/DocsPageContent.vue +31 -0
  32. package/components/docs/DocsToc.vue +74 -0
  33. package/components/globals/Icon.vue +24 -0
  34. package/{dist/runtime/app/components/prose/ProseHr.vue → components/globals/Logo.vue} +1 -1
  35. package/components/globals/NuxtImg.vue +45 -0
  36. package/components/globals/SocialIcons.vue +45 -0
  37. package/components/globals/ThemeSelect.vue +35 -0
  38. package/components/icons/IconAlgolia.vue +8 -0
  39. package/components/icons/IconArrowLeft.vue +10 -0
  40. package/components/icons/IconArrowRight.vue +10 -0
  41. package/components/icons/IconBadgeCheck.vue +14 -0
  42. package/components/icons/IconCheck.vue +10 -0
  43. package/components/icons/IconCheckCircle.vue +10 -0
  44. package/components/icons/IconChevronRight.vue +12 -0
  45. package/components/icons/IconClipboardCheck.vue +14 -0
  46. package/components/icons/IconClipboardCopy.vue +14 -0
  47. package/components/icons/IconCodeSandbox.vue +8 -0
  48. package/components/icons/IconCopy.vue +17 -0
  49. package/components/icons/IconDots.vue +10 -0
  50. package/components/icons/IconEdit.vue +18 -0
  51. package/components/icons/IconExclamationCircle.vue +12 -0
  52. package/components/icons/IconExclamationTriangle.vue +10 -0
  53. package/components/icons/IconExternalLink.vue +12 -0
  54. package/components/icons/IconGit.vue +7 -0
  55. package/components/icons/IconGitHub.vue +10 -0
  56. package/components/icons/IconHeart.vue +9 -0
  57. package/components/icons/IconInformationCircle.vue +10 -0
  58. package/components/icons/IconLighthouse.vue +83 -0
  59. package/components/icons/IconLine.vue +10 -0
  60. package/components/icons/IconMarkdown.vue +13 -0
  61. package/components/icons/IconMenu.vue +12 -0
  62. package/components/icons/IconMenuAlt.vue +10 -0
  63. package/components/icons/IconMinus.vue +10 -0
  64. package/components/icons/IconMoon.vue +10 -0
  65. package/components/icons/IconNuxt.vue +14 -0
  66. package/components/icons/IconNuxtContent.vue +20 -0
  67. package/components/icons/IconNuxtLabs.vue +21 -0
  68. package/components/icons/IconPlus.vue +10 -0
  69. package/components/icons/IconPuzzle.vue +8 -0
  70. package/components/icons/IconSSG.vue +7 -0
  71. package/components/icons/IconSearch.vue +12 -0
  72. package/components/icons/IconSun.vue +10 -0
  73. package/components/icons/IconTocBack.vue +21 -0
  74. package/components/icons/IconTocCurrent.vue +21 -0
  75. package/components/icons/IconTocNext.vue +8 -0
  76. package/components/icons/IconTranslate.vue +14 -0
  77. package/components/icons/IconTwitter.vue +8 -0
  78. package/components/icons/IconVite.vue +30 -0
  79. package/components/icons/IconVue.vue +6 -0
  80. package/components/icons/IconVueTelescope.vue +11 -0
  81. package/components/icons/IconWindi.vue +17 -0
  82. package/components/icons/IconX.vue +12 -0
  83. package/components/icons/IconXCircle.vue +10 -0
  84. package/components/icons/IconZap.vue +8 -0
  85. package/components/prose/ProseA.vue +66 -0
  86. package/components/prose/ProseBlockquote.vue +21 -0
  87. package/components/prose/ProseCode.vue +68 -0
  88. package/components/prose/ProseCodeInline.vue +38 -0
  89. package/components/prose/ProseEm.vue +11 -0
  90. package/components/prose/ProseH1.vue +22 -0
  91. package/components/prose/ProseH2.vue +22 -0
  92. package/components/prose/ProseH3.vue +24 -0
  93. package/components/prose/ProseH4.vue +24 -0
  94. package/components/prose/ProseHr.vue +13 -0
  95. package/components/prose/ProseImg.vue +30 -0
  96. package/components/prose/ProseLi.vue +31 -0
  97. package/components/prose/ProseOl.vue +16 -0
  98. package/components/prose/ProseP.vue +14 -0
  99. package/components/prose/ProseStrong.vue +14 -0
  100. package/components/prose/ProseTable.vue +13 -0
  101. package/{dist/runtime/app/components → components}/prose/ProseTbody.vue +0 -0
  102. package/components/prose/ProseTd.vue +11 -0
  103. package/components/prose/ProseTh.vue +11 -0
  104. package/components/prose/ProseThead.vue +11 -0
  105. package/components/prose/ProseTr.vue +11 -0
  106. package/components/prose/ProseUl.vue +15 -0
  107. package/composables/useContent.ts +156 -0
  108. package/composables/useMenu.ts +22 -0
  109. package/composables/useScrollToHeading.ts +35 -0
  110. package/composables/useScrollspy.ts +46 -0
  111. package/composables/useTheme.ts +12 -0
  112. package/layouts/default.vue +29 -0
  113. package/layouts/page.vue +11 -0
  114. package/nuxt.config.ts +151 -0
  115. package/package.json +46 -83
  116. package/pages/[...slug].vue +26 -0
  117. package/public/android-chrome-192x192.png +0 -0
  118. package/public/android-chrome-512x512.png +0 -0
  119. package/public/apple-touch-icon.png +0 -0
  120. package/public/favicon-16x16.png +0 -0
  121. package/public/favicon-32x32.png +0 -0
  122. package/public/favicon.ico +0 -0
  123. package/public/site.webmanifest +1 -0
  124. package/LICENSE +0 -21
  125. package/dist/index.cjs +0 -549
  126. package/dist/index.d.ts +0 -25
  127. package/dist/index.mjs +0 -523
  128. package/dist/runtime/app/components/DocusContent.vue +0 -215
  129. package/dist/runtime/app/components/DocusContent.vue.d.ts +0 -25
  130. package/dist/runtime/app/components/Error.vue +0 -19
  131. package/dist/runtime/app/components/Error.vue.d.ts +0 -9
  132. package/dist/runtime/app/components/Markdown.vue +0 -56
  133. package/dist/runtime/app/components/Markdown.vue.d.ts +0 -25
  134. package/dist/runtime/app/components/Page.vue +0 -29
  135. package/dist/runtime/app/components/Page.vue.d.ts +0 -2
  136. package/dist/runtime/app/components/Props.vue +0 -130
  137. package/dist/runtime/app/components/Props.vue.d.ts +0 -80
  138. package/dist/runtime/app/components/prose/ProseA.vue +0 -41
  139. package/dist/runtime/app/components/prose/ProseA.vue.d.ts +0 -23
  140. package/dist/runtime/app/components/prose/ProseBlockquote.vue +0 -5
  141. package/dist/runtime/app/components/prose/ProseCode.vue +0 -5
  142. package/dist/runtime/app/components/prose/ProseCodeInline.vue +0 -5
  143. package/dist/runtime/app/components/prose/ProseEm.vue +0 -5
  144. package/dist/runtime/app/components/prose/ProseH1.vue +0 -3
  145. package/dist/runtime/app/components/prose/ProseH2.vue +0 -3
  146. package/dist/runtime/app/components/prose/ProseH3.vue +0 -3
  147. package/dist/runtime/app/components/prose/ProseH4.vue +0 -3
  148. package/dist/runtime/app/components/prose/ProseH5.vue +0 -3
  149. package/dist/runtime/app/components/prose/ProseH6.vue +0 -3
  150. package/dist/runtime/app/components/prose/ProseImg.vue +0 -32
  151. package/dist/runtime/app/components/prose/ProseImg.vue.d.ts +0 -21
  152. package/dist/runtime/app/components/prose/ProseLi.vue +0 -3
  153. package/dist/runtime/app/components/prose/ProseParagraph.vue +0 -3
  154. package/dist/runtime/app/components/prose/ProseStrong.vue +0 -5
  155. package/dist/runtime/app/components/prose/ProseTable.vue +0 -5
  156. package/dist/runtime/app/components/prose/ProseTd.vue +0 -5
  157. package/dist/runtime/app/components/prose/ProseTh.vue +0 -5
  158. package/dist/runtime/app/components/prose/ProseThead.vue +0 -5
  159. package/dist/runtime/app/components/prose/ProseTr.vue +0 -5
  160. package/dist/runtime/app/components/prose/ProseUl.vue +0 -5
  161. package/dist/runtime/app/composables/helpers.d.ts +0 -4
  162. package/dist/runtime/app/composables/helpers.js +0 -66
  163. package/dist/runtime/app/composables/helpers.mjs +0 -40
  164. package/dist/runtime/app/composables/index.d.ts +0 -90
  165. package/dist/runtime/app/composables/index.js +0 -108
  166. package/dist/runtime/app/composables/index.mjs +0 -63
  167. package/dist/runtime/app/composables/navigation.d.ts +0 -37
  168. package/dist/runtime/app/composables/navigation.js +0 -227
  169. package/dist/runtime/app/composables/navigation.mjs +0 -148
  170. package/dist/runtime/app/composables/store.d.ts +0 -7
  171. package/dist/runtime/app/composables/store.js +0 -52
  172. package/dist/runtime/app/composables/store.mjs +0 -35
  173. package/dist/runtime/app/composables/style.d.ts +0 -11
  174. package/dist/runtime/app/composables/style.js +0 -117
  175. package/dist/runtime/app/composables/style.mjs +0 -71
  176. package/dist/runtime/app/composables/theme-colors.d.ts +0 -30
  177. package/dist/runtime/app/composables/theme-colors.js +0 -80
  178. package/dist/runtime/app/composables/theme-colors.mjs +0 -48
  179. package/dist/runtime/app/composables/websocket.d.ts +0 -3
  180. package/dist/runtime/app/composables/websocket.js +0 -79
  181. package/dist/runtime/app/composables/websocket.mjs +0 -63
  182. package/dist/runtime/app/layouts/default.vue +0 -5
  183. package/dist/runtime/app/layouts/error.vue +0 -33
  184. package/dist/runtime/app/layouts/error.vue.d.ts +0 -21
  185. package/dist/runtime/app/pages/_.vue +0 -222
  186. package/dist/runtime/app/pages/_.vue.d.ts +0 -2
  187. package/dist/runtime/context.d.ts +0 -1
  188. package/dist/runtime/context.js +0 -17
  189. package/dist/runtime/context.mjs +0 -5
  190. package/dist/runtime/database/Query.d.ts +0 -18
  191. package/dist/runtime/database/Query.js +0 -68
  192. package/dist/runtime/database/Query.mjs +0 -49
  193. package/dist/runtime/database/index.d.ts +0 -4
  194. package/dist/runtime/database/index.js +0 -45
  195. package/dist/runtime/database/index.mjs +0 -25
  196. package/dist/runtime/database/providers/local/Query.d.ts +0 -14
  197. package/dist/runtime/database/providers/local/Query.js +0 -85
  198. package/dist/runtime/database/providers/local/Query.mjs +0 -60
  199. package/dist/runtime/database/providers/local/index.d.ts +0 -3
  200. package/dist/runtime/database/providers/local/index.js +0 -63
  201. package/dist/runtime/database/providers/local/index.mjs +0 -39
  202. package/dist/runtime/database/providers/local/operations.d.ts +0 -2
  203. package/dist/runtime/database/providers/local/operations.js +0 -83
  204. package/dist/runtime/database/providers/local/operations.mjs +0 -53
  205. package/dist/runtime/database/providers/local/utils.d.ts +0 -8
  206. package/dist/runtime/database/providers/local/utils.js +0 -28
  207. package/dist/runtime/database/providers/local/utils.mjs +0 -17
  208. package/dist/runtime/index.d.ts +0 -3
  209. package/dist/runtime/index.js +0 -44
  210. package/dist/runtime/index.mjs +0 -3
  211. package/dist/runtime/navigation.d.ts +0 -4
  212. package/dist/runtime/navigation.js +0 -176
  213. package/dist/runtime/navigation.mjs +0 -137
  214. package/dist/runtime/server/api/get.d.ts +0 -10
  215. package/dist/runtime/server/api/get.js +0 -24
  216. package/dist/runtime/server/api/get.mjs +0 -13
  217. package/dist/runtime/server/api/list.d.ts +0 -9
  218. package/dist/runtime/server/api/list.js +0 -34
  219. package/dist/runtime/server/api/list.mjs +0 -18
  220. package/dist/runtime/server/api/navigation.d.ts +0 -7
  221. package/dist/runtime/server/api/navigation.js +0 -20
  222. package/dist/runtime/server/api/navigation.mjs +0 -10
  223. package/dist/runtime/server/api/preview.d.ts +0 -3
  224. package/dist/runtime/server/api/preview.js +0 -54
  225. package/dist/runtime/server/api/preview.mjs +0 -31
  226. package/dist/runtime/server/api/reload.d.ts +0 -6
  227. package/dist/runtime/server/api/reload.js +0 -27
  228. package/dist/runtime/server/api/reload.mjs +0 -11
  229. package/dist/runtime/server/api/search.d.ts +0 -6
  230. package/dist/runtime/server/api/search.js +0 -27
  231. package/dist/runtime/server/api/search.mjs +0 -13
  232. package/dist/runtime/server/content.d.ts +0 -46
  233. package/dist/runtime/server/content.js +0 -175
  234. package/dist/runtime/server/content.mjs +0 -114
  235. package/dist/runtime/server/socket.d.ts +0 -9
  236. package/dist/runtime/server/socket.js +0 -33
  237. package/dist/runtime/server/socket.mjs +0 -20
  238. package/dist/runtime/server/utils/cache.d.ts +0 -19
  239. package/dist/runtime/server/utils/cache.js +0 -110
  240. package/dist/runtime/server/utils/cache.mjs +0 -75
  241. package/dist/runtime/server/utils/index.d.ts +0 -4
  242. package/dist/runtime/server/utils/index.js +0 -18
  243. package/dist/runtime/server/utils/index.mjs +0 -8
  244. package/dist/runtime/transformers/index.d.ts +0 -1
  245. package/dist/runtime/transformers/index.js +0 -26
  246. package/dist/runtime/transformers/index.mjs +0 -11
  247. package/dist/runtime/transformers/json.d.ts +0 -3
  248. package/dist/runtime/transformers/json.js +0 -15
  249. package/dist/runtime/transformers/json.mjs +0 -5
  250. package/dist/runtime/transformers/markdown/index.d.ts +0 -8
  251. package/dist/runtime/transformers/markdown/index.js +0 -25
  252. package/dist/runtime/transformers/markdown/index.mjs +0 -16
  253. package/dist/runtime/transformers/utils/index.d.ts +0 -1
  254. package/dist/runtime/transformers/utils/index.js +0 -18
  255. package/dist/runtime/transformers/utils/index.mjs +0 -1
  256. package/dist/runtime/transformers/utils/path.d.ts +0 -26
  257. package/dist/runtime/transformers/utils/path.js +0 -88
  258. package/dist/runtime/transformers/utils/path.mjs +0 -56
  259. package/dist/runtime/utils/index.d.ts +0 -1
  260. package/dist/runtime/utils/index.js +0 -18
  261. package/dist/runtime/utils/index.mjs +0 -1
  262. package/dist/runtime/utils/log.d.ts +0 -1
  263. package/dist/runtime/utils/log.js +0 -14
  264. package/dist/runtime/utils/log.mjs +0 -2
  265. package/dist/runtime/utils/object.d.ts +0 -9
  266. package/dist/runtime/utils/object.js +0 -22
  267. package/dist/runtime/utils/object.mjs +0 -4
  268. package/dist/templates/content.mjs +0 -50
  269. package/dist/templates/docus.mjs +0 -13
  270. package/dist/templates/hot.mjs +0 -16
  271. package/dist/templates/i18n.mjs +0 -23
  272. package/dist/templates/options.mjs +0 -46
  273. package/shims.d.ts +0 -24
  274. package/types.d.ts +0 -397
@@ -1,215 +0,0 @@
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>
@@ -1,25 +0,0 @@
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;
@@ -1,19 +0,0 @@
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>
@@ -1,9 +0,0 @@
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;
@@ -1,56 +0,0 @@
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>
@@ -1,25 +0,0 @@
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;
@@ -1,29 +0,0 @@
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>
@@ -1,2 +0,0 @@
1
- declare const _default: any;
2
- export default _default;
@@ -1,130 +0,0 @@
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>
@@ -1,80 +0,0 @@
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;
@@ -1,41 +0,0 @@
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>
@@ -1,23 +0,0 @@
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;
@@ -1,5 +0,0 @@
1
- <template>
2
- <blockquote>
3
- <slot />
4
- </blockquote>
5
- </template>
@@ -1,5 +0,0 @@
1
- <template>
2
- <div class="docus-highlight group">
3
- <slot />
4
- </div>
5
- </template>
@@ -1,5 +0,0 @@
1
- <template>
2
- <code>
3
- <slot />
4
- </code>
5
- </template>
@@ -1,5 +0,0 @@
1
- <template>
2
- <em>
3
- <slot />
4
- </em>
5
- </template>
@@ -1,3 +0,0 @@
1
- <template>
2
- <h1><slot /></h1>
3
- </template>