bosia 0.8.7 → 0.8.8
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/package.json
CHANGED
|
@@ -140,7 +140,7 @@ function openForm(loc,el){
|
|
|
140
140
|
closeForm();
|
|
141
141
|
var r=el.getBoundingClientRect();
|
|
142
142
|
form=document.createElement("div");
|
|
143
|
-
form.style.cssText="position:fixed;left:
|
|
143
|
+
form.style.cssText="position:fixed;left:0;top:0;background:#fff;color:#111;border:1px solid #d4d4d8;border-radius:8px;box-shadow:0 8px 24px rgba(0,0,0,.18);padding:10px;width:340px;z-index:2147483647;font:13px ui-sans-serif,system-ui,sans-serif";
|
|
144
144
|
form.innerHTML=
|
|
145
145
|
'<textarea placeholder="Describe a fix (Enter to send, Esc to cancel, empty = open in editor)" style="width:100%;min-height:64px;border:1px solid #e4e4e7;border-radius:4px;padding:6px;font:13px ui-sans-serif,system-ui,sans-serif;resize:vertical;box-sizing:border-box;outline:none"></textarea>'+
|
|
146
146
|
'<div style="margin-top:8px;display:flex;gap:6px;justify-content:flex-end">'+
|
|
@@ -148,6 +148,12 @@ function openForm(loc,el){
|
|
|
148
148
|
'<button data-send style="padding:4px 10px;border:0;background:#111;color:#fff;border-radius:4px;cursor:pointer;font-size:12px">Send</button>'+
|
|
149
149
|
'</div>';
|
|
150
150
|
document.body.appendChild(form);
|
|
151
|
+
var fw=form.offsetWidth,fh=form.offsetHeight;
|
|
152
|
+
var top=r.bottom+6;
|
|
153
|
+
if(top+fh>window.innerHeight)top=r.top-fh-6;
|
|
154
|
+
if(top<8)top=Math.max(8,window.innerHeight-fh-8);
|
|
155
|
+
var left=Math.min(r.left,window.innerWidth-fw-8);if(left<8)left=8;
|
|
156
|
+
form.style.left=left+"px";form.style.top=top+"px";
|
|
151
157
|
var ta=form.querySelector("textarea");
|
|
152
158
|
ta.focus();
|
|
153
159
|
function submit(){
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"dev": "bosia dev",
|
|
7
7
|
"build": "bosia build",
|
|
8
8
|
"start": "bosia start",
|
|
9
|
-
"check": "tsc --noEmit && prettier --check .",
|
|
9
|
+
"check": "bosia sync && tsc --noEmit && prettier --check .",
|
|
10
10
|
"format": "prettier --write .",
|
|
11
11
|
"format:check": "prettier --check ."
|
|
12
12
|
},
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"dev": "bosia dev",
|
|
7
7
|
"build": "bosia build",
|
|
8
8
|
"start": "bosia start",
|
|
9
|
-
"check": "tsc --noEmit && prettier --check .",
|
|
9
|
+
"check": "bosia sync && tsc --noEmit && prettier --check .",
|
|
10
10
|
"format": "prettier --write .",
|
|
11
11
|
"format:check": "prettier --check ."
|
|
12
12
|
},
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"dev": "bosia dev",
|
|
7
7
|
"build": "bosia build",
|
|
8
8
|
"start": "bosia start",
|
|
9
|
-
"check": "tsc --noEmit && prettier --check .",
|
|
9
|
+
"check": "bosia sync && tsc --noEmit && prettier --check .",
|
|
10
10
|
"format": "prettier --write .",
|
|
11
11
|
"format:check": "prettier --check ."
|
|
12
12
|
},
|