+
- Save
+ Save
`
)}
diff --git a/www/src/ts/virtual_machine/base_device.ts b/www/src/ts/virtual_machine/base_device.ts
index ed00f00..e4858ac 100644
--- a/www/src/ts/virtual_machine/base_device.ts
+++ b/www/src/ts/virtual_machine/base_device.ts
@@ -1,6 +1,6 @@
import { property, state } from "lit/decorators.js";
-import {
+import type {
DeviceRef,
LogicFields,
Reagents,
@@ -60,22 +60,22 @@ export const VMDeviceMixin =
>(
device: DeviceRef;
- @state() name: string | null = null;
- @state() nameHash: number | null = null;
- @state() prefabName: string | null;
- @state() fields: LogicFields;
- @state() slots: Slot[];
- @state() reagents: Reagents;
- @state() connections: Connection[];
- @state() icIP: number;
- @state() icOpCount: number;
- @state() icState: string;
- @state() errors: ICError[];
- @state() registers: Registers | null;
- @state() stack: Stack | null;
- @state() aliases: Aliases | null;
- @state() defines: Defines | null;
- @state() pins: Pins | null;
+ @state() accessor name: string | null = null;
+ @state() accessor nameHash: number | null = null;
+ @state() accessor prefabName: string | null;
+ @state() accessor fields: LogicFields;
+ @state() accessor slots: Slot[];
+ @state() accessor reagents: Reagents;
+ @state() accessor connections: Connection[];
+ @state() accessor icIP: number;
+ @state() accessor icOpCount: number;
+ @state() accessor icState: string;
+ @state() accessor errors: ICError[];
+ @state() accessor registers: Registers | null;
+ @state() accessor stack: Stack | null;
+ @state() accessor aliases: Aliases | null;
+ @state() accessor defines: Defines | null;
+ @state() accessor pins: Pins | null;
connectedCallback(): void {
const root = super.connectedCallback();
diff --git a/www/src/ts/virtual_machine/device.ts b/www/src/ts/virtual_machine/device.ts
index 2f6003d..446acb0 100644
--- a/www/src/ts/virtual_machine/device.ts
+++ b/www/src/ts/virtual_machine/device.ts
@@ -1,4 +1,4 @@
-import {
+import type {
Connection,
DeviceTemplate,
LogicField,
@@ -43,7 +43,7 @@ import {
} from "../utils";
import SlSelect from "@shoelace-style/shoelace/dist/components/select/select.js";
import SlDrawer from "@shoelace-style/shoelace/dist/components/drawer/drawer.js";
-import { DeviceDB, DeviceDBEntry } from "./device_db";
+import type { DeviceDB, DeviceDBEntry } from "./device_db";
import { connectionFromDeviceDBConnection } from "./utils";
import { SlDialog } from "@shoelace-style/shoelace";
import { repeat } from "lit/directives/repeat.js";
@@ -53,7 +53,7 @@ import { cache } from "lit/directives/cache.js";
export class VMDeviceCard extends VMDeviceMixin(BaseElement) {
image_err: boolean;
- @property({ type: Boolean }) open: boolean;
+ @property({ type: Boolean }) accessor open: boolean;
constructor() {
super();
@@ -465,7 +465,7 @@ export class VMDeviceCard extends VMDeviceMixin(BaseElement) {
`;
}
- @query(".remove-device-dialog") removeDialog: SlDialog;
+ @query(".remove-device-dialog") accessor removeDialog: SlDialog;
_preventOverlayClose(event: CustomEvent) {
if (event.detail.source === "overlay") {
@@ -928,12 +928,12 @@ export class VmDeviceTemplate extends BaseElement {
`,
];
- @state() fields: { [key in LogicType]?: LogicField };
- @state() slots: SlotTemplate[];
- @state() template: DeviceTemplate;
- @state() device_id: number | undefined;
- @state() device_name: string | undefined;
- @state() connections: Connection[];
+ @state() accessor fields: { [key in LogicType]?: LogicField };
+ @state() accessor slots: SlotTemplate[];
+ @state() accessor template: DeviceTemplate;
+ @state() accessor device_id: number | undefined;
+ @state() accessor device_name: string | undefined;
+ @state() accessor connections: Connection[];
constructor() {
super();