@app-studio/web 0.9.69 → 0.9.70

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.
@@ -25746,7 +25746,8 @@
25746
25746
  _excluded8 = ["children", "src", "autoPlay", "loop", "muted", "playsInline", "overlay", "blendMode", "views", "themeMode"],
25747
25747
  _excluded9 = ["children"],
25748
25748
  _excluded10 = ["contentPosition"],
25749
- _excluded11 = ["children", "views"];
25749
+ _excluded11 = ["children", "views"],
25750
+ _excluded12 = ["children", "designProps", "shape", "decorationRotation", "decorationScale", "decorationOpacity", "views"];
25750
25751
  // Background Context
25751
25752
  var BackgroundContext = /*#__PURE__*/React.createContext({});
25752
25753
  /**
@@ -26205,15 +26206,15 @@
26205
26206
  var getDefaultOverlay = () => {
26206
26207
  switch (contentPosition) {
26207
26208
  case 'left':
26208
- return 'radial-gradient(circle at 70% 50%, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.1) 100%), linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 50%, rgba(0,0,0,0.2) 100%)';
26209
+ return 'radial-gradient(circle at 80% 50%, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.1) 100%), linear-gradient(to right, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 80%, rgba(0,0,0,0.2) 100%)';
26209
26210
  case 'right':
26210
- return 'radial-gradient(circle at 30% 50%, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.1) 100%), linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 50%, rgba(0,0,0,0.2) 100%)';
26211
+ return 'radial-gradient(circle at 20% 50%, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.1) 100%), linear-gradient(to left, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 80%, rgba(0,0,0,0.2) 100%)';
26211
26212
  case 'top':
26212
- return 'radial-gradient(circle at 50% 80%, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.1) 100%), linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 50%, rgba(0,0,0,0.1) 100%)';
26213
+ return 'radial-gradient(circle at 50% 80%, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.1) 100%), linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 80%, rgba(0,0,0,0.1) 100%)';
26213
26214
  case 'bottom':
26214
- return 'radial-gradient(circle at 50% 80%, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.1) 100%), linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 50%, rgba(0,0,0,0.1) 100%)';
26215
+ return 'radial-gradient(circle at 50% 80%, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.1) 100%), linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0.6) 80%, rgba(0,0,0,0.1) 100%)';
26215
26216
  case 'center':
26216
- return 'radial-gradient(circle at 50% 90%, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%)';
26217
+ return 'radial-gradient(circle at 50% 70%, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%)';
26217
26218
  default:
26218
26219
  return 'rgba(0,0,0,0.5)';
26219
26220
  }
@@ -26240,6 +26241,78 @@
26240
26241
  value: {}
26241
26242
  }, /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({}, DefaultBackgroundStyles.container, views == null ? void 0 : views.container, props), children));
26242
26243
  };
26244
+ var BackgroundLayout = /*#__PURE__*/React__default.forwardRef((_ref12, ref) => {
26245
+ var _props$backgroundColo, _props$padding;
26246
+ var {
26247
+ children,
26248
+ shape = 'rounded',
26249
+ decorationRotation = 5,
26250
+ decorationScale = 1,
26251
+ decorationOpacity = 0.8,
26252
+ views
26253
+ } = _ref12,
26254
+ props = _objectWithoutPropertiesLoose(_ref12, _excluded12);
26255
+ var getBorderRadius = shape => {
26256
+ switch (shape) {
26257
+ case 'square':
26258
+ return '0px';
26259
+ case 'pill':
26260
+ return '9999px';
26261
+ case 'rounded':
26262
+ default:
26263
+ return '16px';
26264
+ }
26265
+ };
26266
+ var radius = getBorderRadius(shape);
26267
+ // Calculate the extra space needed for the rotated/scaled decoration
26268
+ // When rotated, corners extend beyond the original bounds
26269
+ // Extra space ≈ sin(rotation) × dimension + (scale - 1) × dimension
26270
+ var rotationRad = Math.abs(decorationRotation) * (Math.PI / 180);
26271
+ var rotationOffset = Math.sin(rotationRad) * 100; // percentage-based estimate
26272
+ var scaleOffset = (decorationScale - 1) * 100 / 2;
26273
+ var extraPadding = Math.ceil(rotationOffset + scaleOffset);
26274
+ var backgroundColor = (_props$backgroundColo = props.backgroundColor) != null ? _props$backgroundColo : 'theme.primary';
26275
+ return /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({}, props, {
26276
+ ref: ref,
26277
+ backgroundColor: 'transparent',
26278
+ position: "relative",
26279
+ overflow: "visible"
26280
+ }, views == null ? void 0 : views.container), /*#__PURE__*/React__default.createElement(appStudio.View, {
26281
+ padding: (_props$padding = props.padding) != null ? _props$padding : 96 + extraPadding + "px " + extraPadding + "px",
26282
+ position: "relative",
26283
+ overflow: "visible"
26284
+ }, /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
26285
+ position: "absolute",
26286
+ top: extraPadding,
26287
+ left: extraPadding,
26288
+ right: extraPadding,
26289
+ bottom: extraPadding,
26290
+ backgroundColor: backgroundColor,
26291
+ borderRadius: radius,
26292
+ opacity: decorationOpacity / 1.5,
26293
+ transform: "scale(" + decorationScale + ")",
26294
+ pointerEvents: "none",
26295
+ zIndex: 1
26296
+ }, views == null ? void 0 : views.back)), /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
26297
+ position: "absolute",
26298
+ top: extraPadding,
26299
+ left: extraPadding,
26300
+ right: extraPadding,
26301
+ bottom: extraPadding,
26302
+ transform: "rotate(" + decorationRotation + "deg) scale(" + decorationScale + ")",
26303
+ opacity: decorationOpacity / 1.2,
26304
+ backgroundColor: backgroundColor,
26305
+ borderRadius: radius,
26306
+ pointerEvents: "none",
26307
+ zIndex: 2
26308
+ }, views == null ? void 0 : views.front)), /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
26309
+ margin: "0 auto",
26310
+ //width="100%"
26311
+ position: "relative",
26312
+ zIndex: 3
26313
+ }, views == null ? void 0 : views.content), children)));
26314
+ });
26315
+ BackgroundLayout.displayName = 'Background.Layout';
26243
26316
  // Create the compound component
26244
26317
  var BackgroundView = BackgroundViewBase;
26245
26318
  // Attach compound components
@@ -26253,6 +26326,7 @@
26253
26326
  BackgroundView.Video = BackgroundVideo;
26254
26327
  BackgroundView.Gradient = BackgroundGradient;
26255
26328
  BackgroundView.Overlay = BackgroundOverlay;
26329
+ BackgroundView.Layout = BackgroundLayout;
26256
26330
 
26257
26331
  /**
26258
26332
  * Background Component with compound pattern
@@ -26306,6 +26380,7 @@
26306
26380
  })));
26307
26381
  BackgroundComponent.displayName = 'Background';
26308
26382
  var Background = /*#__PURE__*/Object.assign(BackgroundComponent, {
26383
+ Layout: BackgroundView.Layout,
26309
26384
  Aurora: BackgroundView.Aurora,
26310
26385
  Meteors: BackgroundView.Meteors,
26311
26386
  Wall: BackgroundView.Wall,