@intentai/react 2.1.0 → 2.1.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.
package/dist/index.js CHANGED
@@ -340,35 +340,33 @@ var AmbientOrb = ({ audioLevel, isRecording }) => {
340
340
  style: { transformOrigin: "center" }
341
341
  }
342
342
  ),
343
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", { transform: "translate(58, 55)", children: [
344
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
345
- import_framer_motion.motion.path,
346
- {
347
- d: "M20 4a6 6 0 0 0-6 6v16a6 6 0 0 0 12 0V10a6 6 0 0 0-6-6z",
348
- fill: "none",
349
- stroke: "white",
350
- strokeWidth: "2.5",
351
- strokeLinecap: "round",
352
- animate: {
353
- opacity: isRecording ? [1, 0.7, 1] : 1
354
- },
355
- transition: {
356
- duration: 1,
357
- repeat: isRecording ? Infinity : 0
358
- }
359
- }
360
- ),
361
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
362
- "path",
363
- {
364
- d: "M32 20v4a14 14 0 0 1-28 0v-4M20 38v10M12 48h16",
365
- fill: "none",
366
- stroke: "white",
367
- strokeWidth: "2.5",
368
- strokeLinecap: "round"
369
- }
370
- )
371
- ] }),
343
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("g", { transform: "translate(70, 70)", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
344
+ import_framer_motion.motion.g,
345
+ {
346
+ animate: {
347
+ opacity: isRecording ? [1, 0.7, 1] : 1
348
+ },
349
+ transition: {
350
+ duration: 1,
351
+ repeat: isRecording ? Infinity : 0
352
+ },
353
+ children: [
354
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { x: "-8", y: "-20", width: "16", height: "26", rx: "8", fill: "white" }),
355
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
356
+ "path",
357
+ {
358
+ d: "M-14 0 v6 a14 14 0 0 0 28 0 v-6",
359
+ fill: "none",
360
+ stroke: "white",
361
+ strokeWidth: "3",
362
+ strokeLinecap: "round"
363
+ }
364
+ ),
365
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "0", y1: "20", x2: "0", y2: "28", stroke: "white", strokeWidth: "3", strokeLinecap: "round" }),
366
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "-8", y1: "28", x2: "8", y2: "28", stroke: "white", strokeWidth: "3", strokeLinecap: "round" })
367
+ ]
368
+ }
369
+ ) }),
372
370
  particles.map((particle) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
373
371
  import_framer_motion.motion.circle,
374
372
  {
@@ -1472,7 +1470,7 @@ var PremiumVoiceWidget = ({
1472
1470
  marginTop: 12,
1473
1471
  marginBottom: 0
1474
1472
  },
1475
- children: "Press and hold to record your feedback"
1473
+ children: "Click Record to start"
1476
1474
  }
1477
1475
  )
1478
1476
  ]
@@ -1488,8 +1486,7 @@ var PremiumVoiceWidget = ({
1488
1486
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1489
1487
  MagneticButton,
1490
1488
  {
1491
- onPressStart: handleStartRecording,
1492
- onPressEnd: handleStopRecording,
1489
+ onClick: isRecording ? handleStopRecording : handleStartRecording,
1493
1490
  variant: isRecording ? "recording" : "primary",
1494
1491
  children: isRecording ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
1495
1492
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
@@ -1498,20 +1495,17 @@ var PremiumVoiceWidget = ({
1498
1495
  animate: { scale: [1, 1.2, 1] },
1499
1496
  transition: { duration: 1, repeat: Infinity },
1500
1497
  style: {
1501
- width: 8,
1502
- height: 8,
1503
- borderRadius: "50%",
1498
+ width: 10,
1499
+ height: 10,
1500
+ borderRadius: 2,
1504
1501
  background: "white"
1505
1502
  }
1506
1503
  }
1507
1504
  ),
1508
- "Recording... Release to stop"
1509
- ] }) : transcription ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
1510
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { width: 16, height: 16, viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M12 3a2.5 2.5 0 0 0-2.5 2.5v5a2.5 2.5 0 0 0 5 0v-5A2.5 2.5 0 0 0 12 3z" }) }),
1511
- "Hold to record more"
1505
+ "Stop Recording"
1512
1506
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
1513
1507
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", { width: 16, height: 16, viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M12 3a2.5 2.5 0 0 0-2.5 2.5v5a2.5 2.5 0 0 0 5 0v-5A2.5 2.5 0 0 0 12 3z" }) }),
1514
- "Hold to Record"
1508
+ transcription ? "Record Again" : "Record"
1515
1509
  ] })
1516
1510
  }
1517
1511
  )
package/dist/index.mjs CHANGED
@@ -322,35 +322,33 @@ var AmbientOrb = ({ audioLevel, isRecording }) => {
322
322
  style: { transformOrigin: "center" }
323
323
  }
324
324
  ),
325
- /* @__PURE__ */ jsxs("g", { transform: "translate(58, 55)", children: [
326
- /* @__PURE__ */ jsx(
327
- motion.path,
328
- {
329
- d: "M20 4a6 6 0 0 0-6 6v16a6 6 0 0 0 12 0V10a6 6 0 0 0-6-6z",
330
- fill: "none",
331
- stroke: "white",
332
- strokeWidth: "2.5",
333
- strokeLinecap: "round",
334
- animate: {
335
- opacity: isRecording ? [1, 0.7, 1] : 1
336
- },
337
- transition: {
338
- duration: 1,
339
- repeat: isRecording ? Infinity : 0
340
- }
341
- }
342
- ),
343
- /* @__PURE__ */ jsx(
344
- "path",
345
- {
346
- d: "M32 20v4a14 14 0 0 1-28 0v-4M20 38v10M12 48h16",
347
- fill: "none",
348
- stroke: "white",
349
- strokeWidth: "2.5",
350
- strokeLinecap: "round"
351
- }
352
- )
353
- ] }),
325
+ /* @__PURE__ */ jsx("g", { transform: "translate(70, 70)", children: /* @__PURE__ */ jsxs(
326
+ motion.g,
327
+ {
328
+ animate: {
329
+ opacity: isRecording ? [1, 0.7, 1] : 1
330
+ },
331
+ transition: {
332
+ duration: 1,
333
+ repeat: isRecording ? Infinity : 0
334
+ },
335
+ children: [
336
+ /* @__PURE__ */ jsx("rect", { x: "-8", y: "-20", width: "16", height: "26", rx: "8", fill: "white" }),
337
+ /* @__PURE__ */ jsx(
338
+ "path",
339
+ {
340
+ d: "M-14 0 v6 a14 14 0 0 0 28 0 v-6",
341
+ fill: "none",
342
+ stroke: "white",
343
+ strokeWidth: "3",
344
+ strokeLinecap: "round"
345
+ }
346
+ ),
347
+ /* @__PURE__ */ jsx("line", { x1: "0", y1: "20", x2: "0", y2: "28", stroke: "white", strokeWidth: "3", strokeLinecap: "round" }),
348
+ /* @__PURE__ */ jsx("line", { x1: "-8", y1: "28", x2: "8", y2: "28", stroke: "white", strokeWidth: "3", strokeLinecap: "round" })
349
+ ]
350
+ }
351
+ ) }),
354
352
  particles.map((particle) => /* @__PURE__ */ jsx(
355
353
  motion.circle,
356
354
  {
@@ -1454,7 +1452,7 @@ var PremiumVoiceWidget = ({
1454
1452
  marginTop: 12,
1455
1453
  marginBottom: 0
1456
1454
  },
1457
- children: "Press and hold to record your feedback"
1455
+ children: "Click Record to start"
1458
1456
  }
1459
1457
  )
1460
1458
  ]
@@ -1470,8 +1468,7 @@ var PremiumVoiceWidget = ({
1470
1468
  /* @__PURE__ */ jsx(
1471
1469
  MagneticButton,
1472
1470
  {
1473
- onPressStart: handleStartRecording,
1474
- onPressEnd: handleStopRecording,
1471
+ onClick: isRecording ? handleStopRecording : handleStartRecording,
1475
1472
  variant: isRecording ? "recording" : "primary",
1476
1473
  children: isRecording ? /* @__PURE__ */ jsxs(Fragment, { children: [
1477
1474
  /* @__PURE__ */ jsx(
@@ -1480,20 +1477,17 @@ var PremiumVoiceWidget = ({
1480
1477
  animate: { scale: [1, 1.2, 1] },
1481
1478
  transition: { duration: 1, repeat: Infinity },
1482
1479
  style: {
1483
- width: 8,
1484
- height: 8,
1485
- borderRadius: "50%",
1480
+ width: 10,
1481
+ height: 10,
1482
+ borderRadius: 2,
1486
1483
  background: "white"
1487
1484
  }
1488
1485
  }
1489
1486
  ),
1490
- "Recording... Release to stop"
1491
- ] }) : transcription ? /* @__PURE__ */ jsxs(Fragment, { children: [
1492
- /* @__PURE__ */ jsx("svg", { width: 16, height: 16, viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M12 3a2.5 2.5 0 0 0-2.5 2.5v5a2.5 2.5 0 0 0 5 0v-5A2.5 2.5 0 0 0 12 3z" }) }),
1493
- "Hold to record more"
1487
+ "Stop Recording"
1494
1488
  ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
1495
1489
  /* @__PURE__ */ jsx("svg", { width: 16, height: 16, viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsx("path", { d: "M12 3a2.5 2.5 0 0 0-2.5 2.5v5a2.5 2.5 0 0 0 5 0v-5A2.5 2.5 0 0 0 12 3z" }) }),
1496
- "Hold to Record"
1490
+ transcription ? "Record Again" : "Record"
1497
1491
  ] })
1498
1492
  }
1499
1493
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentai/react",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "React component for Intent AI feedback widget - easily collect user feedback with AI-powered analysis",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org",