Skip to content

Commit

Permalink
merge-upstream: update addons
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin committed Dec 30, 2023
1 parent 5b57e3b commit 073067b
Show file tree
Hide file tree
Showing 24 changed files with 64 additions and 109 deletions.
4 changes: 4 additions & 0 deletions src/addons/addons/2d-color-picker/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@
height: 150px;
user-select: none;
}

.sa-2dcolor-label-val {
margin-left: 10px;
}
4 changes: 1 addition & 3 deletions src/addons/addons/blocks2image/userscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ export default async function ({ addon, console, msg }) {
exSVG.setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink");
exSVG.setAttribute("version", "1.1");

const enabledAddons = await addon.self.getEnabledAddons("codeEditor");

addon.tab.createBlockContextMenu(
(items) => {
if (addon.self.disabled) return items;
Expand Down Expand Up @@ -159,7 +157,7 @@ export default async function ({ addon, console, msg }) {
}
if (dataShapes === "hat") {
translateY = 16; // for Events
if (enabledAddons.includes("cat-blocks")) {
if (block.CAT_BLOCKS) {
translateY += 16; // for cat ears
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/addons/addons/cat-blocks/userscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ export default async function ({ addon, console }) {

const shouldWatchMouseCursor = addon.settings.get("watch");

Blockly.BlockSvg.prototype.CAT_BLOCKS = true;

Blockly.BlockSvg.START_HAT_HEIGHT = 31;

Blockly.BlockSvg.START_HAT_PATH =
Expand Down
2 changes: 2 additions & 0 deletions src/addons/addons/clones/_manifest_entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@ const manifest = {
],
"settings": [
{
"dynamic": true,
"id": "projectpage",
"name": "Show on project page",
"default": false,
"type": "boolean"
},
{
"dynamic": true,
"id": "showicononly",
"name": "Show icon only",
"default": false,
Expand Down
2 changes: 1 addition & 1 deletion src/addons/addons/clones/userscript.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export default async function ({ addon, console, msg }) {
reduxEvents: ["scratch-gui/mode/SET_PLAYER", "fontsLoaded/SET_FONTS_LOADED", "scratch-gui/locales/SELECT_LOCALE"],
});

if (addon.tab.editorMode === "editor" || addon.tab.redux.state.scratchGui.mode.isEmbedded) {
if (showOnProjectPage || addon.tab.editorMode === "editor" || addon.tab.redux.state.scratchGui.mode.isEmbedded) {
addon.tab.appendToSharedSpace({ space: "afterStopButton", element: countContainerContainer, order: 2 });
doCloneChecks(true);
}
Expand Down
3 changes: 0 additions & 3 deletions src/addons/addons/color-picker/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@
width: 3rem;
height: 2rem;
}
[theme="dark"] .sa-color-picker > .sa-color-picker-color {
background: var(--ui-secondary);
}

.sa-color-picker > .sa-color-picker-text {
box-sizing: border-box;
Expand Down
11 changes: 4 additions & 7 deletions src/addons/addons/columns/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
width: calc(308px - 1rem);
height: calc(1.75rem - 2px);
background-color: transparent;
border-color: var(--ui-black-transparent, rgba(0, 0, 0, 0.15));
border-color: var(--editorDarkMode-border, rgba(0, 0, 0, 0.15));
}

/* [dir] is for specificity to override editor-stage-left */
Expand All @@ -57,7 +57,7 @@
}

[class*="gui_extension-button-container_"]:hover {
background-color: var(--ui-tertiary, white);
background-color: var(--editorDarkMode-accent, white);
}

[class*="gui_extension-button-container_"]::before {
Expand All @@ -77,17 +77,14 @@
[class*="gui_extension-button-container_"]:hover [class*="gui_extension-button-icon_"] {
filter: var(--editorDarkMode-accent-invertedFilter, brightness(0.4));
}
[theme="dark"] [class*="gui_extension-button-icon_"] {
filter: none !important;
}

.sa-add-extension-label {
color: var(--text-primary, #575e75);
color: var(--editorDarkMode-categoryMenu-text, #575e75);
font-size: 0.65rem;
}

[class*="gui_extension-button-container_"]:hover .sa-add-extension-label {
color: var(--text-primary, #575e75);
color: var(--editorDarkMode-accent-text, #575e75);
font-size: 0.65rem;
}

Expand Down
2 changes: 2 additions & 0 deletions src/addons/addons/custom-block-text/_manifest_entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const manifest = {
],
"settings": [
{
"dynamic": true,
"name": "Text size (%)",
"id": "size",
"type": "integer",
Expand All @@ -30,6 +31,7 @@ const manifest = {
"default": 100
},
{
"dynamic": true,
"name": "Bold text",
"id": "bold",
"type": "boolean",
Expand Down
30 changes: 2 additions & 28 deletions src/addons/addons/debugger/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@
width: 565px;
height: 25rem;
}
[theme="dark"] .sa-debugger-interface {
background: var(--ui-primary);
}

.sa-debugger-interface [class*="card_header-buttons_"] {
background-color: #29beb8;
Expand Down Expand Up @@ -80,7 +77,7 @@
background-color: white;
background-clip: padding-box;
border-color: rgba(0, 0, 0, 0.25);
color: #855cd6;
color: var(--looks-secondary);
}
.sa-debugger-tabs li img {
margin: 0;
Expand Down Expand Up @@ -169,11 +166,7 @@
border-bottom: 1px solid rgba(0, 0, 0, 0.15);
padding-left: 4px;
font-family: monospace;
color: #000;
}
[theme="dark"] .sa-debugger-log {
color: var(--text-primary);
border-color: rgba(255, 255, 255, 0.15);
color: black;
}
.sa-debugger-log[data-type="warn"] {
border-color: hsl(50deg, 100%, 75%);
Expand All @@ -185,16 +178,6 @@
color: red;
background-color: hsl(0deg 100% 95%);
}
[theme="dark"] .sa-debugger-log[data-type="warn"] {
border-color: hsl(50deg, 100%, 15%);
color: hsl(39deg 100% 90%);
background-color: hsl(50deg 100% 10%);
}
[theme="dark"] .sa-debugger-log[data-type="error"] {
border-color: hsl(0deg 100% 15%);
color: hsl(0deg 100% 77%);
background-color: hsl(0deg 100% 10%);
}

.sa-debugger-log-repeats {
background-color: hsla(163, 85%, 40%, 1);
Expand All @@ -203,9 +186,6 @@
padding: 1px 6px;
margin-right: 4px;
}
[theme="dark"] .sa-debugger-log-repeats {
color: var(--ui-primary);
}

.sa-debugger-log-icon {
width: 16px;
Expand Down Expand Up @@ -234,9 +214,6 @@
margin-right: 4px;
margin-left: auto;
}
[theme="dark"] .sa-debugger-log-link {
color: inherit;
}
.sa-debugger-log-link:hover {
text-decoration: underline;
color: #855cd6;
Expand Down Expand Up @@ -301,6 +278,3 @@
.sa-debugger-compiler-warning[hidden] {
display: none;
}
[theme="dark"] .sa-debugger-compiler-warning {
color: #bdbdf9;
}
4 changes: 2 additions & 2 deletions src/addons/addons/editor-colored-context-menus/userscript.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.sa-contextmenu-colored .blocklyContextMenu {
background-color: var(--sa-contextmenu-bg) !important;
border-color: var(--sa-contextmenu-border) !important;
background-color: var(--sa-contextmenu-bg);
border-color: var(--sa-contextmenu-border);
}
.sa-contextmenu-colored .blocklyContextMenu .goog-menuitem-highlight,
.sa-contextmenu-colored .s3dev-mi:hover {
Expand Down
5 changes: 3 additions & 2 deletions src/addons/addons/find-bar/userstyle.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,9 @@
.sa-find-dropdown-out.visible {
position: absolute;
width: 16em;
box-shadow: 0px 0px 8px 1px var(--ui-black-transparent, rgba(0, 0, 0, 0.3));
background-color: var(--ui-primary, white);
box-shadow: 0px 0px 8px 1px rgba(0, 0, 0, 0.3);
background-color: var(--ui-modal-background);
outline: 1px solid var(--ui-black-transparent);
}

/* We need to modify Scratch styles so that the place where the find bar is injected */
Expand Down
14 changes: 0 additions & 14 deletions src/addons/addons/gamepad/gamepadlib.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,12 @@
padding: 0;
margin: 0;
}
[theme="dark"] .gamepadlib-keyinput {
background-color: var(--ui-tertiary);
border-color: var(--ui-black-transparent);
color: var(--text-primary);
}
.gamepadlib-mapping[data-value="1"] .gamepadlib-keyinput {
background: yellow;
}
[theme="dark"] .gamepadlib-mapping[data-value="1"] .gamepadlib-keyinput {
background: hsl(60, 100%, 20%)
}
.gamepadlib-keyinput[data-accepting-input="true"] {
background: #d6fff9;
}
[theme="dark"] .gamepadlib-keyinput[data-accepting-input="true"] {
background: hsl(171, 100%, 20%);
}
.gamepadlib-keyinput[data-empty="true"]:not([data-accepting-input="true"]) {
color: #aaa;
font-style: italic;
Expand All @@ -66,9 +55,6 @@
border: 1px solid black;
overflow: hidden;
}
[theme="dark"] .gamepadlib-axis-circle {
border-color: var(--ui-black-transparent);
}
.gamepadlib-axis-dot {
position: absolute;
top: 50%;
Expand Down
2 changes: 2 additions & 0 deletions src/addons/addons/gamepad/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
flex-direction: column;
}
.sa-gamepad-popup-content {
background-color: white !important;
color: #575e75 !important;
padding: 1.5rem 2.25rem;
height: 100%;
overflow-y: auto;
Expand Down
17 changes: 9 additions & 8 deletions src/addons/addons/hide-flyout/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
right: -1px;
}
.sa-flyout-border-1 {
border-left: 1px solid var(--ui-primary, hsla(215, 100%, 95%, 1));
border-left: 1px solid var(--editorDarkMode-page, hsla(215, 100%, 95%, 1));
}
.sa-flyout-border-2 {
border-left: 1px solid var(--ui-black-transparent, rgba(0, 0, 0, 0.15));
border-left: 1px solid var(--editorDarkMode-border, rgba(0, 0, 0, 0.15));
}

.blocklyFlyout,
Expand Down Expand Up @@ -79,8 +79,8 @@
padding: 0;
justify-content: center;
align-items: center;
background-color: var(--ui-primary, white);
border: 1px solid var(--ui-black-transparent, rgba(0, 0, 0, 0.15));
background-color: var(--editorDarkMode-accent, white);
border: 1px solid var(--editorDarkMode-border, rgba(0, 0, 0, 0.15));
border-radius: 4px;
}

Expand All @@ -91,13 +91,14 @@

.sa-lock-button img {
width: 20px;
filter: var(--editorDarkMode-accent-filter, none);
}

[theme="dark"] .sa-lock-button img {
filter: brightness(200%);
.sa-lock-object.locked img {
filter: var(--editorDarkMode-primary-filter, none);
}

.sa-hide-flyout-not-fullscreen [class*="gui_body-wrapper_" ] [class*="gui_stage-and-target-wrapper"] {
.sa-hide-flyout-not-fullscreen .sa-body-editor [class*="gui_stage-and-target-wrapper"] {
position: relative;
/* We need to be above these to hide the flyout while dragging blocks: */
/* .blocklyFlyout (z-index: 20) */
Expand All @@ -107,7 +108,7 @@
/* .gui_extension-button-container_b4rCs (z-index: 42) */
z-index: 43;
padding-inline: 0.5rem;
background-color: var(--ui-primary, hsl(215, 100%, 95%));
background-color: var(--editorDarkMode-page, hsl(215, 100%, 95%));
}

[class*="gui_stage-and-target-wrapper_"] {
Expand Down
1 change: 0 additions & 1 deletion src/addons/addons/mediarecorder/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ p.mediaRecorderPopupOption {
margin-left: 0.5rem;
}

/* TW: Fixes cancel button in dark mode */
.mediaRecorderPopupButtons button:nth-of-type(1) {
color: black;
}
15 changes: 3 additions & 12 deletions src/addons/addons/middle-click-popup/userstyle.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,14 @@

position: absolute;
min-width: 100px;
background-color: white;
background-color: var(--ui-modal-background);
border-radius: 4px;
box-shadow:
rgba(0, 0, 0, 0.3) 0 0 3px,
rgba(0, 0, 0, 0.2) 0 3px 10px;

z-index: 999;
}
[theme="dark"] input.s3devInp {
color: #eee;
background: #3333;
}
[theme="dark"] input.s3devInp:hover {
background: #333;
}

.sa-mcp-container {
display: flex;
Expand All @@ -30,7 +23,8 @@
z-index: 100;
position: absolute;
box-shadow: 0px 0px 8px 1px rgba(0, 0, 0, 0.3);
background-color: white;
background-color: var(--ui-modal-background);
outline: 1px solid var(--ui-black-transparent);
border: none;
border-radius: 4px;
}
Expand Down Expand Up @@ -104,9 +98,6 @@
fill: transparent;
cursor: grab;
}
[theme="dark"] #s3devFloatingBar {
background-color: #111;
}

.sa-mcp-preview-block {
filter: brightness(95%);
Expand Down
Loading

0 comments on commit 073067b

Please sign in to comment.