pxt-core 9.3.9 → 9.3.11

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.
@@ -173,7 +173,7 @@ In code, you use _radians_ for angle measures. All of the math functions for tri
173
173
  ### ~hint
174
174
  **Changing degrees to radians**
175
175
 
176
- What's 60 degrees in radians? Well, one radian is _(2 \* Math.PI / 360)_ radians. Or, to make it
176
+ What's 60 degrees in radians? Well, one degree is _(2 \* Math.PI / 360)_ radians. Or, to make it
177
177
  simple, _(Math.PI / 180)_ radians. So, 60 degrees is _(60 \* Math.PI / 180)_ radians.
178
178
  ### ~
179
179
 
@@ -106,14 +106,21 @@ namespace pxt {
106
106
  }
107
107
  }
108
108
  export function report(filter: string = null) {
109
+ perfReportLogged = true;
110
+
109
111
  if (enabled) {
112
+ const milestones: {[index: string]: number} = {};
113
+ const durations: {[index: string]: number} = {};
114
+
110
115
  let report = `performance report:\n`
111
116
  for (let [msg, time] of stats.milestones) {
112
117
  if (!filter || msg.indexOf(filter) >= 0) {
113
118
  let pretty = prettyStr(time)
114
119
  report += `\t\t${msg} @ ${pretty}\n`
120
+ milestones[msg] = time;
115
121
  }
116
122
  }
123
+
117
124
  report += `\n`
118
125
  for (let [msg, start, duration] of stats.durations) {
119
126
  let filterIncl = filter && msg.indexOf(filter) >= 0
@@ -125,10 +132,12 @@ namespace pxt {
125
132
  }
126
133
  report += `\n`
127
134
  }
135
+ durations[msg] = duration;
128
136
  }
129
137
  console.log(report)
138
+ return { milestones, durations };
130
139
  }
131
- perfReportLogged = true
140
+ return undefined;
132
141
  }
133
142
  (function () {
134
143
  init()
@@ -494,6 +494,8 @@ declare namespace pxt {
494
494
  timeMachine?: boolean; // Save/restore old versions of a project experiment
495
495
  blocklySoundVolume?: number; // A number between 0 and 1 that sets the volume for blockly sounds (e.g. connect, disconnect, click)
496
496
  timeMachineQueryParams?: string[]; // An array of query params to pass to timemachine iframe embed
497
+ timeMachineDiffInterval?: number; // An interval in milliseconds at which to take diffs to store in project history. Defaults to 5 minutes
498
+ timeMachineSnapshotInterval?: number; // An interval in milliseconds at which to take full project snapshots in project history. Defaults to 15 minutes
497
499
  }
498
500
 
499
501
  interface DownloadDialogTheme {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pxt-core",
3
- "version": "9.3.9",
3
+ "version": "9.3.11",
4
4
  "description": "Microsoft MakeCode provides Blocks / JavaScript / Python tools and editors",
5
5
  "keywords": [
6
6
  "TypeScript",
@@ -166,6 +166,6 @@
166
166
  "test:lang": "gulp testlang",
167
167
  "update": "gulp update",
168
168
  "watch-streamer": "cd docs/static/streamer && tsc -t es6 --watch",
169
- "prepare": "cd skillmap && npm install && cd .. && cd authcode && npm install && cd .. && cd multiplayer && npm install && cd .. && cd kiosk && npm install && cd .. && cd teachertool && npm install && cd .."
169
+ "prepare": "bash scripts/npm-prepare.sh"
170
170
  }
171
171
  }
@@ -17,7 +17,7 @@
17
17
  <link rel="manifest" href="/teachertool-data/manifest.json"/>
18
18
  <title>MakeCode Teacher Tool</title>
19
19
  <script>var pxtConfig=null</script>
20
- <script defer="defer" src="/blb/teachertool/js/main.e5ff478b.js"></script><link href="/blb/teachertool/css/main.a04db2f1.css" rel="stylesheet"></head>
20
+ <script defer="defer" src="/blb/teachertool/js/main.f103809d.js"></script><link href="/blb/teachertool/css/main.59776cd1.css" rel="stylesheet"></head>
21
21
  <body>
22
22
  <noscript>You need to enable JavaScript to run this app.</noscript>
23
23
 
@@ -28,6 +28,8 @@
28
28
  <script type="text/javascript" src="/blb/target.js"></script>
29
29
  <script type="text/javascript" src="/blb/pxtlib.js"></script>
30
30
  <script type="text/javascript" src="/blb/pxtsim.js"></script>
31
+ <script type="text/javascript" src="/blb/pxtblockly.js"></script>
32
+ <script type="text/javascript" src="/blb/pxtblocks.js"></script>
31
33
 
32
34
  <div id="root"></div>
33
35
 
@@ -1 +0,0 @@
1
- :root{--black:#000;--white:#fff;--primary-color:#aa278f;--secondary-color:#eac6eb;--tertiary-color:#850a6b;--hover-color:var(--secondary-color);--active-color:var(--tertiary-color);--inactive-color:var(--secondary-color);--inactive-hover-color:#6e6e6e;--invert-active-color:#fff;--invert-hover-text-color:#850a6b;--body-background-color:#f9f9f9;--default-card-color:#ccc;--card-hover-color:#bfbfbf;--card-border-color:#e9eef2;--dropdown-hover-color:#ccc;--inverted-text-color:var(--white);--subtitle-text-color:#6e6e6e;--header-height:4rem;--header-padding-top:1rem;--body-font-family:"Share Tech Mono",Monaco,Menlo,"Ubuntu Mono",Consolas,source-code-pro,monospace;--feature-text-font:Segoe UI,Tahoma,Geneva,Verdana;--frame-loader-zindex:30;--above-frame-zindex:50;--modal-dimmer-zindex:100;--fullscreen-modal-zindex:90;--graph-backround-zindex:10;--above-graph-zindex:20;--high-contrast-text:var(--white);--high-contrast-background:var(--black);--high-contrast-highlight:#ff0;--high-contrast-focus-outline:2px solid var(--high-contrast-highlight);--high-contrast-hyperlink:#807fff}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-color:#f9f9f9;background-color:var(--body-background-color);font-family:Share Tech Mono,Monaco,Menlo,Ubuntu Mono,Consolas,source-code-pro,monospace;font-family:var(--body-font-family);margin:0;overflow:hidden;position:relative}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}#root{width:100%}#root,#root.editor{height:100%}#root>div,.app-container{height:100%;width:100%}.app-container{display:flex;flex-direction:column}.noclick{cursor:default;pointer-events:none}.header{align-items:center;background-color:#850a6b;background-color:var(--tertiary-color);color:#fff;color:var(--inverted-text-color);display:flex;flex-grow:0;flex-shrink:0;height:4rem;height:var(--header-height);justify-content:space-between;max-height:4rem;max-height:var(--header-height);z-index:50;z-index:var(--above-frame-zindex)}.header-left,.header-right{align-items:center;display:flex;height:100%}.header-logo{display:flex}.header .brand{display:flex;font-size:1.5rem;-webkit-user-select:none;user-select:none}.header .brand:before{border-left:2px solid #fff;content:" ";height:1.5rem;position:relative}.ui.item.logo .name{margin-bottom:1px;margin-left:1rem}.header-logo img{height:1.4rem;margin:0 1rem}.user-menu{height:100%}.user-menu .header-button.sign-in{align-items:center;background-color:#f9f9f9;background-color:var(--body-background-color);border-radius:6px;color:#393939;flex-direction:row-reverse;font-family:Segoe UI,Tahoma,Geneva,Verdana;font-family:var(--feature-text-font);font-weight:500;height:80%;margin:.5rem 1rem .5rem .5rem;padding:.6rem}.user-menu .header-dropdown{cursor:pointer;height:inherit;width:3.5rem}.user-menu .avatar,.user-menu .header-dropdown{align-items:center;display:flex;justify-content:center}.user-menu .avatar{height:100%}.user-menu .avatar img{border:2px solid #fff;border-radius:100%;height:2.5rem;width:2.5rem}.header-org-logo{height:2rem;margin-left:1rem}.header-org-logo img{height:100%}.header-org-logo .header-org-logo-small{display:none}.header i{cursor:pointer;line-height:2rem}.header-dropdown i,.header-dropdown img,.header-dropdown span{align-items:center;display:flex;font-size:1.6rem;height:4rem;height:var(--header-height);justify-content:center;margin:0;width:3.5rem}.header-button{color:#fff;color:var(--invert-active-color);cursor:pointer;flex:1 1;font-size:1.2rem;font-size:1.6rem;height:100%;padding:1rem .5rem;padding:var(--header-padding-top) .5rem;text-align:center;-webkit-user-select:none;user-select:none;white-space:nowrap}.header-button.with-label{display:flex;flex-grow:3}.header-button.icon-only{font-size:inherit;padding:1rem .5rem;padding:var(--header-padding-top) .5rem}.header-button .header-button-label{font-size:1rem;line-height:2rem;margin-right:.4rem;white-space:nowrap}.header-button:hover,.header-dropdown:hover{background-color:rgba(0,0,0,.1)}.header-button:hover>i,.header-dropdown:hover>i{-webkit-transform:scale(1.2);transform:scale(1.2)}.header-button.sign-in:hover{-webkit-transform:scale(1.1);transform:scale(1.1)}.header-button.sign-in:hover>i,.header-button.sign-in:hover>span{-webkit-transform:none;transform:none}.header-activity-display-name{flex-shrink:10;font-size:1.2rem;font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.avatar-initials{align-items:center;background-color:#028b9b;border:2px solid #fff;border-radius:100%;display:flex;font-size:16px;height:2.5rem;justify-content:center;width:2.5rem}.header-dropdown.user-dropdown .dropdown-menu{top:4rem;top:var(--header-height)}.usabilla_live_button_container{bottom:14rem!important;top:auto!important}#msccBanner{display:none}.high-contrast .header{background-color:#000;background-color:var(--high-contrast-background);border-bottom:2px solid #fff;border-bottom:2px solid var(--high-contrast-text)}.high-contrast .header-dropdown i{height:calc(4rem - 2px);height:calc(var(--header-height) - 2px)}.high-contrast .avatar-initials{background-color:#000;background-color:var(--high-contrast-background)}.high-contrast a{color:#807fff;color:var(--high-contrast-hyperlink);text-decoration:underline}.high-contrast a:hover{outline:2px solid #ff0;outline:var(--high-contrast-focus-outline)}.notification-container{align-items:baseline;bottom:0;display:flex;justify-content:right;left:0;pointer-events:none;position:fixed;right:2%;top:85%;z-index:1000}.notification-contents{background-color:#eac6eb;background-color:var(--secondary-color);border:4px solid #aa278f;border:4px solid var(--primary-color);border-radius:.285rem;margin-right:1rem;overflow:hidden;padding:0 1rem;pointer-events:none;position:fixed}@media only screen and (max-height:44rem) and (min-width:767px){:root{--header-height:3rem;--header-padding-top:.5rem}.header-button.with-label{flex-grow:1}.user-menu .header-button.sign-in{margin-top:.4rem;padding:.2rem .8rem}}@media only screen and (max-width:767px){.header-org-logo .header-org-logo-large{display:none}.header-org-logo .header-org-logo-small{display:block}.user-menu .header-button.sign-in{padding-left:.6rem}.user-menu .header-button.sign-in .header-button-label{display:none}}