@design.estate/wcctools 6.1.0 → 7.0.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/changelog.md +41 -0
- package/dist_shell/bundle.js +405 -368
- package/dist_shell/bundle.js.map +1 -1
- package/dist_shell/bundle.js.third-party-notices.json +52 -0
- package/dist_shell/bundle.js.third-party-notices.txt +107 -1
- package/dist_shell/index.html +1 -1
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/capture/classes.capturebrowser.d.ts +65 -0
- package/dist_ts/capture/classes.capturebrowser.js +251 -0
- package/dist_ts/capture/classes.captureservice.d.ts +39 -0
- package/dist_ts/capture/classes.captureservice.js +119 -0
- package/dist_ts/capture/classes.screencast.d.ts +47 -0
- package/dist_ts/capture/classes.screencast.js +127 -0
- package/dist_ts/capture/errors.d.ts +14 -0
- package/dist_ts/capture/errors.js +23 -0
- package/dist_ts/capture/images.d.ts +3 -0
- package/dist_ts/capture/images.js +58 -0
- package/dist_ts/capture/index.d.ts +4 -0
- package/dist_ts/capture/index.js +5 -0
- package/dist_ts/capture/interaction.d.ts +11 -0
- package/dist_ts/capture/interaction.js +138 -0
- package/dist_ts/capture/navigationguard.d.ts +44 -0
- package/dist_ts/capture/navigationguard.js +129 -0
- package/dist_ts/capture/previewpage.d.ts +29 -0
- package/dist_ts/capture/previewpage.js +96 -0
- package/dist_ts/capture/request.d.ts +69 -0
- package/dist_ts/capture/request.js +239 -0
- package/dist_ts/classes.bundlestatus.d.ts +36 -0
- package/dist_ts/classes.bundlestatus.js +110 -0
- package/dist_ts/classes.devapi.d.ts +3 -0
- package/dist_ts/classes.devapi.js +8 -1
- package/dist_ts/classes.devserver.d.ts +65 -14
- package/dist_ts/classes.devserver.js +157 -52
- package/dist_ts/classes.hostpolicy.d.ts +63 -0
- package/dist_ts/classes.hostpolicy.js +171 -0
- package/dist_ts/cli.js +28 -3
- package/dist_ts/cli.screenshot.d.ts +6 -0
- package/dist_ts/cli.screenshot.js +89 -0
- package/dist_ts/index.d.ts +0 -2
- package/dist_ts/index.js +1 -3
- package/dist_ts/plugins.d.ts +6 -2
- package/dist_ts/plugins.js +8 -3
- package/dist_ts_interfaces/capture.d.ts +151 -0
- package/dist_ts_interfaces/capture.js +2 -0
- package/dist_ts_interfaces/index.d.ts +1 -0
- package/dist_ts_interfaces/index.js +2 -1
- package/dist_ts_interfaces/requests.d.ts +59 -0
- package/dist_ts_shell/bundlestatus.d.ts +15 -0
- package/dist_ts_shell/bundlestatus.js +64 -0
- package/dist_ts_shell/elements/wcc-contextmenu.d.ts +3 -0
- package/dist_ts_shell/elements/wcc-contextmenu.js +18 -3
- package/dist_ts_shell/elements/wcc-preview-frame.d.ts +6 -0
- package/dist_ts_shell/elements/wcc-preview-frame.js +50 -2
- package/dist_ts_shell/elements/wcc-recording-panel.d.ts +9 -0
- package/dist_ts_shell/elements/wcc-recording-panel.js +12 -1
- package/dist_ts_shell/elements/wcc-shell.d.ts +15 -0
- package/dist_ts_shell/elements/wcc-shell.js +45 -3
- package/dist_ts_shell/plugins.d.ts +2 -1
- package/dist_ts_shell/plugins.js +3 -2
- package/dist_ts_shell/services/framesampler.service.d.ts +23 -0
- package/dist_ts_shell/services/framesampler.service.js +101 -0
- package/dist_ts_web/00_commitinfo_data.js +1 -1
- package/package.json +6 -2
- package/readme.md +108 -6
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/capture/classes.capturebrowser.ts +290 -0
- package/ts/capture/classes.captureservice.ts +152 -0
- package/ts/capture/classes.screencast.ts +152 -0
- package/ts/capture/errors.ts +25 -0
- package/ts/capture/images.ts +61 -0
- package/ts/capture/index.ts +4 -0
- package/ts/capture/interaction.ts +146 -0
- package/ts/capture/navigationguard.ts +147 -0
- package/ts/capture/previewpage.ts +130 -0
- package/ts/capture/request.ts +304 -0
- package/ts/classes.bundlestatus.ts +123 -0
- package/ts/classes.devapi.ts +9 -0
- package/ts/classes.devserver.ts +172 -50
- package/ts/classes.hostpolicy.ts +201 -0
- package/ts/cli.screenshot.ts +95 -0
- package/ts/cli.ts +28 -2
- package/ts/index.ts +0 -2
- package/ts/plugins.ts +9 -2
- package/ts_interfaces/bridge.ts +95 -0
- package/ts_interfaces/capture.ts +144 -0
- package/ts_interfaces/catalog.ts +37 -0
- package/ts_interfaces/index.ts +5 -0
- package/ts_interfaces/plugins.ts +3 -0
- package/ts_interfaces/requests.ts +104 -0
- package/ts_interfaces/standard.ts +103 -0
- package/ts_shared/index.ts +1 -0
- package/ts_shared/plugins.ts +3 -0
- package/ts_shared/previewroute.ts +58 -0
- package/ts_shell/bundlestatus.ts +68 -0
- package/ts_shell/elements/wcc-contextmenu.ts +306 -0
- package/ts_shell/elements/wcc-preview-frame.ts +167 -0
- package/ts_shell/elements/wcc-properties.ts +998 -0
- package/ts_shell/elements/wcc-record-button.ts +108 -0
- package/ts_shell/elements/wcc-recording-panel.ts +1017 -0
- package/ts_shell/elements/wcc-shell.ts +485 -0
- package/ts_shell/elements/wcc-sidebar.ts +1419 -0
- package/ts_shell/index.html +21 -0
- package/ts_shell/index.ts +4 -0
- package/ts_shell/plugins.ts +12 -0
- package/ts_shell/previewconnection.ts +103 -0
- package/ts_shell/services/framesampler.service.ts +112 -0
- package/ts_shell/services/recorder.service.ts +451 -0
- package/ts_shell/types/dom-mediacapture-stub/index.d.ts +12 -0
- package/ts_shell/types/dom-mediacapture-stub/package.json +6 -0
- package/ts_shell/types/dom-webcodecs-stub/index.d.ts +2 -0
- package/ts_shell/types/dom-webcodecs-stub/package.json +6 -0
- package/ts_web/00_commitinfo_data.ts +1 -1
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { DeesElement, customElement, html, css, property, type TemplateResult } from '@design.estate/dees-element';
|
|
2
|
+
|
|
3
|
+
@customElement('wcc-record-button')
|
|
4
|
+
export class WccRecordButton extends DeesElement {
|
|
5
|
+
@property({ type: String })
|
|
6
|
+
accessor state: 'idle' | 'recording' = 'idle';
|
|
7
|
+
|
|
8
|
+
@property({ type: Number })
|
|
9
|
+
accessor duration: number = 0;
|
|
10
|
+
|
|
11
|
+
public static styles = [
|
|
12
|
+
css`
|
|
13
|
+
:host {
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
background: transparent;
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
transition: all 0.15s ease;
|
|
20
|
+
color: #666;
|
|
21
|
+
user-select: none;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:host(:hover) {
|
|
25
|
+
background: rgba(239, 68, 68, 0.05);
|
|
26
|
+
color: #f87171;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
:host(.recording) {
|
|
30
|
+
background: rgba(239, 68, 68, 0.15);
|
|
31
|
+
color: #f87171;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.content {
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
justify-content: center;
|
|
38
|
+
gap: 0.25rem;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.rec-icon {
|
|
42
|
+
width: 12px;
|
|
43
|
+
height: 12px;
|
|
44
|
+
border-radius: 50%;
|
|
45
|
+
background: currentColor;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
:host(.recording) .rec-icon {
|
|
49
|
+
animation: pulse-recording 1s ease-in-out infinite;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@keyframes pulse-recording {
|
|
53
|
+
0%, 100% { opacity: 1; transform: scale(1); }
|
|
54
|
+
50% { opacity: 0.5; transform: scale(0.9); }
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.recording-timer {
|
|
58
|
+
font-family: 'Consolas', 'Monaco', monospace;
|
|
59
|
+
font-size: 0.7rem;
|
|
60
|
+
}
|
|
61
|
+
`
|
|
62
|
+
];
|
|
63
|
+
|
|
64
|
+
private formatDuration(seconds: number): string {
|
|
65
|
+
const mins = Math.floor(seconds / 60);
|
|
66
|
+
const secs = seconds % 60;
|
|
67
|
+
return `${mins.toString().padStart(2, '0')}:${secs.toString().padStart(2, '0')}`;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
public render(): TemplateResult {
|
|
71
|
+
return html`
|
|
72
|
+
<div class="content">
|
|
73
|
+
<div class="rec-icon"></div>
|
|
74
|
+
${this.state === 'recording' ? html`
|
|
75
|
+
<span class="recording-timer">${this.formatDuration(this.duration)}</span>
|
|
76
|
+
` : null}
|
|
77
|
+
</div>
|
|
78
|
+
`;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
async connectedCallback(): Promise<void> {
|
|
82
|
+
await super.connectedCallback();
|
|
83
|
+
this.addEventListener('click', this.handleClick);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
async disconnectedCallback(): Promise<void> {
|
|
87
|
+
await super.disconnectedCallback();
|
|
88
|
+
this.removeEventListener('click', this.handleClick);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
private handleClick = (): void => {
|
|
92
|
+
this.dispatchEvent(new CustomEvent('record-click', {
|
|
93
|
+
bubbles: true,
|
|
94
|
+
composed: true
|
|
95
|
+
}));
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
updated(changedProperties: Map<string, unknown>): void {
|
|
99
|
+
super.updated(changedProperties);
|
|
100
|
+
if (changedProperties.has('state')) {
|
|
101
|
+
if (this.state === 'recording') {
|
|
102
|
+
this.classList.add('recording');
|
|
103
|
+
} else {
|
|
104
|
+
this.classList.remove('recording');
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|