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