pxt-core 9.1.13 → 9.1.14

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.
@@ -80,6 +80,7 @@
80
80
  * [Sharing projects](/share)
81
81
  * [Offline support](/offline)
82
82
  * [Save](/save)
83
+ * [Home page content](/homepage-content)
83
84
 
84
85
  ## Developers #devs
85
86
 
@@ -0,0 +1,57 @@
1
+ # Adding content to the home page
2
+
3
+ The Editor home page contains galleries of card links to projects, tutorials, lessons, videos, and other content sources. Many content items featured on the home page are hosted at the editor's website while some other items are from external sources.
4
+
5
+ Much of content available on the home page is developed or selected by the MakeCode Team. Content from other contributors is welcomed though and can be featured in the home page galleries.
6
+
7
+ ## #target-homescreen
8
+
9
+ ## Content requirements
10
+
11
+ * Your content should be open source and free to use without any restrictions other than author attribution (you may specify an open source license the provides for such usage if you wish).
12
+ * The instructions should be well written and easy to follow.
13
+ * It should not include any personally identifiable information beyond the author's name (authors can remain anonymous too).
14
+ * Content will be reviewed and approved by the MakeCode Team.
15
+
16
+ ## What you need to submit
17
+
18
+ To list a content item on the home page, you need to provide:
19
+
20
+ 1. A name or title for the content item.
21
+ 2. A brief one or two sentence description of what your content is or does (preferably in English for localization and is 30 words or less).
22
+ 3. A thumbnail image that represents your content. Size the image to approximately **300 x 200** pixels.
23
+ 4. A full URL for the item. For a tutorial, a complete tutorial URL is needed (see https://makecode.com/writing-docs/user-tutorials for more details).
24
+
25
+ ## #target-link-example
26
+
27
+ ## Submission process
28
+
29
+ Create and submit a [GitHub issue](@githubUrl@/issues) requesting your content to be listed. In the issue description, include the name or title of the content item, description, content URL, and copy in the thumbnail image. GitHub will automatically create an image URL for your thumbnail when you paste or drag your image in. Your issue description will look something like this when you write it:
30
+
31
+ ```
32
+ Request to include a user content source on the editor home page. The content is a simple tutorial on how the create exploding sprites in Arcade.
33
+
34
+ ## Home page link info
35
+
36
+ ### Name
37
+
38
+ Exploding Sprites
39
+
40
+ ### Description
41
+
42
+ Learn how to create moving sprites that randomly explode!
43
+
44
+ ### Content Link
45
+
46
+ https://arcade.makecode.com/#tutorial:https://makecode.com/_rewr9iop
47
+
48
+ ### Thumbnail
49
+
50
+ ![image](https://github.com/microsoft/pxt/assets/27789908/f5c21294-1145-4010-8de0-560b8afbfeec)
51
+ ```
52
+
53
+ ## #target-approval
54
+
55
+ ## Featured content
56
+
57
+ To request featured space in the Home Page banner carousel, the requirements are similar to gallery items except for the image size. We require a link, a short description, and a "Hero" image that is **2100 x 500** pixels. Please note that banner space is very limited and approval for items included there is very selective.
@@ -12,6 +12,7 @@
12
12
  disableAjaxTracking: true,
13
13
  overridePageViewDuration: false,
14
14
  disableExceptionTracking: true,
15
+ disableCorrelationHeaders: true,
15
16
  disableCookiesUsage: !isProduction,
16
17
  isStorageUseDisabled: !isProduction,
17
18
  url: "/blb/ai.2.min.js"
@@ -64,6 +64,7 @@
64
64
  disableAjaxTracking: true,
65
65
  overridePageViewDuration: false,
66
66
  disableExceptionTracking: true,
67
+ disableCorrelationHeaders: true,
67
68
  disableCookiesUsage: !isProduction,
68
69
  isStorageUseDisabled: !isProduction,
69
70
  url: "/doccdn/ai.2.min.js"
@@ -551,6 +551,7 @@ declare namespace pxt {
551
551
  usedBlocks: Map<number>;
552
552
  snippetBlocks: Map<Map<number>>;
553
553
  highlightBlocks: Map<Map<number>>;
554
+ validateBlocks: Map<Map<string[]>>;
554
555
  }
555
556
 
556
557
  interface PackageApiInfo {
@@ -1181,6 +1182,7 @@ declare namespace pxt.tutorial {
1181
1182
 
1182
1183
  interface CodeValidatorBaseProperties {
1183
1184
  enabled?: string;
1185
+ markers?: string;
1184
1186
  }
1185
1187
 
1186
1188
  interface CodeValidatorMetadata {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pxt-core",
3
- "version": "9.1.13",
3
+ "version": "9.1.14",
4
4
  "description": "Microsoft MakeCode provides Blocks / JavaScript / Python tools and editors",
5
5
  "keywords": [
6
6
  "TypeScript",
package/theme/common.less CHANGED
@@ -1502,17 +1502,7 @@ p.ui.font.small {
1502
1502
 
1503
1503
  #root.headless.collapsedEditorTools {
1504
1504
  #simulator .editor-sidebar {
1505
- position: absolute;
1506
- width: auto;
1507
- top: auto;
1508
- left: 5rem;
1509
- background: none transparent;
1510
- min-width: inherit;
1511
- max-width: inherit;
1512
-
1513
- .simulator-container {
1514
- display: none;
1515
- }
1505
+ display: none;
1516
1506
  }
1517
1507
 
1518
1508
  #boardview, .filemenu {
@@ -514,6 +514,11 @@
514
514
 
515
515
  #root.headless.tabTutorial {
516
516
  #simulator .editor-sidebar {
517
+ display: block;
518
+ position: absolute;
519
+ background: none transparent;
520
+ min-width: inherit;
521
+ max-width: inherit;
517
522
  width: @simulatorWidth;
518
523
  height: calc(~'100%' - @mainMenuHeight);
519
524
  top: @mainMenuHeight;
@@ -2,25 +2,30 @@
2
2
  <html lang="en">
3
3
  <head>
4
4
  <meta charset="utf-8"/>
5
- <!-- <link rel="icon" href="kiosk-data/favicon.ico" /> -->
5
+ <!-- <link rel="icon" href="/kiosk-data/favicon.ico" /> -->
6
6
  <meta name="viewport" content="width=device-width,initial-scale=1"/>
7
7
  <meta name="theme-color" content="#000000"/>
8
8
  <meta name="description" content="MakeCode Arcade Kiosk mode. Showcase games made on Microsoft MakeCode Arcade in a carousel list."/>
9
- <!-- <link rel="apple-touch-icon" href="kiosk-data/logo192.png" /> -->
9
+ <!-- <link rel="apple-touch-icon" href="/kiosk-data/logo192.png" /> -->
10
10
  <!--
11
11
  manifest.json provides metadata used when your web app is installed on a
12
12
  user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
13
13
  -->
14
- <link rel="manifest" href="kiosk-data/manifest.json"/>
15
-
14
+ <link rel="manifest" href="/kiosk-data/manifest.json"/>
16
15
  <title>MakeCode Arcade Kiosk</title>
17
- <script defer="defer" src="/blb/kiosk/js/main.da4701d5.js"></script><link href="/blb/kiosk/css/main.afbeaf95.css" rel="stylesheet"></head>
16
+ <script>var pxtConfig=null</script>
17
+ <script defer="defer" src="/blb/kiosk/js/main.82215ab6.js"></script><link href="/blb/kiosk/css/main.afbeaf95.css" rel="stylesheet"></head>
18
18
  <body>
19
19
  <noscript>You need to enable JavaScript to run this app.</noscript>
20
20
 
21
21
  <!-- @include tracking.html -->
22
22
  <!-- @include tickevent.html -->
23
23
 
24
+ <!-- target.js is generated by the CLI -->
25
+ <script type="text/javascript" src="/blb/target.js"></script>
26
+ <script type="text/javascript" src="/blb/pxtlib.js"></script>
27
+ <script type="text/javascript" src="/blb/pxtsim.js"></script>
28
+
24
29
  <div class="content">
25
30
  <div id="root"></div>
26
31
  </div>
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkmakecode_arcade_kiosk=self.webpackChunkmakecode_arcade_kiosk||[]).push([[27],{27:function(e,t,n){n.r(t),n.d(t,{getCLS:function(){return y},getFCP:function(){return g},getFID:function(){return F},getLCP:function(){return P},getTTFB:function(){return D}});var i,r,a,o,u=function(e,t){return{name:e,value:void 0===t?-1:t,delta:0,entries:[],id:"v2-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)}},c=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){if("first-input"===e&&!("PerformanceEventTiming"in self))return;var n=new PerformanceObserver((function(e){return e.getEntries().map(t)}));return n.observe({type:e,buffered:!0}),n}}catch(e){}},f=function(e,t){var n=function n(i){"pagehide"!==i.type&&"hidden"!==document.visibilityState||(e(i),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},s=function(e){addEventListener("pageshow",(function(t){t.persisted&&e(t)}),!0)},m=function(e,t,n){var i;return function(r){t.value>=0&&(r||n)&&(t.delta=t.value-(i||0),(t.delta||void 0===i)&&(i=t.value,e(t)))}},v=-1,d=function(){return"hidden"===document.visibilityState?0:1/0},p=function(){f((function(e){var t=e.timeStamp;v=t}),!0)},l=function(){return v<0&&(v=d(),p(),s((function(){setTimeout((function(){v=d(),p()}),0)}))),{get firstHiddenTime(){return v}}},g=function(e,t){var n,i=l(),r=u("FCP"),a=function(e){"first-contentful-paint"===e.name&&(f&&f.disconnect(),e.startTime<i.firstHiddenTime&&(r.value=e.startTime,r.entries.push(e),n(!0)))},o=window.performance&&performance.getEntriesByName&&performance.getEntriesByName("first-contentful-paint")[0],f=o?null:c("paint",a);(o||f)&&(n=m(e,r,t),o&&a(o),s((function(i){r=u("FCP"),n=m(e,r,t),requestAnimationFrame((function(){requestAnimationFrame((function(){r.value=performance.now()-i.timeStamp,n(!0)}))}))})))},h=!1,T=-1,y=function(e,t){h||(g((function(e){T=e.value})),h=!0);var n,i=function(t){T>-1&&e(t)},r=u("CLS",0),a=0,o=[],v=function(e){if(!e.hadRecentInput){var t=o[0],i=o[o.length-1];a&&e.startTime-i.startTime<1e3&&e.startTime-t.startTime<5e3?(a+=e.value,o.push(e)):(a=e.value,o=[e]),a>r.value&&(r.value=a,r.entries=o,n())}},d=c("layout-shift",v);d&&(n=m(i,r,t),f((function(){d.takeRecords().map(v),n(!0)})),s((function(){a=0,T=-1,r=u("CLS",0),n=m(i,r,t)})))},E={passive:!0,capture:!0},w=new Date,L=function(e,t){i||(i=t,r=e,a=new Date,b(removeEventListener),S())},S=function(){if(r>=0&&r<a-w){var e={entryType:"first-input",name:i.type,target:i.target,cancelable:i.cancelable,startTime:i.timeStamp,processingStart:i.timeStamp+r};o.forEach((function(t){t(e)})),o=[]}},k=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){L(e,t),r()},i=function(){r()},r=function(){removeEventListener("pointerup",n,E),removeEventListener("pointercancel",i,E)};addEventListener("pointerup",n,E),addEventListener("pointercancel",i,E)}(t,e):L(t,e)}},b=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,k,E)}))},F=function(e,t){var n,a=l(),v=u("FID"),d=function(e){e.startTime<a.firstHiddenTime&&(v.value=e.processingStart-e.startTime,v.entries.push(e),n(!0))},p=c("first-input",d);n=m(e,v,t),p&&f((function(){p.takeRecords().map(d),p.disconnect()}),!0),p&&s((function(){var a;v=u("FID"),n=m(e,v,t),o=[],r=-1,i=null,b(addEventListener),a=d,o.push(a),S()}))},C={},P=function(e,t){var n,i=l(),r=u("LCP"),a=function(e){var t=e.startTime;t<i.firstHiddenTime&&(r.value=t,r.entries.push(e),n())},o=c("largest-contentful-paint",a);if(o){n=m(e,r,t);var v=function(){C[r.id]||(o.takeRecords().map(a),o.disconnect(),C[r.id]=!0,n(!0))};["keydown","click"].forEach((function(e){addEventListener(e,v,{once:!0,capture:!0})})),f(v,!0),s((function(i){r=u("LCP"),n=m(e,r,t),requestAnimationFrame((function(){requestAnimationFrame((function(){r.value=performance.now()-i.timeStamp,C[r.id]=!0,n(!0)}))}))}))}},D=function(e){var t,n=u("TTFB");t=function(){try{var t=performance.getEntriesByType("navigation")[0]||function(){var e=performance.timing,t={entryType:"navigation",startTime:0};for(var n in e)"navigationStart"!==n&&"toJSON"!==n&&(t[n]=Math.max(e[n]-e.navigationStart,0));return t}();if(n.value=n.delta=t.responseStart,n.value<0||n.value>performance.now())return;n.entries=[t],e(n)}catch(e){}},"complete"===document.readyState?setTimeout(t,0):addEventListener("load",(function(){return setTimeout(t,0)}))}}}]);