qsharp-lang 1.6.1-dev → 1.6.2-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 +4 -8
- package/dist/browser.js +4 -4
- package/dist/compiler/compiler.d.ts +20 -37
- package/dist/compiler/compiler.js +30 -50
- package/dist/debug-service/debug-service.d.ts +3 -3
- package/dist/debug-service/debug-service.js +4 -3
- package/dist/katas-content.generated.js +28 -8
- package/dist/katas-content.generated.md.js +28 -8
- package/dist/language-service/language-service.d.ts +3 -4
- package/dist/language-service/language-service.js +8 -3
- package/dist/main.d.ts +3 -6
- package/dist/main.js +4 -4
- package/docs/Microsoft.Quantum.Arrays/All.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Any.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Chunks.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/CircularlyShifted.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/ColumnAt.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Count.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Diagonal.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/DrawMany.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Enumerated.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Excluding.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Filtered.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/FlatMapped.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Flattened.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Fold.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/ForEach.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Head.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/HeadAndRest.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/IndexOf.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/IndexRange.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Interleaved.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/IsEmpty.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/IsRectangularArray.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/IsSorted.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/IsSquareArray.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Mapped.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/MappedByIndex.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/MappedOverRange.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Most.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/MostAndTail.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Padded.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Partitioned.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Rest.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Reversed.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/SequenceI.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/SequenceL.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Sorted.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Subarray.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Swapped.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Tail.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Transposed.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Unzipped.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Where.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Windows.md +1 -1
- package/docs/Microsoft.Quantum.Arrays/Zipped.md +1 -1
- package/docs/Microsoft.Quantum.Canon/ApplyCNOTChain.md +1 -1
- package/docs/Microsoft.Quantum.Canon/ApplyControlledOnBitString.md +1 -1
- package/docs/Microsoft.Quantum.Canon/ApplyControlledOnInt.md +1 -1
- package/docs/Microsoft.Quantum.Canon/ApplyP.md +1 -1
- package/docs/Microsoft.Quantum.Canon/ApplyPauli.md +1 -1
- package/docs/Microsoft.Quantum.Canon/ApplyPauliFromBitString.md +1 -1
- package/docs/Microsoft.Quantum.Canon/ApplyPauliFromInt.md +1 -1
- package/docs/Microsoft.Quantum.Canon/ApplyQFT.md +1 -1
- package/docs/Microsoft.Quantum.Canon/ApplyToEach.md +1 -1
- package/docs/Microsoft.Quantum.Canon/ApplyToEachA.md +1 -1
- package/docs/Microsoft.Quantum.Canon/ApplyToEachC.md +1 -1
- package/docs/Microsoft.Quantum.Canon/ApplyToEachCA.md +1 -1
- package/docs/Microsoft.Quantum.Canon/ApplyXorInPlace.md +1 -1
- package/docs/Microsoft.Quantum.Canon/ApplyXorInPlaceL.md +1 -1
- package/docs/Microsoft.Quantum.Canon/CX.md +1 -1
- package/docs/Microsoft.Quantum.Canon/CY.md +1 -1
- package/docs/Microsoft.Quantum.Canon/CZ.md +1 -1
- package/docs/Microsoft.Quantum.Canon/Fst.md +1 -1
- package/docs/Microsoft.Quantum.Canon/Snd.md +1 -1
- package/docs/Microsoft.Quantum.Canon/SwapReverseRegister.md +1 -1
- package/docs/Microsoft.Quantum.Convert/BigIntAsBoolArray.md +1 -1
- package/docs/Microsoft.Quantum.Convert/BoolArrayAsBigInt.md +1 -1
- package/docs/Microsoft.Quantum.Convert/BoolArrayAsInt.md +1 -1
- package/docs/Microsoft.Quantum.Convert/BoolArrayAsResultArray.md +1 -1
- package/docs/Microsoft.Quantum.Convert/BoolAsResult.md +1 -1
- package/docs/Microsoft.Quantum.Convert/ComplexAsComplexPolar.md +1 -1
- package/docs/Microsoft.Quantum.Convert/ComplexPolarAsComplex.md +1 -1
- package/docs/Microsoft.Quantum.Convert/IntAsBigInt.md +1 -1
- package/docs/Microsoft.Quantum.Convert/IntAsBoolArray.md +1 -1
- package/docs/Microsoft.Quantum.Convert/IntAsDouble.md +1 -1
- package/docs/Microsoft.Quantum.Convert/ResultArrayAsBoolArray.md +1 -1
- package/docs/Microsoft.Quantum.Convert/ResultArrayAsInt.md +1 -1
- package/docs/Microsoft.Quantum.Convert/ResultAsBool.md +1 -1
- package/docs/Microsoft.Quantum.Core/IsRangeEmpty.md +1 -1
- package/docs/Microsoft.Quantum.Core/Length.md +1 -1
- package/docs/Microsoft.Quantum.Core/RangeEnd.md +1 -1
- package/docs/Microsoft.Quantum.Core/RangeReverse.md +1 -1
- package/docs/Microsoft.Quantum.Core/RangeStart.md +1 -1
- package/docs/Microsoft.Quantum.Core/RangeStep.md +1 -1
- package/docs/Microsoft.Quantum.Core/Repeated.md +1 -1
- package/docs/Microsoft.Quantum.Diagnostics/DumpMachine.md +1 -1
- package/docs/Microsoft.Quantum.Diagnostics/DumpRegister.md +1 -1
- package/docs/Microsoft.Quantum.Diagnostics/Fact.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/AND.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/CCNOT.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/CNOT.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/Exp.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/H.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/I.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/M.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/Measure.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/Message.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/R.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/R1.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/R1Frac.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/RFrac.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/Reset.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/ResetAll.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/Rx.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/Rxx.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/Ry.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/Ryy.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/Rz.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/Rzz.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/S.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/SWAP.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/T.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/X.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/Y.md +1 -1
- package/docs/Microsoft.Quantum.Intrinsic/Z.md +1 -1
- package/docs/Microsoft.Quantum.Logical/Xor.md +1 -1
- package/docs/Microsoft.Quantum.Math/AbsComplex.md +1 -1
- package/docs/Microsoft.Quantum.Math/AbsComplexPolar.md +1 -1
- package/docs/Microsoft.Quantum.Math/AbsD.md +1 -1
- package/docs/Microsoft.Quantum.Math/AbsI.md +1 -1
- package/docs/Microsoft.Quantum.Math/AbsL.md +1 -1
- package/docs/Microsoft.Quantum.Math/AbsSquaredComplex.md +1 -1
- package/docs/Microsoft.Quantum.Math/AbsSquaredComplexPolar.md +1 -1
- package/docs/Microsoft.Quantum.Math/ApproximateFactorial.md +1 -1
- package/docs/Microsoft.Quantum.Math/ArcCos.md +1 -1
- package/docs/Microsoft.Quantum.Math/ArcCosh.md +1 -1
- package/docs/Microsoft.Quantum.Math/ArcSin.md +1 -1
- package/docs/Microsoft.Quantum.Math/ArcSinh.md +1 -1
- package/docs/Microsoft.Quantum.Math/ArcTan.md +1 -1
- package/docs/Microsoft.Quantum.Math/ArcTan2.md +1 -1
- package/docs/Microsoft.Quantum.Math/ArcTanh.md +1 -1
- package/docs/Microsoft.Quantum.Math/ArgComplex.md +1 -1
- package/docs/Microsoft.Quantum.Math/ArgComplexPolar.md +1 -1
- package/docs/Microsoft.Quantum.Math/Binom.md +1 -1
- package/docs/Microsoft.Quantum.Math/BitSizeI.md +1 -1
- package/docs/Microsoft.Quantum.Math/BitSizeL.md +1 -1
- package/docs/Microsoft.Quantum.Math/Ceiling.md +1 -1
- package/docs/Microsoft.Quantum.Math/Complex.md +1 -1
- package/docs/Microsoft.Quantum.Math/ComplexPolar.md +1 -1
- package/docs/Microsoft.Quantum.Math/ContinuedFractionConvergentI.md +1 -1
- package/docs/Microsoft.Quantum.Math/ContinuedFractionConvergentL.md +1 -1
- package/docs/Microsoft.Quantum.Math/Cos.md +1 -1
- package/docs/Microsoft.Quantum.Math/Cosh.md +1 -1
- package/docs/Microsoft.Quantum.Math/DivRemI.md +1 -1
- package/docs/Microsoft.Quantum.Math/DivRemL.md +1 -1
- package/docs/Microsoft.Quantum.Math/DividedByC.md +1 -1
- package/docs/Microsoft.Quantum.Math/DividedByCP.md +1 -1
- package/docs/Microsoft.Quantum.Math/E.md +1 -1
- package/docs/Microsoft.Quantum.Math/ExpModI.md +1 -1
- package/docs/Microsoft.Quantum.Math/ExpModL.md +1 -1
- package/docs/Microsoft.Quantum.Math/ExtendedGreatestCommonDivisorI.md +1 -1
- package/docs/Microsoft.Quantum.Math/ExtendedGreatestCommonDivisorL.md +1 -1
- package/docs/Microsoft.Quantum.Math/FactorialI.md +1 -1
- package/docs/Microsoft.Quantum.Math/FactorialL.md +1 -1
- package/docs/Microsoft.Quantum.Math/Floor.md +1 -1
- package/docs/Microsoft.Quantum.Math/GreatestCommonDivisorI.md +1 -1
- package/docs/Microsoft.Quantum.Math/GreatestCommonDivisorL.md +1 -1
- package/docs/Microsoft.Quantum.Math/HammingWeightI.md +1 -1
- package/docs/Microsoft.Quantum.Math/InverseModI.md +1 -1
- package/docs/Microsoft.Quantum.Math/InverseModL.md +1 -1
- package/docs/Microsoft.Quantum.Math/IsCoprimeI.md +1 -1
- package/docs/Microsoft.Quantum.Math/IsCoprimeL.md +1 -1
- package/docs/Microsoft.Quantum.Math/IsInfinite.md +1 -1
- package/docs/Microsoft.Quantum.Math/IsNaN.md +1 -1
- package/docs/Microsoft.Quantum.Math/LargestFixedPoint.md +1 -1
- package/docs/Microsoft.Quantum.Math/Lg.md +1 -1
- package/docs/Microsoft.Quantum.Math/Log.md +1 -1
- package/docs/Microsoft.Quantum.Math/Log10.md +1 -1
- package/docs/Microsoft.Quantum.Math/LogFactorialD.md +1 -1
- package/docs/Microsoft.Quantum.Math/LogGammaD.md +1 -1
- package/docs/Microsoft.Quantum.Math/LogOf2.md +1 -1
- package/docs/Microsoft.Quantum.Math/Max.md +1 -1
- package/docs/Microsoft.Quantum.Math/MaxD.md +1 -1
- package/docs/Microsoft.Quantum.Math/MaxI.md +1 -1
- package/docs/Microsoft.Quantum.Math/MaxL.md +1 -1
- package/docs/Microsoft.Quantum.Math/Min.md +1 -1
- package/docs/Microsoft.Quantum.Math/MinD.md +1 -1
- package/docs/Microsoft.Quantum.Math/MinI.md +1 -1
- package/docs/Microsoft.Quantum.Math/MinL.md +1 -1
- package/docs/Microsoft.Quantum.Math/MinusC.md +1 -1
- package/docs/Microsoft.Quantum.Math/MinusCP.md +1 -1
- package/docs/Microsoft.Quantum.Math/ModulusI.md +1 -1
- package/docs/Microsoft.Quantum.Math/ModulusL.md +1 -1
- package/docs/Microsoft.Quantum.Math/NegationC.md +1 -1
- package/docs/Microsoft.Quantum.Math/NegationCP.md +1 -1
- package/docs/Microsoft.Quantum.Math/PI.md +1 -1
- package/docs/Microsoft.Quantum.Math/PNorm.md +1 -1
- package/docs/Microsoft.Quantum.Math/PNormalized.md +1 -1
- package/docs/Microsoft.Quantum.Math/PlusC.md +1 -1
- package/docs/Microsoft.Quantum.Math/PlusCP.md +1 -1
- package/docs/Microsoft.Quantum.Math/PowC.md +1 -1
- package/docs/Microsoft.Quantum.Math/PowCP.md +1 -1
- package/docs/Microsoft.Quantum.Math/RealMod.md +1 -1
- package/docs/Microsoft.Quantum.Math/Round.md +1 -1
- package/docs/Microsoft.Quantum.Math/SignD.md +1 -1
- package/docs/Microsoft.Quantum.Math/SignI.md +1 -1
- package/docs/Microsoft.Quantum.Math/SignL.md +1 -1
- package/docs/Microsoft.Quantum.Math/Sin.md +1 -1
- package/docs/Microsoft.Quantum.Math/Sinh.md +1 -1
- package/docs/Microsoft.Quantum.Math/SmallestFixedPoint.md +1 -1
- package/docs/Microsoft.Quantum.Math/Sqrt.md +1 -1
- package/docs/Microsoft.Quantum.Math/SquaredNorm.md +1 -1
- package/docs/Microsoft.Quantum.Math/Tan.md +1 -1
- package/docs/Microsoft.Quantum.Math/Tanh.md +1 -1
- package/docs/Microsoft.Quantum.Math/TimesC.md +1 -1
- package/docs/Microsoft.Quantum.Math/TimesCP.md +1 -1
- package/docs/Microsoft.Quantum.Math/TrailingZeroCountI.md +1 -1
- package/docs/Microsoft.Quantum.Math/TrailingZeroCountL.md +1 -1
- package/docs/Microsoft.Quantum.Math/Truncate.md +1 -1
- package/docs/Microsoft.Quantum.Measurement/MResetEachZ.md +1 -1
- package/docs/Microsoft.Quantum.Measurement/MResetX.md +1 -1
- package/docs/Microsoft.Quantum.Measurement/MResetY.md +1 -1
- package/docs/Microsoft.Quantum.Measurement/MResetZ.md +1 -1
- package/docs/Microsoft.Quantum.Measurement/MeasureAllZ.md +1 -1
- package/docs/Microsoft.Quantum.Measurement/MeasureEachZ.md +1 -1
- package/docs/Microsoft.Quantum.Measurement/MeasureInteger.md +1 -1
- package/docs/Microsoft.Quantum.ResourceEstimation/AccountForEstimates.md +1 -1
- package/docs/Microsoft.Quantum.ResourceEstimation/AuxQubitCount.md +1 -1
- package/docs/Microsoft.Quantum.ResourceEstimation/BeginEstimateCaching.md +1 -1
- package/docs/Microsoft.Quantum.ResourceEstimation/BeginRepeatEstimates.md +1 -1
- package/docs/Microsoft.Quantum.ResourceEstimation/CczCount.md +1 -1
- package/docs/Microsoft.Quantum.ResourceEstimation/EndEstimateCaching.md +1 -1
- package/docs/Microsoft.Quantum.ResourceEstimation/EndRepeatEstimates.md +1 -1
- package/docs/Microsoft.Quantum.ResourceEstimation/MeasurementCount.md +1 -1
- package/docs/Microsoft.Quantum.ResourceEstimation/PSSPCLayout.md +1 -1
- package/docs/Microsoft.Quantum.ResourceEstimation/RepeatEstimates.md +1 -1
- package/docs/Microsoft.Quantum.ResourceEstimation/RotationCount.md +1 -1
- package/docs/Microsoft.Quantum.ResourceEstimation/RotationDepth.md +1 -1
- package/docs/Microsoft.Quantum.ResourceEstimation/SingleVariant.md +1 -1
- package/docs/Microsoft.Quantum.ResourceEstimation/TCount.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/AddLE.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfEqualL.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfEqualLE.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterL.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterLE.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterOrEqualL.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfGreaterOrEqualLE.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessL.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessLE.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessOrEqualL.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ApplyIfLessOrEqualLE.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/FourierTDIncByLE.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByI.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByIUsingIncByLE.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByL.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByLE.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByLEUsingAddLE.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/IncByLUsingIncByLE.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/LookAheadDKRSAddLE.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/MAJ.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/ReflectAboutInteger.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/RippleCarryCGAddLE.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/RippleCarryCGIncByLE.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.Arithmetic/RippleCarryTTKIncByLE.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.StatePreparation/ApproximatelyPreparePureStateCP.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.StatePreparation/PreparePureStateD.md +1 -1
- package/docs/Microsoft.Quantum.Unstable.TableLookup/Select.md +1 -1
- package/lib/node/qsc_wasm.cjs +133 -152
- package/lib/node/qsc_wasm.d.cts +62 -36
- package/lib/node/qsc_wasm_bg.wasm +0 -0
- package/lib/web/qsc_wasm.d.ts +71 -45
- package/lib/web/qsc_wasm.js +126 -150
- package/lib/web/qsc_wasm_bg.wasm +0 -0
- package/package.json +1 -1
- package/ux/estimatesOverview.tsx +2 -0
- package/ux/estimatesPanel.tsx +2 -0
- package/ux/qsharp-ux.css +30 -5
- package/ux/saveImage.tsx +107 -0
- package/ux/saveImageUtil.tsx +72 -0
- package/ux/scatterChart.tsx +31 -0
package/lib/web/qsc_wasm.js
CHANGED
|
@@ -107,15 +107,6 @@ function takeObject(idx) {
|
|
|
107
107
|
return ret;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
function addHeapObject(obj) {
|
|
111
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
112
|
-
const idx = heap_next;
|
|
113
|
-
heap_next = heap[idx];
|
|
114
|
-
|
|
115
|
-
heap[idx] = obj;
|
|
116
|
-
return idx;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
110
|
const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );
|
|
120
111
|
|
|
121
112
|
if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); };
|
|
@@ -125,6 +116,15 @@ function getStringFromWasm0(ptr, len) {
|
|
|
125
116
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
126
117
|
}
|
|
127
118
|
|
|
119
|
+
function addHeapObject(obj) {
|
|
120
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
121
|
+
const idx = heap_next;
|
|
122
|
+
heap_next = heap[idx];
|
|
123
|
+
|
|
124
|
+
heap[idx] = obj;
|
|
125
|
+
return idx;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
128
|
let cachedBigInt64Memory0 = null;
|
|
129
129
|
|
|
130
130
|
function getBigInt64Memory0() {
|
|
@@ -229,10 +229,18 @@ function makeMutClosure(arg0, arg1, dtor, f) {
|
|
|
229
229
|
CLOSURE_DTORS.register(real, state, state);
|
|
230
230
|
return real;
|
|
231
231
|
}
|
|
232
|
-
function
|
|
232
|
+
function __wbg_adapter_52(arg0, arg1, arg2) {
|
|
233
233
|
wasm.__wbindgen_export_3(arg0, arg1, addHeapObject(arg2));
|
|
234
234
|
}
|
|
235
235
|
|
|
236
|
+
let stack_pointer = 128;
|
|
237
|
+
|
|
238
|
+
function addBorrowedObject(obj) {
|
|
239
|
+
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
240
|
+
heap[--stack_pointer] = obj;
|
|
241
|
+
return stack_pointer;
|
|
242
|
+
}
|
|
243
|
+
|
|
236
244
|
let cachedUint32Memory0 = null;
|
|
237
245
|
|
|
238
246
|
function getUint32Memory0() {
|
|
@@ -242,6 +250,13 @@ function getUint32Memory0() {
|
|
|
242
250
|
return cachedUint32Memory0;
|
|
243
251
|
}
|
|
244
252
|
|
|
253
|
+
function passArray32ToWasm0(arg, malloc) {
|
|
254
|
+
const ptr = malloc(arg.length * 4, 4) >>> 0;
|
|
255
|
+
getUint32Memory0().set(arg, ptr / 4);
|
|
256
|
+
WASM_VECTOR_LEN = arg.length;
|
|
257
|
+
return ptr;
|
|
258
|
+
}
|
|
259
|
+
|
|
245
260
|
function passArrayJsValueToWasm0(array, malloc) {
|
|
246
261
|
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
247
262
|
const mem = getUint32Memory0();
|
|
@@ -252,21 +267,6 @@ function passArrayJsValueToWasm0(array, malloc) {
|
|
|
252
267
|
return ptr;
|
|
253
268
|
}
|
|
254
269
|
|
|
255
|
-
let stack_pointer = 128;
|
|
256
|
-
|
|
257
|
-
function addBorrowedObject(obj) {
|
|
258
|
-
if (stack_pointer == 1) throw new Error('out of js stack');
|
|
259
|
-
heap[--stack_pointer] = obj;
|
|
260
|
-
return stack_pointer;
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
function passArray32ToWasm0(arg, malloc) {
|
|
264
|
-
const ptr = malloc(arg.length * 4, 4) >>> 0;
|
|
265
|
-
getUint32Memory0().set(arg, ptr / 4);
|
|
266
|
-
WASM_VECTOR_LEN = arg.length;
|
|
267
|
-
return ptr;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
270
|
function getArrayJsValueFromWasm0(ptr, len) {
|
|
271
271
|
ptr = ptr >>> 0;
|
|
272
272
|
const mem = getUint32Memory0();
|
|
@@ -323,100 +323,76 @@ export function git_hash() {
|
|
|
323
323
|
}
|
|
324
324
|
|
|
325
325
|
/**
|
|
326
|
-
* @param {
|
|
327
|
-
* @param {(string)[]} language_features
|
|
328
|
-
* @param {string} profile
|
|
326
|
+
* @param {IProgramConfig} program
|
|
329
327
|
* @returns {string}
|
|
330
328
|
*/
|
|
331
|
-
export function get_qir(
|
|
332
|
-
let
|
|
333
|
-
let
|
|
329
|
+
export function get_qir(program) {
|
|
330
|
+
let deferred2_0;
|
|
331
|
+
let deferred2_1;
|
|
334
332
|
try {
|
|
335
333
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
336
|
-
|
|
337
|
-
const len0 = WASM_VECTOR_LEN;
|
|
338
|
-
const ptr1 = passArrayJsValueToWasm0(language_features, wasm.__wbindgen_export_0);
|
|
339
|
-
const len1 = WASM_VECTOR_LEN;
|
|
340
|
-
const ptr2 = passStringToWasm0(profile, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
341
|
-
const len2 = WASM_VECTOR_LEN;
|
|
342
|
-
wasm.get_qir(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
334
|
+
wasm.get_qir(retptr, addHeapObject(program));
|
|
343
335
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
344
336
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
345
337
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
346
338
|
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
347
|
-
var
|
|
348
|
-
var
|
|
339
|
+
var ptr1 = r0;
|
|
340
|
+
var len1 = r1;
|
|
349
341
|
if (r3) {
|
|
350
|
-
|
|
342
|
+
ptr1 = 0; len1 = 0;
|
|
351
343
|
throw takeObject(r2);
|
|
352
344
|
}
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
return getStringFromWasm0(
|
|
345
|
+
deferred2_0 = ptr1;
|
|
346
|
+
deferred2_1 = len1;
|
|
347
|
+
return getStringFromWasm0(ptr1, len1);
|
|
356
348
|
} finally {
|
|
357
349
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
358
|
-
wasm.__wbindgen_export_4(
|
|
350
|
+
wasm.__wbindgen_export_4(deferred2_0, deferred2_1, 1);
|
|
359
351
|
}
|
|
360
352
|
}
|
|
361
353
|
|
|
362
354
|
/**
|
|
363
|
-
* @param {
|
|
355
|
+
* @param {IProgramConfig} program
|
|
364
356
|
* @param {string} params
|
|
365
|
-
* @param {(string)[]} language_features
|
|
366
|
-
* @param {string} targetProfile
|
|
367
357
|
* @returns {string}
|
|
368
358
|
*/
|
|
369
|
-
export function get_estimates(
|
|
370
|
-
let
|
|
371
|
-
let
|
|
359
|
+
export function get_estimates(program, params) {
|
|
360
|
+
let deferred3_0;
|
|
361
|
+
let deferred3_1;
|
|
372
362
|
try {
|
|
373
363
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
374
|
-
const ptr0 =
|
|
364
|
+
const ptr0 = passStringToWasm0(params, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
375
365
|
const len0 = WASM_VECTOR_LEN;
|
|
376
|
-
|
|
377
|
-
const len1 = WASM_VECTOR_LEN;
|
|
378
|
-
const ptr2 = passArrayJsValueToWasm0(language_features, wasm.__wbindgen_export_0);
|
|
379
|
-
const len2 = WASM_VECTOR_LEN;
|
|
380
|
-
const ptr3 = passStringToWasm0(targetProfile, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
381
|
-
const len3 = WASM_VECTOR_LEN;
|
|
382
|
-
wasm.get_estimates(retptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
366
|
+
wasm.get_estimates(retptr, addHeapObject(program), ptr0, len0);
|
|
383
367
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
384
368
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
385
369
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
386
370
|
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
387
|
-
var
|
|
388
|
-
var
|
|
371
|
+
var ptr2 = r0;
|
|
372
|
+
var len2 = r1;
|
|
389
373
|
if (r3) {
|
|
390
|
-
|
|
374
|
+
ptr2 = 0; len2 = 0;
|
|
391
375
|
throw takeObject(r2);
|
|
392
376
|
}
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
return getStringFromWasm0(
|
|
377
|
+
deferred3_0 = ptr2;
|
|
378
|
+
deferred3_1 = len2;
|
|
379
|
+
return getStringFromWasm0(ptr2, len2);
|
|
396
380
|
} finally {
|
|
397
381
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
398
|
-
wasm.__wbindgen_export_4(
|
|
382
|
+
wasm.__wbindgen_export_4(deferred3_0, deferred3_1, 1);
|
|
399
383
|
}
|
|
400
384
|
}
|
|
401
385
|
|
|
402
386
|
/**
|
|
403
|
-
* @param {
|
|
404
|
-
* @param {string} targetProfile
|
|
405
|
-
* @param {(string)[]} language_features
|
|
387
|
+
* @param {IProgramConfig} program
|
|
406
388
|
* @param {boolean} simulate
|
|
407
389
|
* @param {IOperationInfo | undefined} [operation]
|
|
408
390
|
* @returns {any}
|
|
409
391
|
*/
|
|
410
|
-
export function get_circuit(
|
|
392
|
+
export function get_circuit(program, simulate, operation) {
|
|
411
393
|
try {
|
|
412
394
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
413
|
-
|
|
414
|
-
const len0 = WASM_VECTOR_LEN;
|
|
415
|
-
const ptr1 = passStringToWasm0(targetProfile, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
416
|
-
const len1 = WASM_VECTOR_LEN;
|
|
417
|
-
const ptr2 = passArrayJsValueToWasm0(language_features, wasm.__wbindgen_export_0);
|
|
418
|
-
const len2 = WASM_VECTOR_LEN;
|
|
419
|
-
wasm.get_circuit(retptr, ptr0, len0, ptr1, len1, ptr2, len2, simulate, isLikeNone(operation) ? 0 : addHeapObject(operation));
|
|
395
|
+
wasm.get_circuit(retptr, addHeapObject(program), simulate, isLikeNone(operation) ? 0 : addHeapObject(operation));
|
|
420
396
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
421
397
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
422
398
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -527,26 +503,18 @@ export function get_hir(code, language_features, profile) {
|
|
|
527
503
|
}
|
|
528
504
|
|
|
529
505
|
/**
|
|
530
|
-
* @param {
|
|
506
|
+
* @param {IProgramConfig} program
|
|
531
507
|
* @param {string} expr
|
|
532
508
|
* @param {Function} event_cb
|
|
533
509
|
* @param {number} shots
|
|
534
|
-
* @param {(string)[]} language_features
|
|
535
|
-
* @param {string} profile
|
|
536
510
|
* @returns {boolean}
|
|
537
511
|
*/
|
|
538
|
-
export function run(
|
|
512
|
+
export function run(program, expr, event_cb, shots) {
|
|
539
513
|
try {
|
|
540
514
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
541
|
-
const ptr0 =
|
|
515
|
+
const ptr0 = passStringToWasm0(expr, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
542
516
|
const len0 = WASM_VECTOR_LEN;
|
|
543
|
-
|
|
544
|
-
const len1 = WASM_VECTOR_LEN;
|
|
545
|
-
const ptr2 = passArrayJsValueToWasm0(language_features, wasm.__wbindgen_export_0);
|
|
546
|
-
const len2 = WASM_VECTOR_LEN;
|
|
547
|
-
const ptr3 = passStringToWasm0(profile, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
548
|
-
const len3 = WASM_VECTOR_LEN;
|
|
549
|
-
wasm.run(retptr, ptr0, len0, ptr1, len1, addBorrowedObject(event_cb), shots, ptr2, len2, ptr3, len3);
|
|
517
|
+
wasm.run(retptr, addHeapObject(program), ptr0, len0, addBorrowedObject(event_cb), shots);
|
|
550
518
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
551
519
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
552
520
|
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
@@ -578,26 +546,18 @@ export function check_exercise_solution(solution_code, exercise_sources_js, even
|
|
|
578
546
|
}
|
|
579
547
|
|
|
580
548
|
/**
|
|
581
|
-
* @param {
|
|
582
|
-
* @param {string | undefined} [targetProfile]
|
|
583
|
-
* @param {(string)[] | undefined} [languageFeatures]
|
|
549
|
+
* @param {IProgramConfig | undefined} [additional_program]
|
|
584
550
|
* @returns {(IDocFile)[]}
|
|
585
551
|
*/
|
|
586
|
-
export function generate_docs(
|
|
552
|
+
export function generate_docs(additional_program) {
|
|
587
553
|
try {
|
|
588
554
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
589
|
-
|
|
590
|
-
var len0 = WASM_VECTOR_LEN;
|
|
591
|
-
var ptr1 = isLikeNone(targetProfile) ? 0 : passStringToWasm0(targetProfile, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
592
|
-
var len1 = WASM_VECTOR_LEN;
|
|
593
|
-
var ptr2 = isLikeNone(languageFeatures) ? 0 : passArrayJsValueToWasm0(languageFeatures, wasm.__wbindgen_export_0);
|
|
594
|
-
var len2 = WASM_VECTOR_LEN;
|
|
595
|
-
wasm.generate_docs(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
555
|
+
wasm.generate_docs(retptr, isLikeNone(additional_program) ? 0 : addHeapObject(additional_program));
|
|
596
556
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
597
557
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
598
|
-
var
|
|
558
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
599
559
|
wasm.__wbindgen_export_4(r0, r1 * 4, 4);
|
|
600
|
-
return
|
|
560
|
+
return v1;
|
|
601
561
|
} finally {
|
|
602
562
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
603
563
|
}
|
|
@@ -610,7 +570,7 @@ function handleError(f, args) {
|
|
|
610
570
|
wasm.__wbindgen_export_5(addHeapObject(e));
|
|
611
571
|
}
|
|
612
572
|
}
|
|
613
|
-
function
|
|
573
|
+
function __wbg_adapter_186(arg0, arg1, arg2, arg3) {
|
|
614
574
|
wasm.__wbindgen_export_6(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
615
575
|
}
|
|
616
576
|
|
|
@@ -644,34 +604,26 @@ export class DebugService {
|
|
|
644
604
|
return this;
|
|
645
605
|
}
|
|
646
606
|
/**
|
|
647
|
-
* @param {
|
|
648
|
-
* @param {string}
|
|
649
|
-
* @param {string | undefined} entry
|
|
650
|
-
* @param {(string)[]} language_features
|
|
607
|
+
* @param {IProgramConfig} program
|
|
608
|
+
* @param {string | undefined} [entry]
|
|
651
609
|
* @returns {string}
|
|
652
610
|
*/
|
|
653
|
-
|
|
654
|
-
let
|
|
655
|
-
let
|
|
611
|
+
load_program(program, entry) {
|
|
612
|
+
let deferred2_0;
|
|
613
|
+
let deferred2_1;
|
|
656
614
|
try {
|
|
657
615
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
const len1 = WASM_VECTOR_LEN;
|
|
662
|
-
var ptr2 = isLikeNone(entry) ? 0 : passStringToWasm0(entry, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
663
|
-
var len2 = WASM_VECTOR_LEN;
|
|
664
|
-
const ptr3 = passArrayJsValueToWasm0(language_features, wasm.__wbindgen_export_0);
|
|
665
|
-
const len3 = WASM_VECTOR_LEN;
|
|
666
|
-
wasm.debugservice_load_source(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3);
|
|
616
|
+
var ptr0 = isLikeNone(entry) ? 0 : passStringToWasm0(entry, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
617
|
+
var len0 = WASM_VECTOR_LEN;
|
|
618
|
+
wasm.debugservice_load_program(retptr, this.__wbg_ptr, addHeapObject(program), ptr0, len0);
|
|
667
619
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
668
620
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
669
|
-
|
|
670
|
-
|
|
621
|
+
deferred2_0 = r0;
|
|
622
|
+
deferred2_1 = r1;
|
|
671
623
|
return getStringFromWasm0(r0, r1);
|
|
672
624
|
} finally {
|
|
673
625
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
674
|
-
wasm.__wbindgen_export_4(
|
|
626
|
+
wasm.__wbindgen_export_4(deferred2_0, deferred2_1, 1);
|
|
675
627
|
}
|
|
676
628
|
}
|
|
677
629
|
/**
|
|
@@ -844,13 +796,11 @@ export class LanguageService {
|
|
|
844
796
|
}
|
|
845
797
|
/**
|
|
846
798
|
* @param {(uri: string, version: number | undefined, diagnostics: VSDiagnostic[]) => void} diagnostics_callback
|
|
847
|
-
* @param {
|
|
848
|
-
* @param {(uri: string) => Promise<[string, number][]>} list_directory
|
|
849
|
-
* @param {(uri: string) => Promise<{ manifestDirectory: string }| null>} get_manifest
|
|
799
|
+
* @param {IProjectHost} host
|
|
850
800
|
* @returns {Promise<any>}
|
|
851
801
|
*/
|
|
852
|
-
start_background_work(diagnostics_callback,
|
|
853
|
-
const ret = wasm.languageservice_start_background_work(this.__wbg_ptr, addHeapObject(diagnostics_callback), addHeapObject(
|
|
802
|
+
start_background_work(diagnostics_callback, host) {
|
|
803
|
+
const ret = wasm.languageservice_start_background_work(this.__wbg_ptr, addHeapObject(diagnostics_callback), addHeapObject(host));
|
|
854
804
|
return takeObject(ret);
|
|
855
805
|
}
|
|
856
806
|
/**
|
|
@@ -1075,21 +1025,21 @@ export class ProjectLoader {
|
|
|
1075
1025
|
wasm.__wbg_projectloader_free(ptr);
|
|
1076
1026
|
}
|
|
1077
1027
|
/**
|
|
1078
|
-
* @param {
|
|
1079
|
-
* @param {(uri: string) => Promise<[string, number][]>} list_directory
|
|
1080
|
-
* @param {(uri: string) => Promise<{ manifestDirectory: string }| null>} get_manifest
|
|
1028
|
+
* @param {IProjectHost} project_host
|
|
1081
1029
|
*/
|
|
1082
|
-
constructor(
|
|
1083
|
-
const ret = wasm.projectloader_new(addHeapObject(
|
|
1030
|
+
constructor(project_host) {
|
|
1031
|
+
const ret = wasm.projectloader_new(addHeapObject(project_host));
|
|
1084
1032
|
this.__wbg_ptr = ret >>> 0;
|
|
1085
1033
|
return this;
|
|
1086
1034
|
}
|
|
1087
1035
|
/**
|
|
1088
|
-
* @param {
|
|
1089
|
-
* @returns {Promise<
|
|
1036
|
+
* @param {string} directory
|
|
1037
|
+
* @returns {Promise<IProjectConfig>}
|
|
1090
1038
|
*/
|
|
1091
|
-
load_project(
|
|
1092
|
-
const
|
|
1039
|
+
load_project(directory) {
|
|
1040
|
+
const ptr0 = passStringToWasm0(directory, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
1041
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1042
|
+
const ret = wasm.projectloader_load_project(this.__wbg_ptr, ptr0, len0);
|
|
1093
1043
|
return takeObject(ret);
|
|
1094
1044
|
}
|
|
1095
1045
|
}
|
|
@@ -1145,6 +1095,10 @@ function __wbg_get_imports() {
|
|
|
1145
1095
|
imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
|
|
1146
1096
|
takeObject(arg0);
|
|
1147
1097
|
};
|
|
1098
|
+
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
1099
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1100
|
+
return addHeapObject(ret);
|
|
1101
|
+
};
|
|
1148
1102
|
imports.wbg.__wbindgen_cb_drop = function(arg0) {
|
|
1149
1103
|
const obj = takeObject(arg0).original;
|
|
1150
1104
|
if (obj.cnt-- == 1) {
|
|
@@ -1184,10 +1138,6 @@ function __wbg_get_imports() {
|
|
|
1184
1138
|
const ret = BigInt.asUintN(64, arg0);
|
|
1185
1139
|
return addHeapObject(ret);
|
|
1186
1140
|
};
|
|
1187
|
-
imports.wbg.__wbindgen_error_new = function(arg0, arg1) {
|
|
1188
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
1189
|
-
return addHeapObject(ret);
|
|
1190
|
-
};
|
|
1191
1141
|
imports.wbg.__wbindgen_is_undefined = function(arg0) {
|
|
1192
1142
|
const ret = getObject(arg0) === undefined;
|
|
1193
1143
|
return ret;
|
|
@@ -1223,9 +1173,23 @@ function __wbg_get_imports() {
|
|
|
1223
1173
|
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
1224
1174
|
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
1225
1175
|
};
|
|
1226
|
-
imports.wbg.
|
|
1227
|
-
const ret = getObject(
|
|
1228
|
-
|
|
1176
|
+
imports.wbg.__wbg_profile_431ee5e29ff55ee3 = function(arg0, arg1) {
|
|
1177
|
+
const ret = getObject(arg1).profile;
|
|
1178
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
1179
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1180
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
1181
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
1182
|
+
};
|
|
1183
|
+
imports.wbg.__wbg_sources_604e3e26bf93d80c = function(arg0) {
|
|
1184
|
+
const ret = getObject(arg0).sources;
|
|
1185
|
+
return addHeapObject(ret);
|
|
1186
|
+
};
|
|
1187
|
+
imports.wbg.__wbg_languageFeatures_ebc106d4e512fb1c = function(arg0, arg1) {
|
|
1188
|
+
const ret = getObject(arg1).languageFeatures;
|
|
1189
|
+
const ptr1 = passArrayJsValueToWasm0(ret, wasm.__wbindgen_export_0);
|
|
1190
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1191
|
+
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
1192
|
+
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
1229
1193
|
};
|
|
1230
1194
|
imports.wbg.__wbindgen_is_function = function(arg0) {
|
|
1231
1195
|
const ret = typeof(getObject(arg0)) === 'function';
|
|
@@ -1239,6 +1203,22 @@ function __wbg_get_imports() {
|
|
|
1239
1203
|
const ret = getObject(arg0);
|
|
1240
1204
|
return addHeapObject(ret);
|
|
1241
1205
|
};
|
|
1206
|
+
imports.wbg.__wbg_readFile_3776aacd85682587 = function(arg0, arg1, arg2) {
|
|
1207
|
+
const ret = getObject(arg0).readFile(getStringFromWasm0(arg1, arg2));
|
|
1208
|
+
return addHeapObject(ret);
|
|
1209
|
+
};
|
|
1210
|
+
imports.wbg.__wbg_listDirectory_271976dbfbb2dc9f = function(arg0, arg1, arg2) {
|
|
1211
|
+
const ret = getObject(arg0).listDirectory(getStringFromWasm0(arg1, arg2));
|
|
1212
|
+
return addHeapObject(ret);
|
|
1213
|
+
};
|
|
1214
|
+
imports.wbg.__wbg_resolvePath_674360b3ad1067f3 = function(arg0, arg1, arg2, arg3, arg4) {
|
|
1215
|
+
const ret = getObject(arg0).resolvePath(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4));
|
|
1216
|
+
return addHeapObject(ret);
|
|
1217
|
+
};
|
|
1218
|
+
imports.wbg.__wbg_findManifestDirectory_1e22fa316acdbeff = function(arg0, arg1, arg2) {
|
|
1219
|
+
const ret = getObject(arg0).findManifestDirectory(getStringFromWasm0(arg1, arg2));
|
|
1220
|
+
return addHeapObject(ret);
|
|
1221
|
+
};
|
|
1242
1222
|
imports.wbg.__wbindgen_jsval_loose_eq = function(arg0, arg1) {
|
|
1243
1223
|
const ret = getObject(arg0) == getObject(arg1);
|
|
1244
1224
|
return ret;
|
|
@@ -1353,10 +1333,6 @@ function __wbg_get_imports() {
|
|
|
1353
1333
|
const ret = Array.isArray(getObject(arg0));
|
|
1354
1334
|
return ret;
|
|
1355
1335
|
};
|
|
1356
|
-
imports.wbg.__wbg_push_a5b05aedc7234f9f = function(arg0, arg1) {
|
|
1357
|
-
const ret = getObject(arg0).push(getObject(arg1));
|
|
1358
|
-
return ret;
|
|
1359
|
-
};
|
|
1360
1336
|
imports.wbg.__wbg_instanceof_ArrayBuffer_836825be07d4c9d2 = function(arg0) {
|
|
1361
1337
|
let result;
|
|
1362
1338
|
try {
|
|
@@ -1404,7 +1380,7 @@ function __wbg_get_imports() {
|
|
|
1404
1380
|
const a = state0.a;
|
|
1405
1381
|
state0.a = 0;
|
|
1406
1382
|
try {
|
|
1407
|
-
return
|
|
1383
|
+
return __wbg_adapter_186(a, state0.b, arg0, arg1);
|
|
1408
1384
|
} finally {
|
|
1409
1385
|
state0.a = a;
|
|
1410
1386
|
}
|
|
@@ -1496,8 +1472,8 @@ function __wbg_get_imports() {
|
|
|
1496
1472
|
const ret = wasm.memory;
|
|
1497
1473
|
return addHeapObject(ret);
|
|
1498
1474
|
};
|
|
1499
|
-
imports.wbg.
|
|
1500
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
1475
|
+
imports.wbg.__wbindgen_closure_wrapper803 = function(arg0, arg1, arg2) {
|
|
1476
|
+
const ret = makeMutClosure(arg0, arg1, 342, __wbg_adapter_52);
|
|
1501
1477
|
return addHeapObject(ret);
|
|
1502
1478
|
};
|
|
1503
1479
|
|
package/lib/web/qsc_wasm_bg.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
package/ux/estimatesOverview.tsx
CHANGED
|
@@ -183,6 +183,7 @@ export function EstimatesOverview(props: {
|
|
|
183
183
|
isSimplifiedView: boolean;
|
|
184
184
|
onRowDeleted: (rowId: string) => void;
|
|
185
185
|
setEstimate: (estimate: SingleEstimateResult | null) => void;
|
|
186
|
+
allowSaveImage: boolean;
|
|
186
187
|
}) {
|
|
187
188
|
const [selectedRow, setSelectedRow] = useState<string | null>(null);
|
|
188
189
|
const [selectedPoint, setSelectedPoint] = useState<[number, number]>();
|
|
@@ -277,6 +278,7 @@ export function EstimatesOverview(props: {
|
|
|
277
278
|
)}
|
|
278
279
|
onPointSelected={onPointSelected}
|
|
279
280
|
selectedPoint={selectedPoint}
|
|
281
|
+
allowSaveImage={props.allowSaveImage}
|
|
280
282
|
/>
|
|
281
283
|
);
|
|
282
284
|
}
|
package/ux/estimatesPanel.tsx
CHANGED
|
@@ -14,6 +14,7 @@ export function EstimatesPanel(props: {
|
|
|
14
14
|
runNames: string[];
|
|
15
15
|
calculating: boolean;
|
|
16
16
|
onRowDeleted: (rowId: string) => void;
|
|
17
|
+
allowSaveImage?: boolean;
|
|
17
18
|
}) {
|
|
18
19
|
const [estimate, setEstimate] = useState<SingleEstimateResult | null>(null);
|
|
19
20
|
|
|
@@ -63,6 +64,7 @@ export function EstimatesPanel(props: {
|
|
|
63
64
|
setEstimate={setEstimate}
|
|
64
65
|
runNames={props.runNames}
|
|
65
66
|
colors={props.colors}
|
|
67
|
+
allowSaveImage={props.allowSaveImage || false}
|
|
66
68
|
></EstimatesOverview>
|
|
67
69
|
{!estimate ? null : (
|
|
68
70
|
<>
|
package/ux/qsharp-ux.css
CHANGED
|
@@ -46,6 +46,7 @@ modern-normalize (see https://mattbrictson.com/blog/css-normalize-and-reset for
|
|
|
46
46
|
--border-color: #768f9c;
|
|
47
47
|
--menu-box-fill: var(--main-background);
|
|
48
48
|
--error-background-color: #ffe3e3;
|
|
49
|
+
--warning-background-color: #fff6d7;
|
|
49
50
|
--bar-selected-outline: #587ddd;
|
|
50
51
|
}
|
|
51
52
|
|
|
@@ -200,30 +201,37 @@ html {
|
|
|
200
201
|
cursor: default;
|
|
201
202
|
}
|
|
202
203
|
|
|
203
|
-
.
|
|
204
|
+
.diag-list {
|
|
204
205
|
margin-top: 24px;
|
|
205
206
|
margin-bottom: 24px;
|
|
206
207
|
min-height: 48px;
|
|
207
208
|
}
|
|
208
209
|
|
|
209
|
-
.
|
|
210
|
+
.diag-row {
|
|
210
211
|
border: 1px solid var(--border-color);
|
|
211
|
-
background-color: var(--error-background-color);
|
|
212
212
|
padding: 4px;
|
|
213
213
|
border-bottom: 0.5px solid gray;
|
|
214
214
|
font-size: 0.9rem;
|
|
215
215
|
margin-bottom: -1px;
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
-
.
|
|
218
|
+
.diag-row > span {
|
|
219
219
|
font-weight: 200;
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
-
.
|
|
222
|
+
.diag-help {
|
|
223
223
|
font-weight: 200;
|
|
224
224
|
font-style: italic;
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
+
.error-row {
|
|
228
|
+
background-color: var(--error-background-color);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
.warning-row {
|
|
232
|
+
background-color: var(--warning-background-color);
|
|
233
|
+
}
|
|
234
|
+
|
|
227
235
|
/* Katas */
|
|
228
236
|
|
|
229
237
|
.kata-override {
|
|
@@ -711,3 +719,20 @@ html {
|
|
|
711
719
|
.qs-estimatesOverview-error {
|
|
712
720
|
color: red;
|
|
713
721
|
}
|
|
722
|
+
|
|
723
|
+
.qs-estimatesOverview-saveIcon {
|
|
724
|
+
cursor: pointer;
|
|
725
|
+
width: 3em;
|
|
726
|
+
height: 3em;
|
|
727
|
+
background-color: var(--main-background);
|
|
728
|
+
position: absolute;
|
|
729
|
+
bottom: 5px;
|
|
730
|
+
left: 5px;
|
|
731
|
+
border: none;
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
.qs-estimatesOverview-saveIconSvgPath {
|
|
735
|
+
fill: var(--main-color) !important;
|
|
736
|
+
fill-rule: evenodd !important;
|
|
737
|
+
clip-rule: evenodd !important;
|
|
738
|
+
}
|