Skip to content

Commit 22096ac

Browse files
committed
fix: update-editor task, update map jsons
1 parent cd0553c commit 22096ac

14 files changed

Lines changed: 238 additions & 200 deletions

editor/deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"extension": "deno bundle --platform browser extension.tsx -o out/extension.js --external vscode --format cjs",
1515
"webview": "deno bundle --platform browser editor.tsx -o out/editor.js",
1616
"webview-style": "deno -A npm:tailwindcss@3 -o out/style.css",
17-
"package": "deno task compile && deno -A npm:@vscode/vsce@3.7.1 package",
17+
"package": "deno task compile && deno -A npm:@vscode/vsce@3.7.1 package --no-dependencies",
1818
"update-package": "deno task package && code --install-extension vscode-bw-block-editor-0.4.0.vsix"
1919
},
2020
"lint": {

editor/deno.lock

Lines changed: 202 additions & 189 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

editor/editor.tsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -788,6 +788,15 @@ function InfoPanel({ subscribe, query, on }: Context<HTMLElement>) {
788788
})
789789
}
790790

791+
// Preview of the actual exit button next to the toggle.
792+
const exitPreview = query<HTMLCanvasElement>(".js-exit-button-preview canvas")
793+
if (exitPreview) {
794+
const href = new URL("../prop/exit.png", blockMapSource.get().uri).href
795+
loadImage(href).then((img) => {
796+
exitPreview.getContext("2d")!.drawImage(img, 0, 0, 16, 16)
797+
})
798+
}
799+
791800
subscribe(signals.gridIndex, ({ i, j }) => {
792801
const infoContent = query(".info-content")
793802
if (!infoContent) return

editor/extension.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,15 @@ function resolveCustomTextEditor(
165165
<div class="js-info-panel fixed right-0 top-0 h-full w-48 bg-neutral-900/90 text-neutral-100 pointer-events-none">
166166
<div class="info-content text-xs font-mono">
167167
<div class="py-1 px-2 bg-white/50 text-black">Map</div>
168-
<div class="px-2 py-1">
168+
<div class="px-2 py-1 flex items-center gap-2">
169169
<label class="js-shows-exit-button pointer-events-auto inline-flex items-center gap-1 cursor-pointer">
170170
<input type="checkbox" />
171171
showsExitButton
172172
</label>
173+
<span class="js-exit-button-preview inline-block bg-[#9d285c] p-1 leading-none">
174+
<canvas width="16" height="16" class="crisp-edges block">
175+
</canvas>
176+
</span>
173177
</div>
174178
<div class="py-1 px-2 bg-white/50 text-black">Grid</div>
175179
<div class="px-2 py-1">

editor/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,5 @@
3535
"priority": "option"
3636
}
3737
]
38-
},
39-
"dependencies": {
40-
"@vscode/vsce": "^3.6.0"
4138
}
4239
}
-16.5 KB
Binary file not shown.

static/map/block_-10000.-10000.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,4 +282,4 @@
282282
"00000000000000000033000000000000000000000001000000000000000000000000000000000000000000000010000000330000000001100000000010010000000100100110000010001101001010100000033333000000000110001100000011000001",
283283
"00000000000000000033000000000000000000000001000000000000000000000000000000000000000000000010000000330000000000100001010010011010101001000100000111010001011011110000033333000000001100000000101100111100"
284284
]
285-
}
285+
}

static/map/block_-200.-200.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4270,4 +4270,4 @@
42704270
"00000000000000000002211113312222000000000000000000000000000000000000010000001001000000001010100101000000000000000001333331000000000000100110000010001101001010100000111001001000000110001100000111010000",
42714271
"00000000000000000000022213310000000000000000000000000000000000000000000001010010001000000000110101000000000000000001333331000000001001000100000111010001011011110111000010001100001100000000100222010001"
42724272
]
4273-
}
4273+
}

static/map/block_-200.0.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
"catalogs": [
55
"../catalog/base.json"
66
],
7+
"config": {
8+
"showsExitButton": true
9+
},
710
"actors": [
811
{
912
"i": -189,

static/map/block_-200.200.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
"catalogs": [
55
"../catalog/base.json"
66
],
7+
"config": {
8+
"showsExitButton": true
9+
},
710
"actors": [
811
{
912
"i": -167,

0 commit comments

Comments
 (0)