@vitejs/devtools-kit 0.0.0-alpha.32 → 0.0.0-alpha.33

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.
package/dist/client.d.mts CHANGED
@@ -1,2 +1,3 @@
1
- import { a as DockEntryState, c as DocksContext, d as RpcClientEvents, f as DevToolsRpcClient, i as DockClientType, l as DocksEntriesContext, m as getDevToolsRpcClient, n as DevToolsClientContext, o as DockEntryStateEvents, p as DevToolsRpcClientOptions, r as DevToolsClientRpcHost, s as DockPanelStorage, t as DockClientScriptContext, u as DocksPanelContext } from "./client-script-rH2r9q0G.mjs";
1
+ import { a as DockEntryState, c as DocksContext, d as RpcClientEvents, f as DevToolsRpcClient, i as DockClientType, l as DocksEntriesContext, m as getDevToolsRpcClient, n as DevToolsClientContext, o as DockEntryStateEvents, p as DevToolsRpcClientOptions, r as DevToolsClientRpcHost, s as DockPanelStorage, t as DockClientScriptContext, u as DocksPanelContext } from "./index-BYAQ8jAq.mjs";
2
+ import "./shared-state-PmCxmgxM.mjs";
2
3
  export { DevToolsClientContext, DevToolsClientRpcHost, DevToolsRpcClient, DevToolsRpcClientOptions, DockClientScriptContext, DockClientType, DockEntryState, DockEntryStateEvents, DockPanelStorage, DocksContext, DocksEntriesContext, DocksPanelContext, RpcClientEvents, getDevToolsRpcClient };
package/dist/client.mjs CHANGED
@@ -4,13 +4,11 @@ import { createSharedState } from "./utils/shared-state.mjs";
4
4
  import { RpcFunctionsCollectorBase } from "@vitejs/devtools-rpc";
5
5
  import { createRpcClient } from "@vitejs/devtools-rpc/client";
6
6
  import { createWsRpcPreset } from "@vitejs/devtools-rpc/presets/ws/client";
7
-
8
7
  //#region \0rolldown/runtime.js
9
8
  var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
10
-
11
9
  //#endregion
12
- //#region ../../node_modules/.pnpm/my-ua-parser@2.0.4/node_modules/my-ua-parser/ua-parser.js
13
- var require_ua_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
10
+ //#region src/utils/promise.ts
11
+ var import_ua_parser = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
14
12
  (function(window, undefined) {
15
13
  "use strict";
16
14
  var EMPTY = "", UNKNOWN = "?", FUNC_TYPE = "function", UNDEF_TYPE = "undefined", OBJ_TYPE = "object", STR_TYPE = "string", MAJOR = "major", MODEL = "model", NAME = "name", TYPE = "type", VENDOR = "vendor", VERSION = "version", ARCHITECTURE = "architecture", CONSOLE = "console", MOBILE = "mobile", TABLET = "tablet", SMARTTV = "smarttv", WEARABLE = "wearable", EMBEDDED = "embedded", UA_MAX_LENGTH = 500;
@@ -1086,11 +1084,7 @@ var require_ua_parser = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1086
1084
  };
1087
1085
  }
1088
1086
  })(typeof window === "object" ? window : exports);
1089
- }));
1090
-
1091
- //#endregion
1092
- //#region src/utils/promise.ts
1093
- var import_ua_parser = require_ua_parser();
1087
+ })))();
1094
1088
  function promiseWithResolver() {
1095
1089
  let resolve;
1096
1090
  let reject;
@@ -1103,7 +1097,6 @@ function promiseWithResolver() {
1103
1097
  reject
1104
1098
  };
1105
1099
  }
1106
-
1107
1100
  //#endregion
1108
1101
  //#region src/client/rpc-shared-state.ts
1109
1102
  function createRpcSharedStateClientHost(rpc) {
@@ -1171,7 +1164,6 @@ function createRpcSharedStateClientHost(rpc) {
1171
1164
  });
1172
1165
  } };
1173
1166
  }
1174
-
1175
1167
  //#endregion
1176
1168
  //#region src/client/rpc.ts
1177
1169
  const CONNECTION_META_KEY = "__VITE_DEVTOOLS_CONNECTION_META__";
@@ -1297,6 +1289,5 @@ async function getDevToolsRpcClient(options = {}) {
1297
1289
  requestTrust();
1298
1290
  return rpc;
1299
1291
  }
1300
-
1301
1292
  //#endregion
1302
- export { getDevToolsRpcClient };
1293
+ export { getDevToolsRpcClient };
@@ -1,4 +1,5 @@
1
- import { S as DevToolsDocksUserSettings } from "./client-script-rH2r9q0G.mjs";
1
+ import { S as DevToolsDocksUserSettings } from "./index-BYAQ8jAq.mjs";
2
+ import "./shared-state-PmCxmgxM.mjs";
2
3
 
3
4
  //#region src/constants.d.ts
4
5
  declare const DEFAULT_CATEGORIES_ORDER: Record<string, number>;
@@ -15,6 +15,5 @@ const DEFAULT_STATE_USER_SETTINGS = () => ({
15
15
  docksCustomOrder: {},
16
16
  showIframeAddressBar: false
17
17
  });
18
-
19
18
  //#endregion
20
- export { DEFAULT_CATEGORIES_ORDER, DEFAULT_STATE_USER_SETTINGS };
19
+ export { DEFAULT_CATEGORIES_ORDER, DEFAULT_STATE_USER_SETTINGS };
@@ -1,5 +1,5 @@
1
- import { t as EventEmitter } from "./events-57bKw4ct.mjs";
2
- import { SharedState } from "./utils/shared-state.mjs";
1
+ import { t as EventEmitter } from "./events-D47O3TYC.mjs";
2
+ import { o as SharedState } from "./shared-state-PmCxmgxM.mjs";
3
3
  import * as _vitejs_devtools_rpc0 from "@vitejs/devtools-rpc";
4
4
  import { RpcDefinitionsFilter, RpcDefinitionsToFunctions, RpcFunctionsCollector, RpcFunctionsCollectorBase } from "@vitejs/devtools-rpc";
5
5
  import { WebSocketRpcClientOptions } from "@vitejs/devtools-rpc/presets/ws/client";
@@ -8,13 +8,13 @@ import { BirpcOptions, BirpcReturn } from "birpc";
8
8
  import { Plugin, ResolvedConfig, ViteDevServer } from "vite";
9
9
  import { ChildProcess } from "node:child_process";
10
10
 
11
- //#region ../../node_modules/.pnpm/@vue+shared@3.5.28/node_modules/@vue/shared/dist/shared.d.ts
11
+ //#region ../../node_modules/.pnpm/@vue+shared@3.5.29/node_modules/@vue/shared/dist/shared.d.ts
12
12
  type Prettify<T> = { [K in keyof T]: T[K] } & {};
13
13
  type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;
14
14
  type LooseRequired<T> = { [P in keyof (T & Required<T>)]: T[P] };
15
15
  type IfAny<T, Y, N> = 0 extends 1 & T ? Y : N;
16
16
  //#endregion
17
- //#region ../../node_modules/.pnpm/@vue+reactivity@3.5.28/node_modules/@vue/reactivity/dist/reactivity.d.ts
17
+ //#region ../../node_modules/.pnpm/@vue+reactivity@3.5.29/node_modules/@vue/reactivity/dist/reactivity.d.ts
18
18
  declare enum TrackOpTypes {
19
19
  GET = "get",
20
20
  HAS = "has",
@@ -120,7 +120,7 @@ type WatchCallback<V = any, OV = any> = (value: V, oldValue: OV, onCleanup: OnCl
120
120
  type OnCleanup = (cleanupFn: () => void) => void;
121
121
  type WatchStopHandle = () => void;
122
122
  //#endregion
123
- //#region ../../node_modules/.pnpm/@vue+runtime-core@3.5.28/node_modules/@vue/runtime-core/dist/runtime-core.d.ts
123
+ //#region ../../node_modules/.pnpm/@vue+runtime-core@3.5.29/node_modules/@vue/runtime-core/dist/runtime-core.d.ts
124
124
  type Slot<T extends any = any> = (...args: IfAny<T, any[], [T] | (T extends undefined ? [] : never)>) => VNode[];
125
125
  type InternalSlots = {
126
126
  [name: string]: Slot | undefined;
@@ -1295,7 +1295,7 @@ declare global {
1295
1295
  const withDefaults: _withDefaults;
1296
1296
  }
1297
1297
  //#endregion
1298
- //#region ../../node_modules/.pnpm/@vue+runtime-dom@3.5.28/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts
1298
+ //#region ../../node_modules/.pnpm/@vue+runtime-dom@3.5.29/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts
1299
1299
  declare const TRANSITION = "transition";
1300
1300
  declare const ANIMATION = "animation";
1301
1301
  type AnimationTypes = typeof TRANSITION | typeof ANIMATION;
package/dist/index.d.mts CHANGED
@@ -1,3 +1,4 @@
1
- import { $ as DevToolsViewBuiltin, A as DevToolsCapabilities, B as DevToolsTerminalSessionStreamChunkEvent, C as DevToolsNodeRpcSession, D as RpcSharedStateGetOptions, E as RpcFunctionsHost, F as DevToolsChildProcessExecuteOptions, G as ClientScriptEntry, H as DevToolsRpcClientFunctions, I as DevToolsChildProcessTerminalSession, J as DevToolsDockEntryCategory, K as DevToolsDockEntry, L as DevToolsTerminalHost, M as DevToolsNodeUtils, N as DevToolsPluginOptions, O as RpcSharedStateHost, P as DevToolsViewHost, Q as DevToolsViewAction, R as DevToolsTerminalSession, S as DevToolsDocksUserSettings, T as RpcBroadcastOptions, U as DevToolsRpcServerFunctions, V as DevToolsTerminalStatus, W as DevToolsRpcSharedStates, X as DevToolsDockHost, Y as DevToolsDockEntryIcon, Z as DevToolsDockUserEntry, _ as RpcDefinitionsToFunctions, b as PartialWithoutId, et as DevToolsViewCustomRender, g as RpcDefinitionsFilter, h as defineRpcFunction, j as DevToolsNodeContext, k as ConnectionMeta, nt as DevToolsViewLauncher, q as DevToolsDockEntryBase, rt as DevToolsViewLauncherStatus, tt as DevToolsViewIframe, v as PluginWithDevTools, w as DevToolsNodeRpcSessionMeta, x as Thenable, y as EntriesToObject, z as DevToolsTerminalSessionBase } from "./client-script-rH2r9q0G.mjs";
2
- import { n as EventUnsubscribe, r as EventsMap, t as EventEmitter } from "./events-57bKw4ct.mjs";
1
+ import { $ as DevToolsViewBuiltin, A as DevToolsCapabilities, B as DevToolsTerminalSessionStreamChunkEvent, C as DevToolsNodeRpcSession, D as RpcSharedStateGetOptions, E as RpcFunctionsHost, F as DevToolsChildProcessExecuteOptions, G as ClientScriptEntry, H as DevToolsRpcClientFunctions, I as DevToolsChildProcessTerminalSession, J as DevToolsDockEntryCategory, K as DevToolsDockEntry, L as DevToolsTerminalHost, M as DevToolsNodeUtils, N as DevToolsPluginOptions, O as RpcSharedStateHost, P as DevToolsViewHost, Q as DevToolsViewAction, R as DevToolsTerminalSession, S as DevToolsDocksUserSettings, T as RpcBroadcastOptions, U as DevToolsRpcServerFunctions, V as DevToolsTerminalStatus, W as DevToolsRpcSharedStates, X as DevToolsDockHost, Y as DevToolsDockEntryIcon, Z as DevToolsDockUserEntry, _ as RpcDefinitionsToFunctions, b as PartialWithoutId, et as DevToolsViewCustomRender, g as RpcDefinitionsFilter, h as defineRpcFunction, j as DevToolsNodeContext, k as ConnectionMeta, nt as DevToolsViewLauncher, q as DevToolsDockEntryBase, rt as DevToolsViewLauncherStatus, tt as DevToolsViewIframe, v as PluginWithDevTools, w as DevToolsNodeRpcSessionMeta, x as Thenable, y as EntriesToObject, z as DevToolsTerminalSessionBase } from "./index-BYAQ8jAq.mjs";
2
+ import { n as EventUnsubscribe, r as EventsMap, t as EventEmitter } from "./events-D47O3TYC.mjs";
3
+ import "./shared-state-PmCxmgxM.mjs";
3
4
  export { ClientScriptEntry, ConnectionMeta, DevToolsCapabilities, DevToolsChildProcessExecuteOptions, DevToolsChildProcessTerminalSession, DevToolsDockEntry, DevToolsDockEntryBase, DevToolsDockEntryCategory, DevToolsDockEntryIcon, DevToolsDockHost, DevToolsDockUserEntry, DevToolsDocksUserSettings, DevToolsNodeContext, DevToolsNodeRpcSession, DevToolsNodeRpcSessionMeta, DevToolsNodeUtils, DevToolsPluginOptions, DevToolsRpcClientFunctions, DevToolsRpcServerFunctions, DevToolsRpcSharedStates, DevToolsTerminalHost, DevToolsTerminalSession, DevToolsTerminalSessionBase, DevToolsTerminalSessionStreamChunkEvent, DevToolsTerminalStatus, DevToolsViewAction, DevToolsViewBuiltin, DevToolsViewCustomRender, DevToolsViewHost, DevToolsViewIframe, DevToolsViewLauncher, DevToolsViewLauncherStatus, EntriesToObject, EventEmitter, EventUnsubscribe, EventsMap, PartialWithoutId, PluginWithDevTools, RpcBroadcastOptions, RpcDefinitionsFilter, RpcDefinitionsToFunctions, RpcFunctionsHost, RpcSharedStateGetOptions, RpcSharedStateHost, Thenable, defineRpcFunction };
package/dist/index.mjs CHANGED
@@ -1,7 +1,5 @@
1
1
  import { createDefineWrapperWithContext } from "@vitejs/devtools-rpc";
2
-
3
2
  //#region src/utils/define.ts
4
3
  const defineRpcFunction = createDefineWrapperWithContext();
5
-
6
4
  //#endregion
7
- export { defineRpcFunction };
5
+ export { defineRpcFunction };
@@ -0,0 +1,53 @@
1
+ import { t as EventEmitter } from "./events-D47O3TYC.mjs";
2
+ import { Objectish, Patch, Patch as SharedStatePatch } from "immer";
3
+
4
+ //#region src/utils/shared-state.d.ts
5
+ type ImmutablePrimitive = undefined | null | boolean | string | number | Function;
6
+ type Immutable<T> = T extends ImmutablePrimitive ? T : T extends Array<infer U> ? ImmutableArray<U> : T extends Map<infer K, infer V> ? ImmutableMap<K, V> : T extends Set<infer M> ? ImmutableSet<M> : ImmutableObject<T>;
7
+ type ImmutableArray<T> = ReadonlyArray<Immutable<T>>;
8
+ type ImmutableMap<K, V> = ReadonlyMap<Immutable<K>, Immutable<V>>;
9
+ type ImmutableSet<T> = ReadonlySet<Immutable<T>>;
10
+ type ImmutableObject<T> = { readonly [K in keyof T]: Immutable<T[K]> };
11
+ /**
12
+ * State host that is immutable by default with explicit mutate.
13
+ */
14
+ interface SharedState<T> {
15
+ /**
16
+ * Get the current state. Immutable.
17
+ */
18
+ value: () => Immutable<T>;
19
+ /**
20
+ * Subscribe to state changes.
21
+ */
22
+ on: EventEmitter<SharedStateEvents<T>>['on'];
23
+ /**
24
+ * Mutate the state.
25
+ */
26
+ mutate: (fn: (state: T) => void, syncId?: string) => void;
27
+ /**
28
+ * Apply patches to the state.
29
+ */
30
+ patch: (patches: Patch[], syncId?: string) => void;
31
+ /**
32
+ * Sync IDs that have been applied to the state.
33
+ */
34
+ syncIds: Set<string>;
35
+ }
36
+ interface SharedStateEvents<T> {
37
+ updated: (fullState: T, patches: Patch[] | undefined, syncId: string) => void;
38
+ }
39
+ interface SharedStateOptions<T> {
40
+ /**
41
+ * Initial state.
42
+ */
43
+ initialValue: T;
44
+ /**
45
+ * Enable patches.
46
+ *
47
+ * @default false
48
+ */
49
+ enablePatches?: boolean;
50
+ }
51
+ declare function createSharedState<T extends Objectish>(options: SharedStateOptions<T>): SharedState<T>;
52
+ //#endregion
53
+ export { ImmutableSet as a, SharedStateOptions as c, ImmutableObject as i, SharedStatePatch as l, ImmutableArray as n, SharedState as o, ImmutableMap as r, SharedStateEvents as s, Immutable as t, createSharedState as u };
@@ -1,4 +1,4 @@
1
- import { r as EventsMap, t as EventEmitter } from "../events-57bKw4ct.mjs";
1
+ import { r as EventsMap, t as EventEmitter } from "../events-D47O3TYC.mjs";
2
2
 
3
3
  //#region src/utils/events.d.ts
4
4
  /**
@@ -36,6 +36,5 @@ function createEventEmitter() {
36
36
  once
37
37
  };
38
38
  }
39
-
40
39
  //#endregion
41
- export { createEventEmitter };
40
+ export { createEventEmitter };
@@ -6,6 +6,5 @@ function nanoid(size = 21) {
6
6
  while (i--) id += urlAlphabet[Math.random() * 64 | 0];
7
7
  return id;
8
8
  }
9
-
10
9
  //#endregion
11
- export { nanoid };
10
+ export { nanoid };
@@ -1,53 +1,2 @@
1
- import { t as EventEmitter } from "../events-57bKw4ct.mjs";
2
- import { Objectish, Patch, Patch as SharedStatePatch } from "immer";
3
-
4
- //#region src/utils/shared-state.d.ts
5
- type ImmutablePrimitive = undefined | null | boolean | string | number | Function;
6
- type Immutable<T> = T extends ImmutablePrimitive ? T : T extends Array<infer U> ? ImmutableArray<U> : T extends Map<infer K, infer V> ? ImmutableMap<K, V> : T extends Set<infer M> ? ImmutableSet<M> : ImmutableObject<T>;
7
- type ImmutableArray<T> = ReadonlyArray<Immutable<T>>;
8
- type ImmutableMap<K, V> = ReadonlyMap<Immutable<K>, Immutable<V>>;
9
- type ImmutableSet<T> = ReadonlySet<Immutable<T>>;
10
- type ImmutableObject<T> = { readonly [K in keyof T]: Immutable<T[K]> };
11
- /**
12
- * State host that is immutable by default with explicit mutate.
13
- */
14
- interface SharedState<T> {
15
- /**
16
- * Get the current state. Immutable.
17
- */
18
- value: () => Immutable<T>;
19
- /**
20
- * Subscribe to state changes.
21
- */
22
- on: EventEmitter<SharedStateEvents<T>>['on'];
23
- /**
24
- * Mutate the state.
25
- */
26
- mutate: (fn: (state: T) => void, syncId?: string) => void;
27
- /**
28
- * Apply patches to the state.
29
- */
30
- patch: (patches: Patch[], syncId?: string) => void;
31
- /**
32
- * Sync IDs that have been applied to the state.
33
- */
34
- syncIds: Set<string>;
35
- }
36
- interface SharedStateEvents<T> {
37
- updated: (fullState: T, patches: Patch[] | undefined, syncId: string) => void;
38
- }
39
- interface SharedStateOptions<T> {
40
- /**
41
- * Initial state.
42
- */
43
- initialValue: T;
44
- /**
45
- * Enable patches.
46
- *
47
- * @default false
48
- */
49
- enablePatches?: boolean;
50
- }
51
- declare function createSharedState<T extends Objectish>(options: SharedStateOptions<T>): SharedState<T>;
52
- //#endregion
53
- export { Immutable, ImmutableArray, ImmutableMap, ImmutableObject, ImmutableSet, SharedState, SharedStateEvents, SharedStateOptions, type SharedStatePatch, createSharedState };
1
+ import { a as ImmutableSet, c as SharedStateOptions, i as ImmutableObject, l as SharedStatePatch, n as ImmutableArray, o as SharedState, r as ImmutableMap, s as SharedStateEvents, t as Immutable, u as createSharedState } from "../shared-state-PmCxmgxM.mjs";
2
+ export { Immutable, ImmutableArray, ImmutableMap, ImmutableObject, ImmutableSet, SharedState, SharedStateEvents, SharedStateOptions, SharedStatePatch, createSharedState };
@@ -1,7 +1,6 @@
1
1
  import { createEventEmitter } from "./events.mjs";
2
2
  import { nanoid } from "./nanoid.mjs";
3
3
  import { applyPatches, enablePatches, produce, produceWithPatches } from "immer";
4
-
5
4
  //#region src/utils/shared-state.ts
6
5
  function createSharedState(options) {
7
6
  const { enablePatches: enablePatches$1 = false } = options;
@@ -33,6 +32,5 @@ function createSharedState(options) {
33
32
  syncIds
34
33
  };
35
34
  }
36
-
37
35
  //#endregion
38
- export { createSharedState };
36
+ export { createSharedState };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vitejs/devtools-kit",
3
3
  "type": "module",
4
- "version": "0.0.0-alpha.32",
4
+ "version": "0.0.0-alpha.33",
5
5
  "description": "Vite DevTools Kit",
6
6
  "author": "VoidZero Inc.",
7
7
  "license": "MIT",
@@ -38,12 +38,12 @@
38
38
  "dependencies": {
39
39
  "birpc": "^4.0.0",
40
40
  "immer": "^11.1.4",
41
- "@vitejs/devtools-rpc": "0.0.0-alpha.32"
41
+ "@vitejs/devtools-rpc": "0.0.0-alpha.33"
42
42
  },
43
43
  "devDependencies": {
44
44
  "my-ua-parser": "^2.0.4",
45
45
  "tsdown": "^0.20.3",
46
- "vite": "^8.0.0-beta.14"
46
+ "vite": "^8.0.0-beta.16"
47
47
  },
48
48
  "scripts": {
49
49
  "build": "tsdown",