agent-state-machine 2.2.0 → 2.2.1

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.
@@ -4,7 +4,7 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
6
6
  <title>{{WORKFLOW_NAME}}</title>
7
- <script type="module" crossorigin src="/remote/assets/index-BOKpYANC.js"></script>
7
+ <script type="module" crossorigin src="/remote/assets/index-CbgeVnKw.js"></script>
8
8
  <link rel="stylesheet" crossorigin href="/remote/assets/index-DHL_iHQW.css">
9
9
  </head>
10
10
  <body>
@@ -97,35 +97,6 @@ export default function App() {
97
97
 
98
98
  const next = () => setPageIndex((prev) => Math.min(history.length - 1, prev + 1));
99
99
  const prev = () => setPageIndex((prev) => Math.max(0, prev - 1));
100
- const touchStart = useRef(null);
101
- const ignoreTouch = useRef(false);
102
-
103
- const handleTouchStart = (event) => {
104
- const target = event.target;
105
- const isInput = target.tagName === "TEXTAREA" || (target.tagName === "INPUT" && target.type === "number");
106
- if (isInput && target.className !== "jumper-input") {
107
- ignoreTouch.current = true;
108
- return;
109
- }
110
- ignoreTouch.current = false;
111
- const touch = event.touches[0];
112
- touchStart.current = { x: touch.clientX, y: touch.clientY };
113
- };
114
-
115
- const handleTouchEnd = (event) => {
116
- if (ignoreTouch.current || !touchStart.current) return;
117
- const touch = event.changedTouches[0];
118
- const dx = touch.clientX - touchStart.current.x;
119
- const dy = touch.clientY - touchStart.current.y;
120
- const absX = Math.abs(dx);
121
- const absY = Math.abs(dy);
122
- const swipeThreshold = 50;
123
- if (absX > swipeThreshold && absX > absY + 10) {
124
- if (dx > 0) prev();
125
- if (dx < 0) next();
126
- }
127
- touchStart.current = null;
128
- };
129
100
 
130
101
  useEffect(() => {
131
102
  const handler = (event) => {
@@ -167,20 +138,6 @@ export default function App() {
167
138
  <AnimatePresence mode="wait">
168
139
  <motion.div
169
140
  key={pageIndex}
170
- drag="x"
171
- dragConstraints={{ left: 0, right: 0 }}
172
- dragElastic={0.2}
173
- style={{ touchAction: "pan-y" }}
174
- onTouchStart={handleTouchStart}
175
- onTouchEnd={handleTouchEnd}
176
- onDragEnd={(e, { offset, velocity }) => {
177
- const swipeThreshold = 50;
178
- if (offset.x > swipeThreshold || velocity.x > 500) {
179
- prev();
180
- } else if (offset.x < -swipeThreshold || velocity.x < -500) {
181
- next();
182
- }
183
- }}
184
141
  initial={{ opacity: 0, scale: 0.99, filter: "blur(4px)" }}
185
142
  animate={{ opacity: 1, scale: 1, filter: "blur(0px)" }}
186
143
  exit={{ opacity: 0, scale: 1.01, filter: "blur(4px)" }}