@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
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('core-js/modules/es.object.assign.js'), require('react'), require('core-js/modules/es.array.includes.js'), require('core-js/modules/es.array.iterator.js'), require('core-js/modules/es.string.includes.js'), require('core-js/modules/web.dom-collections.iterator.js'), require('core-js/modules/es.regexp.to-string.js'), require('app-studio'), require('core-js/modules/es.symbol.description.js'), require('core-js/modules/es.array-buffer.constructor.js'), require('core-js/modules/es.array-buffer.slice.js'), require('core-js/modules/es.typed-array.uint8-array.js'), require('core-js/modules/es.typed-array.fill.js'), require('core-js/modules/es.typed-array.set.js'), require('core-js/modules/es.typed-array.sort.js'), require('core-js/modules/es.typed-array.to-locale-string.js'), require('core-js/modules/es.string.starts-with.js'), require('core-js/modules/web.url.js'), require('core-js/modules/web.url.to-json.js'), require('core-js/modules/web.url-search-params.js'), require('zustand'), require('core-js/modules/es.parse-int.js'), require('react-router-dom'), require('core-js/modules/es.parse-float.js'), require('core-js/modules/es.string.ends-with.js'), require('contrast'), require('core-js/modules/es.promise.js'), require('core-js/modules/es.array.reduce.js'), require('core-js/modules/es.number.to-fixed.js'), require('date-fns/format'), require('core-js/modules/es.string.trim.js'), require('core-js/modules/es.regexp.constructor.js'), require('core-js/modules/es.regexp.exec.js'), require('formik'), require('core-js/modules/es.string.replace.js'), require('src/services/api'), require('core-js/modules/es.promise.finally.js'), require('core-js/modules/es.string.match.js'), require('core-js/modules/es.string.search.js'), require('core-js/modules/es.array.flat-map.js'), require('core-js/modules/es.array.unscopables.flat-map.js')) :
3
- typeof define === 'function' && define.amd ? define(['exports', 'core-js/modules/es.object.assign.js', 'react', 'core-js/modules/es.array.includes.js', 'core-js/modules/es.array.iterator.js', 'core-js/modules/es.string.includes.js', 'core-js/modules/web.dom-collections.iterator.js', 'core-js/modules/es.regexp.to-string.js', 'app-studio', 'core-js/modules/es.symbol.description.js', 'core-js/modules/es.array-buffer.constructor.js', 'core-js/modules/es.array-buffer.slice.js', 'core-js/modules/es.typed-array.uint8-array.js', 'core-js/modules/es.typed-array.fill.js', 'core-js/modules/es.typed-array.set.js', 'core-js/modules/es.typed-array.sort.js', 'core-js/modules/es.typed-array.to-locale-string.js', 'core-js/modules/es.string.starts-with.js', 'core-js/modules/web.url.js', 'core-js/modules/web.url.to-json.js', 'core-js/modules/web.url-search-params.js', 'zustand', 'core-js/modules/es.parse-int.js', 'react-router-dom', 'core-js/modules/es.parse-float.js', 'core-js/modules/es.string.ends-with.js', 'contrast', 'core-js/modules/es.promise.js', 'core-js/modules/es.array.reduce.js', 'core-js/modules/es.number.to-fixed.js', 'date-fns/format', 'core-js/modules/es.string.trim.js', 'core-js/modules/es.regexp.constructor.js', 'core-js/modules/es.regexp.exec.js', 'formik', 'core-js/modules/es.string.replace.js', 'src/services/api', 'core-js/modules/es.promise.finally.js', 'core-js/modules/es.string.match.js', 'core-js/modules/es.string.search.js', 'core-js/modules/es.array.flat-map.js', 'core-js/modules/es.array.unscopables.flat-map.js'], factory) :
4
- (global = global || self, factory(global['@app-studio/web'] = {}, null, global.React, null, null, null, null, null, global.appStudio, null, null, null, null, null, null, null, null, null, null, null, null, global.zustand, null, global.reactRouterDom, null, null, global.contrast, null, null, null, global.format, null, null, null, global.formik, null, global.api));
5
- }(this, (function (exports, es_object_assign_js, React, es_array_includes_js, es_array_iterator_js, es_string_includes_js, web_domCollections_iterator_js, es_regexp_toString_js, appStudio, es_symbol_description_js, es_arrayBuffer_constructor_js, es_arrayBuffer_slice_js, es_typedArray_uint8Array_js, es_typedArray_fill_js, es_typedArray_set_js, es_typedArray_sort_js, es_typedArray_toLocaleString_js, es_string_startsWith_js, web_url_js, web_url_toJson_js, web_urlSearchParams_js, zustand, es_parseInt_js, reactRouterDom, es_parseFloat_js, es_string_endsWith_js, contrast, es_promise_js, es_array_reduce_js, es_number_toFixed_js, format, es_string_trim_js, es_regexp_constructor_js, es_regexp_exec_js, formik, es_string_replace_js, api) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('core-js/modules/es.object.assign.js'), require('react'), require('core-js/modules/es.array.includes.js'), require('core-js/modules/es.array.iterator.js'), require('core-js/modules/es.string.includes.js'), require('core-js/modules/web.dom-collections.iterator.js'), require('core-js/modules/es.regexp.to-string.js'), require('app-studio'), require('core-js/modules/es.symbol.description.js'), require('core-js/modules/es.array-buffer.constructor.js'), require('core-js/modules/es.array-buffer.slice.js'), require('core-js/modules/es.typed-array.uint8-array.js'), require('core-js/modules/es.typed-array.fill.js'), require('core-js/modules/es.typed-array.set.js'), require('core-js/modules/es.typed-array.sort.js'), require('core-js/modules/es.typed-array.to-locale-string.js'), require('core-js/modules/es.string.starts-with.js'), require('core-js/modules/web.url.js'), require('core-js/modules/web.url.to-json.js'), require('core-js/modules/web.url-search-params.js'), require('zustand'), require('core-js/modules/es.parse-int.js'), require('react-router-dom'), require('core-js/modules/es.parse-float.js'), require('core-js/modules/es.string.ends-with.js'), require('contrast'), require('core-js/modules/es.promise.js'), require('core-js/modules/es.array.reduce.js'), require('core-js/modules/es.number.to-fixed.js'), require('date-fns/format'), require('core-js/modules/es.string.trim.js'), require('core-js/modules/es.regexp.constructor.js'), require('core-js/modules/es.regexp.exec.js'), require('formik'), require('core-js/modules/es.string.replace.js'), require('core-js/modules/es.promise.finally.js'), require('core-js/modules/es.string.match.js'), require('core-js/modules/es.string.search.js'), require('core-js/modules/es.array.flat-map.js'), require('core-js/modules/es.array.unscopables.flat-map.js')) :
3
+ typeof define === 'function' && define.amd ? define(['exports', 'core-js/modules/es.object.assign.js', 'react', 'core-js/modules/es.array.includes.js', 'core-js/modules/es.array.iterator.js', 'core-js/modules/es.string.includes.js', 'core-js/modules/web.dom-collections.iterator.js', 'core-js/modules/es.regexp.to-string.js', 'app-studio', 'core-js/modules/es.symbol.description.js', 'core-js/modules/es.array-buffer.constructor.js', 'core-js/modules/es.array-buffer.slice.js', 'core-js/modules/es.typed-array.uint8-array.js', 'core-js/modules/es.typed-array.fill.js', 'core-js/modules/es.typed-array.set.js', 'core-js/modules/es.typed-array.sort.js', 'core-js/modules/es.typed-array.to-locale-string.js', 'core-js/modules/es.string.starts-with.js', 'core-js/modules/web.url.js', 'core-js/modules/web.url.to-json.js', 'core-js/modules/web.url-search-params.js', 'zustand', 'core-js/modules/es.parse-int.js', 'react-router-dom', 'core-js/modules/es.parse-float.js', 'core-js/modules/es.string.ends-with.js', 'contrast', 'core-js/modules/es.promise.js', 'core-js/modules/es.array.reduce.js', 'core-js/modules/es.number.to-fixed.js', 'date-fns/format', 'core-js/modules/es.string.trim.js', 'core-js/modules/es.regexp.constructor.js', 'core-js/modules/es.regexp.exec.js', 'formik', 'core-js/modules/es.string.replace.js', 'core-js/modules/es.promise.finally.js', 'core-js/modules/es.string.match.js', 'core-js/modules/es.string.search.js', 'core-js/modules/es.array.flat-map.js', 'core-js/modules/es.array.unscopables.flat-map.js'], factory) :
4
+ (global = global || self, factory(global['@app-studio/web'] = {}, null, global.React, null, null, null, null, null, global.appStudio, null, null, null, null, null, null, null, null, null, null, null, null, global.zustand, null, global.reactRouterDom, null, null, global.contrast, null, null, null, global.format, null, null, null, global.formik));
5
+ }(this, (function (exports, es_object_assign_js, React, es_array_includes_js, es_array_iterator_js, es_string_includes_js, web_domCollections_iterator_js, es_regexp_toString_js, appStudio, es_symbol_description_js, es_arrayBuffer_constructor_js, es_arrayBuffer_slice_js, es_typedArray_uint8Array_js, es_typedArray_fill_js, es_typedArray_set_js, es_typedArray_sort_js, es_typedArray_toLocaleString_js, es_string_startsWith_js, web_url_js, web_url_toJson_js, web_urlSearchParams_js, zustand, es_parseInt_js, reactRouterDom, es_parseFloat_js, es_string_endsWith_js, contrast, es_promise_js, es_array_reduce_js, es_number_toFixed_js, format, es_string_trim_js, es_regexp_constructor_js, es_regexp_exec_js, formik) { 'use strict';
6
6
 
7
7
  var React__default = 'default' in React ? React['default'] : React;
8
8
  contrast = contrast && Object.prototype.hasOwnProperty.call(contrast, 'default') ? contrast['default'] : contrast;
@@ -8808,7 +8808,7 @@
8808
8808
  fontSize: appStudio.Typography.fontSizes[size],
8809
8809
  fontWeight: "400" // Regular weight
8810
8810
  ,
8811
- lineHeight: "1.5"
8811
+ lineHeight: "15px"
8812
8812
  }, style), option.label));
8813
8813
  };
8814
8814
  /**
@@ -10327,7 +10327,7 @@
10327
10327
  size: "sm",
10328
10328
  fontWeight: "400" // Regular weight
10329
10329
  ,
10330
- lineHeight: "1.5"
10330
+ lineHeight: "15"
10331
10331
  }, views == null ? void 0 : views.infoText), infoText))), error && (/*#__PURE__*/React__default.createElement(appStudio.Text, {
10332
10332
  size: "xs",
10333
10333
  marginTop: 4,
@@ -13948,7 +13948,6 @@
13948
13948
  border: '0 solid transparent',
13949
13949
  outline: '0 solid transparent',
13950
13950
  boxShadow: 'none',
13951
- lineHeight: '1',
13952
13951
  letterSpacing: '-.5em',
13953
13952
  fontSize: 'var(--root-height)',
13954
13953
  fontFamily: 'monospace',
@@ -14239,7 +14238,11 @@
14239
14238
  disabled = false,
14240
14239
  isAgentRunning = false,
14241
14240
  onStopAgent,
14242
- sandboxId
14241
+ sandboxId,
14242
+ onUploadProgress,
14243
+ onUploadSuccess,
14244
+ onUploadError,
14245
+ onFileUpload
14243
14246
  } = props;
14244
14247
  // Determine if the component is controlled
14245
14248
  var isControlled = controlledValue !== undefined && controlledOnChange !== undefined;
@@ -14355,28 +14358,6 @@
14355
14358
  e.stopPropagation();
14356
14359
  setIsDraggingOver(false);
14357
14360
  };
14358
- // Upload service hook (single file at a time)
14359
- var uploadFileRequest = api.UploadService.useUploadControllerFileService({
14360
- onProgress: p => setUploadProgress(p || 0),
14361
- onSuccess: () => {
14362
- // Advance the queue
14363
- setUploadQueue(prev => prev.slice(1));
14364
- setIsProcessingQueue(false);
14365
- currentUploadRef.current = null;
14366
- setUploadProgress(0);
14367
- // If queue emptied, stop uploading state
14368
- setIsUploading(prev => uploadQueue.length - 1 > 0 || false);
14369
- },
14370
- onError: _err => {
14371
- // Remove the failed file from queue and continue
14372
- setUploadQueue(prev => prev.slice(1));
14373
- setIsProcessingQueue(false);
14374
- currentUploadRef.current = null;
14375
- setUploadProgress(0);
14376
- // If queue emptied, stop uploading state
14377
- setIsUploading(prev => uploadQueue.length - 1 > 0 || false);
14378
- }
14379
- });
14380
14361
  // Start uploading a batch of files (enqueue and process)
14381
14362
  var startUpload = React.useCallback(files => {
14382
14363
  if (!files || files.length === 0) return;
@@ -14389,25 +14370,33 @@
14389
14370
  }, [setPendingFiles, setUploadedFiles]);
14390
14371
  // Process upload queue sequentially
14391
14372
  var processUploadQueue = React.useCallback(() => {
14392
- if (uploadQueue.length > 0 && !isProcessingQueue && !uploadFileRequest.loading) {
14373
+ if (uploadQueue.length > 0 && !isProcessingQueue && onFileUpload) {
14393
14374
  setIsProcessingQueue(true);
14394
14375
  var nextFile = uploadQueue[0];
14395
14376
  currentUploadRef.current = nextFile;
14396
14377
  setUploadProgress(0);
14397
- // Fire upload
14398
- uploadFileRequest.run({
14399
- file: nextFile
14400
- });
14378
+ // Execute user-provided upload function
14379
+ try {
14380
+ onFileUpload(nextFile);
14381
+ } catch (err) {
14382
+ // Handle synchronous errors
14383
+ setUploadQueue(prev => prev.slice(1));
14384
+ setIsProcessingQueue(false);
14385
+ currentUploadRef.current = null;
14386
+ setUploadProgress(0);
14387
+ setIsUploading(prev => uploadQueue.length - 1 > 0 || false);
14388
+ onUploadError == null || onUploadError(err);
14389
+ }
14401
14390
  } else if (uploadQueue.length === 0 && isUploading) {
14402
14391
  // Nothing left to upload
14403
14392
  setIsUploading(false);
14404
14393
  setUploadProgress(0);
14405
14394
  }
14406
- }, [uploadQueue, isProcessingQueue, uploadFileRequest.loading, uploadFileRequest, isUploading]);
14407
- // Effect: process whenever queue or request/loading changes
14395
+ }, [uploadQueue, isProcessingQueue, onFileUpload, isUploading, onUploadError]);
14396
+ // Effect: process whenever queue changes
14408
14397
  React.useEffect(() => {
14409
14398
  processUploadQueue();
14410
- }, [uploadQueue, isProcessingQueue, uploadFileRequest.loading, processUploadQueue]);
14399
+ }, [uploadQueue, isProcessingQueue, processUploadQueue]);
14411
14400
  // Mock function for subscription status
14412
14401
  var subscriptionStatus = 'active';
14413
14402
  // Mock function to check if user can access a model
@@ -14546,7 +14535,7 @@
14546
14535
  marginBottom: '4px'
14547
14536
  },
14548
14537
  messageContent: {
14549
- lineHeight: 1.5
14538
+ lineHeight: 15
14550
14539
  },
14551
14540
  messageFooter: {
14552
14541
  marginTop: '8px'
@@ -14718,7 +14707,7 @@
14718
14707
  maxHeight: '200px',
14719
14708
  padding: '8px 12px',
14720
14709
  fontSize: '14px',
14721
- lineHeight: '1.5',
14710
+ lineHeight: '15px',
14722
14711
  color: 'color.gray.900',
14723
14712
  backgroundColor: 'color.white',
14724
14713
  border: 'none',
@@ -15550,7 +15539,6 @@
15550
15539
  color: "color.gray.400",
15551
15540
  pointerEvents: "none",
15552
15541
  fontSize: "14px",
15553
- lineHeight: "1.5",
15554
15542
  zIndex: 1
15555
15543
  }, views == null ? void 0 : views.placeholder), placeholder)), /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
15556
15544
  as: "div",
@@ -15571,7 +15559,6 @@
15571
15559
  whiteSpace: "pre-wrap",
15572
15560
  wordBreak: "break-word",
15573
15561
  fontSize: "14px",
15574
- lineHeight: "1.5",
15575
15562
  color: "color.gray.900",
15576
15563
  backgroundColor: "transparent"
15577
15564
  }, views == null ? void 0 : views.input))), showMentions && filteredMentions.length > 0 && (/*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
@@ -16916,11 +16903,6 @@
16916
16903
  var FormikOTPInput = OTPInputComponent$1;
16917
16904
 
16918
16905
  var _excluded$T = ["name", "uploadFile", "onUploadSuccess", "onUploadError", "transformResponse", "onMultipleFileSelect", "onFileSelect", "multiple"];
16919
- var defaultUploadFile = (file, onProgress) => {
16920
- return api.UploadService.uploadControllerFile({
16921
- file
16922
- }, onProgress);
16923
- };
16924
16906
  var toArrayValue = value => {
16925
16907
  if (Array.isArray(value)) {
16926
16908
  return value;
@@ -16933,7 +16915,7 @@
16933
16915
  var FormikUploader = _ref => {
16934
16916
  var {
16935
16917
  name,
16936
- uploadFile = defaultUploadFile,
16918
+ uploadFile,
16937
16919
  onUploadSuccess,
16938
16920
  onUploadError,
16939
16921
  transformResponse,
@@ -19473,7 +19455,7 @@
19473
19455
  })));
19474
19456
  };
19475
19457
 
19476
- var _excluded$$ = ["children", "highlightText", "highlightStyle", "highlightColor", "highlightSecondaryColor", "size", "responsive", "centered", "views", "highlightAnimate", "animate", "animationLoop", "highlightAnimationLoop", "highlightTypewriter", "highlightTypewriterDuration", "highlightSlide", "highlightSlideDuration", "highlightSlideStagger", "highlightSlideSequential"];
19458
+ var _excluded$$ = ["children", "highlightText", "highlightStyle", "highlightColor", "highlightSecondaryColor", "size", "responsive", "views", "highlightAnimate", "animate", "animationLoop", "highlightAnimationLoop", "highlightTypewriter", "highlightTypewriterDuration", "highlightSlide", "highlightSlideDuration", "highlightSlideStagger", "highlightSlideSequential"];
19477
19459
  function escapeRegExp(string) {
19478
19460
  return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
19479
19461
  }
@@ -19486,7 +19468,6 @@
19486
19468
  highlightSecondaryColor,
19487
19469
  size = 'lg',
19488
19470
  responsive = true,
19489
- centered = false,
19490
19471
  views,
19491
19472
  highlightAnimate,
19492
19473
  animate,
@@ -19601,7 +19582,6 @@
19601
19582
  fontWeight: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.fontWeight : 'bold',
19602
19583
  letterSpacing: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.letterSpacing : undefined,
19603
19584
  marginBottom: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.marginBottom : undefined,
19604
- textAlign: centered ? 'center' : 'left',
19605
19585
  animate: inView ? controlledAnimate : undefined,
19606
19586
  media: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.media : undefined
19607
19587
  }, views == null ? void 0 : views.container, props), parts.map((part, idx) => typeof part === 'string' ? part : (/*#__PURE__*/React__default.createElement(appStudio.Text, Object.assign({
@@ -19635,7 +19615,6 @@
19635
19615
  fontWeight: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.fontWeight : 'bold',
19636
19616
  letterSpacing: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.letterSpacing : undefined,
19637
19617
  marginBottom: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.marginBottom : undefined,
19638
- textAlign: centered ? 'center' : 'left',
19639
19618
  animate: inView ? controlledAnimate : undefined,
19640
19619
  media: useResponsive ? responsiveStyles == null ? void 0 : responsiveStyles.media : undefined
19641
19620
  }, views == null ? void 0 : views.container, props), /*#__PURE__*/React__default.createElement(appStudio.Text, Object.assign({
@@ -19667,7 +19646,6 @@
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), text);
@@ -24278,15 +24256,22 @@
24278
24256
  };
24279
24257
  var Pagination = PaginationComponent;
24280
24258
 
24281
- var _excluded$1a = ["value", "max", "color", "backgroundColor", "height", "radius", "views", "themeMode"];
24259
+ var _excluded$1a = ["shape", "value", "max", "color", "backgroundColor", "height", "size", "radius", "strokeWidth", "showLabel", "labelColor", "animated", "animationDuration", "views", "themeMode"];
24282
24260
  var ProgressBarView = _ref => {
24283
24261
  var {
24262
+ shape = 'linear',
24284
24263
  value = 0,
24285
24264
  max = 100,
24286
24265
  color = 'theme.primary',
24287
24266
  backgroundColor = 'color.gray.200',
24288
- height = 8,
24267
+ height,
24268
+ size,
24289
24269
  radius = 4,
24270
+ strokeWidth = 10,
24271
+ showLabel = false,
24272
+ labelColor = 'theme.text.primary',
24273
+ animated = true,
24274
+ animationDuration = '0.5s',
24290
24275
  views,
24291
24276
  themeMode: elementMode
24292
24277
  } = _ref,
@@ -24296,20 +24281,78 @@
24296
24281
  themeMode
24297
24282
  } = appStudio.useTheme();
24298
24283
  var currentMode = elementMode ? elementMode : themeMode;
24299
- var percentage = Math.min(100, Math.max(0, value / max * 100));
24284
+ var validValue = Math.min(max, Math.max(0, value));
24285
+ var percentage = validValue / max * 100;
24300
24286
  var trackColor = getColor(backgroundColor, {
24301
24287
  themeMode: currentMode
24302
24288
  });
24303
24289
  var barColor = getColor(color, {
24304
24290
  themeMode: currentMode
24305
24291
  });
24292
+ if (shape === 'circle') {
24293
+ var circleSize = size || (typeof height === 'number' ? height : 100);
24294
+ var radiusCalc = (circleSize - strokeWidth) / 2;
24295
+ var circumference = 2 * Math.PI * radiusCalc;
24296
+ var offset = circumference - percentage / 100 * circumference;
24297
+ return /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
24298
+ width: circleSize,
24299
+ height: circleSize,
24300
+ position: "relative",
24301
+ display: "flex",
24302
+ alignItems: "center",
24303
+ justifyContent: "center"
24304
+ }, views == null ? void 0 : views.container, props), /*#__PURE__*/React__default.createElement("svg", {
24305
+ width: circleSize,
24306
+ height: circleSize,
24307
+ viewBox: "0 0 " + circleSize + " " + circleSize,
24308
+ style: {
24309
+ transform: 'rotate(-90deg)'
24310
+ }
24311
+ }, /*#__PURE__*/React__default.createElement("circle", Object.assign({
24312
+ cx: circleSize / 2,
24313
+ cy: circleSize / 2,
24314
+ r: radiusCalc,
24315
+ stroke: trackColor,
24316
+ strokeWidth: strokeWidth,
24317
+ fill: "transparent"
24318
+ }, views == null ? void 0 : views.track)), /*#__PURE__*/React__default.createElement("circle", Object.assign({
24319
+ cx: circleSize / 2,
24320
+ cy: circleSize / 2,
24321
+ r: radiusCalc,
24322
+ stroke: barColor,
24323
+ strokeWidth: strokeWidth,
24324
+ strokeDasharray: circumference,
24325
+ strokeDashoffset: offset,
24326
+ strokeLinecap: "round",
24327
+ fill: "transparent",
24328
+ style: {
24329
+ transition: animated ? "stroke-dashoffset " + animationDuration + " ease-in-out" : 'none'
24330
+ }
24331
+ }, views == null ? void 0 : views.indicator))), showLabel && (/*#__PURE__*/React__default.createElement(appStudio.View, {
24332
+ position: "absolute",
24333
+ top: 0,
24334
+ left: 0,
24335
+ right: 0,
24336
+ bottom: 0,
24337
+ display: "flex",
24338
+ alignItems: "center",
24339
+ justifyContent: "center",
24340
+ pointerEvents: "none"
24341
+ }, /*#__PURE__*/React__default.createElement(appStudio.Text, Object.assign({
24342
+ color: labelColor,
24343
+ fontSize: circleSize * 0.2 + "px",
24344
+ fontWeight: "bold"
24345
+ }, views == null ? void 0 : views.text), Math.round(percentage), "%"))));
24346
+ }
24347
+ // Linear Progress Bar
24348
+ var linearHeight = height || 8;
24306
24349
  return /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
24307
24350
  role: "progressbar",
24308
24351
  "aria-valuenow": value,
24309
24352
  "aria-valuemin": 0,
24310
24353
  "aria-valuemax": max,
24311
24354
  width: "100%",
24312
- height: height,
24355
+ height: linearHeight,
24313
24356
  backgroundColor: trackColor,
24314
24357
  borderRadius: radius,
24315
24358
  overflow: "hidden"
@@ -24317,12 +24360,16 @@
24317
24360
  width: percentage + "%",
24318
24361
  height: "100%",
24319
24362
  backgroundColor: barColor,
24320
- borderRadius: radius
24363
+ borderRadius: radius,
24364
+ style: {
24365
+ transition: animated ? "width " + animationDuration + " ease-in-out" : 'none'
24366
+ }
24321
24367
  }, views == null ? void 0 : views.bar)));
24322
24368
  };
24323
24369
 
24324
24370
  /**
24325
24371
  * ProgressBar component displays completion status of a task or process.
24372
+ * Supports both linear and circular shapes.
24326
24373
  */
24327
24374
  var ProgressBarComponent = props => (/*#__PURE__*/React__default.createElement(ProgressBarView, Object.assign({}, props)));
24328
24375
  var ProgressBar = ProgressBarComponent;
@@ -26134,14 +26181,12 @@
26134
26181
  fontWeight: "600" // Semi-bold for better readability
26135
26182
  ,
26136
26183
  color: Theme[variant].content.color,
26137
- lineHeight: "1.4",
26138
26184
  bgColor: Theme[variant].container.backgroundColor
26139
26185
  }, views == null ? void 0 : views.title), title), description && (/*#__PURE__*/React__default.createElement(appStudio.Text, Object.assign({
26140
26186
  size: "sm",
26141
26187
  color: Theme[variant].content.color,
26142
26188
  fontWeight: "400" // Regular weight
26143
26189
  ,
26144
- lineHeight: "1.5",
26145
26190
  bgColor: Theme[variant].container.backgroundColor
26146
26191
  }, views == null ? void 0 : views.description), description)), action && actionText && (/*#__PURE__*/React__default.createElement(appStudio.Text, Object.assign({
26147
26192
  size: "sm",
@@ -27374,16 +27419,10 @@
27374
27419
  backgroundRepeat: 'no-repeat',
27375
27420
  backgroundAttachment: 'scroll'
27376
27421
  },
27377
- overlay: {
27378
- position: 'absolute',
27379
- top: 0,
27380
- left: 0,
27381
- width: '100%',
27382
- height: '100%',
27383
- pointerEvents: 'none'
27384
- },
27385
27422
  content: {
27386
27423
  position: 'relative',
27424
+ width: '100%',
27425
+ height: '100%',
27387
27426
  zIndex: 2
27388
27427
  }
27389
27428
  };
@@ -27407,14 +27446,6 @@
27407
27446
  height: '100%',
27408
27447
  objectFit: 'cover'
27409
27448
  },
27410
- overlay: {
27411
- position: 'absolute',
27412
- top: 0,
27413
- left: 0,
27414
- width: '100%',
27415
- height: '100%',
27416
- pointerEvents: 'none'
27417
- },
27418
27449
  content: {
27419
27450
  position: 'relative',
27420
27451
  zIndex: 2
@@ -27683,7 +27714,8 @@
27683
27714
  _excluded7$1 = ["children", "src", "backgroundSize", "backgroundPosition", "backgroundRepeat", "backgroundAttachment", "imageOpacity", "overlay", "blendMode", "views", "themeMode"],
27684
27715
  _excluded8$1 = ["children", "src", "autoPlay", "loop", "muted", "playsInline", "overlay", "blendMode", "views", "themeMode"],
27685
27716
  _excluded9$1 = ["children"],
27686
- _excluded10$1 = ["children", "views"];
27717
+ _excluded10$1 = ["contentPosition"],
27718
+ _excluded11$1 = ["children", "views"];
27687
27719
  // Background Context
27688
27720
  var BackgroundContext = /*#__PURE__*/React.createContext({});
27689
27721
  /**
@@ -28077,15 +28109,11 @@
28077
28109
  backgroundRepeat = 'no-repeat',
28078
28110
  backgroundAttachment = 'scroll',
28079
28111
  imageOpacity = 1,
28080
- overlay,
28112
+ overlay = null,
28081
28113
  blendMode = 'normal',
28082
- views,
28083
- themeMode: elementMode
28114
+ views
28084
28115
  } = _ref7,
28085
28116
  props = _objectWithoutPropertiesLoose(_ref7, _excluded7$1);
28086
- var {
28087
- getColor
28088
- } = appStudio.useTheme();
28089
28117
  var imageStyle = Object.assign({}, BackgroundImageStyles.image, {
28090
28118
  backgroundImage: "url(" + src + ")",
28091
28119
  backgroundSize,
@@ -28094,17 +28122,9 @@
28094
28122
  backgroundAttachment,
28095
28123
  opacity: imageOpacity
28096
28124
  });
28097
- var overlayStyle = overlay ? Object.assign({}, BackgroundImageStyles.overlay, {
28098
- backgroundColor: getColor(overlay, elementMode ? {
28099
- themeMode: elementMode
28100
- } : undefined),
28101
- mixBlendMode: blendMode
28102
- }) : {};
28103
28125
  return /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({}, BackgroundImageStyles.container, views == null ? void 0 : views.container, props), /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
28104
28126
  style: imageStyle
28105
- }, views == null ? void 0 : views.image)), overlay && /*#__PURE__*/React__default.createElement(appStudio.View, {
28106
- style: overlayStyle
28107
- }), children && (/*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({}, BackgroundImageStyles.content, views == null ? void 0 : views.content), children)));
28127
+ }, views == null ? void 0 : views.image)), overlay, children && (/*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({}, BackgroundImageStyles.content, views == null ? void 0 : views.content), children)));
28108
28128
  };
28109
28129
  /**
28110
28130
  * Background Video Component
@@ -28117,21 +28137,11 @@
28117
28137
  loop = true,
28118
28138
  muted = true,
28119
28139
  playsInline = true,
28120
- overlay,
28140
+ overlay = null,
28121
28141
  blendMode = 'normal',
28122
- views,
28123
- themeMode: elementMode
28142
+ views
28124
28143
  } = _ref8,
28125
28144
  props = _objectWithoutPropertiesLoose(_ref8, _excluded8$1);
28126
- var {
28127
- getColor
28128
- } = appStudio.useTheme();
28129
- var overlayStyle = overlay ? Object.assign({}, BackgroundVideoStyles.overlay, {
28130
- backgroundColor: getColor(overlay, elementMode ? {
28131
- themeMode: elementMode
28132
- } : undefined),
28133
- mixBlendMode: blendMode
28134
- }) : {};
28135
28145
  return /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({}, BackgroundVideoStyles.container, views == null ? void 0 : views.container, props), /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
28136
28146
  as: "video",
28137
28147
  src: src,
@@ -28140,9 +28150,7 @@
28140
28150
  muted: muted,
28141
28151
  playsInline: playsInline,
28142
28152
  style: BackgroundVideoStyles.video
28143
- }, views == null ? void 0 : views.video)), overlay && /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
28144
- style: overlayStyle
28145
- }, views == null ? void 0 : views.overlay)), children && (/*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({}, BackgroundVideoStyles.content, views == null ? void 0 : views.content), children)));
28153
+ }, views == null ? void 0 : views.video)), overlay, children && (/*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({}, BackgroundVideoStyles.content, views == null ? void 0 : views.content), children)));
28146
28154
  };
28147
28155
  /**
28148
28156
  * Background Gradient Component
@@ -28155,12 +28163,48 @@
28155
28163
  gradientProps = _objectWithoutPropertiesLoose(_ref9, _excluded9$1);
28156
28164
  return /*#__PURE__*/React__default.createElement(Gradient, Object.assign({}, gradientProps), children);
28157
28165
  };
28158
- var BackgroundViewBase = _ref10 => {
28166
+ /**
28167
+ * Background Overlay Component
28168
+ */
28169
+ var BackgroundOverlay = _ref10 => {
28159
28170
  var {
28160
- children,
28161
- views
28171
+ contentPosition
28162
28172
  } = _ref10,
28163
28173
  props = _objectWithoutPropertiesLoose(_ref10, _excluded10$1);
28174
+ var getDefaultOverlay = () => {
28175
+ switch (contentPosition) {
28176
+ case 'left':
28177
+ 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%)';
28178
+ case 'right':
28179
+ 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%)';
28180
+ case 'top':
28181
+ 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%)';
28182
+ case 'bottom':
28183
+ 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%)';
28184
+ case 'center':
28185
+ return 'radial-gradient(circle at 50% 90%, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%)';
28186
+ default:
28187
+ return 'rgba(0,0,0,0.5)';
28188
+ }
28189
+ };
28190
+ var background = getDefaultOverlay();
28191
+ return /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
28192
+ position: "absolute",
28193
+ top: 0,
28194
+ left: 0,
28195
+ width: "100%",
28196
+ height: "100%",
28197
+ background: background,
28198
+ pointerEvents: "none",
28199
+ zIndex: 1
28200
+ }, props));
28201
+ };
28202
+ var BackgroundViewBase = _ref11 => {
28203
+ var {
28204
+ children,
28205
+ views
28206
+ } = _ref11,
28207
+ props = _objectWithoutPropertiesLoose(_ref11, _excluded11$1);
28164
28208
  return /*#__PURE__*/React__default.createElement(BackgroundContext.Provider, {
28165
28209
  value: {}
28166
28210
  }, /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({}, DefaultBackgroundStyles.container, views == null ? void 0 : views.container, props), children));
@@ -28177,6 +28221,7 @@
28177
28221
  BackgroundView.Image = BackgroundImage;
28178
28222
  BackgroundView.Video = BackgroundVideo;
28179
28223
  BackgroundView.Gradient = BackgroundGradient;
28224
+ BackgroundView.Overlay = BackgroundOverlay;
28180
28225
 
28181
28226
  /**
28182
28227
  * Background Component with compound pattern
@@ -28238,7 +28283,8 @@
28238
28283
  Ripples: BackgroundView.Ripples,
28239
28284
  Image: BackgroundView.Image,
28240
28285
  Video: BackgroundView.Video,
28241
- Gradient: BackgroundView.Gradient
28286
+ Gradient: BackgroundView.Gradient,
28287
+ Overlay: BackgroundView.Overlay
28242
28288
  });
28243
28289
  Background.displayName = 'Background';
28244
28290