@deot/docs-client 1.1.6 → 1.1.8
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 +22 -6
- package/dist/chunks/{compile-CM_OyqYN-Bd7bk_OB.js → compile-CM_OyqYN-rhv4v6Tt.js} +1 -1
- package/dist/chunks/{css-DleINdoA-FdeEznDX.js → css-DleINdoA-Brc23sJ9.js} +1 -1
- package/dist/chunks/{vue-router-DZ-KfC9f.js → vue-router-LT2FR3OX.js} +125 -125
- package/dist/chunks/{vue.runtime.esm-bundler-zZTAiuf6.js → vue.runtime.esm-bundler-Bk0CnRBe.js} +1 -1
- package/dist/eval/chunks/{compile-CM_OyqYN-Bd7bk_OB.js → compile-CM_OyqYN-rhv4v6Tt.js} +2 -2
- package/dist/eval/chunks/{css-DleINdoA-FdeEznDX.js → css-DleINdoA-Brc23sJ9.js} +2 -2
- package/dist/eval/chunks/vue-router-LT2FR3OX.js +5 -0
- package/dist/eval/chunks/{vue.runtime.esm-bundler-zZTAiuf6.js → vue.runtime.esm-bundler-Bk0CnRBe.js} +2 -2
- package/dist/eval/index.js +20 -20
- package/dist/eval/index.style.css +1 -1
- package/dist/index.cjs +888 -351
- package/dist/index.js +21663 -19559
- package/dist/index.style.css +1 -1
- package/package.json +12 -7
- package/dist/eval/chunks/vue-router-DZ-KfC9f.js +0 -5
package/dist/index.cjs
CHANGED
|
@@ -13,6 +13,10 @@ let es_module_lexer = require("es-module-lexer");
|
|
|
13
13
|
let _deot_helper_unicode = require("@deot/helper-unicode");
|
|
14
14
|
let _deot_docs_playground = require("@deot/docs-playground");
|
|
15
15
|
let _deot_helper_dom = require("@deot/helper-dom");
|
|
16
|
+
let codemirror = require("codemirror");
|
|
17
|
+
let _codemirror_state = require("@codemirror/state");
|
|
18
|
+
let _codemirror_lang_json = require("@codemirror/lang-json");
|
|
19
|
+
let _codemirror_lang_markdown = require("@codemirror/lang-markdown");
|
|
16
20
|
//#region packages/client/src/utils/runtime.ts
|
|
17
21
|
var PRODUCTION_RUNTIME = Object.freeze({ mode: "production" });
|
|
18
22
|
var initializeDocsRuntime = (target = window, config = target.$docs || {
|
|
@@ -74,7 +78,7 @@ var getEnvironmentBase = (config) => {
|
|
|
74
78
|
const segments = location.pathname.split("/").filter(Boolean);
|
|
75
79
|
const configuredLanguages = Object.keys(config.locales);
|
|
76
80
|
const languages = configuredLanguages.length ? configuredLanguages : ["zh-CN"];
|
|
77
|
-
const routeIndex = /^__docs\/preview
|
|
81
|
+
const routeIndex = /^__docs\/(?:preview|raw-editor|markdown-editor)$/.test(segments.slice(-2).join("/")) ? segments.length - 2 : segments.findIndex((segment) => languages.includes(segment));
|
|
78
82
|
if (routeIndex >= 0) {
|
|
79
83
|
const deploymentSegments = segments.slice(0, routeIndex);
|
|
80
84
|
return new URL(`/${deploymentSegments.join("/")}${deploymentSegments.length ? "/" : ""}`, location.origin).href;
|
|
@@ -748,14 +752,14 @@ var setSidebarItems = (next) => {
|
|
|
748
752
|
};
|
|
749
753
|
//#endregion
|
|
750
754
|
//#region packages/client/src/components/layout/default-footer.vue?vue&type=script&setup=true&lang.ts
|
|
751
|
-
var _hoisted_1$
|
|
752
|
-
var _hoisted_2$
|
|
755
|
+
var _hoisted_1$33 = ["data-content-width"];
|
|
756
|
+
var _hoisted_2$26 = {
|
|
753
757
|
key: 0,
|
|
754
758
|
class: "docs-footer__inner"
|
|
755
759
|
};
|
|
756
|
-
var _hoisted_3$
|
|
757
|
-
var _hoisted_4$
|
|
758
|
-
var _hoisted_5$
|
|
760
|
+
var _hoisted_3$19 = { class: "docs-footer__content" };
|
|
761
|
+
var _hoisted_4$13 = { class: "docs-footer__title" };
|
|
762
|
+
var _hoisted_5$10 = {
|
|
759
763
|
key: 0,
|
|
760
764
|
class: "docs-footer__links"
|
|
761
765
|
};
|
|
@@ -888,11 +892,11 @@ var default_footer_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
888
892
|
key: 0,
|
|
889
893
|
class: "docs-footer",
|
|
890
894
|
"data-content-width": contentWidth.value
|
|
891
|
-
}, [groups.value.length ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_2$
|
|
895
|
+
}, [groups.value.length ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_2$26, [(0, vue.createElementVNode)("div", _hoisted_3$19, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(groups.value, (group) => {
|
|
892
896
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("section", {
|
|
893
897
|
key: group.label,
|
|
894
898
|
class: "docs-footer__group"
|
|
895
|
-
}, [(0, vue.createElementVNode)("h2", _hoisted_4$
|
|
899
|
+
}, [(0, vue.createElementVNode)("h2", _hoisted_4$13, (0, vue.toDisplayString)(group.label), 1), group.children?.length ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("ul", _hoisted_5$10, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(group.children, (item) => {
|
|
896
900
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("li", { key: `${item.label}:${item.value || ""}` }, [item.value && isExternal(item.value) ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("a", {
|
|
897
901
|
key: 0,
|
|
898
902
|
href: item.value,
|
|
@@ -929,13 +933,13 @@ var default_footer_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
929
933
|
alt: ""
|
|
930
934
|
}, null, 8, _hoisted_12$5)) : (0, vue.createCommentVNode)("v-if", true), (0, vue.createTextVNode)(" " + (0, vue.toDisplayString)(brandLabel.value), 1)]),
|
|
931
935
|
_: 1
|
|
932
|
-
}, 8, ["to"])), poweredBy.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_13$4, (0, vue.toDisplayString)(poweredBy.value), 1)) : (0, vue.createCommentVNode)("v-if", true)])])], 8, _hoisted_1$
|
|
936
|
+
}, 8, ["to"])), poweredBy.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_13$4, (0, vue.toDisplayString)(poweredBy.value), 1)) : (0, vue.createCommentVNode)("v-if", true)])])], 8, _hoisted_1$33)) : (0, vue.createCommentVNode)("v-if", true);
|
|
933
937
|
};
|
|
934
938
|
}
|
|
935
939
|
});
|
|
936
940
|
//#endregion
|
|
937
941
|
//#region packages/client/src/components/search/highlight-text.vue?vue&type=script&setup=true&lang.ts
|
|
938
|
-
var _hoisted_1$
|
|
942
|
+
var _hoisted_1$32 = {
|
|
939
943
|
key: 0,
|
|
940
944
|
class: "docs-search-highlight"
|
|
941
945
|
};
|
|
@@ -964,7 +968,7 @@ var highlight_text_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
964
968
|
});
|
|
965
969
|
return (_ctx, _cache) => {
|
|
966
970
|
return (0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(parts.value, (part, index) => {
|
|
967
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: `${index}:${part.text}` }, [part.match ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("mark", _hoisted_1$
|
|
971
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: `${index}:${part.text}` }, [part.match ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("mark", _hoisted_1$32, (0, vue.toDisplayString)(part.text), 1)) : ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 1 }, [(0, vue.createTextVNode)((0, vue.toDisplayString)(part.text), 1)], 64))], 64);
|
|
968
972
|
}), 128);
|
|
969
973
|
};
|
|
970
974
|
}
|
|
@@ -2315,12 +2319,12 @@ var docsMarkdownIndicator = (options) => {
|
|
|
2315
2319
|
var docsMarkdownInlineContent = (props) => typeof props.content === "string" ? props.content : void 0;
|
|
2316
2320
|
//#endregion
|
|
2317
2321
|
//#region packages/client/src/components/renderer/markdown.vue?vue&type=script&setup=true&lang.ts
|
|
2318
|
-
var _hoisted_1$
|
|
2319
|
-
var _hoisted_2$
|
|
2322
|
+
var _hoisted_1$31 = { class: "docs-renderer-markdown" };
|
|
2323
|
+
var _hoisted_2$25 = {
|
|
2320
2324
|
key: 0,
|
|
2321
2325
|
class: "docs-renderer-markdown__error"
|
|
2322
2326
|
};
|
|
2323
|
-
var _hoisted_3$
|
|
2327
|
+
var _hoisted_3$18 = {
|
|
2324
2328
|
key: 1,
|
|
2325
2329
|
class: "docs-renderer-markdown__loading"
|
|
2326
2330
|
};
|
|
@@ -2412,7 +2416,7 @@ var markdown_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2412
2416
|
unsubscribe?.();
|
|
2413
2417
|
});
|
|
2414
2418
|
return (_ctx, _cache) => {
|
|
2415
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
2419
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$31, [error.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_2$25, (0, vue.toDisplayString)(error.value), 1)) : loading.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_3$18, (0, vue.toDisplayString)((0, vue.unref)(t)("client.common.loading")), 1)) : ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_deot_docs_markdown.Markdown), {
|
|
2416
2420
|
key: 2,
|
|
2417
2421
|
value: content.value,
|
|
2418
2422
|
indicator: indicator.value,
|
|
@@ -2431,13 +2435,13 @@ var markdown_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2431
2435
|
});
|
|
2432
2436
|
//#endregion
|
|
2433
2437
|
//#region packages/client/src/components/renderer/markdown-editor.vue?vue&type=script&setup=true&lang.ts
|
|
2434
|
-
var _hoisted_1$
|
|
2435
|
-
var _hoisted_2$
|
|
2436
|
-
var _hoisted_3$
|
|
2437
|
-
var _hoisted_4$
|
|
2438
|
+
var _hoisted_1$30 = { class: "docs-renderer-module-editor" };
|
|
2439
|
+
var _hoisted_2$24 = { class: "docs-renderer-field is-wide" };
|
|
2440
|
+
var _hoisted_3$17 = { class: "docs-renderer-field is-wide" };
|
|
2441
|
+
var _hoisted_4$12 = { class: "docs-renderer-field is-wide is-inline" };
|
|
2438
2442
|
//#endregion
|
|
2439
2443
|
//#region packages/client/src/components/renderer/markdown-editor.vue
|
|
2440
|
-
var markdown_editor_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
2444
|
+
var markdown_editor_default$1 = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
2441
2445
|
__name: "markdown-editor",
|
|
2442
2446
|
props: {
|
|
2443
2447
|
node: {},
|
|
@@ -2473,19 +2477,19 @@ var markdown_editor_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2473
2477
|
} });
|
|
2474
2478
|
};
|
|
2475
2479
|
return (_ctx, _cache) => {
|
|
2476
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
2477
|
-
(0, vue.createElementVNode)("div", _hoisted_2$
|
|
2480
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$30, [
|
|
2481
|
+
(0, vue.createElementVNode)("div", _hoisted_2$24, [(0, vue.createElementVNode)("label", null, (0, vue.toDisplayString)((0, vue.unref)(t)("renderer.editor.source")), 1), (0, vue.createVNode)((0, vue.unref)(_deot_vc.Input), {
|
|
2478
2482
|
"model-value": String(__props.modelValue.source || ""),
|
|
2479
2483
|
placeholder: (0, vue.unref)(t)("renderer.editor.markdownSourceHint"),
|
|
2480
2484
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = (value) => update({ source: value }))
|
|
2481
2485
|
}, null, 8, ["model-value", "placeholder"])]),
|
|
2482
|
-
(0, vue.createElementVNode)("div", _hoisted_3$
|
|
2486
|
+
(0, vue.createElementVNode)("div", _hoisted_3$17, [(0, vue.createElementVNode)("label", null, (0, vue.toDisplayString)((0, vue.unref)(t)("renderer.editor.markdownContent")), 1), (0, vue.createVNode)((0, vue.unref)(_deot_vc.Textarea), {
|
|
2483
2487
|
"model-value": String(__props.modelValue.content || ""),
|
|
2484
2488
|
rows: 8,
|
|
2485
2489
|
placeholder: (0, vue.unref)(t)("renderer.editor.markdownContentHint"),
|
|
2486
2490
|
"onUpdate:modelValue": handleContent
|
|
2487
2491
|
}, null, 8, ["model-value", "placeholder"])]),
|
|
2488
|
-
(0, vue.createElementVNode)("div", _hoisted_4$
|
|
2492
|
+
(0, vue.createElementVNode)("div", _hoisted_4$12, [(0, vue.createElementVNode)("label", null, (0, vue.toDisplayString)((0, vue.unref)(t)("markdown.indicator.label")), 1), (0, vue.createVNode)((0, vue.unref)(_deot_vc.Switch), {
|
|
2489
2493
|
"model-value": indicatorEnabled.value,
|
|
2490
2494
|
"onUpdate:modelValue": patchIndicator
|
|
2491
2495
|
}, null, 8, ["model-value"])])
|
|
@@ -2494,6 +2498,23 @@ var markdown_editor_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2494
2498
|
}
|
|
2495
2499
|
});
|
|
2496
2500
|
//#endregion
|
|
2501
|
+
//#region packages/client/src/modules/preview/raw.ts
|
|
2502
|
+
/**
|
|
2503
|
+
* raw 只负责 JSON 编解码;具体页面独立校验自己的配置。
|
|
2504
|
+
* @param value Router 已解码的单个 raw 参数。
|
|
2505
|
+
* @returns 解码后的 JSON 值。
|
|
2506
|
+
*/
|
|
2507
|
+
var readRaw = (value) => {
|
|
2508
|
+
if (typeof value !== "string" || !value) throw new TypeError("raw must be a single encoded JSON value");
|
|
2509
|
+
return JSON.parse((0, _deot_helper_unicode.decode)(value));
|
|
2510
|
+
};
|
|
2511
|
+
var createRawUrl = (value, target, base) => {
|
|
2512
|
+
const url = new URL(target.trim(), base);
|
|
2513
|
+
if (!target.trim() || !/^https?:$/.test(url.protocol)) throw new TypeError("target must be an HTTP(S) or relative URL");
|
|
2514
|
+
url.searchParams.set("raw", (0, _deot_helper_unicode.encode)(JSON.stringify(value)));
|
|
2515
|
+
return url.href;
|
|
2516
|
+
};
|
|
2517
|
+
//#endregion
|
|
2497
2518
|
//#region packages/client/src/modules/preview/config.ts
|
|
2498
2519
|
var previewConfigKey = Symbol("preview-config");
|
|
2499
2520
|
var isPlainObject = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
|
|
@@ -2537,10 +2558,7 @@ var normalizePreviewConfig = (value) => {
|
|
|
2537
2558
|
* @returns 当前链接的预览配置。
|
|
2538
2559
|
*/
|
|
2539
2560
|
var readPreviewConfig = (query) => {
|
|
2540
|
-
if (query.raw !== void 0)
|
|
2541
|
-
if (typeof query.raw !== "string" || !query.raw) throw new TypeError("raw must be a single encoded configuration");
|
|
2542
|
-
return normalizePreviewConfig(JSON.parse((0, _deot_helper_unicode.decode)(query.raw)));
|
|
2543
|
-
}
|
|
2561
|
+
if (query.raw !== void 0) return normalizePreviewConfig(readRaw(query.raw));
|
|
2544
2562
|
const styles = Array.isArray(query.styles) ? query.styles : typeof query.styles === "string" ? query.styles.split(",") : [];
|
|
2545
2563
|
return {
|
|
2546
2564
|
url: typeof query.url === "string" ? query.url.trim() : "",
|
|
@@ -2550,17 +2568,6 @@ var readPreviewConfig = (query) => {
|
|
|
2550
2568
|
};
|
|
2551
2569
|
};
|
|
2552
2570
|
/**
|
|
2553
|
-
* 使用 Unicode helper 编码并正确转义 Base64 的 +、/、=。
|
|
2554
|
-
* @param config 预览配置。
|
|
2555
|
-
* @param base 站点部署根地址。
|
|
2556
|
-
* @returns 可直接分享的预览链接。
|
|
2557
|
-
*/
|
|
2558
|
-
var createPreviewUrl = (config, base) => {
|
|
2559
|
-
const url = new URL("__docs/preview", base);
|
|
2560
|
-
url.searchParams.set("raw", (0, _deot_helper_unicode.encode)(JSON.stringify(config)));
|
|
2561
|
-
return url.href;
|
|
2562
|
-
};
|
|
2563
|
-
/**
|
|
2564
2571
|
* 根据资源 URL 的 pathname 选择预览组件。
|
|
2565
2572
|
* @param source 资源地址。
|
|
2566
2573
|
* @param base 解析相对地址的页面地址。
|
|
@@ -2641,11 +2648,11 @@ var acquirePreviewStyles = (urls, onError) => {
|
|
|
2641
2648
|
};
|
|
2642
2649
|
//#endregion
|
|
2643
2650
|
//#region packages/client/src/components/remote-sfc/remote-sfc.vue?vue&type=script&setup=true&lang.ts
|
|
2644
|
-
var _hoisted_1$
|
|
2651
|
+
var _hoisted_1$29 = {
|
|
2645
2652
|
key: 0,
|
|
2646
2653
|
class: "docs-remote-sfc__error"
|
|
2647
2654
|
};
|
|
2648
|
-
var _hoisted_2$
|
|
2655
|
+
var _hoisted_2$23 = {
|
|
2649
2656
|
key: 1,
|
|
2650
2657
|
class: "docs-remote-sfc__loading"
|
|
2651
2658
|
};
|
|
@@ -2684,7 +2691,6 @@ var remote_sfc_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2684
2691
|
...siteImportMap,
|
|
2685
2692
|
imports: {
|
|
2686
2693
|
...siteImportMap.imports,
|
|
2687
|
-
...config.modules,
|
|
2688
2694
|
...JSON.parse(previewModules.value)
|
|
2689
2695
|
}
|
|
2690
2696
|
}
|
|
@@ -2700,7 +2706,7 @@ var remote_sfc_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2700
2706
|
locale: locale.value,
|
|
2701
2707
|
styleless: true,
|
|
2702
2708
|
...overrides,
|
|
2703
|
-
local: overrides.local ?? site.local
|
|
2709
|
+
local: overrides.local ?? site.local,
|
|
2704
2710
|
...previewStyleHead.value ? { previewOptions: {
|
|
2705
2711
|
...site.previewOptions,
|
|
2706
2712
|
headHTML: `${site.previewOptions?.headHTML || ""}${previewStyleHead.value}`
|
|
@@ -2708,7 +2714,7 @@ var remote_sfc_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2708
2714
|
options: playgroundOptions.value
|
|
2709
2715
|
};
|
|
2710
2716
|
});
|
|
2711
|
-
const useIframeViewport = (0, vue.computed)(() => !!preview?.value &&
|
|
2717
|
+
const useIframeViewport = (0, vue.computed)(() => !!preview?.value && playgroundProps.value.local === false && playgroundProps.value.styleless && !Array.isArray(playgroundProps.value.viewport));
|
|
2712
2718
|
const previewStyleHead = (0, vue.computed)(() => {
|
|
2713
2719
|
try {
|
|
2714
2720
|
return parsePreviewStyleUrls(preview?.value?.styles, location.href).map((url) => `<link rel="stylesheet" href="${url.replaceAll("&", "&").replaceAll("\"", """)}">`).join("");
|
|
@@ -2752,6 +2758,7 @@ var remote_sfc_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2752
2758
|
const activeLoads = /* @__PURE__ */ new Set();
|
|
2753
2759
|
const visit = async (url, logicalSource) => {
|
|
2754
2760
|
if (current !== generation || visited.has(url)) return;
|
|
2761
|
+
visited.add(url);
|
|
2755
2762
|
const type = getResourceType(url);
|
|
2756
2763
|
const source = logicalSource || toLogicalResourceSource(config, langSnapshot, url);
|
|
2757
2764
|
const identity = createResourceIdentity(config, langSnapshot, type, source);
|
|
@@ -2767,11 +2774,13 @@ var remote_sfc_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2767
2774
|
priority: 100,
|
|
2768
2775
|
signal: activeController.signal
|
|
2769
2776
|
});
|
|
2777
|
+
} catch (reason) {
|
|
2778
|
+
visited.delete(url);
|
|
2779
|
+
throw reason;
|
|
2770
2780
|
} finally {
|
|
2771
2781
|
activeLoads.delete(key);
|
|
2772
2782
|
}
|
|
2773
2783
|
if (current !== generation) return;
|
|
2774
|
-
visited.add(url);
|
|
2775
2784
|
subscriptions.push(Gateway.subscribe(identity, reload));
|
|
2776
2785
|
let content = github && type === "module" ? await github.expandGlob(record.content, url) : record.content;
|
|
2777
2786
|
if (!github && type !== "style") assertResolvableSourceGlobs(content, url);
|
|
@@ -2827,7 +2836,7 @@ var remote_sfc_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2827
2836
|
clearSubscriptions();
|
|
2828
2837
|
});
|
|
2829
2838
|
return (_ctx, _cache) => {
|
|
2830
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", { class: (0, vue.normalizeClass)(["docs-remote-sfc", { "docs-remote-sfc--viewport": useIframeViewport.value }]) }, [error.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
2839
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", { class: (0, vue.normalizeClass)(["docs-remote-sfc", { "docs-remote-sfc--viewport": useIframeViewport.value }]) }, [error.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$29, (0, vue.toDisplayString)(error.value), 1)) : loading.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_2$23, (0, vue.toDisplayString)((0, vue.unref)(t)("client.common.loading")), 1)) : PlaygroundComponent.value ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.resolveDynamicComponent)(PlaygroundComponent.value), (0, vue.mergeProps)({ key: `${revision.value}:${playgroundProps.value.local}` }, playgroundProps.value, { onNavigate: handleNavigate }), null, 16)) : (0, vue.createCommentVNode)("v-if", true)], 2);
|
|
2831
2840
|
};
|
|
2832
2841
|
}
|
|
2833
2842
|
});
|
|
@@ -2853,10 +2862,10 @@ var sfc_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2853
2862
|
});
|
|
2854
2863
|
//#endregion
|
|
2855
2864
|
//#region packages/client/src/components/renderer/source-editor.vue?vue&type=script&setup=true&lang.ts
|
|
2856
|
-
var _hoisted_1$
|
|
2865
|
+
var _hoisted_1$28 = { class: "docs-renderer-module-editor" };
|
|
2857
2866
|
//#endregion
|
|
2858
2867
|
//#region packages/client/src/components/renderer/source-editor.vue
|
|
2859
|
-
var source_editor_default$
|
|
2868
|
+
var source_editor_default$2 = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
2860
2869
|
__name: "source-editor",
|
|
2861
2870
|
props: {
|
|
2862
2871
|
node: {},
|
|
@@ -2873,7 +2882,7 @@ var source_editor_default$1 = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
2873
2882
|
source
|
|
2874
2883
|
});
|
|
2875
2884
|
return (_ctx, _cache) => {
|
|
2876
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
2885
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$28, [(0, vue.createElementVNode)("label", null, (0, vue.toDisplayString)((0, vue.unref)(t)("renderer.editor.source")), 1), (0, vue.createVNode)((0, vue.unref)(_deot_vc.Input), {
|
|
2877
2886
|
"model-value": String(__props.modelValue.source || ""),
|
|
2878
2887
|
"onUpdate:modelValue": handleUpdate
|
|
2879
2888
|
}, null, 8, ["model-value"])]);
|
|
@@ -2896,7 +2905,7 @@ var MarkdownModule = (0, _deot_docs_renderer.defineRendererModule)({
|
|
|
2896
2905
|
validate: validateDocsMarkdownProps
|
|
2897
2906
|
},
|
|
2898
2907
|
viewer: markdown_default,
|
|
2899
|
-
editor: markdown_editor_default,
|
|
2908
|
+
editor: markdown_editor_default$1,
|
|
2900
2909
|
frames: { sortable: {
|
|
2901
2910
|
movable: true,
|
|
2902
2911
|
deletable: true,
|
|
@@ -2934,7 +2943,7 @@ var SfcModule = (0, _deot_docs_renderer.defineRendererModule)({
|
|
|
2934
2943
|
}]
|
|
2935
2944
|
},
|
|
2936
2945
|
viewer: sfc_default,
|
|
2937
|
-
editor: source_editor_default$
|
|
2946
|
+
editor: source_editor_default$2,
|
|
2938
2947
|
frames: { sortable: {
|
|
2939
2948
|
movable: true,
|
|
2940
2949
|
deletable: true,
|
|
@@ -4585,11 +4594,11 @@ var SearchManager = class {
|
|
|
4585
4594
|
var Search = new SearchManager();
|
|
4586
4595
|
//#endregion
|
|
4587
4596
|
//#region packages/client/src/components/search/search.vue?vue&type=script&setup=true&lang.ts
|
|
4588
|
-
var _hoisted_1$
|
|
4589
|
-
var _hoisted_2$
|
|
4590
|
-
var _hoisted_3$
|
|
4591
|
-
var _hoisted_4$
|
|
4592
|
-
var _hoisted_5$
|
|
4597
|
+
var _hoisted_1$27 = ["aria-label"];
|
|
4598
|
+
var _hoisted_2$22 = { class: "docs-search__header" };
|
|
4599
|
+
var _hoisted_3$16 = ["placeholder", "aria-label"];
|
|
4600
|
+
var _hoisted_4$11 = { class: "docs-search__actions" };
|
|
4601
|
+
var _hoisted_5$9 = ["aria-label"];
|
|
4593
4602
|
var _hoisted_6$6 = { class: "docs-search__body" };
|
|
4594
4603
|
var _hoisted_7$6 = { class: "docs-search__content" };
|
|
4595
4604
|
var _hoisted_8$6 = {
|
|
@@ -4620,17 +4629,17 @@ var _hoisted_16$2 = {
|
|
|
4620
4629
|
key: 1,
|
|
4621
4630
|
class: "docs-search__result-excerpt"
|
|
4622
4631
|
};
|
|
4623
|
-
var _hoisted_17$
|
|
4632
|
+
var _hoisted_17$1 = {
|
|
4624
4633
|
key: 0,
|
|
4625
4634
|
class: "docs-search__state"
|
|
4626
4635
|
};
|
|
4627
|
-
var _hoisted_18
|
|
4628
|
-
var _hoisted_19
|
|
4636
|
+
var _hoisted_18 = { class: "docs-search__group-title" };
|
|
4637
|
+
var _hoisted_19 = [
|
|
4629
4638
|
"data-search-index",
|
|
4630
4639
|
"onMouseenter",
|
|
4631
4640
|
"onClick"
|
|
4632
4641
|
];
|
|
4633
|
-
var _hoisted_20
|
|
4642
|
+
var _hoisted_20 = { class: "docs-search__result-content" };
|
|
4634
4643
|
var _hoisted_21 = { class: "docs-search__result-title" };
|
|
4635
4644
|
var _hoisted_22 = {
|
|
4636
4645
|
key: 0,
|
|
@@ -4840,7 +4849,7 @@ var search_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
4840
4849
|
"aria-label": (0, vue.unref)(t)("client.search.dialogLabel"),
|
|
4841
4850
|
onKeydown: handleKeydown
|
|
4842
4851
|
}, [
|
|
4843
|
-
(0, vue.createElementVNode)("header", _hoisted_2$
|
|
4852
|
+
(0, vue.createElementVNode)("header", _hoisted_2$22, [
|
|
4844
4853
|
_cache[2] || (_cache[2] = (0, vue.createElementVNode)("span", {
|
|
4845
4854
|
class: "docs-search__icon",
|
|
4846
4855
|
"aria-hidden": "true"
|
|
@@ -4856,8 +4865,8 @@ var search_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
4856
4865
|
"aria-label": (0, vue.unref)(t)("client.search.placeholder"),
|
|
4857
4866
|
onCompositionstart: _cache[1] || (_cache[1] = ($event) => composing.value = true),
|
|
4858
4867
|
onCompositionend: handleCompositionEnd
|
|
4859
|
-
}, null, 40, _hoisted_3$
|
|
4860
|
-
(0, vue.createElementVNode)("div", _hoisted_4$
|
|
4868
|
+
}, null, 40, _hoisted_3$16), [[vue.vModelText, keyword.value]]),
|
|
4869
|
+
(0, vue.createElementVNode)("div", _hoisted_4$11, [keyword.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("button", {
|
|
4861
4870
|
key: 0,
|
|
4862
4871
|
class: "docs-search__clear",
|
|
4863
4872
|
type: "button",
|
|
@@ -4867,7 +4876,7 @@ var search_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
4867
4876
|
type: "button",
|
|
4868
4877
|
"aria-label": (0, vue.unref)(t)("client.search.close"),
|
|
4869
4878
|
onClick: handleClose
|
|
4870
|
-
}, " esc ", 8, _hoisted_5$
|
|
4879
|
+
}, " esc ", 8, _hoisted_5$9)])
|
|
4871
4880
|
]),
|
|
4872
4881
|
(0, vue.createElementVNode)("div", _hoisted_6$6, [(0, vue.createVNode)((0, vue.unref)(_deot_vc.Scroller), {
|
|
4873
4882
|
class: "docs-search__scroller",
|
|
@@ -4905,9 +4914,9 @@ var search_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
4905
4914
|
}, "↵", -1))
|
|
4906
4915
|
], 42, _hoisted_11$4);
|
|
4907
4916
|
}), 128)),
|
|
4908
|
-
!results.value.length ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_17$
|
|
4917
|
+
!results.value.length ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_17$1, (0, vue.toDisplayString)(preparedCount.value ? (0, vue.unref)(t)("client.search.noResults") : (0, vue.unref)(t)("client.search.noCachedDocuments")), 1)) : (0, vue.createCommentVNode)("v-if", true)
|
|
4909
4918
|
], 64)) : ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 3 }, [
|
|
4910
|
-
(0, vue.createElementVNode)("div", _hoisted_18
|
|
4919
|
+
(0, vue.createElementVNode)("div", _hoisted_18, (0, vue.toDisplayString)((0, vue.unref)(t)("client.search.recent")), 1),
|
|
4911
4920
|
((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(history.value, (item, index) => {
|
|
4912
4921
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
4913
4922
|
key: item.id,
|
|
@@ -4922,7 +4931,7 @@ var search_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
4922
4931
|
class: "docs-search__history-icon",
|
|
4923
4932
|
"aria-hidden": "true"
|
|
4924
4933
|
}, "↶", -1)),
|
|
4925
|
-
(0, vue.createElementVNode)("span", _hoisted_20
|
|
4934
|
+
(0, vue.createElementVNode)("span", _hoisted_20, [(0, vue.createElementVNode)("span", _hoisted_21, (0, vue.toDisplayString)(item.sectionTitle || item.title), 1), item.sectionTitle ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_22, (0, vue.toDisplayString)(item.title), 1)) : (0, vue.createCommentVNode)("v-if", true)]),
|
|
4926
4935
|
(0, vue.createElementVNode)("button", {
|
|
4927
4936
|
class: (0, vue.normalizeClass)(["docs-search__history-action", { "docs-search__history-action--active": item.pinned }]),
|
|
4928
4937
|
type: "button",
|
|
@@ -4935,7 +4944,7 @@ var search_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
4935
4944
|
"aria-label": (0, vue.unref)(t)("client.search.remove"),
|
|
4936
4945
|
onClick: (0, vue.withModifiers)(($event) => handleRemoveHistory(item.id), ["stop"])
|
|
4937
4946
|
}, " × ", 8, _hoisted_24)
|
|
4938
|
-
], 42, _hoisted_19
|
|
4947
|
+
], 42, _hoisted_19);
|
|
4939
4948
|
}), 128)),
|
|
4940
4949
|
!history.value.length ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_25, (0, vue.toDisplayString)((0, vue.unref)(t)("client.search.noRecent")), 1)) : (0, vue.createCommentVNode)("v-if", true)
|
|
4941
4950
|
], 64))])]),
|
|
@@ -4950,7 +4959,7 @@ var search_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
4950
4959
|
(0, vue.createElementVNode)("span", null, [_cache[7] || (_cache[7] = (0, vue.createElementVNode)("kbd", null, "↵", -1)), (0, vue.createTextVNode)(" " + (0, vue.toDisplayString)((0, vue.unref)(t)("client.search.selectHint")), 1)]),
|
|
4951
4960
|
(0, vue.createElementVNode)("span", null, [_cache[8] || (_cache[8] = (0, vue.createElementVNode)("kbd", null, "ESC", -1)), (0, vue.createTextVNode)(" " + (0, vue.toDisplayString)((0, vue.unref)(t)("client.search.closeHint")), 1)])
|
|
4952
4961
|
])
|
|
4953
|
-
], 40, _hoisted_1$
|
|
4962
|
+
], 40, _hoisted_1$27)]);
|
|
4954
4963
|
};
|
|
4955
4964
|
}
|
|
4956
4965
|
});
|
|
@@ -4967,8 +4976,8 @@ var DocsSearch = new _deot_vc.Portal(search_default, {
|
|
|
4967
4976
|
});
|
|
4968
4977
|
//#endregion
|
|
4969
4978
|
//#region packages/client/src/components/search/trigger.vue?vue&type=script&setup=true&lang.ts
|
|
4970
|
-
var _hoisted_1$
|
|
4971
|
-
var _hoisted_2$
|
|
4979
|
+
var _hoisted_1$26 = ["aria-label"];
|
|
4980
|
+
var _hoisted_2$21 = { class: "docs-search-trigger__shortcut" };
|
|
4972
4981
|
//#endregion
|
|
4973
4982
|
//#region packages/client/src/components/search/trigger.vue
|
|
4974
4983
|
var trigger_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -5012,7 +5021,7 @@ var trigger_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
5012
5021
|
}, [_cache[0] || (_cache[0] = (0, vue.createElementVNode)("span", {
|
|
5013
5022
|
class: "docs-search-trigger__icon",
|
|
5014
5023
|
"aria-hidden": "true"
|
|
5015
|
-
}, null, -1)), (0, vue.createElementVNode)("kbd", _hoisted_2$
|
|
5024
|
+
}, null, -1)), (0, vue.createElementVNode)("kbd", _hoisted_2$21, (0, vue.toDisplayString)((0, vue.unref)(shortcut)), 1)], 8, _hoisted_1$26);
|
|
5016
5025
|
};
|
|
5017
5026
|
}
|
|
5018
5027
|
});
|
|
@@ -5121,12 +5130,12 @@ var CLIENT_ICON_DEFINITIONS = {
|
|
|
5121
5130
|
};
|
|
5122
5131
|
//#endregion
|
|
5123
5132
|
//#region packages/client/src/components/icon/icon.vue?vue&type=script&setup=true&lang.ts
|
|
5124
|
-
var _hoisted_1$
|
|
5133
|
+
var _hoisted_1$25 = [
|
|
5125
5134
|
"data-icon",
|
|
5126
5135
|
"fill",
|
|
5127
5136
|
"stroke"
|
|
5128
5137
|
];
|
|
5129
|
-
var _hoisted_2$
|
|
5138
|
+
var _hoisted_2$20 = ["d"];
|
|
5130
5139
|
//#endregion
|
|
5131
5140
|
//#region packages/client/src/components/icon/icon.vue
|
|
5132
5141
|
var icon_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -5158,13 +5167,13 @@ var icon_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
5158
5167
|
"stroke-linecap": "round",
|
|
5159
5168
|
"stroke-linejoin": "round",
|
|
5160
5169
|
"aria-hidden": "true"
|
|
5161
|
-
}, [(0, vue.createElementVNode)("path", { d: definition.value.path }, null, 8, _hoisted_2$
|
|
5170
|
+
}, [(0, vue.createElementVNode)("path", { d: definition.value.path }, null, 8, _hoisted_2$20)], 12, _hoisted_1$25);
|
|
5162
5171
|
};
|
|
5163
5172
|
}
|
|
5164
5173
|
});
|
|
5165
5174
|
//#endregion
|
|
5166
5175
|
//#region packages/client/src/components/theme-toggler/index.vue?vue&type=script&setup=true&lang.ts
|
|
5167
|
-
var _hoisted_1$
|
|
5176
|
+
var _hoisted_1$24 = [
|
|
5168
5177
|
"aria-checked",
|
|
5169
5178
|
"aria-label",
|
|
5170
5179
|
"onKeydown"
|
|
@@ -5202,7 +5211,7 @@ var theme_toggler_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
5202
5211
|
}, null, 8, ["model-value"]), (0, vue.createVNode)((0, vue.unref)(icon_default), {
|
|
5203
5212
|
name: isDark.value ? "moon" : "sun",
|
|
5204
5213
|
class: (0, vue.normalizeClass)(["theme-toggler__icon", isDark.value ? "is-dark" : "is-light"])
|
|
5205
|
-
}, null, 8, ["name", "class"])], 40, _hoisted_1$
|
|
5214
|
+
}, null, 8, ["name", "class"])], 40, _hoisted_1$24)) : (0, vue.createCommentVNode)("v-if", true);
|
|
5206
5215
|
};
|
|
5207
5216
|
}
|
|
5208
5217
|
});
|
|
@@ -5250,11 +5259,11 @@ var takeInlineRendererDocument = (from) => {
|
|
|
5250
5259
|
};
|
|
5251
5260
|
//#endregion
|
|
5252
5261
|
//#region packages/client/src/components/layout/default-header.vue?vue&type=script&setup=true&lang.ts
|
|
5253
|
-
var _hoisted_1$
|
|
5254
|
-
var _hoisted_2$
|
|
5255
|
-
var _hoisted_3$
|
|
5256
|
-
var _hoisted_4$
|
|
5257
|
-
var _hoisted_5$
|
|
5262
|
+
var _hoisted_1$23 = { class: "docs-header" };
|
|
5263
|
+
var _hoisted_2$19 = ["href"];
|
|
5264
|
+
var _hoisted_3$15 = ["src"];
|
|
5265
|
+
var _hoisted_4$10 = ["src"];
|
|
5266
|
+
var _hoisted_5$8 = { class: "docs-header__search" };
|
|
5258
5267
|
var _hoisted_6$5 = ["aria-label"];
|
|
5259
5268
|
var _hoisted_7$5 = ["aria-expanded"];
|
|
5260
5269
|
var _hoisted_8$5 = ["href"];
|
|
@@ -5280,7 +5289,7 @@ var _hoisted_15$1 = [
|
|
|
5280
5289
|
"aria-label"
|
|
5281
5290
|
];
|
|
5282
5291
|
var _hoisted_16$1 = { class: "docs-header__tools" };
|
|
5283
|
-
var _hoisted_17
|
|
5292
|
+
var _hoisted_17 = [
|
|
5284
5293
|
"title",
|
|
5285
5294
|
"aria-label",
|
|
5286
5295
|
"aria-expanded"
|
|
@@ -5443,7 +5452,7 @@ var default_header_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
5443
5452
|
if (action === "database") router.push(databasePath.value);
|
|
5444
5453
|
};
|
|
5445
5454
|
return (_ctx, _cache) => {
|
|
5446
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("header", _hoisted_1$
|
|
5455
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("header", _hoisted_1$23, [
|
|
5447
5456
|
brandExternal.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("a", {
|
|
5448
5457
|
key: 0,
|
|
5449
5458
|
class: "docs-header__brand",
|
|
@@ -5455,7 +5464,7 @@ var default_header_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
5455
5464
|
class: "docs-header__brand-logo",
|
|
5456
5465
|
src: brandLogo.value,
|
|
5457
5466
|
alt: ""
|
|
5458
|
-
}, null, 8, _hoisted_3$
|
|
5467
|
+
}, null, 8, _hoisted_3$15)) : (0, vue.createCommentVNode)("v-if", true), (0, vue.createTextVNode)(" " + (0, vue.toDisplayString)(brandLabel.value), 1)], 8, _hoisted_2$19)) : ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(vue_router.RouterLink), {
|
|
5459
5468
|
key: 1,
|
|
5460
5469
|
class: "docs-header__brand",
|
|
5461
5470
|
to: brandPath.value
|
|
@@ -5465,10 +5474,10 @@ var default_header_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
5465
5474
|
class: "docs-header__brand-logo",
|
|
5466
5475
|
src: brandLogo.value,
|
|
5467
5476
|
alt: ""
|
|
5468
|
-
}, null, 8, _hoisted_4$
|
|
5477
|
+
}, null, 8, _hoisted_4$10)) : (0, vue.createCommentVNode)("v-if", true), (0, vue.createTextVNode)(" " + (0, vue.toDisplayString)(brandLabel.value), 1)]),
|
|
5469
5478
|
_: 1
|
|
5470
5479
|
}, 8, ["to"])),
|
|
5471
|
-
(0, vue.createElementVNode)("div", _hoisted_5$
|
|
5480
|
+
(0, vue.createElementVNode)("div", _hoisted_5$8, [(0, vue.createVNode)((0, vue.unref)(trigger_default))]),
|
|
5472
5481
|
navItems.value.length ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("nav", {
|
|
5473
5482
|
key: 2,
|
|
5474
5483
|
class: "docs-header__nav",
|
|
@@ -5635,7 +5644,7 @@ var default_header_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
5635
5644
|
}, [(0, vue.createVNode)((0, vue.unref)(icon_default), {
|
|
5636
5645
|
name: "more",
|
|
5637
5646
|
size: 22
|
|
5638
|
-
})], 8, _hoisted_17
|
|
5647
|
+
})], 8, _hoisted_17)]),
|
|
5639
5648
|
_: 1
|
|
5640
5649
|
}, 8, ["modelValue"])])
|
|
5641
5650
|
])
|
|
@@ -5700,11 +5709,11 @@ var pickSidebarIconValue = (icon, selected) => {
|
|
|
5700
5709
|
};
|
|
5701
5710
|
//#endregion
|
|
5702
5711
|
//#region packages/client/src/components/layout/sidebar-glyph.vue?vue&type=script&setup=true&lang.ts
|
|
5703
|
-
var _hoisted_1$
|
|
5712
|
+
var _hoisted_1$22 = {
|
|
5704
5713
|
key: 0,
|
|
5705
5714
|
class: "docs-sidebar__icon"
|
|
5706
5715
|
};
|
|
5707
|
-
var _hoisted_2$
|
|
5716
|
+
var _hoisted_2$18 = ["src"];
|
|
5708
5717
|
//#endregion
|
|
5709
5718
|
//#region packages/client/src/components/layout/sidebar-glyph.vue
|
|
5710
5719
|
var sidebar_glyph_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -5720,12 +5729,12 @@ var sidebar_glyph_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
5720
5729
|
const kind = (0, vue.computed)(() => resolveSidebarIconKind(value.value));
|
|
5721
5730
|
const src = (0, vue.computed)(() => toSidebarIconSrc(value.value));
|
|
5722
5731
|
return (_ctx, _cache) => {
|
|
5723
|
-
return value.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_1$
|
|
5732
|
+
return value.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_1$22, [kind.value === "url" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("img", {
|
|
5724
5733
|
key: 0,
|
|
5725
5734
|
class: "docs-sidebar__media",
|
|
5726
5735
|
src: src.value,
|
|
5727
5736
|
alt: ""
|
|
5728
|
-
}, null, 8, _hoisted_2$
|
|
5737
|
+
}, null, 8, _hoisted_2$18)) : kind.value === "type" ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_deot_vc.Icon), {
|
|
5729
5738
|
key: 1,
|
|
5730
5739
|
class: "docs-sidebar__glyph",
|
|
5731
5740
|
type: value.value,
|
|
@@ -5736,14 +5745,14 @@ var sidebar_glyph_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
5736
5745
|
});
|
|
5737
5746
|
//#endregion
|
|
5738
5747
|
//#region packages/client/src/components/layout/default-sidebar.vue?vue&type=script&setup=true&lang.ts
|
|
5739
|
-
var _hoisted_1$
|
|
5740
|
-
var _hoisted_2$
|
|
5741
|
-
var _hoisted_3$
|
|
5748
|
+
var _hoisted_1$21 = ["href"];
|
|
5749
|
+
var _hoisted_2$17 = { class: "docs-sidebar__text" };
|
|
5750
|
+
var _hoisted_3$14 = {
|
|
5742
5751
|
key: 0,
|
|
5743
5752
|
class: "docs-sidebar__tag"
|
|
5744
5753
|
};
|
|
5745
|
-
var _hoisted_4$
|
|
5746
|
-
var _hoisted_5$
|
|
5754
|
+
var _hoisted_4$9 = { class: "docs-sidebar__text" };
|
|
5755
|
+
var _hoisted_5$7 = {
|
|
5747
5756
|
key: 0,
|
|
5748
5757
|
class: "docs-sidebar__tag"
|
|
5749
5758
|
};
|
|
@@ -5791,9 +5800,9 @@ var default_sidebar_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
5791
5800
|
href: item.value
|
|
5792
5801
|
}, [
|
|
5793
5802
|
(0, vue.createVNode)(sidebar_glyph_default, { item }, null, 8, ["item"]),
|
|
5794
|
-
(0, vue.createElementVNode)("span", _hoisted_2$
|
|
5795
|
-
item.tag ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_3$
|
|
5796
|
-
], 8, _hoisted_1$
|
|
5803
|
+
(0, vue.createElementVNode)("span", _hoisted_2$17, (0, vue.toDisplayString)(item.label), 1),
|
|
5804
|
+
item.tag ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_3$14, (0, vue.toDisplayString)(item.tag), 1)) : (0, vue.createCommentVNode)("v-if", true)
|
|
5805
|
+
], 8, _hoisted_1$21)) : item.value ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(vue_router.RouterLink), {
|
|
5797
5806
|
key: 1,
|
|
5798
5807
|
class: (0, vue.normalizeClass)(["docs-sidebar__link", { "is-active": isItemActive(item.value) }]),
|
|
5799
5808
|
to: toPath(item.value)
|
|
@@ -5803,8 +5812,8 @@ var default_sidebar_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
5803
5812
|
item,
|
|
5804
5813
|
selected: isItemActive(item.value)
|
|
5805
5814
|
}, null, 8, ["item", "selected"]),
|
|
5806
|
-
(0, vue.createElementVNode)("span", _hoisted_4$
|
|
5807
|
-
item.tag ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_5$
|
|
5815
|
+
(0, vue.createElementVNode)("span", _hoisted_4$9, (0, vue.toDisplayString)(item.label), 1),
|
|
5816
|
+
item.tag ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_5$7, (0, vue.toDisplayString)(item.tag), 1)) : (0, vue.createCommentVNode)("v-if", true)
|
|
5808
5817
|
]),
|
|
5809
5818
|
_: 2
|
|
5810
5819
|
}, 1032, ["class", "to"])) : ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_6$4, [
|
|
@@ -5823,8 +5832,8 @@ var default_sidebar_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
5823
5832
|
});
|
|
5824
5833
|
//#endregion
|
|
5825
5834
|
//#region packages/client/src/components/layout/content-width-toggle.vue?vue&type=script&setup=true&lang.ts
|
|
5826
|
-
var _hoisted_1$
|
|
5827
|
-
var _hoisted_2$
|
|
5835
|
+
var _hoisted_1$20 = ["aria-label"];
|
|
5836
|
+
var _hoisted_2$16 = [
|
|
5828
5837
|
"aria-checked",
|
|
5829
5838
|
"aria-label",
|
|
5830
5839
|
"tabindex",
|
|
@@ -5891,20 +5900,20 @@ var content_width_toggle_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
5891
5900
|
class: "docs-content-width__icon",
|
|
5892
5901
|
name: option.icon,
|
|
5893
5902
|
size: 12
|
|
5894
|
-
}, null, 8, ["name"])], 10, _hoisted_2$
|
|
5895
|
-
}), 128))], 40, _hoisted_1$
|
|
5903
|
+
}, null, 8, ["name"])], 10, _hoisted_2$16);
|
|
5904
|
+
}), 128))], 40, _hoisted_1$20);
|
|
5896
5905
|
};
|
|
5897
5906
|
}
|
|
5898
5907
|
});
|
|
5899
5908
|
//#endregion
|
|
5900
5909
|
//#region packages/client/src/components/layout/page-header.vue?vue&type=script&setup=true&lang.ts
|
|
5901
|
-
var _hoisted_1$
|
|
5902
|
-
var _hoisted_2$
|
|
5910
|
+
var _hoisted_1$19 = { class: "docs-page-header" };
|
|
5911
|
+
var _hoisted_2$15 = {
|
|
5903
5912
|
key: 0,
|
|
5904
5913
|
class: "docs-page-header__start"
|
|
5905
5914
|
};
|
|
5906
|
-
var _hoisted_3$
|
|
5907
|
-
var _hoisted_4$
|
|
5915
|
+
var _hoisted_3$13 = { class: "docs-page-header__eyebrow" };
|
|
5916
|
+
var _hoisted_4$8 = { class: "docs-page-header__end" };
|
|
5908
5917
|
//#endregion
|
|
5909
5918
|
//#region packages/client/src/components/layout/page-header.vue
|
|
5910
5919
|
var page_header_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -5918,13 +5927,13 @@ var page_header_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
5918
5927
|
return findSidebarSection(sidebarItems.value, route.path, lang.value);
|
|
5919
5928
|
});
|
|
5920
5929
|
return (_ctx, _cache) => {
|
|
5921
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("header", _hoisted_1$
|
|
5930
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("header", _hoisted_1$19, [section.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_2$15, [(0, vue.createElementVNode)("p", _hoisted_3$13, (0, vue.toDisplayString)(section.value.label), 1)])) : (0, vue.createCommentVNode)("v-if", true), (0, vue.createElementVNode)("div", _hoisted_4$8, [(0, vue.createVNode)(content_width_toggle_default)])]);
|
|
5922
5931
|
};
|
|
5923
5932
|
}
|
|
5924
5933
|
});
|
|
5925
5934
|
//#endregion
|
|
5926
5935
|
//#region packages/client/src/components/layout/page-footer.vue?vue&type=script&setup=true&lang.ts
|
|
5927
|
-
var _hoisted_1$
|
|
5936
|
+
var _hoisted_1$18 = ["aria-label"];
|
|
5928
5937
|
//#endregion
|
|
5929
5938
|
//#region packages/client/src/components/layout/page-footer.vue
|
|
5930
5939
|
var page_footer_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -5980,7 +5989,7 @@ var page_footer_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
5980
5989
|
d: "M6.22 4.22a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1 0\n 1.06l-3.25 3.25a.75.75 0 0 1-1.06-1.06L8.94 8 6.22 5.28a.75.75 0 0 1 0-1.06Z"
|
|
5981
5990
|
})], -1))]),
|
|
5982
5991
|
_: 1
|
|
5983
|
-
}, 8, ["to", "aria-label"])) : (0, vue.createCommentVNode)("v-if", true)], 8, _hoisted_1$
|
|
5992
|
+
}, 8, ["to", "aria-label"])) : (0, vue.createCommentVNode)("v-if", true)], 8, _hoisted_1$18)) : (0, vue.createCommentVNode)("v-if", true);
|
|
5984
5993
|
};
|
|
5985
5994
|
}
|
|
5986
5995
|
});
|
|
@@ -6108,8 +6117,8 @@ var resolveOutlineScrollerHeight = (maxHeight, listSize) => {
|
|
|
6108
6117
|
};
|
|
6109
6118
|
//#endregion
|
|
6110
6119
|
//#region packages/client/src/components/layout/page-outline.vue?vue&type=script&setup=true&lang.ts
|
|
6111
|
-
var _hoisted_1$
|
|
6112
|
-
var _hoisted_2$
|
|
6120
|
+
var _hoisted_1$17 = ["aria-label"];
|
|
6121
|
+
var _hoisted_2$14 = { class: "docs-page-outline__title" };
|
|
6113
6122
|
var SCROLL_THRESHOLD = 80;
|
|
6114
6123
|
//#endregion
|
|
6115
6124
|
//#region packages/client/src/components/layout/page-outline.vue
|
|
@@ -6349,7 +6358,7 @@ var page_outline_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
6349
6358
|
class: "docs-page-outline",
|
|
6350
6359
|
style: (0, vue.normalizeStyle)(rootStyle.value),
|
|
6351
6360
|
"aria-label": (0, vue.unref)(t)("client.page.outline")
|
|
6352
|
-
}, [(0, vue.createElementVNode)("p", _hoisted_2$
|
|
6361
|
+
}, [(0, vue.createElementVNode)("p", _hoisted_2$14, (0, vue.toDisplayString)((0, vue.unref)(t)("client.page.outline")), 1), (0, vue.createVNode)((0, vue.unref)(_deot_vc.Scroller), {
|
|
6353
6362
|
ref_key: "outlineScroller",
|
|
6354
6363
|
ref: outlineScroller,
|
|
6355
6364
|
class: "docs-page-outline__scroller",
|
|
@@ -6365,7 +6374,7 @@ var page_outline_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
6365
6374
|
onSelect: handleSelect
|
|
6366
6375
|
}, null, 8, ["items", "active-id"])]),
|
|
6367
6376
|
_: 1
|
|
6368
|
-
}, 8, ["show-bar", "height"])], 12, _hoisted_1$
|
|
6377
|
+
}, 8, ["show-bar", "height"])], 12, _hoisted_1$17)) : (0, vue.createCommentVNode)("v-if", true);
|
|
6369
6378
|
};
|
|
6370
6379
|
}
|
|
6371
6380
|
});
|
|
@@ -6388,25 +6397,25 @@ var omitRouteQuery = (query, keys) => {
|
|
|
6388
6397
|
};
|
|
6389
6398
|
//#endregion
|
|
6390
6399
|
//#region packages/client/src/components/layout/resource-slot.vue?vue&type=script&setup=true&lang.ts
|
|
6391
|
-
var _hoisted_1$
|
|
6400
|
+
var _hoisted_1$16 = [
|
|
6392
6401
|
"data-slot",
|
|
6393
6402
|
"data-resource-type",
|
|
6394
6403
|
"data-content-width"
|
|
6395
6404
|
];
|
|
6396
|
-
var _hoisted_2$
|
|
6405
|
+
var _hoisted_2$13 = {
|
|
6397
6406
|
key: 0,
|
|
6398
6407
|
class: "docs-resource-slot__error",
|
|
6399
6408
|
role: "alert"
|
|
6400
6409
|
};
|
|
6401
|
-
var _hoisted_3$
|
|
6410
|
+
var _hoisted_3$12 = {
|
|
6402
6411
|
key: 5,
|
|
6403
6412
|
class: "docs-resource-slot__page"
|
|
6404
6413
|
};
|
|
6405
|
-
var _hoisted_4$
|
|
6414
|
+
var _hoisted_4$7 = {
|
|
6406
6415
|
key: 0,
|
|
6407
6416
|
class: "docs-resource-slot__error"
|
|
6408
6417
|
};
|
|
6409
|
-
var _hoisted_5$
|
|
6418
|
+
var _hoisted_5$6 = {
|
|
6410
6419
|
key: 6,
|
|
6411
6420
|
class: "docs-resource-slot__error"
|
|
6412
6421
|
};
|
|
@@ -6839,14 +6848,14 @@ var resource_slot_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
6839
6848
|
"data-resource-type": resourceType.value || void 0,
|
|
6840
6849
|
"data-content-width": __props.name === "content" && resourceType.value === "markdown" ? (0, vue.unref)(contentWidth) : void 0,
|
|
6841
6850
|
style: (0, vue.normalizeStyle)({ minHeight: transitionMinHeight.value })
|
|
6842
|
-
}, [styleError.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_2$
|
|
6851
|
+
}, [styleError.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_2$13, (0, vue.toDisplayString)(styleError.value), 1)) : (0, vue.createCommentVNode)("v-if", true), builtin.value === "header" ? ((0, vue.openBlock)(), (0, vue.createBlock)(default_header_default, { key: 1 })) : builtin.value === "footer" ? ((0, vue.openBlock)(), (0, vue.createBlock)(default_footer_default, { key: 2 })) : sidebarItems.value ? ((0, vue.openBlock)(), (0, vue.createBlock)(default_sidebar_default, {
|
|
6843
6852
|
key: 3,
|
|
6844
6853
|
items: sidebarItems.value
|
|
6845
6854
|
}, null, 8, ["items"])) : resourceType.value === "sfc" && source.value ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(remote_sfc_default), {
|
|
6846
6855
|
key: 4,
|
|
6847
6856
|
source: source.value,
|
|
6848
6857
|
lang: lang.value
|
|
6849
|
-
}, null, 8, ["source", "lang"])) : pageDocument.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_3$
|
|
6858
|
+
}, null, 8, ["source", "lang"])) : pageDocument.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_3$12, [error.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_4$7, (0, vue.toDisplayString)(error.value), 1)) : (0, vue.createCommentVNode)("v-if", true), (0, vue.createVNode)((0, vue.unref)(_deot_docs_renderer.Renderer), {
|
|
6850
6859
|
document: pageDocument.value,
|
|
6851
6860
|
modules: (0, vue.unref)(rendererModules),
|
|
6852
6861
|
context: rendererContext.value,
|
|
@@ -6856,7 +6865,7 @@ var resource_slot_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
6856
6865
|
"modules",
|
|
6857
6866
|
"context",
|
|
6858
6867
|
"fit"
|
|
6859
|
-
])])) : error.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_5$
|
|
6868
|
+
])])) : error.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_5$6, (0, vue.toDisplayString)(error.value), 1)) : loading.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_6$3, (0, vue.toDisplayString)((0, vue.unref)(t)("client.common.loading")), 1)) : resourceType.value === "markdown" && __props.name === "content" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_7$3, [(0, vue.createElementVNode)("div", {
|
|
6860
6869
|
ref: bindArticle,
|
|
6861
6870
|
class: "docs-resource-slot__article"
|
|
6862
6871
|
}, [
|
|
@@ -6890,7 +6899,7 @@ var resource_slot_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
6890
6899
|
key: 10,
|
|
6891
6900
|
class: "docs-resource-slot__builtin",
|
|
6892
6901
|
"data-builtin": builtin.value
|
|
6893
|
-
}, null, 8, _hoisted_8$3)) : (0, vue.createCommentVNode)("v-if", true)], 12, _hoisted_1$
|
|
6902
|
+
}, null, 8, _hoisted_8$3)) : (0, vue.createCommentVNode)("v-if", true)], 12, _hoisted_1$16);
|
|
6894
6903
|
};
|
|
6895
6904
|
}
|
|
6896
6905
|
});
|
|
@@ -8009,11 +8018,11 @@ var listRendererEditorDemos = (lang) => RENDERER_EDITOR_DEMOS.map((name) => ({
|
|
|
8009
8018
|
var createRendererEditorDemoDocument = (demo, lang) => factories[demo](lang);
|
|
8010
8019
|
//#endregion
|
|
8011
8020
|
//#region packages/client/src/app.vue?vue&type=script&setup=true&lang.ts
|
|
8012
|
-
var _hoisted_1$
|
|
8013
|
-
var _hoisted_2$
|
|
8014
|
-
var _hoisted_3$
|
|
8015
|
-
var _hoisted_4$
|
|
8016
|
-
var _hoisted_5$
|
|
8021
|
+
var _hoisted_1$15 = { class: "docs-app__header" };
|
|
8022
|
+
var _hoisted_2$12 = ["aria-label", "aria-expanded"];
|
|
8023
|
+
var _hoisted_3$11 = ["aria-label"];
|
|
8024
|
+
var _hoisted_4$6 = { class: "docs-layout__main" };
|
|
8025
|
+
var _hoisted_5$5 = { class: "docs-layout__footer" };
|
|
8017
8026
|
//#endregion
|
|
8018
8027
|
//#region packages/client/src/app.vue
|
|
8019
8028
|
var app_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -8070,14 +8079,14 @@ var app_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
8070
8079
|
"docs-app--mobile-sidebar-open": mobileSidebarOpen.value
|
|
8071
8080
|
}]),
|
|
8072
8081
|
onKeydown: (0, vue.withKeys)(closeMobileSidebar, ["esc"])
|
|
8073
|
-
}, [(0, vue.createElementVNode)("div", _hoisted_1$
|
|
8082
|
+
}, [(0, vue.createElementVNode)("div", _hoisted_1$15, [(0, vue.createElementVNode)("button", {
|
|
8074
8083
|
type: "button",
|
|
8075
8084
|
class: (0, vue.normalizeClass)(["docs-app__sidebar-toggle", { "is-open": mobileSidebarOpen.value }]),
|
|
8076
8085
|
"aria-label": (0, vue.unref)(t)(mobileSidebarOpen.value ? "client.header.closeSidebar" : "client.header.openSidebar"),
|
|
8077
8086
|
"aria-expanded": mobileSidebarOpen.value,
|
|
8078
8087
|
"aria-controls": "docs-mobile-sidebar",
|
|
8079
8088
|
onClick: toggleMobileSidebar
|
|
8080
|
-
}, [(0, vue.createVNode)((0, vue.unref)(icon_default), { name: mobileSidebarOpen.value ? "close" : "menu" }, null, 8, ["name"])], 10, _hoisted_2$
|
|
8089
|
+
}, [(0, vue.createVNode)((0, vue.unref)(icon_default), { name: mobileSidebarOpen.value ? "close" : "menu" }, null, 8, ["name"])], 10, _hoisted_2$12), (0, vue.createVNode)((0, vue.unref)(resource_slot_default), { name: "header" })]), (0, vue.createElementVNode)("div", { class: (0, vue.normalizeClass)(["docs-layout", {
|
|
8081
8090
|
"docs-layout--database": isUtilityShell.value,
|
|
8082
8091
|
"docs-layout--editor": isEditorShell.value,
|
|
8083
8092
|
"docs-layout--home": (0, vue.unref)(route).meta?.docsHome
|
|
@@ -8102,7 +8111,7 @@ var app_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
8102
8111
|
class: "docs-layout__sidebar-mask",
|
|
8103
8112
|
"aria-label": (0, vue.unref)(t)("client.header.closeSidebar"),
|
|
8104
8113
|
onClick: closeMobileSidebar
|
|
8105
|
-
}, null, 8, _hoisted_3$
|
|
8114
|
+
}, null, 8, _hoisted_3$11),
|
|
8106
8115
|
(0, vue.createVNode)((0, vue.unref)(_deot_vc.Scroller), {
|
|
8107
8116
|
ref_key: "mainScroller",
|
|
8108
8117
|
ref: mainScroller,
|
|
@@ -8119,12 +8128,12 @@ var app_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
8119
8128
|
class: "docs-layout__rail docs-layout__rail--start",
|
|
8120
8129
|
"aria-hidden": "true"
|
|
8121
8130
|
}, null, -1)),
|
|
8122
|
-
(0, vue.createElementVNode)("main", _hoisted_4$
|
|
8131
|
+
(0, vue.createElementVNode)("main", _hoisted_4$6, [(0, vue.createVNode)((0, vue.unref)(vue_router.RouterView)), (0, vue.createVNode)((0, vue.unref)(vue_router.RouterView), { name: "extra" })]),
|
|
8123
8132
|
_cache[1] || (_cache[1] = (0, vue.createElementVNode)("div", {
|
|
8124
8133
|
class: "docs-layout__rail docs-layout__rail--end",
|
|
8125
8134
|
"aria-hidden": "true"
|
|
8126
8135
|
}, null, -1)),
|
|
8127
|
-
(0, vue.createElementVNode)("div", _hoisted_5$
|
|
8136
|
+
(0, vue.createElementVNode)("div", _hoisted_5$5, [(0, vue.createVNode)((0, vue.unref)(resource_slot_default), { name: "footer" })])
|
|
8128
8137
|
]),
|
|
8129
8138
|
_: 1
|
|
8130
8139
|
}, 512)
|
|
@@ -8252,16 +8261,16 @@ var prune = async () => {
|
|
|
8252
8261
|
};
|
|
8253
8262
|
//#endregion
|
|
8254
8263
|
//#region packages/client/src/components/paging/filter/filter-item.vue?vue&type=script&setup=true&lang.ts
|
|
8255
|
-
var _hoisted_1$
|
|
8256
|
-
var _hoisted_2$
|
|
8264
|
+
var _hoisted_1$14 = { class: "docs-paging-filter-item" };
|
|
8265
|
+
var _hoisted_2$11 = {
|
|
8257
8266
|
key: 0,
|
|
8258
8267
|
class: "docs-paging-filter-item__label"
|
|
8259
8268
|
};
|
|
8260
|
-
var _hoisted_3$
|
|
8269
|
+
var _hoisted_3$10 = {
|
|
8261
8270
|
key: 1,
|
|
8262
8271
|
class: "docs-paging-filter-item__range"
|
|
8263
8272
|
};
|
|
8264
|
-
var _hoisted_4$
|
|
8273
|
+
var _hoisted_4$5 = { class: "docs-paging-filter-item__separator" };
|
|
8265
8274
|
//#endregion
|
|
8266
8275
|
//#region packages/client/src/components/paging/filter/filter-item.vue
|
|
8267
8276
|
var filter_item_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -8310,7 +8319,7 @@ var filter_item_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
8310
8319
|
emit("search");
|
|
8311
8320
|
};
|
|
8312
8321
|
return (_ctx, _cache) => {
|
|
8313
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
8322
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$14, [__props.module.label ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("span", _hoisted_2$11, (0, vue.toDisplayString)(__props.module.label), 1)) : (0, vue.createCommentVNode)("v-if", true), __props.module.type === "range" ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_3$10, [
|
|
8314
8323
|
(0, vue.createVNode)((0, vue.unref)(_deot_vc.InputNumber), (0, vue.mergeProps)({
|
|
8315
8324
|
"model-value": getNumberValue(__props.startValue),
|
|
8316
8325
|
"data-filter": __props.module.field[0],
|
|
@@ -8323,7 +8332,7 @@ var filter_item_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
8323
8332
|
"data-filter",
|
|
8324
8333
|
"placeholder"
|
|
8325
8334
|
]),
|
|
8326
|
-
(0, vue.createElementVNode)("span", _hoisted_4$
|
|
8335
|
+
(0, vue.createElementVNode)("span", _hoisted_4$5, (0, vue.toDisplayString)(__props.module.separator || "-"), 1),
|
|
8327
8336
|
(0, vue.createVNode)((0, vue.unref)(_deot_vc.InputNumber), (0, vue.mergeProps)({
|
|
8328
8337
|
"model-value": getNumberValue(__props.endValue),
|
|
8329
8338
|
"data-filter": __props.module.field[1],
|
|
@@ -8386,8 +8395,8 @@ var filter_item_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
8386
8395
|
});
|
|
8387
8396
|
//#endregion
|
|
8388
8397
|
//#region packages/client/src/components/paging/filter/index.vue?vue&type=script&setup=true&lang.ts
|
|
8389
|
-
var _hoisted_1$
|
|
8390
|
-
var _hoisted_2$
|
|
8398
|
+
var _hoisted_1$13 = { class: "docs-paging-filter" };
|
|
8399
|
+
var _hoisted_2$10 = { class: "docs-paging-filter__operate" };
|
|
8391
8400
|
//#endregion
|
|
8392
8401
|
//#region packages/client/src/components/paging/filter/index.vue
|
|
8393
8402
|
var filter_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -8441,7 +8450,7 @@ var filter_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
8441
8450
|
emit("search", value);
|
|
8442
8451
|
};
|
|
8443
8452
|
return (_ctx, _cache) => {
|
|
8444
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
8453
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$13, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(__props.modules, (module) => {
|
|
8445
8454
|
return (0, vue.openBlock)(), (0, vue.createBlock)(filter_item_default, {
|
|
8446
8455
|
key: getModuleKey(module),
|
|
8447
8456
|
module,
|
|
@@ -8461,7 +8470,7 @@ var filter_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
8461
8470
|
"onUpdate:startValue",
|
|
8462
8471
|
"onUpdate:endValue"
|
|
8463
8472
|
]);
|
|
8464
|
-
}), 128)), (0, vue.createElementVNode)("div", _hoisted_2$
|
|
8473
|
+
}), 128)), (0, vue.createElementVNode)("div", _hoisted_2$10, [(0, vue.createVNode)((0, vue.unref)(_deot_vc.Button), {
|
|
8465
8474
|
type: "primary",
|
|
8466
8475
|
onClick: handleSearch
|
|
8467
8476
|
}, {
|
|
@@ -8476,9 +8485,9 @@ var filter_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
8476
8485
|
});
|
|
8477
8486
|
//#endregion
|
|
8478
8487
|
//#region packages/client/src/components/paging/paging.vue?vue&type=script&setup=true&lang.ts
|
|
8479
|
-
var _hoisted_1$
|
|
8480
|
-
var _hoisted_2$
|
|
8481
|
-
var _hoisted_3$
|
|
8488
|
+
var _hoisted_1$12 = { class: "docs-paging" };
|
|
8489
|
+
var _hoisted_2$9 = { class: "docs-paging__pagination" };
|
|
8490
|
+
var _hoisted_3$9 = { class: "docs-paging__pagination-control" };
|
|
8482
8491
|
//#endregion
|
|
8483
8492
|
//#region packages/client/src/components/paging/paging.vue
|
|
8484
8493
|
var paging_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -8624,7 +8633,7 @@ var paging_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
8624
8633
|
refreshAffix
|
|
8625
8634
|
});
|
|
8626
8635
|
return (_ctx, _cache) => {
|
|
8627
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
8636
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$12, [
|
|
8628
8637
|
__props.filterModules.length ? ((0, vue.openBlock)(), (0, vue.createBlock)(filter_default, {
|
|
8629
8638
|
key: 0,
|
|
8630
8639
|
modules: __props.filterModules,
|
|
@@ -8658,12 +8667,12 @@ var paging_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
8658
8667
|
ref_key: "footerAffix",
|
|
8659
8668
|
ref: footerAffix
|
|
8660
8669
|
}, affixOptions.value[1]), {
|
|
8661
|
-
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("footer", _hoisted_2$
|
|
8670
|
+
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("footer", _hoisted_2$9, [(0, vue.renderSlot)(_ctx.$slots, "footer-extra", {
|
|
8662
8671
|
current: current.value,
|
|
8663
8672
|
pageSize: pageSize.value,
|
|
8664
8673
|
total: total.value,
|
|
8665
8674
|
loading: loading.value
|
|
8666
|
-
}), (0, vue.createElementVNode)("div", _hoisted_3$
|
|
8675
|
+
}), (0, vue.createElementVNode)("div", _hoisted_3$9, [(0, vue.createVNode)((0, vue.unref)(_deot_vc.Pagination), {
|
|
8667
8676
|
count: total.value,
|
|
8668
8677
|
current: current.value,
|
|
8669
8678
|
"page-size": pageSize.value,
|
|
@@ -8687,7 +8696,7 @@ var paging_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
8687
8696
|
});
|
|
8688
8697
|
//#endregion
|
|
8689
8698
|
//#region packages/client/src/components/tag/tag.vue?vue&type=script&setup=true&lang.ts
|
|
8690
|
-
var _hoisted_1$
|
|
8699
|
+
var _hoisted_1$11 = ["data-type"];
|
|
8691
8700
|
//#endregion
|
|
8692
8701
|
//#region packages/client/src/components/tag/tag.vue
|
|
8693
8702
|
var tag_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -8732,17 +8741,17 @@ var tag_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
8732
8741
|
backgroundColor: currentColor.value[0],
|
|
8733
8742
|
color: currentColor.value[1]
|
|
8734
8743
|
})
|
|
8735
|
-
}, [(0, vue.createElementVNode)("span", { class: (0, vue.normalizeClass)(["docs-tag__label", { "docs-tag__label--ellipsis": __props.ellipsis }]) }, [(0, vue.renderSlot)(_ctx.$slots, "default", {}, () => [(0, vue.createTextVNode)((0, vue.toDisplayString)(currentLabel.value), 1)])], 2)], 12, _hoisted_1$
|
|
8744
|
+
}, [(0, vue.createElementVNode)("span", { class: (0, vue.normalizeClass)(["docs-tag__label", { "docs-tag__label--ellipsis": __props.ellipsis }]) }, [(0, vue.renderSlot)(_ctx.$slots, "default", {}, () => [(0, vue.createTextVNode)((0, vue.toDisplayString)(currentLabel.value), 1)])], 2)], 12, _hoisted_1$11);
|
|
8736
8745
|
};
|
|
8737
8746
|
}
|
|
8738
8747
|
});
|
|
8739
8748
|
//#endregion
|
|
8740
8749
|
//#region packages/client/src/pages/database/index.vue?vue&type=script&setup=true&lang.ts
|
|
8741
|
-
var _hoisted_1$
|
|
8742
|
-
var _hoisted_2$
|
|
8743
|
-
var _hoisted_3$
|
|
8744
|
-
var _hoisted_4$
|
|
8745
|
-
var _hoisted_5$
|
|
8750
|
+
var _hoisted_1$10 = { class: "docs-database" };
|
|
8751
|
+
var _hoisted_2$8 = { class: "docs-database__header" };
|
|
8752
|
+
var _hoisted_3$8 = ["title"];
|
|
8753
|
+
var _hoisted_4$4 = { class: "docs-database__toolbar" };
|
|
8754
|
+
var _hoisted_5$4 = { class: "docs-database__toolbar-primary" };
|
|
8746
8755
|
var _hoisted_6$2 = { class: "docs-database__button-content" };
|
|
8747
8756
|
var _hoisted_7$2 = { class: "docs-database__button-content" };
|
|
8748
8757
|
var _hoisted_8$2 = { class: "docs-database__columns" };
|
|
@@ -8978,11 +8987,11 @@ var database_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
8978
8987
|
statusRefreshTimer = void 0;
|
|
8979
8988
|
});
|
|
8980
8989
|
return (_ctx, _cache) => {
|
|
8981
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("section", _hoisted_1$
|
|
8990
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("section", _hoisted_1$10, [(0, vue.createElementVNode)("header", _hoisted_2$8, [(0, vue.createElementVNode)("div", null, [(0, vue.createElementVNode)("h1", null, (0, vue.toDisplayString)((0, vue.unref)(t)("client.database.title")), 1), (0, vue.createElementVNode)("p", null, [
|
|
8982
8991
|
(0, vue.createTextVNode)(" deot-docs / resources · " + (0, vue.toDisplayString)((0, vue.unref)(t)("client.database.records", { count: records.value.length })) + " · ", 1),
|
|
8983
|
-
(0, vue.createElementVNode)("span", { title: (0, vue.unref)(currentNamespace) }, (0, vue.toDisplayString)((0, vue.unref)(currentNamespace)), 9, _hoisted_3$
|
|
8992
|
+
(0, vue.createElementVNode)("span", { title: (0, vue.unref)(currentNamespace) }, (0, vue.toDisplayString)((0, vue.unref)(currentNamespace)), 9, _hoisted_3$8),
|
|
8984
8993
|
(0, vue.createTextVNode)(" " + (0, vue.toDisplayString)((0, vue.unref)(t)("client.database.cache", { size: namespaceCacheSize.value })), 1)
|
|
8985
|
-
])]), (0, vue.createElementVNode)("div", _hoisted_4$
|
|
8994
|
+
])]), (0, vue.createElementVNode)("div", _hoisted_4$4, [(0, vue.createElementVNode)("div", _hoisted_5$4, [
|
|
8986
8995
|
(0, vue.createVNode)((0, vue.unref)(_deot_vc.Button), {
|
|
8987
8996
|
type: "primary",
|
|
8988
8997
|
disabled: loading.value,
|
|
@@ -9232,14 +9241,14 @@ var database_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
9232
9241
|
});
|
|
9233
9242
|
//#endregion
|
|
9234
9243
|
//#region packages/client/src/pages/renderer-editor-demos/components/card.vue?vue&type=script&setup=true&lang.ts
|
|
9235
|
-
var _hoisted_1$
|
|
9236
|
-
var _hoisted_2$
|
|
9237
|
-
var _hoisted_3$
|
|
9238
|
-
var _hoisted_4$
|
|
9244
|
+
var _hoisted_1$9 = { class: "docs-renderer-editor-demos-card__name" };
|
|
9245
|
+
var _hoisted_2$7 = { class: "docs-renderer-editor-demos-card__title" };
|
|
9246
|
+
var _hoisted_3$7 = { class: "docs-renderer-editor-demos-card__desc" };
|
|
9247
|
+
var _hoisted_4$3 = {
|
|
9239
9248
|
key: 0,
|
|
9240
9249
|
class: "docs-renderer-editor-demos-card__modules"
|
|
9241
9250
|
};
|
|
9242
|
-
var _hoisted_5$
|
|
9251
|
+
var _hoisted_5$3 = { class: "docs-renderer-editor-demos-card__action" };
|
|
9243
9252
|
//#endregion
|
|
9244
9253
|
//#region packages/client/src/pages/renderer-editor-demos/components/card.vue
|
|
9245
9254
|
var card_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -9263,22 +9272,22 @@ var card_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
9263
9272
|
class: "docs-renderer-editor-demos-card__accent",
|
|
9264
9273
|
"aria-hidden": "true"
|
|
9265
9274
|
}, null, -1)),
|
|
9266
|
-
(0, vue.createElementVNode)("span", _hoisted_1$
|
|
9267
|
-
(0, vue.createElementVNode)("strong", _hoisted_2$
|
|
9268
|
-
(0, vue.createElementVNode)("p", _hoisted_3$
|
|
9269
|
-
__props.item.modules.length ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("ul", _hoisted_4$
|
|
9275
|
+
(0, vue.createElementVNode)("span", _hoisted_1$9, (0, vue.toDisplayString)(__props.item.name), 1),
|
|
9276
|
+
(0, vue.createElementVNode)("strong", _hoisted_2$7, (0, vue.toDisplayString)(__props.item.title), 1),
|
|
9277
|
+
(0, vue.createElementVNode)("p", _hoisted_3$7, (0, vue.toDisplayString)(__props.item.description), 1),
|
|
9278
|
+
__props.item.modules.length ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("ul", _hoisted_4$3, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(__props.item.modules, (type) => {
|
|
9270
9279
|
return (0, vue.openBlock)(), (0, vue.createElementBlock)("li", { key: type }, (0, vue.toDisplayString)(type), 1);
|
|
9271
9280
|
}), 128))])) : (0, vue.createCommentVNode)("v-if", true),
|
|
9272
|
-
(0, vue.createElementVNode)("span", _hoisted_5$
|
|
9281
|
+
(0, vue.createElementVNode)("span", _hoisted_5$3, (0, vue.toDisplayString)(__props.action || (0, vue.unref)(t)("client.demos.open")), 1)
|
|
9273
9282
|
], 4);
|
|
9274
9283
|
};
|
|
9275
9284
|
}
|
|
9276
9285
|
});
|
|
9277
9286
|
//#endregion
|
|
9278
9287
|
//#region packages/client/src/pages/renderer-editor-demos/components/gallery.vue?vue&type=script&setup=true&lang.ts
|
|
9279
|
-
var _hoisted_1$
|
|
9280
|
-
var _hoisted_2$
|
|
9281
|
-
var _hoisted_3$
|
|
9288
|
+
var _hoisted_1$8 = { class: "docs-renderer-editor-demos-gallery" };
|
|
9289
|
+
var _hoisted_2$6 = { class: "docs-renderer-editor-demos-gallery__intro" };
|
|
9290
|
+
var _hoisted_3$6 = { class: "docs-renderer-editor-demos-gallery__grid" };
|
|
9282
9291
|
//#endregion
|
|
9283
9292
|
//#region packages/client/src/pages/renderer-editor-demos/components/gallery.vue
|
|
9284
9293
|
var gallery_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -9299,7 +9308,7 @@ var gallery_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
9299
9308
|
if (isRendererEditorDemo(name)) emit("open", name);
|
|
9300
9309
|
};
|
|
9301
9310
|
return (_ctx, _cache) => {
|
|
9302
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("section", _hoisted_1$
|
|
9311
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("section", _hoisted_1$8, [(0, vue.createElementVNode)("header", _hoisted_2$6, [(0, vue.createElementVNode)("h1", null, (0, vue.toDisplayString)((0, vue.unref)(t)("client.demos.title")), 1), (0, vue.createElementVNode)("p", null, (0, vue.toDisplayString)((0, vue.unref)(t)("client.demos.subtitle")), 1)]), (0, vue.createElementVNode)("div", _hoisted_3$6, [((0, vue.openBlock)(true), (0, vue.createElementBlock)(vue.Fragment, null, (0, vue.renderList)(items.value, (item) => {
|
|
9303
9312
|
return (0, vue.openBlock)(), (0, vue.createBlock)(card_default, {
|
|
9304
9313
|
key: item.name,
|
|
9305
9314
|
item,
|
|
@@ -9315,7 +9324,7 @@ var gallery_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
9315
9324
|
});
|
|
9316
9325
|
//#endregion
|
|
9317
9326
|
//#region packages/client/src/pages/renderer-editor-demos/components/stage.vue?vue&type=script&setup=true&lang.ts
|
|
9318
|
-
var _hoisted_1$
|
|
9327
|
+
var _hoisted_1$7 = { class: "docs-renderer-editor-demos-stage" };
|
|
9319
9328
|
//#endregion
|
|
9320
9329
|
//#region packages/client/src/pages/renderer-editor-demos/components/stage.vue
|
|
9321
9330
|
var stage_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
@@ -9378,7 +9387,7 @@ var stage_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
9378
9387
|
document.value = createRendererEditorDemoDocument(props.name, lang.value);
|
|
9379
9388
|
}, { immediate: true });
|
|
9380
9389
|
return (_ctx, _cache) => {
|
|
9381
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
9390
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$7, [document.value ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_deot_docs_renderer.Combo), {
|
|
9382
9391
|
key: 0,
|
|
9383
9392
|
modelValue: document.value,
|
|
9384
9393
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => document.value = $event),
|
|
@@ -9438,12 +9447,12 @@ var renderer_editor_demos_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
9438
9447
|
});
|
|
9439
9448
|
//#endregion
|
|
9440
9449
|
//#region packages/client/src/pages/renderer-editor/index.vue?vue&type=script&setup=true&lang.ts
|
|
9441
|
-
var _hoisted_1$
|
|
9442
|
-
var _hoisted_2$
|
|
9450
|
+
var _hoisted_1$6 = { class: "docs-renderer-editor-page" };
|
|
9451
|
+
var _hoisted_2$5 = {
|
|
9443
9452
|
key: 0,
|
|
9444
9453
|
class: "docs-renderer-editor-page__error"
|
|
9445
9454
|
};
|
|
9446
|
-
var _hoisted_3$
|
|
9455
|
+
var _hoisted_3$5 = {
|
|
9447
9456
|
key: 1,
|
|
9448
9457
|
class: "docs-renderer-editor-page__loading"
|
|
9449
9458
|
};
|
|
@@ -9646,7 +9655,7 @@ var renderer_editor_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
9646
9655
|
controller?.abort();
|
|
9647
9656
|
});
|
|
9648
9657
|
return (_ctx, _cache) => {
|
|
9649
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$
|
|
9658
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1$6, [error.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_2$5, (0, vue.toDisplayString)(error.value), 1)) : loading.value || !document.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_3$5, (0, vue.toDisplayString)((0, vue.unref)(t)("client.common.loading")), 1)) : ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_deot_docs_renderer.Combo), {
|
|
9650
9659
|
key: 2,
|
|
9651
9660
|
modelValue: document.value,
|
|
9652
9661
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => document.value = $event),
|
|
@@ -9666,12 +9675,12 @@ var renderer_editor_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
9666
9675
|
});
|
|
9667
9676
|
//#endregion
|
|
9668
9677
|
//#region packages/client/src/pages/home/index.vue?vue&type=script&setup=true&lang.ts
|
|
9669
|
-
var _hoisted_1$
|
|
9670
|
-
var _hoisted_2$
|
|
9678
|
+
var _hoisted_1$5 = { class: "docs-home" };
|
|
9679
|
+
var _hoisted_2$4 = {
|
|
9671
9680
|
key: 0,
|
|
9672
9681
|
class: "docs-home__error"
|
|
9673
9682
|
};
|
|
9674
|
-
var _hoisted_3$
|
|
9683
|
+
var _hoisted_3$4 = {
|
|
9675
9684
|
key: 2,
|
|
9676
9685
|
class: "docs-home__loading"
|
|
9677
9686
|
};
|
|
@@ -9767,7 +9776,7 @@ var home_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
9767
9776
|
unsubscribe?.();
|
|
9768
9777
|
});
|
|
9769
9778
|
return (_ctx, _cache) => {
|
|
9770
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("section", _hoisted_1$
|
|
9779
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("section", _hoisted_1$5, [error.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_2$4, (0, vue.toDisplayString)(error.value), 1)) : (0, vue.createCommentVNode)("v-if", true), document.value ? ((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_deot_docs_renderer.Renderer), {
|
|
9771
9780
|
key: 1,
|
|
9772
9781
|
document: document.value,
|
|
9773
9782
|
modules: (0, vue.unref)(rendererModules),
|
|
@@ -9778,7 +9787,7 @@ var home_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
9778
9787
|
"modules",
|
|
9779
9788
|
"context",
|
|
9780
9789
|
"fit"
|
|
9781
|
-
])) : loading.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_3$
|
|
9790
|
+
])) : loading.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_3$4, (0, vue.toDisplayString)((0, vue.unref)(t)("client.common.loading")), 1)) : (0, vue.createCommentVNode)("v-if", true)]);
|
|
9782
9791
|
};
|
|
9783
9792
|
}
|
|
9784
9793
|
});
|
|
@@ -9794,12 +9803,12 @@ var retry = async (row) => Resource.playground.retry(getNamespace(), row);
|
|
|
9794
9803
|
var subscribeStatus = (listener) => Resource.playground.subscribeStatus(listener);
|
|
9795
9804
|
//#endregion
|
|
9796
9805
|
//#region packages/client/src/pages/playground-resource/components/source-editor.vue?vue&type=script&setup=true&lang.ts
|
|
9797
|
-
var _hoisted_1$
|
|
9798
|
-
var _hoisted_2$
|
|
9799
|
-
var _hoisted_3$
|
|
9806
|
+
var _hoisted_1$4 = { class: "docs-playground-resource-source-editor__meta" };
|
|
9807
|
+
var _hoisted_2$3 = ["title"];
|
|
9808
|
+
var _hoisted_3$3 = { class: "docs-playground-resource-source-editor__label" };
|
|
9800
9809
|
//#endregion
|
|
9801
9810
|
//#region packages/client/src/pages/playground-resource/components/source-editor.vue
|
|
9802
|
-
var source_editor_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
9811
|
+
var source_editor_default$1 = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
9803
9812
|
__name: "source-editor",
|
|
9804
9813
|
props: {
|
|
9805
9814
|
row: {},
|
|
@@ -9838,15 +9847,15 @@ var source_editor_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
9838
9847
|
onClose: handleClose
|
|
9839
9848
|
}, {
|
|
9840
9849
|
default: (0, vue.withCtx)(() => [
|
|
9841
|
-
(0, vue.createElementVNode)("div", _hoisted_1$
|
|
9850
|
+
(0, vue.createElementVNode)("div", _hoisted_1$4, [
|
|
9842
9851
|
(0, vue.createElementVNode)("p", null, [(0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("client.playgroundResource.kind")), 1), (0, vue.createElementVNode)("span", { class: (0, vue.normalizeClass)(["docs-playground-resource__kind", { "is-style": __props.row.kind === "style" }]) }, (0, vue.toDisplayString)(kindLabel.value), 3)]),
|
|
9843
9852
|
(0, vue.createElementVNode)("p", null, [(0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("client.playgroundResource.alias")), 1), (0, vue.createElementVNode)("code", null, (0, vue.toDisplayString)(__props.row.alias), 1)]),
|
|
9844
9853
|
(0, vue.createElementVNode)("p", null, [(0, vue.createElementVNode)("span", null, (0, vue.toDisplayString)((0, vue.unref)(t)("client.playgroundResource.defaultUrl")), 1), (0, vue.createElementVNode)("code", {
|
|
9845
9854
|
class: "docs-playground-resource__ellipsis",
|
|
9846
9855
|
title: __props.row.defaultUrl || "-"
|
|
9847
|
-
}, (0, vue.toDisplayString)(__props.row.defaultUrl || "-"), 9, _hoisted_2$
|
|
9856
|
+
}, (0, vue.toDisplayString)(__props.row.defaultUrl || "-"), 9, _hoisted_2$3)])
|
|
9848
9857
|
]),
|
|
9849
|
-
(0, vue.createElementVNode)("label", _hoisted_3$
|
|
9858
|
+
(0, vue.createElementVNode)("label", _hoisted_3$3, (0, vue.toDisplayString)((0, vue.unref)(t)("client.playgroundResource.currentUrl")), 1),
|
|
9850
9859
|
(0, vue.createVNode)((0, vue.unref)(_deot_vc.Textarea), {
|
|
9851
9860
|
modelValue: draft.value,
|
|
9852
9861
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => draft.value = $event),
|
|
@@ -9864,18 +9873,18 @@ var source_editor_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
9864
9873
|
/**
|
|
9865
9874
|
* Playground 资源地址编辑弹层。与搜索/预览一致:单例先销毁旧实例,再打开新会话。
|
|
9866
9875
|
*/
|
|
9867
|
-
var SourceEditor = new _deot_vc.Portal(source_editor_default, {
|
|
9876
|
+
var SourceEditor = new _deot_vc.Portal(source_editor_default$1, {
|
|
9868
9877
|
name: "docs-playground-resource-source-editor",
|
|
9869
9878
|
leaveDelay: 0,
|
|
9870
9879
|
multiple: false
|
|
9871
9880
|
});
|
|
9872
9881
|
//#endregion
|
|
9873
9882
|
//#region packages/client/src/pages/playground-resource/index.vue?vue&type=script&setup=true&lang.ts
|
|
9874
|
-
var _hoisted_1$
|
|
9875
|
-
var _hoisted_2$
|
|
9876
|
-
var _hoisted_3$
|
|
9877
|
-
var _hoisted_4$
|
|
9878
|
-
var _hoisted_5$
|
|
9883
|
+
var _hoisted_1$3 = { class: "docs-playground-resource" };
|
|
9884
|
+
var _hoisted_2$2 = { class: "docs-playground-resource__header" };
|
|
9885
|
+
var _hoisted_3$2 = ["title"];
|
|
9886
|
+
var _hoisted_4$2 = { class: "docs-playground-resource__hint" };
|
|
9887
|
+
var _hoisted_5$2 = { class: "docs-playground-resource__toolbar" };
|
|
9879
9888
|
var _hoisted_6$1 = { class: "docs-playground-resource__toolbar-primary" };
|
|
9880
9889
|
var _hoisted_7$1 = { class: "docs-playground-resource__button-content" };
|
|
9881
9890
|
var _hoisted_8$1 = { class: "docs-playground-resource__button-content" };
|
|
@@ -10109,15 +10118,15 @@ var playground_resource_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
10109
10118
|
SourceEditor.destroy();
|
|
10110
10119
|
});
|
|
10111
10120
|
return (_ctx, _cache) => {
|
|
10112
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("section", _hoisted_1$
|
|
10121
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("section", _hoisted_1$3, [(0, vue.createElementVNode)("header", _hoisted_2$2, [(0, vue.createElementVNode)("div", null, [
|
|
10113
10122
|
(0, vue.createElementVNode)("h1", null, (0, vue.toDisplayString)((0, vue.unref)(t)("client.playgroundResource.title")), 1),
|
|
10114
10123
|
(0, vue.createElementVNode)("p", null, [
|
|
10115
10124
|
(0, vue.createTextVNode)(" deot-docs-playground-resource / resources · " + (0, vue.toDisplayString)((0, vue.unref)(t)("client.playgroundResource.records", { count: rows.value.length })) + " · ", 1),
|
|
10116
|
-
(0, vue.createElementVNode)("span", { title: (0, vue.unref)(currentNamespace) }, (0, vue.toDisplayString)((0, vue.unref)(currentNamespace)), 9, _hoisted_3$
|
|
10125
|
+
(0, vue.createElementVNode)("span", { title: (0, vue.unref)(currentNamespace) }, (0, vue.toDisplayString)((0, vue.unref)(currentNamespace)), 9, _hoisted_3$2),
|
|
10117
10126
|
(0, vue.createTextVNode)(" " + (0, vue.toDisplayString)((0, vue.unref)(t)("client.playgroundResource.cache", { size: namespaceCacheSize.value })), 1)
|
|
10118
10127
|
]),
|
|
10119
|
-
(0, vue.createElementVNode)("p", _hoisted_4$
|
|
10120
|
-
]), (0, vue.createElementVNode)("div", _hoisted_5$
|
|
10128
|
+
(0, vue.createElementVNode)("p", _hoisted_4$2, (0, vue.toDisplayString)((0, vue.unref)(t)("client.playgroundResource.hint")), 1)
|
|
10129
|
+
]), (0, vue.createElementVNode)("div", _hoisted_5$2, [(0, vue.createElementVNode)("div", _hoisted_6$1, [
|
|
10121
10130
|
(0, vue.createVNode)((0, vue.unref)(_deot_vc.Button), {
|
|
10122
10131
|
type: "primary",
|
|
10123
10132
|
disabled: loading.value,
|
|
@@ -10316,195 +10325,699 @@ var playground_resource_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
|
10316
10325
|
}
|
|
10317
10326
|
});
|
|
10318
10327
|
//#endregion
|
|
10319
|
-
//#region packages/client/src/pages/
|
|
10320
|
-
var
|
|
10321
|
-
|
|
10322
|
-
|
|
10323
|
-
|
|
10324
|
-
|
|
10325
|
-
|
|
10326
|
-
|
|
10327
|
-
|
|
10328
|
+
//#region packages/client/src/pages/raw-editor/components/json-editor.vue
|
|
10329
|
+
var json_editor_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
10330
|
+
__name: "json-editor",
|
|
10331
|
+
props: {
|
|
10332
|
+
modelValue: {},
|
|
10333
|
+
label: {}
|
|
10334
|
+
},
|
|
10335
|
+
emits: ["update:modelValue"],
|
|
10336
|
+
setup(__props, { emit: __emit }) {
|
|
10337
|
+
const props = __props;
|
|
10338
|
+
const emit = __emit;
|
|
10339
|
+
const host = (0, vue.ref)();
|
|
10340
|
+
const theme = new _codemirror_state.Compartment();
|
|
10341
|
+
const attributes = new _codemirror_state.Compartment();
|
|
10342
|
+
let editor;
|
|
10343
|
+
const editorTheme = () => codemirror.EditorView.theme({}, { dark: Theme.current.value === "dark" });
|
|
10344
|
+
const editorAttributes = () => codemirror.EditorView.contentAttributes.of({ "aria-label": props.label });
|
|
10345
|
+
(0, vue.onMounted)(() => {
|
|
10346
|
+
editor = new codemirror.EditorView({
|
|
10347
|
+
parent: host.value,
|
|
10348
|
+
state: _codemirror_state.EditorState.create({
|
|
10349
|
+
doc: props.modelValue,
|
|
10350
|
+
extensions: [
|
|
10351
|
+
codemirror.basicSetup,
|
|
10352
|
+
(0, _codemirror_lang_json.json)(),
|
|
10353
|
+
codemirror.EditorView.lineWrapping,
|
|
10354
|
+
theme.of(editorTheme()),
|
|
10355
|
+
attributes.of(editorAttributes()),
|
|
10356
|
+
codemirror.EditorView.updateListener.of((update) => {
|
|
10357
|
+
if (!update.docChanged) return;
|
|
10358
|
+
const value = update.state.doc.toString();
|
|
10359
|
+
if (value !== props.modelValue) emit("update:modelValue", value);
|
|
10360
|
+
})
|
|
10361
|
+
]
|
|
10362
|
+
})
|
|
10363
|
+
});
|
|
10364
|
+
});
|
|
10365
|
+
(0, vue.watch)(() => props.modelValue, (value) => {
|
|
10366
|
+
if (!editor || value === editor.state.doc.toString()) return;
|
|
10367
|
+
editor.dispatch({ changes: {
|
|
10368
|
+
from: 0,
|
|
10369
|
+
to: editor.state.doc.length,
|
|
10370
|
+
insert: value
|
|
10371
|
+
} });
|
|
10372
|
+
});
|
|
10373
|
+
(0, vue.watch)(Theme.current, () => editor?.dispatch({ effects: theme.reconfigure(editorTheme()) }));
|
|
10374
|
+
(0, vue.watch)(() => props.label, () => editor?.dispatch({ effects: attributes.reconfigure(editorAttributes()) }));
|
|
10375
|
+
(0, vue.onBeforeUnmount)(() => editor?.destroy());
|
|
10376
|
+
return (_ctx, _cache) => {
|
|
10377
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_deot_vc.Scroller), {
|
|
10378
|
+
class: "docs-raw-editor-json-editor",
|
|
10379
|
+
native: false,
|
|
10380
|
+
wheel: false,
|
|
10381
|
+
"auto-resize": true,
|
|
10382
|
+
always: true,
|
|
10383
|
+
height: "100%"
|
|
10384
|
+
}, {
|
|
10385
|
+
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("div", {
|
|
10386
|
+
ref_key: "host",
|
|
10387
|
+
ref: host,
|
|
10388
|
+
class: "docs-raw-editor-json-editor__host"
|
|
10389
|
+
}, null, 512)]),
|
|
10390
|
+
_: 1
|
|
10391
|
+
});
|
|
10392
|
+
};
|
|
10393
|
+
}
|
|
10394
|
+
});
|
|
10395
|
+
//#endregion
|
|
10396
|
+
//#region packages/client/src/pages/raw-editor/index.vue?vue&type=script&setup=true&lang.ts
|
|
10397
|
+
var _hoisted_1$2 = { class: "docs-raw-editor" };
|
|
10398
|
+
var _hoisted_2$1 = { class: "docs-raw-editor__import" };
|
|
10399
|
+
var _hoisted_3$1 = { for: "raw-import" };
|
|
10400
|
+
var _hoisted_4$1 = { class: "docs-raw-editor__actions" };
|
|
10401
|
+
var _hoisted_5$1 = ["placeholder"];
|
|
10402
|
+
var _hoisted_6 = ["disabled"];
|
|
10403
|
+
var _hoisted_7 = {
|
|
10328
10404
|
key: 0,
|
|
10329
|
-
role: "alert"
|
|
10330
|
-
|
|
10331
|
-
};
|
|
10332
|
-
var _hoisted_9 = { class: "docs-
|
|
10333
|
-
var _hoisted_10 =
|
|
10334
|
-
var _hoisted_11 =
|
|
10335
|
-
var _hoisted_12 =
|
|
10336
|
-
var _hoisted_13 = {
|
|
10337
|
-
var _hoisted_14 = {
|
|
10405
|
+
role: "alert"
|
|
10406
|
+
};
|
|
10407
|
+
var _hoisted_8 = { for: "raw-target" };
|
|
10408
|
+
var _hoisted_9 = { class: "docs-raw-editor__actions" };
|
|
10409
|
+
var _hoisted_10 = { class: "docs-raw-editor__panels" };
|
|
10410
|
+
var _hoisted_11 = { class: "docs-raw-editor__panel" };
|
|
10411
|
+
var _hoisted_12 = { class: "docs-raw-editor__panel" };
|
|
10412
|
+
var _hoisted_13 = {
|
|
10338
10413
|
key: 0,
|
|
10339
|
-
role: "alert"
|
|
10340
|
-
|
|
10341
|
-
};
|
|
10342
|
-
var _hoisted_15 = { class: "docs-
|
|
10343
|
-
var _hoisted_16 =
|
|
10344
|
-
|
|
10345
|
-
|
|
10346
|
-
var
|
|
10347
|
-
var _hoisted_20 = { key: 0 };
|
|
10348
|
-
//#endregion
|
|
10349
|
-
//#region packages/client/src/pages/preview-config-generate/index.vue
|
|
10350
|
-
var preview_config_generate_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
10414
|
+
role: "alert"
|
|
10415
|
+
};
|
|
10416
|
+
var _hoisted_14 = { id: "raw-link" };
|
|
10417
|
+
var _hoisted_15 = { class: "docs-raw-editor__actions" };
|
|
10418
|
+
var _hoisted_16 = ["href"];
|
|
10419
|
+
//#endregion
|
|
10420
|
+
//#region packages/client/src/pages/raw-editor/index.vue
|
|
10421
|
+
var raw_editor_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
10351
10422
|
__name: "index",
|
|
10352
10423
|
setup(__props) {
|
|
10353
10424
|
const route = (0, vue_router.useRoute)();
|
|
10354
|
-
const docs = getDocsConfig();
|
|
10355
10425
|
const { t } = (0, _deot_docs_locale.useLocale)();
|
|
10356
|
-
const
|
|
10357
|
-
|
|
10358
|
-
|
|
10359
|
-
}, ...Object.entries(docs.locales).map(([value, item]) => ({
|
|
10360
|
-
value,
|
|
10361
|
-
label: item.label || value
|
|
10362
|
-
}))]);
|
|
10363
|
-
const defaults = {
|
|
10364
|
-
url: "",
|
|
10365
|
-
styles: "[]",
|
|
10366
|
-
modules: "{}",
|
|
10367
|
-
playground: "{}",
|
|
10368
|
-
lang: ""
|
|
10369
|
-
};
|
|
10370
|
-
const form = (0, vue.reactive)({ ...defaults });
|
|
10371
|
-
const jsonFields = [
|
|
10372
|
-
"styles",
|
|
10373
|
-
"modules",
|
|
10374
|
-
"playground"
|
|
10375
|
-
];
|
|
10426
|
+
const base = getDocsDeploymentBase(getDocsConfig());
|
|
10427
|
+
const jsonText = (0, vue.ref)("{}");
|
|
10428
|
+
const target = (0, vue.ref)("__docs/preview");
|
|
10376
10429
|
const importUrl = (0, vue.ref)("");
|
|
10377
10430
|
const parseError = (0, vue.ref)("");
|
|
10378
|
-
const messageOf = (
|
|
10431
|
+
const messageOf = (error) => error instanceof Error ? error.message : String(error);
|
|
10379
10432
|
const result = (0, vue.computed)(() => {
|
|
10380
10433
|
try {
|
|
10381
|
-
const config = normalizePreviewConfig({
|
|
10382
|
-
url: form.url,
|
|
10383
|
-
lang: form.lang,
|
|
10384
|
-
...Object.fromEntries(jsonFields.map((field) => [field, JSON.parse(form[field])]))
|
|
10385
|
-
});
|
|
10386
|
-
if (!resolvePreviewType(config.url, location.href)) throw new TypeError(t("client.common.previewUrlUnsupported"));
|
|
10387
|
-
parsePreviewStyleUrls(config.styles, location.href);
|
|
10388
10434
|
return {
|
|
10389
|
-
|
|
10390
|
-
href: createPreviewUrl(config, getDocsDeploymentBase(docs)),
|
|
10435
|
+
href: createRawUrl(JSON.parse(jsonText.value), target.value, base),
|
|
10391
10436
|
error: ""
|
|
10392
10437
|
};
|
|
10393
|
-
} catch (
|
|
10438
|
+
} catch (error) {
|
|
10394
10439
|
return {
|
|
10395
|
-
config: void 0,
|
|
10396
10440
|
href: "",
|
|
10397
|
-
error:
|
|
10441
|
+
error: t("client.rawEditor.invalid", { message: messageOf(error) })
|
|
10398
10442
|
};
|
|
10399
10443
|
}
|
|
10400
10444
|
});
|
|
10401
10445
|
const applyQuery = (query) => {
|
|
10402
10446
|
try {
|
|
10403
|
-
|
|
10404
|
-
if (
|
|
10405
|
-
|
|
10406
|
-
form.lang = config.lang || "";
|
|
10407
|
-
jsonFields.forEach((field) => form[field] = JSON.stringify(config[field] || {}, null, 2));
|
|
10447
|
+
if (typeof query.target === "string") target.value = query.target;
|
|
10448
|
+
if (query.raw !== void 0) jsonText.value = JSON.stringify(readRaw(query.raw), null, 2);
|
|
10449
|
+
else if (query.url !== void 0) jsonText.value = JSON.stringify(readPreviewConfig(query), null, 2);
|
|
10408
10450
|
parseError.value = "";
|
|
10409
|
-
} catch (
|
|
10410
|
-
parseError.value = messageOf(
|
|
10451
|
+
} catch (error) {
|
|
10452
|
+
parseError.value = t("client.rawEditor.invalid", { message: messageOf(error) });
|
|
10411
10453
|
}
|
|
10412
10454
|
};
|
|
10413
10455
|
const parseLink = () => {
|
|
10414
10456
|
try {
|
|
10415
|
-
const
|
|
10457
|
+
const url = new URL(importUrl.value.trim(), base);
|
|
10458
|
+
if (!/^https?:$/.test(url.protocol)) throw new TypeError("Invalid HTTP(S) URL");
|
|
10416
10459
|
const query = {};
|
|
10417
|
-
|
|
10418
|
-
const values =
|
|
10460
|
+
url.searchParams.forEach((_, key) => {
|
|
10461
|
+
const values = url.searchParams.getAll(key);
|
|
10419
10462
|
query[key] = values.length === 1 ? values[0] : values;
|
|
10420
10463
|
});
|
|
10421
|
-
|
|
10422
|
-
|
|
10423
|
-
|
|
10464
|
+
if (query.raw === void 0 && query.url === void 0) throw new TypeError("raw or url is required");
|
|
10465
|
+
const value = query.raw !== void 0 ? readRaw(query.raw) : readPreviewConfig(query);
|
|
10466
|
+
url.searchParams.delete("raw");
|
|
10467
|
+
jsonText.value = JSON.stringify(value, null, 2);
|
|
10468
|
+
target.value = url.href;
|
|
10469
|
+
parseError.value = "";
|
|
10470
|
+
} catch (error) {
|
|
10471
|
+
parseError.value = t("client.rawEditor.invalid", { message: messageOf(error) });
|
|
10424
10472
|
}
|
|
10425
10473
|
};
|
|
10426
|
-
(0, vue.watch)(() => route.query,
|
|
10427
|
-
if (query.raw !== void 0 || query.url !== void 0) applyQuery(query);
|
|
10428
|
-
}, { immediate: true });
|
|
10474
|
+
(0, vue.watch)(() => route.query, applyQuery, { immediate: true });
|
|
10429
10475
|
return (_ctx, _cache) => {
|
|
10430
|
-
return (0, vue.openBlock)(), (0, vue.createElementBlock)("section", _hoisted_1, [
|
|
10431
|
-
(0, vue.createElementVNode)("header", null, [(0, vue.createElementVNode)("h1", null, (0, vue.toDisplayString)((0, vue.unref)(t)("client.
|
|
10432
|
-
(0, vue.createElementVNode)("div",
|
|
10433
|
-
(0, vue.createElementVNode)("label",
|
|
10434
|
-
(0, vue.createElementVNode)("div",
|
|
10435
|
-
id: "
|
|
10476
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("section", _hoisted_1$2, [
|
|
10477
|
+
(0, vue.createElementVNode)("header", null, [(0, vue.createElementVNode)("h1", null, (0, vue.toDisplayString)((0, vue.unref)(t)("client.rawEditor.title")), 1), (0, vue.createElementVNode)("p", null, (0, vue.toDisplayString)((0, vue.unref)(t)("client.rawEditor.description")), 1)]),
|
|
10478
|
+
(0, vue.createElementVNode)("div", _hoisted_2$1, [
|
|
10479
|
+
(0, vue.createElementVNode)("label", _hoisted_3$1, (0, vue.toDisplayString)((0, vue.unref)(t)("client.rawEditor.importLabel")), 1),
|
|
10480
|
+
(0, vue.createElementVNode)("div", _hoisted_4$1, [(0, vue.withDirectives)((0, vue.createElementVNode)("input", {
|
|
10481
|
+
id: "raw-import",
|
|
10436
10482
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => importUrl.value = $event),
|
|
10437
|
-
|
|
10438
|
-
|
|
10439
|
-
}, null, 8, _hoisted_6), [[vue.vModelText, importUrl.value]]), (0, vue.createElementVNode)("button", {
|
|
10483
|
+
placeholder: (0, vue.unref)(t)("client.rawEditor.parseHint")
|
|
10484
|
+
}, null, 8, _hoisted_5$1), [[vue.vModelText, importUrl.value]]), (0, vue.createElementVNode)("button", {
|
|
10440
10485
|
type: "button",
|
|
10441
10486
|
disabled: !importUrl.value.trim(),
|
|
10442
10487
|
onClick: parseLink
|
|
10443
|
-
}, (0, vue.toDisplayString)((0, vue.unref)(t)("client.
|
|
10444
|
-
parseError.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("p",
|
|
10488
|
+
}, (0, vue.toDisplayString)((0, vue.unref)(t)("client.rawEditor.parse")), 9, _hoisted_6)]),
|
|
10489
|
+
parseError.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("p", _hoisted_7, (0, vue.toDisplayString)(parseError.value), 1)) : (0, vue.createCommentVNode)("v-if", true)
|
|
10445
10490
|
]),
|
|
10491
|
+
(0, vue.createElementVNode)("label", _hoisted_8, (0, vue.toDisplayString)((0, vue.unref)(t)("client.rawEditor.target")), 1),
|
|
10446
10492
|
(0, vue.createElementVNode)("div", _hoisted_9, [
|
|
10447
|
-
_cache[3] || (_cache[3] = (0, vue.createElementVNode)("label", { for: "preview-url" }, "url", -1)),
|
|
10448
10493
|
(0, vue.withDirectives)((0, vue.createElementVNode)("input", {
|
|
10449
|
-
id: "
|
|
10450
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) =>
|
|
10451
|
-
|
|
10452
|
-
|
|
10453
|
-
|
|
10454
|
-
|
|
10455
|
-
|
|
10456
|
-
|
|
10457
|
-
|
|
10458
|
-
|
|
10459
|
-
|
|
10460
|
-
rows: "4",
|
|
10461
|
-
spellcheck: "false"
|
|
10462
|
-
}, null, 8, _hoisted_12), [[vue.vModelText, form[field]]]),
|
|
10463
|
-
(0, vue.createElementVNode)("p", null, (0, vue.toDisplayString)((0, vue.unref)(t)(`client.previewConfigGenerate.${field}Hint`)), 1)
|
|
10464
|
-
], 64);
|
|
10465
|
-
}), 64)),
|
|
10466
|
-
(0, vue.createElementVNode)("label", _hoisted_13, (0, vue.toDisplayString)((0, vue.unref)(t)("client.previewConfigGenerate.language")), 1),
|
|
10467
|
-
(0, vue.createVNode)((0, vue.unref)(_deot_vc.Select), {
|
|
10468
|
-
id: "preview-lang",
|
|
10469
|
-
modelValue: form.lang,
|
|
10470
|
-
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => form.lang = $event),
|
|
10471
|
-
class: "docs-preview-config-generate__select",
|
|
10472
|
-
data: languageOptions.value,
|
|
10473
|
-
"null-value": "",
|
|
10474
|
-
placeholder: (0, vue.unref)(t)("client.previewConfigGenerate.defaultLanguage")
|
|
10475
|
-
}, null, 8, [
|
|
10476
|
-
"modelValue",
|
|
10477
|
-
"data",
|
|
10478
|
-
"placeholder"
|
|
10479
|
-
])
|
|
10494
|
+
id: "raw-target",
|
|
10495
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => target.value = $event)
|
|
10496
|
+
}, null, 512), [[vue.vModelText, target.value]]),
|
|
10497
|
+
(0, vue.createElementVNode)("button", {
|
|
10498
|
+
type: "button",
|
|
10499
|
+
onClick: _cache[2] || (_cache[2] = ($event) => target.value = "__docs/preview")
|
|
10500
|
+
}, "preview"),
|
|
10501
|
+
(0, vue.createElementVNode)("button", {
|
|
10502
|
+
type: "button",
|
|
10503
|
+
onClick: _cache[3] || (_cache[3] = ($event) => target.value = "__docs/markdown-editor")
|
|
10504
|
+
}, "markdown-editor")
|
|
10480
10505
|
]),
|
|
10481
|
-
|
|
10482
|
-
|
|
10483
|
-
|
|
10484
|
-
(0, vue.
|
|
10485
|
-
|
|
10486
|
-
|
|
10487
|
-
|
|
10488
|
-
|
|
10489
|
-
|
|
10490
|
-
|
|
10491
|
-
|
|
10506
|
+
(0, vue.createElementVNode)("div", _hoisted_10, [(0, vue.createElementVNode)("div", _hoisted_11, [(0, vue.createElementVNode)("label", null, (0, vue.toDisplayString)((0, vue.unref)(t)("client.rawEditor.json")), 1), (0, vue.createVNode)(json_editor_default, {
|
|
10507
|
+
modelValue: jsonText.value,
|
|
10508
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => jsonText.value = $event),
|
|
10509
|
+
label: (0, vue.unref)(t)("client.rawEditor.json")
|
|
10510
|
+
}, null, 8, ["modelValue", "label"])]), (0, vue.createElementVNode)("div", _hoisted_12, [
|
|
10511
|
+
(0, vue.createElementVNode)("label", null, (0, vue.toDisplayString)((0, vue.unref)(t)("client.rawEditor.link")), 1),
|
|
10512
|
+
result.value.error ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("p", _hoisted_13, (0, vue.toDisplayString)(result.value.error), 1)) : (0, vue.createCommentVNode)("v-if", true),
|
|
10513
|
+
(0, vue.createVNode)((0, vue.unref)(_deot_vc.Scroller), {
|
|
10514
|
+
native: false,
|
|
10515
|
+
"auto-resize": true,
|
|
10516
|
+
class: "docs-raw-editor__output"
|
|
10517
|
+
}, {
|
|
10518
|
+
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("pre", _hoisted_14, (0, vue.toDisplayString)(result.value.href), 1)]),
|
|
10519
|
+
_: 1
|
|
10520
|
+
}),
|
|
10521
|
+
(0, vue.createElementVNode)("div", _hoisted_15, [(0, vue.createVNode)((0, vue.unref)(_deot_vc.Clipboard), {
|
|
10492
10522
|
tag: "button",
|
|
10493
10523
|
type: "button",
|
|
10494
10524
|
value: result.value.href,
|
|
10495
10525
|
disabled: !result.value.href
|
|
10496
10526
|
}, {
|
|
10497
|
-
default: (0, vue.withCtx)(() => [(0, vue.createTextVNode)((0, vue.toDisplayString)((0, vue.unref)(t)("client.
|
|
10527
|
+
default: (0, vue.withCtx)(() => [(0, vue.createTextVNode)((0, vue.toDisplayString)((0, vue.unref)(t)("client.rawEditor.copy")), 1)]),
|
|
10498
10528
|
_: 1
|
|
10499
10529
|
}, 8, ["value", "disabled"]), result.value.href ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("a", {
|
|
10500
10530
|
key: 0,
|
|
10501
10531
|
href: result.value.href,
|
|
10502
10532
|
target: "_blank",
|
|
10503
10533
|
rel: "noopener"
|
|
10504
|
-
}, (0, vue.toDisplayString)((0, vue.unref)(t)("client.
|
|
10505
|
-
|
|
10506
|
-
|
|
10507
|
-
|
|
10534
|
+
}, (0, vue.toDisplayString)((0, vue.unref)(t)("client.rawEditor.open")), 9, _hoisted_16)) : (0, vue.createCommentVNode)("v-if", true)])
|
|
10535
|
+
])])
|
|
10536
|
+
]);
|
|
10537
|
+
};
|
|
10538
|
+
}
|
|
10539
|
+
});
|
|
10540
|
+
//#endregion
|
|
10541
|
+
//#region packages/client/src/pages/markdown-editor/components/source-editor.vue
|
|
10542
|
+
var source_editor_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
10543
|
+
__name: "source-editor",
|
|
10544
|
+
props: {
|
|
10545
|
+
modelValue: {},
|
|
10546
|
+
label: {}
|
|
10547
|
+
},
|
|
10548
|
+
emits: ["update:modelValue", "scroll"],
|
|
10549
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
10550
|
+
const props = __props;
|
|
10551
|
+
const emit = __emit;
|
|
10552
|
+
const host = (0, vue.ref)();
|
|
10553
|
+
const scroller = (0, vue.ref)();
|
|
10554
|
+
const theme = new _codemirror_state.Compartment();
|
|
10555
|
+
const attributes = new _codemirror_state.Compartment();
|
|
10556
|
+
let editor;
|
|
10557
|
+
const editorTheme = () => codemirror.EditorView.theme({}, { dark: Theme.current.value === "dark" });
|
|
10558
|
+
const editorAttributes = () => codemirror.EditorView.contentAttributes.of({ "aria-label": props.label });
|
|
10559
|
+
(0, vue.onMounted)(() => {
|
|
10560
|
+
editor = new codemirror.EditorView({
|
|
10561
|
+
parent: host.value,
|
|
10562
|
+
state: _codemirror_state.EditorState.create({
|
|
10563
|
+
doc: props.modelValue,
|
|
10564
|
+
extensions: [
|
|
10565
|
+
codemirror.basicSetup,
|
|
10566
|
+
(0, _codemirror_lang_markdown.markdown)(),
|
|
10567
|
+
codemirror.EditorView.lineWrapping,
|
|
10568
|
+
theme.of(editorTheme()),
|
|
10569
|
+
attributes.of(editorAttributes()),
|
|
10570
|
+
codemirror.EditorView.updateListener.of((update) => {
|
|
10571
|
+
if (!update.docChanged) return;
|
|
10572
|
+
const value = update.state.doc.toString();
|
|
10573
|
+
if (value !== props.modelValue) emit("update:modelValue", value);
|
|
10574
|
+
})
|
|
10575
|
+
]
|
|
10576
|
+
})
|
|
10577
|
+
});
|
|
10578
|
+
});
|
|
10579
|
+
(0, vue.watch)(() => props.modelValue, (value) => {
|
|
10580
|
+
if (!editor || value === editor.state.doc.toString()) return;
|
|
10581
|
+
editor.dispatch({ changes: {
|
|
10582
|
+
from: 0,
|
|
10583
|
+
to: editor.state.doc.length,
|
|
10584
|
+
insert: value
|
|
10585
|
+
} });
|
|
10586
|
+
});
|
|
10587
|
+
(0, vue.watch)(Theme.current, () => editor?.dispatch({ effects: theme.reconfigure(editorTheme()) }));
|
|
10588
|
+
(0, vue.watch)(() => props.label, () => editor?.dispatch({ effects: attributes.reconfigure(editorAttributes()) }));
|
|
10589
|
+
(0, vue.onBeforeUnmount)(() => editor?.destroy());
|
|
10590
|
+
__expose({
|
|
10591
|
+
getScrollElement: () => scroller.value?.$el,
|
|
10592
|
+
getLineTop: (line) => editor?.lineBlockAt(editor.state.doc.line(line).from).top ?? 0,
|
|
10593
|
+
setScrollTop: (top) => scroller.value?.setScrollTop(top)
|
|
10594
|
+
});
|
|
10595
|
+
return (_ctx, _cache) => {
|
|
10596
|
+
return (0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_deot_vc.Scroller), {
|
|
10597
|
+
ref_key: "scroller",
|
|
10598
|
+
ref: scroller,
|
|
10599
|
+
class: "docs-markdown-editor-source-editor",
|
|
10600
|
+
native: false,
|
|
10601
|
+
wheel: false,
|
|
10602
|
+
"auto-resize": true,
|
|
10603
|
+
always: true,
|
|
10604
|
+
height: "100%",
|
|
10605
|
+
onScroll: _cache[0] || (_cache[0] = ($event) => emit("scroll"))
|
|
10606
|
+
}, {
|
|
10607
|
+
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("div", {
|
|
10608
|
+
ref_key: "host",
|
|
10609
|
+
ref: host,
|
|
10610
|
+
class: "docs-markdown-editor-source-editor__host"
|
|
10611
|
+
}, null, 512)]),
|
|
10612
|
+
_: 1
|
|
10613
|
+
}, 512);
|
|
10614
|
+
};
|
|
10615
|
+
}
|
|
10616
|
+
});
|
|
10617
|
+
//#endregion
|
|
10618
|
+
//#region packages/client/src/pages/markdown-editor/components/pane-divider.vue?vue&type=script&setup=true&lang.ts
|
|
10619
|
+
var _hoisted_1$1 = ["aria-label", "aria-valuenow"];
|
|
10620
|
+
//#endregion
|
|
10621
|
+
//#region packages/client/src/pages/markdown-editor/components/pane-divider.vue
|
|
10622
|
+
var pane_divider_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
10623
|
+
__name: "pane-divider",
|
|
10624
|
+
props: { modelValue: {} },
|
|
10625
|
+
emits: ["update:modelValue"],
|
|
10626
|
+
setup(__props, { emit: __emit }) {
|
|
10627
|
+
const props = __props;
|
|
10628
|
+
const emit = __emit;
|
|
10629
|
+
const { t } = (0, _deot_docs_locale.useLocale)();
|
|
10630
|
+
const dragging = (0, vue.ref)(false);
|
|
10631
|
+
let startX = 0;
|
|
10632
|
+
let startValue = 50;
|
|
10633
|
+
const change = (value) => emit("update:modelValue", Math.min(80, Math.max(20, value)));
|
|
10634
|
+
const start = (event) => {
|
|
10635
|
+
if (event.button !== 0) return;
|
|
10636
|
+
startX = event.clientX;
|
|
10637
|
+
startValue = props.modelValue;
|
|
10638
|
+
dragging.value = true;
|
|
10639
|
+
event.currentTarget.setPointerCapture(event.pointerId);
|
|
10640
|
+
};
|
|
10641
|
+
const move = (event) => {
|
|
10642
|
+
if (!dragging.value) return;
|
|
10643
|
+
const divider = event.currentTarget;
|
|
10644
|
+
const width = divider.parentElement.clientWidth - divider.offsetWidth;
|
|
10645
|
+
change(startValue + (event.clientX - startX) / width * 100);
|
|
10646
|
+
};
|
|
10647
|
+
return (_ctx, _cache) => {
|
|
10648
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", {
|
|
10649
|
+
class: (0, vue.normalizeClass)(["docs-markdown-editor-pane-divider", { "is-dragging": dragging.value }]),
|
|
10650
|
+
role: "separator",
|
|
10651
|
+
tabindex: "0",
|
|
10652
|
+
"aria-orientation": "vertical",
|
|
10653
|
+
"aria-label": (0, vue.unref)(t)("client.markdownEditor.resize"),
|
|
10654
|
+
"aria-valuenow": Math.round(__props.modelValue),
|
|
10655
|
+
"aria-valuemin": "20",
|
|
10656
|
+
"aria-valuemax": "80",
|
|
10657
|
+
onPointerdown: (0, vue.withModifiers)(start, ["prevent"]),
|
|
10658
|
+
onPointermove: move,
|
|
10659
|
+
onPointerup: _cache[0] || (_cache[0] = ($event) => dragging.value = false),
|
|
10660
|
+
onPointercancel: _cache[1] || (_cache[1] = ($event) => dragging.value = false),
|
|
10661
|
+
onLostpointercapture: _cache[2] || (_cache[2] = ($event) => dragging.value = false),
|
|
10662
|
+
onKeydown: [_cache[3] || (_cache[3] = (0, vue.withKeys)((0, vue.withModifiers)(($event) => change(__props.modelValue - 2), ["prevent"]), ["left"])), _cache[4] || (_cache[4] = (0, vue.withKeys)((0, vue.withModifiers)(($event) => change(__props.modelValue + 2), ["prevent"]), ["right"]))]
|
|
10663
|
+
}, null, 42, _hoisted_1$1);
|
|
10664
|
+
};
|
|
10665
|
+
}
|
|
10666
|
+
});
|
|
10667
|
+
//#endregion
|
|
10668
|
+
//#region packages/client/src/pages/markdown-editor/index.vue?vue&type=script&setup=true&lang.ts
|
|
10669
|
+
var _hoisted_1 = { class: "docs-markdown-editor" };
|
|
10670
|
+
var _hoisted_2 = { class: "docs-markdown-editor__toolbar" };
|
|
10671
|
+
var _hoisted_3 = ["disabled"];
|
|
10672
|
+
var _hoisted_4 = {
|
|
10673
|
+
key: 0,
|
|
10674
|
+
class: "docs-markdown-editor__status",
|
|
10675
|
+
role: "status"
|
|
10676
|
+
};
|
|
10677
|
+
var _hoisted_5 = {
|
|
10678
|
+
key: 1,
|
|
10679
|
+
class: "docs-markdown-editor__status",
|
|
10680
|
+
role: "alert"
|
|
10681
|
+
};
|
|
10682
|
+
var SAMPLE = "# Markdown\n\n## Hello\n\nEdit **Markdown** and preview it here.\n\n| Name | Value |\n| --- | --- |\n| Markdown | Live preview |\n\n```js\nconsole.log(\"Hello Markdown\");\n```\n";
|
|
10683
|
+
//#endregion
|
|
10684
|
+
//#region packages/client/src/pages/markdown-editor/index.vue
|
|
10685
|
+
var markdown_editor_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
10686
|
+
__name: "index",
|
|
10687
|
+
setup(__props) {
|
|
10688
|
+
const route = (0, vue_router.useRoute)();
|
|
10689
|
+
const docs = getDocsConfig();
|
|
10690
|
+
const base = getDocsDeploymentBase(docs);
|
|
10691
|
+
const namespace = getDocsNamespace(docs);
|
|
10692
|
+
const { locale, t } = (0, _deot_docs_locale.useLocale)();
|
|
10693
|
+
const lang = (0, vue.computed)(() => String(route.params.lang || locale.value.name));
|
|
10694
|
+
const messageOf = (reason) => reason instanceof Error ? reason.message : String(reason);
|
|
10695
|
+
const preview = (0, vue.computed)(() => {
|
|
10696
|
+
try {
|
|
10697
|
+
return {
|
|
10698
|
+
config: readPreviewConfig(route.query),
|
|
10699
|
+
error: ""
|
|
10700
|
+
};
|
|
10701
|
+
} catch (reason) {
|
|
10702
|
+
return {
|
|
10703
|
+
config: void 0,
|
|
10704
|
+
error: messageOf(reason)
|
|
10705
|
+
};
|
|
10706
|
+
}
|
|
10707
|
+
});
|
|
10708
|
+
const markdownDefaults = (0, vue.computed)(() => resolveDocsMarkdownComponent(docs));
|
|
10709
|
+
const playgroundDefaults = (0, vue.computed)(() => {
|
|
10710
|
+
const site = resolveDocsPlaygroundComponent(docs);
|
|
10711
|
+
const config = preview.value.config;
|
|
10712
|
+
return {
|
|
10713
|
+
...site,
|
|
10714
|
+
...config?.playground,
|
|
10715
|
+
options: {
|
|
10716
|
+
...site.options,
|
|
10717
|
+
builtinImportMap: {
|
|
10718
|
+
...site.options?.builtinImportMap,
|
|
10719
|
+
imports: {
|
|
10720
|
+
...site.options?.builtinImportMap?.imports,
|
|
10721
|
+
...config?.modules
|
|
10722
|
+
}
|
|
10723
|
+
}
|
|
10724
|
+
}
|
|
10725
|
+
};
|
|
10726
|
+
});
|
|
10727
|
+
const text = (0, vue.ref)(SAMPLE);
|
|
10728
|
+
const previewSource = (0, vue.ref)(SAMPLE);
|
|
10729
|
+
const renderedSource = (0, vue.ref)();
|
|
10730
|
+
const sourceBase = (0, vue.ref)(base);
|
|
10731
|
+
const documentKey = (0, vue.ref)(0);
|
|
10732
|
+
const loading = (0, vue.ref)(false);
|
|
10733
|
+
const exporting = (0, vue.ref)(false);
|
|
10734
|
+
const error = (0, vue.ref)("");
|
|
10735
|
+
const styleError = (0, vue.ref)("");
|
|
10736
|
+
const syncEnabled = (0, vue.ref)(false);
|
|
10737
|
+
const editorRatio = (0, vue.ref)(50);
|
|
10738
|
+
const fileInput = (0, vue.ref)();
|
|
10739
|
+
const editor = (0, vue.ref)();
|
|
10740
|
+
const previewScroller = (0, vue.ref)();
|
|
10741
|
+
const article = (0, vue.ref)();
|
|
10742
|
+
let initialText = SAMPLE;
|
|
10743
|
+
let generation = 0;
|
|
10744
|
+
let previewTimer;
|
|
10745
|
+
let draftTimer;
|
|
10746
|
+
let scrollSource = "editor";
|
|
10747
|
+
let sourceLines = [];
|
|
10748
|
+
const syncScroll = (side = scrollSource) => {
|
|
10749
|
+
if (!syncEnabled.value || side !== scrollSource || renderedSource.value !== text.value) return;
|
|
10750
|
+
const panes = {
|
|
10751
|
+
editor: {
|
|
10752
|
+
element: editor.value?.getScrollElement(),
|
|
10753
|
+
view: editor.value
|
|
10754
|
+
},
|
|
10755
|
+
preview: {
|
|
10756
|
+
element: previewScroller.value?.$el,
|
|
10757
|
+
view: previewScroller.value
|
|
10758
|
+
}
|
|
10759
|
+
};
|
|
10760
|
+
const from = panes[side].element;
|
|
10761
|
+
const to = panes[side === "editor" ? "preview" : "editor"];
|
|
10762
|
+
if (!from || !to.element) return;
|
|
10763
|
+
const end = {
|
|
10764
|
+
editor: Math.max(0, panes.editor.element.scrollHeight - panes.editor.element.clientHeight),
|
|
10765
|
+
preview: Math.max(0, panes.preview.element.scrollHeight - panes.preview.element.clientHeight)
|
|
10766
|
+
};
|
|
10767
|
+
const points = [{
|
|
10768
|
+
editor: 0,
|
|
10769
|
+
preview: 0
|
|
10770
|
+
}];
|
|
10771
|
+
const content = article.value?.querySelector(".docs-markdown-reset");
|
|
10772
|
+
const origin = content?.getBoundingClientRect().top || 0;
|
|
10773
|
+
content && [...content.children].forEach((block, index) => {
|
|
10774
|
+
const line = sourceLines[index];
|
|
10775
|
+
if (!line) return;
|
|
10776
|
+
const point = {
|
|
10777
|
+
editor: editor.value.getLineTop(line),
|
|
10778
|
+
preview: block.getBoundingClientRect().top - origin
|
|
10779
|
+
};
|
|
10780
|
+
const previous = points[points.length - 1];
|
|
10781
|
+
if (point.editor > previous.editor && point.preview > previous.preview && point.editor < end.editor && point.preview < end.preview) points.push(point);
|
|
10782
|
+
});
|
|
10783
|
+
points.push(end);
|
|
10784
|
+
let index = 1;
|
|
10785
|
+
while (index < points.length - 1 && points[index][side] <= from.scrollTop) index++;
|
|
10786
|
+
const start = points[index - 1];
|
|
10787
|
+
const finish = points[index];
|
|
10788
|
+
const progress = (from.scrollTop - start[side]) / (finish[side] - start[side] || 1);
|
|
10789
|
+
const other = side === "editor" ? "preview" : "editor";
|
|
10790
|
+
const top = start[other] + progress * (finish[other] - start[other]);
|
|
10791
|
+
if (Math.abs(to.element.scrollTop - top) <= 1) return;
|
|
10792
|
+
to.view?.setScrollTop(top);
|
|
10793
|
+
};
|
|
10794
|
+
const saveDraft = () => {
|
|
10795
|
+
if (draftTimer === void 0) return;
|
|
10796
|
+
clearTimeout(draftTimer);
|
|
10797
|
+
draftTimer = void 0;
|
|
10798
|
+
Settings.set(namespace, "markdown-editor:draft", {
|
|
10799
|
+
text: text.value,
|
|
10800
|
+
base: sourceBase.value
|
|
10801
|
+
}).catch(() => {});
|
|
10802
|
+
};
|
|
10803
|
+
const scheduleDraft = () => {
|
|
10804
|
+
clearTimeout(draftTimer);
|
|
10805
|
+
draftTimer = setTimeout(saveDraft, 300);
|
|
10806
|
+
};
|
|
10807
|
+
const replaceDocument = (value, resourceBase, initial = value) => {
|
|
10808
|
+
clearTimeout(previewTimer);
|
|
10809
|
+
text.value = previewSource.value = value;
|
|
10810
|
+
sourceBase.value = resourceBase;
|
|
10811
|
+
initialText = initial;
|
|
10812
|
+
documentKey.value++;
|
|
10813
|
+
scrollSource = "editor";
|
|
10814
|
+
(0, vue.nextTick)(() => previewScroller.value?.setScrollTop(0));
|
|
10815
|
+
};
|
|
10816
|
+
const edit = (value) => {
|
|
10817
|
+
generation++;
|
|
10818
|
+
loading.value = false;
|
|
10819
|
+
text.value = value;
|
|
10820
|
+
error.value = "";
|
|
10821
|
+
clearTimeout(previewTimer);
|
|
10822
|
+
previewTimer = setTimeout(() => previewSource.value = text.value, 150);
|
|
10823
|
+
scheduleDraft();
|
|
10824
|
+
};
|
|
10825
|
+
const load = async () => {
|
|
10826
|
+
saveDraft();
|
|
10827
|
+
const token = ++generation;
|
|
10828
|
+
error.value = "";
|
|
10829
|
+
const config = preview.value.config;
|
|
10830
|
+
loading.value = Boolean(config);
|
|
10831
|
+
if (!config) return;
|
|
10832
|
+
try {
|
|
10833
|
+
if (config.url) {
|
|
10834
|
+
const resolved = await resolveResource(docs, {
|
|
10835
|
+
source: config.url,
|
|
10836
|
+
type: "markdown",
|
|
10837
|
+
lang: lang.value
|
|
10838
|
+
});
|
|
10839
|
+
const url = new URL(resolved, base).href;
|
|
10840
|
+
const record = await Gateway.revalidate(createResourceIdentity(docs, lang.value, "markdown", config.url), {
|
|
10841
|
+
url,
|
|
10842
|
+
priority: 100
|
|
10843
|
+
});
|
|
10844
|
+
if (token === generation) replaceDocument(record.content, url);
|
|
10845
|
+
} else {
|
|
10846
|
+
const draft = await Settings.get(namespace, "markdown-editor:draft");
|
|
10847
|
+
if (token === generation) replaceDocument(draft?.text ?? SAMPLE, draft?.base || base, SAMPLE);
|
|
10848
|
+
}
|
|
10849
|
+
} catch (reason) {
|
|
10850
|
+
if (token === generation) error.value = messageOf(reason);
|
|
10851
|
+
} finally {
|
|
10852
|
+
if (token === generation) loading.value = false;
|
|
10853
|
+
}
|
|
10854
|
+
};
|
|
10855
|
+
const openFile = async (event) => {
|
|
10856
|
+
const input = event.target;
|
|
10857
|
+
const file = input.files?.[0];
|
|
10858
|
+
input.value = "";
|
|
10859
|
+
if (!file) return;
|
|
10860
|
+
generation++;
|
|
10861
|
+
error.value = "";
|
|
10862
|
+
loading.value = true;
|
|
10863
|
+
replaceDocument(await file.text(), base);
|
|
10864
|
+
loading.value = false;
|
|
10865
|
+
scheduleDraft();
|
|
10866
|
+
};
|
|
10867
|
+
const reset = () => {
|
|
10868
|
+
if (text.value !== initialText && !window.confirm(t("client.markdownEditor.confirmReset"))) return;
|
|
10869
|
+
generation++;
|
|
10870
|
+
loading.value = false;
|
|
10871
|
+
error.value = "";
|
|
10872
|
+
replaceDocument(initialText, sourceBase.value);
|
|
10873
|
+
scheduleDraft();
|
|
10874
|
+
};
|
|
10875
|
+
const onRendered = (source, lines) => {
|
|
10876
|
+
renderedSource.value = source;
|
|
10877
|
+
sourceLines = lines;
|
|
10878
|
+
article.value?.querySelectorAll("img[src], a[href]").forEach((node) => {
|
|
10879
|
+
const attr = node instanceof HTMLImageElement ? "src" : "href";
|
|
10880
|
+
const value = node.getAttribute(attr);
|
|
10881
|
+
if (!value || value.startsWith("#")) return;
|
|
10882
|
+
try {
|
|
10883
|
+
node.setAttribute(attr, new URL(value, sourceBase.value).href);
|
|
10884
|
+
} catch {}
|
|
10885
|
+
});
|
|
10886
|
+
syncScroll();
|
|
10887
|
+
};
|
|
10888
|
+
const exportPdf = async () => {
|
|
10889
|
+
exporting.value = true;
|
|
10890
|
+
await Promise.all([document.fonts?.ready, ...[...article.value?.querySelectorAll("img") || []].map((img) => img.decode?.().catch(() => {}))]);
|
|
10891
|
+
window.print();
|
|
10892
|
+
exporting.value = false;
|
|
10893
|
+
};
|
|
10894
|
+
(0, vue.watch)([
|
|
10895
|
+
() => preview.value.config?.url,
|
|
10896
|
+
() => preview.value.error,
|
|
10897
|
+
lang
|
|
10898
|
+
], load, { immediate: true });
|
|
10899
|
+
(0, vue.watch)(() => preview.value.config?.styles, (styles, _, onCleanup) => {
|
|
10900
|
+
styleError.value = "";
|
|
10901
|
+
try {
|
|
10902
|
+
onCleanup(acquirePreviewStyles(parsePreviewStyleUrls(styles, base), (url) => styleError.value = t("client.common.previewStyleFailed", { url })));
|
|
10903
|
+
} catch (reason) {
|
|
10904
|
+
styleError.value = messageOf(reason);
|
|
10905
|
+
}
|
|
10906
|
+
}, { immediate: true });
|
|
10907
|
+
(0, vue.watch)(syncEnabled, (value) => {
|
|
10908
|
+
scrollSource = "editor";
|
|
10909
|
+
syncScroll();
|
|
10910
|
+
Settings.set(namespace, "markdown-editor:sync", value).catch(() => {});
|
|
10911
|
+
});
|
|
10912
|
+
(0, vue.watch)(editorRatio, () => {
|
|
10913
|
+
(0, vue.nextTick)(() => requestAnimationFrame(() => syncScroll()));
|
|
10914
|
+
});
|
|
10915
|
+
(0, vue.onMounted)(() => {
|
|
10916
|
+
Settings.get(namespace, "markdown-editor:sync").then((value) => syncEnabled.value = value ?? false).catch(() => {});
|
|
10917
|
+
});
|
|
10918
|
+
(0, vue.onBeforeUnmount)(() => {
|
|
10919
|
+
generation++;
|
|
10920
|
+
saveDraft();
|
|
10921
|
+
clearTimeout(previewTimer);
|
|
10922
|
+
});
|
|
10923
|
+
return (_ctx, _cache) => {
|
|
10924
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("section", _hoisted_1, [
|
|
10925
|
+
(0, vue.createElementVNode)("header", _hoisted_2, [
|
|
10926
|
+
(0, vue.createElementVNode)("h1", null, (0, vue.toDisplayString)((0, vue.unref)(t)("client.markdownEditor.title")), 1),
|
|
10927
|
+
(0, vue.createElementVNode)("button", {
|
|
10928
|
+
type: "button",
|
|
10929
|
+
onClick: _cache[0] || (_cache[0] = ($event) => fileInput.value?.click())
|
|
10930
|
+
}, (0, vue.toDisplayString)((0, vue.unref)(t)("client.markdownEditor.open")), 1),
|
|
10931
|
+
(0, vue.createElementVNode)("input", {
|
|
10932
|
+
ref_key: "fileInput",
|
|
10933
|
+
ref: fileInput,
|
|
10934
|
+
type: "file",
|
|
10935
|
+
accept: ".md,.markdown,.txt,text/markdown,text/plain",
|
|
10936
|
+
hidden: "",
|
|
10937
|
+
onChange: openFile
|
|
10938
|
+
}, null, 544),
|
|
10939
|
+
(0, vue.createVNode)((0, vue.unref)(_deot_vc.Clipboard), {
|
|
10940
|
+
tag: "button",
|
|
10941
|
+
type: "button",
|
|
10942
|
+
value: text.value
|
|
10943
|
+
}, {
|
|
10944
|
+
default: (0, vue.withCtx)(() => [(0, vue.createTextVNode)((0, vue.toDisplayString)((0, vue.unref)(t)("client.markdownEditor.copy")), 1)]),
|
|
10945
|
+
_: 1
|
|
10946
|
+
}, 8, ["value"]),
|
|
10947
|
+
(0, vue.createElementVNode)("button", {
|
|
10948
|
+
type: "button",
|
|
10949
|
+
disabled: exporting.value || loading.value || Boolean(preview.value.error) || renderedSource.value !== text.value,
|
|
10950
|
+
onClick: exportPdf
|
|
10951
|
+
}, (0, vue.toDisplayString)((0, vue.unref)(t)("client.markdownEditor.pdf")), 9, _hoisted_3),
|
|
10952
|
+
(0, vue.createElementVNode)("button", {
|
|
10953
|
+
type: "button",
|
|
10954
|
+
onClick: reset
|
|
10955
|
+
}, (0, vue.toDisplayString)((0, vue.unref)(t)("client.markdownEditor.reset")), 1),
|
|
10956
|
+
(0, vue.createElementVNode)("label", null, [(0, vue.withDirectives)((0, vue.createElementVNode)("input", {
|
|
10957
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => syncEnabled.value = $event),
|
|
10958
|
+
type: "checkbox"
|
|
10959
|
+
}, null, 512), [[vue.vModelCheckbox, syncEnabled.value]]), (0, vue.createTextVNode)(" " + (0, vue.toDisplayString)((0, vue.unref)(t)("client.markdownEditor.sync")), 1)]),
|
|
10960
|
+
(0, vue.createVNode)(theme_toggler_default)
|
|
10961
|
+
]),
|
|
10962
|
+
loading.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("p", _hoisted_4, (0, vue.toDisplayString)((0, vue.unref)(t)("client.common.loading")), 1)) : (0, vue.createCommentVNode)("v-if", true),
|
|
10963
|
+
preview.value.error || error.value || styleError.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("p", _hoisted_5, (0, vue.toDisplayString)(preview.value.error || error.value || styleError.value), 1)) : (0, vue.createCommentVNode)("v-if", true),
|
|
10964
|
+
(0, vue.createElementVNode)("div", {
|
|
10965
|
+
class: "docs-markdown-editor__panes",
|
|
10966
|
+
style: (0, vue.normalizeStyle)({ "--docs-markdown-editor-columns": `minmax(0, ${editorRatio.value}fr) 8px minmax(0, ${100 - editorRatio.value}fr)` })
|
|
10967
|
+
}, [
|
|
10968
|
+
((0, vue.openBlock)(), (0, vue.createBlock)(source_editor_default, {
|
|
10969
|
+
key: documentKey.value,
|
|
10970
|
+
ref_key: "editor",
|
|
10971
|
+
ref: editor,
|
|
10972
|
+
"model-value": text.value,
|
|
10973
|
+
label: (0, vue.unref)(t)("client.markdownEditor.source"),
|
|
10974
|
+
onWheelCapture: _cache[2] || (_cache[2] = ($event) => (0, vue.isRef)(scrollSource) ? scrollSource.value = "editor" : scrollSource = "editor"),
|
|
10975
|
+
onPointerdownCapture: _cache[3] || (_cache[3] = ($event) => (0, vue.isRef)(scrollSource) ? scrollSource.value = "editor" : scrollSource = "editor"),
|
|
10976
|
+
onKeydownCapture: _cache[4] || (_cache[4] = ($event) => (0, vue.isRef)(scrollSource) ? scrollSource.value = "editor" : scrollSource = "editor"),
|
|
10977
|
+
"onUpdate:modelValue": edit,
|
|
10978
|
+
onScroll: _cache[5] || (_cache[5] = ($event) => syncScroll("editor"))
|
|
10979
|
+
}, null, 8, ["model-value", "label"])),
|
|
10980
|
+
(0, vue.createVNode)(pane_divider_default, {
|
|
10981
|
+
modelValue: editorRatio.value,
|
|
10982
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => editorRatio.value = $event)
|
|
10983
|
+
}, null, 8, ["modelValue"]),
|
|
10984
|
+
(0, vue.createVNode)((0, vue.unref)(_deot_vc.Scroller), {
|
|
10985
|
+
ref_key: "previewScroller",
|
|
10986
|
+
ref: previewScroller,
|
|
10987
|
+
class: "docs-markdown-editor__preview",
|
|
10988
|
+
native: false,
|
|
10989
|
+
wheel: false,
|
|
10990
|
+
"auto-resize": true,
|
|
10991
|
+
always: true,
|
|
10992
|
+
height: "100%",
|
|
10993
|
+
onWheelCapture: _cache[8] || (_cache[8] = ($event) => (0, vue.isRef)(scrollSource) ? scrollSource.value = "preview" : scrollSource = "preview"),
|
|
10994
|
+
onPointerdownCapture: _cache[9] || (_cache[9] = ($event) => (0, vue.isRef)(scrollSource) ? scrollSource.value = "preview" : scrollSource = "preview"),
|
|
10995
|
+
onKeydownCapture: _cache[10] || (_cache[10] = ($event) => (0, vue.isRef)(scrollSource) ? scrollSource.value = "preview" : scrollSource = "preview"),
|
|
10996
|
+
onScroll: _cache[11] || (_cache[11] = ($event) => syncScroll("preview"))
|
|
10997
|
+
}, {
|
|
10998
|
+
default: (0, vue.withCtx)(() => [(0, vue.createElementVNode)("article", {
|
|
10999
|
+
ref_key: "article",
|
|
11000
|
+
ref: article,
|
|
11001
|
+
onLoadCapture: _cache[7] || (_cache[7] = ($event) => syncScroll())
|
|
11002
|
+
}, [((0, vue.openBlock)(), (0, vue.createBlock)((0, vue.unref)(_deot_docs_markdown.Markdown), {
|
|
11003
|
+
key: documentKey.value,
|
|
11004
|
+
"model-value": previewSource.value,
|
|
11005
|
+
theme: markdownDefaults.value.theme,
|
|
11006
|
+
indicator: markdownDefaults.value.indicator,
|
|
11007
|
+
locale: (0, vue.unref)(locale),
|
|
11008
|
+
playground: playgroundDefaults.value,
|
|
11009
|
+
onRendered
|
|
11010
|
+
}, null, 8, [
|
|
11011
|
+
"model-value",
|
|
11012
|
+
"theme",
|
|
11013
|
+
"indicator",
|
|
11014
|
+
"locale",
|
|
11015
|
+
"playground"
|
|
11016
|
+
]))], 544)]),
|
|
11017
|
+
_: 1
|
|
11018
|
+
}, 512)
|
|
11019
|
+
], 4)
|
|
11020
|
+
]);
|
|
10508
11021
|
};
|
|
10509
11022
|
}
|
|
10510
11023
|
});
|
|
@@ -10573,10 +11086,21 @@ var createDocsRouter = (config, options = {}) => {
|
|
|
10573
11086
|
const isDevelopment = config.runtime?.mode === "development";
|
|
10574
11087
|
const routes = [
|
|
10575
11088
|
{
|
|
10576
|
-
path: "/__docs/
|
|
10577
|
-
component:
|
|
11089
|
+
path: "/__docs/raw-editor",
|
|
11090
|
+
component: raw_editor_default,
|
|
11091
|
+
meta: {
|
|
11092
|
+
docsRawEditor: true,
|
|
11093
|
+
docsRoute: {
|
|
11094
|
+
layout: "none",
|
|
11095
|
+
content: null
|
|
11096
|
+
}
|
|
11097
|
+
}
|
|
11098
|
+
},
|
|
11099
|
+
{
|
|
11100
|
+
path: "/__docs/markdown-editor",
|
|
11101
|
+
component: markdown_editor_default,
|
|
10578
11102
|
meta: {
|
|
10579
|
-
|
|
11103
|
+
docsMarkdownEditor: true,
|
|
10580
11104
|
docsRoute: {
|
|
10581
11105
|
layout: "none",
|
|
10582
11106
|
content: null
|
|
@@ -10713,10 +11237,13 @@ var createDocsRouter = (config, options = {}) => {
|
|
|
10713
11237
|
routes
|
|
10714
11238
|
});
|
|
10715
11239
|
router.beforeEach((to) => {
|
|
10716
|
-
if (to.meta.docsPreview || to.meta.
|
|
11240
|
+
if (to.meta.docsPreview || to.meta.docsRawEditor || to.meta.docsMarkdownEditor) {
|
|
10717
11241
|
let language = "";
|
|
10718
11242
|
try {
|
|
10719
|
-
|
|
11243
|
+
if (to.meta.docsRawEditor) {
|
|
11244
|
+
const value = to.query.raw !== void 0 ? readRaw(to.query.raw) : to.query;
|
|
11245
|
+
if (value && typeof value === "object" && "lang" in value && typeof value.lang === "string") language = value.lang;
|
|
11246
|
+
} else language = readPreviewConfig(to.query).lang || "";
|
|
10720
11247
|
} catch {}
|
|
10721
11248
|
to.params.lang = hasConfiguredLanguage(config, language) ? language : defaultLanguage;
|
|
10722
11249
|
return true;
|
|
@@ -10783,13 +11310,22 @@ var bootstrap = async (config) => {
|
|
|
10783
11310
|
app.mount("#app");
|
|
10784
11311
|
const disconnectEvents = connectResourceEvents();
|
|
10785
11312
|
let disconnected = false;
|
|
10786
|
-
let stopPrefetch
|
|
11313
|
+
let stopPrefetch;
|
|
11314
|
+
let stopPrefetchRoutes = () => {};
|
|
10787
11315
|
(async () => {
|
|
10788
11316
|
try {
|
|
10789
11317
|
await router.isReady();
|
|
10790
11318
|
if (disconnected) return;
|
|
10791
11319
|
await consumeStoredRedirect(router, config);
|
|
10792
|
-
if (
|
|
11320
|
+
if (disconnected) return;
|
|
11321
|
+
const syncPrefetch = (to) => {
|
|
11322
|
+
if (to.meta.docsPreview || to.meta.docsRawEditor || to.meta.docsMarkdownEditor) {
|
|
11323
|
+
stopPrefetch?.();
|
|
11324
|
+
stopPrefetch = void 0;
|
|
11325
|
+
} else stopPrefetch ??= Resource.prefetch.start(config);
|
|
11326
|
+
};
|
|
11327
|
+
syncPrefetch(router.currentRoute.value);
|
|
11328
|
+
stopPrefetchRoutes = router.afterEach(syncPrefetch);
|
|
10793
11329
|
} catch {}
|
|
10794
11330
|
})();
|
|
10795
11331
|
const disconnect = () => {
|
|
@@ -10797,7 +11333,8 @@ var bootstrap = async (config) => {
|
|
|
10797
11333
|
disconnected = true;
|
|
10798
11334
|
disconnectEvents();
|
|
10799
11335
|
stopLanguagePersistence();
|
|
10800
|
-
|
|
11336
|
+
stopPrefetchRoutes();
|
|
11337
|
+
stopPrefetch?.();
|
|
10801
11338
|
stopDocumentLanguage();
|
|
10802
11339
|
stopPlaygroundResource();
|
|
10803
11340
|
stopContentWidth();
|