@app-studio/web 0.9.56 → 0.9.59

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 (33) hide show
  1. package/dist/components/Background/Background/Background.props.d.ts +15 -8
  2. package/dist/components/Background/Background/Background.style.d.ts +0 -2
  3. package/dist/components/Background/Background/Background.view.d.ts +2 -1
  4. package/dist/components/Background/Background.d.ts +1 -0
  5. package/dist/components/ChatInput/ChatInput/ChatInput.props.d.ts +17 -0
  6. package/dist/components/Formik/Formik.Uploader.d.ts +1 -1
  7. package/dist/components/ProgressBar/ProgressBar/ProgressBar.props.d.ts +36 -2
  8. package/dist/components/ProgressBar/ProgressBar.d.ts +1 -0
  9. package/dist/components/Title/Title/Title.props.d.ts +0 -5
  10. package/dist/web.cjs.development.js +153 -108
  11. package/dist/web.cjs.development.js.map +1 -1
  12. package/dist/web.cjs.production.min.js +1 -1
  13. package/dist/web.cjs.production.min.js.map +1 -1
  14. package/dist/web.esm.js +153 -108
  15. package/dist/web.esm.js.map +1 -1
  16. package/dist/web.umd.development.js +157 -111
  17. package/dist/web.umd.development.js.map +1 -1
  18. package/dist/web.umd.production.min.js +1 -1
  19. package/dist/web.umd.production.min.js.map +1 -1
  20. package/docs/app-studio/Animation.md +241 -0
  21. package/docs/app-studio/Components.md +192 -0
  22. package/docs/app-studio/Design.md +121 -0
  23. package/docs/app-studio/Events.md +296 -0
  24. package/docs/app-studio/Hooks.md +469 -0
  25. package/docs/app-studio/Providers.md +186 -0
  26. package/docs/app-studio/README.md +781 -0
  27. package/docs/app-studio/Responsive.md +135 -0
  28. package/docs/app-studio/Theming.md +488 -0
  29. package/docs/components/Background.mdx +2 -2
  30. package/docs/components/Center.mdx +2 -2
  31. package/docs/components/ChatInput.mdx +133 -0
  32. package/docs/components/Vertical.mdx +1 -1
  33. package/package.json +3 -2
package/dist/web.esm.js CHANGED
@@ -33,7 +33,6 @@ import 'core-js/modules/es.regexp.constructor.js';
33
33
  import 'core-js/modules/es.regexp.exec.js';
34
34
  import { useFormikContext, getIn } from 'formik';
35
35
  import 'core-js/modules/es.string.replace.js';
36
- import { UploadService } from 'src/services/api';
37
36
  import 'core-js/modules/es.promise.finally.js';
38
37
  import 'core-js/modules/es.string.match.js';
39
38
  import 'core-js/modules/es.string.search.js';
@@ -8840,7 +8839,7 @@ var Item = _ref => {
8840
8839
  fontSize: Typography.fontSizes[size],
8841
8840
  fontWeight: "400" // Regular weight
8842
8841
  ,
8843
- lineHeight: "1.5"
8842
+ lineHeight: "15px"
8844
8843
  }, style), option.label));
8845
8844
  };
8846
8845
  /**
@@ -10359,7 +10358,7 @@ var CheckboxView = _ref => {
10359
10358
  size: "sm",
10360
10359
  fontWeight: "400" // Regular weight
10361
10360
  ,
10362
- lineHeight: "1.5"
10361
+ lineHeight: "15"
10363
10362
  }, views == null ? void 0 : views.infoText), infoText))), error && (/*#__PURE__*/React.createElement(Text, {
10364
10363
  size: "xs",
10365
10364
  marginTop: 4,
@@ -13980,7 +13979,6 @@ var OTPInputView = _ref => {
13980
13979
  border: '0 solid transparent',
13981
13980
  outline: '0 solid transparent',
13982
13981
  boxShadow: 'none',
13983
- lineHeight: '1',
13984
13982
  letterSpacing: '-.5em',
13985
13983
  fontSize: 'var(--root-height)',
13986
13984
  fontFamily: 'monospace',
@@ -14271,7 +14269,11 @@ var useChatInputState = props => {
14271
14269
  disabled = false,
14272
14270
  isAgentRunning = false,
14273
14271
  onStopAgent,
14274
- sandboxId
14272
+ sandboxId,
14273
+ onUploadProgress,
14274
+ onUploadSuccess,
14275
+ onUploadError,
14276
+ onFileUpload
14275
14277
  } = props;
14276
14278
  // Determine if the component is controlled
14277
14279
  var isControlled = controlledValue !== undefined && controlledOnChange !== undefined;
@@ -14387,28 +14389,6 @@ var useChatInputState = props => {
14387
14389
  e.stopPropagation();
14388
14390
  setIsDraggingOver(false);
14389
14391
  };
14390
- // Upload service hook (single file at a time)
14391
- var uploadFileRequest = UploadService.useUploadControllerFileService({
14392
- onProgress: p => setUploadProgress(p || 0),
14393
- onSuccess: () => {
14394
- // Advance the queue
14395
- setUploadQueue(prev => prev.slice(1));
14396
- setIsProcessingQueue(false);
14397
- currentUploadRef.current = null;
14398
- setUploadProgress(0);
14399
- // If queue emptied, stop uploading state
14400
- setIsUploading(prev => uploadQueue.length - 1 > 0 || false);
14401
- },
14402
- onError: _err => {
14403
- // Remove the failed file from queue and continue
14404
- setUploadQueue(prev => prev.slice(1));
14405
- setIsProcessingQueue(false);
14406
- currentUploadRef.current = null;
14407
- setUploadProgress(0);
14408
- // If queue emptied, stop uploading state
14409
- setIsUploading(prev => uploadQueue.length - 1 > 0 || false);
14410
- }
14411
- });
14412
14392
  // Start uploading a batch of files (enqueue and process)
14413
14393
  var startUpload = useCallback(files => {
14414
14394
  if (!files || files.length === 0) return;
@@ -14421,25 +14401,33 @@ var useChatInputState = props => {
14421
14401
  }, [setPendingFiles, setUploadedFiles]);
14422
14402
  // Process upload queue sequentially
14423
14403
  var processUploadQueue = useCallback(() => {
14424
- if (uploadQueue.length > 0 && !isProcessingQueue && !uploadFileRequest.loading) {
14404
+ if (uploadQueue.length > 0 && !isProcessingQueue && onFileUpload) {
14425
14405
  setIsProcessingQueue(true);
14426
14406
  var nextFile = uploadQueue[0];
14427
14407
  currentUploadRef.current = nextFile;
14428
14408
  setUploadProgress(0);
14429
- // Fire upload
14430
- uploadFileRequest.run({
14431
- file: nextFile
14432
- });
14409
+ // Execute user-provided upload function
14410
+ try {
14411
+ onFileUpload(nextFile);
14412
+ } catch (err) {
14413
+ // Handle synchronous errors
14414
+ setUploadQueue(prev => prev.slice(1));
14415
+ setIsProcessingQueue(false);
14416
+ currentUploadRef.current = null;
14417
+ setUploadProgress(0);
14418
+ setIsUploading(prev => uploadQueue.length - 1 > 0 || false);
14419
+ onUploadError == null || onUploadError(err);
14420
+ }
14433
14421
  } else if (uploadQueue.length === 0 && isUploading) {
14434
14422
  // Nothing left to upload
14435
14423
  setIsUploading(false);
14436
14424
  setUploadProgress(0);
14437
14425
  }
14438
- }, [uploadQueue, isProcessingQueue, uploadFileRequest.loading, uploadFileRequest, isUploading]);
14439
- // Effect: process whenever queue or request/loading changes
14426
+ }, [uploadQueue, isProcessingQueue, onFileUpload, isUploading, onUploadError]);
14427
+ // Effect: process whenever queue changes
14440
14428
  useEffect(() => {
14441
14429
  processUploadQueue();
14442
- }, [uploadQueue, isProcessingQueue, uploadFileRequest.loading, processUploadQueue]);
14430
+ }, [uploadQueue, isProcessingQueue, processUploadQueue]);
14443
14431
  // Mock function for subscription status
14444
14432
  var subscriptionStatus = 'active';
14445
14433
  // Mock function to check if user can access a model
@@ -14578,7 +14566,7 @@ var DefaultAgentChatStyles = {
14578
14566
  marginBottom: '4px'
14579
14567
  },
14580
14568
  messageContent: {
14581
- lineHeight: 1.5
14569
+ lineHeight: 15
14582
14570
  },
14583
14571
  messageFooter: {
14584
14572
  marginTop: '8px'
@@ -14750,7 +14738,7 @@ var DefaultChatInputStyles = {
14750
14738
  maxHeight: '200px',
14751
14739
  padding: '8px 12px',
14752
14740
  fontSize: '14px',
14753
- lineHeight: '1.5',
14741
+ lineHeight: '15px',
14754
14742
  color: 'color.gray.900',
14755
14743
  backgroundColor: 'color.white',
14756
14744
  border: 'none',
@@ -15582,7 +15570,6 @@ var EditableInput = /*#__PURE__*/forwardRef((_ref, ref) => {
15582
15570
  color: "color.gray.400",
15583
15571
  pointerEvents: "none",
15584
15572
  fontSize: "14px",
15585
- lineHeight: "1.5",
15586
15573
  zIndex: 1
15587
15574
  }, views == null ? void 0 : views.placeholder), placeholder)), /*#__PURE__*/React.createElement(View, Object.assign({
15588
15575
  as: "div",
@@ -15603,7 +15590,6 @@ var EditableInput = /*#__PURE__*/forwardRef((_ref, ref) => {
15603
15590
  whiteSpace: "pre-wrap",
15604
15591
  wordBreak: "break-word",
15605
15592
  fontSize: "14px",
15606
- lineHeight: "1.5",
15607
15593
  color: "color.gray.900",
15608
15594
  backgroundColor: "transparent"
15609
15595
  }, views == null ? void 0 : views.input))), showMentions && filteredMentions.length > 0 && (/*#__PURE__*/React.createElement(View, Object.assign({
@@ -16948,11 +16934,6 @@ var OTPInputComponent$1 = props => {
16948
16934
  var FormikOTPInput = OTPInputComponent$1;
16949
16935
 
16950
16936
  var _excluded$T = ["name", "uploadFile", "onUploadSuccess", "onUploadError", "transformResponse", "onMultipleFileSelect", "onFileSelect", "multiple"];
16951
- var defaultUploadFile = (file, onProgress) => {
16952
- return UploadService.uploadControllerFile({
16953
- file
16954
- }, onProgress);
16955
- };
16956
16937
  var toArrayValue = value => {
16957
16938
  if (Array.isArray(value)) {
16958
16939
  return value;
@@ -16965,7 +16946,7 @@ var toArrayValue = value => {
16965
16946
  var FormikUploader = _ref => {
16966
16947
  var {
16967
16948
  name,
16968
- uploadFile = defaultUploadFile,
16949
+ uploadFile,
16969
16950
  onUploadSuccess,
16970
16951
  onUploadError,
16971
16952
  transformResponse,
@@ -19505,7 +19486,7 @@ var SlideEffect = _ref => {
19505
19486
  })));
19506
19487
  };
19507
19488
 
19508
- var _excluded$$ = ["children", "highlightText", "highlightStyle", "highlightColor", "highlightSecondaryColor", "size", "responsive", "centered", "views", "highlightAnimate", "animate", "animationLoop", "highlightAnimationLoop", "highlightTypewriter", "highlightTypewriterDuration", "highlightSlide", "highlightSlideDuration", "highlightSlideStagger", "highlightSlideSequential"];
19489
+ var _excluded$$ = ["children", "highlightText", "highlightStyle", "highlightColor", "highlightSecondaryColor", "size", "responsive", "views", "highlightAnimate", "animate", "animationLoop", "highlightAnimationLoop", "highlightTypewriter", "highlightTypewriterDuration", "highlightSlide", "highlightSlideDuration", "highlightSlideStagger", "highlightSlideSequential"];
19509
19490
  function escapeRegExp(string) {
19510
19491
  return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
19511
19492
  }
@@ -19518,7 +19499,6 @@ var TitleView = _ref => {
19518
19499
  highlightSecondaryColor,
19519
19500
  size = 'lg',
19520
19501
  responsive = true,
19521
- centered = false,
19522
19502
  views,
19523
19503
  highlightAnimate,
19524
19504
  animate,
@@ -19633,7 +19613,6 @@ var TitleView = _ref => {
19633
19613
  fontWeight: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.fontWeight : 'bold',
19634
19614
  letterSpacing: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.letterSpacing : undefined,
19635
19615
  marginBottom: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.marginBottom : undefined,
19636
- textAlign: centered ? 'center' : 'left',
19637
19616
  animate: inView ? controlledAnimate : undefined,
19638
19617
  media: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.media : undefined
19639
19618
  }, views == null ? void 0 : views.container, props), parts.map((part, idx) => typeof part === 'string' ? part : (/*#__PURE__*/React.createElement(Text, Object.assign({
@@ -19667,7 +19646,6 @@ var TitleView = _ref => {
19667
19646
  fontWeight: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.fontWeight : 'bold',
19668
19647
  letterSpacing: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.letterSpacing : undefined,
19669
19648
  marginBottom: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.marginBottom : undefined,
19670
- textAlign: centered ? 'center' : 'left',
19671
19649
  animate: inView ? controlledAnimate : undefined,
19672
19650
  media: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.media : undefined
19673
19651
  }, views == null ? void 0 : views.container, props), /*#__PURE__*/React.createElement(Text, Object.assign({
@@ -19699,7 +19677,6 @@ var TitleView = _ref => {
19699
19677
  fontWeight: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.fontWeight : 'bold',
19700
19678
  letterSpacing: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.letterSpacing : undefined,
19701
19679
  marginBottom: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.marginBottom : undefined,
19702
- textAlign: centered ? 'center' : 'left',
19703
19680
  animate: inView ? controlledAnimate : undefined,
19704
19681
  media: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.media : undefined
19705
19682
  }, views == null ? void 0 : views.container, props), text);
@@ -24310,15 +24287,22 @@ var PaginationComponent = _ref => {
24310
24287
  };
24311
24288
  var Pagination = PaginationComponent;
24312
24289
 
24313
- var _excluded$1a = ["value", "max", "color", "backgroundColor", "height", "radius", "views", "themeMode"];
24290
+ var _excluded$1a = ["shape", "value", "max", "color", "backgroundColor", "height", "size", "radius", "strokeWidth", "showLabel", "labelColor", "animated", "animationDuration", "views", "themeMode"];
24314
24291
  var ProgressBarView = _ref => {
24315
24292
  var {
24293
+ shape = 'linear',
24316
24294
  value = 0,
24317
24295
  max = 100,
24318
24296
  color = 'theme.primary',
24319
24297
  backgroundColor = 'color.gray.200',
24320
- height = 8,
24298
+ height,
24299
+ size,
24321
24300
  radius = 4,
24301
+ strokeWidth = 10,
24302
+ showLabel = false,
24303
+ labelColor = 'theme.text.primary',
24304
+ animated = true,
24305
+ animationDuration = '0.5s',
24322
24306
  views,
24323
24307
  themeMode: elementMode
24324
24308
  } = _ref,
@@ -24328,20 +24312,78 @@ var ProgressBarView = _ref => {
24328
24312
  themeMode
24329
24313
  } = useTheme();
24330
24314
  var currentMode = elementMode ? elementMode : themeMode;
24331
- var percentage = Math.min(100, Math.max(0, value / max * 100));
24315
+ var validValue = Math.min(max, Math.max(0, value));
24316
+ var percentage = validValue / max * 100;
24332
24317
  var trackColor = getColor(backgroundColor, {
24333
24318
  themeMode: currentMode
24334
24319
  });
24335
24320
  var barColor = getColor(color, {
24336
24321
  themeMode: currentMode
24337
24322
  });
24323
+ if (shape === 'circle') {
24324
+ var circleSize = size || (typeof height === 'number' ? height : 100);
24325
+ var radiusCalc = (circleSize - strokeWidth) / 2;
24326
+ var circumference = 2 * Math.PI * radiusCalc;
24327
+ var offset = circumference - percentage / 100 * circumference;
24328
+ return /*#__PURE__*/React.createElement(View, Object.assign({
24329
+ width: circleSize,
24330
+ height: circleSize,
24331
+ position: "relative",
24332
+ display: "flex",
24333
+ alignItems: "center",
24334
+ justifyContent: "center"
24335
+ }, views == null ? void 0 : views.container, props), /*#__PURE__*/React.createElement("svg", {
24336
+ width: circleSize,
24337
+ height: circleSize,
24338
+ viewBox: "0 0 " + circleSize + " " + circleSize,
24339
+ style: {
24340
+ transform: 'rotate(-90deg)'
24341
+ }
24342
+ }, /*#__PURE__*/React.createElement("circle", Object.assign({
24343
+ cx: circleSize / 2,
24344
+ cy: circleSize / 2,
24345
+ r: radiusCalc,
24346
+ stroke: trackColor,
24347
+ strokeWidth: strokeWidth,
24348
+ fill: "transparent"
24349
+ }, views == null ? void 0 : views.track)), /*#__PURE__*/React.createElement("circle", Object.assign({
24350
+ cx: circleSize / 2,
24351
+ cy: circleSize / 2,
24352
+ r: radiusCalc,
24353
+ stroke: barColor,
24354
+ strokeWidth: strokeWidth,
24355
+ strokeDasharray: circumference,
24356
+ strokeDashoffset: offset,
24357
+ strokeLinecap: "round",
24358
+ fill: "transparent",
24359
+ style: {
24360
+ transition: animated ? "stroke-dashoffset " + animationDuration + " ease-in-out" : 'none'
24361
+ }
24362
+ }, views == null ? void 0 : views.indicator))), showLabel && (/*#__PURE__*/React.createElement(View, {
24363
+ position: "absolute",
24364
+ top: 0,
24365
+ left: 0,
24366
+ right: 0,
24367
+ bottom: 0,
24368
+ display: "flex",
24369
+ alignItems: "center",
24370
+ justifyContent: "center",
24371
+ pointerEvents: "none"
24372
+ }, /*#__PURE__*/React.createElement(Text, Object.assign({
24373
+ color: labelColor,
24374
+ fontSize: circleSize * 0.2 + "px",
24375
+ fontWeight: "bold"
24376
+ }, views == null ? void 0 : views.text), Math.round(percentage), "%"))));
24377
+ }
24378
+ // Linear Progress Bar
24379
+ var linearHeight = height || 8;
24338
24380
  return /*#__PURE__*/React.createElement(View, Object.assign({
24339
24381
  role: "progressbar",
24340
24382
  "aria-valuenow": value,
24341
24383
  "aria-valuemin": 0,
24342
24384
  "aria-valuemax": max,
24343
24385
  width: "100%",
24344
- height: height,
24386
+ height: linearHeight,
24345
24387
  backgroundColor: trackColor,
24346
24388
  borderRadius: radius,
24347
24389
  overflow: "hidden"
@@ -24349,12 +24391,16 @@ var ProgressBarView = _ref => {
24349
24391
  width: percentage + "%",
24350
24392
  height: "100%",
24351
24393
  backgroundColor: barColor,
24352
- borderRadius: radius
24394
+ borderRadius: radius,
24395
+ style: {
24396
+ transition: animated ? "width " + animationDuration + " ease-in-out" : 'none'
24397
+ }
24353
24398
  }, views == null ? void 0 : views.bar)));
24354
24399
  };
24355
24400
 
24356
24401
  /**
24357
24402
  * ProgressBar component displays completion status of a task or process.
24403
+ * Supports both linear and circular shapes.
24358
24404
  */
24359
24405
  var ProgressBarComponent = props => (/*#__PURE__*/React.createElement(ProgressBarView, Object.assign({}, props)));
24360
24406
  var ProgressBar = ProgressBarComponent;
@@ -26166,14 +26212,12 @@ var ToastView = _ref => {
26166
26212
  fontWeight: "600" // Semi-bold for better readability
26167
26213
  ,
26168
26214
  color: Theme[variant].content.color,
26169
- lineHeight: "1.4",
26170
26215
  bgColor: Theme[variant].container.backgroundColor
26171
26216
  }, views == null ? void 0 : views.title), title), description && (/*#__PURE__*/React.createElement(Text, Object.assign({
26172
26217
  size: "sm",
26173
26218
  color: Theme[variant].content.color,
26174
26219
  fontWeight: "400" // Regular weight
26175
26220
  ,
26176
- lineHeight: "1.5",
26177
26221
  bgColor: Theme[variant].container.backgroundColor
26178
26222
  }, views == null ? void 0 : views.description), description)), action && actionText && (/*#__PURE__*/React.createElement(Text, Object.assign({
26179
26223
  size: "sm",
@@ -27406,16 +27450,10 @@ var BackgroundImageStyles = {
27406
27450
  backgroundRepeat: 'no-repeat',
27407
27451
  backgroundAttachment: 'scroll'
27408
27452
  },
27409
- overlay: {
27410
- position: 'absolute',
27411
- top: 0,
27412
- left: 0,
27413
- width: '100%',
27414
- height: '100%',
27415
- pointerEvents: 'none'
27416
- },
27417
27453
  content: {
27418
27454
  position: 'relative',
27455
+ width: '100%',
27456
+ height: '100%',
27419
27457
  zIndex: 2
27420
27458
  }
27421
27459
  };
@@ -27439,14 +27477,6 @@ var BackgroundVideoStyles = {
27439
27477
  height: '100%',
27440
27478
  objectFit: 'cover'
27441
27479
  },
27442
- overlay: {
27443
- position: 'absolute',
27444
- top: 0,
27445
- left: 0,
27446
- width: '100%',
27447
- height: '100%',
27448
- pointerEvents: 'none'
27449
- },
27450
27480
  content: {
27451
27481
  position: 'relative',
27452
27482
  zIndex: 2
@@ -27715,7 +27745,8 @@ var _excluded$1o = ["children", "showRadialGradient", "views", "themeMode"],
27715
27745
  _excluded7$1 = ["children", "src", "backgroundSize", "backgroundPosition", "backgroundRepeat", "backgroundAttachment", "imageOpacity", "overlay", "blendMode", "views", "themeMode"],
27716
27746
  _excluded8$1 = ["children", "src", "autoPlay", "loop", "muted", "playsInline", "overlay", "blendMode", "views", "themeMode"],
27717
27747
  _excluded9$1 = ["children"],
27718
- _excluded10$1 = ["children", "views"];
27748
+ _excluded10$1 = ["contentPosition"],
27749
+ _excluded11$1 = ["children", "views"];
27719
27750
  // Background Context
27720
27751
  var BackgroundContext = /*#__PURE__*/createContext({});
27721
27752
  /**
@@ -28109,15 +28140,11 @@ var BackgroundImage = _ref7 => {
28109
28140
  backgroundRepeat = 'no-repeat',
28110
28141
  backgroundAttachment = 'scroll',
28111
28142
  imageOpacity = 1,
28112
- overlay,
28143
+ overlay = null,
28113
28144
  blendMode = 'normal',
28114
- views,
28115
- themeMode: elementMode
28145
+ views
28116
28146
  } = _ref7,
28117
28147
  props = _objectWithoutPropertiesLoose(_ref7, _excluded7$1);
28118
- var {
28119
- getColor
28120
- } = useTheme();
28121
28148
  var imageStyle = Object.assign({}, BackgroundImageStyles.image, {
28122
28149
  backgroundImage: "url(" + src + ")",
28123
28150
  backgroundSize,
@@ -28126,17 +28153,9 @@ var BackgroundImage = _ref7 => {
28126
28153
  backgroundAttachment,
28127
28154
  opacity: imageOpacity
28128
28155
  });
28129
- var overlayStyle = overlay ? Object.assign({}, BackgroundImageStyles.overlay, {
28130
- backgroundColor: getColor(overlay, elementMode ? {
28131
- themeMode: elementMode
28132
- } : undefined),
28133
- mixBlendMode: blendMode
28134
- }) : {};
28135
28156
  return /*#__PURE__*/React.createElement(View, Object.assign({}, BackgroundImageStyles.container, views == null ? void 0 : views.container, props), /*#__PURE__*/React.createElement(View, Object.assign({
28136
28157
  style: imageStyle
28137
- }, views == null ? void 0 : views.image)), overlay && /*#__PURE__*/React.createElement(View, {
28138
- style: overlayStyle
28139
- }), children && (/*#__PURE__*/React.createElement(View, Object.assign({}, BackgroundImageStyles.content, views == null ? void 0 : views.content), children)));
28158
+ }, views == null ? void 0 : views.image)), overlay, children && (/*#__PURE__*/React.createElement(View, Object.assign({}, BackgroundImageStyles.content, views == null ? void 0 : views.content), children)));
28140
28159
  };
28141
28160
  /**
28142
28161
  * Background Video Component
@@ -28149,21 +28168,11 @@ var BackgroundVideo = _ref8 => {
28149
28168
  loop = true,
28150
28169
  muted = true,
28151
28170
  playsInline = true,
28152
- overlay,
28171
+ overlay = null,
28153
28172
  blendMode = 'normal',
28154
- views,
28155
- themeMode: elementMode
28173
+ views
28156
28174
  } = _ref8,
28157
28175
  props = _objectWithoutPropertiesLoose(_ref8, _excluded8$1);
28158
- var {
28159
- getColor
28160
- } = useTheme();
28161
- var overlayStyle = overlay ? Object.assign({}, BackgroundVideoStyles.overlay, {
28162
- backgroundColor: getColor(overlay, elementMode ? {
28163
- themeMode: elementMode
28164
- } : undefined),
28165
- mixBlendMode: blendMode
28166
- }) : {};
28167
28176
  return /*#__PURE__*/React.createElement(View, Object.assign({}, BackgroundVideoStyles.container, views == null ? void 0 : views.container, props), /*#__PURE__*/React.createElement(View, Object.assign({
28168
28177
  as: "video",
28169
28178
  src: src,
@@ -28172,9 +28181,7 @@ var BackgroundVideo = _ref8 => {
28172
28181
  muted: muted,
28173
28182
  playsInline: playsInline,
28174
28183
  style: BackgroundVideoStyles.video
28175
- }, views == null ? void 0 : views.video)), overlay && /*#__PURE__*/React.createElement(View, Object.assign({
28176
- style: overlayStyle
28177
- }, views == null ? void 0 : views.overlay)), children && (/*#__PURE__*/React.createElement(View, Object.assign({}, BackgroundVideoStyles.content, views == null ? void 0 : views.content), children)));
28184
+ }, views == null ? void 0 : views.video)), overlay, children && (/*#__PURE__*/React.createElement(View, Object.assign({}, BackgroundVideoStyles.content, views == null ? void 0 : views.content), children)));
28178
28185
  };
28179
28186
  /**
28180
28187
  * Background Gradient Component
@@ -28187,12 +28194,48 @@ var BackgroundGradient = _ref9 => {
28187
28194
  gradientProps = _objectWithoutPropertiesLoose(_ref9, _excluded9$1);
28188
28195
  return /*#__PURE__*/React.createElement(Gradient, Object.assign({}, gradientProps), children);
28189
28196
  };
28190
- var BackgroundViewBase = _ref10 => {
28197
+ /**
28198
+ * Background Overlay Component
28199
+ */
28200
+ var BackgroundOverlay = _ref10 => {
28191
28201
  var {
28192
- children,
28193
- views
28202
+ contentPosition
28194
28203
  } = _ref10,
28195
28204
  props = _objectWithoutPropertiesLoose(_ref10, _excluded10$1);
28205
+ var getDefaultOverlay = () => {
28206
+ switch (contentPosition) {
28207
+ case 'left':
28208
+ 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%)';
28209
+ case 'right':
28210
+ 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%)';
28211
+ case 'top':
28212
+ 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%)';
28213
+ case 'bottom':
28214
+ 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%)';
28215
+ case 'center':
28216
+ return 'radial-gradient(circle at 50% 90%, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%)';
28217
+ default:
28218
+ return 'rgba(0,0,0,0.5)';
28219
+ }
28220
+ };
28221
+ var background = getDefaultOverlay();
28222
+ return /*#__PURE__*/React.createElement(View, Object.assign({
28223
+ position: "absolute",
28224
+ top: 0,
28225
+ left: 0,
28226
+ width: "100%",
28227
+ height: "100%",
28228
+ background: background,
28229
+ pointerEvents: "none",
28230
+ zIndex: 1
28231
+ }, props));
28232
+ };
28233
+ var BackgroundViewBase = _ref11 => {
28234
+ var {
28235
+ children,
28236
+ views
28237
+ } = _ref11,
28238
+ props = _objectWithoutPropertiesLoose(_ref11, _excluded11$1);
28196
28239
  return /*#__PURE__*/React.createElement(BackgroundContext.Provider, {
28197
28240
  value: {}
28198
28241
  }, /*#__PURE__*/React.createElement(View, Object.assign({}, DefaultBackgroundStyles.container, views == null ? void 0 : views.container, props), children));
@@ -28209,6 +28252,7 @@ BackgroundView.Ripples = Ripples;
28209
28252
  BackgroundView.Image = BackgroundImage;
28210
28253
  BackgroundView.Video = BackgroundVideo;
28211
28254
  BackgroundView.Gradient = BackgroundGradient;
28255
+ BackgroundView.Overlay = BackgroundOverlay;
28212
28256
 
28213
28257
  /**
28214
28258
  * Background Component with compound pattern
@@ -28270,7 +28314,8 @@ var Background = /*#__PURE__*/Object.assign(BackgroundComponent, {
28270
28314
  Ripples: BackgroundView.Ripples,
28271
28315
  Image: BackgroundView.Image,
28272
28316
  Video: BackgroundView.Video,
28273
- Gradient: BackgroundView.Gradient
28317
+ Gradient: BackgroundView.Gradient,
28318
+ Overlay: BackgroundView.Overlay
28274
28319
  });
28275
28320
  Background.displayName = 'Background';
28276
28321