qsharp-lang 1.0.33 → 1.1.0-dev
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/browser.d.ts +2 -2
- package/dist/browser.js +1 -0
- package/dist/compiler/common.d.ts +1 -1
- package/dist/compiler/compiler.d.ts +1 -1
- package/dist/compiler/compiler.js +1 -2
- package/dist/debug-service/debug-service.d.ts +0 -1
- package/dist/debug-service/debug-service.js +2 -44
- package/dist/katas-content.generated.js +13 -13
- package/dist/language-service/language-service.d.ts +15 -18
- package/dist/language-service/language-service.js +17 -189
- package/dist/log.js +2 -3
- package/dist/main.d.ts +1 -0
- package/dist/main.js +1 -0
- package/dist/samples.generated.d.ts +8 -2
- package/dist/samples.generated.js +18 -0
- package/dist/utils.d.ts +24 -0
- package/dist/utils.js +148 -0
- package/lib/node/qsc_wasm.cjs +106 -113
- package/lib/node/qsc_wasm.d.cts +37 -37
- package/lib/node/qsc_wasm_bg.wasm +0 -0
- package/lib/web/qsc_wasm.d.ts +37 -37
- package/lib/web/qsc_wasm.js +101 -111
- package/lib/web/qsc_wasm_bg.wasm +0 -0
- package/package.json +1 -1
- package/ux/colormap.ts +51 -0
- package/ux/data.ts +65 -0
- package/ux/estimatesOverview.tsx +305 -0
- package/ux/estimatesPanel.tsx +94 -0
- package/ux/generate_report_code.py +243 -0
- package/ux/histogram.tsx +0 -1
- package/ux/index.ts +5 -2
- package/ux/output_data.md +537 -0
- package/ux/qsharp-ux.css +88 -8
- package/ux/reTable.tsx +7 -28
- package/ux/report.ts +591 -0
- package/ux/resultsTable.tsx +76 -67
- package/ux/scatterChart.tsx +300 -0
- package/ux/spaceChart.tsx +2 -2
- package/ux/tsconfig.json +0 -1
- package/dist/vsdiagnostic.d.ts +0 -19
- package/dist/vsdiagnostic.js +0 -127
package/lib/node/qsc_wasm.d.cts
CHANGED
|
@@ -70,8 +70,7 @@ export interface IBreakpointSpanList {
|
|
|
70
70
|
|
|
71
71
|
export interface IBreakpointSpan {
|
|
72
72
|
id: number;
|
|
73
|
-
|
|
74
|
-
hi: number;
|
|
73
|
+
range: IRange;
|
|
75
74
|
}
|
|
76
75
|
|
|
77
76
|
export interface IStackFrameList {
|
|
@@ -82,8 +81,7 @@ export interface IStackFrameList {
|
|
|
82
81
|
export interface IStackFrame {
|
|
83
82
|
name: string;
|
|
84
83
|
path: string;
|
|
85
|
-
|
|
86
|
-
hi: number;
|
|
84
|
+
range: IRange;
|
|
87
85
|
}
|
|
88
86
|
|
|
89
87
|
export interface IVariableList {
|
|
@@ -118,8 +116,7 @@ export interface IQuantumState {
|
|
|
118
116
|
}
|
|
119
117
|
|
|
120
118
|
export interface VSDiagnostic {
|
|
121
|
-
|
|
122
|
-
end_pos: number;
|
|
119
|
+
range: IRange,
|
|
123
120
|
message: string;
|
|
124
121
|
severity: "error" | "warning" | "info"
|
|
125
122
|
code?: string;
|
|
@@ -127,9 +124,7 @@ export interface VSDiagnostic {
|
|
|
127
124
|
}
|
|
128
125
|
|
|
129
126
|
export interface IRelatedInformation {
|
|
130
|
-
|
|
131
|
-
start_pos: number;
|
|
132
|
-
end_pos: number;
|
|
127
|
+
location: ILocation,
|
|
133
128
|
message: string;
|
|
134
129
|
}
|
|
135
130
|
|
|
@@ -151,18 +146,13 @@ export interface ICompletionItem {
|
|
|
151
146
|
}
|
|
152
147
|
|
|
153
148
|
export interface ITextEdit {
|
|
154
|
-
range:
|
|
149
|
+
range: IRange;
|
|
155
150
|
newText: string;
|
|
156
151
|
}
|
|
157
152
|
|
|
158
153
|
export interface IHover {
|
|
159
154
|
contents: string;
|
|
160
|
-
span:
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
export interface ILocation {
|
|
164
|
-
source: string;
|
|
165
|
-
span: ISpan;
|
|
155
|
+
span: IRange
|
|
166
156
|
}
|
|
167
157
|
|
|
168
158
|
export interface ISignatureHelp {
|
|
@@ -178,7 +168,7 @@ export interface ISignatureInformation {
|
|
|
178
168
|
}
|
|
179
169
|
|
|
180
170
|
export interface IParameterInformation {
|
|
181
|
-
label:
|
|
171
|
+
label: [number, number];
|
|
182
172
|
documentation: string;
|
|
183
173
|
}
|
|
184
174
|
|
|
@@ -186,11 +176,6 @@ export interface IWorkspaceEdit {
|
|
|
186
176
|
changes: [string, ITextEdit[]][];
|
|
187
177
|
}
|
|
188
178
|
|
|
189
|
-
export interface ISpan {
|
|
190
|
-
start: number;
|
|
191
|
-
end: number;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
179
|
export interface ICell {
|
|
195
180
|
uri: string;
|
|
196
181
|
version: number;
|
|
@@ -201,6 +186,21 @@ export interface INotebookMetadata {
|
|
|
201
186
|
targetProfile?: "unrestricted" | "base";
|
|
202
187
|
}
|
|
203
188
|
|
|
189
|
+
export interface IPosition {
|
|
190
|
+
line: number;
|
|
191
|
+
character: number;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export interface IRange {
|
|
195
|
+
start: IPosition;
|
|
196
|
+
end: IPosition;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export interface ILocation {
|
|
200
|
+
source: string;
|
|
201
|
+
span: IRange;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
204
|
|
|
205
205
|
export type TargetProfile = "base" | "unrestricted";
|
|
206
206
|
|
|
@@ -215,7 +215,7 @@ export class DebugService {
|
|
|
215
215
|
/**
|
|
216
216
|
* @param {(Array<any>)[]} sources
|
|
217
217
|
* @param {string} target_profile
|
|
218
|
-
* @param {string | undefined} entry
|
|
218
|
+
* @param {string | undefined} [entry]
|
|
219
219
|
* @returns {string}
|
|
220
220
|
*/
|
|
221
221
|
load_source(sources: (Array<any>)[], target_profile: string, entry?: string): string;
|
|
@@ -305,48 +305,48 @@ export class LanguageService {
|
|
|
305
305
|
close_notebook_document(notebook_uri: string): void;
|
|
306
306
|
/**
|
|
307
307
|
* @param {string} uri
|
|
308
|
-
* @param {
|
|
308
|
+
* @param {IPosition} position
|
|
309
309
|
* @returns {ICompletionList}
|
|
310
310
|
*/
|
|
311
|
-
get_completions(uri: string,
|
|
311
|
+
get_completions(uri: string, position: IPosition): ICompletionList;
|
|
312
312
|
/**
|
|
313
313
|
* @param {string} uri
|
|
314
|
-
* @param {
|
|
314
|
+
* @param {IPosition} position
|
|
315
315
|
* @returns {ILocation | undefined}
|
|
316
316
|
*/
|
|
317
|
-
get_definition(uri: string,
|
|
317
|
+
get_definition(uri: string, position: IPosition): ILocation | undefined;
|
|
318
318
|
/**
|
|
319
319
|
* @param {string} uri
|
|
320
|
-
* @param {
|
|
320
|
+
* @param {IPosition} position
|
|
321
321
|
* @param {boolean} include_declaration
|
|
322
322
|
* @returns {(ILocation)[]}
|
|
323
323
|
*/
|
|
324
|
-
get_references(uri: string,
|
|
324
|
+
get_references(uri: string, position: IPosition, include_declaration: boolean): (ILocation)[];
|
|
325
325
|
/**
|
|
326
326
|
* @param {string} uri
|
|
327
|
-
* @param {
|
|
327
|
+
* @param {IPosition} position
|
|
328
328
|
* @returns {IHover | undefined}
|
|
329
329
|
*/
|
|
330
|
-
get_hover(uri: string,
|
|
330
|
+
get_hover(uri: string, position: IPosition): IHover | undefined;
|
|
331
331
|
/**
|
|
332
332
|
* @param {string} uri
|
|
333
|
-
* @param {
|
|
333
|
+
* @param {IPosition} position
|
|
334
334
|
* @returns {ISignatureHelp | undefined}
|
|
335
335
|
*/
|
|
336
|
-
get_signature_help(uri: string,
|
|
336
|
+
get_signature_help(uri: string, position: IPosition): ISignatureHelp | undefined;
|
|
337
337
|
/**
|
|
338
338
|
* @param {string} uri
|
|
339
|
-
* @param {
|
|
339
|
+
* @param {IPosition} position
|
|
340
340
|
* @param {string} new_name
|
|
341
341
|
* @returns {IWorkspaceEdit}
|
|
342
342
|
*/
|
|
343
|
-
get_rename(uri: string,
|
|
343
|
+
get_rename(uri: string, position: IPosition, new_name: string): IWorkspaceEdit;
|
|
344
344
|
/**
|
|
345
345
|
* @param {string} uri
|
|
346
|
-
* @param {
|
|
346
|
+
* @param {IPosition} position
|
|
347
347
|
* @returns {ITextEdit | undefined}
|
|
348
348
|
*/
|
|
349
|
-
prepare_rename(uri: string,
|
|
349
|
+
prepare_rename(uri: string, position: IPosition): ITextEdit | undefined;
|
|
350
350
|
}
|
|
351
351
|
/**
|
|
352
352
|
* a minimal implementation for interacting with async JS filesystem callbacks to
|
|
Binary file
|
package/lib/web/qsc_wasm.d.ts
CHANGED
|
@@ -70,8 +70,7 @@ export interface IBreakpointSpanList {
|
|
|
70
70
|
|
|
71
71
|
export interface IBreakpointSpan {
|
|
72
72
|
id: number;
|
|
73
|
-
|
|
74
|
-
hi: number;
|
|
73
|
+
range: IRange;
|
|
75
74
|
}
|
|
76
75
|
|
|
77
76
|
export interface IStackFrameList {
|
|
@@ -82,8 +81,7 @@ export interface IStackFrameList {
|
|
|
82
81
|
export interface IStackFrame {
|
|
83
82
|
name: string;
|
|
84
83
|
path: string;
|
|
85
|
-
|
|
86
|
-
hi: number;
|
|
84
|
+
range: IRange;
|
|
87
85
|
}
|
|
88
86
|
|
|
89
87
|
export interface IVariableList {
|
|
@@ -118,8 +116,7 @@ export interface IQuantumState {
|
|
|
118
116
|
}
|
|
119
117
|
|
|
120
118
|
export interface VSDiagnostic {
|
|
121
|
-
|
|
122
|
-
end_pos: number;
|
|
119
|
+
range: IRange,
|
|
123
120
|
message: string;
|
|
124
121
|
severity: "error" | "warning" | "info"
|
|
125
122
|
code?: string;
|
|
@@ -127,9 +124,7 @@ export interface VSDiagnostic {
|
|
|
127
124
|
}
|
|
128
125
|
|
|
129
126
|
export interface IRelatedInformation {
|
|
130
|
-
|
|
131
|
-
start_pos: number;
|
|
132
|
-
end_pos: number;
|
|
127
|
+
location: ILocation,
|
|
133
128
|
message: string;
|
|
134
129
|
}
|
|
135
130
|
|
|
@@ -151,18 +146,13 @@ export interface ICompletionItem {
|
|
|
151
146
|
}
|
|
152
147
|
|
|
153
148
|
export interface ITextEdit {
|
|
154
|
-
range:
|
|
149
|
+
range: IRange;
|
|
155
150
|
newText: string;
|
|
156
151
|
}
|
|
157
152
|
|
|
158
153
|
export interface IHover {
|
|
159
154
|
contents: string;
|
|
160
|
-
span:
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
export interface ILocation {
|
|
164
|
-
source: string;
|
|
165
|
-
span: ISpan;
|
|
155
|
+
span: IRange
|
|
166
156
|
}
|
|
167
157
|
|
|
168
158
|
export interface ISignatureHelp {
|
|
@@ -178,7 +168,7 @@ export interface ISignatureInformation {
|
|
|
178
168
|
}
|
|
179
169
|
|
|
180
170
|
export interface IParameterInformation {
|
|
181
|
-
label:
|
|
171
|
+
label: [number, number];
|
|
182
172
|
documentation: string;
|
|
183
173
|
}
|
|
184
174
|
|
|
@@ -186,11 +176,6 @@ export interface IWorkspaceEdit {
|
|
|
186
176
|
changes: [string, ITextEdit[]][];
|
|
187
177
|
}
|
|
188
178
|
|
|
189
|
-
export interface ISpan {
|
|
190
|
-
start: number;
|
|
191
|
-
end: number;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
179
|
export interface ICell {
|
|
195
180
|
uri: string;
|
|
196
181
|
version: number;
|
|
@@ -201,6 +186,21 @@ export interface INotebookMetadata {
|
|
|
201
186
|
targetProfile?: "unrestricted" | "base";
|
|
202
187
|
}
|
|
203
188
|
|
|
189
|
+
export interface IPosition {
|
|
190
|
+
line: number;
|
|
191
|
+
character: number;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export interface IRange {
|
|
195
|
+
start: IPosition;
|
|
196
|
+
end: IPosition;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export interface ILocation {
|
|
200
|
+
source: string;
|
|
201
|
+
span: IRange;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
204
|
|
|
205
205
|
export type TargetProfile = "base" | "unrestricted";
|
|
206
206
|
|
|
@@ -215,7 +215,7 @@ export class DebugService {
|
|
|
215
215
|
/**
|
|
216
216
|
* @param {(Array<any>)[]} sources
|
|
217
217
|
* @param {string} target_profile
|
|
218
|
-
* @param {string | undefined} entry
|
|
218
|
+
* @param {string | undefined} [entry]
|
|
219
219
|
* @returns {string}
|
|
220
220
|
*/
|
|
221
221
|
load_source(sources: (Array<any>)[], target_profile: string, entry?: string): string;
|
|
@@ -305,48 +305,48 @@ export class LanguageService {
|
|
|
305
305
|
close_notebook_document(notebook_uri: string): void;
|
|
306
306
|
/**
|
|
307
307
|
* @param {string} uri
|
|
308
|
-
* @param {
|
|
308
|
+
* @param {IPosition} position
|
|
309
309
|
* @returns {ICompletionList}
|
|
310
310
|
*/
|
|
311
|
-
get_completions(uri: string,
|
|
311
|
+
get_completions(uri: string, position: IPosition): ICompletionList;
|
|
312
312
|
/**
|
|
313
313
|
* @param {string} uri
|
|
314
|
-
* @param {
|
|
314
|
+
* @param {IPosition} position
|
|
315
315
|
* @returns {ILocation | undefined}
|
|
316
316
|
*/
|
|
317
|
-
get_definition(uri: string,
|
|
317
|
+
get_definition(uri: string, position: IPosition): ILocation | undefined;
|
|
318
318
|
/**
|
|
319
319
|
* @param {string} uri
|
|
320
|
-
* @param {
|
|
320
|
+
* @param {IPosition} position
|
|
321
321
|
* @param {boolean} include_declaration
|
|
322
322
|
* @returns {(ILocation)[]}
|
|
323
323
|
*/
|
|
324
|
-
get_references(uri: string,
|
|
324
|
+
get_references(uri: string, position: IPosition, include_declaration: boolean): (ILocation)[];
|
|
325
325
|
/**
|
|
326
326
|
* @param {string} uri
|
|
327
|
-
* @param {
|
|
327
|
+
* @param {IPosition} position
|
|
328
328
|
* @returns {IHover | undefined}
|
|
329
329
|
*/
|
|
330
|
-
get_hover(uri: string,
|
|
330
|
+
get_hover(uri: string, position: IPosition): IHover | undefined;
|
|
331
331
|
/**
|
|
332
332
|
* @param {string} uri
|
|
333
|
-
* @param {
|
|
333
|
+
* @param {IPosition} position
|
|
334
334
|
* @returns {ISignatureHelp | undefined}
|
|
335
335
|
*/
|
|
336
|
-
get_signature_help(uri: string,
|
|
336
|
+
get_signature_help(uri: string, position: IPosition): ISignatureHelp | undefined;
|
|
337
337
|
/**
|
|
338
338
|
* @param {string} uri
|
|
339
|
-
* @param {
|
|
339
|
+
* @param {IPosition} position
|
|
340
340
|
* @param {string} new_name
|
|
341
341
|
* @returns {IWorkspaceEdit}
|
|
342
342
|
*/
|
|
343
|
-
get_rename(uri: string,
|
|
343
|
+
get_rename(uri: string, position: IPosition, new_name: string): IWorkspaceEdit;
|
|
344
344
|
/**
|
|
345
345
|
* @param {string} uri
|
|
346
|
-
* @param {
|
|
346
|
+
* @param {IPosition} position
|
|
347
347
|
* @returns {ITextEdit | undefined}
|
|
348
348
|
*/
|
|
349
|
-
prepare_rename(uri: string,
|
|
349
|
+
prepare_rename(uri: string, position: IPosition): ITextEdit | undefined;
|
|
350
350
|
}
|
|
351
351
|
/**
|
|
352
352
|
* a minimal implementation for interacting with async JS filesystem callbacks to
|