@wandelbots/wandelbots-js-react-components 2.40.0-pr.feature-seperate-timer.383.0494cf4 → 2.41.0
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/components/CycleTimer/DefaultVariant.d.ts.map +1 -1
- package/dist/components/CycleTimer/SmallVariant.d.ts.map +1 -1
- package/dist/components/CycleTimer/index.d.ts +5 -4
- package/dist/components/CycleTimer/index.d.ts.map +1 -1
- package/dist/components/CycleTimer/types.d.ts +3 -2
- package/dist/components/CycleTimer/types.d.ts.map +1 -1
- package/dist/components/CycleTimer/useTimerLogic.d.ts +2 -1
- package/dist/components/CycleTimer/useTimerLogic.d.ts.map +1 -1
- package/dist/components/TabBar.d.ts +2 -0
- package/dist/components/TabBar.d.ts.map +1 -1
- package/dist/index.cjs +47 -47
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4840 -5249
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/CycleTimer/DefaultVariant.tsx +2 -0
- package/src/components/CycleTimer/SmallVariant.tsx +5 -2
- package/src/components/CycleTimer/index.tsx +5 -4
- package/src/components/CycleTimer/types.ts +3 -1
- package/src/components/CycleTimer/useTimerLogic.ts +96 -40
- package/src/components/CycleTimer/utils.ts +3 -3
- package/src/components/TabBar.tsx +35 -8
- package/src/i18n/locales/de/translations.json +0 -1
- package/src/i18n/locales/en/translations.json +0 -1
- package/src/index.ts +0 -1
- package/dist/components/Timer/Timer.d.ts +0 -3
- package/dist/components/Timer/Timer.d.ts.map +0 -1
- package/dist/components/Timer/TimerDefaultVariant.d.ts +0 -10
- package/dist/components/Timer/TimerDefaultVariant.d.ts.map +0 -1
- package/dist/components/Timer/TimerSmallVariant.d.ts +0 -11
- package/dist/components/Timer/TimerSmallVariant.d.ts.map +0 -1
- package/dist/components/Timer/index.d.ts +0 -19
- package/dist/components/Timer/index.d.ts.map +0 -1
- package/dist/components/Timer/types.d.ts +0 -36
- package/dist/components/Timer/types.d.ts.map +0 -1
- package/dist/components/Timer/useTimerAnimations.d.ts +0 -11
- package/dist/components/Timer/useTimerAnimations.d.ts.map +0 -1
- package/dist/components/Timer/useTimerLogic.d.ts +0 -20
- package/dist/components/Timer/useTimerLogic.d.ts.map +0 -1
- package/dist/components/Timer/utils.d.ts +0 -9
- package/dist/components/Timer/utils.d.ts.map +0 -1
- package/src/components/Timer/Timer.ts +0 -2
- package/src/components/Timer/TimerDefaultVariant.tsx +0 -140
- package/src/components/Timer/TimerSmallVariant.tsx +0 -140
- package/src/components/Timer/index.tsx +0 -101
- package/src/components/Timer/types.ts +0 -38
- package/src/components/Timer/useTimerAnimations.ts +0 -94
- package/src/components/Timer/useTimerLogic.ts +0 -214
- package/src/components/Timer/utils.ts +0 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultVariant.d.ts","sourceRoot":"","sources":["../../../src/components/CycleTimer/DefaultVariant.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAGzD,UAAU,mBAAmB;IAC3B,UAAU,EAAE,UAAU,CAAA;IACtB,cAAc,EAAE,cAAc,CAAA;IAC9B,QAAQ,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,cAAc,GAAI,sDAK5B,mBAAmB,
|
|
1
|
+
{"version":3,"file":"DefaultVariant.d.ts","sourceRoot":"","sources":["../../../src/components/CycleTimer/DefaultVariant.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAGzD,UAAU,mBAAmB;IAC3B,UAAU,EAAE,UAAU,CAAA;IACtB,cAAc,EAAE,cAAc,CAAA;IAC9B,QAAQ,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,cAAc,GAAI,sDAK5B,mBAAmB,4CAkTrB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SmallVariant.d.ts","sourceRoot":"","sources":["../../../src/components/CycleTimer/SmallVariant.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAGzD,UAAU,iBAAiB;IACzB,UAAU,EAAE,UAAU,CAAA;IACtB,cAAc,EAAE,cAAc,CAAA;IAC9B,QAAQ,EAAE,OAAO,CAAA;IACjB,OAAO,EAAE,OAAO,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,YAAY,GAAI,+DAM1B,iBAAiB,
|
|
1
|
+
{"version":3,"file":"SmallVariant.d.ts","sourceRoot":"","sources":["../../../src/components/CycleTimer/SmallVariant.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAGzD,UAAU,iBAAiB;IACzB,UAAU,EAAE,UAAU,CAAA;IACtB,cAAc,EAAE,cAAc,CAAA;IAC9B,QAAQ,EAAE,OAAO,CAAA;IACjB,OAAO,EAAE,OAAO,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,eAAO,MAAM,YAAY,GAAI,+DAM1B,iBAAiB,4CAkNnB,CAAA"}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import type { CycleTimerProps } from "./types";
|
|
2
2
|
/**
|
|
3
|
-
* A circular gauge timer component
|
|
3
|
+
* A circular gauge timer component that shows the remaining time of a cycle or counts up
|
|
4
4
|
*
|
|
5
5
|
* Features:
|
|
6
6
|
* - Custom SVG circular gauge with 264px diameter and 40px thickness
|
|
7
|
-
* - Multiple states: idle, measuring, measured, countdown, success
|
|
7
|
+
* - Multiple states: idle, measuring, measured, countdown, countup, success
|
|
8
8
|
* - Idle state: shows "Waiting for program cycle" with transparent inner circle
|
|
9
9
|
* - Measuring state: counts up with "Cycle Time" / "measuring..." labels
|
|
10
10
|
* - Measured state: shows final time with "Cycle Time" / "determined" labels in pulsating green
|
|
11
11
|
* - Countdown mode: shows remaining time prominently, counts down to zero
|
|
12
|
+
* - Count-up mode: shows elapsed time without special labels
|
|
12
13
|
* - Success state: brief green flash after cycle completion
|
|
13
14
|
* - Displays appropriate labels based on state
|
|
14
|
-
* - Automatically counts down and triggers callback when reaching zero
|
|
15
|
+
* - Automatically counts down/up and triggers callback when reaching zero (countdown only)
|
|
15
16
|
* - Full timer control: start, pause, resume functionality
|
|
16
17
|
* - Support for starting with elapsed time (resume mid-cycle)
|
|
17
18
|
* - Error state support: pauses timer and shows error styling (red color)
|
|
@@ -19,7 +20,7 @@ import type { CycleTimerProps } from "./types";
|
|
|
19
20
|
* - Pulsating text animation for completed measuring state
|
|
20
21
|
* - Fully localized with i18next
|
|
21
22
|
* - Material-UI theming integration
|
|
22
|
-
* - Small variant with animated progress icon (gauge border only) next to text
|
|
23
|
+
* - Small variant with animated progress icon (gauge border only) next to text or simple text-only mode
|
|
23
24
|
*/
|
|
24
25
|
export declare const CycleTimer: (({ onCycleComplete, onCycleEnd, onMeasuringComplete, autoStart, variant, compact, className, hasError, }: CycleTimerProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
25
26
|
displayName: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/CycleTimer/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAI9C
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/CycleTimer/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAI9C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,UAAU,6GAWhB,eAAe;;CAiHrB,CAAA"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export type CycleTimerState = "idle" | "measuring" | "measured" | "countdown" | "success";
|
|
1
|
+
export type CycleTimerState = "idle" | "measuring" | "measured" | "countdown" | "countup" | "success";
|
|
2
2
|
export interface CycleTimerControls {
|
|
3
|
-
startNewCycle: (maxTimeSeconds
|
|
3
|
+
startNewCycle: (maxTimeSeconds?: number, elapsedSeconds?: number) => void;
|
|
4
4
|
startMeasuring: (elapsedSeconds?: number) => void;
|
|
5
|
+
startCountUp: (elapsedSeconds?: number) => void;
|
|
5
6
|
setIdle: () => void;
|
|
6
7
|
completeMeasuring: () => void;
|
|
7
8
|
pause: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/CycleTimer/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GACvB,MAAM,GACN,WAAW,GACX,UAAU,GACV,WAAW,GACX,SAAS,CAAA;AAEb,MAAM,WAAW,kBAAkB;IACjC,aAAa,EAAE,CAAC,cAAc,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/CycleTimer/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GACvB,MAAM,GACN,WAAW,GACX,UAAU,GACV,WAAW,GACX,SAAS,GACT,SAAS,CAAA;AAEb,MAAM,WAAW,kBAAkB;IACjC,aAAa,EAAE,CAAC,cAAc,CAAC,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACzE,cAAc,EAAE,CAAC,cAAc,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACjD,YAAY,EAAE,CAAC,cAAc,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/C,OAAO,EAAE,MAAM,IAAI,CA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Props {
|
|
|
12
12
|
export declare const useTimerLogic: ({ autoStart, onCycleEnd, onMeasuringComplete, hasError, onPauseAnimation, onErrorAnimation, onClearErrorAnimation, onStartPulsating, }: UseTimerLogicProps) => {
|
|
13
13
|
timerState: TimerState;
|
|
14
14
|
controls: {
|
|
15
|
-
startNewCycle: (maxTimeSeconds
|
|
15
|
+
startNewCycle: (maxTimeSeconds?: number, elapsedSeconds?: number) => void;
|
|
16
16
|
startMeasuring: (elapsedSeconds?: number) => void;
|
|
17
|
+
startCountUp: (elapsedSeconds?: number) => void;
|
|
17
18
|
setIdle: () => void;
|
|
18
19
|
completeMeasuring: () => void;
|
|
19
20
|
pause: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTimerLogic.d.ts","sourceRoot":"","sources":["../../../src/components/CycleTimer/useTimerLogic.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAGzC,UAAU,kBAAkB;IAC1B,SAAS,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;IACvB,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAA;IAChC,QAAQ,EAAE,OAAO,CAAA;IACjB,gBAAgB,EAAE,MAAM,IAAI,CAAA;IAC5B,gBAAgB,EAAE,MAAM,IAAI,CAAA;IAC5B,qBAAqB,EAAE,MAAM,IAAI,CAAA;IACjC,gBAAgB,EAAE,CAAC,UAAU,CAAC,EAAE,MAAM,IAAI,KAAK,IAAI,CAAA;CACpD;AAED,eAAO,MAAM,aAAa,GAAI,wIAS3B,kBAAkB;;;
|
|
1
|
+
{"version":3,"file":"useTimerLogic.d.ts","sourceRoot":"","sources":["../../../src/components/CycleTimer/useTimerLogic.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAGzC,UAAU,kBAAkB;IAC1B,SAAS,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;IACvB,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAA;IAChC,QAAQ,EAAE,OAAO,CAAA;IACjB,gBAAgB,EAAE,MAAM,IAAI,CAAA;IAC5B,gBAAgB,EAAE,MAAM,IAAI,CAAA;IAC5B,qBAAqB,EAAE,MAAM,IAAI,CAAA;IACjC,gBAAgB,EAAE,CAAC,UAAU,CAAC,EAAE,MAAM,IAAI,KAAK,IAAI,CAAA;CACpD;AAED,eAAO,MAAM,aAAa,GAAI,wIAS3B,kBAAkB;;;yCA2FC,MAAM,mBAAkB,MAAM;0CAlD/B,MAAM;wCAyBN,MAAM;;;;;;;CAsS1B,CAAA"}
|
|
@@ -12,6 +12,8 @@ export interface TabItem {
|
|
|
12
12
|
export interface TabBarProps {
|
|
13
13
|
/** Array of tab items to display */
|
|
14
14
|
items: TabItem[];
|
|
15
|
+
/** Controlled active tab index */
|
|
16
|
+
activeTab?: number;
|
|
15
17
|
/** Default active tab index */
|
|
16
18
|
defaultActiveTab?: number;
|
|
17
19
|
/** Callback when tab changes */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabBar.d.ts","sourceRoot":"","sources":["../../src/components/TabBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAM5C,MAAM,WAAW,OAAO;IACtB,oCAAoC;IACpC,EAAE,EAAE,MAAM,CAAA;IACV,6BAA6B;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,4CAA4C;IAC5C,OAAO,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,sDAAsD;IACtD,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,CAAA;CAC1B;AAED,MAAM,WAAW,WAAW;IAC1B,oCAAoC;IACpC,KAAK,EAAE,OAAO,EAAE,CAAA;IAChB,+BAA+B;IAC/B,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,gCAAgC;IAChC,WAAW,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