@scalar/agent-chat 0.2.3 → 0.2.5
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/LICENSE +21 -0
- package/dist/App.vue.d.ts +3 -2
- package/dist/App.vue.d.ts.map +1 -1
- package/dist/App.vue.js +32 -0
- package/dist/App.vue2.js +4 -0
- package/dist/Chat.vue.d.ts.map +1 -1
- package/dist/Chat.vue.js +23 -0
- package/dist/Chat.vue2.js +4 -0
- package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/api.d.ts +50 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +68 -0
- package/dist/components/ApprovalSection.vue.d.ts.map +1 -1
- package/dist/components/ApprovalSection.vue.js +7 -0
- package/dist/components/ApprovalSection.vue2.js +42 -0
- package/dist/components/AuthenticationProvided.vue.d.ts +3 -0
- package/dist/components/AuthenticationProvided.vue.d.ts.map +1 -0
- package/dist/components/AuthenticationProvided.vue.js +13 -0
- package/dist/components/AuthenticationRequired.vue.d.ts +3 -0
- package/dist/components/AuthenticationRequired.vue.d.ts.map +1 -0
- package/dist/components/AuthenticationRequired.vue.js +13 -0
- package/dist/components/AutosendPaused.vue.d.ts.map +1 -1
- package/dist/components/AutosendPaused.vue.js +13 -0
- package/dist/components/ContextItem.vue.d.ts.map +1 -1
- package/dist/components/ContextItem.vue.js +7 -0
- package/dist/components/ContextItem.vue2.js +19 -0
- package/dist/components/ErrorMessage.vue.d.ts +2 -1
- package/dist/components/ErrorMessage.vue.d.ts.map +1 -1
- package/dist/components/ErrorMessage.vue.js +7 -0
- package/dist/components/ErrorMessage.vue2.js +22 -0
- package/dist/components/LoadingMiniOpenAPIDoc.vue.d.ts.map +1 -1
- package/dist/components/LoadingMiniOpenAPIDoc.vue.js +14 -0
- package/dist/components/LoadingOpenAPISpecsSummary.vue.d.ts.map +1 -1
- package/dist/components/LoadingOpenAPISpecsSummary.vue.js +14 -0
- package/dist/components/Logo.vue.d.ts.map +1 -1
- package/dist/components/Logo.vue.js +23 -0
- package/dist/components/PaymentSection.vue.d.ts.map +1 -1
- package/dist/components/PaymentSection.vue.js +7 -0
- package/dist/components/PaymentSection.vue2.js +34 -0
- package/dist/components/RequestApproved.vue.d.ts.map +1 -1
- package/dist/components/RequestApproved.vue.js +13 -0
- package/dist/components/RequestFailed.vue.d.ts.map +1 -1
- package/dist/components/RequestFailed.vue.js +24 -0
- package/dist/components/RequestPreview.vue.d.ts +1 -1
- package/dist/components/RequestPreview.vue.d.ts.map +1 -1
- package/dist/components/RequestPreview.vue.js +7 -0
- package/dist/components/RequestPreview.vue2.js +123 -0
- package/dist/components/RequestRejected.vue.d.ts.map +1 -1
- package/dist/components/RequestRejected.vue.js +22 -0
- package/dist/components/RequestSuccess.vue.d.ts.map +1 -1
- package/dist/components/RequestSuccess.vue.js +13 -0
- package/dist/components/ResponseBody/ResponseBody.vue.d.ts +1 -1
- package/dist/components/ResponseBody/ResponseBody.vue.d.ts.map +1 -1
- package/dist/components/ResponseBody/ResponseBody.vue.js +41 -0
- package/dist/components/ResponseBody/ResponseBody.vue2.js +4 -0
- package/dist/components/ResponseBody/ResponseBodyInfo.vue.d.ts.map +1 -1
- package/dist/components/ResponseBody/ResponseBodyInfo.vue.js +14 -0
- package/dist/components/ResponseBody/ResponseBodyPreview.vue.d.ts +1 -1
- package/dist/components/ResponseBody/ResponseBodyPreview.vue.d.ts.map +1 -1
- package/dist/components/ResponseBody/ResponseBodyPreview.vue.js +7 -0
- package/dist/components/ResponseBody/ResponseBodyPreview.vue2.js +65 -0
- package/dist/components/ResponseBody/ResponseBodyRaw.vue.d.ts.map +1 -1
- package/dist/components/ResponseBody/ResponseBodyRaw.vue.js +20 -0
- package/dist/components/ResponseBody/ResponseBodyRaw.vue2.js +4 -0
- package/dist/components/ResponseBody/ResponseBodyToggle.vue.d.ts +2 -2
- package/dist/components/ResponseBody/ResponseBodyToggle.vue.d.ts.map +1 -1
- package/dist/components/ResponseBody/ResponseBodyToggle.vue.js +26 -0
- package/dist/components/ResponseBody/ResponseBodyToggle.vue2.js +4 -0
- package/dist/components/ResponseBody/helpers/media-types.js +130 -0
- package/dist/components/ResponseBody/helpers/process-response-body.d.ts +1 -1
- package/dist/components/ResponseBody/helpers/process-response-body.d.ts.map +1 -1
- package/dist/components/ResponseBody/helpers/process-response-body.js +33 -0
- package/dist/components/SearchPopover.vue.d.ts +2 -2
- package/dist/components/SearchPopover.vue.d.ts.map +1 -1
- package/dist/components/SearchPopover.vue.js +7 -0
- package/dist/components/SearchPopover.vue2.js +67 -0
- package/dist/components/SendingRequest.vue.d.ts.map +1 -1
- package/dist/components/SendingRequest.vue.js +24 -0
- package/dist/components/Suggestion.vue.d.ts.map +1 -1
- package/dist/components/TestRequestButton.vue.d.ts.map +1 -1
- package/dist/components/{Endpoint.vue.d.ts → UploadSection.vue.d.ts} +3 -5
- package/dist/components/UploadSection.vue.d.ts.map +1 -0
- package/dist/components/UploadSection.vue.js +7 -0
- package/dist/components/UploadSection.vue2.js +62 -0
- package/dist/entities/prompt/constants.d.ts +2 -0
- package/dist/entities/prompt/constants.d.ts.map +1 -0
- package/dist/entities/prompt/constants.js +4 -0
- package/dist/entities/registry/document.d.ts +21 -0
- package/dist/entities/registry/document.d.ts.map +1 -0
- package/dist/entities/registry/document.js +12 -0
- package/dist/entities/tools/ask-for-authentication.d.ts +7 -0
- package/dist/entities/tools/ask-for-authentication.d.ts.map +1 -0
- package/dist/entities/tools/ask-for-authentication.js +8 -0
- package/dist/entities/tools/constants.d.ts +2 -0
- package/dist/entities/tools/constants.d.ts.map +1 -0
- package/dist/entities/tools/constants.js +4 -0
- package/dist/entities/tools/execute-request.d.ts +42 -0
- package/dist/entities/tools/execute-request.d.ts.map +1 -0
- package/dist/entities/tools/execute-request.js +11 -0
- package/dist/entities/tools/get-mini-openapi-spec.d.ts +12 -0
- package/dist/entities/tools/get-mini-openapi-spec.d.ts.map +1 -0
- package/dist/entities/tools/get-mini-openapi-spec.js +8 -0
- package/dist/entities/tools/get-openapi-spec-summary.d.ts +10 -0
- package/dist/entities/tools/get-openapi-spec-summary.d.ts.map +1 -0
- package/dist/entities/tools/get-openapi-spec-summary.js +4 -0
- package/dist/helpers.d.ts +20 -12
- package/dist/helpers.d.ts.map +1 -1
- package/dist/helpers.js +115 -0
- package/dist/hooks/{useChatApprovals.d.ts → use-chat-approvals.d.ts} +1 -1
- package/dist/hooks/use-chat-approvals.d.ts.map +1 -0
- package/dist/hooks/use-chat-approvals.js +21 -0
- package/dist/hooks/use-chat-error.d.ts +14 -0
- package/dist/hooks/use-chat-error.d.ts.map +1 -0
- package/dist/hooks/use-chat-error.js +23 -0
- package/dist/hooks/use-chat-pending-client-tool-parts.d.ts +19 -0
- package/dist/hooks/use-chat-pending-client-tool-parts.d.ts.map +1 -0
- package/dist/hooks/use-chat-pending-client-tool-parts.js +12 -0
- package/dist/hooks/{useChatScroll.d.ts → use-chat-scroll.d.ts} +1 -1
- package/dist/hooks/use-chat-scroll.d.ts.map +1 -0
- package/dist/hooks/use-chat-scroll.js +16 -0
- package/dist/hooks/{useSearch.d.ts → use-search.d.ts} +11 -11
- package/dist/hooks/use-search.d.ts.map +1 -0
- package/dist/hooks/use-search.js +25 -0
- package/dist/hooks/use-term-and-conditions.d.ts +6 -0
- package/dist/hooks/use-term-and-conditions.d.ts.map +1 -0
- package/dist/hooks/use-term-and-conditions.js +16 -0
- package/dist/hooks/use-upload-tmp-document.d.ts +19 -0
- package/dist/hooks/use-upload-tmp-document.d.ts.map +1 -0
- package/dist/hooks/use-upload-tmp-document.js +64 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/package.json +35 -23
- package/dist/registry/add-documents-to-store.d.ts +6 -6
- package/dist/registry/add-documents-to-store.d.ts.map +1 -1
- package/dist/registry/add-documents-to-store.js +39 -0
- package/dist/registry/create-document-name.d.ts +2 -0
- package/dist/registry/create-document-name.d.ts.map +1 -0
- package/dist/registry/create-document-name.js +6 -0
- package/dist/state/state.d.ts +20 -8
- package/dist/state/state.d.ts.map +1 -1
- package/dist/state/state.js +110 -0
- package/dist/style.css +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/views/Chat/Chat.vue.d.ts.map +1 -1
- package/dist/views/Chat/Chat.vue.js +7 -0
- package/dist/views/Chat/Chat.vue2.js +77 -0
- package/dist/views/Chat/Messages/AskForAuthentication.vue.d.ts +10 -0
- package/dist/views/Chat/Messages/AskForAuthentication.vue.d.ts.map +1 -0
- package/dist/views/Chat/Messages/AskForAuthentication.vue.js +7 -0
- package/dist/views/Chat/Messages/AskForAuthentication.vue2.js +89 -0
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue.d.ts +2 -2
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue.d.ts.map +1 -1
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue.js +7 -0
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue2.js +23 -0
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.d.ts +2 -2
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.d.ts.map +1 -1
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.js +7 -0
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue2.js +56 -0
- package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.d.ts +2 -2
- package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.d.ts.map +1 -1
- package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.js +26 -0
- package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue2.js +4 -0
- package/dist/views/Chat/Messages/Text.vue.d.ts.map +1 -1
- package/dist/views/Chat/Messages/Text.vue.js +16 -0
- package/dist/views/Chat/Messages/Text.vue2.js +4 -0
- package/dist/views/Layout.vue.d.ts.map +1 -1
- package/dist/views/Layout.vue.js +7 -0
- package/dist/views/Layout.vue2.js +23 -0
- package/dist/views/PromptForm.vue.d.ts.map +1 -1
- package/dist/views/PromptForm.vue.js +7 -0
- package/dist/views/PromptForm.vue2.js +212 -0
- package/dist/views/Settings/Auth.vue.d.ts.map +1 -1
- package/dist/views/Settings/Auth.vue.js +67 -0
- package/dist/views/Settings/Auth.vue2.js +4 -0
- package/dist/views/Settings/DocSettings.vue.d.ts.map +1 -1
- package/dist/views/Settings/DocSettings.vue.js +7 -0
- package/dist/views/Settings/DocSettings.vue2.js +43 -0
- package/dist/views/Settings/Settings.vue.d.ts.map +1 -1
- package/dist/views/Settings/Settings.vue.js +8 -0
- package/dist/views/Settings/Settings.vue2.js +67 -0
- package/dist/views/Start.vue.d.ts.map +1 -1
- package/dist/views/Start.vue.js +7 -0
- package/dist/views/Start.vue2.js +41 -0
- package/package.json +53 -7
- package/dist/Tooltip-Cm82QgNj.js +0 -575
- package/dist/__vite-optional-peer-dep_stream-markdown_markstream-vue_false-sdjmOmXd.js +0 -5
- package/dist/__vite-optional-peer-dep_stream-monaco_markstream-vue_false-HdL4xm5U.js +0 -5
- package/dist/__vite-optional-peer-dep_vue-i18n_markstream-vue_false-B9Pwe5kz.js +0 -5
- package/dist/_basePickBy-hHD8tMGb.js +0 -151
- package/dist/_baseUniq-DTF1wuF6.js +0 -614
- package/dist/arc-Dw2RQerU.js +0 -83
- package/dist/architecture-U656AL7Q-B00Z9eXr.js +0 -36
- package/dist/architectureDiagram-VXUJARFQ-BtOffFaM.js +0 -4662
- package/dist/blockDiagram-VD42YOAC-BUqFMMQe.js +0 -2261
- package/dist/c4Diagram-YG6GDRKO-NrM1YcpG.js +0 -1579
- package/dist/channel-105myCGU.js +0 -5
- package/dist/chunk-4BX2VUAB-TAxJli7C.js +0 -8
- package/dist/chunk-55IACEB6-VXFJ4bz5.js +0 -8
- package/dist/chunk-B4BG7PRW-CZDQpfj5.js +0 -1375
- package/dist/chunk-DI55MBZ5-D3l7TA-E.js +0 -1370
- package/dist/chunk-FMBD7UC4-BMXFm8I3.js +0 -19
- package/dist/chunk-QN33PNHL-BOUpbpWp.js +0 -19
- package/dist/chunk-QZHKN3VN-C-TEEx05.js +0 -15
- package/dist/chunk-TZMSLE5B-BUiROKNR.js +0 -64
- package/dist/classDiagram-2ON5EDUG-HQET4ybK.js +0 -16
- package/dist/classDiagram-v2-WZHVMYZB-HQET4ybK.js +0 -16
- package/dist/clone-CIIO71O9.js +0 -8
- package/dist/components/Endpoint.vue.d.ts.map +0 -1
- package/dist/cose-bilkent-S5V4N54A-CMsF4n-5.js +0 -2609
- package/dist/cytoscape.esm-DfdJODL8.js +0 -18735
- package/dist/dagre-6UL2VRFP-DqzdQ6Qg.js +0 -444
- package/dist/defaultLocale-BEa-49Qz.js +0 -171
- package/dist/diagram-PSM6KHXK-1xyGntw2.js +0 -531
- package/dist/diagram-QEK2KX5R-DdZdlAm1.js +0 -217
- package/dist/diagram-S2PKOQOG-C80Eo2jp.js +0 -142
- package/dist/erDiagram-Q2GNP2WA-DFVRrMXT.js +0 -841
- package/dist/flowDiagram-NV44I4VS-D9QK_qqB.js +0 -1620
- package/dist/ganttDiagram-LVOFAZNH-Bo1NTkeQ.js +0 -2506
- package/dist/gitGraph-F6HP7TQM-C5hdgcgO.js +0 -27
- package/dist/gitGraphDiagram-NY62KEGX-BZqnqZh6.js +0 -699
- package/dist/graph-Dth4IhEK.js +0 -247
- package/dist/hooks/useChatApprovals.d.ts.map +0 -1
- package/dist/hooks/useChatOperationBlocks.d.ts +0 -3
- package/dist/hooks/useChatOperationBlocks.d.ts.map +0 -1
- package/dist/hooks/useChatScroll.d.ts.map +0 -1
- package/dist/hooks/useSearch.d.ts.map +0 -1
- package/dist/index-BOvT43H8.js +0 -111780
- package/dist/index2-B36B-gt0.js +0 -69
- package/dist/index3-CtIyYUnG.js +0 -70
- package/dist/index4-Dzz91Ao2.js +0 -537
- package/dist/index5-Bmz0gMSP.js +0 -590
- package/dist/index6-DMB3qTSV.js +0 -196
- package/dist/info-NVLQJR56-azt5obk5.js +0 -27
- package/dist/infoDiagram-ER5ION4S-DD4Jtctm.js +0 -24
- package/dist/infographic_markstream-vue_false-BfsmcXxk.js +0 -5
- package/dist/init-DjUOC4st.js +0 -16
- package/dist/journeyDiagram-XKPGCS4Q-CXL6UO0r.js +0 -834
- package/dist/kanban-definition-3W4ZIXB7-B57do5Wg.js +0 -719
- package/dist/katex-SsTUIUTC.js +0 -11688
- package/dist/layout-7TCY8eA2.js +0 -1332
- package/dist/linear-DSm5i91N.js +0 -625
- package/dist/mermaid-parser.core-CUQWpAMM.js +0 -12746
- package/dist/mermaid.core-QjuzH7xx.js +0 -14164
- package/dist/mhchem-XHl7cef5.js +0 -2306
- package/dist/mindmap-definition-VGOIOE7T-DAQyGNAM.js +0 -784
- package/dist/ordinal-DfAQgscy.js +0 -61
- package/dist/packet-BFZMPI3H-CixuxAEA.js +0 -27
- package/dist/pie-7BOR55EZ-D3cgnzR1.js +0 -32
- package/dist/pieDiagram-ADFJNKIX-BqxgYwrL.js +0 -161
- package/dist/quadrantDiagram-AYHSOK5B-CQ4v-9Hh.js +0 -1022
- package/dist/radar-NHE76QYJ-DhV0Od_M.js +0 -27
- package/dist/requirementDiagram-UZGBJVZJ-ncWNAgFi.js +0 -850
- package/dist/safeRaf-I3a3-dyJ.js +0 -10
- package/dist/sankeyDiagram-TZEHDZUN-yCR2_cH5.js +0 -810
- package/dist/sequenceDiagram-WL72ISMW-DZ7wqFyd.js +0 -2511
- package/dist/stateDiagram-FKZM4ZOC-Dra68Tzi.js +0 -263
- package/dist/stateDiagram-v2-4FDKWEC3-CARbPECD.js +0 -16
- package/dist/timeline-definition-IT6M3QCI-DEbG9QIM.js +0 -795
- package/dist/treemap-KMMF4GRG-CQbPsyWe.js +0 -81
- package/dist/xychartDiagram-PRI3JC2R-C94Pu8hL.js +0 -1340
package/dist/index2-B36B-gt0.js
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { defineComponent as g, ref as w, createElementBlock as C, watch as M, onMounted as k, onBeforeUnmount as O, openBlock as T, withDirectives as b, createBlock as I, createCommentVNode as L, createElementVNode as p, vShow as B, Transition as V, withCtx as A, renderSlot as N } from "vue";
|
|
2
|
-
import { J as S, o as D, X as K, O as X, M as H, V as P } from "./index-BOvT43H8.js";
|
|
3
|
-
var x = (c, n, o) => new Promise((t, r) => {
|
|
4
|
-
var v = (e) => {
|
|
5
|
-
try {
|
|
6
|
-
a(o.next(e));
|
|
7
|
-
} catch (f) {
|
|
8
|
-
r(f);
|
|
9
|
-
}
|
|
10
|
-
}, d = (e) => {
|
|
11
|
-
try {
|
|
12
|
-
a(o.throw(e));
|
|
13
|
-
} catch (f) {
|
|
14
|
-
r(f);
|
|
15
|
-
}
|
|
16
|
-
}, a = (e) => e.done ? t(e.value) : Promise.resolve(e.value).then(v, d);
|
|
17
|
-
a((o = o.apply(c, n)).next());
|
|
18
|
-
});
|
|
19
|
-
const U = { class: "math-inline__loading", role: "status", "aria-live": "polite" }, y = /* @__PURE__ */ S(/* @__PURE__ */ g({ __name: "MathInlineNode", props: { node: {} }, setup(c) {
|
|
20
|
-
const n = c, o = w(null), t = w(null);
|
|
21
|
-
let r = !1, v = 0, d = !1, a = null;
|
|
22
|
-
const e = w(!0), f = D();
|
|
23
|
-
let i = null;
|
|
24
|
-
function E() {
|
|
25
|
-
return x(this, null, function* () {
|
|
26
|
-
if (!t.value || d) return;
|
|
27
|
-
if (!n.node.content) return e.value = !1, t.value.textContent = n.node.raw, void (r = !0);
|
|
28
|
-
a && (a.abort(), a = null);
|
|
29
|
-
const u = ++v, s = new AbortController();
|
|
30
|
-
if (a = s, !r) try {
|
|
31
|
-
!i && o.value && (i = f(o.value)), yield i?.whenVisible;
|
|
32
|
-
} catch {
|
|
33
|
-
}
|
|
34
|
-
K(n.node.content, !1, { timeout: 1500, waitTimeout: 0, maxRetries: 0, signal: s.signal }).then((l) => {
|
|
35
|
-
d || u !== v || t.value && (t.value.innerHTML = l, e.value = !1, r = !0);
|
|
36
|
-
}).catch((l) => x(null, null, function* () {
|
|
37
|
-
if (d || u !== v || !t.value) return;
|
|
38
|
-
const m = l?.code || l?.name, h = m === "KATEX_DISABLED";
|
|
39
|
-
if (m === "WORKER_INIT_ERROR" || l?.fallbackToRenderer || m === X || m === "WORKER_TIMEOUT") {
|
|
40
|
-
const R = yield H();
|
|
41
|
-
if (R) {
|
|
42
|
-
try {
|
|
43
|
-
const _ = R.renderToString(n.node.content, { throwOnError: n.node.loading, displayMode: !1 });
|
|
44
|
-
e.value = !1, t.value.innerHTML = _, r = !0, P(n.node.content, !1, _);
|
|
45
|
-
} catch {
|
|
46
|
-
}
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
if (h) return e.value = !1, void (t.value.textContent = n.node.raw);
|
|
51
|
-
r || (e.value = !h), n.node.loading ? h && (t.value.textContent = n.node.raw) : (e.value = !1, t.value.textContent = n.node.raw);
|
|
52
|
-
}));
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
return M(() => n.node.content, () => {
|
|
56
|
-
E();
|
|
57
|
-
}), k(() => {
|
|
58
|
-
E();
|
|
59
|
-
}), O(() => {
|
|
60
|
-
var u;
|
|
61
|
-
d = !0, a && (a.abort(), a = null), (u = i?.destroy) == null || u.call(i), i = null;
|
|
62
|
-
}), (u, s) => (T(), C("span", { ref_key: "containerEl", ref: o, class: "math-inline-wrapper" }, [b(p("span", { ref_key: "mathElement", ref: t, class: "math-inline" }, null, 512), [[B, !e.value]]), e.value ? (T(), I(V, { key: 0, name: "table-node-fade" }, { default: A(() => [p("span", U, [N(u.$slots, "loading", { isLoading: e.value }, () => [s[0] || (s[0] = p("span", { class: "math-inline__spinner animate-spin", "aria-hidden": "true" }, null, -1)), s[1] || (s[1] = p("span", { class: "sr-only" }, "Loading", -1))], !0)])]), _: 3 })) : L("", !0)], 512));
|
|
63
|
-
} }), [["__scopeId", "data-v-f4ea8797"]]);
|
|
64
|
-
y.install = (c) => {
|
|
65
|
-
c.component(y.__name, y);
|
|
66
|
-
};
|
|
67
|
-
export {
|
|
68
|
-
y as default
|
|
69
|
-
};
|
package/dist/index3-CtIyYUnG.js
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { defineComponent as g, ref as p, createElementBlock as _, watch as C, onMounted as M, onBeforeUnmount as O, openBlock as x, createVNode as b, createElementVNode as T, Transition as B, withCtx as I, createCommentVNode as V, normalizeClass as N } from "vue";
|
|
2
|
-
import { J as A, o as K, X as L, O as X, M as D, V as H } from "./index-BOvT43H8.js";
|
|
3
|
-
var k = (s, e, r) => new Promise((t, u) => {
|
|
4
|
-
var v = (o) => {
|
|
5
|
-
try {
|
|
6
|
-
l(r.next(o));
|
|
7
|
-
} catch (n) {
|
|
8
|
-
u(n);
|
|
9
|
-
}
|
|
10
|
-
}, c = (o) => {
|
|
11
|
-
try {
|
|
12
|
-
l(r.throw(o));
|
|
13
|
-
} catch (n) {
|
|
14
|
-
u(n);
|
|
15
|
-
}
|
|
16
|
-
}, l = (o) => o.done ? t(o.value) : Promise.resolve(o.value).then(v, c);
|
|
17
|
-
l((r = r.apply(s, e)).next());
|
|
18
|
-
});
|
|
19
|
-
const P = { key: 0, class: "math-loading-overlay" }, w = /* @__PURE__ */ A(/* @__PURE__ */ g({ __name: "MathBlockNode", props: { node: {} }, setup(s) {
|
|
20
|
-
const e = s, r = p(null), t = p(null);
|
|
21
|
-
let u = !1, v = 0, c = !1, l = null;
|
|
22
|
-
const o = K();
|
|
23
|
-
let n = null;
|
|
24
|
-
const i = p(!0);
|
|
25
|
-
function y() {
|
|
26
|
-
return k(this, null, function* () {
|
|
27
|
-
if (!t.value || c) return;
|
|
28
|
-
if (!e.node.content) return i.value = !1, t.value.textContent = e.node.raw, void (u = !0);
|
|
29
|
-
if (!u) try {
|
|
30
|
-
!n && r.value && (n = o(r.value)), yield n?.whenVisible;
|
|
31
|
-
} catch {
|
|
32
|
-
}
|
|
33
|
-
l && (l.abort(), l = null);
|
|
34
|
-
const d = ++v, f = new AbortController();
|
|
35
|
-
l = f, L(e.node.content, !0, { timeout: 3e3, waitTimeout: 2e3, maxRetries: 1, signal: f.signal }).then((a) => {
|
|
36
|
-
c || d !== v || t.value && (t.value.innerHTML = a, u = !0, i.value = !1);
|
|
37
|
-
}).catch((a) => k(null, null, function* () {
|
|
38
|
-
if (c || d !== v || !t.value) return;
|
|
39
|
-
const m = a?.code || a?.name, R = m === "KATEX_DISABLED";
|
|
40
|
-
if (m === "WORKER_INIT_ERROR" || a?.fallbackToRenderer || m === X || m === "WORKER_TIMEOUT") {
|
|
41
|
-
const E = yield D();
|
|
42
|
-
if (E) {
|
|
43
|
-
try {
|
|
44
|
-
const h = E.renderToString(e.node.content, { throwOnError: e.node.loading, displayMode: !0 });
|
|
45
|
-
t.value.innerHTML = h, u = !0, i.value = !1, H(e.node.content, !0, h);
|
|
46
|
-
} catch {
|
|
47
|
-
}
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
if (R) return i.value = !1, void (t.value.textContent = e.node.raw);
|
|
52
|
-
u || (i.value = !0), e.node.loading || (i.value = !1, t.value.textContent = e.node.raw);
|
|
53
|
-
}));
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
return C(() => e.node.content, () => {
|
|
57
|
-
y();
|
|
58
|
-
}), M(() => {
|
|
59
|
-
y();
|
|
60
|
-
}), O(() => {
|
|
61
|
-
var d;
|
|
62
|
-
c = !0, l && (l.abort(), l = null), (d = n?.destroy) == null || d.call(n), n = null;
|
|
63
|
-
}), (d, f) => (x(), _("div", { ref_key: "containerEl", ref: r, class: "math-block text-center overflow-x-auto relative min-h-[40px]" }, [b(B, { name: "math-fade" }, { default: I(() => [i.value ? (x(), _("div", P, [...f[0] || (f[0] = [T("div", { class: "math-loading-spinner" }, null, -1)])])) : V("", !0)]), _: 1 }), T("div", { ref_key: "mathBlockElement", ref: t, class: N({ "math-rendering": i.value }) }, null, 2)], 512));
|
|
64
|
-
} }), [["__scopeId", "data-v-f432e706"]]);
|
|
65
|
-
w.install = (s) => {
|
|
66
|
-
s.component(w.__name, w);
|
|
67
|
-
};
|
|
68
|
-
export {
|
|
69
|
-
w as default
|
|
70
|
-
};
|