@trilogy-data/trilogy-studio-components 0.1.26 → 0.1.28
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/dist/AssetAutoImporter-C_7Ms9xe.js +403 -0
- package/dist/{ChatCreatorModal-CL-jBnc3.js → ChatCreatorModal-Cd40SvdM.js} +3 -3
- package/dist/{ChatModelSelect-Do-VRUFc.js → ChatModelSelect-Cz7axWjP.js} +1 -1
- package/dist/{CodeBlock-PT4no49I.js → CodeBlock-Dj-GfTbW.js} +4 -4
- package/dist/{CommunityModels-Cmro0hV3.js → CommunityModels-lX2RhHCG.js} +7 -7
- package/dist/{ConnectionErrorPopup-FSs7U-Yl.js → ConnectionErrorPopup-7vpqgF0s.js} +1 -1
- package/dist/{ConnectionView-COnTTuA4.js → ConnectionView-CZ06qjjE.js} +49 -49
- package/dist/{CreateEditorFromDatasourcePopup-snOh1d5h.js → CreateEditorFromDatasourcePopup-DwA938kf.js} +4 -4
- package/dist/{Dashboard-BH9ZwMVJ.js → Dashboard-CQsIqWZC.js} +276 -280
- package/dist/{DashboardImportSelector-DQSvu9T-.js → DashboardImportSelector-CkqH52FX.js} +2 -2
- package/dist/{DashboardMobile-BUPtdN2V.js → DashboardMobile-DWFlel5p.js} +39 -39
- package/dist/{DrilldownPane-CBs5ZojS.js → DrilldownPane-BheRHJMs.js} +5 -7
- package/dist/{Editor-DQsYpkwl.js → Editor-DQ66Vp6v.js} +105 -103
- package/dist/{ErrorMessage-XMn_08gJ.js → ErrorMessage-D5JeF3Iz.js} +4 -4
- package/dist/{GlobalChatPanel-DhnOaige.js → GlobalChatPanel-B_s3COHE.js} +20 -21
- package/dist/{IDE-HLa8vybk.js → IDE-4-Jg6gsM.js} +200 -203
- package/dist/{JobsView-B97HBoIE.js → JobsView-B5NWDUgP.js} +13 -14
- package/dist/{LLMChat-CxJcPLEG.js → LLMChat-eKgEc-I3.js} +3 -3
- package/dist/{LLMView-C1MUf0c2.js → LLMView-CdTwMLVV.js} +23 -23
- package/dist/{LoadingView-s1uznGwG.js → LoadingView-Bu3wLJ7J.js} +2 -2
- package/dist/{MarkdownRenderer-BNDuEyG-.js → MarkdownRenderer-B6lqdkgc.js} +531 -430
- package/dist/{MobileIDE-BpqXoaMR.js → MobileIDE-CZlg20oa.js} +179 -182
- package/dist/{ModelCard-BhN25jaV.js → ModelCard-Bs_d7Jis.js} +12 -13
- package/dist/{ModelView-DUDA_PtZ.js → ModelView-BP5yyecx.js} +7 -7
- package/dist/PageLoading-DKFeqkmK.js +5937 -0
- package/dist/{ResultComponent-CAn_r3BL.js → ResultComponent-BaDheojB.js} +8 -8
- package/dist/{Results-BJtlwebY.js → Results-CrpHB101.js} +17 -19
- package/dist/{StatusIcon-BylPx2EO.js → StatusIcon-Clfyy-Yn.js} +2 -2
- package/dist/{StoreTokenModal-zCSYhfrw.js → StoreTokenModal-CO5hXMs3.js} +2 -2
- package/dist/{SymbolsPane-KYSwN9Sv.js → SymbolsPane-XFVErDFb.js} +6 -3
- package/dist/{TrilogyEmbedProvider-WA_dlv9e.js → TrilogyEmbedProvider-D3h0gYnX.js} +9 -9
- package/dist/{TutorialPage-NRcee6Dx.js → TutorialPage-CMcTYDOV.js} +27 -28
- package/dist/{VegaLiteChart-D1slfOUY.js → VegaLiteChart-DX_LbF3g.js} +12131 -10947
- package/dist/{WelcomePage-D5mU2x1L.js → WelcomePage-B6E35FUa.js} +5 -5
- package/dist/{embedTheme-Bub46ILG.js → _plugin-vue_export-helper-f9Rw-Il4.js} +14 -6
- package/dist/assets/{css.worker-9aDGcEUy.js → css.worker-niORQtzO.js} +14 -14
- package/dist/assets/{html.worker-D2LKDpnG.js → html.worker-CO5LvJpF.js} +17 -17
- package/dist/assets/json.worker-BezHzWUV.js +58 -0
- package/dist/assets/{ts.worker-Bz0-EaKK.js → ts.worker-CYhxGg0r.js} +107 -107
- package/dist/{results-DTgAKr5j.js → base-DuKnVD-A.js} +216 -45
- package/dist/components/FeedbackBanner.vue.d.ts +4 -0
- package/dist/components/FeedbackBanner.vue.d.ts.map +1 -0
- package/dist/components/dashboard/DashboardCreatorIcon.vue.d.ts +54 -0
- package/dist/components/dashboard/DashboardCreatorIcon.vue.d.ts.map +1 -0
- package/dist/components/dashboard/DashboardProvenance.vue.d.ts +30 -0
- package/dist/components/dashboard/DashboardProvenance.vue.d.ts.map +1 -0
- package/dist/components/dashboard/ReportLayout.vue.d.ts +19 -0
- package/dist/components/dashboard/ReportLayout.vue.d.ts.map +1 -0
- package/dist/components/editor/Editor.vue.d.ts +3 -3
- package/dist/components/editor/EditorCreatorIcon.vue.d.ts +62 -0
- package/dist/components/editor/EditorCreatorIcon.vue.d.ts.map +1 -0
- package/dist/components/editor/ValidationComponent.vue.d.ts +50 -0
- package/dist/components/editor/ValidationComponent.vue.d.ts.map +1 -0
- package/dist/components/model/ModelCard.vue.d.ts +3 -3
- package/dist/components/sidebar/LLMConnectionList.vue.d.ts.map +1 -1
- package/dist/components/sidebar/Sidebar.vue.d.ts.map +1 -1
- package/dist/components/tutorial/TutorialPrompt.vue.d.ts +3 -3
- package/dist/components/tutorial/TutorialPrompt.vue.d.ts.map +1 -1
- package/dist/{remoteWorker-Dkv3TJ0j.js → connections-CWH3zwH2.js} +4544 -4126
- package/dist/connections.js +3 -4
- package/dist/{cssMode-D4Rzr1Cu.js → cssMode-zpO2ap2B.js} +5 -6
- package/dist/dashboard.js +28 -31
- package/dist/dashboards/dashboardQueryExecutor.d.ts +9 -0
- package/dist/dashboards/dashboardQueryExecutor.d.ts.map +1 -1
- package/dist/{dist-CXoL8kXK.js → dist-1z5KURzS.js} +55 -50
- package/dist/{dist-DKkuvbPb.js → dist-Bv3D2p5A.js} +20 -18
- package/dist/{editor.main-Cl8i7rHY.js → editor.main-BQh6DxDB.js} +33 -33
- package/dist/{editorRefinementRuntime-DoP9P5J2.js → editorStore-CiWH_nGN.js} +1692 -575
- package/dist/embed.js +2 -2
- package/dist/{freemarker2-fW5NBILf.js → freemarker2-DQBqlEXc.js} +1 -1
- package/dist/{globalChatRuntime-DWZxeS57.js → globalChatRuntime-DAERmOdu.js} +16 -16
- package/dist/{handlebars-dG4w8UUY.js → handlebars-tgYxaM70.js} +1 -1
- package/dist/{helpers-BLQAgX3C.js → helpers-C2pARJoZ.js} +34 -35
- package/dist/{html-1Dq70BdU.js → html-jJahD3Mi.js} +1 -1
- package/dist/{htmlMode--IQmLBeh.js → htmlMode-BA1-8l2e.js} +5 -6
- package/dist/{javascript-CTzBM4sF.js → javascript-Cypfo7va.js} +1 -1
- package/dist/{jsonMode-DzeJjIEH.js → jsonMode-xJye8PWS.js} +25 -25
- package/dist/{liquid-DlHThiki.js → liquid-BGDrv5da.js} +1 -1
- package/dist/llm/data/prompts.d.ts +1 -1
- package/dist/llm/data/prompts.d.ts.map +1 -1
- package/dist/llm/data/trilogySyntax.generated.d.ts +3 -3
- package/dist/llm/data/trilogySyntax.generated.d.ts.map +1 -1
- package/dist/llm-Wf4Etiu9.js +18493 -0
- package/dist/llm.js +2 -3
- package/dist/{localStorage-D9uyOFEO.js → localStorage-C3xms-ab.js} +40 -43
- package/dist/{lspLanguageFeatures-Cdfs3EKq.js → lspLanguageFeatures-V3e_p9oN.js} +32 -32
- package/dist/{mdx-fn3g4PH5.js → mdx-BUR1aImW.js} +1 -1
- package/dist/monaco.js +4 -4
- package/dist/{python-CCVj0pFt.js → python-YLkl0pc6.js} +1 -1
- package/dist/{razor-Cj3flYnk.js → razor-BP8TRMDY.js} +1 -1
- package/dist/{reconcile-Dyf4UZmj.js → reconcile-BH_ReGDR.js} +1 -1
- package/dist/{remoteStoreSync-Z-yjlYtI.js → remoteStoreSync-B0K8QScO.js} +3 -3
- package/dist/{rolldown-runtime-Dqa2HsxW.js → rolldown-runtime-B0aSnxlc.js} +2 -2
- package/dist/static/test_import.vue.d.ts +4 -0
- package/dist/static/test_import.vue.d.ts.map +1 -0
- package/dist/stores-DTGQZ4_B.js +2612 -0
- package/dist/stores.js +4 -7
- package/dist/trilogy-studio-components.css +1 -1
- package/dist/{tsMode-GI4xMYAl.js → tsMode-BH9HS_sH.js} +64 -66
- package/dist/{typescript-CPibXi3J.js → typescript-BM-ynfk9.js} +1 -1
- package/dist/{useChatWithTools-B0HZ_DVh.js → useChatWithTools-BSrzJtYI.js} +11 -11
- package/dist/{useDashboard-CdSnPe_6.js → useDashboard-CGeIdDuX.js} +1014 -1022
- package/dist/{tabulator_esm-CxLvGDp8.js → useGlobalChatPanel-D9kMZLeF.js} +1729 -711
- package/dist/{useResizableDialog-B0ePSts4.js → useResizableDialog-Cs90WJdF.js} +2 -2
- package/dist/views/ModelView.vue.d.ts +6 -6
- package/dist/views/ModelView.vue.d.ts.map +1 -1
- package/dist/views/TutorialPage.vue.d.ts +9 -9
- package/dist/views/TutorialPage.vue.d.ts.map +1 -1
- package/dist/views.js +192 -194
- package/dist/{vocabulary-CKLGILtR.js → vocabulary-DQK5jB7m.js} +3 -1
- package/dist/{editor.api2-ClD5pp8H.js → workers-B9Eybl-M.js} +16252 -15926
- package/dist/{xml-BNyphceI.js → xml-M5WFPSpA.js} +1 -1
- package/dist/{yaml-DE5Vz0PH.js → yaml-CEeFwjz9.js} +1 -1
- package/package.json +29 -20
- package/dist/AssetAutoImporter-CBzvBaOt.js +0 -405
- package/dist/DashboardCreatorInline-CDU7kLy3.js +0 -129
- package/dist/DataTable-DoRDynP1.js +0 -365
- package/dist/EditorCreatorInline-D6_y1H_h.js +0 -125
- package/dist/LoadingButton-OH3frQuO.js +0 -138
- package/dist/ModalDialog-D1EOG4rl.js +0 -42
- package/dist/ModelCreator-CCdC7EXt.js +0 -253
- package/dist/PageLoading-BzniJM0C.js +0 -2669
- package/dist/Tooltip-Dihir4zs.js +0 -103
- package/dist/_plugin-vue_export-helper-B3ysoDQm.js +0 -8
- package/dist/assets/json.worker-CJ5MmO5Q.js +0 -58
- package/dist/base-C8IuZWqY.js +0 -164
- package/dist/connectionHistoryStorage-DKJHiKJY.js +0 -111
- package/dist/connectionHistoryStore-DQeBvStZ.js +0 -61
- package/dist/connections-CJSb1TZl.js +0 -229
- package/dist/constants-DgFEYN2b.js +0 -7
- package/dist/dashboardStore-ppM6nGks.js +0 -641
- package/dist/demoSetup-mwa-RDC6.js +0 -2942
- package/dist/editorRefinementToolExecutor-CVY3FA7k.js +0 -4624
- package/dist/editorStore-BhhmXbi-.js +0 -1019
- package/dist/formatting-BbJ5ICgh.js +0 -6
- package/dist/llm-BBOVWb-F.js +0 -11967
- package/dist/llmStore-DJM2JhzY.js +0 -153
- package/dist/monaco.contribution-ikesdolO.js +0 -128
- package/dist/stores-BT9hTLny.js +0 -1708
- package/dist/trilogy-BroD2Qmp.js +0 -4
- package/dist/urlStore-52HG6lsX.js +0 -55
- package/dist/useGlobalChatPanel-D_0luajQ.js +0 -85
- package/dist/useIsMobile-CNpUQAvk.js +0 -8
- package/dist/usePrismHighlight-DVyDiDAL.js +0 -183
- package/dist/workers-Br7ThUKL.js +0 -47
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
import { _t as e, gt as t, ht as n } from "./editorRefinementToolExecutor-CVY3FA7k.js";
|
|
2
|
-
import { a as r, i, n as a, o, r as s, t as c } from "./llm-BBOVWb-F.js";
|
|
3
|
-
import { n as l, t as u } from "./chatHelpers-F_woEbYF.js";
|
|
4
|
-
import { defineStore as d } from "pinia";
|
|
5
|
-
//#region stores/llmStore.ts
|
|
6
|
-
var f = (e) => {
|
|
7
|
-
let t = e.replace(/'''/g, "```").replace(/"""/g, "```").replace(/```(trilogy|sql|json)(\s|\n)/g, "```");
|
|
8
|
-
for (let e of ["```\\s*```", "```"]) {
|
|
9
|
-
let n = t.match(RegExp(`${e}([\\s\\S]*)${e}`, "s"));
|
|
10
|
-
if (n) return n[n.length - 1];
|
|
11
|
-
}
|
|
12
|
-
return e;
|
|
13
|
-
}, p = d("llmConnections", {
|
|
14
|
-
state: () => ({
|
|
15
|
-
connections: {},
|
|
16
|
-
activeConnection: ""
|
|
17
|
-
}),
|
|
18
|
-
actions: {
|
|
19
|
-
addConnection(e, t = !0) {
|
|
20
|
-
let n = e.name;
|
|
21
|
-
return this.activeConnection ||= n, t && Object.values(this.connections).filter((e) => e.isDefault).length === 0 && (e.isDefault = !0), this.connections[n] = e, e;
|
|
22
|
-
},
|
|
23
|
-
async resetConnection(e) {
|
|
24
|
-
if (this.connections[e]) return await this.connections[e].reset();
|
|
25
|
-
throw Error(`LLM connection with name "${e}" not found.`);
|
|
26
|
-
},
|
|
27
|
-
resetConnectionInBackground(e) {
|
|
28
|
-
this.resetConnection(e).catch(() => {});
|
|
29
|
-
},
|
|
30
|
-
connectionStateToStatus(e) {
|
|
31
|
-
if (!e) return "disabled";
|
|
32
|
-
let t = e;
|
|
33
|
-
return t.error ? "failed" : t.running ? "running" : t.connected ? "connected" : "disabled";
|
|
34
|
-
},
|
|
35
|
-
async newConnection(e, t, n) {
|
|
36
|
-
if (this.connections[e]) throw Error(`LLM connection with name "${e}" already exists.`);
|
|
37
|
-
let l;
|
|
38
|
-
if (t === "demo") l = new r(e, n.model);
|
|
39
|
-
else if (t === "anthropic") l = new s(e, n.apiKey, n.model, n.saveCredential);
|
|
40
|
-
else if (t === "openai") l = new i(e, n.apiKey, n.model, n.saveCredential);
|
|
41
|
-
else if (t === "google") l = new a(e, n.apiKey, n.model, n.saveCredential);
|
|
42
|
-
else if (t === "openrouter") l = new o(e, n.apiKey, n.model, n.saveCredential, void 0, {
|
|
43
|
-
httpReferer: n.httpReferer,
|
|
44
|
-
appTitle: n.appTitle
|
|
45
|
-
});
|
|
46
|
-
else if (t === "deepseek") l = new c(e, n.apiKey, n.model, n.saveCredential);
|
|
47
|
-
else throw Error(`LLM provider type "${t}" not found.`);
|
|
48
|
-
return this.addConnection(l), this.resetConnectionInBackground(e), l;
|
|
49
|
-
},
|
|
50
|
-
async fetchModelsForProvider(e, t) {
|
|
51
|
-
let n, r = `__temp_${e}_${Date.now()}`;
|
|
52
|
-
if (e === "anthropic") n = new s(r, t, "", !1);
|
|
53
|
-
else if (e === "openai") n = new i(r, t, "", !1);
|
|
54
|
-
else if (e === "google") n = new a(r, t, "", !1);
|
|
55
|
-
else if (e === "openrouter") n = new o(r, t, "", !1);
|
|
56
|
-
else if (e === "deepseek") n = new c(r, t, "", !1);
|
|
57
|
-
else throw Error(`LLM provider type "${e}" not found.`);
|
|
58
|
-
return await n.reset(), n.models;
|
|
59
|
-
},
|
|
60
|
-
async generateValidatedCompletion(e, t = null, n = 3, r = null, i = null, a = !0) {
|
|
61
|
-
let o = r || this.activeConnection || "", s = i || [];
|
|
62
|
-
if (o === "") throw Error("No active LLM connection");
|
|
63
|
-
let c = 0, l = !1, u = "", d = await this.generateCompletion(o, { prompt: e }, i);
|
|
64
|
-
if (a && s.push({
|
|
65
|
-
role: "user",
|
|
66
|
-
content: e
|
|
67
|
-
}), s.push({
|
|
68
|
-
role: "assistant",
|
|
69
|
-
content: d.text,
|
|
70
|
-
toolCalls: d.toolCalls
|
|
71
|
-
}), console.log("Initial LLM response:", d.text), u = f(d.text), t) for (; c < n && !l;) try {
|
|
72
|
-
if (!u || u.trim() == "") throw Error("Attempt to extract contents of triple backticks returned null or empty string");
|
|
73
|
-
l = await t(u), console.log("LLM response validation passed"), l = !0;
|
|
74
|
-
} catch (e) {
|
|
75
|
-
if (console.log("LLM response validation failed"), console.log(e), c++, c >= n) {
|
|
76
|
-
console.log(`Max attempts (${n}) reached, returning last response`);
|
|
77
|
-
break;
|
|
78
|
-
}
|
|
79
|
-
let t = e.message, r = `\nYou had given a response: """${u}""" that failed validation on this error: ${t}. Generate a new response that solves the original request while fixing the error. Ensure the new answer to validate is still enclosed within triple double quotes with no extra content. Put your reasoning on the fix before the quotes.`;
|
|
80
|
-
d = await this.generateCompletion(o, { prompt: r }, s), s.push({
|
|
81
|
-
role: "user",
|
|
82
|
-
content: r
|
|
83
|
-
}), s.push({
|
|
84
|
-
role: "assistant",
|
|
85
|
-
content: d.text,
|
|
86
|
-
toolCalls: d.toolCalls
|
|
87
|
-
}), u = f(d.text), console.log(`Attempt ${c}. New extract:`, u);
|
|
88
|
-
}
|
|
89
|
-
return console.log("Exiting validation loop with attempts:", c), console.log("Final LLM response:", u), {
|
|
90
|
-
success: l,
|
|
91
|
-
prompt: e,
|
|
92
|
-
message: d.text,
|
|
93
|
-
content: u,
|
|
94
|
-
attempts: c,
|
|
95
|
-
error: l ? null : "Validation failed after maximum attempts"
|
|
96
|
-
};
|
|
97
|
-
},
|
|
98
|
-
async generateDashboardCompletion(e, t = null, r = [], i = 3) {
|
|
99
|
-
let a = n(e, r);
|
|
100
|
-
return this.generateValidatedCompletion(a, t, i).then((e) => e.content);
|
|
101
|
-
},
|
|
102
|
-
async generateQueryCompletion(t, n, r = null, i = 3, a = null) {
|
|
103
|
-
let o = e(t, n);
|
|
104
|
-
return this.generateValidatedCompletion(o, r, i, a);
|
|
105
|
-
},
|
|
106
|
-
async generateSQLQueryCompletion(e) {
|
|
107
|
-
return this.generateCompletion(this.activeConnection, { prompt: e }).then((t) => ({
|
|
108
|
-
success: !0,
|
|
109
|
-
prompt: e,
|
|
110
|
-
message: t.text,
|
|
111
|
-
content: f(t.text),
|
|
112
|
-
attempts: 1
|
|
113
|
-
}));
|
|
114
|
-
},
|
|
115
|
-
async generateFilterQuery(e, n, r = null, i = 3) {
|
|
116
|
-
let a = t(e, n);
|
|
117
|
-
return this.generateValidatedCompletion(a, r, i).then((e) => e.content);
|
|
118
|
-
},
|
|
119
|
-
async generateChatName(e, t) {
|
|
120
|
-
let n = this.connections[e];
|
|
121
|
-
if (!n) throw Error(`LLM connection with name "${e}" not found.`);
|
|
122
|
-
let r = u(t), i = n.model, a = n.getFastModel();
|
|
123
|
-
try {
|
|
124
|
-
return a !== i && (n.model = a), l((await n.generateCompletion({
|
|
125
|
-
prompt: r,
|
|
126
|
-
maxTokens: 50,
|
|
127
|
-
temperature: .7
|
|
128
|
-
}, null)).text);
|
|
129
|
-
} finally {
|
|
130
|
-
a !== i && (n.model = i);
|
|
131
|
-
}
|
|
132
|
-
},
|
|
133
|
-
async generateCompletion(e, t, n = null) {
|
|
134
|
-
if (!this.connections[e]) throw Error(`LLM connection with name "${e}" not found.`);
|
|
135
|
-
return await this.connections[e].generateCompletion(t, n);
|
|
136
|
-
}
|
|
137
|
-
},
|
|
138
|
-
getters: {
|
|
139
|
-
connectionList: (e) => Object.keys(e.connections).map((t) => e.connections[t]),
|
|
140
|
-
unsavedConnections: (e) => Object.values(e.connections).filter((e) => e.changed).length,
|
|
141
|
-
getConnection: (e) => (t) => e.connections[t] || null,
|
|
142
|
-
getAllConnections: (e) => Object.values(e.connections),
|
|
143
|
-
getConnectionStatus: (e) => (t) => {
|
|
144
|
-
let n = e.connections[t];
|
|
145
|
-
if (!n) return "disabled";
|
|
146
|
-
let r = n;
|
|
147
|
-
return r.error ? "failed" : r.running ? "running" : r.connected ? "connected" : "disabled";
|
|
148
|
-
},
|
|
149
|
-
hasActiveDefaultConnection: (e) => Object.values(e.connections).some((e) => e.isDefault && e.connected)
|
|
150
|
-
}
|
|
151
|
-
});
|
|
152
|
-
//#endregion
|
|
153
|
-
export { p as n, f as t };
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
import { n as e } from "./rolldown-runtime-Dqa2HsxW.js";
|
|
2
|
-
import { t, u as n } from "./editor.api2-ClD5pp8H.js";
|
|
3
|
-
//#region node_modules/.pnpm/monaco-editor@0.55.1/node_modules/monaco-editor/esm/vs/language/typescript/lib/typescriptServicesMetadata.js
|
|
4
|
-
var r = "5.9.3", i = /* @__PURE__ */ e({
|
|
5
|
-
JsxEmit: () => o,
|
|
6
|
-
ModuleKind: () => a,
|
|
7
|
-
ModuleResolutionKind: () => l,
|
|
8
|
-
NewLineKind: () => s,
|
|
9
|
-
ScriptTarget: () => c,
|
|
10
|
-
getJavaScriptWorker: () => g,
|
|
11
|
-
getTypeScriptWorker: () => h,
|
|
12
|
-
javascriptDefaults: () => m,
|
|
13
|
-
typescriptDefaults: () => p,
|
|
14
|
-
typescriptVersion: () => d
|
|
15
|
-
}), a = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.CommonJS = 1] = "CommonJS", e[e.AMD = 2] = "AMD", e[e.UMD = 3] = "UMD", e[e.System = 4] = "System", e[e.ES2015 = 5] = "ES2015", e[e.ESNext = 99] = "ESNext", e))(a || {}), o = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Preserve = 1] = "Preserve", e[e.React = 2] = "React", e[e.ReactNative = 3] = "ReactNative", e[e.ReactJSX = 4] = "ReactJSX", e[e.ReactJSXDev = 5] = "ReactJSXDev", e))(o || {}), s = /* @__PURE__ */ ((e) => (e[e.CarriageReturnLineFeed = 0] = "CarriageReturnLineFeed", e[e.LineFeed = 1] = "LineFeed", e))(s || {}), c = /* @__PURE__ */ ((e) => (e[e.ES3 = 0] = "ES3", e[e.ES5 = 1] = "ES5", e[e.ES2015 = 2] = "ES2015", e[e.ES2016 = 3] = "ES2016", e[e.ES2017 = 4] = "ES2017", e[e.ES2018 = 5] = "ES2018", e[e.ES2019 = 6] = "ES2019", e[e.ES2020 = 7] = "ES2020", e[e.ESNext = 99] = "ESNext", e[e.JSON = 100] = "JSON", e[e.Latest = 99] = "Latest", e))(c || {}), l = /* @__PURE__ */ ((e) => (e[e.Classic = 1] = "Classic", e[e.NodeJs = 2] = "NodeJs", e))(l || {}), u = class {
|
|
16
|
-
constructor(e, n, r, i, a) {
|
|
17
|
-
this._onDidChange = new t(), this._onDidExtraLibsChange = new t(), this._extraLibs = /* @__PURE__ */ Object.create(null), this._removedExtraLibs = /* @__PURE__ */ Object.create(null), this._eagerModelSync = !1, this.setCompilerOptions(e), this.setDiagnosticsOptions(n), this.setWorkerOptions(r), this.setInlayHintsOptions(i), this.setModeConfiguration(a), this._onDidExtraLibsChangeTimeout = -1;
|
|
18
|
-
}
|
|
19
|
-
get onDidChange() {
|
|
20
|
-
return this._onDidChange.event;
|
|
21
|
-
}
|
|
22
|
-
get onDidExtraLibsChange() {
|
|
23
|
-
return this._onDidExtraLibsChange.event;
|
|
24
|
-
}
|
|
25
|
-
get modeConfiguration() {
|
|
26
|
-
return this._modeConfiguration;
|
|
27
|
-
}
|
|
28
|
-
get workerOptions() {
|
|
29
|
-
return this._workerOptions;
|
|
30
|
-
}
|
|
31
|
-
get inlayHintsOptions() {
|
|
32
|
-
return this._inlayHintsOptions;
|
|
33
|
-
}
|
|
34
|
-
getExtraLibs() {
|
|
35
|
-
return this._extraLibs;
|
|
36
|
-
}
|
|
37
|
-
addExtraLib(e, t) {
|
|
38
|
-
let n;
|
|
39
|
-
if (n = t === void 0 ? `ts:extralib-${Math.random().toString(36).substring(2, 15)}` : t, this._extraLibs[n] && this._extraLibs[n].content === e) return { dispose: () => {} };
|
|
40
|
-
let r = 1;
|
|
41
|
-
return this._removedExtraLibs[n] && (r = this._removedExtraLibs[n] + 1), this._extraLibs[n] && (r = this._extraLibs[n].version + 1), this._extraLibs[n] = {
|
|
42
|
-
content: e,
|
|
43
|
-
version: r
|
|
44
|
-
}, this._fireOnDidExtraLibsChangeSoon(), { dispose: () => {
|
|
45
|
-
let e = this._extraLibs[n];
|
|
46
|
-
e && e.version === r && (delete this._extraLibs[n], this._removedExtraLibs[n] = r, this._fireOnDidExtraLibsChangeSoon());
|
|
47
|
-
} };
|
|
48
|
-
}
|
|
49
|
-
setExtraLibs(e) {
|
|
50
|
-
for (let e in this._extraLibs) this._removedExtraLibs[e] = this._extraLibs[e].version;
|
|
51
|
-
if (this._extraLibs = /* @__PURE__ */ Object.create(null), e && e.length > 0) for (let t of e) {
|
|
52
|
-
let e = t.filePath || `ts:extralib-${Math.random().toString(36).substring(2, 15)}`, n = t.content, r = 1;
|
|
53
|
-
this._removedExtraLibs[e] && (r = this._removedExtraLibs[e] + 1), this._extraLibs[e] = {
|
|
54
|
-
content: n,
|
|
55
|
-
version: r
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
this._fireOnDidExtraLibsChangeSoon();
|
|
59
|
-
}
|
|
60
|
-
_fireOnDidExtraLibsChangeSoon() {
|
|
61
|
-
this._onDidExtraLibsChangeTimeout === -1 && (this._onDidExtraLibsChangeTimeout = window.setTimeout(() => {
|
|
62
|
-
this._onDidExtraLibsChangeTimeout = -1, this._onDidExtraLibsChange.fire(void 0);
|
|
63
|
-
}, 0));
|
|
64
|
-
}
|
|
65
|
-
getCompilerOptions() {
|
|
66
|
-
return this._compilerOptions;
|
|
67
|
-
}
|
|
68
|
-
setCompilerOptions(e) {
|
|
69
|
-
this._compilerOptions = e || /* @__PURE__ */ Object.create(null), this._onDidChange.fire(void 0);
|
|
70
|
-
}
|
|
71
|
-
getDiagnosticsOptions() {
|
|
72
|
-
return this._diagnosticsOptions;
|
|
73
|
-
}
|
|
74
|
-
setDiagnosticsOptions(e) {
|
|
75
|
-
this._diagnosticsOptions = e || /* @__PURE__ */ Object.create(null), this._onDidChange.fire(void 0);
|
|
76
|
-
}
|
|
77
|
-
setWorkerOptions(e) {
|
|
78
|
-
this._workerOptions = e || /* @__PURE__ */ Object.create(null), this._onDidChange.fire(void 0);
|
|
79
|
-
}
|
|
80
|
-
setInlayHintsOptions(e) {
|
|
81
|
-
this._inlayHintsOptions = e || /* @__PURE__ */ Object.create(null), this._onDidChange.fire(void 0);
|
|
82
|
-
}
|
|
83
|
-
setMaximumWorkerIdleTime(e) {}
|
|
84
|
-
setEagerModelSync(e) {
|
|
85
|
-
this._eagerModelSync = e;
|
|
86
|
-
}
|
|
87
|
-
getEagerModelSync() {
|
|
88
|
-
return this._eagerModelSync;
|
|
89
|
-
}
|
|
90
|
-
setModeConfiguration(e) {
|
|
91
|
-
this._modeConfiguration = e || /* @__PURE__ */ Object.create(null), this._onDidChange.fire(void 0);
|
|
92
|
-
}
|
|
93
|
-
}, d = r, f = {
|
|
94
|
-
completionItems: !0,
|
|
95
|
-
hovers: !0,
|
|
96
|
-
documentSymbols: !0,
|
|
97
|
-
definitions: !0,
|
|
98
|
-
references: !0,
|
|
99
|
-
documentHighlights: !0,
|
|
100
|
-
rename: !0,
|
|
101
|
-
diagnostics: !0,
|
|
102
|
-
documentRangeFormattingEdits: !0,
|
|
103
|
-
signatureHelp: !0,
|
|
104
|
-
onTypeFormattingEdits: !0,
|
|
105
|
-
codeActions: !0,
|
|
106
|
-
inlayHints: !0
|
|
107
|
-
}, p = new u({
|
|
108
|
-
allowNonTsExtensions: !0,
|
|
109
|
-
target: 99
|
|
110
|
-
}, {
|
|
111
|
-
noSemanticValidation: !1,
|
|
112
|
-
noSyntaxValidation: !1,
|
|
113
|
-
onlyVisible: !1
|
|
114
|
-
}, {}, {}, f), m = new u({
|
|
115
|
-
allowNonTsExtensions: !0,
|
|
116
|
-
allowJs: !0,
|
|
117
|
-
target: 99
|
|
118
|
-
}, {
|
|
119
|
-
noSemanticValidation: !0,
|
|
120
|
-
noSyntaxValidation: !1,
|
|
121
|
-
onlyVisible: !1
|
|
122
|
-
}, {}, {}, f), h = () => _().then((e) => e.getTypeScriptWorker()), g = () => _().then((e) => e.getJavaScriptWorker());
|
|
123
|
-
function _() {
|
|
124
|
-
return import("./tsMode-GI4xMYAl.js");
|
|
125
|
-
}
|
|
126
|
-
n.onLanguage("typescript", () => _().then((e) => e.setupTypeScript(p))), n.onLanguage("javascript", () => _().then((e) => e.setupJavaScript(m)));
|
|
127
|
-
//#endregion
|
|
128
|
-
export { p as n, i as t };
|