@kaushverse/pickify 1.2.1 → 1.2.2

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/index.js CHANGED
@@ -753,13 +753,14 @@ var FloatingButton = class extends import_react4.default.Component {
753
753
  translateY = 0;
754
754
  }
755
755
  if (mode === "circle") {
756
- const totalActions = actions.length;
757
- const startAngle = -Math.PI / 3;
758
- const endAngle = -Math.PI * 0.8;
759
- const angle = startAngle + index / (totalActions - 1 || 1) * (endAngle - startAngle);
760
- const adjustedRadius = radius * 0.65;
761
- translateX = adjustedRadius * Math.cos(angle);
762
- translateY = adjustedRadius * Math.sin(angle);
756
+ const total = actions.length;
757
+ const startAngle = -Math.PI / 2;
758
+ const endAngle = -Math.PI;
759
+ const angle = startAngle + index / (total - 1 || 1) * (endAngle - startAngle);
760
+ const r = radius || 60;
761
+ const offset = 30;
762
+ translateX = (r + offset) * Math.cos(angle);
763
+ translateY = (r + offset) * Math.sin(angle);
763
764
  }
764
765
  const animStyle = {
765
766
  transform: [
@@ -836,27 +837,7 @@ var FloatingButton = class extends import_react4.default.Component {
836
837
  };
837
838
  const mainIcon = mainIconName || "add";
838
839
  return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react_native5.View, { style: [defaultStyles4.container, styles2?.container, style], children: [
839
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
840
- import_react_native5.Animated.View,
841
- {
842
- style: [
843
- defaultStyles4.circleContainer,
844
- styles2?.circleContainer,
845
- {
846
- transform: [
847
- {
848
- scale: this.animation.interpolate({
849
- inputRange: [0, 1],
850
- outputRange: [0, 1]
851
- })
852
- }
853
- ],
854
- opacity: this.animation
855
- }
856
- ],
857
- children: actions.map(this.renderAction)
858
- }
859
- ),
840
+ actions.map((a, i) => this.renderAction(a, i)),
860
841
  /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native5.TouchableWithoutFeedback, { onPress: this.toggleMenu, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
861
842
  import_react_native5.Animated.View,
862
843
  {
@@ -903,15 +884,6 @@ var defaultStyles4 = import_react_native5.StyleSheet.create({
903
884
  alignItems: "center",
904
885
  justifyContent: "center"
905
886
  },
906
- circleContainer: {
907
- position: "absolute",
908
- width: 200,
909
- height: 200,
910
- right: -60,
911
- bottom: -60,
912
- alignItems: "center",
913
- justifyContent: "center"
914
- },
915
887
  secondary: {
916
888
  position: "absolute",
917
889
  width: 48,
package/dist/index.mjs CHANGED
@@ -737,13 +737,14 @@ var FloatingButton = class extends React4.Component {
737
737
  translateY = 0;
738
738
  }
739
739
  if (mode === "circle") {
740
- const totalActions = actions.length;
741
- const startAngle = -Math.PI / 3;
742
- const endAngle = -Math.PI * 0.8;
743
- const angle = startAngle + index / (totalActions - 1 || 1) * (endAngle - startAngle);
744
- const adjustedRadius = radius * 0.65;
745
- translateX = adjustedRadius * Math.cos(angle);
746
- translateY = adjustedRadius * Math.sin(angle);
740
+ const total = actions.length;
741
+ const startAngle = -Math.PI / 2;
742
+ const endAngle = -Math.PI;
743
+ const angle = startAngle + index / (total - 1 || 1) * (endAngle - startAngle);
744
+ const r = radius || 60;
745
+ const offset = 30;
746
+ translateX = (r + offset) * Math.cos(angle);
747
+ translateY = (r + offset) * Math.sin(angle);
747
748
  }
748
749
  const animStyle = {
749
750
  transform: [
@@ -820,27 +821,7 @@ var FloatingButton = class extends React4.Component {
820
821
  };
821
822
  const mainIcon = mainIconName || "add";
822
823
  return /* @__PURE__ */ jsxs5(View5, { style: [defaultStyles4.container, styles2?.container, style], children: [
823
- /* @__PURE__ */ jsx5(
824
- Animated3.View,
825
- {
826
- style: [
827
- defaultStyles4.circleContainer,
828
- styles2?.circleContainer,
829
- {
830
- transform: [
831
- {
832
- scale: this.animation.interpolate({
833
- inputRange: [0, 1],
834
- outputRange: [0, 1]
835
- })
836
- }
837
- ],
838
- opacity: this.animation
839
- }
840
- ],
841
- children: actions.map(this.renderAction)
842
- }
843
- ),
824
+ actions.map((a, i) => this.renderAction(a, i)),
844
825
  /* @__PURE__ */ jsx5(TouchableWithoutFeedback, { onPress: this.toggleMenu, children: /* @__PURE__ */ jsx5(
845
826
  Animated3.View,
846
827
  {
@@ -887,15 +868,6 @@ var defaultStyles4 = StyleSheet5.create({
887
868
  alignItems: "center",
888
869
  justifyContent: "center"
889
870
  },
890
- circleContainer: {
891
- position: "absolute",
892
- width: 200,
893
- height: 200,
894
- right: -60,
895
- bottom: -60,
896
- alignItems: "center",
897
- justifyContent: "center"
898
- },
899
871
  secondary: {
900
872
  position: "absolute",
901
873
  width: 48,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaushverse/pickify",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "A fully customizable React Native picker with search, multi-select, grouping, and async support.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",