@superblocksteam/library 2.0.6-next.19 → 2.0.6-next.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.
Files changed (28) hide show
  1. package/dist/{allPaths-IhoxI4IW.js → allPaths-BtYOw5Ru.js} +2 -2
  2. package/dist/{allPaths-IhoxI4IW.js.map → allPaths-BtYOw5Ru.js.map} +1 -1
  3. package/dist/{allPaths-C3m8JKL1.js → allPaths-CO-aWzss.js} +2 -2
  4. package/dist/{allPaths-C3m8JKL1.js.map → allPaths-CO-aWzss.js.map} +1 -1
  5. package/dist/{allPathsLoader-5w2Df9lN.js → allPathsLoader-B3Ii4JGL.js} +3 -3
  6. package/dist/{allPathsLoader-BAwHv7e7.js.map → allPathsLoader-B3Ii4JGL.js.map} +1 -1
  7. package/dist/{allPathsLoader-BAwHv7e7.js → allPathsLoader-KDCEbuYo.js} +3 -3
  8. package/dist/{allPathsLoader-5w2Df9lN.js.map → allPathsLoader-KDCEbuYo.js.map} +1 -1
  9. package/dist/{devtools-consolidated-Eo3xuD81.js → devtools-consolidated-B1B3uBW_.js} +2 -2
  10. package/dist/{devtools-consolidated-Eo3xuD81.js.map → devtools-consolidated-B1B3uBW_.js.map} +1 -1
  11. package/dist/{index-Bnnq0M9f.js → index-kjgG33Rg.js} +145 -246
  12. package/dist/{index-Bnnq0M9f.js.map → index-kjgG33Rg.js.map} +1 -1
  13. package/dist/index.js +2 -2
  14. package/dist/{splitPathsBySizeLoader-DALk2KWT.js → splitPathsBySizeLoader-Btq5cpt-.js} +2 -2
  15. package/dist/{splitPathsBySizeLoader-DALk2KWT.js.map → splitPathsBySizeLoader-Btq5cpt-.js.map} +1 -1
  16. package/dist/{splitPathsBySizeLoader-CUJrKt9p.js → splitPathsBySizeLoader-VThmaq3t.js} +2 -2
  17. package/dist/{splitPathsBySizeLoader-CUJrKt9p.js.map → splitPathsBySizeLoader-VThmaq3t.js.map} +1 -1
  18. package/dist-types/edit-mode/iframe-wrappers.d.ts +0 -1
  19. package/dist-types/lib/internal-details/is-sb-component.d.ts +1 -5
  20. package/dist-types/lib/triggers/implementations/state/reset-state-var.d.ts +3 -3
  21. package/dist-types/lib/triggers/implementations/state/set-state-var.d.ts +3 -3
  22. package/dist-types/lib/triggers/implementations/timers/control-timer.d.ts +3 -4
  23. package/dist-types/lib/triggers/registry.d.ts +6 -6
  24. package/dist-types/lib/user-facing/components/grid/index.d.ts +5 -7
  25. package/dist-types/lib/user-facing/components/grid/utils.d.ts +1 -0
  26. package/dist-types/lib/user-facing/sb-event-flow.d.ts +2 -2
  27. package/package.json +3 -3
  28. package/dist-types/lib/user-facing/build-manifest.d.ts +0 -2
@@ -78418,7 +78418,7 @@ const ShowAlertTrigger = {
78418
78418
  const ResetStateVarTrigger = {
78419
78419
  type: TriggerStepType.RESET_STATE_VAR,
78420
78420
  async execute(context2, step) {
78421
- if (step.variable === void 0) {
78421
+ if (step.state === void 0) {
78422
78422
  return;
78423
78423
  }
78424
78424
  context2.rootStore.entityManager.runCode({
@@ -78426,22 +78426,22 @@ const ResetStateVarTrigger = {
78426
78426
  name: context2.name,
78427
78427
  func: () => {
78428
78428
  var _a2;
78429
- return (_a2 = step.variable) == null ? void 0 : _a2.set(step.variable.defaultValue);
78429
+ return (_a2 = step.state) == null ? void 0 : _a2.set(step.state.defaultValue);
78430
78430
  },
78431
78431
  args: []
78432
78432
  });
78433
78433
  },
78434
- create(variable) {
78434
+ create(stateVar) {
78435
78435
  return {
78436
78436
  type: TriggerStepType.RESET_STATE_VAR,
78437
- variable
78437
+ state: stateVar
78438
78438
  };
78439
78439
  }
78440
78440
  };
78441
78441
  const SetStateVarTrigger = {
78442
78442
  type: TriggerStepType.SET_STATE_VAR,
78443
78443
  async execute(context2, step) {
78444
- if (step.variable === void 0) {
78444
+ if (step.state === void 0) {
78445
78445
  return;
78446
78446
  }
78447
78447
  const value = context2.rootStore.entityManager.computeValue({
@@ -78455,15 +78455,15 @@ const SetStateVarTrigger = {
78455
78455
  func: (state, value2) => {
78456
78456
  var _a2;
78457
78457
  if (!state) return;
78458
- (_a2 = step.variable) == null ? void 0 : _a2.set(value2);
78458
+ (_a2 = step.state) == null ? void 0 : _a2.set(value2);
78459
78459
  },
78460
78460
  args: [value]
78461
78461
  });
78462
78462
  },
78463
- create(variable, value) {
78463
+ create(stateVar, value) {
78464
78464
  return {
78465
78465
  type: TriggerStepType.SET_STATE_VAR,
78466
- variable,
78466
+ state: stateVar,
78467
78467
  value
78468
78468
  };
78469
78469
  }
@@ -78471,14 +78471,12 @@ const SetStateVarTrigger = {
78471
78471
  const ControlTimerTrigger = {
78472
78472
  type: TriggerStepType.CONTROL_TIMER,
78473
78473
  async execute(_context, step) {
78474
- if (step.timer) {
78475
- step.timer[step.action]();
78476
- }
78474
+ console.log("ControlTimerTrigger", step);
78477
78475
  },
78478
- create(timer, action2) {
78476
+ create(timerId, action2) {
78479
78477
  return {
78480
78478
  type: TriggerStepType.CONTROL_TIMER,
78481
- timer,
78479
+ timerId,
78482
78480
  action: action2
78483
78481
  };
78484
78482
  }
@@ -83506,7 +83504,7 @@ function registerStores(stores) {
83506
83504
  internalStores = { ...internalStores, ...stores };
83507
83505
  if (SUPPORTED_MODES.includes("production")) {
83508
83506
  if (Object.keys(internalStores).length === Object.keys(stores).length) {
83509
- import("./devtools-consolidated-Eo3xuD81.js").then(({ initializeCustomDevTools, setRegisteredStores }) => {
83507
+ import("./devtools-consolidated-B1B3uBW_.js").then(({ initializeCustomDevTools, setRegisteredStores }) => {
83510
83508
  setRegisteredStores(internalStores);
83511
83509
  initializeCustomDevTools();
83512
83510
  }).catch((error) => {
@@ -83519,7 +83517,7 @@ function registerStores(stores) {
83519
83517
  }
83520
83518
  }
83521
83519
  const DevToolsInternal = React__default.lazy(() => {
83522
- return import("./devtools-consolidated-Eo3xuD81.js").then((module2) => ({
83520
+ return import("./devtools-consolidated-B1B3uBW_.js").then((module2) => ({
83523
83521
  default: module2.CustomDevTools
83524
83522
  }));
83525
83523
  });
@@ -83876,11 +83874,11 @@ class SbEventFlow {
83876
83874
  controlModal(modal, action2) {
83877
83875
  return this.addStep(EventRegistry.controlModal.create(modal, action2));
83878
83876
  }
83879
- static controlTimer(stateTimer, action2) {
83880
- return SbEventFlow.start().controlTimer(stateTimer, action2);
83877
+ static controlTimer(timerId, action2) {
83878
+ return SbEventFlow.start().controlTimer(timerId, action2);
83881
83879
  }
83882
- controlTimer(stateTimer, action2) {
83883
- return this.addStep(EventRegistry.controlTimer.create(stateTimer, action2));
83880
+ controlTimer(timerId, action2) {
83881
+ return this.addStep(EventRegistry.controlTimer.create(timerId, action2));
83884
83882
  }
83885
83883
  static runApis(apis, onSuccess, onError2) {
83886
83884
  return SbEventFlow.start().runApis(apis, onSuccess, onError2);
@@ -86954,7 +86952,7 @@ function getPropertyValue$1({
86954
86952
  return property.value;
86955
86953
  }
86956
86954
  function getSbEventFlow(step, scopeId) {
86957
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
86955
+ var _a2, _b2, _c2, _d2, _e2, _f2;
86958
86956
  if (!isValidStepDef(step)) {
86959
86957
  return void 0;
86960
86958
  }
@@ -87027,33 +87025,27 @@ function getSbEventFlow(step, scopeId) {
87027
87025
  return SbEventFlow.controlModal(modalEntity, step.direction);
87028
87026
  }
87029
87027
  case "controlTimer": {
87030
- const timerStep = step;
87031
- if (!((_a2 = timerStep.timer) == null ? void 0 : _a2.name)) {
87032
- return void 0;
87033
- }
87034
- const timerEntity = getEntity(timerStep.timer.name);
87028
+ const timerEntity = getEntity(step.name);
87035
87029
  if (!timerEntity) return void 0;
87036
- return SbEventFlow.controlTimer(timerEntity, step.command ?? "start");
87030
+ return SbEventFlow.controlTimer(step.name, step.command);
87037
87031
  }
87038
87032
  case "setStateVar": {
87039
- const variableStep = step;
87040
- const stateEntity = getEntity((_b2 = variableStep.variable) == null ? void 0 : _b2.name);
87033
+ const stateEntity = getEntity((_a2 = step.state) == null ? void 0 : _a2.name);
87041
87034
  if (!stateEntity) return void 0;
87042
- const value = isPropertyInfo(variableStep.value) ? getPropertyValue$1({
87043
- property: variableStep.value,
87035
+ const value = isPropertyInfo(step.value) ? getPropertyValue$1({
87036
+ property: step.value,
87044
87037
  scopeId,
87045
- name: getName((_c2 = variableStep.variable) == null ? void 0 : _c2.name)
87038
+ name: getName((_b2 = step.state) == null ? void 0 : _b2.name)
87046
87039
  }) : step.value;
87047
87040
  return SbEventFlow.setStateVar(stateEntity, value);
87048
87041
  }
87049
87042
  case "resetStateVar": {
87050
- const variableStep = step;
87051
- const resetStateEntity = getEntity((_d2 = variableStep.variable) == null ? void 0 : _d2.name);
87043
+ const resetStateEntity = getEntity((_c2 = step.state) == null ? void 0 : _c2.name);
87052
87044
  if (!resetStateEntity) return void 0;
87053
87045
  return SbEventFlow.resetStateVar(resetStateEntity);
87054
87046
  }
87055
87047
  case "resetComponent": {
87056
- const resetWidgetEntity = getEntity((_e2 = step.widget) == null ? void 0 : _e2.name);
87048
+ const resetWidgetEntity = getEntity((_d2 = step.widget) == null ? void 0 : _d2.name);
87057
87049
  if (!resetWidgetEntity) return void 0;
87058
87050
  return SbEventFlow.resetComponent(
87059
87051
  step.widget,
@@ -87062,7 +87054,7 @@ function getSbEventFlow(step, scopeId) {
87062
87054
  );
87063
87055
  }
87064
87056
  case "setComponentProperty": {
87065
- const setWidgetEntity = getEntity((_f2 = step.widget) == null ? void 0 : _f2.name);
87057
+ const setWidgetEntity = getEntity((_e2 = step.widget) == null ? void 0 : _e2.name);
87066
87058
  if (!setWidgetEntity) return void 0;
87067
87059
  return SbEventFlow.setComponentProperty(
87068
87060
  step.widget,
@@ -87080,7 +87072,7 @@ function getSbEventFlow(step, scopeId) {
87080
87072
  case "setProfile":
87081
87073
  return SbEventFlow.setProfile(step.profileId, step.profileAction);
87082
87074
  case "triggerEvent":
87083
- return SbEventFlow.triggerEvent((_g2 = step.event) == null ? void 0 : _g2.name, step.eventPayload);
87075
+ return SbEventFlow.triggerEvent((_f2 = step.event) == null ? void 0 : _f2.name, step.eventPayload);
87084
87076
  default:
87085
87077
  console.warn("Unhandled runtime step type", step.type);
87086
87078
  return void 0;
@@ -91047,14 +91039,14 @@ function getLoaderFn$1(options) {
91047
91039
  if (!(loader === "all")) return [3, 3];
91048
91040
  return [4, import(
91049
91041
  /* webpackChunkName: "blueprint-icons-all-paths-loader" */
91050
- "./allPathsLoader-5w2Df9lN.js"
91042
+ "./allPathsLoader-KDCEbuYo.js"
91051
91043
  )];
91052
91044
  case 2:
91053
91045
  return [2, _b2.sent().allPathsLoader];
91054
91046
  case 3:
91055
91047
  return [4, import(
91056
91048
  /* webpackChunkName: "blueprint-icons-split-paths-by-size-loader" */
91057
- "./splitPathsBySizeLoader-CUJrKt9p.js"
91049
+ "./splitPathsBySizeLoader-VThmaq3t.js"
91058
91050
  )];
91059
91051
  case 4:
91060
91052
  return [2, _b2.sent().splitPathsBySizeLoader];
@@ -111856,52 +111848,28 @@ const size$2 = ({
111856
111848
  controlType: "WIDTH_DROPDOWN",
111857
111849
  defaultValue: defaults2 == null ? void 0 : defaults2.minWidth,
111858
111850
  defaultOnAdd: defaultsOnAdd == null ? void 0 : defaultsOnAdd.minWidth,
111859
- isVisible: function(s3) {
111860
- var _a2;
111861
- const hideWidth = ((_a2 = this == null ? void 0 : this.width) == null ? void 0 : _a2.mode) === "px";
111862
- return Boolean(
111863
- (showMinWidth ? showMinWidth == null ? void 0 : showMinWidth.call(this, s3) : true) && !hideWidth
111864
- );
111865
- }
111851
+ isVisible: showMinWidth
111866
111852
  });
111867
111853
  const maxWidthProperty = getSizeProp({
111868
111854
  label: "Max width",
111869
111855
  controlType: "WIDTH_DROPDOWN",
111870
111856
  defaultValue: defaults2 == null ? void 0 : defaults2.maxWidth,
111871
111857
  defaultOnAdd: defaultsOnAdd == null ? void 0 : defaultsOnAdd.maxWidth,
111872
- isVisible: function(s3) {
111873
- var _a2;
111874
- const hideWidth = ((_a2 = this == null ? void 0 : this.width) == null ? void 0 : _a2.mode) === "px";
111875
- return Boolean(
111876
- (showMaxWidth ? showMaxWidth == null ? void 0 : showMaxWidth.call(this, s3) : true) && !hideWidth
111877
- );
111878
- }
111858
+ isVisible: showMaxWidth
111879
111859
  });
111880
111860
  const minHeightProperty = getSizeProp({
111881
111861
  label: "Min height",
111882
111862
  controlType: "HEIGHT_DROPDOWN",
111883
111863
  defaultValue: defaults2 == null ? void 0 : defaults2.minHeight,
111884
111864
  defaultOnAdd: defaultsOnAdd == null ? void 0 : defaultsOnAdd.minHeight,
111885
- isVisible: function(s3) {
111886
- var _a2;
111887
- const hideHeight = ((_a2 = this == null ? void 0 : this.height) == null ? void 0 : _a2.mode) === "px";
111888
- return Boolean(
111889
- (showMinHeight ? showMinHeight == null ? void 0 : showMinHeight.call(this, s3) : true) && !hideHeight
111890
- );
111891
- }
111865
+ isVisible: showMinHeight
111892
111866
  });
111893
111867
  const maxHeightProperty = getSizeProp({
111894
111868
  label: "Max height",
111895
111869
  controlType: "HEIGHT_DROPDOWN",
111896
111870
  defaultValue: defaults2 == null ? void 0 : defaults2.maxHeight,
111897
111871
  defaultOnAdd: defaultsOnAdd == null ? void 0 : defaultsOnAdd.maxHeight,
111898
- isVisible: function(s3) {
111899
- var _a2;
111900
- const hideHeight = ((_a2 = this == null ? void 0 : this.height) == null ? void 0 : _a2.mode) === "px";
111901
- return Boolean(
111902
- (showMaxHeight ? showMaxHeight == null ? void 0 : showMaxHeight.call(this, s3) : true) && !hideHeight
111903
- );
111904
- }
111872
+ isVisible: showMaxHeight
111905
111873
  });
111906
111874
  let heightProperty = Prop.dimension().readAndWrite().propertiesPanel({
111907
111875
  label: "Height",
@@ -117562,18 +117530,12 @@ const AddSectionButton = ({
117562
117530
  sectionInstanceId
117563
117531
  }) => {
117564
117532
  const indexForNewSection = placement === "above" ? indexForBaseSection : indexForBaseSection + 1;
117565
- const createSection = useCallback(async () => {
117566
- const newSectionSourceId = await createComponent({
117533
+ const createSection = useCallback(() => {
117534
+ createComponent({
117567
117535
  componentType: "SbSection",
117568
117536
  parent: { id: sectionParentSourceId, index: indexForNewSection },
117569
117537
  scopeName: sectionParentScopeName
117570
117538
  });
117571
- if (newSectionSourceId) {
117572
- const newSectionInstanceId = getEditStore().runtimeEntitiesManager.widgets.getAnyInstanceIdForSourceId(
117573
- newSectionSourceId
117574
- );
117575
- getEditStore().ui.selectWidget(newSectionInstanceId);
117576
- }
117577
117539
  }, [sectionParentSourceId, indexForNewSection, sectionParentScopeName]);
117578
117540
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
117579
117541
  Wrapper$2,
@@ -119861,13 +119823,22 @@ const getStackChildStyle = ({
119861
119823
  (childProps == null ? void 0 : childProps.type) ?? ""
119862
119824
  ) ? Dim.fit() : Dim.fill());
119863
119825
  const widthCss = childCount === 1 && (width == null ? void 0 : width.mode) === "fill" && (parentWidth == null ? void 0 : parentWidth.mode) !== "fit" ? { width: "100%" } : dimToCSS(width, "width", primary === "width");
119864
- const widthInPx = (width == null ? void 0 : width.mode) === "px";
119865
- const heightInPx = (height == null ? void 0 : height.mode) === "px";
119866
- const shouldNotShrink = widthInPx && primary === "width" || heightInPx && primary === "height";
119867
- const minWidthCss = widthInPx ? {} : getMinMaxCss(childProps == null ? void 0 : childProps.minWidth, "minWidth");
119868
- const maxWidthCss = widthInPx ? {} : getMinMaxCss(childProps == null ? void 0 : childProps.maxWidth, "maxWidth");
119869
- const minHeightCss = heightInPx ? {} : getMinMaxCss(childProps == null ? void 0 : childProps.minHeight, "minHeight");
119870
- const maxHeightCss = heightInPx ? {} : getMinMaxCss(childProps == null ? void 0 : childProps.maxHeight, "maxHeight");
119826
+ const minWidthCss = getMinMaxCss(
119827
+ childProps == null ? void 0 : childProps.minWidth,
119828
+ "minWidth"
119829
+ );
119830
+ const maxWidthCss = getMinMaxCss(
119831
+ childProps == null ? void 0 : childProps.maxWidth,
119832
+ "maxWidth"
119833
+ );
119834
+ const minHeightCss = getMinMaxCss(
119835
+ childProps == null ? void 0 : childProps.minHeight,
119836
+ "minHeight"
119837
+ );
119838
+ const maxHeightCss = getMinMaxCss(
119839
+ childProps == null ? void 0 : childProps.maxHeight,
119840
+ "maxHeight"
119841
+ );
119871
119842
  const margin2 = (childProps == null ? void 0 : childProps.margin) ?? {
119872
119843
  top: Dim.px(0),
119873
119844
  bottom: Dim.px(0),
@@ -119877,7 +119848,6 @@ const getStackChildStyle = ({
119877
119848
  const marginCss = { margin: generatePaddingStyle(margin2) };
119878
119849
  const stickyCss = (childProps == null ? void 0 : childProps.sticky) ? { position: "sticky", top: "0px", zIndex: Layers$1.stickySections } : {};
119879
119850
  const style2 = {
119880
- ...shouldNotShrink ? { flexShrink: 0 } : {},
119881
119851
  ...heightCss,
119882
119852
  ...widthCss,
119883
119853
  ...minHeightCss,
@@ -120088,16 +120058,20 @@ const generateClassName = (seed2) => {
120088
120058
  return `superblocks_widget_${seed2}`;
120089
120059
  };
120090
120060
  const getCanvasClassName = () => "canvas";
120061
+ const getChildName = (child) => {
120062
+ var _a2;
120063
+ return ((_a2 = getBindingIdentifier(child.props.bind)) == null ? void 0 : _a2.entityName) ?? child.props[WIDGET_SOURCE_ID_ATTRIBUTE];
120064
+ };
120091
120065
  const calculateRowPositions = (orderedNames, childrenArray, rowHeight, pxHeights) => {
120092
120066
  return orderedNames.reduce(
120093
120067
  (acc, name) => {
120094
120068
  var _a2;
120095
- const child = childrenArray.find((child2) => child2.name === name);
120069
+ const child = childrenArray.find((child2) => getChildName(child2) === name);
120096
120070
  if (!child) {
120097
120071
  return acc;
120098
120072
  }
120099
- const marginTopPx = (((_a2 = child.marginTop) == null ? void 0 : _a2.value) ?? 0) * rowHeight;
120100
- const constraintTop = child.constraintTop;
120073
+ const marginTopPx = (((_a2 = child.props.marginTop) == null ? void 0 : _a2.value) ?? 0) * rowHeight;
120074
+ const constraintTop = child.props.constraintTop;
120101
120075
  const bottomFunc = (name2) => {
120102
120076
  const topRow = acc[name2];
120103
120077
  const pxHeight = pxHeights[name2];
@@ -120122,16 +120096,16 @@ const calculateRowPositions = (orderedNames, childrenArray, rowHeight, pxHeights
120122
120096
  const orderConstraints = (children) => {
120123
120097
  const childrenMap = children.reduce(
120124
120098
  (acc, child) => {
120125
- acc[child.name] = child;
120099
+ acc[getChildName(child)] = child;
120126
120100
  return acc;
120127
120101
  },
120128
120102
  {}
120129
120103
  );
120130
120104
  const constraintsMap = children.reduce(
120131
120105
  (acc, child) => {
120132
- if (child.constraintTop) {
120133
- const constraints = Array.isArray(child.constraintTop) ? child.constraintTop : [child.constraintTop];
120134
- acc[child.name] = constraints.filter(
120106
+ if (child.props.constraintTop) {
120107
+ const constraints = Array.isArray(child.props.constraintTop) ? child.props.constraintTop : [child.props.constraintTop];
120108
+ acc[getChildName(child)] = constraints.filter(
120135
120109
  (constraint) => !!childrenMap[constraint]
120136
120110
  );
120137
120111
  }
@@ -120143,24 +120117,24 @@ const orderConstraints = (children) => {
120143
120117
  const foundItems = /* @__PURE__ */ new Set();
120144
120118
  const itemsLeft = /* @__PURE__ */ new Set();
120145
120119
  children.forEach((child) => {
120146
- const constraints = constraintsMap[child.name] ?? [];
120120
+ const constraints = constraintsMap[getChildName(child)] ?? [];
120147
120121
  const hasNoConstraints = constraints.length === 0;
120148
120122
  if (hasNoConstraints) {
120149
- foundItems.add(child.name);
120150
- orderedNames.push(child.name);
120123
+ foundItems.add(getChildName(child));
120124
+ orderedNames.push(getChildName(child));
120151
120125
  } else {
120152
120126
  itemsLeft.add(child);
120153
120127
  }
120154
120128
  });
120155
120129
  while (itemsLeft.size > 0) {
120156
120130
  itemsLeft.forEach((child) => {
120157
- const constraints = constraintsMap[child.name] ?? [];
120131
+ const constraints = constraintsMap[getChildName(child)] ?? [];
120158
120132
  const constraintsLeft = constraints.filter(
120159
120133
  (constraint) => !foundItems.has(constraint)
120160
120134
  );
120161
120135
  if (constraintsLeft.length === 0) {
120162
- foundItems.add(child.name);
120163
- orderedNames.push(child.name);
120136
+ foundItems.add(getChildName(child));
120137
+ orderedNames.push(getChildName(child));
120164
120138
  itemsLeft.delete(child);
120165
120139
  }
120166
120140
  });
@@ -120211,141 +120185,99 @@ const heightReducer = (state, action2) => {
120211
120185
  }
120212
120186
  };
120213
120187
  const EMPTY_ARRAY$1 = [];
120214
- const GridChild = observer(
120215
- ({
120216
- childProps,
120217
- gridPositions,
120218
- rowHeight,
120219
- dispatchHeight,
120220
- childElement
120221
- }) => {
120222
- var _a2, _b2;
120223
- const heightMode = ((_a2 = childProps.height) == null ? void 0 : _a2.mode) ?? "fit";
120224
- const top2 = gridPositions[childProps.name].top;
120225
- const left2 = gridPositions[childProps.name].left;
120226
- const rows = gridPositions[childProps.name].height;
120227
- const columns = gridPositions[childProps.name].width;
120188
+ const InternalGrid = ({
120189
+ children = EMPTY_ARRAY$1,
120190
+ ...props2
120191
+ }) => {
120192
+ var _a2, _b2;
120193
+ const isEditing = Boolean((_a2 = rootStore.editStore) == null ? void 0 : _a2.isInitialized);
120194
+ const { style: style2, ...passThroughProps } = usePassthroughProps(props2);
120195
+ const rowHeight = ((_b2 = props2.rowHeight) == null ? void 0 : _b2.value) ?? 12;
120196
+ const childrenArray = useMemo$2(() => {
120197
+ let childrenArray2 = Array.isArray(children) ? children : [children];
120198
+ if (!isEditing) {
120199
+ childrenArray2 = childrenArray2.filter(
120200
+ (child) => child.props.isVisible !== false
120201
+ );
120202
+ }
120203
+ return childrenArray2;
120204
+ }, [children, isEditing]);
120205
+ const columns = props2.columns ?? 12;
120206
+ const [pxHeights, dispatchHeight] = React__default.useReducer(heightReducer, {});
120207
+ const gridPositions = useMemo$2(() => {
120208
+ const orderedNames = orderConstraints(childrenArray);
120209
+ const rowPos = calculateRowPositions(
120210
+ orderedNames,
120211
+ childrenArray,
120212
+ rowHeight,
120213
+ pxHeights
120214
+ );
120215
+ const positions = childrenArray.reduce(
120216
+ (acc, child) => {
120217
+ var _a3, _b3, _c2;
120218
+ let width = ((_a3 = child.props.width) == null ? void 0 : _a3.value) ?? (child.type.sbType === "SbTable" || child.type.sbType === "SbContainer" ? 6 : 2);
120219
+ if (((_b3 = child.props.width) == null ? void 0 : _b3.mode) === "fill") {
120220
+ width = columns;
120221
+ }
120222
+ acc[getChildName(child)] = {
120223
+ top: rowPos[getChildName(child)],
120224
+ left: ((_c2 = child.props.marginLeft) == null ? void 0 : _c2.value) ?? 0,
120225
+ width,
120226
+ height: Math.ceil(pxHeights[getChildName(child)] / rowHeight)
120227
+ };
120228
+ return acc;
120229
+ },
120230
+ {}
120231
+ );
120232
+ return positions;
120233
+ }, [columns, childrenArray, rowHeight, pxHeights]);
120234
+ const gridStyle = React__default.useMemo(() => {
120235
+ const spacingValue = 0;
120236
+ const columnsSize = `calc(${100 / columns}% - ${(columns - 1) * spacingValue / columns}px)`;
120237
+ return {
120238
+ display: "grid",
120239
+ gridAutoRows: `${rowHeight}px`,
120240
+ gap: `${spacingValue}px`,
120241
+ gridTemplateColumns: `repeat(${columns}, ${columnsSize})`,
120242
+ ...style2
120243
+ };
120244
+ }, [columns, rowHeight, style2]);
120245
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(DragDisplay, { passThroughProps, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: gridStyle, className: props2.className, children: childrenArray.map((child) => {
120246
+ var _a3, _b3;
120247
+ const heightMode = ((_a3 = child.props.height) == null ? void 0 : _a3.mode) ?? "fit";
120248
+ const top2 = gridPositions[getChildName(child)].top;
120249
+ const left2 = gridPositions[getChildName(child)].left;
120250
+ const rows = gridPositions[getChildName(child)].height;
120251
+ const columns2 = gridPositions[getChildName(child)].width;
120228
120252
  const Component3 = heightMode === "fit" ? MeasuredComponent : StaticComponent;
120229
120253
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
120230
120254
  "div",
120231
120255
  {
120232
120256
  style: {
120233
120257
  gridRow: `${top2 + 1} / span ${Math.max(1, rows)}`,
120234
- gridColumn: `${left2 + 1} / span ${Math.max(1, columns)}`,
120258
+ gridColumn: `${left2 + 1} / span ${Math.max(1, columns2)}`,
120235
120259
  width: "100%",
120236
120260
  maxWidth: "100%"
120237
120261
  },
120238
120262
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
120239
120263
  Component3,
120240
120264
  {
120241
- staticHeight: (((_b2 = childProps.height) == null ? void 0 : _b2.value) ?? 0) * rowHeight,
120265
+ staticHeight: (((_b3 = child.props.height) == null ? void 0 : _b3.value) ?? 0) * rowHeight,
120242
120266
  onHeightChanged: (height) => {
120243
120267
  dispatchHeight({
120244
120268
  type: "SET_HEIGHT",
120245
- name: childProps.name,
120269
+ name: getChildName(child),
120246
120270
  height
120247
120271
  });
120248
120272
  },
120249
- children: childElement
120273
+ children: child
120250
120274
  }
120251
120275
  )
120252
120276
  },
120253
- childProps.name
120277
+ getChildName(child)
120254
120278
  );
120255
- }
120256
- );
120257
- const InternalGrid = observer(
120258
- ({ children = EMPTY_ARRAY$1, ...props2 }) => {
120259
- var _a2;
120260
- const { style: style2, ...passThroughProps } = usePassthroughProps(props2);
120261
- const rowHeight = ((_a2 = props2.rowHeight) == null ? void 0 : _a2.value) ?? 12;
120262
- const childrenArray = useObserverMemo(() => {
120263
- var _a3;
120264
- const childrenArray2 = Array.isArray(children) ? children : [children];
120265
- const isEditing = Boolean((_a3 = rootStore.editStore) == null ? void 0 : _a3.isInitialized);
120266
- const withEvaluatedProps = childrenArray2.reduce((acc, child) => {
120267
- const bindingIdentifier = getBindingIdentifier(child.props.bind);
120268
- const entity = bindingIdentifier ? rootStore.entityManager.getEntity(bindingIdentifier.scopeId, {
120269
- value: bindingIdentifier.entityName,
120270
- isAnonymous: false
120271
- }) : null;
120272
- const marginTop = (entity == null ? void 0 : entity.marginTop) ?? (isDimension(child.props.marginTop) ? child.props.marginTop : void 0);
120273
- const marginLeft = (entity == null ? void 0 : entity.marginLeft) ?? (isDimension(child.props.marginLeft) ? child.props.marginLeft : void 0);
120274
- const width = (entity == null ? void 0 : entity.width) ?? (isDimension(child.props.width) ? child.props.width : void 0);
120275
- const height = (entity == null ? void 0 : entity.height) ?? (isDimension(child.props.height) ? child.props.height : void 0);
120276
- const constraintTop = (entity == null ? void 0 : entity.constraintTop) ?? child.props.constraintTop;
120277
- const isVisible2 = (entity == null ? void 0 : entity.isVisible) ?? child.props.isVisible;
120278
- const gridChild = {
120279
- marginTop,
120280
- marginLeft,
120281
- width,
120282
- height,
120283
- constraintTop,
120284
- name: (bindingIdentifier == null ? void 0 : bindingIdentifier.entityName) ?? child.props[WIDGET_SOURCE_ID_ATTRIBUTE],
120285
- // source ID as a fallback
120286
- sbType: isSbComponent(child) ? child.type.sbType : void 0,
120287
- element: child
120288
- };
120289
- if (isVisible2 !== false || isEditing) {
120290
- acc.push(gridChild);
120291
- }
120292
- return acc;
120293
- }, []);
120294
- return withEvaluatedProps;
120295
- }, [children]);
120296
- const columns = props2.columns ?? 12;
120297
- const [pxHeights, dispatchHeight] = React__default.useReducer(heightReducer, {});
120298
- const gridPositions = useMemo$2(() => {
120299
- const orderedNames = orderConstraints(childrenArray);
120300
- const rowPos = calculateRowPositions(
120301
- orderedNames,
120302
- childrenArray,
120303
- rowHeight,
120304
- pxHeights
120305
- );
120306
- const positions = childrenArray.reduce(
120307
- (acc, child) => {
120308
- var _a3, _b2, _c2;
120309
- let width = ((_a3 = child.width) == null ? void 0 : _a3.value) ?? (child.sbType === "SbTable" || child.sbType === "SbContainer" ? 6 : 2);
120310
- if (((_b2 = child.width) == null ? void 0 : _b2.mode) === "fill") {
120311
- width = columns;
120312
- }
120313
- acc[child.name] = {
120314
- top: rowPos[child.name],
120315
- left: ((_c2 = child.marginLeft) == null ? void 0 : _c2.value) ?? 0,
120316
- width,
120317
- height: Math.ceil(pxHeights[child.name] / rowHeight)
120318
- };
120319
- return acc;
120320
- },
120321
- {}
120322
- );
120323
- return positions;
120324
- }, [columns, childrenArray, rowHeight, pxHeights]);
120325
- const gridStyle = React__default.useMemo(() => {
120326
- const spacingValue = 0;
120327
- const columnsSize = `calc(${100 / columns}% - ${(columns - 1) * spacingValue / columns}px)`;
120328
- return {
120329
- display: "grid",
120330
- gridAutoRows: `${rowHeight}px`,
120331
- gap: `${spacingValue}px`,
120332
- gridTemplateColumns: `repeat(${columns}, ${columnsSize})`,
120333
- ...style2
120334
- };
120335
- }, [columns, rowHeight, style2]);
120336
- return /* @__PURE__ */ jsxRuntimeExports.jsx(DragDisplay, { passThroughProps, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: gridStyle, className: props2.className, children: childrenArray.map((child) => /* @__PURE__ */ jsxRuntimeExports.jsx(
120337
- GridChild,
120338
- {
120339
- childProps: child,
120340
- childElement: child.element,
120341
- gridPositions,
120342
- rowHeight,
120343
- dispatchHeight
120344
- },
120345
- child.name
120346
- )) }) });
120347
- }
120348
- );
120279
+ }) }) });
120280
+ };
120349
120281
  const DragDisplay = (props2) => {
120350
120282
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
120351
120283
  "div",
@@ -145580,14 +145512,14 @@ function getLoaderFn(options) {
145580
145512
  if (!(loader === "all")) return [3, 3];
145581
145513
  return [4, import(
145582
145514
  /* webpackChunkName: "blueprint-icons-all-paths-loader" */
145583
- "./allPathsLoader-BAwHv7e7.js"
145515
+ "./allPathsLoader-B3Ii4JGL.js"
145584
145516
  )];
145585
145517
  case 2:
145586
145518
  return [2, _b2.sent().allPathsLoader];
145587
145519
  case 3:
145588
145520
  return [4, import(
145589
145521
  /* webpackChunkName: "blueprint-icons-split-paths-by-size-loader" */
145590
- "./splitPathsBySizeLoader-DALk2KWT.js"
145522
+ "./splitPathsBySizeLoader-Btq5cpt-.js"
145591
145523
  )];
145592
145524
  case 4:
145593
145525
  return [2, _b2.sent().splitPathsBySizeLoader];
@@ -162825,7 +162757,6 @@ const propertiesDefinition$9 = {
162825
162757
  visibility: "SHOW_NAME",
162826
162758
  isJSConvertible: false,
162827
162759
  isRemovable: true,
162828
- defaultOnAdd: () => Property.Computed(""),
162829
162760
  helpText: "Allows specifying the filters that will be used on page load",
162830
162761
  isVisible: function() {
162831
162762
  return this.isFilterable && this.pageType !== "server-side";
@@ -162902,8 +162833,6 @@ const propertiesDefinition$9 = {
162902
162833
  label: "Default sort",
162903
162834
  helpText: "Allows specifying the sort options that will be used on page load",
162904
162835
  controlType: "DEFAULT_TABLE_SORT",
162905
- isRemovable: true,
162906
- visibility: "SHOW_NAME",
162907
162836
  childrenDisplayMode: {
162908
162837
  type: "popover",
162909
162838
  title: "Default sort"
@@ -162912,8 +162841,6 @@ const propertiesDefinition$9 = {
162912
162841
  defaultSearchText: Prop.string().readAndWrite().propertiesPanel({
162913
162842
  label: "Default search",
162914
162843
  helpText: "Sets the default search text",
162915
- isRemovable: true,
162916
- visibility: "SHOW_NAME",
162917
162844
  isVisible: function() {
162918
162845
  return this.enableClientSideSearch !== false;
162919
162846
  }
@@ -183918,8 +183845,8 @@ const SbVariable = registerSbEntity(
183918
183845
  );
183919
183846
  const propertiesDefinition$1 = {
183920
183847
  general: Section.category(PropsPanelCategory.Uncategorized).propertiesPanel({ showHeader: false }).children({
183921
- intervalMs: Prop.number().default(300).readAndWrite().propertiesPanel({
183922
- label: "Interval",
183848
+ intervalMs: Prop.number().default(3e5).readAndWrite().propertiesPanel({
183849
+ label: "Interval (ms)",
183923
183850
  helpText: "Sets the interval of the timer",
183924
183851
  placeholder: "1000",
183925
183852
  isJSConvertible: false,
@@ -186778,23 +186705,6 @@ console.log = (...args) => {
186778
186705
  } catch {
186779
186706
  }
186780
186707
  };
186781
- const loadApisIntoLibrary = async function loadApisIntoLibrary2() {
186782
- var _a2, _b2;
186783
- {
186784
- try {
186785
- const mod2 = await import("./user-facing/build-manifest.js");
186786
- const apis = ((_a2 = mod2.default) == null ? void 0 : _a2.apis) ?? {};
186787
- const apiDependencies = ((_b2 = mod2.default) == null ? void 0 : _b2.apiDependencies) ?? [];
186788
- rootStore.apis.setAllApis(apis);
186789
- apiDependencies.forEach((dep) => {
186790
- rootStore.apis.setApiDepCandidates(dep.apiName, dep.params);
186791
- rootStore.apis.setApiReferences(dep.apiName, dep.dependencies);
186792
- });
186793
- } catch (error) {
186794
- console.error("Error loading apis into library", error);
186795
- }
186796
- }
186797
- };
186798
186708
  const SbProvider = function SbProvider2({
186799
186709
  name = "codemode",
186800
186710
  settings,
@@ -186803,14 +186713,6 @@ const SbProvider = function SbProvider2({
186803
186713
  }) {
186804
186714
  var _a2, _b2;
186805
186715
  const isEmbedded = typeof window !== "undefined" && window.parent !== window.self;
186806
- const [isApisInitialized, setIsApisInitialized] = useState(false);
186807
- const runApiInitialization = useCallback(async () => {
186808
- await loadApisIntoLibrary();
186809
- setIsApisInitialized(true);
186810
- }, []);
186811
- useEffect(() => {
186812
- runApiInitialization();
186813
- }, [runApiInitialization]);
186814
186716
  const [userAccessibleTheme, setUserAccessibleTheme] = useState(DEFAULT_THEME);
186815
186717
  useEffect(() => {
186816
186718
  const mergedTheme = lodashExports.merge(BASE_THEME_V5, settings == null ? void 0 : settings.theme);
@@ -186823,9 +186725,6 @@ const SbProvider = function SbProvider2({
186823
186725
  useEffect(() => {
186824
186726
  initializeStyles(name);
186825
186727
  }, [preloadedData, name]);
186826
- if (!isApisInitialized) {
186827
- return /* @__PURE__ */ jsxRuntimeExports.jsx(FullPageSpinner, {});
186828
- }
186829
186728
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
186830
186729
  "div",
186831
186730
  {
@@ -198434,4 +198333,4 @@ export {
198434
198333
  SbTimer as y,
198435
198334
  SbApi as z
198436
198335
  };
198437
- //# sourceMappingURL=index-Bnnq0M9f.js.map
198336
+ //# sourceMappingURL=index-kjgG33Rg.js.map