@sanity/vision 6.11.0 → 6.12.0-next.18

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.
@@ -2133,123 +2133,119 @@ function SaveJsonButton(t0) {
2133
2133
  }), $[0] = blobUrl, $[1] = t1), t1;
2134
2134
  }
2135
2135
  function VisionGuiResult(t0) {
2136
- let $ = c(84), { error, queryInProgress, queryResult, listenInProgress, listenMutations, dataset, queryTime, e2eTime, compactFooter: t1 } = t0, compactFooter = t1 !== void 0 && t1, { t } = useTranslation(visionLocaleNamespace), hasResult = !error && !queryInProgress && queryResult !== void 0, t2;
2137
- $[0] !== hasResult || $[1] !== queryResult ? (t2 = hasResult ? getJsonBlobUrl(queryResult) : "", $[0] = hasResult, $[1] = queryResult, $[2] = t2) : t2 = $[2];
2138
- let jsonUrl = t2, t3;
2139
- $[3] !== hasResult || $[4] !== queryResult ? (t3 = hasResult ? getCsvBlobUrl(queryResult) : "", $[3] = hasResult, $[4] = queryResult, $[5] = t3) : t3 = $[5];
2140
- let csvUrl = t3, t4 = error ? "critical" : "default", t5 = !!error, t6;
2141
- $[6] === t ? t6 = $[7] : (t6 = t("result.label"), $[6] = t, $[7] = t6);
2142
- let t7;
2143
- $[8] === t6 ? t7 = $[9] : (t7 = /* @__PURE__ */ jsx(InputBackgroundContainer, { children: /* @__PURE__ */ jsx(Box, {
2136
+ let $ = c(77), { error, queryInProgress, queryResult, listenInProgress, listenMutations, dataset, queryTime, e2eTime, compactFooter: t1 } = t0, compactFooter = t1 !== void 0 && t1, { t } = useTranslation(visionLocaleNamespace), hasResult = !error && !queryInProgress && queryResult !== void 0, t2 = error ? "critical" : "default", t3 = !!error, t4;
2137
+ $[0] === t ? t4 = $[1] : (t4 = t("result.label"), $[0] = t, $[1] = t4);
2138
+ let t5;
2139
+ $[2] === t4 ? t5 = $[3] : (t5 = /* @__PURE__ */ jsx(InputBackgroundContainer, { children: /* @__PURE__ */ jsx(Box, {
2144
2140
  marginLeft: 3,
2145
2141
  children: /* @__PURE__ */ jsx(StyledLabel, {
2146
2142
  muted: !0,
2147
- children: t6
2143
+ children: t4
2148
2144
  })
2149
- }) }), $[8] = t6, $[9] = t7);
2150
- let t8;
2151
- $[10] !== listenInProgress || $[11] !== listenMutations || $[12] !== queryInProgress ? (t8 = (queryInProgress || listenInProgress && listenMutations.length === 0) && /* @__PURE__ */ jsx(Box, {
2145
+ }) }), $[2] = t4, $[3] = t5);
2146
+ let t6;
2147
+ $[4] !== listenInProgress || $[5] !== listenMutations || $[6] !== queryInProgress ? (t6 = (queryInProgress || listenInProgress && listenMutations.length === 0) && /* @__PURE__ */ jsx(Box, {
2152
2148
  marginTop: 3,
2153
2149
  children: /* @__PURE__ */ jsx(DelayedSpinner, {})
2154
- }), $[10] = listenInProgress, $[11] = listenMutations, $[12] = queryInProgress, $[13] = t8) : t8 = $[13];
2155
- let t9;
2156
- $[14] === error ? t9 = $[15] : (t9 = error && /* @__PURE__ */ jsx(QueryErrorDialog, { error }), $[14] = error, $[15] = t9);
2157
- let t10;
2158
- $[16] !== dataset || $[17] !== hasResult || $[18] !== queryResult ? (t10 = hasResult && /* @__PURE__ */ jsx(ResultView, {
2150
+ }), $[4] = listenInProgress, $[5] = listenMutations, $[6] = queryInProgress, $[7] = t6) : t6 = $[7];
2151
+ let t7;
2152
+ $[8] === error ? t7 = $[9] : (t7 = error && /* @__PURE__ */ jsx(QueryErrorDialog, { error }), $[8] = error, $[9] = t7);
2153
+ let t8;
2154
+ $[10] !== dataset || $[11] !== hasResult || $[12] !== queryResult ? (t8 = hasResult && /* @__PURE__ */ jsx(ResultView, {
2159
2155
  data: queryResult,
2160
2156
  datasetName: dataset
2161
- }), $[16] = dataset, $[17] = hasResult, $[18] = queryResult, $[19] = t10) : t10 = $[19];
2162
- let t11;
2163
- $[20] !== dataset || $[21] !== listenInProgress || $[22] !== listenMutations ? (t11 = listenInProgress && listenMutations.length > 0 && /* @__PURE__ */ jsx(ResultView, {
2157
+ }), $[10] = dataset, $[11] = hasResult, $[12] = queryResult, $[13] = t8) : t8 = $[13];
2158
+ let t9;
2159
+ $[14] !== dataset || $[15] !== listenInProgress || $[16] !== listenMutations ? (t9 = listenInProgress && listenMutations.length > 0 && /* @__PURE__ */ jsx(ResultView, {
2164
2160
  data: listenMutations,
2165
2161
  datasetName: dataset
2166
- }), $[20] = dataset, $[21] = listenInProgress, $[22] = listenMutations, $[23] = t11) : t11 = $[23];
2167
- let t12;
2168
- $[24] !== t10 || $[25] !== t11 || $[26] !== t8 || $[27] !== t9 ? (t12 = /* @__PURE__ */ jsxs(Box, {
2162
+ }), $[14] = dataset, $[15] = listenInProgress, $[16] = listenMutations, $[17] = t9) : t9 = $[17];
2163
+ let t10;
2164
+ $[18] !== t6 || $[19] !== t7 || $[20] !== t8 || $[21] !== t9 ? (t10 = /* @__PURE__ */ jsxs(Box, {
2169
2165
  padding: 3,
2170
2166
  paddingTop: 5,
2171
2167
  children: [
2168
+ t6,
2169
+ t7,
2172
2170
  t8,
2173
- t9,
2174
- t10,
2175
- t11
2171
+ t9
2176
2172
  ]
2177
- }), $[24] = t10, $[25] = t11, $[26] = t8, $[27] = t9, $[28] = t12) : t12 = $[28];
2178
- let t13;
2179
- $[29] !== t12 || $[30] !== t7 ? (t13 = /* @__PURE__ */ jsxs(Result, {
2173
+ }), $[18] = t6, $[19] = t7, $[20] = t8, $[21] = t9, $[22] = t10) : t10 = $[22];
2174
+ let t11;
2175
+ $[23] !== t10 || $[24] !== t5 ? (t11 = /* @__PURE__ */ jsxs(Result, {
2180
2176
  overflow: "auto",
2181
- children: [t7, t12]
2182
- }), $[29] = t12, $[30] = t7, $[31] = t13) : t13 = $[31];
2183
- let t14;
2184
- $[32] !== t13 || $[33] !== t4 || $[34] !== t5 ? (t14 = /* @__PURE__ */ jsx(ResultInnerContainer, {
2177
+ children: [t5, t10]
2178
+ }), $[23] = t10, $[24] = t5, $[25] = t11) : t11 = $[25];
2179
+ let t12;
2180
+ $[26] !== t11 || $[27] !== t2 || $[28] !== t3 ? (t12 = /* @__PURE__ */ jsx(ResultInnerContainer, {
2185
2181
  flexBasis: "0%",
2186
2182
  flexGrow: 1,
2187
2183
  children: /* @__PURE__ */ jsx(ResultContainer, {
2188
2184
  flex: 1,
2189
2185
  overflow: "hidden",
2190
- tone: t4,
2191
- isInvalid: t5,
2192
- children: t13
2186
+ tone: t2,
2187
+ isInvalid: t3,
2188
+ children: t11
2193
2189
  })
2194
- }), $[32] = t13, $[33] = t4, $[34] = t5, $[35] = t14) : t14 = $[35];
2195
- let t15 = compactFooter ? "flex-start" : "space-between", t16 = compactFooter ? "stretch" : void 0, t17;
2196
- $[36] === compactFooter ? t17 = $[37] : (t17 = compactFooter ? "column" : [
2190
+ }), $[26] = t11, $[27] = t2, $[28] = t3, $[29] = t12) : t12 = $[29];
2191
+ let t13 = compactFooter ? "flex-start" : "space-between", t14 = compactFooter ? "stretch" : void 0, t15;
2192
+ $[30] === compactFooter ? t15 = $[31] : (t15 = compactFooter ? "column" : [
2197
2193
  "column",
2198
2194
  "column",
2199
2195
  "row"
2200
- ], $[36] = compactFooter, $[37] = t17);
2201
- let t18 = compactFooter ? 3 : 4, t19 = compactFooter ? 2 : 3, t20;
2202
- $[38] === compactFooter ? t20 = $[39] : (t20 = compactFooter ? { width: "100%" } : { minWidth: 0 }, $[38] = compactFooter, $[39] = t20);
2203
- let t21 = compactFooter ? 1 : 2, t22;
2204
- $[40] === t ? t22 = $[41] : (t22 = t("result.execution-time-label"), $[40] = t, $[41] = t22);
2205
- let t23;
2206
- $[42] !== queryTime || $[43] !== t ? (t23 = typeof queryTime == "number" ? `${queryTime}ms` : t("result.timing-not-applicable"), $[42] = queryTime, $[43] = t, $[44] = t23) : t23 = $[44];
2207
- let t24;
2208
- $[45] !== t21 || $[46] !== t22 || $[47] !== t23 ? (t24 = /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsxs(Text, {
2196
+ ], $[30] = compactFooter, $[31] = t15);
2197
+ let t16 = compactFooter ? 3 : 4, t17 = compactFooter ? 2 : 3, t18;
2198
+ $[32] === compactFooter ? t18 = $[33] : (t18 = compactFooter ? { width: "100%" } : { minWidth: 0 }, $[32] = compactFooter, $[33] = t18);
2199
+ let t19 = compactFooter ? 1 : 2, t20;
2200
+ $[34] === t ? t20 = $[35] : (t20 = t("result.execution-time-label"), $[34] = t, $[35] = t20);
2201
+ let t21;
2202
+ $[36] !== queryTime || $[37] !== t ? (t21 = typeof queryTime == "number" ? `${queryTime}ms` : t("result.timing-not-applicable"), $[36] = queryTime, $[37] = t, $[38] = t21) : t21 = $[38];
2203
+ let t22;
2204
+ $[39] !== t19 || $[40] !== t20 || $[41] !== t21 ? (t22 = /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsxs(Text, {
2209
2205
  muted: !0,
2210
- size: t21,
2206
+ size: t19,
2211
2207
  children: [
2212
- t22,
2208
+ t20,
2213
2209
  ":",
2214
2210
  " ",
2215
- t23
2211
+ t21
2216
2212
  ]
2217
- }) }), $[45] = t21, $[46] = t22, $[47] = t23, $[48] = t24) : t24 = $[48];
2218
- let t25 = compactFooter ? 3 : 4, t26 = compactFooter ? 1 : 2, t27;
2219
- $[49] === t ? t27 = $[50] : (t27 = t("result.end-to-end-time-label"), $[49] = t, $[50] = t27);
2220
- let t28;
2221
- $[51] !== e2eTime || $[52] !== t ? (t28 = typeof e2eTime == "number" ? `${e2eTime}ms` : t("result.timing-not-applicable"), $[51] = e2eTime, $[52] = t, $[53] = t28) : t28 = $[53];
2222
- let t29;
2223
- $[54] !== t26 || $[55] !== t27 || $[56] !== t28 ? (t29 = /* @__PURE__ */ jsxs(Text, {
2213
+ }) }), $[39] = t19, $[40] = t20, $[41] = t21, $[42] = t22) : t22 = $[42];
2214
+ let t23 = compactFooter ? 3 : 4, t24 = compactFooter ? 1 : 2, t25;
2215
+ $[43] === t ? t25 = $[44] : (t25 = t("result.end-to-end-time-label"), $[43] = t, $[44] = t25);
2216
+ let t26;
2217
+ $[45] !== e2eTime || $[46] !== t ? (t26 = typeof e2eTime == "number" ? `${e2eTime}ms` : t("result.timing-not-applicable"), $[45] = e2eTime, $[46] = t, $[47] = t26) : t26 = $[47];
2218
+ let t27;
2219
+ $[48] !== t24 || $[49] !== t25 || $[50] !== t26 ? (t27 = /* @__PURE__ */ jsxs(Text, {
2224
2220
  muted: !0,
2225
- size: t26,
2221
+ size: t24,
2226
2222
  children: [
2227
- t27,
2223
+ t25,
2228
2224
  ":",
2229
2225
  " ",
2230
- t28
2226
+ t26
2231
2227
  ]
2232
- }), $[54] = t26, $[55] = t27, $[56] = t28, $[57] = t29) : t29 = $[57];
2228
+ }), $[48] = t24, $[49] = t25, $[50] = t26, $[51] = t27) : t27 = $[51];
2229
+ let t28;
2230
+ $[52] !== t23 || $[53] !== t27 ? (t28 = /* @__PURE__ */ jsx(Box, {
2231
+ marginLeft: t23,
2232
+ children: t27
2233
+ }), $[52] = t23, $[53] = t27, $[54] = t28) : t28 = $[54];
2234
+ let t29;
2235
+ $[55] !== t22 || $[56] !== t28 ? (t29 = /* @__PURE__ */ jsxs(TimingsTextContainer, {
2236
+ align: "center",
2237
+ children: [t22, t28]
2238
+ }), $[55] = t22, $[56] = t28, $[57] = t29) : t29 = $[57];
2233
2239
  let t30;
2234
- $[58] !== t25 || $[59] !== t29 ? (t30 = /* @__PURE__ */ jsx(Box, {
2235
- marginLeft: t25,
2240
+ $[58] !== t16 || $[59] !== t17 || $[60] !== t18 || $[61] !== t29 ? (t30 = /* @__PURE__ */ jsx(TimingsCard, {
2241
+ paddingX: t16,
2242
+ paddingY: t17,
2243
+ sizing: "border",
2244
+ style: t18,
2236
2245
  children: t29
2237
- }), $[58] = t25, $[59] = t29, $[60] = t30) : t30 = $[60];
2246
+ }), $[58] = t16, $[59] = t17, $[60] = t18, $[61] = t29, $[62] = t30) : t30 = $[62];
2238
2247
  let t31;
2239
- $[61] !== t24 || $[62] !== t30 ? (t31 = /* @__PURE__ */ jsxs(TimingsTextContainer, {
2240
- align: "center",
2241
- children: [t24, t30]
2242
- }), $[61] = t24, $[62] = t30, $[63] = t31) : t31 = $[63];
2243
- let t32;
2244
- $[64] !== t18 || $[65] !== t19 || $[66] !== t20 || $[67] !== t31 ? (t32 = /* @__PURE__ */ jsx(TimingsCard, {
2245
- paddingX: t18,
2246
- paddingY: t19,
2247
- sizing: "border",
2248
- style: t20,
2249
- children: t31
2250
- }), $[64] = t18, $[65] = t19, $[66] = t20, $[67] = t31, $[68] = t32) : t32 = $[68];
2251
- let t33;
2252
- $[69] !== compactFooter || $[70] !== csvUrl || $[71] !== hasResult || $[72] !== jsonUrl || $[73] !== t ? (t33 = hasResult && /* @__PURE__ */ jsx(DownloadsCard, {
2248
+ $[63] !== compactFooter || $[64] !== hasResult || $[65] !== queryResult || $[66] !== t ? (t31 = hasResult && /* @__PURE__ */ jsx(DownloadsCard, {
2253
2249
  paddingX: compactFooter ? 3 : 4,
2254
2250
  paddingY: compactFooter ? 2 : 3,
2255
2251
  sizing: "border",
@@ -2261,25 +2257,38 @@ function VisionGuiResult(t0) {
2261
2257
  muted: !0,
2262
2258
  size: compactFooter ? 1 : 2,
2263
2259
  children: /* @__PURE__ */ jsx(Translate, {
2264
- components: { SaveResultButtons: () => /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(SaveJsonButton, { blobUrl: jsonUrl }), /* @__PURE__ */ jsx(SaveCsvButton, { blobUrl: csvUrl })] }) },
2260
+ components: { SaveResultButtons },
2261
+ componentProps: { queryResult },
2265
2262
  i18nKey: "result.save-result-as-format",
2266
2263
  t
2267
2264
  })
2268
2265
  })
2269
- }), $[69] = compactFooter, $[70] = csvUrl, $[71] = hasResult, $[72] = jsonUrl, $[73] = t, $[74] = t33) : t33 = $[74];
2270
- let t34;
2271
- $[75] !== t15 || $[76] !== t16 || $[77] !== t17 || $[78] !== t32 || $[79] !== t33 ? (t34 = /* @__PURE__ */ jsxs(ResultFooter, {
2272
- justify: t15,
2273
- align: t16,
2274
- direction: t17,
2275
- children: [t32, t33]
2276
- }), $[75] = t15, $[76] = t16, $[77] = t17, $[78] = t32, $[79] = t33, $[80] = t34) : t34 = $[80];
2277
- let t35;
2278
- return $[81] !== t14 || $[82] !== t34 ? (t35 = /* @__PURE__ */ jsxs(ResultOuterContainer, {
2266
+ }), $[63] = compactFooter, $[64] = hasResult, $[65] = queryResult, $[66] = t, $[67] = t31) : t31 = $[67];
2267
+ let t32;
2268
+ $[68] !== t13 || $[69] !== t14 || $[70] !== t15 || $[71] !== t30 || $[72] !== t31 ? (t32 = /* @__PURE__ */ jsxs(ResultFooter, {
2269
+ justify: t13,
2270
+ align: t14,
2271
+ direction: t15,
2272
+ children: [t30, t31]
2273
+ }), $[68] = t13, $[69] = t14, $[70] = t15, $[71] = t30, $[72] = t31, $[73] = t32) : t32 = $[73];
2274
+ let t33;
2275
+ return $[74] !== t12 || $[75] !== t32 ? (t33 = /* @__PURE__ */ jsxs(ResultOuterContainer, {
2279
2276
  direction: "column",
2280
2277
  "data-testid": "vision-result",
2281
- children: [t14, t34]
2282
- }), $[81] = t14, $[82] = t34, $[83] = t35) : t35 = $[83], t35;
2278
+ children: [t12, t32]
2279
+ }), $[74] = t12, $[75] = t32, $[76] = t33) : t33 = $[76], t33;
2280
+ }
2281
+ function SaveResultButtons(t0) {
2282
+ let $ = c(11), { queryResult } = t0, t1;
2283
+ $[0] === queryResult ? t1 = $[1] : (t1 = getJsonBlobUrl(queryResult), $[0] = queryResult, $[1] = t1);
2284
+ let jsonUrl = t1, t2;
2285
+ $[2] === queryResult ? t2 = $[3] : (t2 = getCsvBlobUrl(queryResult), $[2] = queryResult, $[3] = t2);
2286
+ let csvUrl = t2, t3;
2287
+ $[4] === jsonUrl ? t3 = $[5] : (t3 = /* @__PURE__ */ jsx(SaveJsonButton, { blobUrl: jsonUrl }), $[4] = jsonUrl, $[5] = t3);
2288
+ let t4;
2289
+ $[6] === csvUrl ? t4 = $[7] : (t4 = /* @__PURE__ */ jsx(SaveCsvButton, { blobUrl: csvUrl }), $[6] = csvUrl, $[7] = t4);
2290
+ let t5;
2291
+ return $[8] !== t3 || $[9] !== t4 ? (t5 = /* @__PURE__ */ jsxs(Fragment$1, { children: [t3, t4] }), $[8] = t3, $[9] = t4, $[10] = t5) : t5 = $[10], t5;
2283
2292
  }
2284
2293
  function nodeContains(node, other) {
2285
2294
  return !node || !other ? !1 : node === other || !!(node.compareDocumentPosition(other) & 16);
@@ -2870,4 +2879,4 @@ function SanityVision(props) {
2870
2879
  }
2871
2880
  export { SanityVision as default };
2872
2881
 
2873
- //# sourceMappingURL=SanityVision-ChQxkYFr.js.map
2882
+ //# sourceMappingURL=SanityVision-DQ63H4kn.js.map