@app-studio/web 0.9.6 → 0.9.7

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.
@@ -25521,7 +25521,10 @@
25521
25521
  var _excluded$1c = ["children", "showRadialGradient", "views", "themeMode"],
25522
25522
  _excluded2$l = ["number"],
25523
25523
  _excluded3$g = ["rows", "cols", "squareSize"],
25524
- _excluded4$d = ["children", "views"];
25524
+ _excluded4$d = ["count", "colors", "speed", "shapes"],
25525
+ _excluded5$6 = ["gridSize", "lineColor", "pulseColor", "animationSpeed"],
25526
+ _excluded6$4 = ["rippleCount", "colors", "maxSize", "frequency"],
25527
+ _excluded7$1 = ["children", "views"];
25525
25528
  // Background Context
25526
25529
  var BackgroundContext = /*#__PURE__*/React.createContext({});
25527
25530
  /**
@@ -25648,12 +25651,258 @@
25648
25651
  }
25649
25652
  })))))));
25650
25653
  };
25651
- var BackgroundViewBase = _ref4 => {
25654
+ /**
25655
+ * Particles Component
25656
+ */
25657
+ var defaultParticleColors = ['rgb(59, 130, 246)', 'rgb(147, 51, 234)', 'rgb(236, 72, 153)', 'rgb(34, 197, 94)', 'rgb(251, 146, 60)', 'rgb(168, 85, 247)'];
25658
+ var Particles = _ref4 => {
25652
25659
  var {
25653
- children,
25654
- views
25660
+ count = 50,
25661
+ colors = defaultParticleColors,
25662
+ speed = 'medium',
25663
+ shapes = ['circle']
25655
25664
  } = _ref4,
25656
25665
  props = _objectWithoutPropertiesLoose(_ref4, _excluded4$d);
25666
+ var particles = Array.from({
25667
+ length: count
25668
+ }, (_, i) => i);
25669
+ var getSpeedMultiplier = () => {
25670
+ switch (speed) {
25671
+ case 'slow':
25672
+ return 0.5;
25673
+ case 'fast':
25674
+ return 2;
25675
+ default:
25676
+ return 1;
25677
+ }
25678
+ };
25679
+ var getRandomShape = () => shapes[Math.floor(Math.random() * shapes.length)];
25680
+ var getRandomColor = () => colors[Math.floor(Math.random() * colors.length)];
25681
+ return /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
25682
+ width: 400,
25683
+ height: 300,
25684
+ position: "relative",
25685
+ overflow: "hidden",
25686
+ backgroundColor: "color.gray.900"
25687
+ }, props), particles.map(idx => {
25688
+ var size = Math.random() * 8 + 4; // 4-12px
25689
+ var startX = Math.random() * 400;
25690
+ var startY = Math.random() * 300;
25691
+ var endX = Math.random() * 400;
25692
+ var endY = Math.random() * 300;
25693
+ var duration = (Math.random() * 10 + 5) / getSpeedMultiplier(); // 5-15s adjusted by speed
25694
+ var delay = Math.random() * 5; // 0-5s delay
25695
+ var shape = getRandomShape();
25696
+ var color = getRandomColor();
25697
+ var shapeStyles = {
25698
+ circle: {
25699
+ borderRadius: '50%'
25700
+ },
25701
+ square: {
25702
+ borderRadius: '2px'
25703
+ },
25704
+ triangle: {
25705
+ borderRadius: '0',
25706
+ clipPath: 'polygon(50% 0%, 0% 100%, 100% 100%)'
25707
+ }
25708
+ };
25709
+ return /*#__PURE__*/React__default.createElement(appStudio.View, {
25710
+ key: idx,
25711
+ position: "absolute",
25712
+ width: size,
25713
+ height: size,
25714
+ backgroundColor: color,
25715
+ opacity: 0.7,
25716
+ style: Object.assign({
25717
+ left: startX,
25718
+ top: startY
25719
+ }, shapeStyles[shape]),
25720
+ animate: {
25721
+ from: {
25722
+ transform: "translate(0px, 0px) scale(0.5)",
25723
+ opacity: 0
25724
+ },
25725
+ to: {
25726
+ transform: "translate(" + (endX - startX) + "px, " + (endY - startY) + "px) scale(1)",
25727
+ opacity: 0.7
25728
+ },
25729
+ iterationCount: 'infinite',
25730
+ direction: 'alternate',
25731
+ timingFunction: 'ease-in-out',
25732
+ duration: duration + "s",
25733
+ delay: delay + "s"
25734
+ }
25735
+ });
25736
+ }));
25737
+ };
25738
+ /**
25739
+ * Grid Component
25740
+ */
25741
+ var Grid = _ref5 => {
25742
+ var {
25743
+ gridSize = 30,
25744
+ lineColor = 'rgba(59, 130, 246, 0.3)',
25745
+ pulseColor = 'rgba(59, 130, 246, 0.8)',
25746
+ animationSpeed = 'medium'
25747
+ } = _ref5,
25748
+ props = _objectWithoutPropertiesLoose(_ref5, _excluded5$6);
25749
+ var getSpeedValue = () => {
25750
+ switch (animationSpeed) {
25751
+ case 'slow':
25752
+ return 4;
25753
+ case 'fast':
25754
+ return 1;
25755
+ default:
25756
+ return 2;
25757
+ }
25758
+ };
25759
+ var cols = Math.floor(400 / gridSize);
25760
+ var rows = Math.floor(300 / gridSize);
25761
+ var totalCells = cols * rows;
25762
+ var cells = Array.from({
25763
+ length: totalCells
25764
+ }, (_, i) => i);
25765
+ return /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
25766
+ width: 400,
25767
+ height: 300,
25768
+ position: "relative",
25769
+ overflow: "hidden",
25770
+ backgroundColor: "color.gray.900"
25771
+ }, props), Array.from({
25772
+ length: cols + 1
25773
+ }, (_, i) => (/*#__PURE__*/React__default.createElement(appStudio.View, {
25774
+ key: "v-line-" + i,
25775
+ position: "absolute",
25776
+ left: i * gridSize,
25777
+ top: 0,
25778
+ width: 1,
25779
+ height: "100%",
25780
+ backgroundColor: lineColor
25781
+ }))), Array.from({
25782
+ length: rows + 1
25783
+ }, (_, i) => (/*#__PURE__*/React__default.createElement(appStudio.View, {
25784
+ key: "h-line-" + i,
25785
+ position: "absolute",
25786
+ left: 0,
25787
+ top: i * gridSize,
25788
+ width: "100%",
25789
+ height: 1,
25790
+ backgroundColor: lineColor
25791
+ }))), cells.map(cellIndex => {
25792
+ var col = cellIndex % cols;
25793
+ var row = Math.floor(cellIndex / cols);
25794
+ var delay = (col + row) * 0.1; // Diagonal wave effect
25795
+ return /*#__PURE__*/React__default.createElement(appStudio.View, {
25796
+ key: cellIndex,
25797
+ position: "absolute",
25798
+ left: col * gridSize + 1,
25799
+ top: row * gridSize + 1,
25800
+ width: gridSize - 2,
25801
+ height: gridSize - 2,
25802
+ backgroundColor: "transparent",
25803
+ animate: {
25804
+ from: {
25805
+ backgroundColor: 'transparent'
25806
+ },
25807
+ to: {
25808
+ backgroundColor: pulseColor
25809
+ },
25810
+ iterationCount: 'infinite',
25811
+ direction: 'alternate',
25812
+ timingFunction: 'ease-in-out',
25813
+ duration: getSpeedValue() + "s",
25814
+ delay: delay + "s"
25815
+ }
25816
+ });
25817
+ }));
25818
+ };
25819
+ /**
25820
+ * Ripples Component
25821
+ */
25822
+ var defaultRippleColors = ['rgba(59, 130, 246, 0.6)', 'rgba(147, 51, 234, 0.6)', 'rgba(236, 72, 153, 0.6)', 'rgba(34, 197, 94, 0.6)'];
25823
+ var Ripples = _ref6 => {
25824
+ var {
25825
+ rippleCount = 5,
25826
+ colors = defaultRippleColors,
25827
+ maxSize = 200,
25828
+ frequency = 3
25829
+ } = _ref6,
25830
+ props = _objectWithoutPropertiesLoose(_ref6, _excluded6$4);
25831
+ var ripples = Array.from({
25832
+ length: rippleCount
25833
+ }, (_, i) => ({
25834
+ id: i,
25835
+ x: Math.random() * 400,
25836
+ y: Math.random() * 300,
25837
+ color: colors[i % colors.length],
25838
+ delay: i * (frequency / rippleCount),
25839
+ duration: 3 + Math.random() * 2
25840
+ }));
25841
+ return /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({
25842
+ width: 400,
25843
+ height: 300,
25844
+ position: "relative",
25845
+ overflow: "hidden",
25846
+ backgroundColor: "color.gray.100"
25847
+ }, props), ripples.map(ripple => (/*#__PURE__*/React__default.createElement(appStudio.View, {
25848
+ key: ripple.id,
25849
+ position: "absolute",
25850
+ width: 20,
25851
+ height: 20,
25852
+ borderRadius: "50%",
25853
+ style: {
25854
+ left: ripple.x - 10,
25855
+ top: ripple.y - 10,
25856
+ border: "2px solid " + ripple.color,
25857
+ backgroundColor: 'transparent'
25858
+ },
25859
+ animate: {
25860
+ from: {
25861
+ transform: 'scale(0)',
25862
+ opacity: 1
25863
+ },
25864
+ to: {
25865
+ transform: "scale(" + maxSize / 20 + ")",
25866
+ opacity: 0
25867
+ },
25868
+ iterationCount: 'infinite',
25869
+ timingFunction: 'ease-out',
25870
+ duration: ripple.duration + "s",
25871
+ delay: ripple.delay + "s"
25872
+ }
25873
+ }))), ripples.map(ripple => (/*#__PURE__*/React__default.createElement(appStudio.View, {
25874
+ key: "secondary-" + ripple.id,
25875
+ position: "absolute",
25876
+ width: 10,
25877
+ height: 10,
25878
+ borderRadius: "50%",
25879
+ style: {
25880
+ left: ripple.x - 5,
25881
+ top: ripple.y - 5,
25882
+ backgroundColor: ripple.color
25883
+ },
25884
+ animate: {
25885
+ from: {
25886
+ transform: 'scale(1)',
25887
+ opacity: 0.8
25888
+ },
25889
+ to: {
25890
+ transform: "scale(" + maxSize / 40 + ")",
25891
+ opacity: 0
25892
+ },
25893
+ iterationCount: 'infinite',
25894
+ timingFunction: 'ease-out',
25895
+ duration: ripple.duration * 1.2 + "s",
25896
+ delay: ripple.delay + 0.5 + "s"
25897
+ }
25898
+ }))));
25899
+ };
25900
+ var BackgroundViewBase = _ref7 => {
25901
+ var {
25902
+ children,
25903
+ views
25904
+ } = _ref7,
25905
+ props = _objectWithoutPropertiesLoose(_ref7, _excluded7$1);
25657
25906
  return /*#__PURE__*/React__default.createElement(BackgroundContext.Provider, {
25658
25907
  value: {}
25659
25908
  }, /*#__PURE__*/React__default.createElement(appStudio.View, Object.assign({}, DefaultBackgroundStyles.container, views == null ? void 0 : views.container, props), children));
@@ -25664,6 +25913,9 @@
25664
25913
  BackgroundView.Aurora = AuroraBackground;
25665
25914
  BackgroundView.Meteors = Meteors;
25666
25915
  BackgroundView.Wall = Wall;
25916
+ BackgroundView.Particles = Particles;
25917
+ BackgroundView.Grid = Grid;
25918
+ BackgroundView.Ripples = Ripples;
25667
25919
 
25668
25920
  /**
25669
25921
  * Background Component with compound pattern
@@ -25681,6 +25933,18 @@
25681
25933
  * @example
25682
25934
  * // Wall effect
25683
25935
  * <Background.Wall rows={15} cols={10} squareSize={40} />
25936
+ *
25937
+ * @example
25938
+ * // Particles effect
25939
+ * <Background.Particles count={50} speed="medium" shapes={['circle', 'square']} />
25940
+ *
25941
+ * @example
25942
+ * // Grid effect
25943
+ * <Background.Grid gridSize={30} animationSpeed="medium" />
25944
+ *
25945
+ * @example
25946
+ * // Ripples effect
25947
+ * <Background.Ripples rippleCount={5} maxSize={200} frequency={3} />
25684
25948
  */
25685
25949
  var BackgroundComponent = /*#__PURE__*/React__default.forwardRef((props, ref) => /*#__PURE__*/React__default.createElement(BackgroundView, Object.assign({}, props, {
25686
25950
  ref: ref
@@ -25689,7 +25953,10 @@
25689
25953
  var Background = /*#__PURE__*/Object.assign(BackgroundComponent, {
25690
25954
  Aurora: BackgroundView.Aurora,
25691
25955
  Meteors: BackgroundView.Meteors,
25692
- Wall: BackgroundView.Wall
25956
+ Wall: BackgroundView.Wall,
25957
+ Particles: BackgroundView.Particles,
25958
+ Grid: BackgroundView.Grid,
25959
+ Ripples: BackgroundView.Ripples
25693
25960
  });
25694
25961
  Background.displayName = 'Background';
25695
25962