electrobun-preact-devtools 0.0.0 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,221 @@
1
+ import { t as PREACT_DEVTOOLS_MESSAGE } from "./protocol-rAxFKNGR.mjs";
2
+ import { n as warnUnboundHandler, r as composeRPCHandlers, t as emitLog } from "./logger-Bpp6JxH4.mjs";
3
+ import { i as applyEvent, n as createStore, t as DevTools } from "./upstream-DgCs5wGH.mjs";
4
+ import { Electroview } from "electrobun/view";
5
+ import { h, render } from "preact";
6
+ //#region src/devtools-view/rpc.ts
7
+ /**
8
+ * Creates the devtools-window `Electroview.defineRPC(...)` result for windows
9
+ * that already have their own webview RPC handlers.
10
+ */
11
+ function composeDevtoolsWindowViewRPC(options) {
12
+ return Electroview.defineRPC({
13
+ maxRequestTime: options.maxRequestTime,
14
+ handlers: composeRPCHandlers(options.handlers, (message) => {
15
+ const controller = getActiveDevtoolsController();
16
+ if (!controller) {
17
+ warnUnboundHandler("devtools view");
18
+ return;
19
+ }
20
+ controller.handleMessage(message);
21
+ })
22
+ });
23
+ }
24
+ //#endregion
25
+ //#region src/devtools-view/sprite.ts
26
+ const spriteMarkup = `<svg style="display:none">
27
+ <symbol id="preact-devtools-undo" viewBox="0 0 24 24">
28
+ <path d="M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z" fill="currentColor" />
29
+ </symbol>
30
+
31
+ <symbol id="preact-devtools-add-circle" viewBox="0 0 24 24">
32
+ <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" fill="currentColor" />
33
+ <path d="M0 0h24v24H0z" fill="none" />
34
+ </symbol>
35
+
36
+ <symbol id="preact-devtools-bug" viewBox="0 0 24 24">
37
+ <path d="M20 8h-2.81a5.985 5.985 0 0 0-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5c-.49 0-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8zm-6 8h-4v-2h4v2zm0-4h-4v-2h4v2z" fill="currentColor" />
38
+ </symbol>
39
+
40
+ <symbol id="preact-devtools-inspect" viewBox="0 0 24 24">
41
+ <path d="M0 0h24v24H0z" fill="none" />
42
+ <path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z" fill="currentColor" />
43
+ </symbol>
44
+
45
+ <symbol id="preact-devtools-remove" viewBox="0 0 24 24">
46
+ <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" fill="currentColor" />
47
+ <path d="M0 0h24v24H0z" fill="none" />
48
+ </symbol>
49
+
50
+ <symbol id="preact-devtools-refresh" viewBox="0 0 24 24">
51
+ <path d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z" fill="currentColor" />
52
+ </symbol>
53
+
54
+ <symbol id="preact-devtools-keyboard-down" viewBox="0 0 24 24">
55
+ <path d="M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z" fill="currentColor" />
56
+ </symbol>
57
+
58
+ <symbol id="preact-devtools-keyboard-up" viewBox="0 0 24 24">
59
+ <path d="M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z" fill="currentColor" />
60
+ </symbol>
61
+
62
+ <symbol id="preact-devtools-close" viewBox="0 0 24 24">
63
+ <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z" fill="currentColor" />
64
+ </symbol>
65
+
66
+ <symbol id="preact-devtools-search" viewBox="0 0 24 24">
67
+ <path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" fill="currentColor" />
68
+ </symbol>
69
+
70
+ <symbol id="preact-devtools-filter-list" viewBox="0 0 24 24">
71
+ <path d="M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z" fill="currentColor" />
72
+ </symbol>
73
+
74
+ <symbol id="preact-devtools-checkbox-checked" viewBox="0 0 24 24">
75
+ <path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z" fill="currentColor" />
76
+ </symbol>
77
+
78
+ <symbol id="preact-devtools-checkbox-unchecked" viewBox="0 0 24 24">
79
+ <path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z" fill="currentColor" />
80
+ <path d="M0 0h24v24H0z" fill="none" />
81
+ </symbol>
82
+
83
+ <symbol id="preact-devtools-file-copy" viewBox="0 0 24 24">
84
+ <path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm-1 4l6 6v10c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2h7zm-1 7h5.5L14 6.5V12z" fill="currentColor" />
85
+ </symbol>
86
+
87
+ <symbol id="preact-devtools-arrow-back" viewBox="0 0 24 24">
88
+ <path d="M0 0h24v24H0z" fill="none" />
89
+ <path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z" fill="currentColor" />
90
+ </symbol>
91
+
92
+ <symbol id="preact-devtools-arrow-forward" viewBox="0 0 24 24">
93
+ <path d="M0 0h24v24H0z" fill="none" />
94
+ <path d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z" fill="currentColor" />
95
+ </symbol>
96
+
97
+ <symbol id="preact-devtools-record-icon" viewBox="0 0 24 24">
98
+ <circle fill="currentColor" cx="12" cy="12" r="8" />
99
+ </symbol>
100
+
101
+ <symbol id="preact-devtools-not-interested" viewBox="0 0 24 24">
102
+ <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20zm6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9z" fill="currentColor" />
103
+ </symbol>
104
+
105
+ <symbol id="preact-devtools-sort-icon" viewBox="0 0 24 24">
106
+ <path d="M3 18h6v-2H3v2zM3 6v2h18V6H3zm0 7h12v-2H3v2z" fill="currentColor" />
107
+ <path d="M0 0h24v24H0z" fill="none" />
108
+ </symbol>
109
+
110
+ <symbol id="preact-devtools-fire-icon" viewBox="0 0 24 24">
111
+ <path d="M13.5.67s.74 2.65.74 4.8c0 2.06-1.35 3.73-3.41 3.73-2.07 0-3.63-1.67-3.63-3.73l.03-.36C5.21 7.51 4 10.62 4 14c0 4.42 3.58 8 8 8s8-3.58 8-8C20 8.61 17.41 3.8 13.5.67zM11.71 19c-1.78 0-3.22-1.4-3.22-3.14 0-1.62 1.05-2.76 2.81-3.12 1.77-.36 3.6-1.21 4.62-2.58.39 1.29.59 2.65.59 4.04 0 2.65-2.15 4.8-4.8 4.8z" fill="currentColor" />
112
+ <path d="M0 0h24v24H0z" fill="none" />
113
+ </symbol>
114
+
115
+ <symbol id="preact-devtools-code-icon" viewBox="0 0 24 24">
116
+ <path d="M0 0h24v24H0V0z" fill="none" />
117
+ <path d="M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z" fill="currentColor" />
118
+ </symbol>
119
+
120
+ <symbol id="preact-devtools-suspend-icon" viewBox="0 0 24 24">
121
+ <path d="M0 0h24v24H0z" fill="none" />
122
+ <path d="M15 1H9v2h6V1zm-4 13h2V8h-2v6zm8.03-6.61l1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61zM12 20c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z" fill="currentColor" />
123
+ </symbol>
124
+ </svg>`;
125
+ //#endregion
126
+ //#region src/devtools-view/controller.ts
127
+ var DevtoolsController = class {
128
+ electroview;
129
+ container;
130
+ logger;
131
+ store;
132
+ disposed = false;
133
+ unsubscribeStore;
134
+ constructor(options) {
135
+ this.container = options.container;
136
+ this.electroview = options.electroview ?? new Electroview({ rpc: composeDevtoolsWindowViewRPC({}) });
137
+ this.logger = options.logger;
138
+ this.store = createStore();
139
+ ensureSpriteInjected(document);
140
+ render(h(DevTools, {
141
+ store: this.store,
142
+ window
143
+ }), this.container);
144
+ this.unsubscribeStore = this.store.subscribe((type, data) => {
145
+ this.sendToBun({
146
+ kind: "ui-command",
147
+ type,
148
+ data
149
+ });
150
+ });
151
+ this.sendToBun({ kind: "view-ready" });
152
+ }
153
+ handleMessage(message) {
154
+ switch (message.kind) {
155
+ case "connection-state": return;
156
+ case "clear-store":
157
+ this.store.clear();
158
+ return;
159
+ case "deliver-event":
160
+ if (message.type === "init") {
161
+ this.sendToBun({
162
+ kind: "ui-command",
163
+ type: "init",
164
+ data: null
165
+ });
166
+ return;
167
+ }
168
+ applyEvent(this.store, message.type, message.data);
169
+ return;
170
+ }
171
+ }
172
+ dispose() {
173
+ if (this.disposed) return;
174
+ this.disposed = true;
175
+ this.unsubscribeStore?.();
176
+ render(null, this.container);
177
+ this.sendToBun({ kind: "view-disposed" });
178
+ if (activeController === this) activeController = void 0;
179
+ }
180
+ sendToBun(message) {
181
+ const send = this.electroview.rpc?.sendProxy?.[PREACT_DEVTOOLS_MESSAGE];
182
+ if (typeof send === "function") {
183
+ send(message);
184
+ return;
185
+ }
186
+ emitLog(this.logger, {
187
+ level: "warn",
188
+ code: "missing-devtools-transport",
189
+ message: "Unable to send a Preact devtools view message because the RPC transport is unavailable.",
190
+ detail: message
191
+ });
192
+ }
193
+ };
194
+ let spriteInjected = false;
195
+ function ensureSpriteInjected(doc) {
196
+ if (spriteInjected || doc.getElementById("preact-devtools-sprite")) {
197
+ spriteInjected = true;
198
+ return;
199
+ }
200
+ const host = doc.createElement("div");
201
+ host.id = "preact-devtools-sprite";
202
+ host.style.display = "none";
203
+ host.innerHTML = spriteMarkup;
204
+ doc.body.prepend(host);
205
+ spriteInjected = true;
206
+ }
207
+ let activeController;
208
+ function getActiveDevtoolsController() {
209
+ return activeController;
210
+ }
211
+ /**
212
+ * Mounts the vendored Preact devtools UI into the current browser window and
213
+ * connects it to the Bun host over Electrobun RPC.
214
+ */
215
+ function mountPreactDevtoolsWindow(options) {
216
+ if (activeController) throw new Error("Preact devtools are already mounted in this window. Dispose the existing mount before mounting again.");
217
+ activeController = new DevtoolsController(options);
218
+ return activeController;
219
+ }
220
+ //#endregion
221
+ export { composeDevtoolsWindowViewRPC, mountPreactDevtoolsWindow };
@@ -0,0 +1,105 @@
1
+ import { RPCSchema } from "electrobun/view";
2
+
3
+ //#region src/shared/protocol.d.ts
4
+ /** Stable identifier for one inspected application window. */
5
+ type DevtoolsTargetId = string;
6
+ /** High-level connection state reported by the Bun host for a target. */
7
+ type HostConnectionState = 'unregistered' | 'registered' | 'app-connected' | 'devtools-opening' | 'devtools-connected' | 'closing';
8
+ /** Structured log event emitted by optional package logger hooks. */
9
+ interface PreactDevtoolsLogEvent {
10
+ level: 'debug' | 'info' | 'warn' | 'error';
11
+ code: string;
12
+ message: string;
13
+ targetId?: DevtoolsTargetId;
14
+ detail?: unknown;
15
+ }
16
+ /** Why an app bridge was disconnected from its paired devtools window. */
17
+ type SessionDisconnectedReason = 'devtools-closed' | 'target-closed' | 'host-disposed';
18
+ /** Why the devtools UI should clear its local store. */
19
+ type ClearStoreReason = 'target-closed' | 'target-reset' | 'reconnect';
20
+ /** Messages sent from the app-window preload bridge to Bun. */
21
+ type AppToBunMessage = {
22
+ kind: 'bridge-ready';
23
+ } | {
24
+ kind: 'bridge-disposed';
25
+ } | {
26
+ kind: 'hook-event';
27
+ type: string;
28
+ data: unknown;
29
+ };
30
+ /** Messages sent from Bun to the app-window preload bridge. */
31
+ type BunToAppMessage = {
32
+ kind: 'session-connected';
33
+ } | {
34
+ kind: 'session-disconnected';
35
+ reason: SessionDisconnectedReason;
36
+ } | {
37
+ kind: 'request-refresh';
38
+ } | {
39
+ kind: 'devtools-command';
40
+ type: string;
41
+ data: unknown;
42
+ };
43
+ /** Messages sent from the standalone devtools window to Bun. */
44
+ type DevtoolsToBunMessage = {
45
+ kind: 'view-ready';
46
+ } | {
47
+ kind: 'view-disposed';
48
+ } | {
49
+ kind: 'ui-command';
50
+ type: string;
51
+ data: unknown;
52
+ };
53
+ /** Messages sent from Bun to the standalone devtools window. */
54
+ type BunToDevtoolsMessage = {
55
+ kind: 'connection-state';
56
+ connected: boolean;
57
+ targetId: DevtoolsTargetId;
58
+ } | {
59
+ kind: 'deliver-event';
60
+ type: string;
61
+ data: unknown;
62
+ } | {
63
+ kind: 'clear-store';
64
+ reason: ClearStoreReason;
65
+ };
66
+ /** RPC schema fragment required on inspected application windows. */
67
+ type PreactDevtoolsAppWindowRPC = {
68
+ bun: RPCSchema<{
69
+ requests: {};
70
+ messages: {
71
+ preactDevtoolsMessage: AppToBunMessage;
72
+ };
73
+ }>;
74
+ webview: RPCSchema<{
75
+ requests: {};
76
+ messages: {
77
+ preactDevtoolsMessage: BunToAppMessage;
78
+ };
79
+ }>;
80
+ };
81
+ /** RPC schema fragment required on standalone devtools windows. */
82
+ type PreactDevtoolsDevtoolsWindowRPC = {
83
+ bun: RPCSchema<{
84
+ requests: {};
85
+ messages: {
86
+ preactDevtoolsMessage: DevtoolsToBunMessage;
87
+ };
88
+ }>;
89
+ webview: RPCSchema<{
90
+ requests: {};
91
+ messages: {
92
+ preactDevtoolsMessage: BunToDevtoolsMessage;
93
+ };
94
+ }>;
95
+ };
96
+ /** Adds the package-owned app-window message channel to a custom RPC schema. */
97
+ type WithPreactDevtoolsAppWindowRPC<T> = T & PreactDevtoolsAppWindowRPC;
98
+ /** Adds the package-owned devtools-window message channel to a custom RPC schema. */
99
+ type WithPreactDevtoolsDevtoolsWindowRPC<T> = T & PreactDevtoolsDevtoolsWindowRPC;
100
+ /** Reserved Electrobun message name used by this package on every composed RPC schema. */
101
+ declare const PREACT_DEVTOOLS_MESSAGE = "preactDevtoolsMessage";
102
+ /** Protocol version for the Bun bridge message envelope. */
103
+ declare const PREACT_DEVTOOLS_PROTOCOL_VERSION = 1;
104
+ //#endregion
105
+ export { DevtoolsTargetId as a, PREACT_DEVTOOLS_MESSAGE as c, PreactDevtoolsDevtoolsWindowRPC as d, PreactDevtoolsLogEvent as f, WithPreactDevtoolsDevtoolsWindowRPC as h, ClearStoreReason as i, PREACT_DEVTOOLS_PROTOCOL_VERSION as l, WithPreactDevtoolsAppWindowRPC as m, BunToAppMessage as n, DevtoolsToBunMessage as o, SessionDisconnectedReason as p, BunToDevtoolsMessage as r, HostConnectionState as s, AppToBunMessage as t, PreactDevtoolsAppWindowRPC as u };
@@ -0,0 +1,2 @@
1
+ import { a as DevtoolsTargetId, c as PREACT_DEVTOOLS_MESSAGE, d as PreactDevtoolsDevtoolsWindowRPC, f as PreactDevtoolsLogEvent, h as WithPreactDevtoolsDevtoolsWindowRPC, i as ClearStoreReason, l as PREACT_DEVTOOLS_PROTOCOL_VERSION, m as WithPreactDevtoolsAppWindowRPC, n as BunToAppMessage, o as DevtoolsToBunMessage, p as SessionDisconnectedReason, r as BunToDevtoolsMessage, s as HostConnectionState, t as AppToBunMessage, u as PreactDevtoolsAppWindowRPC } from "./index-ohWyACpe.mjs";
2
+ export { AppToBunMessage, BunToAppMessage, BunToDevtoolsMessage, ClearStoreReason, DevtoolsTargetId, DevtoolsToBunMessage, HostConnectionState, PREACT_DEVTOOLS_MESSAGE, PREACT_DEVTOOLS_PROTOCOL_VERSION, PreactDevtoolsAppWindowRPC, PreactDevtoolsDevtoolsWindowRPC, PreactDevtoolsLogEvent, SessionDisconnectedReason, WithPreactDevtoolsAppWindowRPC, WithPreactDevtoolsDevtoolsWindowRPC };
package/dist/index.mjs ADDED
@@ -0,0 +1,2 @@
1
+ import { n as PREACT_DEVTOOLS_PROTOCOL_VERSION, t as PREACT_DEVTOOLS_MESSAGE } from "./protocol-rAxFKNGR.mjs";
2
+ export { PREACT_DEVTOOLS_MESSAGE, PREACT_DEVTOOLS_PROTOCOL_VERSION };
@@ -0,0 +1,23 @@
1
+ import { t as PREACT_DEVTOOLS_MESSAGE } from "./protocol-rAxFKNGR.mjs";
2
+ //#region src/internal/rpc.ts
3
+ function composeRPCHandlers(handlers, reservedHandler) {
4
+ const messages = handlers?.messages;
5
+ if (messages && Object.prototype.hasOwnProperty.call(messages, "preactDevtoolsMessage")) throw new Error(`The RPC message name "${PREACT_DEVTOOLS_MESSAGE}" is reserved by electrobun-preact-devtools.`);
6
+ return {
7
+ requests: handlers?.requests,
8
+ messages: {
9
+ ...messages ?? {},
10
+ [PREACT_DEVTOOLS_MESSAGE]: reservedHandler
11
+ }
12
+ };
13
+ }
14
+ //#endregion
15
+ //#region src/internal/logger.ts
16
+ function emitLog(logger, event) {
17
+ logger?.(event);
18
+ }
19
+ function warnUnboundHandler(scope) {
20
+ console.warn(`[electrobun-preact-devtools] Dropped ${scope} message because the controller is not installed yet.`);
21
+ }
22
+ //#endregion
23
+ export { warnUnboundHandler as n, composeRPCHandlers as r, emitLog as t };
@@ -0,0 +1,7 @@
1
+ //#region src/shared/protocol.ts
2
+ /** Reserved Electrobun message name used by this package on every composed RPC schema. */
3
+ const PREACT_DEVTOOLS_MESSAGE = "preactDevtoolsMessage";
4
+ /** Protocol version for the Bun bridge message envelope. */
5
+ const PREACT_DEVTOOLS_PROTOCOL_VERSION = 1;
6
+ //#endregion
7
+ export { PREACT_DEVTOOLS_PROTOCOL_VERSION as n, PREACT_DEVTOOLS_MESSAGE as t };
@@ -0,0 +1,13 @@
1
+ import { f as PreactDevtoolsLogEvent } from "./index-ohWyACpe.mjs";
2
+ import { ElectrobunRPCConfig, ElectrobunRPCSchema } from "electrobun/view";
3
+
4
+ //#region src/internal/logger.d.ts
5
+ type PreactDevtoolsLogger = (event: PreactDevtoolsLogEvent) => void;
6
+ //#endregion
7
+ //#region src/internal/rpc.d.ts
8
+ type ComposeRPCHandlers<Schema extends ElectrobunRPCSchema, Side extends 'bun' | 'webview'> = {
9
+ requests?: ElectrobunRPCConfig<Schema, Side>['handlers']['requests'];
10
+ messages?: ElectrobunRPCConfig<Schema, Side>['handlers']['messages'];
11
+ };
12
+ //#endregion
13
+ export { PreactDevtoolsLogger as n, ComposeRPCHandlers as t };