@sanity/ui 2.12.0-canary.0 → 2.12.0-canary.2

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.
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
- var jsxRuntime = require("react/jsx-runtime"), reactCompilerRuntime = require("react-compiler-runtime"), react = require("react"), styledComponents = require("styled-components"), theme = require("@sanity/ui/theme"), ReactIs = require("react-is"), icons = require("@sanity/icons"), Refractor = require("react-refractor"), reactDom$1 = require("@floating-ui/react-dom"), framerMotion = require("framer-motion"), reactDom = require("react-dom"), useEffectEvent = require("use-effect-event");
2
+ var jsxRuntime = require("react/jsx-runtime"), reactCompilerRuntime = require("react-compiler-runtime"), react = require("react"), styledComponents = require("styled-components"), theme = require("@sanity/ui/theme"), ReactIs = require("react-is"), icons = require("@sanity/icons"), reactDom$1 = require("@floating-ui/react-dom"), framerMotion = require("framer-motion"), resizeObserver = require("@juggle/resize-observer"), reactDom = require("react-dom"), useEffectEvent = require("use-effect-event");
3
3
  function _interopDefaultCompat(e) {
4
4
  return e && typeof e == "object" && "default" in e ? e : { default: e };
5
5
  }
6
- var ReactIs__default = /* @__PURE__ */ _interopDefaultCompat(ReactIs), Refractor__default = /* @__PURE__ */ _interopDefaultCompat(Refractor);
6
+ var ReactIs__default = /* @__PURE__ */ _interopDefaultCompat(ReactIs);
7
7
  const createColorTheme = theme.createColorTheme, hexToRgb = theme.hexToRgb, hslToRgb = theme.hslToRgb, multiply = theme.multiply, parseColor = theme.parseColor, rgbToHex = theme.rgbToHex, rgbToHsl = theme.rgbToHsl, rgba = theme.rgba, screen = theme.screen, studioTheme = theme.buildTheme(), EMPTY_ARRAY = [], EMPTY_RECORD = {}, POPOVER_MOTION_CONTENT_OPACITY_PROPERTY = "--motion-content-opacity", POPOVER_MOTION_PROPS = {
8
8
  initial: {
9
9
  opacity: 0.5,
@@ -194,295 +194,11 @@ function useCustomValidity(ref, customValidity) {
194
194
  let t1;
195
195
  $[3] !== customValidity || $[4] !== ref ? (t1 = [customValidity, ref], $[3] = customValidity, $[4] = ref, $[5] = t1) : t1 = $[5], react.useEffect(t0, t1);
196
196
  }
197
- var resizeObservers = [], hasActiveObservations = function() {
198
- return resizeObservers.some(function(ro) {
199
- return ro.activeTargets.length > 0;
200
- });
201
- }, hasSkippedObservations = function() {
202
- return resizeObservers.some(function(ro) {
203
- return ro.skippedTargets.length > 0;
204
- });
205
- }, msg = "ResizeObserver loop completed with undelivered notifications.", deliverResizeLoopError = function() {
206
- var event;
207
- typeof ErrorEvent == "function" ? event = new ErrorEvent("error", {
208
- message: msg
209
- }) : (event = document.createEvent("Event"), event.initEvent("error", !1, !1), event.message = msg), window.dispatchEvent(event);
210
- }, ResizeObserverBoxOptions;
211
- (function(ResizeObserverBoxOptions2) {
212
- ResizeObserverBoxOptions2.BORDER_BOX = "border-box", ResizeObserverBoxOptions2.CONTENT_BOX = "content-box", ResizeObserverBoxOptions2.DEVICE_PIXEL_CONTENT_BOX = "device-pixel-content-box";
213
- })(ResizeObserverBoxOptions || (ResizeObserverBoxOptions = {}));
214
- var freeze = function(obj) {
215
- return Object.freeze(obj);
216
- }, ResizeObserverSize = /* @__PURE__ */ function() {
217
- function ResizeObserverSize2(inlineSize, blockSize) {
218
- this.inlineSize = inlineSize, this.blockSize = blockSize, freeze(this);
219
- }
220
- return ResizeObserverSize2;
221
- }(), DOMRectReadOnly = function() {
222
- function DOMRectReadOnly2(x, y, width, height) {
223
- return this.x = x, this.y = y, this.width = width, this.height = height, this.top = this.y, this.left = this.x, this.bottom = this.top + this.height, this.right = this.left + this.width, freeze(this);
224
- }
225
- return DOMRectReadOnly2.prototype.toJSON = function() {
226
- var _a = this, x = _a.x, y = _a.y, top = _a.top, right = _a.right, bottom = _a.bottom, left = _a.left, width = _a.width, height = _a.height;
227
- return {
228
- x,
229
- y,
230
- top,
231
- right,
232
- bottom,
233
- left,
234
- width,
235
- height
236
- };
237
- }, DOMRectReadOnly2.fromRect = function(rectangle) {
238
- return new DOMRectReadOnly2(rectangle.x, rectangle.y, rectangle.width, rectangle.height);
239
- }, DOMRectReadOnly2;
240
- }(), isSVG = function(target) {
241
- return target instanceof SVGElement && "getBBox" in target;
242
- }, isHidden = function(target) {
243
- if (isSVG(target)) {
244
- var _a = target.getBBox(), width = _a.width, height = _a.height;
245
- return !width && !height;
246
- }
247
- var _b = target, offsetWidth = _b.offsetWidth, offsetHeight = _b.offsetHeight;
248
- return !(offsetWidth || offsetHeight || target.getClientRects().length);
249
- }, isElement = function(obj) {
250
- var _a;
251
- if (obj instanceof Element)
252
- return !0;
253
- var scope = (_a = obj?.ownerDocument) === null || _a === void 0 ? void 0 : _a.defaultView;
254
- return !!(scope && obj instanceof scope.Element);
255
- }, isReplacedElement = function(target) {
256
- switch (target.tagName) {
257
- case "INPUT":
258
- if (target.type !== "image")
259
- break;
260
- case "VIDEO":
261
- case "AUDIO":
262
- case "EMBED":
263
- case "OBJECT":
264
- case "CANVAS":
265
- case "IFRAME":
266
- case "IMG":
267
- return !0;
268
- }
269
- return !1;
270
- }, global$1 = typeof window < "u" ? window : {}, cache = /* @__PURE__ */ new WeakMap(), scrollRegexp = /auto|scroll/, verticalRegexp = /^tb|vertical/, IE = /msie|trident/i.test(global$1.navigator && global$1.navigator.userAgent), parseDimension = function(pixel) {
271
- return parseFloat(pixel || "0");
272
- }, size$1 = function(inlineSize, blockSize, switchSizes) {
273
- return inlineSize === void 0 && (inlineSize = 0), blockSize === void 0 && (blockSize = 0), switchSizes === void 0 && (switchSizes = !1), new ResizeObserverSize((switchSizes ? blockSize : inlineSize) || 0, (switchSizes ? inlineSize : blockSize) || 0);
274
- }, zeroBoxes = freeze({
275
- devicePixelContentBoxSize: size$1(),
276
- borderBoxSize: size$1(),
277
- contentBoxSize: size$1(),
278
- contentRect: new DOMRectReadOnly(0, 0, 0, 0)
279
- }), calculateBoxSizes = function(target, forceRecalculation) {
280
- if (forceRecalculation === void 0 && (forceRecalculation = !1), cache.has(target) && !forceRecalculation)
281
- return cache.get(target);
282
- if (isHidden(target))
283
- return cache.set(target, zeroBoxes), zeroBoxes;
284
- var cs = getComputedStyle(target), svg = isSVG(target) && target.ownerSVGElement && target.getBBox(), removePadding = !IE && cs.boxSizing === "border-box", switchSizes = verticalRegexp.test(cs.writingMode || ""), canScrollVertically = !svg && scrollRegexp.test(cs.overflowY || ""), canScrollHorizontally = !svg && scrollRegexp.test(cs.overflowX || ""), paddingTop = svg ? 0 : parseDimension(cs.paddingTop), paddingRight = svg ? 0 : parseDimension(cs.paddingRight), paddingBottom = svg ? 0 : parseDimension(cs.paddingBottom), paddingLeft = svg ? 0 : parseDimension(cs.paddingLeft), borderTop2 = svg ? 0 : parseDimension(cs.borderTopWidth), borderRight2 = svg ? 0 : parseDimension(cs.borderRightWidth), borderBottom2 = svg ? 0 : parseDimension(cs.borderBottomWidth), borderLeft2 = svg ? 0 : parseDimension(cs.borderLeftWidth), horizontalPadding = paddingLeft + paddingRight, verticalPadding = paddingTop + paddingBottom, horizontalBorderArea = borderLeft2 + borderRight2, verticalBorderArea = borderTop2 + borderBottom2, horizontalScrollbarThickness = canScrollHorizontally ? target.offsetHeight - verticalBorderArea - target.clientHeight : 0, verticalScrollbarThickness = canScrollVertically ? target.offsetWidth - horizontalBorderArea - target.clientWidth : 0, widthReduction = removePadding ? horizontalPadding + horizontalBorderArea : 0, heightReduction = removePadding ? verticalPadding + verticalBorderArea : 0, contentWidth = svg ? svg.width : parseDimension(cs.width) - widthReduction - verticalScrollbarThickness, contentHeight = svg ? svg.height : parseDimension(cs.height) - heightReduction - horizontalScrollbarThickness, borderBoxWidth = contentWidth + horizontalPadding + verticalScrollbarThickness + horizontalBorderArea, borderBoxHeight = contentHeight + verticalPadding + horizontalScrollbarThickness + verticalBorderArea, boxes = freeze({
285
- devicePixelContentBoxSize: size$1(Math.round(contentWidth * devicePixelRatio), Math.round(contentHeight * devicePixelRatio), switchSizes),
286
- borderBoxSize: size$1(borderBoxWidth, borderBoxHeight, switchSizes),
287
- contentBoxSize: size$1(contentWidth, contentHeight, switchSizes),
288
- contentRect: new DOMRectReadOnly(paddingLeft, paddingTop, contentWidth, contentHeight)
289
- });
290
- return cache.set(target, boxes), boxes;
291
- }, calculateBoxSize = function(target, observedBox, forceRecalculation) {
292
- var _a = calculateBoxSizes(target, forceRecalculation), borderBoxSize = _a.borderBoxSize, contentBoxSize = _a.contentBoxSize, devicePixelContentBoxSize = _a.devicePixelContentBoxSize;
293
- switch (observedBox) {
294
- case ResizeObserverBoxOptions.DEVICE_PIXEL_CONTENT_BOX:
295
- return devicePixelContentBoxSize;
296
- case ResizeObserverBoxOptions.BORDER_BOX:
297
- return borderBoxSize;
298
- default:
299
- return contentBoxSize;
300
- }
301
- }, ResizeObserverEntry = /* @__PURE__ */ function() {
302
- function ResizeObserverEntry2(target) {
303
- var boxes = calculateBoxSizes(target);
304
- this.target = target, this.contentRect = boxes.contentRect, this.borderBoxSize = freeze([boxes.borderBoxSize]), this.contentBoxSize = freeze([boxes.contentBoxSize]), this.devicePixelContentBoxSize = freeze([boxes.devicePixelContentBoxSize]);
305
- }
306
- return ResizeObserverEntry2;
307
- }(), calculateDepthForNode = function(node) {
308
- if (isHidden(node))
309
- return 1 / 0;
310
- for (var depth = 0, parent = node.parentNode; parent; )
311
- depth += 1, parent = parent.parentNode;
312
- return depth;
313
- }, broadcastActiveObservations = function() {
314
- var shallowestDepth = 1 / 0, callbacks2 = [];
315
- resizeObservers.forEach(function(ro) {
316
- if (ro.activeTargets.length !== 0) {
317
- var entries = [];
318
- ro.activeTargets.forEach(function(ot) {
319
- var entry = new ResizeObserverEntry(ot.target), targetDepth = calculateDepthForNode(ot.target);
320
- entries.push(entry), ot.lastReportedSize = calculateBoxSize(ot.target, ot.observedBox), targetDepth < shallowestDepth && (shallowestDepth = targetDepth);
321
- }), callbacks2.push(function() {
322
- ro.callback.call(ro.observer, entries, ro.observer);
323
- }), ro.activeTargets.splice(0, ro.activeTargets.length);
324
- }
325
- });
326
- for (var _i = 0, callbacks_1 = callbacks2; _i < callbacks_1.length; _i++) {
327
- var callback = callbacks_1[_i];
328
- callback();
329
- }
330
- return shallowestDepth;
331
- }, gatherActiveObservationsAtDepth = function(depth) {
332
- resizeObservers.forEach(function(ro) {
333
- ro.activeTargets.splice(0, ro.activeTargets.length), ro.skippedTargets.splice(0, ro.skippedTargets.length), ro.observationTargets.forEach(function(ot) {
334
- ot.isActive() && (calculateDepthForNode(ot.target) > depth ? ro.activeTargets.push(ot) : ro.skippedTargets.push(ot));
335
- });
336
- });
337
- }, process = function() {
338
- var depth = 0;
339
- for (gatherActiveObservationsAtDepth(depth); hasActiveObservations(); )
340
- depth = broadcastActiveObservations(), gatherActiveObservationsAtDepth(depth);
341
- return hasSkippedObservations() && deliverResizeLoopError(), depth > 0;
342
- }, trigger, callbacks = [], notify = function() {
343
- return callbacks.splice(0).forEach(function(cb) {
344
- return cb();
345
- });
346
- }, queueMicroTask = function(callback) {
347
- if (!trigger) {
348
- var toggle_1 = 0, el_1 = document.createTextNode(""), config = {
349
- characterData: !0
350
- };
351
- new MutationObserver(function() {
352
- return notify();
353
- }).observe(el_1, config), trigger = function() {
354
- el_1.textContent = "".concat(toggle_1 ? toggle_1-- : toggle_1++);
355
- };
356
- }
357
- callbacks.push(callback), trigger();
358
- }, queueResizeObserver = function(cb) {
359
- queueMicroTask(function() {
360
- requestAnimationFrame(cb);
361
- });
362
- }, watching = 0, isWatching = function() {
363
- return !!watching;
364
- }, CATCH_PERIOD = 250, observerConfig = {
365
- attributes: !0,
366
- characterData: !0,
367
- childList: !0,
368
- subtree: !0
369
- }, events = ["resize", "load", "transitionend", "animationend", "animationstart", "animationiteration", "keyup", "keydown", "mouseup", "mousedown", "mouseover", "mouseout", "blur", "focus"], time = function(timeout) {
370
- return timeout === void 0 && (timeout = 0), Date.now() + timeout;
371
- }, scheduled = !1, Scheduler = function() {
372
- function Scheduler2() {
373
- var _this = this;
374
- this.stopped = !0, this.listener = function() {
375
- return _this.schedule();
376
- };
377
- }
378
- return Scheduler2.prototype.run = function(timeout) {
379
- var _this = this;
380
- if (timeout === void 0 && (timeout = CATCH_PERIOD), !scheduled) {
381
- scheduled = !0;
382
- var until = time(timeout);
383
- queueResizeObserver(function() {
384
- var elementsHaveResized = !1;
385
- try {
386
- elementsHaveResized = process();
387
- } finally {
388
- if (scheduled = !1, timeout = until - time(), !isWatching())
389
- return;
390
- elementsHaveResized ? _this.run(1e3) : timeout > 0 ? _this.run(timeout) : _this.start();
391
- }
392
- });
393
- }
394
- }, Scheduler2.prototype.schedule = function() {
395
- this.stop(), this.run();
396
- }, Scheduler2.prototype.observe = function() {
397
- var _this = this, cb = function() {
398
- return _this.observer && _this.observer.observe(document.body, observerConfig);
399
- };
400
- document.body ? cb() : global$1.addEventListener("DOMContentLoaded", cb);
401
- }, Scheduler2.prototype.start = function() {
402
- var _this = this;
403
- this.stopped && (this.stopped = !1, this.observer = new MutationObserver(this.listener), this.observe(), events.forEach(function(name) {
404
- return global$1.addEventListener(name, _this.listener, !0);
405
- }));
406
- }, Scheduler2.prototype.stop = function() {
407
- var _this = this;
408
- this.stopped || (this.observer && this.observer.disconnect(), events.forEach(function(name) {
409
- return global$1.removeEventListener(name, _this.listener, !0);
410
- }), this.stopped = !0);
411
- }, Scheduler2;
412
- }(), scheduler = new Scheduler(), updateCount = function(n) {
413
- !watching && n > 0 && scheduler.start(), watching += n, !watching && scheduler.stop();
414
- }, skipNotifyOnElement = function(target) {
415
- return !isSVG(target) && !isReplacedElement(target) && getComputedStyle(target).display === "inline";
416
- }, ResizeObservation = function() {
417
- function ResizeObservation2(target, observedBox) {
418
- this.target = target, this.observedBox = observedBox || ResizeObserverBoxOptions.CONTENT_BOX, this.lastReportedSize = {
419
- inlineSize: 0,
420
- blockSize: 0
421
- };
422
- }
423
- return ResizeObservation2.prototype.isActive = function() {
424
- var size2 = calculateBoxSize(this.target, this.observedBox, !0);
425
- return skipNotifyOnElement(this.target) && (this.lastReportedSize = size2), this.lastReportedSize.inlineSize !== size2.inlineSize || this.lastReportedSize.blockSize !== size2.blockSize;
426
- }, ResizeObservation2;
427
- }(), ResizeObserverDetail = /* @__PURE__ */ function() {
428
- function ResizeObserverDetail2(resizeObserver, callback) {
429
- this.activeTargets = [], this.skippedTargets = [], this.observationTargets = [], this.observer = resizeObserver, this.callback = callback;
430
- }
431
- return ResizeObserverDetail2;
432
- }(), observerMap = /* @__PURE__ */ new WeakMap(), getObservationIndex = function(observationTargets, target) {
433
- for (var i = 0; i < observationTargets.length; i += 1)
434
- if (observationTargets[i].target === target)
435
- return i;
436
- return -1;
437
- }, ResizeObserverController = function() {
438
- function ResizeObserverController2() {
439
- }
440
- return ResizeObserverController2.connect = function(resizeObserver, callback) {
441
- var detail = new ResizeObserverDetail(resizeObserver, callback);
442
- observerMap.set(resizeObserver, detail);
443
- }, ResizeObserverController2.observe = function(resizeObserver, target, options) {
444
- var detail = observerMap.get(resizeObserver), firstObservation = detail.observationTargets.length === 0;
445
- getObservationIndex(detail.observationTargets, target) < 0 && (firstObservation && resizeObservers.push(detail), detail.observationTargets.push(new ResizeObservation(target, options && options.box)), updateCount(1), scheduler.schedule());
446
- }, ResizeObserverController2.unobserve = function(resizeObserver, target) {
447
- var detail = observerMap.get(resizeObserver), index = getObservationIndex(detail.observationTargets, target), lastObservation = detail.observationTargets.length === 1;
448
- index >= 0 && (lastObservation && resizeObservers.splice(resizeObservers.indexOf(detail), 1), detail.observationTargets.splice(index, 1), updateCount(-1));
449
- }, ResizeObserverController2.disconnect = function(resizeObserver) {
450
- var _this = this, detail = observerMap.get(resizeObserver);
451
- detail.observationTargets.slice().forEach(function(ot) {
452
- return _this.unobserve(resizeObserver, ot.target);
453
- }), detail.activeTargets.splice(0, detail.activeTargets.length);
454
- }, ResizeObserverController2;
455
- }(), ResizeObserver = function() {
456
- function ResizeObserver2(callback) {
457
- if (arguments.length === 0)
458
- throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");
459
- if (typeof callback != "function")
460
- throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");
461
- ResizeObserverController.connect(this, callback);
462
- }
463
- return ResizeObserver2.prototype.observe = function(target, options) {
464
- if (arguments.length === 0)
465
- throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");
466
- if (!isElement(target))
467
- throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");
468
- ResizeObserverController.observe(this, target, options);
469
- }, ResizeObserver2.prototype.unobserve = function(target) {
470
- if (arguments.length === 0)
471
- throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");
472
- if (!isElement(target))
473
- throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");
474
- ResizeObserverController.unobserve(this, target);
475
- }, ResizeObserver2.prototype.disconnect = function() {
476
- ResizeObserverController.disconnect(this);
477
- }, ResizeObserver2.toString = function() {
478
- return "function ResizeObserver () { [polyfill code] }";
479
- }, ResizeObserver2;
480
- }();
481
- const _ResizeObserver = typeof document < "u" && typeof window < "u" && window.ResizeObserver ? window.ResizeObserver : ResizeObserver, _elementSizeObserver = _createElementSizeObserver();
197
+ const _ResizeObserver = typeof document < "u" && typeof window < "u" && window.ResizeObserver ? window.ResizeObserver : resizeObserver.ResizeObserver, _elementSizeObserver = _createElementSizeObserver();
482
198
  function _createElementRectValueListener() {
483
199
  return {
484
200
  subscribe(element, subscriber) {
485
- const resizeObserver = new _ResizeObserver(([entry]) => {
201
+ const resizeObserver2 = new _ResizeObserver(([entry]) => {
486
202
  subscriber({
487
203
  _contentRect: entry.contentRect,
488
204
  border: {
@@ -495,8 +211,8 @@ function _createElementRectValueListener() {
495
211
  }
496
212
  });
497
213
  });
498
- return resizeObserver.observe(element), () => {
499
- resizeObserver.unobserve(element), resizeObserver.disconnect();
214
+ return resizeObserver2.observe(element), () => {
215
+ resizeObserver2.unobserve(element), resizeObserver2.disconnect();
500
216
  };
501
217
  }
502
218
  };
@@ -2739,32 +2455,31 @@ function codeBaseStyle() {
2739
2455
  }
2740
2456
  `;
2741
2457
  }
2742
- const StyledCode = /* @__PURE__ */ styledComponents.styled.pre.withConfig({
2458
+ const LazyRefractor = react.lazy(() => Promise.resolve().then(function() {
2459
+ return require("./refractor.js");
2460
+ })), StyledCode = /* @__PURE__ */ styledComponents.styled.pre.withConfig({
2743
2461
  displayName: "StyledCode",
2744
2462
  componentId: "sc-4dymyn-0"
2745
2463
  })(codeBaseStyle, responsiveCodeFontStyle), Code = react.forwardRef(function(props, ref) {
2746
- const $ = reactCompilerRuntime.c(23);
2747
- let children, languageProp, restProps, t0, weight;
2464
+ const $ = reactCompilerRuntime.c(20);
2465
+ let children, language, restProps, t0, weight;
2748
2466
  $[0] !== props ? ({
2749
2467
  children,
2750
- language: languageProp,
2468
+ language,
2751
2469
  size: t0,
2752
2470
  weight,
2753
2471
  ...restProps
2754
- } = props, $[0] = props, $[1] = children, $[2] = languageProp, $[3] = restProps, $[4] = t0, $[5] = weight) : (children = $[1], languageProp = $[2], restProps = $[3], t0 = $[4], weight = $[5]);
2755
- const size2 = t0 === void 0 ? 2 : t0, language = typeof languageProp == "string" ? languageProp : void 0;
2756
- let t1;
2757
- $[6] !== language ? (t1 = language ? Refractor__default.default.hasLanguage(language) : !1, $[6] = language, $[7] = t1) : t1 = $[7];
2758
- const registered = t1, t2 = useArrayProp(size2);
2759
- let t3;
2760
- $[8] !== children || $[9] !== language || $[10] !== registered ? (t3 = !(language && registered) && /* @__PURE__ */ jsxRuntime.jsx("code", { children }), $[8] = children, $[9] = language, $[10] = registered, $[11] = t3) : t3 = $[11];
2472
+ } = props, $[0] = props, $[1] = children, $[2] = language, $[3] = restProps, $[4] = t0, $[5] = weight) : (children = $[1], language = $[2], restProps = $[3], t0 = $[4], weight = $[5]);
2473
+ const t1 = useArrayProp(t0 === void 0 ? 2 : t0);
2474
+ let t2;
2475
+ $[6] !== children ? (t2 = /* @__PURE__ */ jsxRuntime.jsx("code", { children }), $[6] = children, $[7] = t2) : t2 = $[7];
2476
+ const t3 = String(children);
2761
2477
  let t4;
2762
- $[12] !== children || $[13] !== language || $[14] !== registered ? (t4 = language && registered && /* @__PURE__ */ jsxRuntime.jsx(Refractor__default.default, { inline: !0, language, value: String(children) }), $[12] = children, $[13] = language, $[14] = registered, $[15] = t4) : t4 = $[15];
2478
+ $[8] !== language || $[9] !== t3 ? (t4 = /* @__PURE__ */ jsxRuntime.jsx(LazyRefractor, { language, value: t3 }), $[8] = language, $[9] = t3, $[10] = t4) : t4 = $[10];
2763
2479
  let t5;
2764
- return $[16] !== ref || $[17] !== restProps || $[18] !== t2 || $[19] !== t3 || $[20] !== t4 || $[21] !== weight ? (t5 = /* @__PURE__ */ jsxRuntime.jsxs(StyledCode, { "data-ui": "Code", ...restProps, $size: t2, $weight: weight, ref, children: [
2765
- t3,
2766
- t4
2767
- ] }), $[16] = ref, $[17] = restProps, $[18] = t2, $[19] = t3, $[20] = t4, $[21] = weight, $[22] = t5) : t5 = $[22], t5;
2480
+ $[11] !== t2 || $[12] !== t4 ? (t5 = /* @__PURE__ */ jsxRuntime.jsx(react.Suspense, { fallback: t2, children: t4 }), $[11] = t2, $[12] = t4, $[13] = t5) : t5 = $[13];
2481
+ let t6;
2482
+ return $[14] !== ref || $[15] !== restProps || $[16] !== t1 || $[17] !== t5 || $[18] !== weight ? (t6 = /* @__PURE__ */ jsxRuntime.jsx(StyledCode, { "data-ui": "Code", ...restProps, $size: t1, $weight: weight, ref, children: t5 }), $[14] = ref, $[15] = restProps, $[16] = t1, $[17] = t5, $[18] = weight, $[19] = t6) : t6 = $[19], t6;
2768
2483
  });
2769
2484
  Code.displayName = "ForwardRef(Code)";
2770
2485
  const BASE_STYLE$1 = {