widgies 0.1.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/timer.js ADDED
@@ -0,0 +1,153 @@
1
+ import{a as r}from"./chunk-3F3FJ7VN.js";var n=class extends r{constructor(){super(...arguments);this.display=null;this.playButton=null;this.resetButton=null;this.minutesInput=null;this.secondsInput=null;this.totalSeconds=0;this.remainingSeconds=0;this.isRunning=!1;this.intervalId=null}render(){this.shadow.innerHTML="";let t=this.createStyleSheet();t&&this.shadow.appendChild(t);let e=parseInt(this.getAttribute("minutes")||"0"),i=parseInt(this.getAttribute("seconds")||"0");(e>0||i>0)&&(this.totalSeconds=e*60+i,this.remainingSeconds=this.totalSeconds);let s=document.createElement("div");s.innerHTML=`
2
+ <div class="timer" role="timer" aria-label="Countdown timer">
3
+ <div class="time-inputs">
4
+ <label>
5
+ Minutes:
6
+ <input type="number" class="minutes-input" min="0" max="99" value="${e}" aria-label="Minutes">
7
+ </label>
8
+ <label>
9
+ Seconds:
10
+ <input type="number" class="seconds-input" min="0" max="59" value="${i}" aria-label="Seconds">
11
+ </label>
12
+ </div>
13
+
14
+ <div class="display" aria-live="polite" aria-label="Time remaining">
15
+ ${this.formatTime(this.remainingSeconds)}
16
+ </div>
17
+
18
+ <div class="controls">
19
+ <button class="play-btn" aria-label="Start or pause timer">
20
+ <span class="play-icon">\u25B6</span>
21
+ <span class="pause-icon" style="display: none">\u23F8</span>
22
+ </button>
23
+ <button class="reset-btn" aria-label="Reset timer">\u23F9</button>
24
+ </div>
25
+
26
+ <div class="progress-bar">
27
+ <div class="progress-fill" style="width: ${this.getProgressPercentage()}%"></div>
28
+ </div>
29
+ </div>
30
+ `,this.shadow.appendChild(s),this.display=this.shadow.querySelector(".display"),this.playButton=this.shadow.querySelector(".play-btn"),this.resetButton=this.shadow.querySelector(".reset-btn"),this.minutesInput=this.shadow.querySelector(".minutes-input"),this.secondsInput=this.shadow.querySelector(".seconds-input")}attachEventListeners(){this.playButton?.addEventListener("click",()=>{this.toggleTimer()}),this.resetButton?.addEventListener("click",()=>{this.resetTimer()}),this.minutesInput?.addEventListener("input",()=>{this.updateTimeFromInputs()}),this.secondsInput?.addEventListener("input",()=>{this.updateTimeFromInputs()}),this.addEventListener("keydown",t=>{t.key===" "?(t.preventDefault(),this.toggleTimer()):(t.key==="r"||t.key==="R")&&(t.preventDefault(),this.resetTimer())})}updateTimeFromInputs(){if(!this.minutesInput||!this.secondsInput||this.isRunning)return;let t=Math.max(0,Math.min(99,parseInt(this.minutesInput.value)||0)),e=Math.max(0,Math.min(59,parseInt(this.secondsInput.value)||0));this.minutesInput.value=t.toString(),this.secondsInput.value=e.toString(),this.totalSeconds=t*60+e,this.remainingSeconds=this.totalSeconds,this.updateDisplay()}toggleTimer(){this.remainingSeconds<=0&&!this.isRunning&&(this.updateTimeFromInputs(),this.remainingSeconds<=0)||(this.isRunning?this.pauseTimer():this.startTimer())}startTimer(){this.remainingSeconds<=0||(this.isRunning=!0,this.updateButtonStates(),this.intervalId=window.setInterval(()=>{this.remainingSeconds--,this.updateDisplay(),this.remainingSeconds<=0&&this.completeTimer()},1e3),this.dispatchEvent(new CustomEvent("timer-started",{detail:{remainingSeconds:this.remainingSeconds},bubbles:!0})))}pauseTimer(){this.isRunning=!1,this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null),this.updateButtonStates(),this.dispatchEvent(new CustomEvent("timer-paused",{detail:{remainingSeconds:this.remainingSeconds},bubbles:!0}))}resetTimer(){this.pauseTimer(),this.updateTimeFromInputs(),this.updateDisplay(),this.dispatchEvent(new CustomEvent("timer-reset",{detail:{totalSeconds:this.totalSeconds},bubbles:!0}))}completeTimer(){this.isRunning=!1,this.remainingSeconds=0,this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null),this.updateDisplay(),this.updateButtonStates(),this.dispatchEvent(new CustomEvent("timer-complete",{detail:{totalSeconds:this.totalSeconds},bubbles:!0})),this.shadow.querySelector(".timer")?.classList.add("completed"),"Notification"in window&&new Notification("Timer Complete!",{body:"Your countdown timer has finished.",icon:'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" fill="%236c4cff"/><path d="M9 12l2 2 4-4" stroke="white" stroke-width="2" fill="none"/></svg>'})}updateDisplay(){this.display&&(this.display.textContent=this.formatTime(this.remainingSeconds)),this.updateProgressBar()}updateProgressBar(){let t=this.shadow.querySelector(".progress-fill");t&&(t.style.width=`${this.getProgressPercentage()}%`)}getProgressPercentage(){return this.totalSeconds===0?0:Math.max(0,this.remainingSeconds/this.totalSeconds*100)}updateButtonStates(){let t=this.shadow.querySelector(".play-icon"),e=this.shadow.querySelector(".pause-icon");t&&e&&(this.isRunning?(t.style.display="none",e.style.display="inline"):(t.style.display="inline",e.style.display="none")),this.minutesInput&&this.secondsInput&&(this.minutesInput.disabled=this.isRunning,this.secondsInput.disabled=this.isRunning)}formatTime(t){let e=Math.floor(t/60),i=t%60;return`${e.toString().padStart(2,"0")}:${i.toString().padStart(2,"0")}`}static get observedAttributes(){return["minutes","seconds"]}attributeChangedCallback(t,e,i){if((t==="minutes"||t==="seconds")&&!this.isRunning){let s=parseInt(this.getAttribute("minutes")||"0"),a=parseInt(this.getAttribute("seconds")||"0");this.totalSeconds=s*60+a,this.remainingSeconds=this.totalSeconds,this.minutesInput&&(this.minutesInput.value=s.toString()),this.secondsInput&&(this.secondsInput.value=a.toString()),this.updateDisplay()}}disconnectedCallback(){super.disconnectedCallback(),this.intervalId&&clearInterval(this.intervalId)}getStyles(){return`
31
+ ${this.getBaseStyles()}
32
+
33
+ .timer {
34
+ width: 300px;
35
+ text-align: center;
36
+ transition: all 0.3s ease;
37
+ }
38
+
39
+ .timer.completed {
40
+ animation: pulse 0.5s ease-in-out;
41
+ }
42
+
43
+ @keyframes pulse {
44
+ 0%, 100% { transform: scale(1); }
45
+ 50% { transform: scale(1.05); }
46
+ }
47
+
48
+ .time-inputs {
49
+ display: flex;
50
+ gap: 1rem;
51
+ margin-bottom: 1rem;
52
+ justify-content: center;
53
+ }
54
+
55
+ .time-inputs label {
56
+ display: flex;
57
+ flex-direction: column;
58
+ align-items: center;
59
+ font-size: 0.9rem;
60
+ font-weight: 500;
61
+ }
62
+
63
+ .time-inputs input {
64
+ width: 80px;
65
+ padding: 0.5rem;
66
+ margin-top: 0.25rem;
67
+ border: 1px solid color-mix(in srgb, var(--widgies-text, var(--widgies-text-light, #1a1a1a)) 30%, transparent);
68
+ border-radius: calc(var(--widgies-radius, 0.5rem) * 0.5);
69
+ background: var(--widgies-surface, var(--widgies-surface-light, #ffffffe6));
70
+ color: var(--widgies-text, var(--widgies-text-light, #1a1a1a));
71
+ font: inherit;
72
+ text-align: center;
73
+ }
74
+
75
+ .time-inputs input:focus {
76
+ outline: 2px solid var(--widgies-accent, var(--widgies-accent-light, #6c4cff));
77
+ outline-offset: 1px;
78
+ }
79
+
80
+ .time-inputs input:disabled {
81
+ opacity: 0.5;
82
+ cursor: not-allowed;
83
+ }
84
+
85
+ .display {
86
+ background: color-mix(in srgb, var(--widgies-surface, var(--widgies-surface-light, #ffffffe6)) 70%, var(--widgies-text, var(--widgies-text-light, #1a1a1a)));
87
+ color: var(--widgies-text, var(--widgies-text-light, #1a1a1a));
88
+ padding: 2rem;
89
+ margin: 1rem 0;
90
+ border-radius: var(--widgies-radius, 0.5rem);
91
+ font-size: 3rem;
92
+ font-weight: bold;
93
+ font-family: 'Courier New', monospace;
94
+ letter-spacing: 0.1em;
95
+ }
96
+
97
+ .controls {
98
+ display: flex;
99
+ gap: 1rem;
100
+ justify-content: center;
101
+ margin-bottom: 1rem;
102
+ }
103
+
104
+ .controls button {
105
+ width: 60px;
106
+ height: 60px;
107
+ border-radius: 50%;
108
+ font-size: 1.5rem;
109
+ display: flex;
110
+ align-items: center;
111
+ justify-content: center;
112
+ padding: 0;
113
+ }
114
+
115
+ .progress-bar {
116
+ height: 8px;
117
+ background: color-mix(in srgb, var(--widgies-text, var(--widgies-text-light, #1a1a1a)) 20%, transparent);
118
+ border-radius: 4px;
119
+ overflow: hidden;
120
+ }
121
+
122
+ .progress-fill {
123
+ height: 100%;
124
+ background: var(--widgies-accent, var(--widgies-accent-light, #6c4cff));
125
+ transition: width 0.5s ease;
126
+ border-radius: 4px;
127
+ }
128
+
129
+ @media (prefers-color-scheme: dark) {
130
+ .time-inputs input {
131
+ background: var(--widgies-surface, var(--widgies-surface-dark, #181824e6));
132
+ color: var(--widgies-text, var(--widgies-text-dark, #f5f5ff));
133
+ border-color: color-mix(in srgb, var(--widgies-text, var(--widgies-text-dark, #f5f5ff)) 30%, transparent);
134
+ }
135
+
136
+ .time-inputs input:focus {
137
+ outline-color: var(--widgies-accent, var(--widgies-accent-dark, #a88bff));
138
+ }
139
+
140
+ .display {
141
+ background: color-mix(in srgb, var(--widgies-surface, var(--widgies-surface-dark, #181824e6)) 70%, var(--widgies-text, var(--widgies-text-dark, #f5f5ff)));
142
+ color: var(--widgies-text, var(--widgies-text-dark, #f5f5ff));
143
+ }
144
+
145
+ .progress-bar {
146
+ background: color-mix(in srgb, var(--widgies-text, var(--widgies-text-dark, #f5f5ff)) 20%, transparent);
147
+ }
148
+
149
+ .progress-fill {
150
+ background: var(--widgies-accent, var(--widgies-accent-dark, #a88bff));
151
+ }
152
+ }
153
+ `}};function o(){customElements.get("widgies-timer")||customElements.define("widgies-timer",n)}o();export{n as TimerWidget,o as register};
@@ -0,0 +1,153 @@
1
+ import{a as r}from"./chunk-BP7C5X5K.min.js";var n=class extends r{constructor(){super(...arguments);this.display=null;this.playButton=null;this.resetButton=null;this.minutesInput=null;this.secondsInput=null;this.totalSeconds=0;this.remainingSeconds=0;this.isRunning=!1;this.intervalId=null}render(){this.shadow.innerHTML="";let t=this.createStyleSheet();t&&this.shadow.appendChild(t);let e=parseInt(this.getAttribute("minutes")||"0"),i=parseInt(this.getAttribute("seconds")||"0");(e>0||i>0)&&(this.totalSeconds=e*60+i,this.remainingSeconds=this.totalSeconds);let s=document.createElement("div");s.innerHTML=`
2
+ <div class="timer" role="timer" aria-label="Countdown timer">
3
+ <div class="time-inputs">
4
+ <label>
5
+ Minutes:
6
+ <input type="number" class="minutes-input" min="0" max="99" value="${e}" aria-label="Minutes">
7
+ </label>
8
+ <label>
9
+ Seconds:
10
+ <input type="number" class="seconds-input" min="0" max="59" value="${i}" aria-label="Seconds">
11
+ </label>
12
+ </div>
13
+
14
+ <div class="display" aria-live="polite" aria-label="Time remaining">
15
+ ${this.formatTime(this.remainingSeconds)}
16
+ </div>
17
+
18
+ <div class="controls">
19
+ <button class="play-btn" aria-label="Start or pause timer">
20
+ <span class="play-icon">\u25B6</span>
21
+ <span class="pause-icon" style="display: none">\u23F8</span>
22
+ </button>
23
+ <button class="reset-btn" aria-label="Reset timer">\u23F9</button>
24
+ </div>
25
+
26
+ <div class="progress-bar">
27
+ <div class="progress-fill" style="width: ${this.getProgressPercentage()}%"></div>
28
+ </div>
29
+ </div>
30
+ `,this.shadow.appendChild(s),this.display=this.shadow.querySelector(".display"),this.playButton=this.shadow.querySelector(".play-btn"),this.resetButton=this.shadow.querySelector(".reset-btn"),this.minutesInput=this.shadow.querySelector(".minutes-input"),this.secondsInput=this.shadow.querySelector(".seconds-input")}attachEventListeners(){this.playButton?.addEventListener("click",()=>{this.toggleTimer()}),this.resetButton?.addEventListener("click",()=>{this.resetTimer()}),this.minutesInput?.addEventListener("input",()=>{this.updateTimeFromInputs()}),this.secondsInput?.addEventListener("input",()=>{this.updateTimeFromInputs()}),this.addEventListener("keydown",t=>{t.key===" "?(t.preventDefault(),this.toggleTimer()):(t.key==="r"||t.key==="R")&&(t.preventDefault(),this.resetTimer())})}updateTimeFromInputs(){if(!this.minutesInput||!this.secondsInput||this.isRunning)return;let t=Math.max(0,Math.min(99,parseInt(this.minutesInput.value)||0)),e=Math.max(0,Math.min(59,parseInt(this.secondsInput.value)||0));this.minutesInput.value=t.toString(),this.secondsInput.value=e.toString(),this.totalSeconds=t*60+e,this.remainingSeconds=this.totalSeconds,this.updateDisplay()}toggleTimer(){this.remainingSeconds<=0&&!this.isRunning&&(this.updateTimeFromInputs(),this.remainingSeconds<=0)||(this.isRunning?this.pauseTimer():this.startTimer())}startTimer(){this.remainingSeconds<=0||(this.isRunning=!0,this.updateButtonStates(),this.intervalId=window.setInterval(()=>{this.remainingSeconds--,this.updateDisplay(),this.remainingSeconds<=0&&this.completeTimer()},1e3),this.dispatchEvent(new CustomEvent("timer-started",{detail:{remainingSeconds:this.remainingSeconds},bubbles:!0})))}pauseTimer(){this.isRunning=!1,this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null),this.updateButtonStates(),this.dispatchEvent(new CustomEvent("timer-paused",{detail:{remainingSeconds:this.remainingSeconds},bubbles:!0}))}resetTimer(){this.pauseTimer(),this.updateTimeFromInputs(),this.updateDisplay(),this.dispatchEvent(new CustomEvent("timer-reset",{detail:{totalSeconds:this.totalSeconds},bubbles:!0}))}completeTimer(){this.isRunning=!1,this.remainingSeconds=0,this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null),this.updateDisplay(),this.updateButtonStates(),this.dispatchEvent(new CustomEvent("timer-complete",{detail:{totalSeconds:this.totalSeconds},bubbles:!0})),this.shadow.querySelector(".timer")?.classList.add("completed"),"Notification"in window&&new Notification("Timer Complete!",{body:"Your countdown timer has finished.",icon:'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10" fill="%236c4cff"/><path d="M9 12l2 2 4-4" stroke="white" stroke-width="2" fill="none"/></svg>'})}updateDisplay(){this.display&&(this.display.textContent=this.formatTime(this.remainingSeconds)),this.updateProgressBar()}updateProgressBar(){let t=this.shadow.querySelector(".progress-fill");t&&(t.style.width=`${this.getProgressPercentage()}%`)}getProgressPercentage(){return this.totalSeconds===0?0:Math.max(0,this.remainingSeconds/this.totalSeconds*100)}updateButtonStates(){let t=this.shadow.querySelector(".play-icon"),e=this.shadow.querySelector(".pause-icon");t&&e&&(this.isRunning?(t.style.display="none",e.style.display="inline"):(t.style.display="inline",e.style.display="none")),this.minutesInput&&this.secondsInput&&(this.minutesInput.disabled=this.isRunning,this.secondsInput.disabled=this.isRunning)}formatTime(t){let e=Math.floor(t/60),i=t%60;return`${e.toString().padStart(2,"0")}:${i.toString().padStart(2,"0")}`}static get observedAttributes(){return["minutes","seconds"]}attributeChangedCallback(t,e,i){if((t==="minutes"||t==="seconds")&&!this.isRunning){let s=parseInt(this.getAttribute("minutes")||"0"),a=parseInt(this.getAttribute("seconds")||"0");this.totalSeconds=s*60+a,this.remainingSeconds=this.totalSeconds,this.minutesInput&&(this.minutesInput.value=s.toString()),this.secondsInput&&(this.secondsInput.value=a.toString()),this.updateDisplay()}}disconnectedCallback(){super.disconnectedCallback(),this.intervalId&&clearInterval(this.intervalId)}getStyles(){return`
31
+ ${this.getBaseStyles()}
32
+
33
+ .timer {
34
+ width: 300px;
35
+ text-align: center;
36
+ transition: all 0.3s ease;
37
+ }
38
+
39
+ .timer.completed {
40
+ animation: pulse 0.5s ease-in-out;
41
+ }
42
+
43
+ @keyframes pulse {
44
+ 0%, 100% { transform: scale(1); }
45
+ 50% { transform: scale(1.05); }
46
+ }
47
+
48
+ .time-inputs {
49
+ display: flex;
50
+ gap: 1rem;
51
+ margin-bottom: 1rem;
52
+ justify-content: center;
53
+ }
54
+
55
+ .time-inputs label {
56
+ display: flex;
57
+ flex-direction: column;
58
+ align-items: center;
59
+ font-size: 0.9rem;
60
+ font-weight: 500;
61
+ }
62
+
63
+ .time-inputs input {
64
+ width: 80px;
65
+ padding: 0.5rem;
66
+ margin-top: 0.25rem;
67
+ border: 1px solid color-mix(in srgb, var(--widgies-text, var(--widgies-text-light, #1a1a1a)) 30%, transparent);
68
+ border-radius: calc(var(--widgies-radius, 0.5rem) * 0.5);
69
+ background: var(--widgies-surface, var(--widgies-surface-light, #ffffffe6));
70
+ color: var(--widgies-text, var(--widgies-text-light, #1a1a1a));
71
+ font: inherit;
72
+ text-align: center;
73
+ }
74
+
75
+ .time-inputs input:focus {
76
+ outline: 2px solid var(--widgies-accent, var(--widgies-accent-light, #6c4cff));
77
+ outline-offset: 1px;
78
+ }
79
+
80
+ .time-inputs input:disabled {
81
+ opacity: 0.5;
82
+ cursor: not-allowed;
83
+ }
84
+
85
+ .display {
86
+ background: color-mix(in srgb, var(--widgies-surface, var(--widgies-surface-light, #ffffffe6)) 70%, var(--widgies-text, var(--widgies-text-light, #1a1a1a)));
87
+ color: var(--widgies-text, var(--widgies-text-light, #1a1a1a));
88
+ padding: 2rem;
89
+ margin: 1rem 0;
90
+ border-radius: var(--widgies-radius, 0.5rem);
91
+ font-size: 3rem;
92
+ font-weight: bold;
93
+ font-family: 'Courier New', monospace;
94
+ letter-spacing: 0.1em;
95
+ }
96
+
97
+ .controls {
98
+ display: flex;
99
+ gap: 1rem;
100
+ justify-content: center;
101
+ margin-bottom: 1rem;
102
+ }
103
+
104
+ .controls button {
105
+ width: 60px;
106
+ height: 60px;
107
+ border-radius: 50%;
108
+ font-size: 1.5rem;
109
+ display: flex;
110
+ align-items: center;
111
+ justify-content: center;
112
+ padding: 0;
113
+ }
114
+
115
+ .progress-bar {
116
+ height: 8px;
117
+ background: color-mix(in srgb, var(--widgies-text, var(--widgies-text-light, #1a1a1a)) 20%, transparent);
118
+ border-radius: 4px;
119
+ overflow: hidden;
120
+ }
121
+
122
+ .progress-fill {
123
+ height: 100%;
124
+ background: var(--widgies-accent, var(--widgies-accent-light, #6c4cff));
125
+ transition: width 0.5s ease;
126
+ border-radius: 4px;
127
+ }
128
+
129
+ @media (prefers-color-scheme: dark) {
130
+ .time-inputs input {
131
+ background: var(--widgies-surface, var(--widgies-surface-dark, #181824e6));
132
+ color: var(--widgies-text, var(--widgies-text-dark, #f5f5ff));
133
+ border-color: color-mix(in srgb, var(--widgies-text, var(--widgies-text-dark, #f5f5ff)) 30%, transparent);
134
+ }
135
+
136
+ .time-inputs input:focus {
137
+ outline-color: var(--widgies-accent, var(--widgies-accent-dark, #a88bff));
138
+ }
139
+
140
+ .display {
141
+ background: color-mix(in srgb, var(--widgies-surface, var(--widgies-surface-dark, #181824e6)) 70%, var(--widgies-text, var(--widgies-text-dark, #f5f5ff)));
142
+ color: var(--widgies-text, var(--widgies-text-dark, #f5f5ff));
143
+ }
144
+
145
+ .progress-bar {
146
+ background: color-mix(in srgb, var(--widgies-text, var(--widgies-text-dark, #f5f5ff)) 20%, transparent);
147
+ }
148
+
149
+ .progress-fill {
150
+ background: var(--widgies-accent, var(--widgies-accent-dark, #a88bff));
151
+ }
152
+ }
153
+ `}};function o(){customElements.get("widgies-timer")||customElements.define("widgies-timer",n)}o();export{n as TimerWidget,o as register};
@@ -0,0 +1,21 @@
1
+ import { BaseWidget } from '../core/BaseWidget.js';
2
+ export declare class AffirmationWidget extends BaseWidget {
3
+ private display;
4
+ private newButton;
5
+ private intervalId;
6
+ private autoInterval;
7
+ private affirmations;
8
+ private currentAffirmation;
9
+ protected render(): void;
10
+ protected attachEventListeners(): void;
11
+ private getRandomAffirmation;
12
+ private showNewAffirmation;
13
+ private startAutoInterval;
14
+ private stopAutoInterval;
15
+ static get observedAttributes(): string[];
16
+ attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
17
+ connectedCallback(): void;
18
+ disconnectedCallback(): void;
19
+ protected getStyles(): string;
20
+ }
21
+ export declare function register(): void;
@@ -0,0 +1,34 @@
1
+ import { BaseWidget } from '../core/BaseWidget.js';
2
+ export declare class AmbientWidget extends BaseWidget {
3
+ private audioContext;
4
+ private oscillators;
5
+ private gainNodes;
6
+ private gainNode;
7
+ private isPlaying;
8
+ private currentSound;
9
+ private playButton;
10
+ private soundSelect;
11
+ private volumeSlider;
12
+ private sounds;
13
+ protected render(): void;
14
+ protected attachEventListeners(): void;
15
+ private initAudioContext;
16
+ private createWhiteNoise;
17
+ createRainSound(): AudioBufferSourceNode;
18
+ createOceanSound(): AudioBufferSourceNode;
19
+ createForestSound(): AudioBufferSourceNode;
20
+ createCampfireSound(): AudioBufferSourceNode;
21
+ private togglePlayback;
22
+ private playSound;
23
+ private stopSound;
24
+ private changeSound;
25
+ private updateVolume;
26
+ private updatePlayButton;
27
+ private updateSoundDisplay;
28
+ private updateStatus;
29
+ static get observedAttributes(): string[];
30
+ attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
31
+ disconnectedCallback(): void;
32
+ protected getStyles(): string;
33
+ }
34
+ export declare function register(): void;
@@ -0,0 +1,18 @@
1
+ import { BaseWidget } from '../core/BaseWidget.js';
2
+ export declare class CalculatorWidget extends BaseWidget {
3
+ private display;
4
+ private currentValue;
5
+ private previousValue;
6
+ private operator;
7
+ private waitingForOperand;
8
+ protected render(): void;
9
+ protected attachEventListeners(): void;
10
+ private inputNumber;
11
+ private inputOperator;
12
+ private calculate;
13
+ private performCalculation;
14
+ private clear;
15
+ private updateDisplay;
16
+ protected getStyles(): string;
17
+ }
18
+ export declare function register(): void;
@@ -0,0 +1,22 @@
1
+ import { BaseWidget } from '../core/BaseWidget.js';
2
+ export declare class QRCodeWidget extends BaseWidget {
3
+ private textInput;
4
+ private generateButton;
5
+ private qrDisplay;
6
+ private downloadButton;
7
+ protected render(): void;
8
+ protected attachEventListeners(): void;
9
+ protected handleActivation(event: KeyboardEvent): void;
10
+ private validateInput;
11
+ private generateQRCode;
12
+ private createQRCode;
13
+ private renderQRCode;
14
+ private downloadQRCode;
15
+ private showError;
16
+ private showLoading;
17
+ static get observedAttributes(): string[];
18
+ attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
19
+ connectedCallback(): void;
20
+ protected getStyles(): string;
21
+ }
22
+ export declare function register(): void;
@@ -0,0 +1,17 @@
1
+ import { BaseWidget } from '../core/BaseWidget.js';
2
+ export declare class RandomNumberWidget extends BaseWidget {
3
+ private display;
4
+ private generateButton;
5
+ private minInput;
6
+ private maxInput;
7
+ protected render(): void;
8
+ protected attachEventListeners(): void;
9
+ private validateInputs;
10
+ private generateRandomNumber;
11
+ private cryptoRandomInt;
12
+ static get observedAttributes(): string[];
13
+ attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
14
+ connectedCallback(): void;
15
+ protected getStyles(): string;
16
+ }
17
+ export declare function register(): void;
@@ -0,0 +1,30 @@
1
+ import { BaseWidget } from '../core/BaseWidget.js';
2
+ export declare class TimerWidget extends BaseWidget {
3
+ private display;
4
+ private playButton;
5
+ private resetButton;
6
+ private minutesInput;
7
+ private secondsInput;
8
+ private totalSeconds;
9
+ private remainingSeconds;
10
+ private isRunning;
11
+ private intervalId;
12
+ protected render(): void;
13
+ protected attachEventListeners(): void;
14
+ private updateTimeFromInputs;
15
+ private toggleTimer;
16
+ private startTimer;
17
+ private pauseTimer;
18
+ private resetTimer;
19
+ private completeTimer;
20
+ private updateDisplay;
21
+ private updateProgressBar;
22
+ private getProgressPercentage;
23
+ private updateButtonStates;
24
+ private formatTime;
25
+ static get observedAttributes(): string[];
26
+ attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
27
+ disconnectedCallback(): void;
28
+ protected getStyles(): string;
29
+ }
30
+ export declare function register(): void;