pxt-core 7.5.53 → 8.0.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/built/pxt.js +8 -3
- package/built/pxtblockly.js +21 -2
- package/built/pxtblocks.js +21 -2
- package/built/pxtlib.d.ts +1 -0
- package/built/pxtsim.js +8 -3
- package/built/target.js +1 -1
- package/built/web/main.js +1 -1
- package/built/web/pxtapp.js +1 -1
- package/built/web/pxtblockly.js +1 -1
- package/built/web/pxtblocks.js +1 -1
- package/built/web/pxtembed.js +1 -1
- package/built/web/pxtsim.js +1 -1
- package/built/web/react-common-authcode.css +22 -0
- package/built/web/react-common-skillmap.css +1 -1
- package/built/web/rtlreact-common-skillmap.css +1 -1
- package/built/web/rtlsemantic.css +1 -1
- package/built/web/semantic.css +1 -1
- package/docfiles/script.html +1 -1
- package/package.json +1 -1
- package/react-common/components/share/ShareInfo.tsx +22 -1
- package/react-common/styles/controls/Button.less +5 -0
- package/react-common/styles/controls/Modal.less +7 -1
- package/react-common/styles/react-common-breakpoints.less +17 -0
package/docfiles/script.html
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
|
|
44
44
|
<div class="ui main container mainbody script-content">
|
|
45
45
|
<iframe id="embed-frame" class="script-embed" src="/@versionsuff@#sandbox:@id@"
|
|
46
|
-
sandbox="allow-popups allow-forms allow-scripts allow-same-origin" frameborder="0"></iframe>
|
|
46
|
+
sandbox="allow-popups allow-forms allow-scripts allow-same-origin allow-downloads" frameborder="0"></iframe>
|
|
47
47
|
<div class="script-bookend">
|
|
48
48
|
<div id="abuse-message" class="ui tiny blue message">
|
|
49
49
|
<div class="ui grid padded">
|
package/package.json
CHANGED
|
@@ -89,6 +89,21 @@ export const ShareInfo = (props: ShareInfoProps) => {
|
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
const handleDeviceShareClick = async () => {
|
|
93
|
+
pxt.tickEvent("share.device");
|
|
94
|
+
|
|
95
|
+
const shareOpts = {
|
|
96
|
+
title: document.title,
|
|
97
|
+
url: shareData.url,
|
|
98
|
+
text: lf("Check out my new MakeCode project!"),
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
// TODO: Fix this; typing for navigator not included in the lib typing we use in tsconfig
|
|
102
|
+
if ((navigator as any)?.canShare?.(shareOpts)) {
|
|
103
|
+
return navigator.share(shareOpts);
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
|
|
92
107
|
const embedOptions = [{
|
|
93
108
|
name: "code",
|
|
94
109
|
label: lf("Code"),
|
|
@@ -197,7 +212,7 @@ export const ShareInfo = (props: ShareInfoProps) => {
|
|
|
197
212
|
onBlur={handleCopyBlur} />
|
|
198
213
|
</div>
|
|
199
214
|
<div className="project-share-actions">
|
|
200
|
-
<Button className="circle-button gray"
|
|
215
|
+
<Button className="circle-button gray embed mobile-portrait-hidden"
|
|
201
216
|
title={lf("Show embed code")}
|
|
202
217
|
leftIcon="fas fa-code"
|
|
203
218
|
onClick={handleEmbedClick} />
|
|
@@ -209,6 +224,12 @@ export const ShareInfo = (props: ShareInfoProps) => {
|
|
|
209
224
|
url={shareData?.url}
|
|
210
225
|
type='twitter'
|
|
211
226
|
heading={lf("Share on Twitter")} />
|
|
227
|
+
{navigator.share && <Button className="circle-button device-share"
|
|
228
|
+
title={lf("Show device share options")}
|
|
229
|
+
ariaLabel={lf("Show device share options")}
|
|
230
|
+
leftIcon={"icon share"}
|
|
231
|
+
onClick={handleDeviceShareClick}
|
|
232
|
+
/>}
|
|
212
233
|
<Button
|
|
213
234
|
className="menu-button project-qrcode"
|
|
214
235
|
buttonRef={handleQRCodeButtonRef}
|
|
@@ -268,6 +268,11 @@
|
|
|
268
268
|
color: @buttonTextColorDarkBackground;
|
|
269
269
|
}
|
|
270
270
|
|
|
271
|
+
.common-button.device-share {
|
|
272
|
+
background: #333333;
|
|
273
|
+
color: @buttonTextColorDarkBackground;
|
|
274
|
+
}
|
|
275
|
+
|
|
271
276
|
/****************************************************
|
|
272
277
|
* High Contrast *
|
|
273
278
|
****************************************************/
|
|
@@ -24,6 +24,12 @@
|
|
|
24
24
|
overflow: hidden;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
@media @mobileAndBelow {
|
|
28
|
+
.common-modal {
|
|
29
|
+
width: 95%;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
27
33
|
.common-modal-header {
|
|
28
34
|
background-color: @modalHeaderBackgroundColor;
|
|
29
35
|
|
|
@@ -142,4 +148,4 @@
|
|
|
142
148
|
.common-modal {
|
|
143
149
|
border: 1px solid @highContrastTextColor;
|
|
144
150
|
}
|
|
145
|
-
}
|
|
151
|
+
}
|
|
@@ -4,16 +4,33 @@
|
|
|
4
4
|
@largeMonitorBreakpoint: 1200px;
|
|
5
5
|
@widescreenMonitorBreakpoint: 1920px;
|
|
6
6
|
|
|
7
|
+
@largestMobilePortraitScreen: (@mobileBreakpoint + 100px);
|
|
7
8
|
@largestMobileScreen: (@tabletBreakpoint - 1px);
|
|
8
9
|
@largestTabletScreen: (@computerBreakpoint - 1px);
|
|
9
10
|
@largestSmallMonitor: (@largeMonitorBreakpoint - 1px);
|
|
10
11
|
@largestLargeMonitor: (@widescreenMonitorBreakpoint - 1px);
|
|
11
12
|
|
|
13
|
+
@portraitMobileAndBelow: ~"only screen and (max-width: @{largestMobilePortraitScreen})";
|
|
12
14
|
@mobileAndBelow: ~"only screen and (max-width: @{largestMobileScreen})";
|
|
13
15
|
@tabletAndBelow: ~"only screen and (max-width: @{largestTabletScreen})";
|
|
14
16
|
@computerAndBelow: ~"only screen and (max-width: @{largestSmallMonitor})";
|
|
15
17
|
@largeMonitorAndBelow: ~"only screen and (max-width: @{largestLargeMonitor})";
|
|
16
18
|
|
|
19
|
+
/****************************************************
|
|
20
|
+
* Mobile Portrait *
|
|
21
|
+
****************************************************/
|
|
22
|
+
|
|
23
|
+
@media only screen and (min-width: @portraitMobileAndBelow) {
|
|
24
|
+
.mobile-portrait-only {
|
|
25
|
+
display: none !important;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@media @mobileAndBelow {
|
|
30
|
+
.mobile-portrait-hidden {
|
|
31
|
+
display: none !important;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
17
34
|
|
|
18
35
|
/****************************************************
|
|
19
36
|
* Mobile *
|