pxt-core 7.4.10 → 7.4.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.
Files changed (61) hide show
  1. package/built/cli.js +109 -83
  2. package/built/pxt.js +123 -97
  3. package/built/pxtblockly.js +151 -61
  4. package/built/pxtblocks.d.ts +7 -0
  5. package/built/pxtblocks.js +91 -58
  6. package/built/pxtlib.js +14 -14
  7. package/built/target.js +1 -1
  8. package/built/web/blockly.css +1 -1
  9. package/built/web/main.js +1 -1
  10. package/built/web/pxtapp.js +1 -1
  11. package/built/web/pxtasseteditor.js +1 -1
  12. package/built/web/pxtblockly.js +53 -1
  13. package/built/web/pxtblocks.js +1 -1
  14. package/built/web/pxtembed.js +53 -1
  15. package/built/web/pxtlib.js +1 -1
  16. package/built/web/pxtworker.js +1 -1
  17. package/built/web/react-common-skillmap.css +13 -0
  18. package/built/web/rtlblockly.css +1 -1
  19. package/built/web/rtlreact-common-skillmap.css +13 -0
  20. package/built/web/rtlsemantic.css +14 -2
  21. package/built/web/semantic.css +14 -2
  22. package/built/web/skillmap/css/main.369ecead.chunk.css +1 -0
  23. package/built/web/skillmap/js/2.dc66e964.chunk.js +2 -0
  24. package/built/web/skillmap/js/main.e89a1af7.chunk.js +1 -0
  25. package/docfiles/tracking.html +1 -1
  26. package/localtypings/pxtarget.d.ts +1 -0
  27. package/localtypings/pxtblockly.d.ts +37 -0
  28. package/package.json +7 -3
  29. package/react-common/components/Checkbox.tsx +25 -0
  30. package/react-common/components/Notification.tsx +82 -0
  31. package/react-common/components/controls/Button.tsx +62 -0
  32. package/react-common/components/controls/List.tsx +29 -0
  33. package/react-common/components/profile/Badge.tsx +33 -0
  34. package/react-common/components/profile/BadgeInfo.tsx +74 -0
  35. package/react-common/components/profile/BadgeList.tsx +67 -0
  36. package/react-common/components/profile/Profile.tsx +42 -0
  37. package/react-common/components/profile/UserNotification.tsx +32 -0
  38. package/react-common/components/profile/UserPane.tsx +64 -0
  39. package/react-common/components/types.d.ts +29 -0
  40. package/react-common/components/util.tsx +52 -0
  41. package/react-common/styles/controls/Button.less +157 -0
  42. package/react-common/styles/controls/Icon.less +11 -0
  43. package/react-common/styles/controls/List.less +12 -0
  44. package/{built/web/react-common.css → react-common/styles/profile/profile.less} +1 -0
  45. package/react-common/styles/react-common-skillmap-core.less +10 -0
  46. package/react-common/styles/react-common-skillmap.less +12 -0
  47. package/react-common/styles/react-common-variables.less +12 -0
  48. package/react-common/styles/react-common.less +8 -0
  49. package/react-common/tsconfig.json +36 -0
  50. package/theme/blockly-core.less +16 -0
  51. package/theme/common-components.less +7 -0
  52. package/theme/common.less +1 -1
  53. package/theme/highcontrast.less +4 -0
  54. package/theme/pxt.less +2 -0
  55. package/theme/tutorial-sidebar.less +64 -6
  56. package/webapp/public/blockly/blockly_compressed.js +3 -3
  57. package/webapp/public/blockly/plugins.js +57 -0
  58. package/webapp/public/skillmap.html +3 -3
  59. package/built/web/skillmap/css/main.96b1b3f1.chunk.css +0 -1
  60. package/built/web/skillmap/js/2.7dd06a3a.chunk.js +0 -2
  61. package/built/web/skillmap/js/main.d5bb4f6b.chunk.js +0 -1
@@ -0,0 +1,33 @@
1
+ import * as React from "react";
2
+ import { fireClickOnEnter } from "../util";
3
+
4
+ export interface BadgeProps {
5
+ onClick?: (badge: pxt.auth.Badge) => void;
6
+ badge: pxt.auth.Badge;
7
+ disabled?: boolean;
8
+ isNew?: boolean;
9
+ }
10
+
11
+ export const Badge = (props: BadgeProps) => {
12
+ const { badge, disabled, isNew, onClick } = props;
13
+
14
+ const onBadgeClick = onClick && (() => {
15
+ onClick(badge);
16
+ })
17
+
18
+ const image = (disabled && badge.lockedImage) || badge.image;
19
+ const alt = disabled ? pxt.U.lf("Locked '{0}' badge", badge.title) : badge.title;
20
+
21
+ return (
22
+ <div className={`profile-badge ${onClick ? "clickable" : ""}`}
23
+ role={onClick ? "button" : undefined}
24
+ tabIndex={onClick ? 0 : undefined}
25
+ title={lf("{0} Badge", badge.title)}
26
+ onClick={onBadgeClick}
27
+ onKeyDown={fireClickOnEnter}>
28
+ {isNew && <div className="profile-badge-notification">{pxt.U.lf("New!")}</div>}
29
+ <img src={image} alt={alt} />
30
+ </div>
31
+ );
32
+ }
33
+
@@ -0,0 +1,74 @@
1
+ import * as React from "react";
2
+ import { jsxLF } from "../util";
3
+ import { Badge } from "./Badge";
4
+
5
+ export interface BadgeInfoProps {
6
+ badge: pxt.auth.Badge;
7
+ }
8
+
9
+ export const BadgeInfo = (props: BadgeInfoProps) => {
10
+ const { badge } = props;
11
+
12
+ const date = new Date(badge.timestamp)
13
+
14
+ return <div className="profile-badge-info">
15
+ <div className="profile-badge-info-image">
16
+ <Badge badge={badge} disabled={!badge.timestamp} />
17
+ </div>
18
+ <div className="profile-badge-info-item">
19
+ <div className="profile-badge-info-header">
20
+ {lf("Awarded For:")}
21
+ </div>
22
+ <div className="profile-badge-info-text">
23
+ {badgeDescription(badge)}
24
+ </div>
25
+ </div>
26
+ { badge.timestamp ?
27
+ <div className="profile-badge-info-item">
28
+ <div className="profile-badge-info-header">
29
+ {lf("Awarded On:")}
30
+ </div>
31
+ <div className="profile-badge-info-text">
32
+ {date.toLocaleDateString(pxt.U.userLanguage())}
33
+ </div>
34
+ </div>
35
+ : undefined }
36
+ </div>
37
+ }
38
+
39
+
40
+ export const badgeDescription = (badge: pxt.auth.Badge) => {
41
+ switch (badge.type) {
42
+ case "skillmap-completion":
43
+ return <span>{jsxLF(
44
+ lf("Completing {0}"),
45
+ <a target="_blank" rel="noopener noreferrer" href={sourceURLToSkillmapURL(badge.sourceURL)}>{pxt.U.rlf(badge.title)}</a>
46
+ )}</span>
47
+ }
48
+ }
49
+
50
+ function sourceURLToSkillmapURL(sourceURL: string) {
51
+ if (sourceURL.indexOf("/api/md/") !== -1) {
52
+ // docs url: https://www.makecode.com/api/md/arcade/skillmap/forest
53
+ const path = sourceURL.split("/api/md/")[1];
54
+ // remove the target from the url
55
+ const docsPath = path.split("/").slice(1).join("/");
56
+ return pxt.webConfig?.skillmapUrl + "#docs:" + docsPath;
57
+ }
58
+ else {
59
+ // github url: /user/repo#filename
60
+ const parts = sourceURL.split("#");
61
+
62
+ if (parts.length == 2) {
63
+ return pxt.webConfig.skillmapUrl + "#github:https://github.com/" + parts[0] + "/" + parts[1];
64
+ }
65
+ }
66
+
67
+ if (pxt.BrowserUtils.isLocalHostDev()) {
68
+ // local url: skillmap/forest
69
+ return "http://localhost:3000#local:" + sourceURL
70
+ }
71
+
72
+ return sourceURL;
73
+ }
74
+
@@ -0,0 +1,67 @@
1
+ import * as React from "react";
2
+ import { Badge } from "./Badge";
3
+
4
+ export interface BadgeListProps {
5
+ onBadgeClick: (badge: pxt.auth.Badge) => void;
6
+ availableBadges: pxt.auth.Badge[];
7
+ userState: pxt.auth.UserBadgeState;
8
+ }
9
+
10
+ export const BadgeList = (props: BadgeListProps) => {
11
+ const { onBadgeClick, availableBadges, userState } = props;
12
+
13
+ const badges = availableBadges.slice();
14
+
15
+ let unlocked: pxt.Map<boolean> = {};
16
+
17
+ for (const badge of userState.badges) {
18
+ unlocked[badge.id] = true;
19
+ const existing = badges.findIndex(b => b.id === badge.id);
20
+ if (existing > -1) {
21
+ badges[existing] = {
22
+ ...badges[existing],
23
+ timestamp: badges[existing].timestamp || badge.timestamp
24
+ }
25
+ } else {
26
+ badges.push(badge);
27
+ }
28
+ }
29
+
30
+ const bg: JSX.Element[] = []
31
+ for (let i = 0; i < Math.max(badges.length + 10, 20); i++) {
32
+ bg.push(<div key={i} className="placeholder-badge" />)
33
+ }
34
+
35
+ return <div className="profile-badge-list">
36
+ <div className="profile-badge-header">
37
+ <span className="profile-badge-title">
38
+ {lf("Badges")}
39
+ </span>
40
+
41
+ <span className="profile-badge-subtitle">
42
+ {lf("Click each badge to see details")}
43
+ </span>
44
+ </div>
45
+ <div className="profile-badges-scroller">
46
+ <div className="profile-badges">
47
+ <div className="profile-badges-background-container">
48
+ <div className="profile-badges-background">
49
+ { bg }
50
+ </div>
51
+ </div>
52
+ { badges.map(badge =>
53
+ <div className="profile-badge-and-title">
54
+ <Badge key={badge.id}
55
+ onClick={onBadgeClick}
56
+ badge={badge}
57
+ disabled={!unlocked[badge.id]}
58
+ />
59
+ <div className="profile-badge-name">
60
+ {badge.title}
61
+ </div>
62
+ </div>
63
+ ) }
64
+ </div>
65
+ </div>
66
+ </div>
67
+ }
@@ -0,0 +1,42 @@
1
+ /// <reference path="../types.d.ts" />
2
+
3
+ import * as React from "react";
4
+ import { BadgeList } from "./BadgeList";
5
+ import { UserPane } from "./UserPane";
6
+ import { BadgeInfo } from "./BadgeInfo";
7
+ import { CheckboxStatus } from "../Checkbox";
8
+
9
+ export interface ProfileProps {
10
+ user: pxt.auth.State;
11
+ signOut: () => void;
12
+ deleteProfile: () => void;
13
+ checkedEmail: CheckboxStatus;
14
+ onClickedEmail: (isChecked: boolean) => void;
15
+ notification?: pxt.ProfileNotification;
16
+ showModalAsync(options: DialogOptions): Promise<void>;
17
+ }
18
+
19
+ export const Profile = (props: ProfileProps) => {
20
+ const { user, signOut, deleteProfile, onClickedEmail, notification, checkedEmail, showModalAsync } = props;
21
+ const userProfile = user?.profile || { idp: {} };
22
+ const userBadges = user?.preferences?.badges || { badges: [] };
23
+
24
+ const onBadgeClick = (badge: pxt.auth.Badge) => {
25
+ showModalAsync({
26
+ header: lf("{0} Badge", badge.title),
27
+ size: "tiny",
28
+ hasCloseIcon: true,
29
+ jsx: <BadgeInfo badge={badge} />
30
+ });
31
+ }
32
+
33
+ return <div className="user-profile">
34
+ <UserPane profile={userProfile} onSignOutClick={signOut} onDeleteProfileClick={deleteProfile} notification={notification}
35
+ emailChecked={checkedEmail} onEmailCheckClick={onClickedEmail}/>
36
+ <BadgeList
37
+ availableBadges={pxt.appTarget.defaultBadges || []}
38
+ userState={userBadges}
39
+ onBadgeClick={onBadgeClick}
40
+ />
41
+ </div>
42
+ }
@@ -0,0 +1,32 @@
1
+ import * as React from "react";
2
+
3
+ export interface UserNotificationProps {
4
+ notification: pxt.ProfileNotification;
5
+ }
6
+
7
+ export const UserNotification = (props: UserNotificationProps) => {
8
+ const { message, icon, actionText, link, xicon, title } = props.notification;
9
+
10
+ const onActionClick = () => {
11
+ window.open(link, "_blank");
12
+ }
13
+
14
+
15
+ return (
16
+ <div className="profile-notification">
17
+ <div className="profile-notification-icon">
18
+ <i className={`${xicon ? "xicon" : "ui large circular icon "} ${icon}`} />
19
+ </div>
20
+ <div className="profile-notification-title">
21
+ {title}
22
+ </div>
23
+ <div className="profile-notification-message">
24
+ {message}
25
+ </div>
26
+ <button className="ui icon button profile-notification-button" onClick={onActionClick} role="link" >
27
+ <i className="icon external alternate"></i>
28
+ {actionText}
29
+ </button>
30
+ </div>
31
+ );
32
+ }
@@ -0,0 +1,64 @@
1
+ import * as React from "react";
2
+ import { fireClickOnEnter } from "../util";
3
+ import { UserNotification } from "./UserNotification";
4
+ import { Checkbox, CheckboxStatus } from "../Checkbox";
5
+
6
+ export interface UserPaneProps {
7
+ profile: pxt.auth.UserProfile;
8
+ notification?: pxt.ProfileNotification;
9
+ emailChecked: CheckboxStatus;
10
+
11
+ onSignOutClick: () => void;
12
+ onDeleteProfileClick: () => void;
13
+ onEmailCheckClick: (isChecked: boolean) => void;
14
+ }
15
+
16
+ export const UserPane = (props: UserPaneProps) => {
17
+ const { profile, onSignOutClick, onDeleteProfileClick, onEmailCheckClick, notification, emailChecked } = props;
18
+
19
+ const { username, displayName, picture } = profile.idp;
20
+
21
+ const checkboxLabel = "email-optin-label"
22
+
23
+ return <div className="profile-user-pane">
24
+ <div className="profile-portrait">
25
+ { picture?.dataUrl ?
26
+ <img src={picture?.dataUrl} alt={pxt.U.lf("Profile Picture")} />
27
+ : <div className="profile-initials-portrait">
28
+ {pxt.auth.userInitials(profile)}
29
+ </div>
30
+ }
31
+ </div>
32
+ <div className="profile-user-details">
33
+ <div className="profile-display-name">
34
+ {displayName}
35
+ </div>
36
+ { username &&
37
+ <div className="profile-username">
38
+ {username}
39
+ </div>
40
+ }
41
+ </div>
42
+ { notification && <UserNotification notification={notification}/> }
43
+ <div className="profile-spacer"></div>
44
+ <div className="profile-email">
45
+ <Checkbox isChecked={emailChecked} onClick={onEmailCheckClick} label={checkboxLabel}/>
46
+ <div id={checkboxLabel}>
47
+ {lf("I would like to receive the MakeCode newsletter. ")}
48
+ <a href="https://makecode.com/privacy" target="_blank" rel="noopener noreferrer">{lf("View Privacy Statement")}</a>
49
+ </div>
50
+ </div>
51
+ <div className="profile-actions">
52
+ <a role="button"
53
+ tabIndex={0}
54
+ onKeyPress={fireClickOnEnter}
55
+ onClick={onDeleteProfileClick}>
56
+ {lf("Delete Profile")}
57
+ </a>
58
+ <button onClick={onSignOutClick} className="ui icon button sign-out">
59
+ <i className="icon sign-out"></i>
60
+ {lf("Sign Out")}
61
+ </button>
62
+ </div>
63
+ </div>
64
+ }
@@ -0,0 +1,29 @@
1
+ /// <reference path="../../built/pxtlib.d.ts" />
2
+
3
+
4
+ interface DialogOptions {
5
+ type?: string;
6
+ hideCancel?: boolean;
7
+ disagreeLbl?: string;
8
+ disagreeClass?: string;
9
+ disagreeIcon?: string;
10
+ logos?: string[];
11
+ className?: string;
12
+ header: string;
13
+ headerIcon?: string;
14
+ body?: string;
15
+ jsx?: JSX.Element;
16
+ jsxd?: () => JSX.Element; // dynamic-er version of jsx
17
+ copyable?: string;
18
+ size?: "" | "small" | "fullscreen" | "large" | "mini" | "tiny"; // defaults to "small"
19
+ onLoaded?: (_: HTMLElement) => void;
20
+ // buttons?: sui.ModalButton[];
21
+ timeout?: number;
22
+ modalContext?: string;
23
+ hasCloseIcon?: boolean;
24
+ helpUrl?: string;
25
+ bigHelpButton?: boolean;
26
+ confirmationText?: string; // Display a text input the user must type to confirm.
27
+ confirmationCheckbox?: string; // Display a checkbox the user must check to confirm.
28
+ confirmationGranted?: boolean;
29
+ }
@@ -0,0 +1,52 @@
1
+ import * as React from "react";
2
+
3
+ export interface ControlProps {
4
+ id?: string;
5
+ className?: string;
6
+ ariaLabel?: string;
7
+ ariaHidden?: boolean;
8
+ role?: string;
9
+ }
10
+
11
+ export function jsxLF(loc: string, ...rest: JSX.Element[]) {
12
+ const indices: number[] = [];
13
+
14
+ loc.replace(/\{\d\}/g, match => {
15
+ indices.push(parseInt(match.substr(1, 1)));
16
+ return match;
17
+ });
18
+
19
+ const out: JSX.Element[] = [];
20
+
21
+ let parts: string[];
22
+
23
+ let i = 0;
24
+
25
+ for (const index of indices) {
26
+ parts = loc.split(`{${index}}`);
27
+ pxt.U.assert(parts.length === 2);
28
+ out.push(<span key={i++}>{parts[0]}</span>);
29
+ out.push(<span key={i++}>{rest[index]}</span>);
30
+ loc = parts[1]
31
+ }
32
+ out.push(<span key={i++}>{loc}</span>);
33
+
34
+ return out;
35
+ }
36
+
37
+ export function fireClickOnEnter(e: React.KeyboardEvent<HTMLElement>) {
38
+ const charCode = (typeof e.which == "number") ? e.which : e.keyCode;
39
+ if (charCode === 13 /* enter */ || charCode === 32 /* space */) {
40
+ e.preventDefault();
41
+ e.currentTarget.click();
42
+ }
43
+ }
44
+
45
+ export function classList(...classes: string[]) {
46
+ return classes
47
+ .filter(c => typeof c === "string")
48
+ .reduce((prev, c) => prev.concat(c.split(" ")), [] as string[])
49
+ .map(c => c.trim())
50
+ .filter(c => !!c)
51
+ .join(" ");
52
+ }
@@ -0,0 +1,157 @@
1
+ .common-button {
2
+ cursor: pointer;
3
+ display: inline-block;
4
+ min-height: 1rem;
5
+ outline: none;
6
+ border: none;
7
+ vertical-align: middle;
8
+ color: @buttonTextColor;
9
+ background: @buttonBackgroundColor;
10
+ font-family: @pageFont;
11
+ margin: 0 0.25rem 0 0;
12
+ padding: 0.8rem 2rem 0.95rem;
13
+ text-transform: none;
14
+ text-shadow: none;
15
+ font-weight: 400;
16
+ line-height: 1em;
17
+ font-style: normal;
18
+ text-align: center;
19
+ text-decoration: none;
20
+ border-radius: 0.2em;
21
+ user-select: none;
22
+ transition: opacity .1s ease,background-color .1s ease,box-shadow .1s ease,color .1s ease,background .1s ease;
23
+ -webkit-tap-highlight-color: transparent;
24
+ }
25
+
26
+ .common-button:hover {
27
+ filter: grayscale(.15) brightness(.85) contrast(1.3);
28
+ }
29
+
30
+ .common-button .right {
31
+ margin-left: 0.5rem;
32
+ }
33
+
34
+ /****************************************************
35
+ * Color Variants *
36
+ ****************************************************/
37
+
38
+ .common-button.primary {
39
+ background: @primaryColor;
40
+ color: @buttonTextColorInverted;
41
+ border: 1px solid @primaryColor;
42
+ }
43
+
44
+ .common-button.secondary {
45
+ background: @secondaryColor;
46
+ color: @buttonTextColorInverted;
47
+ border: 1px solid @secondaryColor;
48
+ }
49
+
50
+ .common-button.teal {
51
+ background: @teal;
52
+ color: @buttonTextColorInverted;
53
+ border: 1px solid @teal;
54
+ }
55
+
56
+ .common-button.orange {
57
+ background: @orange;
58
+ color: @buttonTextColorInverted;
59
+ border: 1px solid @orange;
60
+ }
61
+
62
+ .common-button.red {
63
+ background: @red;
64
+ color: @buttonTextColorInverted;
65
+ border: 1px solid @red;
66
+ }
67
+
68
+ .common-button.green {
69
+ background: @green;
70
+ color: @buttonTextColorInverted;
71
+ border: 1px solid @green;
72
+ }
73
+
74
+ .common-button.primary.inverted {
75
+ background: @buttonTextColorInverted;
76
+ color: @primaryColor;
77
+ }
78
+
79
+ .common-button.teal.inverted {
80
+ background: @buttonTextColorInverted;
81
+ color: @teal;
82
+ }
83
+
84
+ .common-button.orange.inverted {
85
+ background: @buttonTextColorInverted;
86
+ color: @orange;
87
+ }
88
+
89
+ .common-button.red.inverted {
90
+ background: @buttonTextColorInverted;
91
+ color: @red;
92
+ }
93
+
94
+ .common-button.green.inverted {
95
+ background: @buttonTextColorInverted;
96
+ color: @green;
97
+ }
98
+
99
+
100
+ /****************************************************
101
+ * Disabled Buttons *
102
+ ****************************************************/
103
+
104
+ .common-button.disabled:hover {
105
+ filter: none;
106
+ }
107
+
108
+ .common-button.disabled,
109
+ .common-button.disabled.primary,
110
+ .common-button.disabled.primary.inverted,
111
+ .common-button.disabled.secondary,
112
+ .common-button.disabled.secondary.inverted,
113
+ .common-button.disabled.teal,
114
+ .common-button.disabled.teal.inverted,
115
+ .common-button.disabled.orange,
116
+ .common-button.disabled.orange.inverted,
117
+ .common-button.disabled.red,
118
+ .common-button.disabled.red.inverted,
119
+ .common-button.disabled.green,
120
+ .common-button.disabled.green.inverted
121
+ {
122
+ cursor: default;
123
+ background-color: @buttonBackgroundColorDisabled;
124
+ color: @buttonTextColor;
125
+ border: @buttonBackgroundColorDisabled;
126
+ }
127
+
128
+
129
+ /****************************************************
130
+ * Menu Buttons *
131
+ ****************************************************/
132
+
133
+ .common-button.menu-button {
134
+ background: none;
135
+ border: none;
136
+ color: @buttonMenuTextColor;
137
+ height: 100%;
138
+ padding: 0em 1rem 0rem;
139
+ margin: 0;
140
+ border-radius: 0;
141
+ font-size: 20px;
142
+
143
+ i.fas, i.far, .icon, .xicon {
144
+ font-size: 24px;
145
+ }
146
+ }
147
+
148
+ .common-button.menu-button:hover {
149
+ background: rgba(0,0,0,.1);
150
+ }
151
+
152
+ .common-button.menu-button.inverted,
153
+ .common-button.menu-button.inverted:hover {
154
+ background: @buttonMenuBackgroundColorInverted;
155
+ color: @buttonMenuTextColorInverted;
156
+ }
157
+
@@ -0,0 +1,11 @@
1
+ i.far, i.fas {
2
+ margin: 0 0.25rem 0 0;
3
+ text-align: center;
4
+ width: 1.81rem;
5
+ line-height: inherit;
6
+ font-size: 18px;
7
+ }
8
+
9
+ i.far.large, i.fas.large {
10
+ font-size: 24px;
11
+ }
@@ -0,0 +1,12 @@
1
+ .common-list {
2
+ display: flex;
3
+ flex-direction: column;
4
+
5
+ .common-list-item {
6
+ margin-bottom: 0.25rem;
7
+ }
8
+ }
9
+
10
+ .common-list.horizontal {
11
+ flex-direction: row;
12
+ }
@@ -70,6 +70,7 @@
70
70
 
71
71
  .profile-email {
72
72
  display: flex;
73
+ padding-bottom: 1rem;
73
74
  }
74
75
 
75
76
  .profile-email .checkbox {
@@ -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";
@@ -0,0 +1,12 @@
1
+ /****************************************************
2
+ * Buttons *
3
+ ****************************************************/
4
+
5
+ @buttonTextColor: rgb(50, 49, 48);
6
+ @buttonTextColorInverted: @white;
7
+ @buttonBackgroundColor: @white;
8
+ @buttonBackgroundColorDisabled: rgb(243, 242, 241);
9
+
10
+ @buttonMenuTextColor: #ffffff;
11
+ @buttonMenuTextColorInverted: @primaryColor;
12
+ @buttonMenuBackgroundColorInverted: @buttonMenuTextColor;
@@ -0,0 +1,8 @@
1
+ @import "profile/profile.less";
2
+ @import "controls/Button.less";
3
+ @import "controls/Icon.less";
4
+ @import "./react-common-variables.less";
5
+
6
+ @import "fontawesome-free/less/solid.less";
7
+ @import "fontawesome-free/less/regular.less";
8
+ @import "fontawesome-free/less/fontawesome.less";
@@ -0,0 +1,36 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es2017",
4
+ "noImplicitAny": true,
5
+ "noImplicitReturns": true,
6
+ "noImplicitThis": true,
7
+ "module": "commonjs",
8
+ "outDir": "../built/react-common",
9
+ "rootDir": ".",
10
+ "newLine": "LF",
11
+ "sourceMap": false,
12
+ "moduleResolution": "node",
13
+ "isolatedModules": false,
14
+ "jsx": "react",
15
+ "experimentalDecorators": true,
16
+ "emitDecoratorMetadata": true,
17
+ "declaration": true,
18
+ "preserveConstEnums": true,
19
+ "lib": [
20
+ "dom",
21
+ "dom.iterable",
22
+ "scripthost",
23
+ "es2017",
24
+ "ES2018.Promise"
25
+ ],
26
+ "types": [
27
+ "react",
28
+ "react-dom",
29
+ "resize-observer-browser"
30
+ ],
31
+ "incremental": false
32
+ },
33
+ "exclude": [
34
+ "node_modules"
35
+ ]
36
+ }