@superblocksteam/library 2.0.0-next.123 → 2.0.0-next.125

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.
Files changed (23) hide show
  1. package/dist/{allPaths-BwXUulUe.js → allPaths-B2t0JFsE.js} +2 -2
  2. package/dist/{allPaths-BwXUulUe.js.map → allPaths-B2t0JFsE.js.map} +1 -1
  3. package/dist/{allPaths-B_CYI-YU.js → allPaths-Ds8PViwH.js} +2 -2
  4. package/dist/{allPaths-B_CYI-YU.js.map → allPaths-Ds8PViwH.js.map} +1 -1
  5. package/dist/{allPathsLoader-BPlA3xq3.js → allPathsLoader-BwDYmyS1.js} +3 -3
  6. package/dist/{allPathsLoader-BPlA3xq3.js.map → allPathsLoader-BwDYmyS1.js.map} +1 -1
  7. package/dist/{allPathsLoader-CvxPreZn.js → allPathsLoader-l2CC2ZRN.js} +3 -3
  8. package/dist/{allPathsLoader-CvxPreZn.js.map → allPathsLoader-l2CC2ZRN.js.map} +1 -1
  9. package/dist/{icons-D_yAT9A6.js → icons-NrNO8p_u.js} +4 -2
  10. package/dist/icons-NrNO8p_u.js.map +1 -0
  11. package/dist/{index-jDTJt0yG.js → index-DV7VPZc1.js} +351 -152
  12. package/dist/{index-jDTJt0yG.js.map → index-DV7VPZc1.js.map} +1 -1
  13. package/dist/index.js +120 -119
  14. package/dist/{splitPathsBySizeLoader-DbCBfVSa.js → splitPathsBySizeLoader-BsO5Qoxp.js} +2 -2
  15. package/dist/{splitPathsBySizeLoader-DbCBfVSa.js.map → splitPathsBySizeLoader-BsO5Qoxp.js.map} +1 -1
  16. package/dist/{splitPathsBySizeLoader-rOW7hXo7.js → splitPathsBySizeLoader-CTv2UfGL.js} +2 -2
  17. package/dist/{splitPathsBySizeLoader-rOW7hXo7.js.map → splitPathsBySizeLoader-CTv2UfGL.js.map} +1 -1
  18. package/dist-types/internal-testing/components/broken-app.d.ts +3 -0
  19. package/dist-types/lib/index.d.ts +1 -0
  20. package/dist-types/lib/user-facing/hooks/use-theme.d.ts +3 -0
  21. package/dist-types/lib/user-facing/internal-components/error-boundary/index.d.ts +18 -0
  22. package/package.json +2 -2
  23. package/dist/icons-D_yAT9A6.js.map +0 -1
@@ -49,7 +49,7 @@ var __privateMethod = (obj, member, method4) => (__accessCheck(obj, member, "acc
49
49
  var _removeSourceIdElement_dec, _setSourceIdElement_dec, _setActiveRootInstanceId_dec, _init, _cancelApi_dec, _runApi_dec, _init2, _renameWidget_dec, _setWidgetProperty_dec, _setWidgetProperties_dec, _writeRuntimeProperties_dec, _deleteComponents_dec, _dropComponent_dec, _createComponent_dec, _batchUpdate_dec, _clearPendingTransactions_dec, _addPendingTransaction_dec, _executeOrAddToBatch_dec, _init3, _addOptimisticCreateWidget_dec, _processRootWidget_dec, _init4, _refreshPositionsAndGetDropConstraints_dec, _init5, _updateChildPositions_dec, _setWidgetPosition_dec, _setActiveTargetRect_dec, _setActiveDragRect_dec, _setDropTargetId_dec, _setInvalidDropTarget_dec, _setValidRootIds_dec, _cancelNewComponentDrag_dec, _startNewComponentDrag_dec, _setIsDragging_dec, _setWidgetFeatures_dec, _init6;
50
50
  import * as React from "react";
51
51
  import React__default, { isValidElement as isValidElement$1, version as version$2, createContext, useContext, useEffect, useRef, useLayoutEffect as useLayoutEffect$2, Component, useState, useMemo as useMemo$2, useCallback, forwardRef, useImperativeHandle, cloneElement as cloneElement$1, createElement, Children, memo, useReducer, PureComponent, useSyncExternalStore, Suspense, createRef } from "react";
52
- import { S as SvgClose, a as SvgSystemDanger, b as SvgSystemInfo, c as SvgSystemError, d as SvgSystemSuccess, e as SvgPlus, f as SvgHide, g as SvgChevronDown, h as SvgEmptyCheckbox, i as SvgMinus, j as SvgCheckmark, k as SvgCopy, l as SvgExternalLink, m as SvgPlay, n as SvgDownload, o as SvgTrash, p as SvgFilter, q as SvgFreeze, r as SvgSort, s as SvgEllipsis, t as SvgCrossXs } from "./icons-D_yAT9A6.js";
52
+ import { S as SvgClose, a as SvgSystemDanger, b as SvgSystemInfo, c as SvgSystemError, d as SvgSystemSuccess, e as SvgPlus, f as SvgHide, g as SvgChevronDown, h as SvgEmptyCheckbox, i as SvgMinus, j as SvgCheckmark, k as SvgCopy, l as SvgExternalLink, m as SvgPlay, n as SvgDownload, o as SvgTrash, p as SvgFilter, q as SvgFreeze, r as SvgSort, s as SvgEllipsis, t as SvgCrossXs, u as SvgClark } from "./icons-NrNO8p_u.js";
53
53
  import * as ReactDOM from "react-dom";
54
54
  import ReactDOM__default, { unstable_batchedUpdates, flushSync, createPortal } from "react-dom";
55
55
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
@@ -88881,7 +88881,7 @@ const ThemeProvider = ({ theme, children }) => {
88881
88881
  }, [theme]);
88882
88882
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeContext.Provider, { value, children });
88883
88883
  };
88884
- const useTheme = () => {
88884
+ const useTheme$1 = () => {
88885
88885
  return useContext(ThemeContext);
88886
88886
  };
88887
88887
  var Alignment$1 = {
@@ -90483,14 +90483,14 @@ function getLoaderFn$1(options) {
90483
90483
  if (!(loader === "all")) return [3, 3];
90484
90484
  return [4, import(
90485
90485
  /* webpackChunkName: "blueprint-icons-all-paths-loader" */
90486
- "./allPathsLoader-BPlA3xq3.js"
90486
+ "./allPathsLoader-BwDYmyS1.js"
90487
90487
  )];
90488
90488
  case 2:
90489
90489
  return [2, _b2.sent().allPathsLoader];
90490
90490
  case 3:
90491
90491
  return [4, import(
90492
90492
  /* webpackChunkName: "blueprint-icons-split-paths-by-size-loader" */
90493
- "./splitPathsBySizeLoader-rOW7hXo7.js"
90493
+ "./splitPathsBySizeLoader-CTv2UfGL.js"
90494
90494
  )];
90495
90495
  case 4:
90496
90496
  return [2, _b2.sent().splitPathsBySizeLoader];
@@ -99766,7 +99766,7 @@ const InternalGlobalScope = internalCreateScope(() => ({}), {
99766
99766
  const globalName = getName("Global");
99767
99767
  const GlobalScope = registerScope(
99768
99768
  ({ children }) => {
99769
- const { theme } = useTheme();
99769
+ const { theme } = useTheme$1();
99770
99770
  useEffect(() => {
99771
99771
  const global2 = rootStore.entityManager.getEntity(
99772
99772
  GLOBAL_SCOPE_ID,
@@ -110790,7 +110790,7 @@ const DuplicatedNamePopover = observer(({ name, children, showWarning, sourceId
110790
110790
  }
110791
110791
  );
110792
110792
  });
110793
- class ErrorBoundary extends Component {
110793
+ let ErrorBoundary$1 = class ErrorBoundary extends Component {
110794
110794
  constructor() {
110795
110795
  super(...arguments);
110796
110796
  __publicField(this, "state", {
@@ -110854,7 +110854,7 @@ class ErrorBoundary extends Component {
110854
110854
  }
110855
110855
  return this.props.children;
110856
110856
  }
110857
- }
110857
+ };
110858
110858
  const ActionsContext = createContext(
110859
110859
  null
110860
110860
  );
@@ -111032,7 +111032,7 @@ const ShimmerDiv = qe$1.div`
111032
111032
  `;
111033
111033
  function SuspenseFallback({ style: style2 }) {
111034
111034
  var _a2, _b2;
111035
- const { theme } = useTheme();
111035
+ const { theme } = useTheme$1();
111036
111036
  const backgroundColor = ((_a2 = theme == null ? void 0 : theme.colors) == null ? void 0 : _a2.neutral50) || "#f8f9fa";
111037
111037
  const shimmerHighlight = ((_b2 = theme == null ? void 0 : theme.colors) == null ? void 0 : _b2.neutral100) || "#ffffff";
111038
111038
  const borderRadius2 = (theme == null ? void 0 : theme.borderRadius.value) + (theme == null ? void 0 : theme.borderRadius.mode);
@@ -111163,7 +111163,7 @@ const ReactiveComponent = observer(function Component2({
111163
111163
  };
111164
111164
  }, [name, identifier2.name]);
111165
111165
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
111166
- ErrorBoundary,
111166
+ ErrorBoundary$1,
111167
111167
  {
111168
111168
  header: `Something went wrong rendering this widget [${name}]`,
111169
111169
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -115536,7 +115536,7 @@ const Collisions = observer(
115536
115536
  targetPadding
115537
115537
  } = props2;
115538
115538
  const editStore2 = getEditStore();
115539
- const { theme } = useTheme();
115539
+ const { theme } = useTheme$1();
115540
115540
  const children = parentInstanceId ? editStore2.runtimeEntitiesManager.getEditorWidgetChildrenMeta(parentInstanceId).filter((child) => !editStore2.ui.isInstanceSelected(child.instanceId)) : [];
115541
115541
  const parentMeta = getEditStore().runtimeEntitiesManager.getEditorWidgetMeta(
115542
115542
  parentInstanceId
@@ -118537,7 +118537,7 @@ const DEFAULT_INPUT_WIDGET_INPUT_STYLE_VARIANT = "inputText";
118537
118537
  const useLabelProps = ({
118538
118538
  labelStyle: labelStyle2
118539
118539
  }) => {
118540
- const { theme } = useTheme();
118540
+ const { theme } = useTheme$1();
118541
118541
  return useTypographyStyling({
118542
118542
  textStyle: labelStyle2,
118543
118543
  defaultTextStyleVariant: DEFAULT_INPUT_WIDGET_LABEL_STYLE_VARIANT,
@@ -118549,7 +118549,7 @@ const useInputTypographyProps = ({
118549
118549
  backgroundColor,
118550
118550
  textStyle: textStyle2
118551
118551
  }) => {
118552
- const { theme } = useTheme();
118552
+ const { theme } = useTheme$1();
118553
118553
  const inputBaseStyle = backgroundColor ? { backgroundColor } : {};
118554
118554
  return useTypographyStyling({
118555
118555
  textStyle: textStyle2,
@@ -118906,7 +118906,7 @@ const SbButton = registerSbComponent(
118906
118906
  }
118907
118907
  setIsLoading(false);
118908
118908
  }, [onClick, props2.isDisabled, isLoading]);
118909
- const { theme } = useTheme();
118909
+ const { theme } = useTheme$1();
118910
118910
  const typographies = theme.typographies;
118911
118911
  const minSize = useComponentMinSize(props2);
118912
118912
  const textProps = useTypographyStyling({
@@ -119005,7 +119005,7 @@ const resolveDefaultColor = (theme, key2, fallbackColor) => {
119005
119005
  return fallbackColor;
119006
119006
  };
119007
119007
  const useComputeComponentStyles = (props2) => {
119008
- const { theme } = useTheme();
119008
+ const { theme } = useTheme$1();
119009
119009
  const {
119010
119010
  border: border2,
119011
119011
  borderRadius: borderRadius2,
@@ -119762,7 +119762,7 @@ const InternalContainer = (props2) => {
119762
119762
  var _a2, _b2, _c2;
119763
119763
  const { style: style2, ...passThroughProps } = usePassthroughProps(props2);
119764
119764
  const { isEditing } = useEditor();
119765
- const { theme } = useTheme();
119765
+ const { theme } = useTheme$1();
119766
119766
  const componentClasses = useMemo$2(
119767
119767
  () => [
119768
119768
  "container-component",
@@ -122198,7 +122198,7 @@ const ErrorWrapper = styleAsClass`
122198
122198
  }
122199
122199
  `;
122200
122200
  const ErrorInlineMessage = (props2) => {
122201
- const { theme } = useTheme();
122201
+ const { theme } = useTheme$1();
122202
122202
  const errorColor = theme.colors.danger;
122203
122203
  const errorElement = useRef(null);
122204
122204
  const errorMessages = useErrorMessages(props2.errorMessages);
@@ -126317,7 +126317,7 @@ const useIconTop = ({
126317
126317
  inputHeight
126318
126318
  }) => {
126319
126319
  var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
126320
- const { theme } = useTheme();
126320
+ const { theme } = useTheme$1();
126321
126321
  const borderTop = ((_b2 = (_a2 = border2 == null ? void 0 : border2.top) == null ? void 0 : _a2.width) == null ? void 0 : _b2.value) ?? ((_c2 = defaultInputBorderObject(theme).top.width) == null ? void 0 : _c2.value) ?? 0;
126322
126322
  const borderBottom = ((_e2 = (_d2 = border2 == null ? void 0 : border2.bottom) == null ? void 0 : _d2.width) == null ? void 0 : _e2.value) ?? ((_f2 = defaultInputBorderObject(theme).bottom.width) == null ? void 0 : _f2.value) ?? 0;
126323
126323
  const paddingTop = ((_g2 = padding2 == null ? void 0 : padding2.top) == null ? void 0 : _g2.value) ?? INPUT_PADDING.top.value ?? 0;
@@ -126328,7 +126328,7 @@ const useIconTop = ({
126328
126328
  const useInputIconSize = ({
126329
126329
  textStyle: textStyle2
126330
126330
  }) => {
126331
- const { theme } = useTheme();
126331
+ const { theme } = useTheme$1();
126332
126332
  const generatedInputTheme = theme.typographies;
126333
126333
  return textStyle2 ? getIconSizeBasedOnFontSize(
126334
126334
  getFontSizeInPxFromTextStyle({
@@ -126340,7 +126340,7 @@ const useInputIconSize = ({
126340
126340
  ) : DEFAULT_ICON_SIZE$1;
126341
126341
  };
126342
126342
  const useInputGroupStylingProps = (props2) => {
126343
- const { theme } = useTheme();
126343
+ const { theme } = useTheme$1();
126344
126344
  const { border: border2, borderRadius: borderRadius2, padding: padding2 } = props2;
126345
126345
  return useMemo$2(() => {
126346
126346
  return {
@@ -134512,7 +134512,7 @@ const getFontSizePx = (textStyle2, theme) => {
134512
134512
  });
134513
134513
  };
134514
134514
  const useIcon = ({ textStyle: textStyle2 }) => {
134515
- const { theme } = useTheme();
134515
+ const { theme } = useTheme$1();
134516
134516
  const variant = (textStyle2 == null ? void 0 : textStyle2.variant) ?? DEFAULT_TEXT_WIDGET_TEXT_STYLE_VARIANT;
134517
134517
  return useMemo$2(() => {
134518
134518
  const fontSize = getFontSizePx({ ...textStyle2, variant }, theme);
@@ -134607,7 +134607,7 @@ const SbText = registerSbComponent(
134607
134607
  }
134608
134608
  });
134609
134609
  const [isLongTextVisible, setIsLongTextVisible] = useState(false);
134610
- const { theme } = useTheme();
134610
+ const { theme } = useTheme$1();
134611
134611
  const textClassName = useTextClassName({
134612
134612
  textStyleVariant: (textStyle2 == null ? void 0 : textStyle2.variant) ?? DEFAULT_TEXT_WIDGET_TEXT_STYLE_VARIANT,
134613
134613
  isLoading
@@ -144877,14 +144877,14 @@ function getLoaderFn(options) {
144877
144877
  if (!(loader === "all")) return [3, 3];
144878
144878
  return [4, import(
144879
144879
  /* webpackChunkName: "blueprint-icons-all-paths-loader" */
144880
- "./allPathsLoader-CvxPreZn.js"
144880
+ "./allPathsLoader-l2CC2ZRN.js"
144881
144881
  )];
144882
144882
  case 2:
144883
144883
  return [2, _b2.sent().allPathsLoader];
144884
144884
  case 3:
144885
144885
  return [4, import(
144886
144886
  /* webpackChunkName: "blueprint-icons-split-paths-by-size-loader" */
144887
- "./splitPathsBySizeLoader-DbCBfVSa.js"
144887
+ "./splitPathsBySizeLoader-BsO5Qoxp.js"
144888
144888
  )];
144889
144889
  case 4:
144890
144890
  return [2, _b2.sent().splitPathsBySizeLoader];
@@ -160101,7 +160101,7 @@ function requireLib() {
160101
160101
  }
160102
160102
  var libExports = requireLib();
160103
160103
  const ReactPlayer = /* @__PURE__ */ getDefaultExportFromCjs(libExports);
160104
- const ErrorContainer = qe$1.div`
160104
+ const ErrorContainer$1 = qe$1.div`
160105
160105
  display: flex;
160106
160106
  align-items: center;
160107
160107
  justify-content: center;
@@ -160149,7 +160149,7 @@ function VideoComponent(props2) {
160149
160149
  width,
160150
160150
  height
160151
160151
  }
160152
- ) : /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorContainer, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Please provide a valid URL" }) })
160152
+ ) : /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorContainer$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Please provide a valid URL" }) })
160153
160153
  }
160154
160154
  );
160155
160155
  }
@@ -177702,7 +177702,7 @@ const SbTable = registerSbComponent(
177702
177702
  var _a2;
177703
177703
  const { update } = useActions();
177704
177704
  const { features } = useEditor();
177705
- const { theme } = useTheme();
177705
+ const { theme } = useTheme$1();
177706
177706
  const {
177707
177707
  onRowSelected,
177708
177708
  onPageChange,
@@ -184012,6 +184012,203 @@ const EmbedWrapper = (props2) => {
184012
184012
  }
184013
184013
  return /* @__PURE__ */ jsxRuntimeExports.jsx(WithUserWrapper, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(IframeConnected, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(EditorHotkeys, { children: props2.children }) }) });
184014
184014
  };
184015
+ const ErrorContainer = qe$1.div`
184016
+ position: absolute;
184017
+ inset: 0;
184018
+ display: flex;
184019
+ align-items: center;
184020
+ justify-content: center;
184021
+ z-index: 10;
184022
+ background: rgba(255, 255, 255, 0.5);
184023
+ pointer-events: auto;
184024
+ `;
184025
+ const ErrorContent = qe$1.div`
184026
+ max-width: 700px;
184027
+ padding: 40px;
184028
+ overflow-y: auto;
184029
+ flex: 1;
184030
+ display: flex;
184031
+ flex-direction: column;
184032
+
184033
+ opacity: 0;
184034
+ animation: fadeIn 0.3s ease-out forwards;
184035
+
184036
+ @keyframes fadeIn {
184037
+ from {
184038
+ opacity: 0;
184039
+ }
184040
+ to {
184041
+ opacity: 1;
184042
+ }
184043
+ }
184044
+ `;
184045
+ const ErrorIconContainer = qe$1.div`
184046
+ width: 60px;
184047
+ height: 60px;
184048
+ min-width: 60px;
184049
+ min-height: 60px;
184050
+ background: linear-gradient(135deg, #aab 0%, #000033 50%, #000066 100%);
184051
+ border-radius: 16px;
184052
+ display: flex;
184053
+ align-items: center;
184054
+ justify-content: center;
184055
+ margin: 0 auto 16px;
184056
+ flex-shrink: 0;
184057
+ animation: scaleIn 0.3s ease-out forwards;
184058
+ opacity: 0;
184059
+ box-shadow:
184060
+ 0 0 1px black,
184061
+ 0 4px 12px rgba(0, 85, 187, 0.15),
184062
+ 0 2px 4px rgba(0, 85, 187, 0.05);
184063
+
184064
+ @keyframes scaleIn {
184065
+ from {
184066
+ transform: scale(0.8);
184067
+ opacity: 0;
184068
+ }
184069
+ to {
184070
+ transform: scale(1);
184071
+ opacity: 1;
184072
+ }
184073
+ }
184074
+ `;
184075
+ const StyledClarkIcon = qe$1(SvgClark)`
184076
+ width: 54px;
184077
+ height: 54px;
184078
+ color: white;
184079
+ margin-top: 3px;
184080
+ margin-left: 1px;
184081
+ animation: scaleIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
184082
+ opacity: 0;
184083
+
184084
+ @keyframes scaleIn {
184085
+ 0% {
184086
+ transform: scale(0.6);
184087
+ opacity: 0;
184088
+ }
184089
+ 50% {
184090
+ transform: scale(1.1);
184091
+ }
184092
+ 100% {
184093
+ transform: scale(1);
184094
+ opacity: 1;
184095
+ }
184096
+ }
184097
+ `;
184098
+ const ErrorTitle = qe$1.h2`
184099
+ font-family: Inter;
184100
+ color: rgba(0, 0, 0, 0.85);
184101
+ font-weight: 600;
184102
+ font-size: 24px;
184103
+ line-height: 1.35;
184104
+ text-align: center;
184105
+ margin-bottom: 6px;
184106
+ flex-shrink: 0;
184107
+ `;
184108
+ const ErrorMessage = qe$1.p`
184109
+ font-family: Inter;
184110
+ font-size: 14px;
184111
+ color: #6c7689;
184112
+ line-height: 1.5715;
184113
+ text-align: center;
184114
+ flex-shrink: 0;
184115
+ `;
184116
+ const RefreshButton = qe$1.button`
184117
+ background: ${(props2) => props2.$primaryColor};
184118
+ width: fit-content;
184119
+ align-self: center;
184120
+ color: white;
184121
+ border: none;
184122
+ border-radius: 4px;
184123
+ box-shadow: 0px 1px 3px 0px rgba(0, 153, 255, 0.24);
184124
+ padding: 8px 16px;
184125
+ margin-top: 12px;
184126
+ cursor: pointer;
184127
+ transition: opacity 0.2s;
184128
+
184129
+ font-family: Inter;
184130
+ font-size: 12px;
184131
+ font-style: normal;
184132
+ font-weight: 500;
184133
+ line-height: 16px;
184134
+
184135
+ &:hover {
184136
+ opacity: 0.8;
184137
+ }
184138
+
184139
+ &:active {
184140
+ opacity: 0.6;
184141
+ }
184142
+ `;
184143
+ const ErrorDetails = qe$1.details`
184144
+ margin-top: 24px;
184145
+ text-align: left;
184146
+ background-color: #f9fafb;
184147
+ border-radius: 6px;
184148
+ padding: 16px;
184149
+ box-shadow:
184150
+ 0px 0px 1px 0px #22272f52,
184151
+ 0px 1px 3px 0px #22272f1f;
184152
+ flex-shrink: 0;
184153
+
184154
+ &[open] summary {
184155
+ margin-bottom: 12px;
184156
+ }
184157
+ `;
184158
+ const ErrorSummary = qe$1.summary`
184159
+ cursor: pointer;
184160
+ font-weight: 500;
184161
+ color: #374151;
184162
+ font-size: 14px;
184163
+ user-select: none;
184164
+ `;
184165
+ const ErrorStack = qe$1.pre`
184166
+ font-size: 12px;
184167
+ color: #dc2626;
184168
+ overflow: auto;
184169
+ white-space: pre-wrap;
184170
+ margin: 16px;
184171
+ font-family: monospace;
184172
+ `;
184173
+ class ErrorBoundary2 extends React__default.Component {
184174
+ constructor(props2) {
184175
+ super(props2);
184176
+ __publicField(this, "handleRefresh", () => {
184177
+ window.location.reload();
184178
+ });
184179
+ this.state = { hasError: false };
184180
+ }
184181
+ static getDerivedStateFromError(error) {
184182
+ return { hasError: true, error };
184183
+ }
184184
+ componentDidCatch(error, errorInfo) {
184185
+ console.error("Superblocks application error:", error, errorInfo);
184186
+ }
184187
+ render() {
184188
+ var _a2, _b2, _c2;
184189
+ if (this.state.hasError) {
184190
+ const primaryColorDark = ((_b2 = (_a2 = this.props.theme) == null ? void 0 : _a2.colors) == null ? void 0 : _b2.primary500) || "#08a4ff";
184191
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorContainer, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(ErrorContent, { children: [
184192
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorIconContainer, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(StyledClarkIcon, {}) }),
184193
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorTitle, { children: "Something went wrong" }),
184194
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorMessage, { children: ((_c2 = this.state.error) == null ? void 0 : _c2.message) || "Unknown error" }),
184195
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
184196
+ RefreshButton,
184197
+ {
184198
+ $primaryColor: primaryColorDark,
184199
+ onClick: this.handleRefresh,
184200
+ children: "Refresh page"
184201
+ }
184202
+ ),
184203
+ this.state.error && /* @__PURE__ */ jsxRuntimeExports.jsxs(ErrorDetails, { children: [
184204
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorSummary, { children: "Full details" }),
184205
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorStack, { children: this.state.error.stack })
184206
+ ] })
184207
+ ] }) });
184208
+ }
184209
+ return this.props.children;
184210
+ }
184211
+ }
184015
184212
  const fastClone = (obj) => structuredClone(obj);
184016
184213
  const generateColorBlock = (colorBlock, options) => {
184017
184214
  const updatedColorBlock = { ...colorBlock };
@@ -185602,7 +185799,7 @@ const SbProvider = function SbProvider2({
185602
185799
  },
185603
185800
  id: "sb-provider-root",
185604
185801
  children: [
185605
- /* @__PURE__ */ jsxRuntimeExports.jsx(
185802
+ /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundary2, { theme: userAccessibleTheme, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
185606
185803
  "div",
185607
185804
  {
185608
185805
  id: CANVAS_ROOT_ID,
@@ -185617,7 +185814,7 @@ const SbProvider = function SbProvider2({
185617
185814
  },
185618
185815
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeProvider, { theme: userAccessibleTheme, children: /* @__PURE__ */ jsxRuntimeExports.jsx(GlobalScope, { children: isEmbedded ? /* @__PURE__ */ jsxRuntimeExports.jsx(EmbedWrapper, { children }) : /* @__PURE__ */ jsxRuntimeExports.jsx(Auth0Wrapper, { children }) }) })
185619
185816
  }
185620
- ),
185817
+ ) }),
185621
185818
  /* @__PURE__ */ jsxRuntimeExports.jsx("div", { id: MODAL_TARGET_ROOT_ID, "data-superblocks": MODAL_TARGET_ROOT_ID })
185622
185819
  ]
185623
185820
  }
@@ -185878,6 +186075,7 @@ function useUpdateProperties() {
185878
186075
  [actions]
185879
186076
  );
185880
186077
  }
186078
+ const useTheme = useTheme$1;
185881
186079
  function sbComputed(fn3) {
185882
186080
  const computedValue = computed(() => {
185883
186081
  try {
@@ -193371,21 +193569,21 @@ function groupRoutesByParentId(manifest) {
193371
193569
  function getRouteComponents(route, routeModule, isSpaMode) {
193372
193570
  let Component4 = getRouteModuleComponent(routeModule);
193373
193571
  let HydrateFallback = routeModule.HydrateFallback && (!isSpaMode || route.id === "root") ? routeModule.HydrateFallback : route.id === "root" ? RemixRootDefaultHydrateFallback : void 0;
193374
- let ErrorBoundary2 = routeModule.ErrorBoundary ? routeModule.ErrorBoundary : route.id === "root" ? () => /* @__PURE__ */ React.createElement(RemixRootDefaultErrorBoundary, { error: useRouteError() }) : void 0;
193572
+ let ErrorBoundary3 = routeModule.ErrorBoundary ? routeModule.ErrorBoundary : route.id === "root" ? () => /* @__PURE__ */ React.createElement(RemixRootDefaultErrorBoundary, { error: useRouteError() }) : void 0;
193375
193573
  if (route.id === "root" && routeModule.Layout) {
193376
193574
  return {
193377
193575
  ...Component4 ? {
193378
193576
  element: /* @__PURE__ */ React.createElement(routeModule.Layout, null, /* @__PURE__ */ React.createElement(Component4, null))
193379
193577
  } : { Component: Component4 },
193380
- ...ErrorBoundary2 ? {
193381
- errorElement: /* @__PURE__ */ React.createElement(routeModule.Layout, null, /* @__PURE__ */ React.createElement(ErrorBoundary2, null))
193382
- } : { ErrorBoundary: ErrorBoundary2 },
193578
+ ...ErrorBoundary3 ? {
193579
+ errorElement: /* @__PURE__ */ React.createElement(routeModule.Layout, null, /* @__PURE__ */ React.createElement(ErrorBoundary3, null))
193580
+ } : { ErrorBoundary: ErrorBoundary3 },
193383
193581
  ...HydrateFallback ? {
193384
193582
  hydrateFallbackElement: /* @__PURE__ */ React.createElement(routeModule.Layout, null, /* @__PURE__ */ React.createElement(HydrateFallback, null))
193385
193583
  } : { HydrateFallback }
193386
193584
  };
193387
193585
  }
193388
- return { Component: Component4, ErrorBoundary: ErrorBoundary2, HydrateFallback };
193586
+ return { Component: Component4, ErrorBoundary: ErrorBoundary3, HydrateFallback };
193389
193587
  }
193390
193588
  function createServerRoutes(manifest, routeModules, future, isSpaMode, parentId = "", routesByParentId = groupRoutesByParentId(manifest), spaModeLazyPromise = Promise.resolve({ Component: () => null })) {
193391
193589
  return (routesByParentId[parentId] || []).map((route) => {
@@ -197027,7 +197225,7 @@ function requireClient() {
197027
197225
  }
197028
197226
  var clientExports = requireClient();
197029
197227
  export {
197030
- IDLE_BLOCKER as $,
197228
+ HashRouter as $,
197031
197229
  AppStateVarPersistence6 as A,
197032
197230
  setQueryParams as B,
197033
197231
  download as C,
@@ -197042,129 +197240,130 @@ export {
197042
197240
  Env as L,
197043
197241
  SbEvent as M,
197044
197242
  useUpdateProperties as N,
197045
- sbComputed as O,
197243
+ useTheme as O,
197046
197244
  Prop as P,
197047
- Dim as Q,
197048
- SB as R,
197245
+ sbComputed as Q,
197246
+ Dim as R,
197049
197247
  SbButton as S,
197050
197248
  Theme as T,
197051
- Outlet as U,
197052
- clientExports as V,
197053
- Await as W,
197054
- BrowserRouter as X,
197055
- Form2 as Y,
197056
- HashRouter as Z,
197249
+ SB as U,
197250
+ Outlet as V,
197251
+ clientExports as W,
197252
+ Await as X,
197253
+ BrowserRouter as Y,
197254
+ Form2 as Z,
197057
197255
  __awaiter as _,
197058
197256
  __generator as a,
197059
- isCookie as a$,
197060
- IDLE_FETCHER as a0,
197061
- IDLE_NAVIGATION as a1,
197062
- Link as a2,
197063
- Links as a3,
197064
- MemoryRouter as a4,
197065
- Meta as a5,
197066
- NavLink as a6,
197067
- Navigate as a7,
197068
- Action as a8,
197069
- PrefetchPageLinks as a9,
197070
- deserializeErrors2 as aA,
197071
- getPatchRoutesOnNavigationFunction as aB,
197072
- getSingleFetchDataStrategy as aC,
197073
- invariant as aD,
197074
- mapRouteProperties as aE,
197075
- shouldHydrateRouteLoader as aF,
197076
- useFogOFWarDiscovery as aG,
197077
- useScrollRestoration as aH,
197078
- createBrowserRouter as aI,
197079
- createCookie as aJ,
197080
- createCookieSessionStorage as aK,
197081
- createHashRouter as aL,
197082
- createMemoryRouter as aM,
197083
- createMemorySessionStorage as aN,
197084
- createPath as aO,
197085
- createRequestHandler as aP,
197086
- createRoutesFromChildren as aQ,
197087
- createRoutesFromElements as aR,
197088
- createRoutesStub as aS,
197089
- createSearchParams as aT,
197090
- createSession as aU,
197091
- createSessionStorage as aV,
197092
- createStaticHandler2 as aW,
197093
- createStaticRouter as aX,
197094
- data as aY,
197095
- generatePath as aZ,
197096
- href as a_,
197097
- Route as aa,
197098
- Router as ab,
197099
- RouterProvider as ac,
197100
- Routes as ad,
197101
- Scripts as ae,
197102
- ScrollRestoration as af,
197103
- ServerRouter as ag,
197104
- StaticRouter as ah,
197105
- StaticRouterProvider as ai,
197106
- DataRouterContext as aj,
197107
- DataRouterStateContext as ak,
197108
- ErrorResponseImpl as al,
197109
- FetchersContext as am,
197110
- FrameworkContext as an,
197111
- LocationContext as ao,
197112
- NavigationContext as ap,
197113
- RemixErrorBoundary as aq,
197114
- RouteContext as ar,
197115
- ServerMode as as,
197116
- SingleFetchRedirectSymbol as at,
197117
- ViewTransitionContext as au,
197118
- createBrowserHistory as av,
197119
- createClientRoutes as aw,
197120
- createClientRoutesWithHMRRevalidationOptOut as ax,
197121
- createRouter as ay,
197122
- decodeViaTurboStream as az,
197257
+ href as a$,
197258
+ IDLE_BLOCKER as a0,
197259
+ IDLE_FETCHER as a1,
197260
+ IDLE_NAVIGATION as a2,
197261
+ Link as a3,
197262
+ Links as a4,
197263
+ MemoryRouter as a5,
197264
+ Meta as a6,
197265
+ NavLink as a7,
197266
+ Navigate as a8,
197267
+ Action as a9,
197268
+ decodeViaTurboStream as aA,
197269
+ deserializeErrors2 as aB,
197270
+ getPatchRoutesOnNavigationFunction as aC,
197271
+ getSingleFetchDataStrategy as aD,
197272
+ invariant as aE,
197273
+ mapRouteProperties as aF,
197274
+ shouldHydrateRouteLoader as aG,
197275
+ useFogOFWarDiscovery as aH,
197276
+ useScrollRestoration as aI,
197277
+ createBrowserRouter as aJ,
197278
+ createCookie as aK,
197279
+ createCookieSessionStorage as aL,
197280
+ createHashRouter as aM,
197281
+ createMemoryRouter as aN,
197282
+ createMemorySessionStorage as aO,
197283
+ createPath as aP,
197284
+ createRequestHandler as aQ,
197285
+ createRoutesFromChildren as aR,
197286
+ createRoutesFromElements as aS,
197287
+ createRoutesStub as aT,
197288
+ createSearchParams as aU,
197289
+ createSession as aV,
197290
+ createSessionStorage as aW,
197291
+ createStaticHandler2 as aX,
197292
+ createStaticRouter as aY,
197293
+ data as aZ,
197294
+ generatePath as a_,
197295
+ PrefetchPageLinks as aa,
197296
+ Route as ab,
197297
+ Router as ac,
197298
+ RouterProvider as ad,
197299
+ Routes as ae,
197300
+ Scripts as af,
197301
+ ScrollRestoration as ag,
197302
+ ServerRouter as ah,
197303
+ StaticRouter as ai,
197304
+ StaticRouterProvider as aj,
197305
+ DataRouterContext as ak,
197306
+ DataRouterStateContext as al,
197307
+ ErrorResponseImpl as am,
197308
+ FetchersContext as an,
197309
+ FrameworkContext as ao,
197310
+ LocationContext as ap,
197311
+ NavigationContext as aq,
197312
+ RemixErrorBoundary as ar,
197313
+ RouteContext as as,
197314
+ ServerMode as at,
197315
+ SingleFetchRedirectSymbol as au,
197316
+ ViewTransitionContext as av,
197317
+ createBrowserHistory as aw,
197318
+ createClientRoutes as ax,
197319
+ createClientRoutesWithHMRRevalidationOptOut as ay,
197320
+ createRouter as az,
197123
197321
  IconSize as b,
197124
- isRouteErrorResponse as b0,
197125
- isSession as b1,
197126
- matchPath as b2,
197127
- matchRoutes as b3,
197128
- parsePath as b4,
197129
- redirect as b5,
197130
- redirectDocument as b6,
197131
- renderMatches as b7,
197132
- replace2 as b8,
197133
- resolvePath as b9,
197134
- useResolvedPath as bA,
197135
- useRevalidator as bB,
197136
- useRouteError as bC,
197137
- useRouteLoaderData as bD,
197138
- useRoutes as bE,
197139
- useSearchParams as bF,
197140
- useSubmit as bG,
197141
- useViewTransitionState as bH,
197142
- HistoryRouter as ba,
197143
- unstable_RouterContextProvider as bb,
197144
- unstable_createContext as bc,
197145
- setDevServerHooks as bd,
197146
- usePrompt as be,
197147
- useActionData as bf,
197148
- useAsyncError as bg,
197149
- useAsyncValue as bh,
197150
- useBeforeUnload as bi,
197151
- useBlocker as bj,
197152
- useFetcher as bk,
197153
- useFetchers as bl,
197154
- useFormAction as bm,
197155
- useHref as bn,
197156
- useInRouterContext as bo,
197157
- useLinkClickHandler as bp,
197158
- useLoaderData as bq,
197159
- useLocation as br,
197160
- useMatch as bs,
197161
- useMatches as bt,
197162
- useNavigate as bu,
197163
- useNavigation as bv,
197164
- useNavigationType as bw,
197165
- useOutlet as bx,
197166
- useOutletContext as by,
197167
- useParams as bz,
197322
+ isCookie as b0,
197323
+ isRouteErrorResponse as b1,
197324
+ isSession as b2,
197325
+ matchPath as b3,
197326
+ matchRoutes as b4,
197327
+ parsePath as b5,
197328
+ redirect as b6,
197329
+ redirectDocument as b7,
197330
+ renderMatches as b8,
197331
+ replace2 as b9,
197332
+ useParams as bA,
197333
+ useResolvedPath as bB,
197334
+ useRevalidator as bC,
197335
+ useRouteError as bD,
197336
+ useRouteLoaderData as bE,
197337
+ useRoutes as bF,
197338
+ useSearchParams as bG,
197339
+ useSubmit as bH,
197340
+ useViewTransitionState as bI,
197341
+ resolvePath as ba,
197342
+ HistoryRouter as bb,
197343
+ unstable_RouterContextProvider as bc,
197344
+ unstable_createContext as bd,
197345
+ setDevServerHooks as be,
197346
+ usePrompt as bf,
197347
+ useActionData as bg,
197348
+ useAsyncError as bh,
197349
+ useAsyncValue as bi,
197350
+ useBeforeUnload as bj,
197351
+ useBlocker as bk,
197352
+ useFetcher as bl,
197353
+ useFetchers as bm,
197354
+ useFormAction as bn,
197355
+ useHref as bo,
197356
+ useInRouterContext as bp,
197357
+ useLinkClickHandler as bq,
197358
+ useLoaderData as br,
197359
+ useLocation as bs,
197360
+ useMatch as bt,
197361
+ useMatches as bu,
197362
+ useNavigate as bv,
197363
+ useNavigation as bw,
197364
+ useNavigationType as bx,
197365
+ useOutlet as by,
197366
+ useOutletContext as bz,
197168
197367
  SbSection as c,
197169
197368
  SbColumn as d,
197170
197369
  SbContainer as e,
@@ -197190,4 +197389,4 @@ export {
197190
197389
  copyToClipboard as y,
197191
197390
  navigateTo as z
197192
197391
  };
197193
- //# sourceMappingURL=index-jDTJt0yG.js.map
197392
+ //# sourceMappingURL=index-DV7VPZc1.js.map