pxt-core 9.3.13 → 9.3.15

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.
Files changed (42) hide show
  1. package/README.md +11 -0
  2. package/built/cli.js +7 -2
  3. package/built/pxt.js +57 -3
  4. package/built/pxtblockly.js +97 -57
  5. package/built/pxtblocks.d.ts +59 -21
  6. package/built/pxtblocks.js +97 -57
  7. package/built/pxtlib.d.ts +22 -0
  8. package/built/pxtlib.js +50 -1
  9. package/built/target.js +1 -1
  10. package/built/tests/blocksrunner.js +1 -1
  11. package/built/web/main.js +1 -1
  12. package/built/web/multiplayer/js/{main.78cecdcb.js → main.75ca8c58.js} +2 -2
  13. package/built/web/pxtapp.js +1 -1
  14. package/built/web/pxtasseteditor.js +1 -1
  15. package/built/web/pxtblockly.js +2 -2
  16. package/built/web/pxtblocks.js +1 -1
  17. package/built/web/pxtembed.js +2 -2
  18. package/built/web/pxtlib.js +1 -1
  19. package/built/web/pxtworker.js +1 -1
  20. package/built/web/rtlsemantic.css +1 -1
  21. package/built/web/runnerembed.js +1 -0
  22. package/built/web/semantic.css +1 -1
  23. package/built/web/skillmap/js/{main.8222bb34.js → main.236bd49e.js} +2 -2
  24. package/built/web/teachertool/css/main.e9386f28.css +1 -0
  25. package/built/web/teachertool/js/{main.3a94a341.js → main.8aa6604c.js} +2 -2
  26. package/localtypings/projectheader.d.ts +21 -0
  27. package/{built → localtypings}/pxteditor.d.ts +1095 -1090
  28. package/package.json +1 -1
  29. package/react-common/components/controls/MenuDropdown.tsx +5 -2
  30. package/react-common/components/util.tsx +1 -1
  31. package/theme/pxt.less +1 -0
  32. package/theme/themepacks.less +41 -0
  33. package/webapp/public/embed.js +1 -1
  34. package/webapp/public/multiplayer.html +1 -1
  35. package/webapp/public/skillmap.html +1 -1
  36. package/webapp/public/teachertool.html +1 -3
  37. package/built/pxteditor.js +0 -1834
  38. package/built/pxtrunner.d.ts +0 -151
  39. package/built/pxtrunner.js +0 -2626
  40. package/built/web/pxteditor.js +0 -1
  41. package/built/web/pxtrunner.js +0 -1
  42. package/built/web/teachertool/css/main.59776cd1.css +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pxt-core",
3
- "version": "9.3.13",
3
+ "version": "9.3.15",
4
4
  "description": "Microsoft MakeCode provides Blocks / JavaScript / Python tools and editors",
5
5
  "keywords": [
6
6
  "TypeScript",
@@ -10,12 +10,13 @@ export interface MenuItem extends ButtonProps {
10
10
  }
11
11
 
12
12
  export interface MenuDropdownProps extends ControlProps {
13
- id: string;
13
+ id?: string;
14
14
  items: MenuItem[];
15
15
  label?: string | JSX.Element;
16
16
  title: string;
17
17
  icon?: string;
18
18
  tabIndex?: number;
19
+ disabled?: boolean;
19
20
  }
20
21
 
21
22
  export const MenuDropdown = (props: MenuDropdownProps) => {
@@ -29,7 +30,8 @@ export const MenuDropdown = (props: MenuDropdownProps) => {
29
30
  label,
30
31
  title,
31
32
  icon,
32
- tabIndex
33
+ tabIndex,
34
+ disabled
33
35
  } = props;
34
36
 
35
37
  const [ expanded, setExpanded ] = React.useState(false);
@@ -80,6 +82,7 @@ export const MenuDropdown = (props: MenuDropdownProps) => {
80
82
  ariaControls={expanded ? menuId : undefined}
81
83
  ariaLabel={ariaLabel}
82
84
  ariaHidden={ariaHidden}
85
+ disabled={disabled}
83
86
  />
84
87
  {expanded &&
85
88
  <div role="menu"
@@ -46,7 +46,7 @@ export function fireClickOnEnter(e: React.KeyboardEvent<HTMLElement>) {
46
46
  }
47
47
  }
48
48
 
49
- export function classList(...classes: string[]) {
49
+ export function classList(...classes: (string | undefined)[]) {
50
50
  return classes
51
51
  .filter(c => typeof c === "string")
52
52
  .reduce((prev, c) => prev.concat(c.split(" ")), [] as string[])
package/theme/pxt.less CHANGED
@@ -3,6 +3,7 @@
3
3
  @import 'themes/pxt/globals/site.variables';
4
4
  @import 'pxtsemantic';
5
5
 
6
+ @import 'themepacks'; // defines theme variables used everywhere
6
7
  @import 'common';
7
8
  @import 'common-components';
8
9
  @import 'monaco';
@@ -0,0 +1,41 @@
1
+ /**************************************************************************
2
+ CSS theme variables
3
+ These are overridden by targets and used in: react-common, CRA webapps.
4
+ To add new theme variable:
5
+ 1. Add variable to :root and .high-contrast below
6
+ 2. Set the variable value in each target's theme/themepacks.less
7
+ ***************************************************************************/
8
+
9
+ // TODO: Define the complete set of theme variables we want to support
10
+ :root {
11
+ // Default to a resonable scheme that doesn't closely match any existing target's colors
12
+ /// Page
13
+ --pxt-page-font: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
14
+ --pxt-page-background: white;
15
+ --pxt-page-foreground: black;
16
+ /// Header bar
17
+ --pxt-headerbar-background: #475569;
18
+ --pxt-headerbar-background-glass: #47556940;
19
+ --pxt-headerbar-foreground: white;
20
+ --pxt-headerbar-accent: #475569;
21
+ --pxt-headerbar-accent-smoke: #334155;
22
+ /// Content area
23
+ --pxt-content-background: #C7D2FE;
24
+ --pxt-content-background-glass: #C7D2FE40;
25
+ --pxt-content-foreground: #1E293B;
26
+ --pxt-content-accent: #EEF2FF;
27
+ /// Primary button
28
+ --pxt-button-primary-background: #065F46;
29
+ --pxt-button-primary-background-glass: #065F4640;
30
+ --pxt-button-primary-foreground: white;
31
+ --pxt-button-primary-accent: #065F46;
32
+ /// Secondary button
33
+ --pxt-button-secondary-background: #CBD5E1;
34
+ --pxt-button-secondary-background-glass: #CBD5E140;
35
+ --pxt-button-secondary-foreground: #1E293B;
36
+ --pxt-button-secondary-accent: #334155;
37
+ }
38
+
39
+ .theme-highcontrast {
40
+ // TODO: Fill this in
41
+ }
@@ -27,7 +27,7 @@
27
27
  window.ksRunnerWhenLoaded = function() {
28
28
  pxt.docs.requireHighlightJs = function() { return hljs; }
29
29
  pxt.setupWebConfig(pxtConfig || window.pxtWebConfig)
30
- pxt.runner.initCallbacks = pxtCallbacks
30
+ pxt.runner.setInitCallbacks(pxtCallbacks)
31
31
  pxtCallbacks.push(function() {
32
32
  pxtCallbacks = null
33
33
  })
@@ -9,7 +9,7 @@
9
9
  <link rel="stylesheet" data-rtl="/blb/rtlsemantic.css" href="/blb/semantic.css">
10
10
  <link rel="stylesheet" href="/blb/icons.css">
11
11
  <link rel="stylesheet" href="/blb/react-common-multiplayer.css">
12
- <script defer="defer" src="/blb/multiplayer/js/main.78cecdcb.js"></script><link href="/blb/multiplayer/css/main.2a6ba47d.css" rel="stylesheet"></head>
12
+ <script defer="defer" src="/blb/multiplayer/js/main.75ca8c58.js"></script><link href="/blb/multiplayer/css/main.2a6ba47d.css" rel="stylesheet"></head>
13
13
  <body>
14
14
  <noscript>You need to enable JavaScript to run this app.</noscript>
15
15
 
@@ -7,7 +7,7 @@
7
7
  <link rel="stylesheet" data-rtl="/blb/rtlsemantic.css" href="/blb/semantic.css">
8
8
  <link rel="stylesheet" href="/blb/icons.css">
9
9
  <link rel="stylesheet" href="/blb/react-common-skillmap.css">
10
- <script defer="defer" src="/blb/skillmap/js/main.8222bb34.js"></script><link href="/blb/skillmap/css/main.3c703680.css" rel="stylesheet"></head>
10
+ <script defer="defer" src="/blb/skillmap/js/main.236bd49e.js"></script><link href="/blb/skillmap/css/main.3c703680.css" rel="stylesheet"></head>
11
11
  <body>
12
12
  <noscript>You need to enable JavaScript to run this app.</noscript>
13
13
 
@@ -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.3a94a341.js"></script><link href="/blb/teachertool/css/main.59776cd1.css" rel="stylesheet"></head>
20
+ <script defer="defer" src="/blb/teachertool/js/main.8aa6604c.js"></script><link href="/blb/teachertool/css/main.e9386f28.css" rel="stylesheet"></head>
21
21
  <body>
22
22
  <noscript>You need to enable JavaScript to run this app.</noscript>
23
23
 
@@ -32,7 +32,5 @@
32
32
  <script type="text/javascript" src="/blb/pxtblocks.js"></script>
33
33
 
34
34
  <div id="root"></div>
35
-
36
- <!-- @include footer.html -->
37
35
  </body>
38
36
  </html>