@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.
Files changed (112) hide show
  1. package/changelog.md +41 -0
  2. package/dist_shell/bundle.js +405 -368
  3. package/dist_shell/bundle.js.map +1 -1
  4. package/dist_shell/bundle.js.third-party-notices.json +52 -0
  5. package/dist_shell/bundle.js.third-party-notices.txt +107 -1
  6. package/dist_shell/index.html +1 -1
  7. package/dist_ts/00_commitinfo_data.js +1 -1
  8. package/dist_ts/capture/classes.capturebrowser.d.ts +65 -0
  9. package/dist_ts/capture/classes.capturebrowser.js +251 -0
  10. package/dist_ts/capture/classes.captureservice.d.ts +39 -0
  11. package/dist_ts/capture/classes.captureservice.js +119 -0
  12. package/dist_ts/capture/classes.screencast.d.ts +47 -0
  13. package/dist_ts/capture/classes.screencast.js +127 -0
  14. package/dist_ts/capture/errors.d.ts +14 -0
  15. package/dist_ts/capture/errors.js +23 -0
  16. package/dist_ts/capture/images.d.ts +3 -0
  17. package/dist_ts/capture/images.js +58 -0
  18. package/dist_ts/capture/index.d.ts +4 -0
  19. package/dist_ts/capture/index.js +5 -0
  20. package/dist_ts/capture/interaction.d.ts +11 -0
  21. package/dist_ts/capture/interaction.js +138 -0
  22. package/dist_ts/capture/navigationguard.d.ts +44 -0
  23. package/dist_ts/capture/navigationguard.js +129 -0
  24. package/dist_ts/capture/previewpage.d.ts +29 -0
  25. package/dist_ts/capture/previewpage.js +96 -0
  26. package/dist_ts/capture/request.d.ts +69 -0
  27. package/dist_ts/capture/request.js +239 -0
  28. package/dist_ts/classes.bundlestatus.d.ts +36 -0
  29. package/dist_ts/classes.bundlestatus.js +110 -0
  30. package/dist_ts/classes.devapi.d.ts +3 -0
  31. package/dist_ts/classes.devapi.js +8 -1
  32. package/dist_ts/classes.devserver.d.ts +65 -14
  33. package/dist_ts/classes.devserver.js +157 -52
  34. package/dist_ts/classes.hostpolicy.d.ts +63 -0
  35. package/dist_ts/classes.hostpolicy.js +171 -0
  36. package/dist_ts/cli.js +28 -3
  37. package/dist_ts/cli.screenshot.d.ts +6 -0
  38. package/dist_ts/cli.screenshot.js +89 -0
  39. package/dist_ts/index.d.ts +0 -2
  40. package/dist_ts/index.js +1 -3
  41. package/dist_ts/plugins.d.ts +6 -2
  42. package/dist_ts/plugins.js +8 -3
  43. package/dist_ts_interfaces/capture.d.ts +151 -0
  44. package/dist_ts_interfaces/capture.js +2 -0
  45. package/dist_ts_interfaces/index.d.ts +1 -0
  46. package/dist_ts_interfaces/index.js +2 -1
  47. package/dist_ts_interfaces/requests.d.ts +59 -0
  48. package/dist_ts_shell/bundlestatus.d.ts +15 -0
  49. package/dist_ts_shell/bundlestatus.js +64 -0
  50. package/dist_ts_shell/elements/wcc-contextmenu.d.ts +3 -0
  51. package/dist_ts_shell/elements/wcc-contextmenu.js +18 -3
  52. package/dist_ts_shell/elements/wcc-preview-frame.d.ts +6 -0
  53. package/dist_ts_shell/elements/wcc-preview-frame.js +50 -2
  54. package/dist_ts_shell/elements/wcc-recording-panel.d.ts +9 -0
  55. package/dist_ts_shell/elements/wcc-recording-panel.js +12 -1
  56. package/dist_ts_shell/elements/wcc-shell.d.ts +15 -0
  57. package/dist_ts_shell/elements/wcc-shell.js +45 -3
  58. package/dist_ts_shell/plugins.d.ts +2 -1
  59. package/dist_ts_shell/plugins.js +3 -2
  60. package/dist_ts_shell/services/framesampler.service.d.ts +23 -0
  61. package/dist_ts_shell/services/framesampler.service.js +101 -0
  62. package/dist_ts_web/00_commitinfo_data.js +1 -1
  63. package/package.json +6 -2
  64. package/readme.md +108 -6
  65. package/ts/00_commitinfo_data.ts +1 -1
  66. package/ts/capture/classes.capturebrowser.ts +290 -0
  67. package/ts/capture/classes.captureservice.ts +152 -0
  68. package/ts/capture/classes.screencast.ts +152 -0
  69. package/ts/capture/errors.ts +25 -0
  70. package/ts/capture/images.ts +61 -0
  71. package/ts/capture/index.ts +4 -0
  72. package/ts/capture/interaction.ts +146 -0
  73. package/ts/capture/navigationguard.ts +147 -0
  74. package/ts/capture/previewpage.ts +130 -0
  75. package/ts/capture/request.ts +304 -0
  76. package/ts/classes.bundlestatus.ts +123 -0
  77. package/ts/classes.devapi.ts +9 -0
  78. package/ts/classes.devserver.ts +172 -50
  79. package/ts/classes.hostpolicy.ts +201 -0
  80. package/ts/cli.screenshot.ts +95 -0
  81. package/ts/cli.ts +28 -2
  82. package/ts/index.ts +0 -2
  83. package/ts/plugins.ts +9 -2
  84. package/ts_interfaces/bridge.ts +95 -0
  85. package/ts_interfaces/capture.ts +144 -0
  86. package/ts_interfaces/catalog.ts +37 -0
  87. package/ts_interfaces/index.ts +5 -0
  88. package/ts_interfaces/plugins.ts +3 -0
  89. package/ts_interfaces/requests.ts +104 -0
  90. package/ts_interfaces/standard.ts +103 -0
  91. package/ts_shared/index.ts +1 -0
  92. package/ts_shared/plugins.ts +3 -0
  93. package/ts_shared/previewroute.ts +58 -0
  94. package/ts_shell/bundlestatus.ts +68 -0
  95. package/ts_shell/elements/wcc-contextmenu.ts +306 -0
  96. package/ts_shell/elements/wcc-preview-frame.ts +167 -0
  97. package/ts_shell/elements/wcc-properties.ts +998 -0
  98. package/ts_shell/elements/wcc-record-button.ts +108 -0
  99. package/ts_shell/elements/wcc-recording-panel.ts +1017 -0
  100. package/ts_shell/elements/wcc-shell.ts +485 -0
  101. package/ts_shell/elements/wcc-sidebar.ts +1419 -0
  102. package/ts_shell/index.html +21 -0
  103. package/ts_shell/index.ts +4 -0
  104. package/ts_shell/plugins.ts +12 -0
  105. package/ts_shell/previewconnection.ts +103 -0
  106. package/ts_shell/services/framesampler.service.ts +112 -0
  107. package/ts_shell/services/recorder.service.ts +451 -0
  108. package/ts_shell/types/dom-mediacapture-stub/index.d.ts +12 -0
  109. package/ts_shell/types/dom-mediacapture-stub/package.json +6 -0
  110. package/ts_shell/types/dom-webcodecs-stub/index.d.ts +2 -0
  111. package/ts_shell/types/dom-webcodecs-stub/package.json +6 -0
  112. 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
+ }