Skip to content

Commit cf24a19

Browse files
committed
formatting and other small changes
1 parent cefc51b commit cf24a19

12 files changed

Lines changed: 38 additions & 28 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717

1818
steps:
1919
- name: Checkout code
20-
uses: actions/checkout@v5
20+
uses: actions/checkout@v6
2121

2222
- name: Use Node.js ${{ matrix.node-version }}
2323
uses: actions/setup-node@v6

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
24.0.0
1+
lts/*

src/app.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,4 @@ button {
9797
.tippy-box[data-theme~="dph"] {
9898
background-color: var(--color-zinc-700);
9999
font-family: "Lexend", sans-serif;
100-
}
100+
}

src/app.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import "unplugin-icons/types/svelte";
2+
13
// See https://kit.svelte.dev/docs/types#app
24
// for information about these interfaces
35
declare global {

src/lib/components/text/ToolbarButton.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,3 @@
2222
class="toolbar-btn {styleVar ? 'bg-zinc-800' : ''}">
2323
<Icon />
2424
</button>
25-

src/lib/text/nbt/export.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,11 @@ export function translateJSON(
244244
for (const match of shadowColorMatches) {
245245
if (match[1]) {
246246
const num = parseInt(match[1]);
247-
if (num > 2**31 - 1 || num < (-2)**31) {
248-
finalResult = finalResult.replaceAll(match[0], `shadow_color:${num}L`)
247+
if (num > 2 ** 31 - 1 || num < (-2) ** 31) {
248+
finalResult = finalResult.replaceAll(
249+
match[0],
250+
`shadow_color:${num}L`,
251+
);
249252
}
250253
}
251254
}
@@ -296,4 +299,4 @@ function rgbaToArgbHex(rgbaHex: string): string {
296299

297300
// Return with alpha placed at the beginning
298301
return `#${alpha}${rgb}`;
299-
}
302+
}

src/lib/text/utils.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,17 @@ export const colorMap = [
2121
{ name: "black", value: "#000000", code: "0" },
2222
];
2323

24-
export const sourceKeys = ["atlas_object", "player_object", "selector", "block_nbt", "entity_nbt", "storage_nbt", "keybind", "score", "translate"] as const;
24+
export const sourceKeys = [
25+
"atlas_object",
26+
"player_object",
27+
"selector",
28+
"block_nbt",
29+
"entity_nbt",
30+
"storage_nbt",
31+
"keybind",
32+
"score",
33+
"translate",
34+
] as const;
2535

2636
/**
2737
* Returns true if the specified mark is present in the content's marks, otherwise undefined.
@@ -170,4 +180,4 @@ export function isDefinedTextObject(
170180

171181
export function getNodeAtSelection(editor: Editor) {
172182
return editor.state.selection.$head.nodeBefore;
173-
}
183+
}

src/lib/tiptap/extensions/marks/HoverEventMark.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,11 @@ export const HoverEventMark = Mark.create({
3737
renderHTML({ HTMLAttributes }) {
3838
return [
3939
"span",
40-
mergeAttributes(
41-
{
42-
"data-hover-event-action": HTMLAttributes.action,
43-
"data-hover-event-value": JSON.stringify(HTMLAttributes.value),
44-
class: "hoverEvent",
45-
},
46-
),
40+
mergeAttributes({
41+
"data-hover-event-action": HTMLAttributes.action,
42+
"data-hover-event-value": JSON.stringify(HTMLAttributes.value),
43+
class: "hoverEvent",
44+
}),
4745
0,
4846
];
4947
},

src/lib/tiptap/extensions/nodes/AtlasObjectNode.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const AtlasObjectNode = Node.create<NodeOptions>({
3232
renderHTML({ HTMLAttributes, node }) {
3333
let { atlas, sprite } = node.attrs;
3434
if (!atlas) {
35-
atlas = "minecraft:blocks"
35+
atlas = "minecraft:blocks";
3636
}
3737

3838
return [

src/routes/+page.svelte

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,7 @@
7272
let outputDialog: Modal = $state()!;
7373
let versionPopup: boolean = $state(false);
7474
75-
let doesContentExist: boolean = $derived(
76-
editor ? !editor.isEmpty : false,
77-
);
75+
let doesContentExist: boolean = $derived(editor ? !editor.isEmpty : false);
7876
let shouldOptimise = $state(true);
7977
8078
// Import

0 commit comments

Comments
 (0)