From 736c4be4b691891cf8538b4564b1c87402784eeb Mon Sep 17 00:00:00 2001 From: Dmitriy Antipov Date: Wed, 7 Feb 2024 00:20:09 +0300 Subject: [PATCH 1/2] namespace-attributes-moved --- libs/core/ns.ts | 14 +++++++++++--- libs/ev3/ns.ts | 22 ++-------------------- libs/ev3/pxt.json | 10 +++++----- libs/music/ns.ts | 4 ++++ 4 files changed, 22 insertions(+), 28 deletions(-) create mode 100644 libs/music/ns.ts diff --git a/libs/core/ns.ts b/libs/core/ns.ts index 090c3899f..3cd6e197b 100644 --- a/libs/core/ns.ts +++ b/libs/core/ns.ts @@ -1,4 +1,6 @@ - +//% color="#00852B" weight=90 icon="\uf10d" +//% groups='["Move", "Counters", "Properties"]' +//% labelLineWidth=50 namespace motors { /** @@ -24,7 +26,13 @@ namespace motors { } } -//% icon="\uf112" -namespace console { +//% color="#C8509B" weight=95 icon="\uf10f" +//% labelLineWidth=100 +//% groups='["Touch Sensor", "Color Sensor", "Ultrasonic Sensor", "Gyro Sensor", "Infrared Sensor", "Remote Infrared Beacon", "Light Sensor"]' +//% subcategories='["NXT", "HiTechnic"]' +namespace sensors { +} +//% color="#5F3109" icon="\uf107" +namespace control { } \ No newline at end of file diff --git a/libs/ev3/ns.ts b/libs/ev3/ns.ts index 9235dae5b..496b44072 100644 --- a/libs/ev3/ns.ts +++ b/libs/ev3/ns.ts @@ -4,17 +4,8 @@ namespace brick { } -//% color="#C8509B" weight=95 icon="\uf10f" -//% labelLineWidth=100 -//% groups='["Touch Sensor", "Color Sensor", "Ultrasonic Sensor", "Gyro Sensor", "Infrared Sensor", "Remote Infrared Beacon", "Light Sensor"]' -//% subcategories='["NXT", "HiTechnic"]' -namespace sensors { -} - -//% color="#00852B" weight=90 icon="\uf10d" -//% groups='["Move", "Counters", "Properties"]' -//% labelLineWidth=50 -namespace motors { +//% icon="\uf112" +namespace console { } //% color="#00852B" icon="\uf1b9" weight=85 @@ -22,15 +13,6 @@ namespace motors { namespace chassis { } -//% color="#D67923" weight=80 icon="\uf10e" -//% groups='["Sounds", "Tone", "Volume", "Tempo"]' -namespace music { -} - -//% color="#5F3109" icon="\uf107" -namespace control { -} - //% icon="\uf0d0" namespace automation { } \ No newline at end of file diff --git a/libs/ev3/pxt.json b/libs/ev3/pxt.json index a54af080a..52b723cd0 100644 --- a/libs/ev3/pxt.json +++ b/libs/ev3/pxt.json @@ -2,8 +2,8 @@ "name": "ev3", "description": "The EV3 library", "files": [ - "README.md", - "ns.ts", + "README.md", + "ns.ts", "brick.ts", "startup.ts", "images.jres", @@ -27,8 +27,8 @@ "infrared-sensor": "file:../infrared-sensor" }, "palette": [ - "#ffffff", - "#000000" + "#ffffff", + "#000000" ], "public": true -} +} \ No newline at end of file diff --git a/libs/music/ns.ts b/libs/music/ns.ts new file mode 100644 index 000000000..7fdb88998 --- /dev/null +++ b/libs/music/ns.ts @@ -0,0 +1,4 @@ +//% color="#D67923" weight=80 icon="\uf10e" +//% groups='["Sounds", "Tone", "Volume", "Tempo"]' +namespace music { +} \ No newline at end of file From 795e01ae250ebb03de264dd0950cf355f889a717 Mon Sep 17 00:00:00 2001 From: Dmitriy Antipov Date: Wed, 7 Feb 2024 13:14:46 +0300 Subject: [PATCH 2/2] namespace-brick-attr-move-from-ev3-to-core --- libs/core/ns.ts | 6 ++++++ libs/ev3/ns.ts | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libs/core/ns.ts b/libs/core/ns.ts index 3cd6e197b..a9f909505 100644 --- a/libs/core/ns.ts +++ b/libs/core/ns.ts @@ -35,4 +35,10 @@ namespace sensors { //% color="#5F3109" icon="\uf107" namespace control { +} + +//% color="#68C3E2" weight=100 icon="\uf106" +//% groups='["Buttons", "Indicator", "Screen", "Power", "Program"]' +//% labelLineWidth=60 +namespace brick { } \ No newline at end of file diff --git a/libs/ev3/ns.ts b/libs/ev3/ns.ts index 496b44072..2a15fca75 100644 --- a/libs/ev3/ns.ts +++ b/libs/ev3/ns.ts @@ -1,9 +1,3 @@ -//% color="#68C3E2" weight=100 icon="\uf106" -//% groups='["Buttons", "Indicator", "Screen", "Power", "Program"]' -//% labelLineWidth=60 -namespace brick { -} - //% icon="\uf112" namespace console { }