pxt-core 13.2.1 → 13.2.3
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/README.md +1 -1
- package/built/pxt.js +646 -137
- package/built/pxtcompiler.d.ts +19 -1
- package/built/pxtcompiler.js +519 -64
- package/built/pxtlib.d.ts +1 -1
- package/built/pxtlib.js +127 -73
- package/built/react-common/components/controls/DropdownModal.d.ts +6 -0
- package/built/react-common/components/controls/Input.d.ts +1 -1
- package/built/target.js +1 -1
- package/built/targetlight.js +1 -1
- package/built/tests/thumb-test/asmchecks.d.ts +73 -0
- package/built/tests/thumb-test/thumbrunner.d.ts +3 -0
- package/built/web/main.js +30 -30
- package/built/web/pxtapp.js +1 -1
- package/built/web/pxtasseteditor.js +20 -20
- package/built/web/pxtcompiler.js +1 -1
- package/built/web/pxtembed.js +4 -4
- package/built/web/pxtlib.js +1 -1
- package/built/web/pxtworker.js +1 -1
- package/built/web/react-common-authcode.css +1 -1
- package/built/web/react-common-multiplayer.css +1 -1
- package/built/web/react-common-skillmap.css +1 -1
- package/built/web/rtlreact-common-authcode.css +1 -1
- package/built/web/rtlreact-common-multiplayer.css +1 -1
- package/built/web/rtlreact-common-skillmap.css +1 -1
- package/built/web/rtlsemantic.css +2 -2
- package/built/web/runnerembed.js +5 -5
- package/built/web/semantic.css +2 -2
- package/common-docs/blocks-embed.md +2 -2
- package/common-docs/github/commit.md +1 -1
- package/common-docs/github/private-assignments.md +1 -1
- package/common-docs/github/test-extension.md +1 -1
- package/common-docs/online-learning.md +2 -2
- package/common-docs/reference/arrays/pick-random.md +1 -1
- package/common-docs/reference/text/char-code-at.md +1 -1
- package/common-docs/share.md +2 -2
- package/common-docs/types/function/define.md +1 -1
- package/localtypings/pxtarget.d.ts +3 -1
- package/package.json +3 -2
- package/react-common/components/controls/DropdownModal.tsx +66 -0
- package/react-common/components/controls/Input.tsx +1 -1
- package/react-common/styles/controls/DropdownModal.less +17 -0
- package/react-common/styles/react-common.less +1 -0
- package/react-common/styles/theming/ThemePickerModal.less +5 -0
- package/theme/monaco.less +2 -0
- package/theme/music-editor/gallery.less +10 -1
- package/theme/piano-roll/piano-roll.less +33 -2
- package/theme/pxtjson.less +0 -12
package/built/targetlight.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var pxtTargetBundle = {"id":"core","name":"Microsoft MakeCode","title":"Microsoft MakeCode","description":"A toolkit to build JavaScript Blocks editors.","compile":{"hasHex":false,"jsRefCounting":false,"switches":{},"noSourceInFlash":true,"utf8":true},"uploadDocs":true,"versions":{"branch":"master","tag":"v13.2.1","commits":"https://github.com/microsoft/pxt/commits/c40f412dc5bebb915a5891cd62fe956e198fb194","target":"13.2.1","pxt":"13.2.1"},"blocksprj":{"id":"blocksprj","config":{"name":"empty","description":"An empty project for docs rendering","dependencies":{},"files":["main.ts","pxt-core.d.ts","pxt-helpers.ts"],"public":true,"additionalFilePaths":[]},"files":{"main.ts":"\n"}},"tsprj":{"id":"tsprj","config":{"name":"empty","description":"An empty project for docs rendering","dependencies":{},"files":["main.ts","pxt-core.d.ts","pxt-helpers.ts"],"public":true,"additionalFilePaths":[]},"files":{"main.ts":"\n"}},"colorThemeMap":{"pxt-high-contrast":{"id":"pxt-high-contrast","name":"High Contrast","weight":100,"monacoBaseTheme":"hc-black","colors":{"pxt-header-background":"#000000","pxt-header-foreground":"#FFFFFF","pxt-header-background-hover":"#000000","pxt-header-foreground-hover":"#FFFFFF","pxt-header-stencil":"#FFFFFF","pxt-primary-background":"#000000","pxt-primary-foreground":"#FFFFFF","pxt-primary-background-hover":"#000000","pxt-primary-foreground-hover":"#FFFFFF","pxt-primary-accent":"#000000","pxt-secondary-background":"#000000","pxt-secondary-foreground":"#FFFFFF","pxt-secondary-background-hover":"#000000","pxt-secondary-foreground-hover":"#FFFFFF","pxt-secondary-accent":"#000000","pxt-tertiary-background":"#000000","pxt-tertiary-foreground":"#FFFFFF","pxt-tertiary-background-hover":"#000000","pxt-tertiary-foreground-hover":"#FFFFFF","pxt-tertiary-accent":"#000000","pxt-target-background1":"#000000","pxt-target-foreground1":"#FFFFFF","pxt-target-background1-hover":"#000000","pxt-target-foreground1-hover":"#cccccc","pxt-target-stencil1":"#FFFFFF","pxt-target-background2":"#000000","pxt-target-foreground2":"#FFFFFF","pxt-target-background2-hover":"#000000","pxt-target-foreground2-hover":"#cccccc","pxt-target-stencil2":"#FFFFFF","pxt-target-background3":"#000000","pxt-target-foreground3":"#FFFFFF","pxt-target-background3-hover":"#000000","pxt-target-foreground3-hover":"#cccccc","pxt-target-stencil3":"#FFFFFF","pxt-neutral-background1":"#000000","pxt-neutral-foreground1":"#FFFFFF","pxt-neutral-background1-hover":"#000000","pxt-neutral-foreground1-hover":"#FFFFFF","pxt-neutral-stencil1":"#FFFFFF","pxt-neutral-background2":"#000000","pxt-neutral-foreground2":"#FFFFFF","pxt-neutral-background2-hover":"#000000","pxt-neutral-foreground2-hover":"#FFFFFF","pxt-neutral-stencil2":"#FFFFFF","pxt-neutral-background3":"#000000","pxt-neutral-foreground3":"#FFFFFF","pxt-neutral-background3-hover":"#000000","pxt-neutral-foreground3-hover":"#FFFFFF","pxt-neutral-stencil3":"#FFFFFF","pxt-neutral-background3-alpha90":"#000000E5","pxt-neutral-base":"rgba(255, 255, 255, 1)","pxt-neutral-alpha0":"rgba(255, 255, 255, 0)","pxt-neutral-alpha10":"rgba(255, 255, 255, 0.1)","pxt-neutral-alpha20":"rgba(255, 255, 255, 0.2)","pxt-neutral-alpha50":"rgba(255, 255, 255, 0.5)","pxt-neutral-alpha80":"rgba(255, 255, 255, 0.8)","pxt-link":"#807FFF","pxt-link-hover":"#BBBBFF","pxt-focus-border":"#FFFF00","pxt-success":"#00FF00","pxt-success-foreground":"#000000","pxt-success-hover":"#00FF00","pxt-success-alpha10":"#00FF0019","pxt-warning":"#00FFFF","pxt-warning-foreground":"#FFFFFF","pxt-warning-hover":"#00FFFF","pxt-warning-alpha10":"#00FFFF19","pxt-error":"#880000","pxt-error-foreground":"#FFFFFF","pxt-error-hover":"#880000","pxt-error-alpha10":"#88000019","pxt-colors-purple-background":"#FF00FF","pxt-colors-purple-foreground":"#000000","pxt-colors-purple-hover":"#FF00FF","pxt-colors-purple-alpha10":"#FF00FF19","pxt-colors-orange-background":"#FF7F00","pxt-colors-orange-foreground":"#000000","pxt-colors-orange-hover":"#FF7F00","pxt-colors-orange-alpha10":"#FF7F0019","pxt-colors-brown-background":"#d1b7a3","pxt-colors-brown-foreground":"#FFFFFF","pxt-colors-brown-hover":"#d1b7a3","pxt-colors-brown-alpha10":"#d1b7a319","pxt-colors-blue-background":"#0078D7","pxt-colors-blue-foreground":"#FFFFFF","pxt-colors-blue-hover":"#0086F1","pxt-colors-blue-alpha10":"#0078D719","pxt-colors-green-background":"#00FF00","pxt-colors-green-foreground":"#000000","pxt-colors-green-hover":"#00FF00","pxt-colors-green-alpha10":"#00FF0019","pxt-colors-red-background":"#880000","pxt-colors-red-foreground":"#FFFFFF","pxt-colors-red-hover":"#880000","pxt-colors-red-alpha10":"#88000019","pxt-colors-teal-background":"#5BE0FF","pxt-colors-teal-foreground":"#000000","pxt-colors-teal-hover":"#5BE0FF","pxt-colors-teal-alpha10":"#5BE0FF19","pxt-colors-yellow-background":"#FFFF00","pxt-colors-yellow-foreground":"#000000","pxt-colors-yellow-hover":"#FFFF00","pxt-colors-yellow-alpha10":"#FFFF0019"},"overrideCss":".common-button {\n color: var(--pxt-neutral-foreground2) !important;\n background-color: var(--pxt-neutral-background2) !important;\n border-color: var(--pxt-neutral-foreground2) !important;\n}\n\n.common-button:hover, .common-button:focus {\n outline: 2px solid var(--pxt-colors-yellow-background) !important;\n z-index: 1;\n}\n\n.common-button.home-share-button {\n border: 1px solid var(--pxt-neutral-foreground2) !important;\n}\n\n/*\nOverride default button background for the area menu, which requires transparency,\nbut still use a fairly opaque one to keep focus/visibility on the main buttons.\n*/\n.area-menu-container .area-button {\n background-color: var(--pxt-neutral-alpha80) !important;\n}\n\n/*\n * \"User-provided content\" header in the import modal.\n */\n.ui.violet.message .header {\n color: var(--pxt-colors-purple-background) !important;\n}\n\n/*\n * Checkbox styles\n * In HC the neutral and primary colors are the same, so we need to differentiate with\n * a different background color when checked.\n */\n.common-checkbox.toggle input:checked~label:before,\ndiv.field .ui.toggle.checkbox input:checked~label:before {\n background-color: var(--pxt-colors-purple-background) !important;\n}\n\n.common-checkbox-icon.checked {\n background-color: var(--pxt-colors-purple-background);\n color: var(--pxt-colors-purple-foreground);\n border-color: var(--pxt-colors-purple-hover);\n}\n\n.common-checkbox-icon.checked i.fas.fa-check {\n color: var(--pxt-colors-purple-foreground);\n}\n\n/*\n * Make toggle \"handle\" more visible for HC\n */\n.common-checkbox.toggle label:after {\n background-color: var(--pxt-neutral-foreground1) !important;\n}\n\n/*\n * Selection highlights\n */\n\n.blocklyContextMenu {\n border: 3px solid var(--pxt-colors-yellow-background) !important;\n}\n\n.blocklyWidgetDiv .blocklyMenu.blocklyContextMenu .blocklyMenuItem.blocklyMenuItemHighlight {\n border: 3px solid var(--pxt-colors-yellow-background) !important;\n}\n\n/*\n * Toolbox\n */\n.blocklyTreeRow:hover {\n outline: 3px solid var(--pxt-colors-yellow-background) !important;\n}\n\n#blocklySearchInput i {\n color: var(--pxt-neutral-foreground1);\n opacity: 1;\n}\n\n/*\n * Inverted image colors\n */\n.barcharticon,\n.blockly-ws-search-next-btn,\n.blockly-ws-search-previous-btn,\n.blockly-ws-search-close-btn {\n filter: invert(1);\n}\n\n/* Sim toolbar */\n#simulator .editor-sidebar .simtoolbar .debug-button.active,\n#simulator .editor-sidebar .simtoolbar .debug-button.active:hover {\n /* Make active state more apparent with a yellow border */\n color: var(--pxt-neutral-foreground2) !important;\n background: var(--pxt-neutral-background2) !important;\n border: 3px solid var(--pxt-colors-yellow-background) !important;\n}\n\n/* Image Editor */\n.image-editor-topbar, .image-editor-bottombar, .image-editor-sidebar {\n background: var(--pxt-neutral-background1) !important;\n}\n.image-editor-tool-buttons {\n background: none !important;\n}\n.image-editor-button,\n.image-editor-input,\n.image-editor-confirm {\n border: 1px solid var(--pxt-neutral-foreground1);\n}\n.image-editor-canvas, .image-editor-canvas:hover, .image-editor-canvas:focus {\n outline: none !important;\n}\n.cursor-button {\n /* remove margin since we now have a border around the cursor buttons and it looks better centered */\n margin-right: 0;\n}\n\n/* Toolbox */\n.pxtToolbox:not(.invertedToolbox) span.blocklyTreeLabel {\n color: var(--pxt-target-foreground3);\n}\n\n.pxtToolbox:not(.invertedToolbox) .blocklyTreeSelected span.blocklyTreeLabel,\n.pxtToolbox:not(.invertedToolbox) .blocklyTreeSelected span.blocklyTreeIcon {\n color: var(--pxt-target-foreground3);\n}\n\n.pxtToolbox:not(.invertedToolbox) .blocklyTreeRow:not(.blocklyTreeSelected) .blocklyTreeLabel {\n color: var(--pxt-target-foreground3);\n}\n\n.pxtToolbox:not(.invertedToolbox) .blocklyTreeRow:not(.blocklyTreeSelected):hover,\n.pxtToolbox:not(.invertedToolbox) .blocklyTreeRow:not(.blocklyTreeSelected):focus {\n background-color: #404040;\n}\n\n.blocksEditorOuter #blocklyTrashIcon {\n color: var(--pxt-primary-foreground);\n}\n\n/*\n * Teaching Bubbles\n */\n.teaching-bubble,\n.teaching-bubble .teaching-bubble-navigation-buttons > .common-button {\n background: var(--pxt-neutral-background1) !important;\n color: var(--pxt-neutral-foreground1) !important;\n border: solid var(--pxt-neutral-foreground1) !important;\n}\n\n.teaching-bubble-cutout {\n border: 0.25rem solid var(--pxt-neutral-alpha20);\n}\n\n.teaching-bubble .ai-footer {\n opacity: 1 !important;\n}\n\n.teaching-bubble-arrow,\n.teaching-bubble .ai-footer-text,\n.teaching-bubble .feedback-button,\n.teaching-bubble .feedback-button.disabled,\n.teaching-bubble .teaching-bubble-steps {\n color: var(--pxt-neutral-foreground1) !important;\n}\n\n/*\n * Side Docs\n */\n\n#sidedocs {\n background-color: var(--pxt-neutral-foreground1);\n}\n\n#sidedocsbar a i,\n#sidedocsbar a span {\n color: var(--pxt-neutral-background1) !important;\n}\n\n#sidedocsbar a:hover,\n#sidedocsbar a:focus {\n /* Yellow does not contrast well against white background */\n outline: 3px solid var(--pxt-neutral-background1) !important;\n}\n\n#sidedocsbar a:hover i,\n#sidedocsbar a:focus i,\n#sidedocsbar a:hover span,\n#sidedocsbar a:focus span {\n color: var(--pxt-link-hover) !important;\n}\n\n/*\n * Editor Toggle\n */\n#editortoggle .selected.item {\n transition: none;\n &:focus {\n box-shadow: inset 0 0 0 6px #000000 !important;\n }\n >.icon {\n color: #000000 !important;\n }\n}\n\n#editordropdown.ui.button.active > .icon {\n color: #000000 !important;\n}\n\n/*\n * Dropdown Menu\n */\n.common-menu-dropdown-item:hover,\n.common-menu-dropdown > .menu-button.expanded {\n outline: var(--pxt-focus-border) solid 3px !important;\n outline-offset: -4px;\n z-index: 1;\n}\n\ntable.diffview.update .diff-added .ch-added {\n color: var(--pxt-neutral-background1) !important;\n outline-color: var(--pxt-neutral-background1) !important;\n}\n\n.blocklyFieldSliderDropdown {\n background-color: var(--pxt-neutral-background1) !important;\n border-color: var(--pxt-neutral-foreground1) !important;\n}\n\n.blocklyFieldSliderDropdown .blocklyFieldSliderLabel {\n color: var(--pxt-neutral-foreground1) !important;\n}\n\n.blocklyFieldSliderDropdown input[type=range].blocklyFieldSlider {\n outline: none !important;\n background-color: var(--pxt-neutral-background1) !important;\n --blocklyFieldSliderBackgroundColor: var(--pxt-neutral-background1) !important;\n --blocklyFieldSliderThumbColor: var(--pxt-neutral-foreground1) !important;\n --blocklyFieldSliderThumbBorderColor: var(--pxt-neutral-foreground1) !important;\n}\n\n.blocklyFieldSliderDropdown input[type=range].blocklyFieldSlider:hover::-webkit-slider-runnable-track, .blocklyFieldSliderDropdown input[type=range].blocklyFieldSlider:focus-visible::-webkit-slider-runnable-track {\n outline: solid 3px var(--pxt-focus-border) !important;\n}\n\ninput[type=range].blocklyFieldSlider::-webkit-slider-runnable-track {\n border: solid 1px var(--pxt-neutral-foreground1) !important;\n box-sizing: content-box;\n}\n\ninput[type=range].blocklyFieldSlider::-moz-range-track {\n border: solid 1px var(--pxt-neutral-foreground1) !important;\n box-sizing: content-box;\n}\n\n.blocklyFieldSliderDropdown input[type=range].blocklyFieldSlider:hover::-moz-range-track, .blocklyFieldSliderDropdown input[type=range].blocklyFieldSlider:focus-visible::-moz-range-track {\n outline: solid 3px var(--pxt-focus-border) !important;\n}\n\n/*\n * Music editor gallery\n */\n.song-gallery-item .common-button.play-button {\n background-color: var(--pxt-neutral-background1) !important;\n color: var(--pxt-neutral-foreground1) !important;\n border: solid 2px var(--pxt-neutral-foreground1) !important;\n}\n\n.song-gallery-item .common-button.play-button i.fas {\n color: var(--pxt-neutral-foreground1) !important;\n}\n\n.song-gallery-item .common-button.play-button:focus, .song-gallery-item .common-button.play-button:focus-visible {\n outline: none !important;\n}\n\n.song-gallery-item .common-button.play-button:focus::after, .song-gallery-item .common-button.play-button:focus-visible::after {\n border-radius: 50% !important;\n outline-offset: 10px !important;\n}\n"}}}
|
|
1
|
+
var pxtTargetBundle = {"id":"core","name":"Microsoft MakeCode","title":"Microsoft MakeCode","description":"A toolkit to build JavaScript Blocks editors.","compile":{"hasHex":false,"jsRefCounting":false,"switches":{},"noSourceInFlash":true,"utf8":true},"uploadDocs":true,"versions":{"branch":"master","tag":"v13.2.3","commits":"https://github.com/microsoft/pxt/commits/ff8f4568b3a2735ee86d356597a33a9368a638b5","target":"13.2.3","pxt":"13.2.3"},"blocksprj":{"id":"blocksprj","config":{"name":"empty","description":"An empty project for docs rendering","dependencies":{},"files":["main.ts","pxt-core.d.ts","pxt-helpers.ts"],"public":true,"additionalFilePaths":[]},"files":{"main.ts":"\n"}},"tsprj":{"id":"tsprj","config":{"name":"empty","description":"An empty project for docs rendering","dependencies":{},"files":["main.ts","pxt-core.d.ts","pxt-helpers.ts"],"public":true,"additionalFilePaths":[]},"files":{"main.ts":"\n"}},"colorThemeMap":{"pxt-high-contrast":{"id":"pxt-high-contrast","name":"High Contrast","weight":100,"monacoBaseTheme":"hc-black","colors":{"pxt-header-background":"#000000","pxt-header-foreground":"#FFFFFF","pxt-header-background-hover":"#000000","pxt-header-foreground-hover":"#FFFFFF","pxt-header-stencil":"#FFFFFF","pxt-primary-background":"#000000","pxt-primary-foreground":"#FFFFFF","pxt-primary-background-hover":"#000000","pxt-primary-foreground-hover":"#FFFFFF","pxt-primary-accent":"#000000","pxt-secondary-background":"#000000","pxt-secondary-foreground":"#FFFFFF","pxt-secondary-background-hover":"#000000","pxt-secondary-foreground-hover":"#FFFFFF","pxt-secondary-accent":"#000000","pxt-tertiary-background":"#000000","pxt-tertiary-foreground":"#FFFFFF","pxt-tertiary-background-hover":"#000000","pxt-tertiary-foreground-hover":"#FFFFFF","pxt-tertiary-accent":"#000000","pxt-target-background1":"#000000","pxt-target-foreground1":"#FFFFFF","pxt-target-background1-hover":"#000000","pxt-target-foreground1-hover":"#cccccc","pxt-target-stencil1":"#FFFFFF","pxt-target-background2":"#000000","pxt-target-foreground2":"#FFFFFF","pxt-target-background2-hover":"#000000","pxt-target-foreground2-hover":"#cccccc","pxt-target-stencil2":"#FFFFFF","pxt-target-background3":"#000000","pxt-target-foreground3":"#FFFFFF","pxt-target-background3-hover":"#000000","pxt-target-foreground3-hover":"#cccccc","pxt-target-stencil3":"#FFFFFF","pxt-neutral-background1":"#000000","pxt-neutral-foreground1":"#FFFFFF","pxt-neutral-background1-hover":"#000000","pxt-neutral-foreground1-hover":"#FFFFFF","pxt-neutral-stencil1":"#FFFFFF","pxt-neutral-background2":"#000000","pxt-neutral-foreground2":"#FFFFFF","pxt-neutral-background2-hover":"#000000","pxt-neutral-foreground2-hover":"#FFFFFF","pxt-neutral-stencil2":"#FFFFFF","pxt-neutral-background3":"#000000","pxt-neutral-foreground3":"#FFFFFF","pxt-neutral-background3-hover":"#000000","pxt-neutral-foreground3-hover":"#FFFFFF","pxt-neutral-stencil3":"#FFFFFF","pxt-neutral-background3-alpha90":"#000000E5","pxt-neutral-base":"rgba(255, 255, 255, 1)","pxt-neutral-alpha0":"rgba(255, 255, 255, 0)","pxt-neutral-alpha10":"rgba(255, 255, 255, 0.1)","pxt-neutral-alpha20":"rgba(255, 255, 255, 0.2)","pxt-neutral-alpha50":"rgba(255, 255, 255, 0.5)","pxt-neutral-alpha80":"rgba(255, 255, 255, 0.8)","pxt-link":"#807FFF","pxt-link-hover":"#BBBBFF","pxt-focus-border":"#FFFF00","pxt-success":"#00FF00","pxt-success-foreground":"#000000","pxt-success-hover":"#00FF00","pxt-success-alpha10":"#00FF0019","pxt-warning":"#00FFFF","pxt-warning-foreground":"#FFFFFF","pxt-warning-hover":"#00FFFF","pxt-warning-alpha10":"#00FFFF19","pxt-error":"#880000","pxt-error-foreground":"#FFFFFF","pxt-error-hover":"#880000","pxt-error-alpha10":"#88000019","pxt-colors-purple-background":"#FF00FF","pxt-colors-purple-foreground":"#000000","pxt-colors-purple-hover":"#FF00FF","pxt-colors-purple-alpha10":"#FF00FF19","pxt-colors-orange-background":"#FF7F00","pxt-colors-orange-foreground":"#000000","pxt-colors-orange-hover":"#FF7F00","pxt-colors-orange-alpha10":"#FF7F0019","pxt-colors-brown-background":"#d1b7a3","pxt-colors-brown-foreground":"#FFFFFF","pxt-colors-brown-hover":"#d1b7a3","pxt-colors-brown-alpha10":"#d1b7a319","pxt-colors-blue-background":"#0078D7","pxt-colors-blue-foreground":"#FFFFFF","pxt-colors-blue-hover":"#0086F1","pxt-colors-blue-alpha10":"#0078D719","pxt-colors-green-background":"#00FF00","pxt-colors-green-foreground":"#000000","pxt-colors-green-hover":"#00FF00","pxt-colors-green-alpha10":"#00FF0019","pxt-colors-red-background":"#880000","pxt-colors-red-foreground":"#FFFFFF","pxt-colors-red-hover":"#880000","pxt-colors-red-alpha10":"#88000019","pxt-colors-teal-background":"#5BE0FF","pxt-colors-teal-foreground":"#000000","pxt-colors-teal-hover":"#5BE0FF","pxt-colors-teal-alpha10":"#5BE0FF19","pxt-colors-yellow-background":"#FFFF00","pxt-colors-yellow-foreground":"#000000","pxt-colors-yellow-hover":"#FFFF00","pxt-colors-yellow-alpha10":"#FFFF0019"},"overrideCss":".common-button {\n color: var(--pxt-neutral-foreground2) !important;\n background-color: var(--pxt-neutral-background2) !important;\n border-color: var(--pxt-neutral-foreground2) !important;\n}\n\n.common-button:hover, .common-button:focus {\n outline: 2px solid var(--pxt-colors-yellow-background) !important;\n z-index: 1;\n}\n\n.common-button.home-share-button {\n border: 1px solid var(--pxt-neutral-foreground2) !important;\n}\n\n/*\nOverride default button background for the area menu, which requires transparency,\nbut still use a fairly opaque one to keep focus/visibility on the main buttons.\n*/\n.area-menu-container .area-button {\n background-color: var(--pxt-neutral-alpha80) !important;\n}\n\n/*\n * \"User-provided content\" header in the import modal.\n */\n.ui.violet.message .header {\n color: var(--pxt-colors-purple-background) !important;\n}\n\n/*\n * Checkbox styles\n * In HC the neutral and primary colors are the same, so we need to differentiate with\n * a different background color when checked.\n */\n.common-checkbox.toggle input:checked~label:before,\ndiv.field .ui.toggle.checkbox input:checked~label:before {\n background-color: var(--pxt-colors-purple-background) !important;\n}\n\n.common-checkbox-icon.checked {\n background-color: var(--pxt-colors-purple-background);\n color: var(--pxt-colors-purple-foreground);\n border-color: var(--pxt-colors-purple-hover);\n}\n\n.common-checkbox-icon.checked i.fas.fa-check {\n color: var(--pxt-colors-purple-foreground);\n}\n\n/*\n * Make toggle \"handle\" more visible for HC\n */\n.common-checkbox.toggle label:after {\n background-color: var(--pxt-neutral-foreground1) !important;\n}\n\n/*\n * Selection highlights\n */\n\n.blocklyContextMenu {\n border: 3px solid var(--pxt-colors-yellow-background) !important;\n}\n\n.blocklyWidgetDiv .blocklyMenu.blocklyContextMenu .blocklyMenuItem.blocklyMenuItemHighlight {\n border: 3px solid var(--pxt-colors-yellow-background) !important;\n}\n\n/*\n * Toolbox\n */\n.blocklyTreeRow:hover {\n outline: 3px solid var(--pxt-colors-yellow-background) !important;\n}\n\n#blocklySearchInput i {\n color: var(--pxt-neutral-foreground1);\n opacity: 1;\n}\n\n/*\n * Inverted image colors\n */\n.barcharticon,\n.blockly-ws-search-next-btn,\n.blockly-ws-search-previous-btn,\n.blockly-ws-search-close-btn {\n filter: invert(1);\n}\n\n/* Sim toolbar */\n#simulator .editor-sidebar .simtoolbar .debug-button.active,\n#simulator .editor-sidebar .simtoolbar .debug-button.active:hover {\n /* Make active state more apparent with a yellow border */\n color: var(--pxt-neutral-foreground2) !important;\n background: var(--pxt-neutral-background2) !important;\n border: 3px solid var(--pxt-colors-yellow-background) !important;\n}\n\n/* Image Editor */\n.image-editor-topbar, .image-editor-bottombar, .image-editor-sidebar {\n background: var(--pxt-neutral-background1) !important;\n}\n.image-editor-tool-buttons {\n background: none !important;\n}\n.image-editor-button,\n.image-editor-input,\n.image-editor-confirm {\n border: 1px solid var(--pxt-neutral-foreground1);\n}\n.image-editor-canvas, .image-editor-canvas:hover, .image-editor-canvas:focus {\n outline: none !important;\n}\n.cursor-button {\n /* remove margin since we now have a border around the cursor buttons and it looks better centered */\n margin-right: 0;\n}\n\n/* Toolbox */\n.pxtToolbox:not(.invertedToolbox) span.blocklyTreeLabel {\n color: var(--pxt-target-foreground3);\n}\n\n.pxtToolbox:not(.invertedToolbox) .blocklyTreeSelected span.blocklyTreeLabel,\n.pxtToolbox:not(.invertedToolbox) .blocklyTreeSelected span.blocklyTreeIcon {\n color: var(--pxt-target-foreground3);\n}\n\n.pxtToolbox:not(.invertedToolbox) .blocklyTreeRow:not(.blocklyTreeSelected) .blocklyTreeLabel {\n color: var(--pxt-target-foreground3);\n}\n\n.pxtToolbox:not(.invertedToolbox) .blocklyTreeRow:not(.blocklyTreeSelected):hover,\n.pxtToolbox:not(.invertedToolbox) .blocklyTreeRow:not(.blocklyTreeSelected):focus {\n background-color: #404040;\n}\n\n.blocksEditorOuter #blocklyTrashIcon {\n color: var(--pxt-primary-foreground);\n}\n\n/*\n * Teaching Bubbles\n */\n.teaching-bubble,\n.teaching-bubble .teaching-bubble-navigation-buttons > .common-button {\n background: var(--pxt-neutral-background1) !important;\n color: var(--pxt-neutral-foreground1) !important;\n border: solid var(--pxt-neutral-foreground1) !important;\n}\n\n.teaching-bubble-cutout {\n border: 0.25rem solid var(--pxt-neutral-alpha20);\n}\n\n.teaching-bubble .ai-footer {\n opacity: 1 !important;\n}\n\n.teaching-bubble-arrow,\n.teaching-bubble .ai-footer-text,\n.teaching-bubble .feedback-button,\n.teaching-bubble .feedback-button.disabled,\n.teaching-bubble .teaching-bubble-steps {\n color: var(--pxt-neutral-foreground1) !important;\n}\n\n/*\n * Side Docs\n */\n\n#sidedocs {\n background-color: var(--pxt-neutral-foreground1);\n}\n\n#sidedocsbar a i,\n#sidedocsbar a span {\n color: var(--pxt-neutral-background1) !important;\n}\n\n#sidedocsbar a:hover,\n#sidedocsbar a:focus {\n /* Yellow does not contrast well against white background */\n outline: 3px solid var(--pxt-neutral-background1) !important;\n}\n\n#sidedocsbar a:hover i,\n#sidedocsbar a:focus i,\n#sidedocsbar a:hover span,\n#sidedocsbar a:focus span {\n color: var(--pxt-link-hover) !important;\n}\n\n/*\n * Editor Toggle\n */\n#editortoggle .selected.item {\n transition: none;\n &:focus {\n box-shadow: inset 0 0 0 6px #000000 !important;\n }\n >.icon {\n color: #000000 !important;\n }\n}\n\n#editordropdown.ui.button.active > .icon {\n color: #000000 !important;\n}\n\n/*\n * Dropdown Menu\n */\n.common-menu-dropdown-item:hover,\n.common-menu-dropdown > .menu-button.expanded {\n outline: var(--pxt-focus-border) solid 3px !important;\n outline-offset: -4px;\n z-index: 1;\n}\n\ntable.diffview.update .diff-added .ch-added {\n color: var(--pxt-neutral-background1) !important;\n outline-color: var(--pxt-neutral-background1) !important;\n}\n\n.blocklyFieldSliderDropdown {\n background-color: var(--pxt-neutral-background1) !important;\n border-color: var(--pxt-neutral-foreground1) !important;\n}\n\n.blocklyFieldSliderDropdown .blocklyFieldSliderLabel {\n color: var(--pxt-neutral-foreground1) !important;\n}\n\n.blocklyFieldSliderDropdown input[type=range].blocklyFieldSlider {\n outline: none !important;\n background-color: var(--pxt-neutral-background1) !important;\n --blocklyFieldSliderBackgroundColor: var(--pxt-neutral-background1) !important;\n --blocklyFieldSliderThumbColor: var(--pxt-neutral-foreground1) !important;\n --blocklyFieldSliderThumbBorderColor: var(--pxt-neutral-foreground1) !important;\n}\n\n.blocklyFieldSliderDropdown input[type=range].blocklyFieldSlider:hover::-webkit-slider-runnable-track, .blocklyFieldSliderDropdown input[type=range].blocklyFieldSlider:focus-visible::-webkit-slider-runnable-track {\n outline: solid 3px var(--pxt-focus-border) !important;\n}\n\ninput[type=range].blocklyFieldSlider::-webkit-slider-runnable-track {\n border: solid 1px var(--pxt-neutral-foreground1) !important;\n box-sizing: content-box;\n}\n\ninput[type=range].blocklyFieldSlider::-moz-range-track {\n border: solid 1px var(--pxt-neutral-foreground1) !important;\n box-sizing: content-box;\n}\n\n.blocklyFieldSliderDropdown input[type=range].blocklyFieldSlider:hover::-moz-range-track, .blocklyFieldSliderDropdown input[type=range].blocklyFieldSlider:focus-visible::-moz-range-track {\n outline: solid 3px var(--pxt-focus-border) !important;\n}\n\n/*\n * Music editor gallery\n */\n.song-gallery-item .common-button.play-button {\n background-color: var(--pxt-neutral-background1) !important;\n color: var(--pxt-neutral-foreground1) !important;\n border: solid 2px var(--pxt-neutral-foreground1) !important;\n}\n\n.song-gallery-item .common-button.play-button i.fas {\n color: var(--pxt-neutral-foreground1) !important;\n}\n\n.song-gallery-item .common-button.play-button:focus, .song-gallery-item .common-button.play-button:focus-visible {\n outline: none !important;\n}\n\n.song-gallery-item .common-button.play-button:focus::after, .song-gallery-item .common-button.play-button:focus-visible::after {\n border-radius: 50% !important;\n outline-offset: 10px !important;\n}\n"}}}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/// <reference path="../../pxtcompiler.d.ts" />
|
|
2
|
+
/**
|
|
3
|
+
* Expectations over the ARM Thumb assembly listing produced for each case
|
|
4
|
+
* program in tests/thumb-test/cases.
|
|
5
|
+
*
|
|
6
|
+
* A case file named <name>.ts is checked by the entry keyed "<name>.ts" in
|
|
7
|
+
* `asmChecks` below. A case with no entry fails, so that adding a program
|
|
8
|
+
* without an expectation is not silently a no-op.
|
|
9
|
+
*/
|
|
10
|
+
export declare type AsmCheck = (asm: string, res: pxtc.CompileResult) => void;
|
|
11
|
+
/** True when `name` appears as a label definition, e.g. "_main___P1:". */
|
|
12
|
+
export declare function hasLabel(asm: string, name: string): boolean;
|
|
13
|
+
/** True when `name` appears anywhere in the listing as a whole token. */
|
|
14
|
+
export declare function mentions(asm: string, name: string): boolean;
|
|
15
|
+
/** Number of matches of a global regex in the listing. */
|
|
16
|
+
export declare function countMatches(asm: string, re: RegExp): number;
|
|
17
|
+
/**
|
|
18
|
+
* Bytes of code generated for the program, from the size stats header that
|
|
19
|
+
* target.switches.size adds to the listing. This excludes the fixed runtime
|
|
20
|
+
* image, so it tracks codegen rather than the size of the hex template.
|
|
21
|
+
*/
|
|
22
|
+
export declare function codeSize(asm: string): number;
|
|
23
|
+
/** Bytes of the emitted Intel hex text. */
|
|
24
|
+
export declare function hexSize(res: pxtc.CompileResult): number;
|
|
25
|
+
/** Fails if any of `names` occurs in the listing. */
|
|
26
|
+
export declare function assertAbsent(asm: string, names: string[]): void;
|
|
27
|
+
/** Fails if `re` matches the listing. */
|
|
28
|
+
export declare function assertNoMatch(asm: string, re: RegExp, what: string): void;
|
|
29
|
+
/** Fails unless `re` matches the listing at least `min` times. */
|
|
30
|
+
export declare function assertAtLeast(asm: string, re: RegExp, min: number, what: string): void;
|
|
31
|
+
/** Fails unless `re` matches the listing at most `max` times. */
|
|
32
|
+
export declare function assertAtMost(asm: string, re: RegExp, max: number, what: string): void;
|
|
33
|
+
/**
|
|
34
|
+
* Listing up to _code_end: the program's own code, without the appended
|
|
35
|
+
* runtime helper text (whose bodies make their own C++ fallback calls).
|
|
36
|
+
*/
|
|
37
|
+
export declare function userCode(asm: string): string;
|
|
38
|
+
/**
|
|
39
|
+
* Fails unless `actual` is within `pct` percent of `expected`. Bands are wide
|
|
40
|
+
* on purpose: they catch silent large regressions in either direction without
|
|
41
|
+
* turning every codegen tweak into a test edit.
|
|
42
|
+
*/
|
|
43
|
+
export declare function assertWithin(actual: number, expected: number, pct: number, what: string): void;
|
|
44
|
+
export declare const asmChecks: pxt.Map<AsmCheck>;
|
|
45
|
+
/**
|
|
46
|
+
* A case compiled a second time with extra compile switches and checked
|
|
47
|
+
* against different expectations -- the opt-out half of the differential
|
|
48
|
+
* pair described above asmChecks.
|
|
49
|
+
*/
|
|
50
|
+
export interface VariantCheck {
|
|
51
|
+
/** Case file in tests/thumb-test/cases. */
|
|
52
|
+
caseFile: string;
|
|
53
|
+
/** Merged over the case's normal switches. */
|
|
54
|
+
switches: pxtc.CompileSwitches;
|
|
55
|
+
/** Names the variant in the test title; keep it short. */
|
|
56
|
+
label: string;
|
|
57
|
+
check: AsmCheck;
|
|
58
|
+
}
|
|
59
|
+
export declare const variantChecks: VariantCheck[];
|
|
60
|
+
/**
|
|
61
|
+
* Semantic case programs that live outside tests/thumb-test/cases. These are
|
|
62
|
+
* lang-test0 files that the compile-test suite executes on the JS backend;
|
|
63
|
+
* compiling them here proves the same source also survives the native emitter
|
|
64
|
+
* and the thumb assembler, and makes them available as an on-device payload.
|
|
65
|
+
*
|
|
66
|
+
* Keys are paths relative to the repository root. The runner prepends the
|
|
67
|
+
* lang-test0 prelude, which supplies assert() and msg().
|
|
68
|
+
*
|
|
69
|
+
* The expectations are deliberately light. These programs assert language
|
|
70
|
+
* semantics rather than codegen shape, so the check here is only that the
|
|
71
|
+
* emitter produced real code for them.
|
|
72
|
+
*/
|
|
73
|
+
export declare const externalCases: pxt.Map<AsmCheck>;
|