pxt-core 7.5.2 → 7.5.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/built/cli.js +57 -5
- package/built/pxt.js +194 -11
- package/built/pxtblockly.js +637 -647
- package/built/pxtblocks.d.ts +1 -0
- package/built/pxtblocks.js +83 -32
- package/built/pxtcompiler.js +42 -4
- package/built/pxtlib.d.ts +2 -0
- package/built/pxtlib.js +22 -0
- package/built/pxtpy.js +73 -2
- package/built/server.js +4 -0
- package/built/target.js +1 -1
- package/built/web/main.js +1 -1
- package/built/web/pxtapp.js +1 -1
- package/built/web/pxtasseteditor.js +1 -1
- package/built/web/pxtblockly.js +2 -2
- package/built/web/pxtblocks.js +1 -1
- package/built/web/pxtcompiler.js +1 -1
- package/built/web/pxtembed.js +2 -2
- package/built/web/pxtlib.js +1 -1
- package/built/web/pxtpy.js +1 -1
- package/built/web/pxtworker.js +1 -1
- package/built/web/react-common-authcode.css +6008 -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/common-docs/faq.md +1 -1
- package/common-docs/translate.md +2 -2
- package/package.json +3 -3
- package/pxtarget.json +1 -1
- package/react-common/components/controls/EditorToggle.tsx +109 -0
- package/react-common/styles/controls/Button.less +4 -0
- package/react-common/styles/controls/EditorToggle.less +233 -0
- package/react-common/styles/react-common-authcode-core.less +10 -0
- package/react-common/styles/react-common-authcode.less +12 -0
- package/react-common/styles/react-common-variables.less +7 -0
- package/react-common/styles/react-common.less +1 -0
- package/theme/image-editor/imageEditor.less +7 -116
- package/webapp/public/authcode.html +1 -0
- package/webapp/public/blockly/blockly_compressed.js +554 -615
- package/webapp/public/index.html +1 -1
package/common-docs/faq.md
CHANGED
|
@@ -58,7 +58,7 @@ When you download the program for your project, the name you gave the project be
|
|
|
58
58
|
|
|
59
59
|
## I just added / approved a new translation in Crowdin, when will it show up?
|
|
60
60
|
|
|
61
|
-
[Translations](https://makecode.com/translate) are managed by the [Crowdin](https://crowdin.com/project/
|
|
61
|
+
[Translations](https://makecode.com/translate) are managed by the [Crowdin](https://crowdin.com/project/makecode) site. There's a scheduled process which checks for new translations in Crowdin and brings them down to the website serving a MakeCode editor. The process usually takes 10 - 30 minutes from when a new translation is approved to when it will appear in an online editor.
|
|
62
62
|
|
|
63
63
|
## Where is the "Add Package" button?
|
|
64
64
|
|
package/common-docs/translate.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Help translate
|
|
2
2
|
|
|
3
|
-
Translations of text in the editor, in blocks, and documentation managed by [Crowdin](https://crowdin.com/project/
|
|
3
|
+
Translations of text in the editor, in blocks, and documentation managed by [Crowdin](https://crowdin.com/project/makecode), a translation management platform. It is free to join
|
|
4
4
|
and you can volunteer to translate parts of the web site. Translation into different languages is done by the work of people all over the world who volunteer to help MakeCode be accessible to as many people as possible.
|
|
5
5
|
|
|
6
6
|
### ~ hint
|
|
@@ -16,7 +16,7 @@ https://youtu.be/XpdUzpBVKFU
|
|
|
16
16
|
|
|
17
17
|
## Localized MakeCode
|
|
18
18
|
|
|
19
|
-
Text, or [strings](/types/string), used in the editor and documentation pages are localized into the current language for the editor (you switch languages by choosing **Language** in the **Settings** menu). Text is continually being added or changed so translations are always at a different stage of completeness. MakeCode text content is stored in files on Crowdin in [English](https://crowdin.com/project/
|
|
19
|
+
Text, or [strings](/types/string), used in the editor and documentation pages are localized into the current language for the editor (you switch languages by choosing **Language** in the **Settings** menu). Text is continually being added or changed so translations are always at a different stage of completeness. MakeCode text content is stored in files on Crowdin in [English](https://crowdin.com/project/makecode/en#). Translators choose their language in the [MakeCode Crowdin project](https://crowdin.com/project/makecode) and work on the files for the editor they want to translate for.
|
|
20
20
|
|
|
21
21
|
## Want to help?
|
|
22
22
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pxt-core",
|
|
3
|
-
"version": "7.5.
|
|
3
|
+
"version": "7.5.3",
|
|
4
4
|
"description": "Microsoft MakeCode provides Blocks / JavaScript / Python tools and editors",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"TypeScript",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@fortawesome/fontawesome-free": "^5.15.4",
|
|
64
64
|
"@microsoft/immersive-reader-sdk": "1.1.0",
|
|
65
65
|
"applicationinsights-js": "^1.0.20",
|
|
66
|
-
"browserify": "16.2.
|
|
66
|
+
"browserify": "16.2.3",
|
|
67
67
|
"chai": "^3.5.0",
|
|
68
68
|
"cssnano": "4.1.10",
|
|
69
69
|
"dompurify": "2.0.8",
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
"monaco-editor": "0.24.0",
|
|
130
130
|
"pouchdb": "7.2.1",
|
|
131
131
|
"pouchdb-adapter-memory": "7.2.1",
|
|
132
|
-
"pxt-blockly": "4.0.
|
|
132
|
+
"pxt-blockly": "4.0.9",
|
|
133
133
|
"react": "16.8.3",
|
|
134
134
|
"react-dom": "16.11.0",
|
|
135
135
|
"react-modal": "3.3.2",
|
package/pxtarget.json
CHANGED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { classList, ControlProps } from "../util";
|
|
4
|
+
import { Button } from "./Button";
|
|
5
|
+
import { MenuDropdown } from "./MenuDropdown";
|
|
6
|
+
|
|
7
|
+
export interface EditorToggleProps extends ControlProps {
|
|
8
|
+
items: EditorToggleItem[];
|
|
9
|
+
selected: number;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type EditorToggleItem = BasicEditorToggleItem | DropdownEditorToggleItem;
|
|
13
|
+
|
|
14
|
+
export interface BasicEditorToggleItem {
|
|
15
|
+
label: string;
|
|
16
|
+
title: string;
|
|
17
|
+
focusable: boolean;
|
|
18
|
+
icon?: string;
|
|
19
|
+
onClick: () => void;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface DropdownEditorToggleItem extends BasicEditorToggleItem {
|
|
23
|
+
items: BasicEditorToggleItem[];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
export const EditorToggle = (props: EditorToggleProps) => {
|
|
28
|
+
const {
|
|
29
|
+
id,
|
|
30
|
+
className,
|
|
31
|
+
ariaHidden,
|
|
32
|
+
ariaLabel,
|
|
33
|
+
role,
|
|
34
|
+
items,
|
|
35
|
+
selected
|
|
36
|
+
} = props;
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
const hasDropdown = items.some(item => isDropdownItem(item));
|
|
40
|
+
|
|
41
|
+
const onKeydown = (ev: React.KeyboardEvent) => {
|
|
42
|
+
// TODO
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<div id={id}
|
|
47
|
+
className={classList("common-editor-toggle", hasDropdown && "has-dropdown", className)}
|
|
48
|
+
role={role || "tablist"}
|
|
49
|
+
aria-hidden={ariaHidden}
|
|
50
|
+
aria-label={ariaLabel}>
|
|
51
|
+
{items.map((item, index) => {
|
|
52
|
+
const isSelected = selected === index;
|
|
53
|
+
return (
|
|
54
|
+
<div key={index}
|
|
55
|
+
className={classList(
|
|
56
|
+
"common-editor-toggle-item",
|
|
57
|
+
isSelected && "selected",
|
|
58
|
+
isDropdownItem(item) && "common-editor-toggle-item-dropdown",
|
|
59
|
+
)} >
|
|
60
|
+
<ToggleButton item={item} isSelected={isSelected} onKeydown={onKeydown} />
|
|
61
|
+
{ isDropdownItem(item) &&
|
|
62
|
+
<MenuDropdown
|
|
63
|
+
id="toggle-dropdown"
|
|
64
|
+
className="toggle-dropdown"
|
|
65
|
+
icon="fas fa-chevron-down"
|
|
66
|
+
title={lf("More options")}
|
|
67
|
+
items={items.map(item => ({
|
|
68
|
+
title: item.title,
|
|
69
|
+
label: item.label,
|
|
70
|
+
onClick: item.onClick,
|
|
71
|
+
leftIcon: item.icon
|
|
72
|
+
}))}
|
|
73
|
+
/>
|
|
74
|
+
}
|
|
75
|
+
</div>
|
|
76
|
+
);
|
|
77
|
+
})}
|
|
78
|
+
|
|
79
|
+
<div className="common-editor-toggle-handle"
|
|
80
|
+
aria-hidden={true}
|
|
81
|
+
/>
|
|
82
|
+
</div>
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
interface ToggleButtonProps {
|
|
87
|
+
item: BasicEditorToggleItem;
|
|
88
|
+
isSelected?: boolean;
|
|
89
|
+
onKeydown: (ev: React.KeyboardEvent) => void;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const ToggleButton = (props: ToggleButtonProps) => {
|
|
93
|
+
const { item, isSelected, onKeydown } = props;
|
|
94
|
+
const { label, title, onClick, icon, focusable } = item;
|
|
95
|
+
|
|
96
|
+
return <Button
|
|
97
|
+
role={focusable ? "tab" : undefined}
|
|
98
|
+
tabIndex={focusable && isSelected ? 0 : -1}
|
|
99
|
+
onKeydown={onKeydown}
|
|
100
|
+
label={label}
|
|
101
|
+
title={title}
|
|
102
|
+
onClick={onClick}
|
|
103
|
+
leftIcon={icon}
|
|
104
|
+
aria-selected={isSelected} />
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function isDropdownItem(item: EditorToggleItem): item is DropdownEditorToggleItem {
|
|
108
|
+
return !!(item as DropdownEditorToggleItem).items?.length
|
|
109
|
+
}
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
.common-editor-toggle {
|
|
2
|
+
position: relative;
|
|
3
|
+
border-radius: 0.2rem;
|
|
4
|
+
border: @editorToggleBorderWidth solid @editorToggleBorderColor;
|
|
5
|
+
background: @editorToggleBackgroundColor;
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: row;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// Used in image/tilemap/animation editor
|
|
11
|
+
.common-editor-toggle.slim .common-editor-toggle-item > .common-button {
|
|
12
|
+
padding: .6rem 2rem .75rem;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.common-editor-toggle-item {
|
|
16
|
+
z-index: 1;
|
|
17
|
+
flex: 3;
|
|
18
|
+
|
|
19
|
+
.common-menu-dropdown {
|
|
20
|
+
flex: 4;
|
|
21
|
+
|
|
22
|
+
& > .common-button {
|
|
23
|
+
padding: 0;
|
|
24
|
+
width: 100%;
|
|
25
|
+
border-left: 1px solid @editorToggleBorderColor;
|
|
26
|
+
border-right: 1px solid @editorToggleBorderColor;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.common-menu-dropdown-pane {
|
|
30
|
+
border-top: 1px solid @editorToggleBorderColor;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
& > .common-button {
|
|
35
|
+
background: none;
|
|
36
|
+
color: @buttonTextColorInverted;
|
|
37
|
+
transition: color .25s;
|
|
38
|
+
margin: 0;
|
|
39
|
+
width: 100%;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.common-button:focus::after {
|
|
43
|
+
outline: none;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.common-editor-toggle-item.common-editor-toggle-item-dropdown {
|
|
48
|
+
display: grid;
|
|
49
|
+
grid-template-columns: 3fr 1fr;
|
|
50
|
+
flex: 4;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.common-editor-toggle-item.selected {
|
|
54
|
+
.common-menu-dropdown {
|
|
55
|
+
text-align: center;
|
|
56
|
+
|
|
57
|
+
& > .common-button {
|
|
58
|
+
border-right: none;
|
|
59
|
+
color: @buttonTextColor;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
& > .common-button {
|
|
64
|
+
color: @buttonTextColor;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/*****************************************************
|
|
69
|
+
* Toggle Handle *
|
|
70
|
+
****************************************************/
|
|
71
|
+
|
|
72
|
+
.common-editor-toggle-handle {
|
|
73
|
+
position: absolute;
|
|
74
|
+
background: white;
|
|
75
|
+
width: 33%;
|
|
76
|
+
height: 100%;
|
|
77
|
+
transition: margin-left .25s, width .25s;
|
|
78
|
+
border-radius: 0.2rem;
|
|
79
|
+
margin-left: -@editorToggleBorderWidth;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.common-editor-toggle {
|
|
83
|
+
/* toggle size, two items, no dropdown */
|
|
84
|
+
.common-editor-toggle-item:first-child:nth-last-child(3) ~ .common-editor-toggle-handle { width: 50% }
|
|
85
|
+
|
|
86
|
+
/* toggle positioning, two items, no dropdown */
|
|
87
|
+
.common-editor-toggle-item:first-child:nth-last-child(3) ~ .common-editor-toggle-item.selected ~ .common-editor-toggle-handle { margin-left: 50%; }
|
|
88
|
+
|
|
89
|
+
/* toggle positioning, three items, no dropdown */
|
|
90
|
+
.common-editor-toggle-item:nth-of-type(1).selected ~ .common-editor-toggle-handle { margin-left: 0; }
|
|
91
|
+
.common-editor-toggle-item:nth-of-type(2).selected ~ .common-editor-toggle-handle { margin-left: 33%; }
|
|
92
|
+
.common-editor-toggle-item:nth-of-type(3).selected ~ .common-editor-toggle-handle { margin-left: 67%; }
|
|
93
|
+
|
|
94
|
+
&.has-dropdown {
|
|
95
|
+
/* flex balance, two items, has dropdown (45% to non-dropdown, 55% to dropdown) */
|
|
96
|
+
.common-editor-toggle-item:first-child:nth-last-child(3) ~ .common-editor-toggle-item-dropdown,
|
|
97
|
+
.common-editor-toggle-item.common-editor-toggle-item-dropdown:first-child:nth-last-child(3) { flex: 55 }
|
|
98
|
+
.common-editor-toggle-item:first-child:nth-last-child(3),
|
|
99
|
+
.common-editor-toggle-item-dropdown:first-child:nth-last-child(3) ~ .common-editor-toggle-item { flex: 45 }
|
|
100
|
+
|
|
101
|
+
/* toggle size, two items, has dropdown */
|
|
102
|
+
.common-editor-toggle-item:first-child:nth-last-child(3) ~ .common-editor-toggle-handle { width: 45% }
|
|
103
|
+
.common-editor-toggle-item:first-child:nth-last-child(3) ~ .common-editor-toggle-item-dropdown.selected ~ .common-editor-toggle-handle,
|
|
104
|
+
.common-editor-toggle-item.common-editor-toggle-item-dropdown.selected:first-child:nth-last-child(3) ~ .common-editor-toggle-handle { width: 55% }
|
|
105
|
+
|
|
106
|
+
/* toggle positioning, two items, first item has dropdown */
|
|
107
|
+
.common-editor-toggle-item.common-editor-toggle-item-dropdown:first-child:nth-last-child(3) + .selected ~ .common-editor-toggle-handle { margin-left: 55% }
|
|
108
|
+
|
|
109
|
+
/* toggle positioning, two items, second item has dropdown */
|
|
110
|
+
.common-editor-toggle-item:first-child:nth-last-child(3) + .common-editor-toggle-item-dropdown.selected ~ .common-editor-toggle-handle { margin-left: 45% }
|
|
111
|
+
|
|
112
|
+
/* toggle size, three items, has dropdown */
|
|
113
|
+
.common-editor-toggle-handle { width: 30% }
|
|
114
|
+
.common-editor-toggle-item.common-editor-toggle-item-dropdown.selected ~ .common-editor-toggle-handle { width: 40%; }
|
|
115
|
+
|
|
116
|
+
/* toggle positioning, three items, has dropdown */
|
|
117
|
+
.common-editor-toggle-item:nth-of-type(2).selected ~ .common-editor-toggle-handle { margin-left: 30%; }
|
|
118
|
+
.common-editor-toggle-item:nth-of-type(3).selected ~ .common-editor-toggle-handle { margin-left: 60%; }
|
|
119
|
+
|
|
120
|
+
/* toggle positioning, three items, first item in toggle has dropdown */
|
|
121
|
+
.common-editor-toggle-item.common-editor-toggle-item-dropdown + .common-editor-toggle-item.selected ~ .common-editor-toggle-handle { margin-left: 40%; }
|
|
122
|
+
.common-editor-toggle-item.common-editor-toggle-item-dropdown + .common-editor-toggle-item + .common-editor-toggle-item.selected ~ .common-editor-toggle-handle { margin-left: 70%; }
|
|
123
|
+
|
|
124
|
+
/* toggle positioning, three items, second item in toggle has dropdown */
|
|
125
|
+
.common-editor-toggle-item + .common-editor-toggle-item.common-editor-toggle-item-dropdown + .common-editor-toggle-item.selected ~ .common-editor-toggle-handle { margin-left: 70%; }
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
/*****************************************************
|
|
131
|
+
* Tablet View *
|
|
132
|
+
****************************************************/
|
|
133
|
+
|
|
134
|
+
@media @tabletAndBelow {
|
|
135
|
+
.common-editor-toggle.tablet-compact {
|
|
136
|
+
& > .common-editor-toggle-item > .common-button {
|
|
137
|
+
padding-left: 0.5rem;
|
|
138
|
+
padding-right: 0.5rem;
|
|
139
|
+
.common-button-label {
|
|
140
|
+
display: none;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
&.has-dropdown {
|
|
145
|
+
.common-editor-toggle-item {
|
|
146
|
+
flex: 25;
|
|
147
|
+
}
|
|
148
|
+
.common-editor-toggle-item.common-editor-toggle-item-dropdown {
|
|
149
|
+
flex: 50;
|
|
150
|
+
display: grid;
|
|
151
|
+
grid-template-columns: 1fr 1fr;
|
|
152
|
+
}
|
|
153
|
+
.common-editor-toggle-handle { width: 25%; }
|
|
154
|
+
.common-editor-toggle-item-dropdown.selected ~ .common-editor-toggle-handle { width: 50%; }
|
|
155
|
+
|
|
156
|
+
/* flex balance, two items, has dropdown (33% to non-dropdown, 67% to dropdown) */
|
|
157
|
+
.common-editor-toggle-item:first-child:nth-last-child(3) ~ .common-editor-toggle-item-dropdown,
|
|
158
|
+
.common-editor-toggle-item.common-editor-toggle-item-dropdown:first-child:nth-last-child(3) { flex: 67 }
|
|
159
|
+
.common-editor-toggle-item:first-child:nth-last-child(3),
|
|
160
|
+
.common-editor-toggle-item-dropdown:first-child:nth-last-child(3) ~ .common-editor-toggle-item { flex: 33 }
|
|
161
|
+
|
|
162
|
+
/* toggle size, two items, has dropdown */
|
|
163
|
+
.common-editor-toggle-item:first-child:nth-last-child(3) ~ .common-editor-toggle-handle { width: 33% }
|
|
164
|
+
.common-editor-toggle-item:first-child:nth-last-child(3) ~ .common-editor-toggle-item-dropdown.selected ~ .common-editor-toggle-handle,
|
|
165
|
+
.common-editor-toggle-item.common-editor-toggle-item-dropdown.selected:first-child:nth-last-child(3) ~ .common-editor-toggle-handle { width: 67% }
|
|
166
|
+
|
|
167
|
+
/* toggle positioning, two items, first item has dropdown */
|
|
168
|
+
.common-editor-toggle-item.common-editor-toggle-item-dropdown:first-child:nth-last-child(3) + .selected ~ .common-editor-toggle-handle { margin-left: 67% }
|
|
169
|
+
|
|
170
|
+
/* toggle positioning, two items, second item has dropdown */
|
|
171
|
+
.common-editor-toggle-item:first-child:nth-last-child(3) + .common-editor-toggle-item-dropdown.selected ~ .common-editor-toggle-handle { margin-left: 33% }
|
|
172
|
+
|
|
173
|
+
/* toggle positioning, first item in toggle has dropdown */
|
|
174
|
+
.common-editor-toggle-item.common-editor-toggle-item-dropdown + .common-editor-toggle-item.selected ~ .common-editor-toggle-handle { margin-left: 50%; }
|
|
175
|
+
.common-editor-toggle-item.common-editor-toggle-item-dropdown + .common-editor-toggle-item + .common-editor-toggle-item.selected ~ .common-editor-toggle-handle { margin-left: 75%; }
|
|
176
|
+
|
|
177
|
+
/* toggle positioning, second item in toggle has dropdown */
|
|
178
|
+
.common-editor-toggle-item + .common-editor-toggle-item.common-editor-toggle-item-dropdown.selected ~ .common-editor-toggle-handle { margin-left: 25%; }
|
|
179
|
+
.common-editor-toggle-item + .common-editor-toggle-item.common-editor-toggle-item-dropdown + .common-editor-toggle-item.selected ~ .common-editor-toggle-handle { margin-left: 75%; }
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// Same as tablet
|
|
185
|
+
@media @mobileAndBelow {
|
|
186
|
+
.common-editor-toggle.mobile-compact {
|
|
187
|
+
& > .common-editor-toggle-item > .common-button {
|
|
188
|
+
padding-left: 0.5rem;
|
|
189
|
+
padding-right: 0.5rem;
|
|
190
|
+
.common-button-label {
|
|
191
|
+
display: none;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
&.has-dropdown {
|
|
196
|
+
.common-editor-toggle-item {
|
|
197
|
+
flex: 25;
|
|
198
|
+
}
|
|
199
|
+
.common-editor-toggle-item.common-editor-toggle-item-dropdown {
|
|
200
|
+
flex: 50;
|
|
201
|
+
display: grid;
|
|
202
|
+
grid-template-columns: 1fr 1fr;
|
|
203
|
+
}
|
|
204
|
+
.common-editor-toggle-handle { width: 25%; }
|
|
205
|
+
.common-editor-toggle-item-dropdown.selected ~ .common-editor-toggle-handle { width: 50%; }
|
|
206
|
+
|
|
207
|
+
/* flex balance, two items, has dropdown (33% to non-dropdown, 67% to dropdown) */
|
|
208
|
+
.common-editor-toggle-item:first-child:nth-last-child(3) ~ .common-editor-toggle-item-dropdown,
|
|
209
|
+
.common-editor-toggle-item.common-editor-toggle-item-dropdown:first-child:nth-last-child(3) { flex: 67 }
|
|
210
|
+
.common-editor-toggle-item:first-child:nth-last-child(3),
|
|
211
|
+
.common-editor-toggle-item-dropdown:first-child:nth-last-child(3) ~ .common-editor-toggle-item { flex: 33 }
|
|
212
|
+
|
|
213
|
+
/* toggle size, two items, has dropdown */
|
|
214
|
+
.common-editor-toggle-item:first-child:nth-last-child(3) ~ .common-editor-toggle-handle { width: 33% }
|
|
215
|
+
.common-editor-toggle-item:first-child:nth-last-child(3) ~ .common-editor-toggle-item-dropdown.selected ~ .common-editor-toggle-handle,
|
|
216
|
+
.common-editor-toggle-item.common-editor-toggle-item-dropdown.selected:first-child:nth-last-child(3) ~ .common-editor-toggle-handle { width: 67% }
|
|
217
|
+
|
|
218
|
+
/* toggle positioning, two items, first item has dropdown */
|
|
219
|
+
.common-editor-toggle-item.common-editor-toggle-item-dropdown:first-child:nth-last-child(3) + .selected ~ .common-editor-toggle-handle { margin-left: 67% }
|
|
220
|
+
|
|
221
|
+
/* toggle positioning, two items, second item has dropdown */
|
|
222
|
+
.common-editor-toggle-item:first-child:nth-last-child(3) + .common-editor-toggle-item-dropdown.selected ~ .common-editor-toggle-handle { margin-left: 33% }
|
|
223
|
+
|
|
224
|
+
/* toggle positioning, first item in toggle has dropdown */
|
|
225
|
+
.common-editor-toggle-item.common-editor-toggle-item-dropdown + .common-editor-toggle-item.selected ~ .common-editor-toggle-handle { margin-left: 50%; }
|
|
226
|
+
.common-editor-toggle-item.common-editor-toggle-item-dropdown + .common-editor-toggle-item + .common-editor-toggle-item.selected ~ .common-editor-toggle-handle { margin-left: 75%; }
|
|
227
|
+
|
|
228
|
+
/* toggle positioning, second item in toggle has dropdown */
|
|
229
|
+
.common-editor-toggle-item + .common-editor-toggle-item.common-editor-toggle-item-dropdown.selected ~ .common-editor-toggle-handle { margin-left: 25%; }
|
|
230
|
+
.common-editor-toggle-item + .common-editor-toggle-item.common-editor-toggle-item-dropdown + .common-editor-toggle-item.selected ~ .common-editor-toggle-handle { margin-left: 75%; }
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is the same as react-common-skillmap.less except it doesn't import any
|
|
3
|
+
* variables from the target. This is used for pxt-core's css build
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
// Import variables from pxt-core
|
|
7
|
+
@import "themes/default/globals/site.variables";
|
|
8
|
+
@import "themes/pxt/globals/site.variables";
|
|
9
|
+
|
|
10
|
+
@import "react-common.less";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Used for building react-common-skillmap.css
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
// Import variables from pxt-core
|
|
6
|
+
@import "themes/default/globals/site.variables";
|
|
7
|
+
@import "themes/pxt/globals/site.variables";
|
|
8
|
+
|
|
9
|
+
// Import the variables from the target
|
|
10
|
+
@import "site/globals/site.variables";
|
|
11
|
+
|
|
12
|
+
@import "react-common.less";
|
|
@@ -74,6 +74,13 @@
|
|
|
74
74
|
@inputButtonColor: rgb(0, 120, 212);
|
|
75
75
|
@inputButtonColorHover: rgb(16, 110, 190);
|
|
76
76
|
|
|
77
|
+
/****************************************************
|
|
78
|
+
* EditorToggle *
|
|
79
|
+
****************************************************/
|
|
80
|
+
@editorToggleBackgroundColor: rgba(52,73,94,.4);
|
|
81
|
+
@editorToggleBorderColor: rgba(52,73,94,.2);
|
|
82
|
+
@editorToggleBorderWidth: 3px;
|
|
83
|
+
|
|
77
84
|
/****************************************************
|
|
78
85
|
* High Contrast *
|
|
79
86
|
****************************************************/
|
|
@@ -103,6 +103,13 @@
|
|
|
103
103
|
flex: 1;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
+
.image-editor-header-center {
|
|
107
|
+
flex: 1.5;
|
|
108
|
+
display: flex;
|
|
109
|
+
justify-content: center;
|
|
110
|
+
align-items: center;
|
|
111
|
+
}
|
|
112
|
+
|
|
106
113
|
.image-editor-header-right {
|
|
107
114
|
display: flex;
|
|
108
115
|
justify-content: flex-end;
|
|
@@ -146,10 +153,6 @@
|
|
|
146
153
|
flex: 3!important;
|
|
147
154
|
}
|
|
148
155
|
|
|
149
|
-
.image-editor-header-left {
|
|
150
|
-
display: none;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
156
|
.gallery-editor-toggle {
|
|
154
157
|
margin-left: .25rem!important;
|
|
155
158
|
flex-shrink: 1;
|
|
@@ -186,118 +189,6 @@
|
|
|
186
189
|
|
|
187
190
|
}
|
|
188
191
|
|
|
189
|
-
.gallery-editor-toggle {
|
|
190
|
-
display: flex;
|
|
191
|
-
flex-direction: row;
|
|
192
|
-
position: relative;
|
|
193
|
-
|
|
194
|
-
height: 2.25rem;
|
|
195
|
-
line-height: 2.25rem;
|
|
196
|
-
|
|
197
|
-
background-color: #4572cf;
|
|
198
|
-
border: 2px solid #4067b3;
|
|
199
|
-
border-radius: 5px;
|
|
200
|
-
width: 24rem;
|
|
201
|
-
margin-top: 0.25rem;
|
|
202
|
-
|
|
203
|
-
margin-left: auto;
|
|
204
|
-
margin-right: auto;
|
|
205
|
-
cursor: pointer;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
.gallery-editor-toggle.right {
|
|
209
|
-
.gallery-editor-toggle-handle {
|
|
210
|
-
/* Subtract small margin for rightmost element */
|
|
211
|
-
transform: translateX(calc(16rem - 0.2rem));
|
|
212
|
-
}
|
|
213
|
-
.gallery-editor-toggle-right {
|
|
214
|
-
color: #4B7BEC;
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
.gallery-editor-toggle.center {
|
|
219
|
-
.gallery-editor-toggle-handle {
|
|
220
|
-
transform: translateX(8rem);
|
|
221
|
-
}
|
|
222
|
-
.gallery-editor-toggle-center {
|
|
223
|
-
color: #4B7BEC;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
.gallery-editor-toggle.left {
|
|
228
|
-
.gallery-editor-toggle-left {
|
|
229
|
-
color: #4B7BEC;
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.gallery-editor-toggle.no-gallery {
|
|
234
|
-
width: 16rem;
|
|
235
|
-
|
|
236
|
-
.gallery-editor-toggle-handle {
|
|
237
|
-
width: 50%;
|
|
238
|
-
}
|
|
239
|
-
.gallery-editor-toggle-label {
|
|
240
|
-
flex-basis: 50%;
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
.gallery-editor-toggle.no-gallery.right {
|
|
245
|
-
.gallery-editor-toggle-handle {
|
|
246
|
-
transform: translateX(8rem);
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
// Microsoft Edge has a bug related to relative z-indices that prevents the handle
|
|
251
|
-
// from appearing below the text, so instead we make the handle transparent and have the text
|
|
252
|
-
// show through
|
|
253
|
-
.gallery-editor-toggle.edge {
|
|
254
|
-
.gallery-editor-toggle-label, .gallery-editor-toggle-label-right, .gallery-editor-toggle-label-left, .gallery-editor-toggle-label-center {
|
|
255
|
-
color: #ffffff;
|
|
256
|
-
z-index: auto;
|
|
257
|
-
}
|
|
258
|
-
.gallery-editor-toggle-handle {
|
|
259
|
-
opacity: 0.3;
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
.gallery-editor-toggle-label {
|
|
264
|
-
display: flex;
|
|
265
|
-
align-items: center;
|
|
266
|
-
justify-content: center;
|
|
267
|
-
flex-basis: 33%;
|
|
268
|
-
text-align: center;
|
|
269
|
-
color: #ffffff;
|
|
270
|
-
z-index: 1;
|
|
271
|
-
transition: color 0.3s;
|
|
272
|
-
user-select: none;
|
|
273
|
-
|
|
274
|
-
& > i.icon {
|
|
275
|
-
display: flex;
|
|
276
|
-
align-items: center;
|
|
277
|
-
justify-content: center;
|
|
278
|
-
flex-shrink: 0;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
span {
|
|
282
|
-
overflow: hidden;
|
|
283
|
-
text-overflow: ellipsis;
|
|
284
|
-
flex-shrink: 1;
|
|
285
|
-
white-space: nowrap;
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
.gallery-editor-toggle-handle {
|
|
290
|
-
width: 33%;
|
|
291
|
-
height: 2rem;
|
|
292
|
-
background-color: white;
|
|
293
|
-
border-radius: 5px;
|
|
294
|
-
position: absolute;
|
|
295
|
-
left: 0;
|
|
296
|
-
|
|
297
|
-
transform: translateX(0);
|
|
298
|
-
transition: transform 0.3s;
|
|
299
|
-
}
|
|
300
|
-
|
|
301
192
|
.gallery-editor-show-tiles {
|
|
302
193
|
position: absolute;
|
|
303
194
|
height: 2.3rem;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<!doctype html><html lang="@locale@"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>MakeCode Device Auth</title><link rel="stylesheet" data-rtl="/blb/rtlsemantic.css" href="/blb/semantic.css"><link rel="stylesheet" href="/blb/icons.css"><link rel="stylesheet" href="/blb/react-common-authcode.css"><script defer="defer" src="/blb/authcode/js/main.03da4c20.js"></script><link href="/blb/authcode/css/main.1cf9dc37.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><script type="text/javascript" src="/blb/target.js"></script><script type="text/javascript" src="/blb/pxtlib.js"></script><div id="root"></div><script>var pxtConfig=null</script></body></html>
|