@loupekit/sdk 0.10.2-next.44 → 0.10.2
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.global.js +11 -11
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +11 -11
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2843,10 +2843,10 @@ var LoupeApp = class {
|
|
|
2843
2843
|
if (canShareScreen()) {
|
|
2844
2844
|
tools.append(inspectBtn, freeBtn, regionBtn, recordBtn);
|
|
2845
2845
|
} else if (isTouchDevice()) {
|
|
2846
|
-
const
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
tools.append(inspectBtn, freeBtn, regionBtn,
|
|
2846
|
+
const cameraBtn = this.toolBtn(CAMERA_ICON, "Camera", "camera");
|
|
2847
|
+
cameraBtn.title = "Record a video with the camera and comment";
|
|
2848
|
+
cameraBtn.onclick = () => this.pickCameraVideo();
|
|
2849
|
+
tools.append(inspectBtn, freeBtn, regionBtn, cameraBtn);
|
|
2850
2850
|
} else {
|
|
2851
2851
|
tools.append(inspectBtn, freeBtn, regionBtn);
|
|
2852
2852
|
}
|
|
@@ -3025,16 +3025,16 @@ var LoupeApp = class {
|
|
|
3025
3025
|
);
|
|
3026
3026
|
}
|
|
3027
3027
|
/**
|
|
3028
|
-
*
|
|
3029
|
-
*
|
|
3030
|
-
*
|
|
3031
|
-
* room is not a screen recording.
|
|
3028
|
+
* Touch devices with no screen recorder (every iOS browser) can still report a video:
|
|
3029
|
+
* record one with the camera. Opens the native recorder and hands the clip to the
|
|
3030
|
+
* composer exactly like the screen capture does.
|
|
3032
3031
|
*/
|
|
3033
|
-
|
|
3032
|
+
pickCameraVideo() {
|
|
3034
3033
|
this.setMode("off");
|
|
3035
3034
|
const input = document.createElement("input");
|
|
3036
3035
|
input.type = "file";
|
|
3037
3036
|
input.accept = "video/*";
|
|
3037
|
+
input.setAttribute("capture", "environment");
|
|
3038
3038
|
input.style.display = "none";
|
|
3039
3039
|
input.onchange = () => {
|
|
3040
3040
|
const file = input.files?.[0];
|
|
@@ -3046,7 +3046,7 @@ var LoupeApp = class {
|
|
|
3046
3046
|
const docH = Math.max(1, document.documentElement.scrollHeight);
|
|
3047
3047
|
const offset = { x: clamp(docX / docW), y: clamp(docY / docH) };
|
|
3048
3048
|
this.openComposer(
|
|
3049
|
-
{ kind: "free", offset, point: { x: docX, y: docY }, label: "
|
|
3049
|
+
{ kind: "free", offset, point: { x: docX, y: docY }, label: "Camera video \xB7 attached" },
|
|
3050
3050
|
8,
|
|
3051
3051
|
window.innerHeight / 2,
|
|
3052
3052
|
[file]
|
|
@@ -3702,7 +3702,7 @@ var I_CLOSE = svg(
|
|
|
3702
3702
|
var REGION_ICON = `<svg width="15" height="15" viewBox="0 0 15 15" fill="none" aria-hidden="true"><rect x="1.5" y="2.5" width="12" height="10" rx="1.5" stroke="currentColor" stroke-width="1.4" stroke-dasharray="2.4 1.8"/></svg>`;
|
|
3703
3703
|
var NOTE_ICON = `<svg width="15" height="15" viewBox="0 0 15 15" fill="none" aria-hidden="true"><path d="M2 2.5h11v7.5H6l-3 2.5v-2.5H2z" stroke="currentColor" stroke-width="1.3" stroke-linejoin="round"/></svg>`;
|
|
3704
3704
|
var RECORD_ICON = `<svg width="15" height="15" viewBox="0 0 15 15" fill="none" aria-hidden="true"><rect x="1.5" y="2.5" width="12" height="10" rx="1.5" stroke="currentColor" stroke-width="1.4" stroke-dasharray="2.4 1.8"/><circle cx="7.5" cy="7.5" r="2.4" fill="currentColor"/></svg>`;
|
|
3705
|
-
var
|
|
3705
|
+
var CAMERA_ICON = `<svg width="15" height="15" viewBox="0 0 15 15" fill="none" aria-hidden="true"><rect x="1.2" y="3.8" width="9.2" height="7.4" rx="1.6" stroke="currentColor" stroke-width="1.3"/><path d="M10.4 7.3l3.4-2v4.4l-3.4-2z" stroke="currentColor" stroke-width="1.3" stroke-linejoin="round"/></svg>`;
|
|
3706
3706
|
var I_GITHUB = `<svg width="18" height="18" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M8 .2a8 8 0 0 0-2.5 15.6c.4.07.55-.17.55-.38v-1.3c-2.2.48-2.67-1.07-2.67-1.07-.36-.92-.88-1.16-.88-1.16-.72-.5.05-.48.05-.48.8.056 1.22.82 1.22.82.71 1.22 1.87.87 2.33.66.07-.52.28-.87.5-1.07-1.76-.2-3.6-.88-3.6-3.9 0-.86.3-1.57.82-2.12-.08-.2-.36-1 .08-2.1 0 0 .67-.21 2.2.8a7.6 7.6 0 0 1 4 0c1.53-1.02 2.2-.8 2.2-.8.44 1.1.16 1.9.08 2.1.5.55.82 1.26.82 2.12 0 3.03-1.85 3.7-3.61 3.9.28.24.54.72.54 1.46v2.16c0 .21.14.46.55.38A8 8 0 0 0 8 .2z"/></svg>`;
|
|
3707
3707
|
var I_SLACK = `<svg width="18" height="18" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M3.4 10.1a1.6 1.6 0 1 1-1.6-1.6h1.6v1.6zm.8 0a1.6 1.6 0 0 1 3.2 0v4a1.6 1.6 0 1 1-3.2 0v-4zM5.8 3.4a1.6 1.6 0 1 1 1.6-1.6v1.6H5.8zm0 .8a1.6 1.6 0 0 1 0 3.2h-4a1.6 1.6 0 1 1 0-3.2h4zm6.7 1.6a1.6 1.6 0 1 1 1.6 1.6h-1.6V5.8zm-.8 0a1.6 1.6 0 0 1-3.2 0v-4a1.6 1.6 0 1 1 3.2 0v4zm-1.6 6.7a1.6 1.6 0 1 1-1.6 1.6v-1.6h1.6zm0-.8a1.6 1.6 0 0 1 0-3.2h4a1.6 1.6 0 1 1 0 3.2h-4z"/></svg>`;
|
|
3708
3708
|
var I_TELEGRAM = `<svg width="18" height="18" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M8 0a8 8 0 1 0 0 16A8 8 0 0 0 8 0zm3.7 5.4-1.24 5.85c-.09.41-.34.51-.69.32l-1.9-1.4-.92.88c-.1.1-.19.19-.38.19l.14-1.93 3.5-3.17c.15-.13-.03-.2-.24-.07l-4.32 2.72-1.86-.58c-.4-.13-.41-.4.09-.6l7.26-2.8c.34-.12.63.08.52.6z"/></svg>`;
|