@solid-devtools/debugger
Advanced tools
| // packages/debugger/src/inspector/types.ts | ||
| var INFINITY = "Infinity"; | ||
| var NEGATIVE_INFINITY = "NegativeInfinity"; | ||
| var NAN = "NaN"; | ||
| var UNDEFINED = "undefined"; | ||
| var ValueType = /* @__PURE__ */ ((ValueType2) => { | ||
| ValueType2["Number"] = "number"; | ||
| ValueType2["Boolean"] = "boolean"; | ||
| ValueType2["String"] = "string"; | ||
| ValueType2["Null"] = "null"; | ||
| ValueType2["Symbol"] = "symbol"; | ||
| ValueType2["Array"] = "array"; | ||
| ValueType2["Object"] = "object"; | ||
| ValueType2["Function"] = "function"; | ||
| ValueType2["Getter"] = "getter"; | ||
| ValueType2["Element"] = "element"; | ||
| ValueType2["Instance"] = "instance"; | ||
| ValueType2["Store"] = "store"; | ||
| ValueType2["Unknown"] = "unknown"; | ||
| return ValueType2; | ||
| })(ValueType || {}); | ||
| var PropGetterState = /* @__PURE__ */ ((PropGetterState2) => { | ||
| PropGetterState2["Live"] = "live"; | ||
| PropGetterState2["Stale"] = "stale"; | ||
| return PropGetterState2; | ||
| })(PropGetterState || {}); | ||
| var GLOBAL_GET_VALUE = "$SdtGetValue"; | ||
| // packages/debugger/src/locator/types.ts | ||
| var WINDOW_PROJECTPATH_PROPERTY = "$sdt_projectPath"; | ||
| var LOCATION_ATTRIBUTE_NAME = "data-source-loc"; | ||
| // packages/debugger/src/main/constants.ts | ||
| var DevtoolsMainView = /* @__PURE__ */ ((DevtoolsMainView3) => { | ||
| DevtoolsMainView3["Structure"] = "structure"; | ||
| return DevtoolsMainView3; | ||
| })(DevtoolsMainView || {}); | ||
| var DEFAULT_MAIN_VIEW = "structure" /* Structure */; | ||
| var DebuggerModule = /* @__PURE__ */ ((DebuggerModule3) => { | ||
| DebuggerModule3["Locator"] = "locator"; | ||
| DebuggerModule3["Structure"] = "structure"; | ||
| DebuggerModule3["Dgraph"] = "dgraph"; | ||
| return DebuggerModule3; | ||
| })(DebuggerModule || {}); | ||
| var TreeWalkerMode = /* @__PURE__ */ ((TreeWalkerMode3) => { | ||
| TreeWalkerMode3["Owners"] = "owners"; | ||
| TreeWalkerMode3["Components"] = "components"; | ||
| TreeWalkerMode3["DOM"] = "dom"; | ||
| return TreeWalkerMode3; | ||
| })(TreeWalkerMode || {}); | ||
| var DEFAULT_WALKER_MODE = "components" /* Components */; | ||
| var NodeType = /* @__PURE__ */ ((NodeType3) => { | ||
| NodeType3["Root"] = "ROOT"; | ||
| NodeType3["Component"] = "COMPONENT"; | ||
| NodeType3["Element"] = "ELEMENT"; | ||
| NodeType3["Effect"] = "EFFECT"; | ||
| NodeType3["Render"] = "RENDER"; | ||
| NodeType3["Memo"] = "MEMO"; | ||
| NodeType3["Computation"] = "COMPUTATION"; | ||
| NodeType3["Refresh"] = "REFRESH"; | ||
| NodeType3["Context"] = "CONTEXT"; | ||
| NodeType3["CatchError"] = "CATCH_ERROR"; | ||
| NodeType3["Signal"] = "SIGNAL"; | ||
| NodeType3["Store"] = "STORE"; | ||
| NodeType3["CustomValue"] = "CUSTOM_VALUE"; | ||
| return NodeType3; | ||
| })(NodeType || {}); | ||
| var NODE_TYPE_NAMES = { | ||
| ["ROOT" /* Root */]: "Root", | ||
| ["COMPONENT" /* Component */]: "Component", | ||
| ["ELEMENT" /* Element */]: "Element", | ||
| ["EFFECT" /* Effect */]: "Effect", | ||
| ["RENDER" /* Render */]: "Render Effect", | ||
| ["MEMO" /* Memo */]: "Memo", | ||
| ["COMPUTATION" /* Computation */]: "Computation", | ||
| ["REFRESH" /* Refresh */]: "Refresh", | ||
| ["CONTEXT" /* Context */]: "Context", | ||
| ["CATCH_ERROR" /* CatchError */]: "CatchError", | ||
| ["SIGNAL" /* Signal */]: "Signal", | ||
| ["STORE" /* Store */]: "Store", | ||
| ["CUSTOM_VALUE" /* CustomValue */]: "Custom Value" | ||
| }; | ||
| var ValueItemType = /* @__PURE__ */ ((ValueItemType2) => { | ||
| ValueItemType2["Signal"] = "signal"; | ||
| ValueItemType2["Prop"] = "prop"; | ||
| ValueItemType2["Value"] = "value"; | ||
| return ValueItemType2; | ||
| })(ValueItemType || {}); | ||
| var UNKNOWN = "unknown"; | ||
| var OWNER_LOCATION_PROP = "sdtLocation"; | ||
| // packages/debugger/src/main/types.ts | ||
| var INSPECTED_STATE_NULL = { | ||
| ownerId: null, | ||
| signalId: null, | ||
| treeWalkerOwnerId: null | ||
| }; | ||
| var getValueItemId = (type, id) => { | ||
| if (type === "value" /* Value */) return "value" /* Value */; | ||
| return `${type}:${id}`; | ||
| }; | ||
| export { | ||
| DevtoolsMainView, | ||
| DEFAULT_MAIN_VIEW, | ||
| DebuggerModule, | ||
| TreeWalkerMode, | ||
| DEFAULT_WALKER_MODE, | ||
| NodeType, | ||
| NODE_TYPE_NAMES, | ||
| ValueItemType, | ||
| UNKNOWN, | ||
| OWNER_LOCATION_PROP, | ||
| INFINITY, | ||
| NEGATIVE_INFINITY, | ||
| NAN, | ||
| UNDEFINED, | ||
| ValueType, | ||
| PropGetterState, | ||
| GLOBAL_GET_VALUE, | ||
| WINDOW_PROJECTPATH_PROPERTY, | ||
| LOCATION_ATTRIBUTE_NAME, | ||
| INSPECTED_STATE_NULL, | ||
| getValueItemId | ||
| }; |
| import * as s from 'solid-js'; | ||
| import { DevtoolsMainView } from '../main/constants.ts'; | ||
| import { type NodeID } from '../main/types.ts'; | ||
| import { type InspectedState, type NodeID, type OutputEmit } from '../main/types.ts'; | ||
| import { type SerializedDGraph } from './collect.ts'; | ||
| import { type OutputEmit, type InspectedState } from '../main/index.ts'; | ||
| export { type SerializedDGraph } from './collect.ts'; | ||
@@ -7,0 +6,0 @@ export type DGraphUpdate = SerializedDGraph.Graph | null; |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dependency/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAI7B,OAAO,EAAC,gBAAgB,EAAW,MAAM,sBAAsB,CAAA;AAE/D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CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;IACxC,IAAI,EAAY,UAAU,CAAA;CAC7B;oBA2DuB,gBAAgB;EAIvC"} |
+1
-1
| export { useDebugger } from './main/index.ts'; | ||
| export { addSolidUpdateListener, interceptComputationRerun, makeValueUpdateListener, observeValueUpdate, removeValueUpdateObserver, } from './main/observe.ts'; | ||
| export { attachDebugger, unobserveAllRoots } from './main/roots.ts'; | ||
| export { attachDebugger } from './main/roots.ts'; | ||
| export { getNodeName, getNodeType, getOwnerType, isSolidComputation, isSolidMemo, isSolidOwner, isSolidRoot, isSolidSignal, isSolidStore, lookupOwner, onOwnerCleanup, onParentCleanup, } from './main/utils.ts'; | ||
| //# sourceMappingURL=index.d.ts.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EACH,sBAAsB,EACtB,yBAAyB,EACzB,uBAAuB,EACvB,kBAAkB,EAClB,yBAAyB,GAC5B,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAC,cAAc,EAAE,iBAAiB,EAAC,MAAM,iBAAiB,CAAA;AACjE,OAAO,EACH,WAAW,EACX,WAAW,EACX,YAAY,EACZ,kBAAkB,EAClB,WAAW,EACX,YAAY,EACZ,WAAW,EACX,aAAa,EACb,YAAY,EACZ,WAAW,EACX,cAAc,EACd,eAAe,GAClB,MAAM,iBAAiB,CAAA"} | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EACH,sBAAsB,EACtB,yBAAyB,EACzB,uBAAuB,EACvB,kBAAkB,EAClB,yBAAyB,GAC5B,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAC,cAAc,EAAC,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EACH,WAAW,EACX,WAAW,EACX,YAAY,EACZ,kBAAkB,EAClB,WAAW,EACX,YAAY,EACZ,WAAW,EACX,aAAa,EACb,YAAY,EACZ,WAAW,EACX,cAAc,EACd,eAAe,GAClB,MAAM,iBAAiB,CAAA"} |
+387
-364
@@ -6,2 +6,3 @@ import { | ||
| INFINITY, | ||
| INSPECTED_STATE_NULL, | ||
| LOCATION_ATTRIBUTE_NAME, | ||
@@ -12,8 +13,8 @@ NAN, | ||
| WINDOW_PROJECTPATH_PROPERTY | ||
| } from "./chunk-PZ4NZVSR.js"; | ||
| } from "./chunk-R4OAKKPG.js"; | ||
| // packages/debugger/src/main/index.ts | ||
| import * as s4 from "solid-js"; | ||
| import { createStaticStore } from "@solid-primitives/static-store"; | ||
| import { defer as defer3 } from "@solid-primitives/utils"; | ||
| import * as s3 from "solid-js"; | ||
| import { msg as msg4, mutate_remove } from "@solid-devtools/shared/utils"; | ||
@@ -34,7 +35,8 @@ | ||
| var RefMapMap = { | ||
| ["owner" /* Owner */]: /* @__PURE__ */ new Map(), | ||
| ["element" /* Element */]: /* @__PURE__ */ new Map(), | ||
| ["signal" /* Signal */]: /* @__PURE__ */ new Map(), | ||
| ["store" /* Store */]: /* @__PURE__ */ new Map(), | ||
| ["store-node" /* StoreNode */]: /* @__PURE__ */ new Map() | ||
| ["OWNER" /* Owner */]: /* @__PURE__ */ new Map(), | ||
| ["ELEMENT" /* Element */]: /* @__PURE__ */ new Map(), | ||
| ["SIGNAL" /* Signal */]: /* @__PURE__ */ new Map(), | ||
| ["STORE" /* Store */]: /* @__PURE__ */ new Map(), | ||
| ["STORE_NODE" /* StoreNode */]: /* @__PURE__ */ new Map(), | ||
| ["CUSTOM_VALUE" /* CustomValue */]: /* @__PURE__ */ new Map() | ||
| }; | ||
@@ -82,3 +84,5 @@ var CleanupRegistry = new FinalizationRegistry((data) => { | ||
| if (isSolidOwner(o)) return getOwnerType(o); | ||
| return isSolidStore(o) ? "store" /* Store */ : "signal" /* Signal */; | ||
| if (isSolidStore(o)) return "STORE" /* Store */; | ||
| if (isSolidSignal(o)) return "SIGNAL" /* Signal */; | ||
| else return "CUSTOM_VALUE" /* CustomValue */; | ||
| } | ||
@@ -89,6 +93,6 @@ var SOLID_REFRESH_PREFIX = "[solid-refresh]"; | ||
| if (!isSolidComputation(o)) { | ||
| if ("sources" in o) return "catchError" /* CatchError */; | ||
| return "root" /* Root */; | ||
| if ("sources" in o) return "CATCH_ERROR" /* CatchError */; | ||
| return "ROOT" /* Root */; | ||
| } | ||
| if (isSolidComponent(o)) return "component" /* Component */; | ||
| if (isSolidComponent(o)) return "COMPONENT" /* Component */; | ||
| if ("comparator" in o) { | ||
@@ -101,13 +105,13 @@ if ( | ||
| ) { | ||
| return "refresh" /* Refresh */; | ||
| return "REFRESH" /* Refresh */; | ||
| } | ||
| return "memo" /* Memo */; | ||
| return "MEMO" /* Memo */; | ||
| } | ||
| if (!o.pure) { | ||
| if (o.user === true) return "effect" /* Effect */; | ||
| if (o.user === true) return "EFFECT" /* Effect */; | ||
| if (o.context !== null && (!o.owner || o.owner.context !== o.context)) | ||
| return "context" /* Context */; | ||
| return "render" /* Render */; | ||
| return "CONTEXT" /* Context */; | ||
| return "RENDER" /* Render */; | ||
| } | ||
| return "computation" /* Computation */; | ||
| return "COMPUTATION" /* Computation */; | ||
| }; | ||
@@ -150,3 +154,3 @@ var getNodeName = (o) => { | ||
| let refresh; | ||
| if (owned && owned.length === 1 && markOwnerType(refresh = owned[0]) === "refresh" /* Refresh */) { | ||
| if (owned && owned.length === 1 && markOwnerType(refresh = owned[0]) === "REFRESH" /* Refresh */) { | ||
| return refresh; | ||
@@ -208,202 +212,2 @@ } | ||
| import { chain, tryOnCleanup } from "@solid-primitives/utils"; | ||
| // packages/debugger/src/main/roots.ts | ||
| import { warn } from "@solid-devtools/shared/utils"; | ||
| // packages/debugger/src/main/component-registry.ts | ||
| var $CLEANUP = Symbol("component-registry-cleanup"); | ||
| var ComponentMap = /* @__PURE__ */ new Map(); | ||
| var ElementNodeMap = /* @__PURE__ */ new Map(); | ||
| function cleanupComponent(nodeID) { | ||
| const component = ComponentMap.get(nodeID); | ||
| if (!component) return; | ||
| component.cleanup(); | ||
| ComponentMap.delete(nodeID); | ||
| for (const element of component.elementNodes) ElementNodeMap.delete(element); | ||
| } | ||
| function registerComponent(data) { | ||
| if ("elementId" in data) { | ||
| const { componentId, elementId, element } = data; | ||
| const component = ComponentMap.get(componentId); | ||
| if (!component) return; | ||
| component.elementNodes.add(elementId); | ||
| ElementNodeMap.set(elementId, { el: element, component }); | ||
| } else { | ||
| const { owner, id, name, elements: elementsList } = data; | ||
| if (!elementsList) return cleanupComponent(id); | ||
| const set = new Set(elementsList); | ||
| const existing = ComponentMap.get(id); | ||
| if (existing) { | ||
| existing.elements = set; | ||
| return; | ||
| } | ||
| const cleanup = onOwnerCleanup(owner, () => cleanupComponent(id), false, $CLEANUP); | ||
| ComponentMap.set(id, { | ||
| id, | ||
| owner, | ||
| name, | ||
| elements: set, | ||
| cleanup, | ||
| elementNodes: /* @__PURE__ */ new Set() | ||
| }); | ||
| } | ||
| } | ||
| function clearComponentRegistry() { | ||
| for (const component of ComponentMap.values()) component.cleanup(); | ||
| ComponentMap.clear(); | ||
| ElementNodeMap.clear(); | ||
| } | ||
| function getComponent(id) { | ||
| const component = ComponentMap.get(id); | ||
| if (component) return { name: component.name, elements: [...component.elements], id }; | ||
| const elData = ElementNodeMap.get(id); | ||
| return elData ? { name: elData.component.name, id: elData.component.id, elements: [elData.el] } : null; | ||
| } | ||
| function findComponent(el) { | ||
| const including = /* @__PURE__ */ new Map(); | ||
| let currEl = el; | ||
| while (currEl) { | ||
| for (const component of ComponentMap.values()) { | ||
| if (component.elements.has(currEl)) including.set(component.owner, component); | ||
| } | ||
| currEl = including.size === 0 ? currEl.parentElement : null; | ||
| } | ||
| if (including.size > 1) { | ||
| for (const owner of including.keys()) { | ||
| if (!including.has(owner)) continue; | ||
| let currOwner = owner.owner; | ||
| while (currOwner) { | ||
| const deleted = including.delete(currOwner); | ||
| if (deleted) break; | ||
| currOwner = currOwner.owner; | ||
| } | ||
| } | ||
| } | ||
| if (including.size === 0) return null; | ||
| const value = including.values().next().value; | ||
| if (value && value.name) { | ||
| return { name: value.name, id: value.id }; | ||
| } | ||
| return null; | ||
| } | ||
| // packages/debugger/src/main/roots.ts | ||
| var RootMap = /* @__PURE__ */ new Map(); | ||
| var getCurrentRoots = () => RootMap.values(); | ||
| var OnOwnerNeedsUpdate; | ||
| function setOnOwnerNeedsUpdate(fn) { | ||
| OnOwnerNeedsUpdate = fn; | ||
| } | ||
| var OnRootRemoved; | ||
| function setOnRootRemoved(fn) { | ||
| OnRootRemoved = fn; | ||
| } | ||
| function createTopRoot(owner) { | ||
| const rootId = getSdtId(owner, "owner" /* Owner */); | ||
| RootMap.set(rootId, owner); | ||
| OnOwnerNeedsUpdate?.(owner, rootId); | ||
| } | ||
| function cleanupRoot(root) { | ||
| const rootId = getSdtId(root, "owner" /* Owner */); | ||
| root.isDisposed = true; | ||
| changeRootAttachment(root, null); | ||
| const wasTarcked = RootMap.delete(rootId); | ||
| if (wasTarcked) OnRootRemoved?.(rootId); | ||
| } | ||
| function changeRootAttachment(root, newParent) { | ||
| let topRoot; | ||
| if (root.attachedTo) { | ||
| root.attachedTo.sdtSubRoots.splice(root.attachedTo.sdtSubRoots.indexOf(root), 1); | ||
| topRoot = getTopRoot(root.attachedTo); | ||
| if (topRoot) OnOwnerNeedsUpdate?.(root.attachedTo, getSdtId(topRoot, "owner" /* Owner */)); | ||
| } | ||
| if (newParent) { | ||
| root.attachedTo = newParent; | ||
| if (newParent.sdtSubRoots) newParent.sdtSubRoots.push(root); | ||
| else newParent.sdtSubRoots = [root]; | ||
| if (topRoot === void 0) topRoot = getTopRoot(newParent); | ||
| if (topRoot) OnOwnerNeedsUpdate?.(newParent, getSdtId(topRoot, "owner" /* Owner */)); | ||
| } else { | ||
| delete root.attachedTo; | ||
| } | ||
| } | ||
| function attachDebugger(owner = setup_default.solid.getOwner()) { | ||
| if (!owner) | ||
| return warn("reatachOwner helper should be called synchronously in a reactive owner."); | ||
| const roots = []; | ||
| let isFirstTopLevel = true; | ||
| while (owner) { | ||
| if (isSolidRoot(owner)) { | ||
| if (owner.isInternal || owner.isDisposed) return; | ||
| if (RootMap.has(getSdtId(owner, "owner" /* Owner */))) { | ||
| isFirstTopLevel = false; | ||
| break; | ||
| } | ||
| roots.push(owner); | ||
| } | ||
| owner = owner.owner; | ||
| } | ||
| for (let i = roots.length - 1; i >= 0; i--) { | ||
| const root = roots[i]; | ||
| root.sdtType = "root" /* Root */; | ||
| onOwnerCleanup(root, () => cleanupRoot(root), true); | ||
| const isTopLevel = isFirstTopLevel && i === 0; | ||
| if (isTopLevel) { | ||
| createTopRoot(root); | ||
| return; | ||
| } | ||
| let parent = findClosestAliveParent(root); | ||
| if (!parent.owner) return warn("Parent owner is missing."); | ||
| changeRootAttachment(root, parent.owner); | ||
| const onParentCleanup2 = () => { | ||
| const newParent = findClosestAliveParent(root); | ||
| changeRootAttachment(root, newParent.owner); | ||
| if (newParent.owner) { | ||
| parent = newParent; | ||
| onOwnerCleanup(parent.root, onParentCleanup2); | ||
| } else { | ||
| removeOwnCleanup(); | ||
| createTopRoot(root); | ||
| } | ||
| }; | ||
| const removeParentCleanup = onOwnerCleanup(parent.root, onParentCleanup2); | ||
| const removeOwnCleanup = onOwnerCleanup(root, removeParentCleanup); | ||
| } | ||
| } | ||
| function unobserveAllRoots() { | ||
| RootMap.forEach((r) => cleanupRoot(r)); | ||
| clearComponentRegistry(); | ||
| } | ||
| function getTopRoot(owner) { | ||
| let root = null; | ||
| do { | ||
| if (isSolidRoot(owner) && !owner.isInternal && !owner.isDisposed) root = owner; | ||
| owner = owner.owner; | ||
| } while (owner); | ||
| return root; | ||
| } | ||
| function findClosestAliveParent(owner) { | ||
| let disposed = null; | ||
| let closestAliveRoot = null; | ||
| let current = owner; | ||
| while (current.owner && !closestAliveRoot) { | ||
| current = current.owner; | ||
| if (isSolidRoot(current)) { | ||
| if (current.isDisposed) disposed = current; | ||
| else closestAliveRoot = current; | ||
| } | ||
| } | ||
| if (!closestAliveRoot) return { owner: null, root: null }; | ||
| return { owner: (disposed ?? owner).owner, root: closestAliveRoot }; | ||
| } | ||
| // packages/debugger/src/main/observe.ts | ||
| for (const e of setup_default.get_created_owners()) { | ||
| attachDebugger(e); | ||
| } | ||
| setup_default.solid.hooks.afterCreateOwner = function(owner) { | ||
| if (isSolidRoot(owner)) { | ||
| attachDebugger(owner); | ||
| } | ||
| }; | ||
| var GraphUpdateListeners = /* @__PURE__ */ new Set(); | ||
@@ -483,3 +287,3 @@ setup_default.solid.hooks.afterUpdate = chain(GraphUpdateListeners); | ||
| const isOwner = isSolidOwner(node); | ||
| const id = getSdtId(node, isOwner ? "owner" /* Owner */ : "signal" /* Signal */); | ||
| const id = getSdtId(node, isOwner ? "OWNER" /* Owner */ : "SIGNAL" /* Signal */); | ||
| if (Graph[id]) return; | ||
@@ -493,6 +297,6 @@ const onNodeUpdate = OnNodeUpdate; | ||
| sources: "sources" in node && node.sources ? node.sources.map( | ||
| (n) => getSdtId(n, isSolidOwner(n) ? "owner" /* Owner */ : "signal" /* Signal */) | ||
| (n) => getSdtId(n, isSolidOwner(n) ? "OWNER" /* Owner */ : "SIGNAL" /* Signal */) | ||
| ) : void 0, | ||
| observers: "observers" in node && node.observers ? node.observers.map((n) => getSdtId(n, "owner" /* Owner */)) : void 0, | ||
| graph: !isOwner && node.graph ? getSdtId(node.graph, "owner" /* Owner */) : void 0 | ||
| observers: "observers" in node && node.observers ? node.observers.map((n) => getSdtId(n, "OWNER" /* Owner */)) : void 0, | ||
| graph: !isOwner && node.graph ? getSdtId(node.graph, "OWNER" /* Owner */) : void 0 | ||
| }; | ||
@@ -505,3 +309,3 @@ } | ||
| const isOwner = isSolidOwner(source); | ||
| if (isOwner && getOwnerType(source) === "refresh" /* Refresh */) continue; | ||
| if (isOwner && getOwnerType(source) === "REFRESH" /* Refresh */) continue; | ||
| n++; | ||
@@ -522,3 +326,3 @@ if (VisitedSources.has(source)) continue; | ||
| for (const observer of node.observers) { | ||
| if (VisitedObservers.has(observer) || getOwnerType(observer) === "refresh" /* Refresh */) { | ||
| if (VisitedObservers.has(observer) || getOwnerType(observer) === "REFRESH" /* Refresh */) { | ||
| continue; | ||
@@ -533,3 +337,3 @@ } | ||
| function lookupDepth(node) { | ||
| const id = getSdtId(node, isSolidOwner(node) ? "owner" /* Owner */ : "signal" /* Signal */); | ||
| const id = getSdtId(node, isSolidOwner(node) ? "OWNER" /* Owner */ : "SIGNAL" /* Signal */); | ||
| if (id in DepthMap) return DepthMap[id]; | ||
@@ -573,5 +377,5 @@ let owner; | ||
| if (state.signalId) { | ||
| return getObjectById(state.signalId, "signal" /* Signal */); | ||
| return getObjectById(state.signalId, "SIGNAL" /* Signal */); | ||
| } else if (state.ownerId) { | ||
| return getObjectById(state.ownerId, "owner" /* Owner */); | ||
| return getObjectById(state.ownerId, "OWNER" /* Owner */); | ||
| } | ||
@@ -584,3 +388,3 @@ return null; | ||
| const type = node && getNodeType(node); | ||
| if (!props.enabled() || !type || type === "root" /* Root */ || type === "component" /* Component */ || type === "context" /* Context */) { | ||
| if (!props.enabled() || !type || type === "ROOT" /* Root */ || type === "COMPONENT" /* Component */ || type === "CONTEXT" /* Context */) { | ||
| clearListeners = null; | ||
@@ -610,9 +414,134 @@ props.emit(msg("DgraphUpdate", null)); | ||
| // packages/debugger/src/inspector/index.ts | ||
| import * as s3 from "solid-js"; | ||
| import { scheduleIdle as scheduleIdle2, throttle as throttle2 } from "@solid-primitives/scheduled"; | ||
| import { msg as msg3, warn as warn3 } from "@solid-devtools/shared/utils"; | ||
| import { scheduleIdle as scheduleIdle2, throttle as throttle2 } from "@solid-primitives/scheduled"; | ||
| import { createEffect as createEffect3, onCleanup as onCleanup3 } from "solid-js"; | ||
| // packages/debugger/src/main/roots.ts | ||
| import { warn } from "@solid-devtools/shared/utils"; | ||
| var UNOWNED_ROOT = { | ||
| cleanups: null, | ||
| owned: null, | ||
| context: null, | ||
| owner: null, | ||
| name: "UNOWNED", | ||
| sdtType: "ROOT" /* Root */ | ||
| }; | ||
| var RootMap = /* @__PURE__ */ new Map(); | ||
| var getCurrentRoots = () => RootMap.values(); | ||
| var OnOwnerNeedsUpdate; | ||
| function setOnOwnerNeedsUpdate(fn) { | ||
| OnOwnerNeedsUpdate = fn; | ||
| } | ||
| var OnRootRemoved; | ||
| function setOnRootRemoved(fn) { | ||
| OnRootRemoved = fn; | ||
| } | ||
| function createTopRoot(owner) { | ||
| const rootId = getSdtId(owner, "OWNER" /* Owner */); | ||
| RootMap.set(rootId, owner); | ||
| OnOwnerNeedsUpdate?.(owner, rootId); | ||
| } | ||
| function cleanupRoot(root) { | ||
| const rootId = getSdtId(root, "OWNER" /* Owner */); | ||
| root.isDisposed = true; | ||
| changeRootAttachment(root, null); | ||
| const wasTarcked = RootMap.delete(rootId); | ||
| if (wasTarcked) OnRootRemoved?.(rootId); | ||
| } | ||
| function changeRootAttachment(root, newParent) { | ||
| let topRoot; | ||
| if (root.attachedTo) { | ||
| root.attachedTo.sdtSubRoots.splice(root.attachedTo.sdtSubRoots.indexOf(root), 1); | ||
| topRoot = getTopRoot(root.attachedTo); | ||
| if (topRoot) OnOwnerNeedsUpdate?.(root.attachedTo, getSdtId(topRoot, "OWNER" /* Owner */)); | ||
| } | ||
| if (newParent) { | ||
| root.attachedTo = newParent; | ||
| if (newParent.sdtSubRoots) newParent.sdtSubRoots.push(root); | ||
| else newParent.sdtSubRoots = [root]; | ||
| if (topRoot === void 0) topRoot = getTopRoot(newParent); | ||
| if (topRoot) OnOwnerNeedsUpdate?.(newParent, getSdtId(topRoot, "OWNER" /* Owner */)); | ||
| } else { | ||
| delete root.attachedTo; | ||
| } | ||
| } | ||
| function attachDebugger(owner = setup_default.solid.getOwner()) { | ||
| if (!owner) | ||
| return warn("reatachOwner helper should be called synchronously in a reactive owner."); | ||
| const roots = []; | ||
| let isFirstTopLevel = true; | ||
| while (owner) { | ||
| if (isSolidRoot(owner)) { | ||
| if (owner.isDisposed) return; | ||
| if (RootMap.has(getSdtId(owner, "OWNER" /* Owner */))) { | ||
| isFirstTopLevel = false; | ||
| break; | ||
| } | ||
| roots.push(owner); | ||
| } | ||
| owner = owner.owner; | ||
| } | ||
| for (let i = roots.length - 1; i >= 0; i--) { | ||
| const root = roots[i]; | ||
| root.sdtType = "ROOT" /* Root */; | ||
| onOwnerCleanup(root, () => cleanupRoot(root), true); | ||
| const isTopLevel = isFirstTopLevel && i === 0; | ||
| if (isTopLevel) { | ||
| createTopRoot(root); | ||
| return; | ||
| } | ||
| let parent = findClosestAliveParent(root); | ||
| if (!parent.owner) return warn("Parent owner is missing."); | ||
| changeRootAttachment(root, parent.owner); | ||
| const onParentCleanup2 = () => { | ||
| const newParent = findClosestAliveParent(root); | ||
| changeRootAttachment(root, newParent.owner); | ||
| if (newParent.owner) { | ||
| parent = newParent; | ||
| onOwnerCleanup(parent.root, onParentCleanup2); | ||
| } else { | ||
| removeOwnCleanup(); | ||
| createTopRoot(root); | ||
| } | ||
| }; | ||
| const removeParentCleanup = onOwnerCleanup(parent.root, onParentCleanup2); | ||
| const removeOwnCleanup = onOwnerCleanup(root, removeParentCleanup); | ||
| } | ||
| } | ||
| function initRoots() { | ||
| attachDebugger(UNOWNED_ROOT); | ||
| for (const e of setup_default.get_created_owners()) { | ||
| attachDebugger(e); | ||
| } | ||
| setup_default.solid.hooks.afterCreateOwner = function(owner) { | ||
| if (isSolidRoot(owner)) { | ||
| attachDebugger(owner); | ||
| } | ||
| }; | ||
| } | ||
| function getTopRoot(owner) { | ||
| let root = null; | ||
| do { | ||
| if (isSolidRoot(owner) && !owner.isDisposed) root = owner; | ||
| owner = owner.owner; | ||
| } while (owner); | ||
| return root; | ||
| } | ||
| function findClosestAliveParent(owner) { | ||
| let disposed = null; | ||
| let closestAliveRoot = null; | ||
| let current = owner; | ||
| while (current.owner && !closestAliveRoot) { | ||
| current = current.owner; | ||
| if (isSolidRoot(current)) { | ||
| if (current.isDisposed) disposed = current; | ||
| else closestAliveRoot = current; | ||
| } | ||
| } | ||
| if (!closestAliveRoot) return { owner: null, root: null }; | ||
| return { owner: (disposed ?? owner).owner, root: closestAliveRoot }; | ||
| } | ||
| // packages/debugger/src/inspector/inspector.ts | ||
| import { misc } from "@nothing-but/utils"; | ||
| import { untrackedCallback } from "@solid-devtools/shared/primitives"; | ||
@@ -628,2 +557,79 @@ // packages/debugger/src/locator/index.ts | ||
| // packages/debugger/src/main/component-registry.ts | ||
| var $CLEANUP = Symbol("component-registry-cleanup"); | ||
| var ComponentMap = /* @__PURE__ */ new Map(); | ||
| var ElementNodeMap = /* @__PURE__ */ new Map(); | ||
| function cleanupComponent(nodeID) { | ||
| const component = ComponentMap.get(nodeID); | ||
| if (!component) return; | ||
| component.cleanup(); | ||
| ComponentMap.delete(nodeID); | ||
| for (const element of component.elementNodes) ElementNodeMap.delete(element); | ||
| } | ||
| function registerComponent(data) { | ||
| if ("elementId" in data) { | ||
| const { componentId, elementId, element } = data; | ||
| const component = ComponentMap.get(componentId); | ||
| if (!component) return; | ||
| component.elementNodes.add(elementId); | ||
| ElementNodeMap.set(elementId, { el: element, component }); | ||
| } else { | ||
| const { owner, id, name, elements: elementsList } = data; | ||
| if (!elementsList) return cleanupComponent(id); | ||
| const set = new Set(elementsList); | ||
| const existing = ComponentMap.get(id); | ||
| if (existing) { | ||
| existing.elements = set; | ||
| return; | ||
| } | ||
| const cleanup = onOwnerCleanup(owner, () => cleanupComponent(id), false, $CLEANUP); | ||
| ComponentMap.set(id, { | ||
| id, | ||
| owner, | ||
| name, | ||
| elements: set, | ||
| cleanup, | ||
| elementNodes: /* @__PURE__ */ new Set() | ||
| }); | ||
| } | ||
| } | ||
| function clearComponentRegistry() { | ||
| for (const component of ComponentMap.values()) component.cleanup(); | ||
| ComponentMap.clear(); | ||
| ElementNodeMap.clear(); | ||
| } | ||
| function getComponent(id) { | ||
| const component = ComponentMap.get(id); | ||
| if (component) return { name: component.name, elements: [...component.elements], id }; | ||
| const elData = ElementNodeMap.get(id); | ||
| return elData ? { name: elData.component.name, id: elData.component.id, elements: [elData.el] } : null; | ||
| } | ||
| function findComponent(el) { | ||
| const including = /* @__PURE__ */ new Map(); | ||
| let currEl = el; | ||
| while (currEl) { | ||
| for (const component of ComponentMap.values()) { | ||
| if (component.elements.has(currEl)) including.set(component.owner, component); | ||
| } | ||
| currEl = including.size === 0 ? currEl.parentElement : null; | ||
| } | ||
| if (including.size > 1) { | ||
| for (const owner of including.keys()) { | ||
| if (!including.has(owner)) continue; | ||
| let currOwner = owner.owner; | ||
| while (currOwner) { | ||
| const deleted = including.delete(currOwner); | ||
| if (deleted) break; | ||
| currOwner = currOwner.owner; | ||
| } | ||
| } | ||
| } | ||
| if (including.size === 0) return null; | ||
| const value = including.values().next().value; | ||
| if (value && value.name) { | ||
| return { name: value.name, id: value.id }; | ||
| } | ||
| return null; | ||
| } | ||
| // packages/debugger/src/locator/element-overlay.tsx | ||
@@ -829,3 +835,3 @@ import { template as _$template } from "solid-js/web"; | ||
| if ("type" in target && target.type === "element") { | ||
| const element = getObjectById(target.id, "element" /* Element */); | ||
| const element = getObjectById(target.id, "ELEMENT" /* Element */); | ||
| if (!(element instanceof HTMLElement)) return []; | ||
@@ -985,3 +991,3 @@ target = element; | ||
| value, | ||
| "element" /* Element */ | ||
| "ELEMENT" /* Element */ | ||
| )}:${value.localName}`; | ||
@@ -991,3 +997,3 @@ } else if (!ignoreNextStore && isStoreNode(value)) { | ||
| if (node !== value) Seen.set(node, index); | ||
| const id = getSdtId(node, "store-node" /* StoreNode */); | ||
| const id = getSdtId(node, "STORE_NODE" /* StoreNode */); | ||
| !InStore && HandleStore && HandleStore(node, id); | ||
@@ -1154,13 +1160,26 @@ const wasInStore = InStore; | ||
| var $INSPECTOR = Symbol("inspector"); | ||
| var typeToObjectTypeMap = { | ||
| ["signal" /* Signal */]: "signal" /* Signal */, | ||
| ["memo" /* Memo */]: "owner" /* Owner */, | ||
| ["store" /* Store */]: "store" /* Store */ | ||
| }; | ||
| function mapSourceValue(node, handler, isMemo) { | ||
| const type = isMemo ? "memo" /* Memo */ : isSolidStore(node) ? "store" /* Store */ : isSolidSignal(node) ? "signal" /* Signal */ : null; | ||
| if (!type) return null; | ||
| const { value } = node, id = getSdtId(node, typeToObjectTypeMap[type]); | ||
| function mapSourceValue(node, handler) { | ||
| let type = getNodeType(node); | ||
| let { value } = node; | ||
| let id; | ||
| switch (type) { | ||
| case "MEMO" /* Memo */: | ||
| id = getSdtId(node, "OWNER" /* Owner */); | ||
| break; | ||
| case "SIGNAL" /* Signal */: | ||
| id = getSdtId(node, "SIGNAL" /* Signal */); | ||
| break; | ||
| case "STORE" /* Store */: | ||
| id = getSdtId(node, "STORE" /* Store */); | ||
| break; | ||
| case "CUSTOM_VALUE" /* CustomValue */: | ||
| id = getSdtId(node, "CUSTOM_VALUE" /* CustomValue */); | ||
| break; | ||
| default: | ||
| return null; | ||
| } | ||
| ValueMap.add(`${"signal" /* Signal */}:${id}`, () => node.value); | ||
| if (type !== "store" /* Store */) observeValueUpdate(node, (v) => handler(id, v), $INSPECTOR); | ||
| if (type === "MEMO" /* Memo */ || type === "SIGNAL" /* Signal */) { | ||
| observeValueUpdate(node, (v) => handler(id, v), $INSPECTOR); | ||
| } | ||
| return { | ||
@@ -1210,3 +1229,3 @@ type, | ||
| } | ||
| var collectOwnerDetails = /* @__PURE__ */ untrackedCallback(function(owner, config) { | ||
| function collectOwnerDetails(owner, config) { | ||
| const { onValueUpdate } = config; | ||
@@ -1217,3 +1236,3 @@ ValueMap = new ValueNodeMap(); | ||
| PropsMap = config.observedPropsMap; | ||
| const id = getSdtId(owner, "owner" /* Owner */); | ||
| const id = getSdtId(owner, "OWNER" /* Owner */); | ||
| const type = markOwnerType(owner); | ||
@@ -1223,3 +1242,3 @@ let { sourceMap, owned } = owner; | ||
| const details = { id, name: getNodeName(owner), type, signals: [] }; | ||
| if (type === "context" /* Context */) { | ||
| if (type === "CONTEXT" /* Context */) { | ||
| sourceMap = void 0; | ||
@@ -1243,8 +1262,4 @@ owned = null; | ||
| ({ checkProxyProps, props: details.props } = mapProps(owner.props)); | ||
| let location = owner.component.location; | ||
| if ( | ||
| // get location from component.location | ||
| typeof location === "string" && (location = parseLocationString(location)) || // get location from the babel plugin marks | ||
| (location = setup_default.get_owner_location(owner)) && (location = parseLocationString(location)) | ||
| ) { | ||
| let location; | ||
| if ((location = owner.sdtLocation) && typeof location === "string" && (location = parseLocationString(location)) || (location = owner.component.location) && typeof location === "string" && (location = parseLocationString(location))) { | ||
| details.location = location; | ||
@@ -1258,13 +1273,17 @@ } | ||
| const onSignalUpdate = (signalId) => onValueUpdate(`${"signal" /* Signal */}:${signalId}`); | ||
| if (sourceMap) { | ||
| for (const signal of sourceMap) { | ||
| const mapped = mapSourceValue(signal, onSignalUpdate, false); | ||
| mapped && details.signals.push(mapped); | ||
| } | ||
| if (sourceMap) for (let signal of sourceMap) { | ||
| let mapped = mapSourceValue(signal, onSignalUpdate); | ||
| if (mapped) details.signals.push(mapped); | ||
| } | ||
| if (owned) { | ||
| for (const node of owned) { | ||
| if (!isSolidMemo(node)) continue; | ||
| const mapped = mapSourceValue(node, onSignalUpdate, true); | ||
| mapped && details.signals.push(mapped); | ||
| if (owned) for (let node of owned) { | ||
| let mapped = mapSourceValue(node, onSignalUpdate); | ||
| if (mapped) details.signals.push(mapped); | ||
| } | ||
| if (owner === UNOWNED_ROOT) { | ||
| for (let signal_ref of setup_default.unowned.signals) { | ||
| let signal = signal_ref.deref(); | ||
| if (signal == null) continue; | ||
| let mapped = mapSourceValue(signal, onSignalUpdate); | ||
| if (mapped == null) continue; | ||
| details.signals.push(mapped); | ||
| } | ||
@@ -1280,3 +1299,3 @@ } | ||
| return result; | ||
| }); | ||
| } | ||
@@ -1294,3 +1313,3 @@ // packages/debugger/src/inspector/store.ts | ||
| node, | ||
| "store-node" /* StoreNode */ | ||
| "STORE_NODE" /* StoreNode */ | ||
| )}:${property}`; | ||
@@ -1319,3 +1338,3 @@ if (property === "length" && typeof value === "number" && Array.isArray(node)) { | ||
| Nodes.set(node, /* @__PURE__ */ new Set([parent])); | ||
| const id = getSdtId(node, "store-node" /* StoreNode */); | ||
| const id = getSdtId(node, "STORE_NODE" /* StoreNode */); | ||
| forEachStoreProp(node, (key, child) => trackStore(child, `${id}:${key}`)); | ||
@@ -1328,3 +1347,3 @@ } | ||
| data.size === 0 && Nodes.delete(node); | ||
| const id = getSdtId(node, "store-node" /* StoreNode */); | ||
| const id = getSdtId(node, "STORE_NODE" /* StoreNode */); | ||
| forEachStoreProp(node, (key, child) => untrackStore(child, `${id}:${key}`)); | ||
@@ -1439,32 +1458,42 @@ } | ||
| let clearPrevDisposeListener; | ||
| createEffect3(() => { | ||
| if (!props.enabled()) return; | ||
| const id = props.inspectedOwnerId(); | ||
| queueMicrotask(() => { | ||
| const owner = id && getObjectById(id, "owner" /* Owner */); | ||
| inspectedOwner && clearOwnerObservers(inspectedOwner, propsMap); | ||
| inspectedOwner = owner; | ||
| valueMap.reset(); | ||
| clearUpdates(); | ||
| if (owner) { | ||
| const result = collectOwnerDetails(owner, { | ||
| onValueUpdate: pushValueUpdate, | ||
| onPropStateChange: pushPropState, | ||
| observedPropsMap: propsMap | ||
| }); | ||
| props.emit(msg3("InspectedNodeDetails", result.details)); | ||
| valueMap = result.valueMap; | ||
| lastDetails = result.details; | ||
| checkProxyProps = result.checkProxyProps || null; | ||
| } else { | ||
| lastDetails = void 0; | ||
| checkProxyProps = null; | ||
| } | ||
| clearPrevDisposeListener?.(); | ||
| clearPrevDisposeListener = owner ? onOwnerDispose(owner, props.resetInspectedNode) : void 0; | ||
| }); | ||
| function inspectOwnerId(id) { | ||
| const owner = id && getObjectById(id, "OWNER" /* Owner */); | ||
| if (inspectedOwner) clearOwnerObservers(inspectedOwner, propsMap); | ||
| inspectedOwner = owner; | ||
| valueMap.reset(); | ||
| clearUpdates(); | ||
| if (owner) { | ||
| const result = collectOwnerDetails(owner, { | ||
| onValueUpdate: pushValueUpdate, | ||
| onPropStateChange: pushPropState, | ||
| observedPropsMap: propsMap | ||
| }); | ||
| props.emit(msg3("InspectedNodeDetails", result.details)); | ||
| valueMap = result.valueMap; | ||
| lastDetails = result.details; | ||
| checkProxyProps = result.checkProxyProps || null; | ||
| } else { | ||
| lastDetails = void 0; | ||
| checkProxyProps = null; | ||
| } | ||
| clearPrevDisposeListener?.(); | ||
| clearPrevDisposeListener = owner ? onOwnerDispose(owner, props.resetInspectedNode) : void 0; | ||
| } | ||
| const inspectedOwnerId = s3.createMemo( | ||
| () => props.enabled() ? props.inspectedState().ownerId : null | ||
| ); | ||
| s3.createEffect(() => { | ||
| let id = inspectedOwnerId(); | ||
| s3.untrack(() => inspectOwnerId(id)); | ||
| }); | ||
| createEffect3(() => { | ||
| function onUnownedRootChange() { | ||
| if (inspectedOwner === UNOWNED_ROOT) { | ||
| inspectOwnerId(inspectedOwnerId()); | ||
| } | ||
| } | ||
| setup_default.unowned.onSignalAdded = onUnownedRootChange; | ||
| setup_default.unowned.onSignalRemoved = onUnownedRootChange; | ||
| s3.createEffect(() => { | ||
| if (!props.enabled()) return; | ||
| onCleanup3(addSolidUpdateListener(() => checkProxyProps && triggerPropsCheck())); | ||
| s3.onCleanup(addSolidUpdateListener(() => checkProxyProps && triggerPropsCheck())); | ||
| }); | ||
@@ -1489,3 +1518,3 @@ return { | ||
| // packages/debugger/src/structure/walker.ts | ||
| import { untrackedCallback as untrackedCallback2 } from "@solid-devtools/shared/primitives"; | ||
| import { untrackedCallback } from "@solid-devtools/shared/primitives"; | ||
| import { asArray } from "@solid-devtools/shared/utils"; | ||
@@ -1523,3 +1552,3 @@ var Mode; | ||
| const type = markOwnerType(child); | ||
| if (type === "component" /* Component */) { | ||
| if (type === "COMPONENT" /* Component */) { | ||
| const mappedChild = mapOwner(child, mappedOwner); | ||
@@ -1566,4 +1595,4 @@ if (mappedChild) children.push(mappedChild); | ||
| const mappedEl = { | ||
| id: getSdtId(el, "element" /* Element */), | ||
| type: "element" /* Element */, | ||
| id: getSdtId(el, "ELEMENT" /* Element */), | ||
| type: "ELEMENT" /* Element */, | ||
| name: el.localName, | ||
@@ -1579,3 +1608,3 @@ children: [] | ||
| function mapOwner(owner, parent) { | ||
| const id = getSdtId(owner, "owner" /* Owner */); | ||
| const id = getSdtId(owner, "OWNER" /* Owner */); | ||
| const type = markOwnerType(owner); | ||
@@ -1585,5 +1614,5 @@ const name = getNodeName(owner); | ||
| let resolvedElements; | ||
| if (type === "component" /* Component */) { | ||
| if (type === "COMPONENT" /* Component */) { | ||
| let first_owned; | ||
| if (name === "provider" && owner.owned && owner.owned.length === 1 && markOwnerType(first_owned = owner.owned[0]) === "context" /* Context */) { | ||
| if (name === "provider" && owner.owned && owner.owned.length === 1 && markOwnerType(first_owned = owner.owned[0]) === "CONTEXT" /* Context */) { | ||
| return mapOwner(first_owned, parent); | ||
@@ -1604,3 +1633,3 @@ } | ||
| observeComputation(owner, owner); | ||
| if (type != "context" /* Context */ && (!owner.sources || owner.sources.length === 0)) { | ||
| if (type != "CONTEXT" /* Context */ && (!owner.sources || owner.sources.length === 0)) { | ||
| mapped.frozen = true; | ||
@@ -1620,3 +1649,3 @@ } | ||
| } | ||
| var walkSolidTree = /* @__PURE__ */ untrackedCallback2(function(owner, config) { | ||
| var walkSolidTree = /* @__PURE__ */ untrackedCallback(function(owner, config) { | ||
| Mode = config.mode; | ||
@@ -1654,4 +1683,4 @@ RootId = config.rootId; | ||
| const type = markOwnerType(owner); | ||
| if (type === "component" /* Component */ || type === "context" /* Context */) return owner; | ||
| if (type === "root" /* Root */) root = owner; | ||
| if (type === "COMPONENT" /* Component */ || type === "CONTEXT" /* Context */) return owner; | ||
| if (type === "ROOT" /* Root */) root = owner; | ||
| owner = owner.owner; | ||
@@ -1673,3 +1702,3 @@ } while (owner); | ||
| } | ||
| let id = getSdtId(owner, "owner" /* Owner */); | ||
| let id = getSdtId(owner, "OWNER" /* Owner */); | ||
| props.onNodeUpdate(id); | ||
@@ -1680,12 +1709,17 @@ }); | ||
| if (props.enabled()) { | ||
| const updated = {}; | ||
| const partial = !shouldUpdateAllRoots; | ||
| let partial = !shouldUpdateAllRoots; | ||
| shouldUpdateAllRoots = false; | ||
| const [owners, getRootId] = partial ? [updateQueue, (owner) => ownerRoots.get(owner)] : [ | ||
| getCurrentRoots(), | ||
| (owner) => getSdtId(owner, "owner" /* Owner */) | ||
| ]; | ||
| for (const owner of owners) { | ||
| const rootId = getRootId(owner); | ||
| const tree = walkSolidTree(owner, { | ||
| let updated = {}; | ||
| let owners; | ||
| let getRootId; | ||
| if (partial) { | ||
| owners = updateQueue; | ||
| getRootId = (owner) => ownerRoots.get(owner); | ||
| } else { | ||
| owners = getCurrentRoots(); | ||
| getRootId = (owner) => getSdtId(owner, "OWNER" /* Owner */); | ||
| } | ||
| for (let owner of owners) { | ||
| let rootId = getRootId(owner); | ||
| let tree = walkSolidTree(owner, { | ||
| rootId, | ||
@@ -1696,3 +1730,3 @@ mode: treeWalkerMode, | ||
| }); | ||
| const map = updated[rootId]; | ||
| let map = updated[rootId]; | ||
| if (map) map[tree.id] = tree; | ||
@@ -1753,2 +1787,3 @@ else updated[rootId] = { [tree.id]: tree }; | ||
| function createDebugger() { | ||
| initRoots(); | ||
| const _output_listeners = []; | ||
@@ -1768,12 +1803,12 @@ function listen(listener) { | ||
| }); | ||
| const debuggerEnabled = s3.createMemo( | ||
| const debuggerEnabled = s4.createMemo( | ||
| () => modules.debugger || modules.locatorKeyPressSignal() | ||
| ); | ||
| const dgraphEnabled = s3.createMemo( | ||
| const dgraphEnabled = s4.createMemo( | ||
| () => modules.dgraph && debuggerEnabled() | ||
| ); | ||
| const locatorEnabled = s3.createMemo( | ||
| const locatorEnabled = s4.createMemo( | ||
| () => (modules.locatorKeyPressSignal() || modules.locator) && debuggerEnabled() | ||
| ); | ||
| s3.createEffect(defer3(debuggerEnabled, (enabled) => { | ||
| s4.createEffect(defer3(debuggerEnabled, (enabled) => { | ||
| emitOutput(msg4("DebuggerEnabled", enabled)); | ||
@@ -1794,50 +1829,36 @@ })); | ||
| } | ||
| const INITIAL_INSPECTED_STATE = { | ||
| ownerId: null, | ||
| signalId: null, | ||
| treeWalkerOwnerId: null | ||
| }; | ||
| const [inspectedState, setInspectedState] = s3.createSignal(INITIAL_INSPECTED_STATE, { equals: false }); | ||
| const inspectedOwnerId = s3.createMemo(() => inspectedState().ownerId); | ||
| s3.createEffect(() => { | ||
| const [inspectedState, setInspectedState] = s4.createSignal( | ||
| INSPECTED_STATE_NULL, | ||
| { equals: false } | ||
| ); | ||
| s4.createEffect(() => { | ||
| emitOutput(msg4("InspectedState", inspectedState())); | ||
| }); | ||
| function getTreeWalkerOwnerId(ownerId) { | ||
| const owner = ownerId && getObjectById(ownerId, "owner" /* Owner */); | ||
| const owner = ownerId && getObjectById(ownerId, "OWNER" /* Owner */); | ||
| const treeWalkerOwner = owner && structure.getClosestIncludedOwner(owner); | ||
| return treeWalkerOwner ? getSdtId(treeWalkerOwner, "owner" /* Owner */) : null; | ||
| return treeWalkerOwner ? getSdtId(treeWalkerOwner, "OWNER" /* Owner */) : null; | ||
| } | ||
| function updateInspectedNode() { | ||
| setInspectedState((p) => ({ | ||
| ...p, | ||
| treeWalkerOwnerId: getTreeWalkerOwnerId(p.treeWalkerOwnerId) | ||
| })); | ||
| } | ||
| function resetInspectedNode() { | ||
| setInspectedState(INITIAL_INSPECTED_STATE); | ||
| } | ||
| function setInspectedNode(data) { | ||
| let { ownerId, signalId } = data ?? { ownerId: null, signalId: null }; | ||
| if (ownerId && !getObjectById(ownerId, "owner" /* Owner */)) ownerId = null; | ||
| if (signalId && !getObjectById(signalId, "signal" /* Signal */)) signalId = null; | ||
| setInspectedState({ | ||
| ownerId, | ||
| signalId, | ||
| treeWalkerOwnerId: getTreeWalkerOwnerId(ownerId) | ||
| }); | ||
| if (data == null) { | ||
| setInspectedState(INSPECTED_STATE_NULL); | ||
| } else { | ||
| let ownerId = data.ownerId && getObjectById(data.ownerId, "OWNER" /* Owner */) && data.ownerId; | ||
| let signalId = data.signalId && getObjectById(data.signalId, "SIGNAL" /* Signal */) && data.signalId; | ||
| let treeWalkerOwnerId = getTreeWalkerOwnerId(ownerId); | ||
| setInspectedState({ ownerId, signalId, treeWalkerOwnerId }); | ||
| } | ||
| } | ||
| s3.createComputed( | ||
| defer3(debuggerEnabled, (enabled) => { | ||
| if (!enabled) resetInspectedNode(); | ||
| }) | ||
| ); | ||
| s4.createComputed(defer3(debuggerEnabled, (enabled) => { | ||
| if (!enabled) setInspectedState(INSPECTED_STATE_NULL); | ||
| })); | ||
| let node_updates_ids = []; | ||
| let node_updates_timeout = 0; | ||
| let node_updates_timeout = null; | ||
| function pushNodeUpdate(id) { | ||
| node_updates_ids.push(id); | ||
| if (node_updates_timeout === 0) { | ||
| node_updates_timeout = window.setTimeout(() => { | ||
| if (node_updates_timeout == null) { | ||
| node_updates_timeout = setTimeout(() => { | ||
| emitOutput(msg4("NodeUpdates", node_updates_ids)); | ||
| node_updates_ids = []; | ||
| node_updates_timeout = 0; | ||
| node_updates_timeout = null; | ||
| }); | ||
@@ -1849,3 +1870,6 @@ } | ||
| emitOutput(msg4("StructureUpdates", updates)); | ||
| updateInspectedNode(); | ||
| setInspectedState((p) => ({ | ||
| ...p, | ||
| treeWalkerOwnerId: getTreeWalkerOwnerId(p.treeWalkerOwnerId) | ||
| })); | ||
| }, | ||
@@ -1857,4 +1881,4 @@ onNodeUpdate: pushNodeUpdate, | ||
| enabled: debuggerEnabled, | ||
| inspectedOwnerId, | ||
| resetInspectedNode, | ||
| inspectedState, | ||
| resetInspectedNode: () => setInspectedState(INSPECTED_STATE_NULL), | ||
| emit: emitOutput | ||
@@ -1886,3 +1910,3 @@ }); | ||
| } | ||
| s3.createEffect(defer3(modules.locatorKeyPressSignal, (state) => { | ||
| s4.createEffect(defer3(modules.locatorKeyPressSignal, (state) => { | ||
| emitOutput(msg4("LocatorModeChange", state)); | ||
@@ -1893,4 +1917,4 @@ })); | ||
| case "ResetState": { | ||
| s3.batch(() => { | ||
| resetInspectedNode(); | ||
| s4.batch(() => { | ||
| setInspectedState(INSPECTED_STATE_NULL); | ||
| currentView = DEFAULT_MAIN_VIEW; | ||
@@ -1965,4 +1989,3 @@ structure.resetTreeWalkerMode(); | ||
| removeValueUpdateObserver, | ||
| unobserveAllRoots, | ||
| useDebugger | ||
| }; |
@@ -1,4 +0,3 @@ | ||
| import { type Accessor } from 'solid-js'; | ||
| import { type OutputEmit } from '../main/index.ts'; | ||
| import { type Mapped, type NodeID, type ValueItemID } from '../main/types.ts'; | ||
| import * as s from 'solid-js'; | ||
| import { type InspectedState, type Mapped, type OutputEmit, type ValueItemID } from '../main/types.ts'; | ||
| export * from './types.ts'; | ||
@@ -13,4 +12,4 @@ export type ToggleInspectedValueData = { | ||
| export declare function createInspector(props: { | ||
| inspectedOwnerId: Accessor<NodeID | null>; | ||
| enabled: Accessor<boolean>; | ||
| inspectedState: s.Accessor<InspectedState>; | ||
| enabled: s.Accessor<boolean>; | ||
| resetInspectedNode: VoidFunction; | ||
@@ -17,0 +16,0 @@ emit: OutputEmit; |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/inspector/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,KAAK,QAAQ,EAA0B,MAAM,UAAU,CAAA;AAC/D,OAAO,EAAC,KAAK,UAAU,EAAC,MAAM,kBAAkB,CAAA;AAGhD,OAAO,EAAC,KAAK,MAAM,EAAE,KAAK,MAAM,EAAc,KAAK,WAAW,EAAC,MAAM,kBAAkB,CAAA;AAOvF,cAAc,YAAY,CAAA;AAE1B,MAAM,MAAM,wBAAwB,GAAG;IAAC,EAAE,EAAE,WAAW,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAC,CAAA;AAE3E;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE;IACnC,gBAAgB,EAAI,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;IAC3C,OAAO,EAAa,QAAQ,CAAC,OAAO,CAAC,CAAA;IACrC,kBAAkB,EAAE,YAAY,CAAA;IAChC,IAAI,EAAgB,UAAU,CAAA;CACjC;;sCAuKuC,wBAAwB,GAAG,IAAI;8BAMrC,WAAW,GAAG,IAAI;EAKnD"} | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/inspector/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAK7B,OAAO,EAAC,KAAK,cAAc,EAAE,KAAK,MAAM,EAAe,KAAK,UAAU,EAAc,KAAK,WAAW,EAAC,MAAM,kBAAkB,CAAA;AAS7H,cAAc,YAAY,CAAA;AAE1B,MAAM,MAAM,wBAAwB,GAAG;IAAC,EAAE,EAAE,WAAW,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAC,CAAA;AAE3E;;GAEG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE;IACnC,cAAc,EAAM,CAAC,CAAC,QAAQ,CAAC,cAAc,CAAC,CAAA;IAC9C,OAAO,EAAa,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;IACvC,kBAAkB,EAAE,YAAY,CAAA;IAChC,IAAI,EAAgB,UAAU,CAAA;CACjC;;sCAwLuC,wBAAwB,GAAG,IAAI;8BAMrC,WAAW,GAAG,IAAI;EAKnD"} |
@@ -50,7 +50,8 @@ import type { Mapped, Solid, ValueItemID } from '../main/types.ts'; | ||
| export declare function clearOwnerObservers(owner: Solid.Owner, observedPropsMap: ObservedPropsMap): void; | ||
| export declare const collectOwnerDetails: (owner: Solid.Owner, config: { | ||
| export type CollectDetailsConfig = { | ||
| onPropStateChange: Inspector.OnPropStateChange; | ||
| onValueUpdate: Inspector.OnValueUpdate; | ||
| observedPropsMap: ObservedPropsMap; | ||
| }) => { | ||
| }; | ||
| export declare function collectOwnerDetails(owner: Solid.Owner, config: CollectDetailsConfig): { | ||
| details: Mapped.OwnerDetails; | ||
@@ -57,0 +58,0 @@ valueMap: ValueNodeMap; |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"inspector.d.ts","sourceRoot":"","sources":["../../src/inspector/inspector.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAC,MAAM,EAAU,KAAK,EAAE,WAAW,EAAC,MAAM,kBAAkB,CAAA;AAGxE,OAAO,EAAC,KAAK,kBAAkB,EAAE,eAAe,EAAC,MAAM,YAAY,CAAA;AAEnE,qBAAa,SAAS;IAGC,QAAQ,EAAE,CAAC,MAAM,OAAO,CAAC,GAAG,SAAS;IAFxD,OAAO,CAAC,aAAa,CAAqB;IAC1C,OAAO,CAAC,QAAQ,CAAQ;gBACL,QAAQ,EAAE,CAAC,MAAM,OAAO,CAAC,GAAG,SAAS;IACxD,gBAAgB,CAAC,KAAK,EAAE,YAAY;IAGpC,OAAO,CAAC,WAAW;IAInB,KAAK;IAIL,UAAU;IAGV,WAAW,CAAC,QAAQ,EAAE,OAAO;CAIhC;AAED,qBAAa,YAAY;IACrB,OAAO,CAAC,MAAM,CAAuC;IACrD,GAAG,CAAC,EAAE,EAAE,WAAW,GAAG,SAAS,GAAG,SAAS;IAG3C,GAAG,CAAC,EAAE,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC,MAAM,OAAO,CAAC,GAAG,SAAS;IAG1D,KAAK;CAGR;AAED,yBAAiB,SAAS,CAAC;IACvB,oFAAoF;IACpF,KAAY,iBAAiB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,KAAK,IAAI,CAAA;IAC7E,KAAY,aAAa,GAAG,CAAC,EAAE,EAAE,WAAW,KAAK,IAAI,CAAA;CACxD;AAED,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,aAAa,CAAC,CAAA;AAE/E,QAAA,MAAM,QAAQ,eA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;;;;;GAOG;AACH,wBAAgB,WAAW,CACvB,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,OAAO,EACb,WAAW,CAAC,EAAE,OAAO,WAAW,EAChC,OAAO,UAAQ,GAChB,YAAY,EAAE,CAahB"} | ||
| {"version":3,"file":"serialize.d.ts","sourceRoot":"","sources":["../../src/inspector/serialize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,UAAU,EAAC,MAAM,yBAAyB,CAAA;AAIvD,OAAO,EACH,KAAK,YAAY,EAIjB,KAAK,MAAM,EACX,KAAK,KAAK,EAGb,MAAM,aAAa,CAAA;AAOpB,QAAA,IAAI,WAAW,EAAE,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,UAAU,CAAA;AA6F/E;;;;;;;GAOG;AACH,wBAAgB,WAAW,CACvB,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,OAAO,EACb,WAAW,CAAC,EAAE,OAAO,WAAW,EAChC,OAAO,UAAQ,GAChB,YAAY,EAAE,CAahB"} |
| import * as s from 'solid-js'; | ||
| import { type OutputEmit } from '../main/index.ts'; | ||
| import { type NodeID } from '../main/types.ts'; | ||
| import { type NodeID, type OutputEmit } from '../main/types.ts'; | ||
| import { type SourceCodeData, type SourceLocation } from './find-components.ts'; | ||
| import { type HighlightElementPayload, type LocatorOptions } from './types.ts'; | ||
| export { parseLocationString } from './find-components.ts'; | ||
| export * from './types.ts'; | ||
| export declare function createLocator(props: { | ||
@@ -8,0 +8,0 @@ locatorEnabled: s.Accessor<boolean>; |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/locator/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAO7B,OAAO,EAAC,KAAK,UAAU,EAAC,MAAM,kBAAkB,CAAA;AAIhD,OAAO,EAAC,KAAK,MAAM,EAAC,MAA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AAA;IAC1D,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,GAAG,IAAI,CAAA;IAC/D,IAAI,EAAE,UAAU,CAAA;CACnB;0BAkHgC,cAAc,KAAG,IAAI;uCAoBX,uBAAuB;oCAG1B,cAAc,WAAW,cAAc,CAAC,SAAS,CAAC;EAWzF"} |
+14
-12
@@ -20,14 +20,15 @@ /** | ||
| export declare enum NodeType { | ||
| Root = "root", | ||
| Component = "component", | ||
| Element = "element", | ||
| Effect = "effect", | ||
| Render = "render", | ||
| Memo = "memo", | ||
| Computation = "computation", | ||
| Refresh = "refresh", | ||
| Context = "context", | ||
| CatchError = "catchError", | ||
| Signal = "signal", | ||
| Store = "store" | ||
| Root = "ROOT", | ||
| Component = "COMPONENT", | ||
| Element = "ELEMENT", | ||
| Effect = "EFFECT", | ||
| Render = "RENDER", | ||
| Memo = "MEMO", | ||
| Computation = "COMPUTATION", | ||
| Refresh = "REFRESH", | ||
| Context = "CONTEXT", | ||
| CatchError = "CATCH_ERROR", | ||
| Signal = "SIGNAL", | ||
| Store = "STORE", | ||
| CustomValue = "CUSTOM_VALUE" | ||
| } | ||
@@ -41,2 +42,3 @@ export declare const NODE_TYPE_NAMES: Readonly<Record<NodeType, string>>; | ||
| export declare const UNKNOWN = "unknown"; | ||
| export declare const OWNER_LOCATION_PROP = "sdtLocation"; | ||
| //# sourceMappingURL=constants.d.ts.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/main/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,gBAAgB;IACxB,SAAS,cAAc;CAC1B;AACD,eAAO,MAAM,iBAAiB,6BAA6B,CAAA;AAE3D,oBAAY,cAAc;IACtB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,MAAM,WAAW;CACpB;AAED,oBAAY,cAAc;IACtB,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB,GAAG,QAAQ;CACd;AACD,eAAO,MAAM,mBAAmB,4BAA4B,CAAA;AAE5D,oBAAY,QAAQ;IAChB,IAAI,SAAS;IACb,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,WAAW,gBAAgB;IAC3B,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,MAAM,WAAW;IACjB,KAAK,UAAU;CAClB;AAED,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAa9D,CAAA;AAED,oBAAY,aAAa;IACrB,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,KAAK,UAAU;CAClB;AAED,eAAO,MAAM,OAAO,YAAY,CAAA"} | ||
| {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/main/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,gBAAgB;IACxB,SAAS,cAAc;CAC1B;AACD,eAAO,MAAM,iBAAiB,6BAA6B,CAAA;AAE3D,oBAAY,cAAc;IACtB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,MAAM,WAAW;CACpB;AAED,oBAAY,cAAc;IACtB,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB,GAAG,QAAQ;CACd;AACD,eAAO,MAAM,mBAAmB,4BAA4B,CAAA;AAE5D,oBAAY,QAAQ;IAChB,IAAI,SAAgB;IACpB,SAAS,cAAgB;IACzB,OAAO,YAAgB;IACvB,MAAM,WAAgB;IACtB,MAAM,WAAgB;IACtB,IAAI,SAAgB;IACpB,WAAW,gBAAgB;IAC3B,OAAO,YAAgB;IACvB,OAAO,YAAgB;IACvB,UAAU,gBAAiB;IAC3B,MAAM,WAAgB;IACtB,KAAK,UAAgB;IACrB,WAAW,iBAAiB;CAC/B;AAED,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAc9D,CAAA;AAED,oBAAY,aAAa;IACrB,MAAM,WAAW;IACjB,IAAI,SAAW;IACf,KAAK,UAAW;CACnB;AAED,eAAO,MAAM,OAAO,YAAY,CAAA;AAEhC,eAAO,MAAM,mBAAmB,gBAAgB,CAAA"} |
| import { type NodeID, type Solid } from './types.ts'; | ||
| export declare const enum ObjectType { | ||
| Owner = "owner", | ||
| Element = "element", | ||
| Signal = "signal", | ||
| Store = "store", | ||
| StoreNode = "store-node" | ||
| Owner = "OWNER", | ||
| Element = "ELEMENT", | ||
| Signal = "SIGNAL", | ||
| Store = "STORE", | ||
| StoreNode = "STORE_NODE", | ||
| CustomValue = "CUSTOM_VALUE" | ||
| } | ||
@@ -15,2 +16,3 @@ type ValueMap = { | ||
| [ObjectType.StoreNode]: Solid.StoreNode; | ||
| [ObjectType.CustomValue]: Solid.SourceMapValue; | ||
| }; | ||
@@ -17,0 +19,0 @@ export declare function getSdtId<T extends ObjectType>(obj: ValueMap[T], objType: T): NodeID; |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"id.d.ts","sourceRoot":"","sources":["../../src/main/id.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,KAAK,MAAM,EAAE,KAAK,KAAK,EAAC,MAAM,YAAY,CAAA;AAElD,0BAAkB,UAAU;IACxB,KAAK,UAAc;IACnB,OAAO,YAAc;IACrB,MAAM,WAAc;IACpB,KAAK,UAAc;IACnB,SAAS,eAAe;CAC3B;AAED,KAAK,QAAQ,GAAG;IACZ,CAAC,UAAU,CAAC,KAAK,CAAC,EAAM,KAAK,CAAC,KAAK,CAAA;IACnC,CAAC,UAAU,CAAC,OAAO,CAAC,EAAI,OAAO,CAAA;IAC/B,CAAC,UAAU,CAAC,MAAM,CAAC,EAAK,KAAK,CAAC,MAAM,CAAA;IACpC,CAAC,UAAU,CAAC,KAAK,CAAC,EAAM,KAAK,CAAC,KAAK,CAAA;IACnC,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA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;AAED,wBAAgB,aAAa,CAAC,CAAC,SAAS,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAG9F;AAED,uBAAuB;AACvB,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAGvD"} |
+1
-51
| import * as s from 'solid-js'; | ||
| import { type Union } from '@solid-devtools/shared/utils'; | ||
| import { type DGraphUpdate } from '../dependency/index.ts'; | ||
| import { type InspectorUpdate, type ToggleInspectedValueData } from '../inspector/index.ts'; | ||
| import { type HighlightElementPayload } from '../locator/types.ts'; | ||
| import { type StructureUpdates } from '../structure/index.ts'; | ||
| import { DebuggerModule, DevtoolsMainView, TreeWalkerMode } from './constants.ts'; | ||
| import { type Mapped, type NodeID, type ValueItemID } from './types.ts'; | ||
| export type InspectedState = { | ||
| readonly ownerId: NodeID | null; | ||
| readonly signalId: NodeID | null; | ||
| /** closest note to inspected signal/owner on the owner structure */ | ||
| readonly treeWalkerOwnerId: NodeID | null; | ||
| }; | ||
| export type OutputChannels = { | ||
| DebuggerEnabled: boolean; | ||
| ResetPanel: void; | ||
| InspectedState: InspectedState; | ||
| InspectedNodeDetails: Mapped.OwnerDetails; | ||
| StructureUpdates: StructureUpdates; | ||
| NodeUpdates: NodeID[]; | ||
| InspectorUpdate: InspectorUpdate[]; | ||
| LocatorModeChange: boolean; | ||
| HoveredComponent: { | ||
| nodeId: NodeID; | ||
| state: boolean; | ||
| }; | ||
| InspectedComponent: NodeID; | ||
| DgraphUpdate: DGraphUpdate; | ||
| }; | ||
| export type InputChannels = { | ||
| ResetState: void; | ||
| InspectNode: { | ||
| ownerId: NodeID | null; | ||
| signalId: NodeID | null; | ||
| } | null; | ||
| InspectValue: ToggleInspectedValueData; | ||
| ConsoleInspectValue: ValueItemID; | ||
| HighlightElementChange: HighlightElementPayload; | ||
| OpenLocation: void; | ||
| TreeViewModeChange: TreeWalkerMode; | ||
| ViewChange: DevtoolsMainView; | ||
| ToggleModule: { | ||
| module: DebuggerModule; | ||
| enabled: boolean; | ||
| }; | ||
| }; | ||
| export type InputMessage = Union<InputChannels>; | ||
| export type InputListener = (e: InputMessage) => void; | ||
| export type OutputMessage = Union<OutputChannels>; | ||
| export type OutputListener = (e: OutputMessage) => void; | ||
| export type OutputEmit = (e: OutputMessage) => void; | ||
| import { type InputMessage, type OutputListener } from './types.ts'; | ||
| /** | ||
@@ -54,0 +4,0 @@ * Used for connecting debugger to devtools |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/main/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAC7B,OAAO,EAAkC,KAAK,KAAK,EAAC,MAAM,8BAA8B,CAAA;AACxF,OAAO,EAAwB,KAAK,YAAY,EAAC,MAAM,wBAAwB,CAAA;AAC/E,OAAO,EAAkB,KAAK,eAAe,EAAE,KAAK,wBAAwB,EAAC,MAAM,uBAAuB,CAAA;AAE1G,OAAO,EAAC,KAAK,uBAAuB,EAAC,MAAM,qBAAqB,CAAA;AAChE,OAAO,EAAkB,KAAK,gBAAgB,EAAC,MAAM,uBAAuB,CAAA;AAC5E,OAAO,EAAC,cAAc,EAAqB,gBAAgB,EAAE,cAAc,EAAC,MAAM,gBAAgB,CAAA;AAGlG,OAAO,EAAC,KAAK,MAAM,EAAE,KAAK,MAAM,EAAE,KAAK,WAAW,EAAC,MAAM,YAAY,CAAA;AAErE,MAAM,MAAM,cAAc,GAAG;IACzB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IAC/B,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC,oEAAoE;IACpE,QAAQ,CAAC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;CAC5C,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IACzB,eA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AC,EAAE,aAAa,KAAK,IAAI,CAAA;AAiQnD;;GAEG;AACH,wBAAgB,WAAW;;;;;;;uBA9PG,cAAc,KAAG,CAAC,MAAM,IAAI,CAAC;cAiMjC,YAAY;;2BAkDP,OAAO;EAcrC"} | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/main/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,UAAU,CAAA;AAY7B,OAAO,EAGH,KAAK,YAAY,EAGjB,KAAK,cAAc,EAEtB,MAAM,YAAY,CAAA;AAmPnB;;GAEG;AACH,wBAAgB,WAAW;;;;;;;uBA9OG,cAAc,KAAG,CAAC,MAAM,IAAI,CAAC;cAiLjC,YAAY;;2BAkDP,OAAO;EAcrC"} |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"observe.d.ts","sourceRoot":"","sources":["../../src/main/observe.ts"],"names":[],"mappings":"AASA,OAAO,EAAC,KAAK,KAAK,EAAE,KAAK,mBAAmB,EAAC,MAAM,YAAY,CAAA;AAyB/D;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,YAAY,GAAG,YAAY,CAG3E;AAMD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,yBAAyB,CACrC,KAAK,EAAE,KAAK,CAAC,WAAW,EACxB,KAAK,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC,KAAK,IAAI,GAC9C,IAAI,CAcN;AAID,wBAAgB,wBAAwB,CACpC,KAAK,EAAE,KAAK,CAAC,WAAW,EACxB,KAAK,EAAE,YAAY,EACnB,MAAM,SAAW,GAClB,IAAI,CAQN;AAED,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAG9F;AAOD;;GAEG;AACH,wBAAgB,kBAAkB,CAC9B,IAAI,EAAE,KAAK,CAAC,cAAc,GAAG,KAAK,CA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Ac,GAAG,KAAK,CAAC,WAAW,EAC9C,MAAM,EAAE,MAAM,GACf,IAAI,CAEN;AAED,wBAAgB,uBAAuB,CACnC,IAAI,EAAE,KAAK,CAAC,cAAc,GAAG,KAAK,CAAC,WAAW,EAC9C,QAAQ,EAAE,mBAAmB,EAC7B,MAAM,EAAE,MAAM,GACf,IAAI,CAGN"} |
| import { type NodeID, type Solid } from './types.ts'; | ||
| /** | ||
| * a fake root for collecting signals used top-level | ||
| */ | ||
| export declare const UNOWNED_ROOT: Solid.Root; | ||
| export declare const getCurrentRoots: () => Iterable<Solid.Root>; | ||
@@ -23,8 +27,4 @@ declare let OnOwnerNeedsUpdate: ((owner: Solid.Owner, rootId: NodeID) => void) | undefined; | ||
| export declare function attachDebugger(owner?: import("solid-js").Owner | null): void; | ||
| export declare function initRoots(): void; | ||
| /** | ||
| * Unobserves currently observed root owners. | ||
| * This is not reversable, and should be used only when you are sure that they won't be used anymore. | ||
| */ | ||
| export declare function unobserveAllRoots(): void; | ||
| /** | ||
| * Finds the top-level root owner of a given owner. | ||
@@ -31,0 +31,0 @@ */ |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"roots.d.ts","sourceRoot":"","sources":["../../src/main/roots.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,KAAK,MAAM,EAAE,KAAK,KAAK,EAAC,MAAM,YAAY,CAAA;AAMlD,eAAO,MAAM,eAAe,QAAO,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAqB,CAAA;AAE3E,QAAA,IAAI,kBAAkB,EAAE,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAA;AAClF,4EAA4E;AAC5E,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,OAAO,kBAAkB,QAElE;AACD,QAAA,IAAI,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAA;AACz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,CAAA;AACzD,yCAAyC;AACzC,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,OAAO,aAAa,QAExD;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,GAAG,IAAI,CAIrD;AAoCD;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,KAAK,kCAAyB,GAAG,IAAI,CA0DnE;AAED,wBAAgB,SAAS,SAgBxB;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,GAAG,IAAI,CAQhE;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAClC,KAAK,EAAE,KAAK,CAAC,KAAK,GACnB;IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC;IAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAA;CAAC,GAAG;IAAC,KAAK,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,IAAI,CAAA;CAAC,CAapE"} |
+1
-23
@@ -1,25 +0,3 @@ | ||
| declare const setup: { | ||
| solid: NonNullable<typeof import("solid-js").DEV> & { | ||
| getOwner: typeof import("solid-js").getOwner; | ||
| getListener: typeof import("solid-js").getListener; | ||
| untrack: typeof import("solid-js").untrack; | ||
| $PROXY: typeof import("solid-js").$PROXY; | ||
| $TRACK: typeof import("solid-js").$TRACK; | ||
| $DEVCOMP: typeof import("solid-js").$DEVCOMP; | ||
| sharedConfig: typeof import("solid-js").sharedConfig; | ||
| }; | ||
| store: NonNullable<typeof import("solid-js/store").DEV> & { | ||
| unwrap: typeof import("solid-js/store").unwrap; | ||
| $RAW: typeof import("solid-js/store").$RAW; | ||
| }; | ||
| get_created_owners(): import("./types.ts").Solid.Owner[]; | ||
| get_locator_options(): import("../types.ts").LocatorOptions | null; | ||
| versions: { | ||
| get_client(): string | null; | ||
| get_solid(): string | null; | ||
| get_expected_solid(): string | null; | ||
| }; | ||
| get_owner_location(owner: import("./types.ts").Solid.Owner): string | null; | ||
| }; | ||
| declare const setup: import("../setup.ts").SetupApi; | ||
| export default setup; | ||
| //# sourceMappingURL=setup.d.ts.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/main/setup.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;CAA6B,CAAA;AAExC,eAAe,KAAK,CAAA"} | ||
| {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/main/setup.ts"],"names":[],"mappings":"AAMA,QAAA,MAAM,KAAK,gCAA6B,CAAA;AAExC,eAAe,KAAK,CAAA"} |
+54
-7
@@ -1,4 +0,51 @@ | ||
| import type { EncodedValue, PropGetterState } from '../inspector/types.ts'; | ||
| import type { SourceLocation } from '../locator/types.ts'; | ||
| import { NodeType, ValueItemType } from './constants.ts'; | ||
| import type { Union } from '@solid-devtools/shared/utils'; | ||
| import type { EncodedValue, InspectorUpdate, PropGetterState, ToggleInspectedValueData } from '../inspector/types.ts'; | ||
| import type { HighlightElementPayload, SourceLocation } from '../locator/types.ts'; | ||
| import type { StructureUpdates, DGraphUpdate } from '../types.ts'; | ||
| import { DebuggerModule, DevtoolsMainView, NodeType, OWNER_LOCATION_PROP, TreeWalkerMode, ValueItemType } from './constants.ts'; | ||
| export type InspectedState = { | ||
| readonly ownerId: NodeID | null; | ||
| readonly signalId: NodeID | null; | ||
| /** closest note to inspected signal/owner on the owner structure */ | ||
| readonly treeWalkerOwnerId: NodeID | null; | ||
| }; | ||
| export declare const INSPECTED_STATE_NULL: InspectedState; | ||
| export type OutputChannels = { | ||
| DebuggerEnabled: boolean; | ||
| ResetPanel: void; | ||
| InspectedState: InspectedState; | ||
| InspectedNodeDetails: Mapped.OwnerDetails; | ||
| StructureUpdates: StructureUpdates; | ||
| NodeUpdates: NodeID[]; | ||
| InspectorUpdate: InspectorUpdate[]; | ||
| LocatorModeChange: boolean; | ||
| HoveredComponent: { | ||
| nodeId: NodeID; | ||
| state: boolean; | ||
| }; | ||
| InspectedComponent: NodeID; | ||
| DgraphUpdate: DGraphUpdate; | ||
| }; | ||
| export type InputChannels = { | ||
| ResetState: void; | ||
| InspectNode: { | ||
| ownerId: NodeID | null; | ||
| signalId: NodeID | null; | ||
| } | null; | ||
| InspectValue: ToggleInspectedValueData; | ||
| ConsoleInspectValue: ValueItemID; | ||
| HighlightElementChange: HighlightElementPayload; | ||
| OpenLocation: void; | ||
| TreeViewModeChange: TreeWalkerMode; | ||
| ViewChange: DevtoolsMainView; | ||
| ToggleModule: { | ||
| module: DebuggerModule; | ||
| enabled: boolean; | ||
| }; | ||
| }; | ||
| export type InputMessage = Union<InputChannels>; | ||
| export type InputListener = (e: InputMessage) => void; | ||
| export type OutputMessage = Union<OutputChannels>; | ||
| export type OutputListener = (e: OutputMessage) => void; | ||
| export type OutputEmit = (e: OutputMessage) => void; | ||
| export type NodeID = `#${string}`; | ||
@@ -25,3 +72,2 @@ export type ValueItemID = `${ValueItemType.Signal}:${NodeID}` | `${ValueItemType.Prop}:${string}` | ValueItemType.Value; | ||
| isDisposed?: true; | ||
| isInternal?: true; | ||
| context: null; | ||
@@ -48,2 +94,3 @@ fn?: never; | ||
| sdtSubRoots?: Solid.Owner[] | null; | ||
| [OWNER_LOCATION_PROP]?: string; | ||
| } | ||
@@ -64,4 +111,4 @@ } | ||
| } | ||
| interface Signal { | ||
| type: NodeType.Signal | NodeType.Memo | NodeType.Store; | ||
| interface SourceValue { | ||
| type: NodeType.Signal | NodeType.Memo | NodeType.Store | NodeType.CustomValue; | ||
| name?: string; | ||
@@ -85,3 +132,3 @@ id: NodeID; | ||
| props?: Props; | ||
| signals: Signal[]; | ||
| signals: SourceValue[]; | ||
| /** for computations */ | ||
@@ -88,0 +135,0 @@ value?: EncodedValue[]; |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/main/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK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K,EAAE,OAAO,CAAA;QACd,MAAM,EAAE;YACJ,CAAC,GAAG,EAAE,MAAM,GAAG;gBAAC,MAAM,EAAE,KAAK,GAAG,eAAe,CAAC;gBAAC,KAAK,EAAE,YAAY,EAAE,GAAG,IAAI,CAAA;aAAC,CAAA;SACjF,CAAA;KACJ,CAAA;IAED,UAAiB,YAAY;QACzB,EAAE,EAAS,MAAM,CAAA;QACjB,IAAI,CAAC,EAAM,MAAM,CAAA;QACjB,IAAI,EAAO,QAAQ,CAAA;QACnB,KAAK,CAAC,EAAK,KAAK,CAAA;QAChB,OAAO,EAAI,WAAW,EAAE,CAAA;QACxB,uBAAuB;QACvB,KAAK,CAAC,EAAK,YAAY,EAAE,CAAA;QAEzB,QAAQ,CAAC,EAAE,cAAc,CAAA;QAEzB,GAAG,CAAC,EAAO,IAAI,CAAA;KAClB;CACJ"} |
| import { NodeType } from './constants.ts'; | ||
| import { type Solid } from './types.ts'; | ||
| export declare const isSolidOwner: (o: Solid.Owner | Solid.Store | Solid.Signal) => o is Solid.Owner; | ||
| export declare const isSolidOwner: (o: Solid.SourceMapValue | Solid.Owner | Solid.Store | Solid.Signal) => o is Solid.Owner; | ||
| export declare const isSolidComputation: (o: Solid.Owner) => o is Solid.Computation; | ||
@@ -11,3 +11,3 @@ export declare const isSolidRoot: (o: Solid.Owner) => o is Solid.Root; | ||
| export declare const isSolidSignal: (o: Solid.SourceMapValue) => o is Solid.Signal; | ||
| export declare function getNodeType(o: Solid.Signal | Solid.Owner | Solid.Store): NodeType; | ||
| export declare function getNodeType(o: Solid.SourceMapValue | Solid.Signal | Solid.Owner | Solid.Store): NodeType; | ||
| export declare const getOwnerType: (o: Solid.Owner) => NodeType; | ||
@@ -14,0 +14,0 @@ export declare const getNodeName: (o: { |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/main/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,QAAQ,EAAC,MAAM,gBAAgB,C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,EAAE,YAAY,EAChB,OAAO,UAAQ,EACf,MAAM,CAAC,EAAE,MAAM,GAChB,YAAY,CAiBd;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAC3B,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,EAAE,EAAE,YAAY,EAChB,OAAO,UAAQ,EACf,MAAM,CAAC,EAAE,MAAM,GAChB,YAAY,CAKd;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC1B,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,EAAE,EAAE,YAAY,EAChB,OAAO,UAAQ,EACf,MAAM,CAAC,EAAE,MAAM,GAChB,YAAY,CAGd"} |
+28
-29
@@ -5,8 +5,2 @@ import * as s from 'solid-js'; | ||
| import type { Solid } from './main/types.ts'; | ||
| /** | ||
| * Set the location of the owner in source code. | ||
| * Used by the babel plugin. | ||
| */ | ||
| export declare function setOwnerLocation(location: string): void; | ||
| export declare function getOwnerLocation(owner: Solid.Owner): string | null; | ||
| /** @deprecated use `setLocatorOptions` */ | ||
@@ -17,28 +11,33 @@ export declare function useLocator(options: LocatorOptions): void; | ||
| export declare function setSolidVersion(version: string, expected: string): void; | ||
| export type SetupApi = { | ||
| solid: NonNullable<typeof s.DEV> & { | ||
| getOwner: typeof s.getOwner; | ||
| getListener: typeof s.getListener; | ||
| untrack: typeof s.untrack; | ||
| $PROXY: typeof s.$PROXY; | ||
| $TRACK: typeof s.$TRACK; | ||
| $DEVCOMP: typeof s.$DEVCOMP; | ||
| sharedConfig: typeof s.sharedConfig; | ||
| }; | ||
| store: NonNullable<typeof store.DEV> & { | ||
| unwrap: typeof store.unwrap; | ||
| $RAW: typeof store.$RAW; | ||
| }; | ||
| get_created_owners(): Solid.Owner[]; | ||
| get_locator_options(): LocatorOptions | null; | ||
| versions: { | ||
| get_client(): string | null; | ||
| get_solid(): string | null; | ||
| get_expected_solid(): string | null; | ||
| }; | ||
| unowned: { | ||
| signals: WeakRef<Solid.Signal>[]; | ||
| onSignalAdded: ((ref: WeakRef<Solid.Signal>, idx: number) => void) | null; | ||
| onSignalRemoved: ((ref: WeakRef<Solid.Signal>, idx: number) => void) | null; | ||
| }; | ||
| }; | ||
| declare global { | ||
| /** Solid DEV APIs exposed to the debugger by the setup script */ | ||
| var SolidDevtools$$: undefined | { | ||
| solid: NonNullable<typeof s.DEV> & { | ||
| getOwner: typeof s.getOwner; | ||
| getListener: typeof s.getListener; | ||
| untrack: typeof s.untrack; | ||
| $PROXY: typeof s.$PROXY; | ||
| $TRACK: typeof s.$TRACK; | ||
| $DEVCOMP: typeof s.$DEVCOMP; | ||
| sharedConfig: typeof s.sharedConfig; | ||
| }; | ||
| store: NonNullable<typeof store.DEV> & { | ||
| unwrap: typeof store.unwrap; | ||
| $RAW: typeof store.$RAW; | ||
| }; | ||
| get_created_owners(): Solid.Owner[]; | ||
| get_locator_options(): LocatorOptions | null; | ||
| versions: { | ||
| get_client(): string | null; | ||
| get_solid(): string | null; | ||
| get_expected_solid(): string | null; | ||
| }; | ||
| get_owner_location(owner: Solid.Owner): string | null; | ||
| }; | ||
| var SolidDevtools$$: undefined | SetupApi; | ||
| } | ||
| //# sourceMappingURL=setup.d.ts.map |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,CAAC,MAAU,UAAU,CAAA;AACjC,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAA;AAEvC,OAAO,KAAK,EAAC,cAAc,EAAC,MAAM,oBAAoB,CAAA;AACtD,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,iBAAiB,CAAA;AAI1C;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,QAGhD;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,iBAElD;AAGD,0CAA0C;AAC1C,wBAAgB,UAAU,CAAC,OAAO,EAAE,cAAc,QAEjD;AACD,wBAAgB,iBA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AAE;QACN,UAAU,IAAY,MAAM,GAAG,IAAI,CAAA;QACnC,SAAS,IAAa,MAAM,GAAG,IAAI,CAAA;QACnC,kBAAkB,IAAI,MAAM,GAAG,IAAI,CAAA;KACtC,CAAA;IACD,OAAO,EAAE;QACL,OAAO,EAAU,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAA;QACxC,aAAa,EAAI,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,IAAI,CAAA;QAC3E,eAAe,EAAE,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,IAAI,CAAA;KAC9E,CAAA;CACJ,CAAA;AAED,OAAO,CAAC,MAAM,CAAC;IACX,iEAAiE;IACjE,IAAI,eAAe,EAAE,SAAS,GAAG,QAAQ,CAAA;CAC5C"} |
+21
-13
@@ -5,10 +5,2 @@ // packages/debugger/src/setup.ts | ||
| import { error } from "@solid-devtools/shared/utils"; | ||
| var OwnerLocationMap = /* @__PURE__ */ new WeakMap(); | ||
| function setOwnerLocation(location) { | ||
| const owner = s.getOwner(); | ||
| owner && OwnerLocationMap.set(owner, location); | ||
| } | ||
| function getOwnerLocation(owner) { | ||
| return OwnerLocationMap.get(owner) ?? null; | ||
| } | ||
| var PassedLocatorOptions = null; | ||
@@ -31,3 +23,3 @@ function useLocator(options) { | ||
| } | ||
| if (window.SolidDevtools$$) { | ||
| if (globalThis.SolidDevtools$$) { | ||
| error("Debugger is already setup"); | ||
@@ -39,3 +31,3 @@ } | ||
| let created_owners = []; | ||
| window.SolidDevtools$$ = { | ||
| let setup = { | ||
| solid: { | ||
@@ -75,15 +67,31 @@ ...s.DEV, | ||
| }, | ||
| get_owner_location: getOwnerLocation | ||
| unowned: { | ||
| signals: [], | ||
| onSignalAdded: null, | ||
| onSignalRemoved: null | ||
| } | ||
| }; | ||
| globalThis.SolidDevtools$$ = setup; | ||
| s.DEV.hooks.afterCreateOwner = (owner) => { | ||
| created_owners?.push(owner); | ||
| }; | ||
| let signals_registry = new FinalizationRegistry((ref) => { | ||
| let idx = setup.unowned.signals.indexOf(ref); | ||
| setup.unowned.signals.splice(idx, 1); | ||
| setup.unowned.onSignalRemoved?.(ref, idx); | ||
| }); | ||
| s.DEV.hooks.afterCreateSignal = (signal) => { | ||
| if (s.getOwner() == null) { | ||
| let ref = new WeakRef(signal); | ||
| let idx = setup.unowned.signals.push(ref) - 1; | ||
| signals_registry.register(signal, ref); | ||
| setup.unowned.onSignalAdded?.(ref, idx); | ||
| } | ||
| }; | ||
| } | ||
| export { | ||
| getOwnerLocation, | ||
| setClientVersion, | ||
| setLocatorOptions, | ||
| setOwnerLocation, | ||
| setSolidVersion, | ||
| useLocator | ||
| }; |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/structure/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsB,gBAAgB,EAAY,cAAc,EAAC,MAAM,sBAAsB,CAAA;AAGpG,OAAO,EAAC,KAAK,MAAM,EAAE,KAAK,MAAM,EAAE,KAAK,KAAK,EAAC,MAAM,kBAAkB,CAAA;AAIrE,MAAM,MAAM,gBAAgB,GAAG;IAC3B,+EAA+E;IAC/E,OAAO,EAAE,OAAO,CAAA;IAChB,oBAAoB;IACpB,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,8DAA8D;IAC9D,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;CAC1E,CAAA;AA8BD,wBAAgB,eAAe,CAAC,KAAK,EAAE;IACnC,iBAAiB,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAA;IACtD,YAAY,EAAO,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;IAC3C,OAAO,EAAY,MAAM,OAAO,CAAA;CACnC;0BA2E8B,IAAI;+BAKC,IAAI;8BAKH,cAAc,KAAG,IAAI;;mCAWnB,KAAK,CAAC,KAAK;uBAGvB,gBAAgB;EAO1C"} | ||
| {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/structure/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAsB,gBAAgB,EAAY,cAAc,EAAC,MAAM,sBAAsB,CAAA;AAGpG,OAAO,EAAC,KAAK,MAAM,EAAE,KAAK,MAAM,EAAE,KAAK,KAAK,EAAC,MAAM,kBAAkB,CAAA;AAIrE,MAAM,MAAM,gBAAgB,GAAG;IAC3B,+EAA+E;IAC/E,OAAO,EAAE,OAAO,CAAA;IAChB,oBAAoB;IACpB,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,8DAA8D;IAC9D,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAA;CAC1E,CAAA;AA8BD,wBAAgB,eAAe,CAAC,KAAK,EAAE;IACnC,iBAAiB,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAA;IACtD,YAAY,EAAO,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;IAC3C,OAAO,EAAY,MAAM,OAAO,CAAA;CACnC;0BAmF8B,IAAI;+BAKC,IAAI;8BAKH,cAAc,KAAG,IAAI;;mCAWnB,KAAK,CAAC,KAAK;uBAGvB,gBAAgB;EAO1C"} |
+0
-1
| export type { DGraphUpdate, SerializedDGraph } from './dependency/index.ts'; | ||
| export * from './inspector/types.ts'; | ||
| export * from './locator/types.ts'; | ||
| export type * from './main/index.ts'; | ||
| export * from './main/constants.ts'; | ||
@@ -6,0 +5,0 @@ export * from './main/types.ts'; |
@@ -1,1 +0,1 @@ | ||
| {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,YAAY,EAAC,YAAY,EAAE,gBAAgB,EAAC,MAAM,uBAAuB,CAAA;AACzE,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA;AAClC,mBAAmB,iBAAiB,CAAA;AACpC,cAAc,qBAAqB,CAAA;AACnC,cAAc,iBAAiB,CAAA;AAC/B,YAAY,EAAC,gBAAgB,EAAC,MAAM,sBAAsB,CAAA"} | ||
| {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,YAAY,EAAC,YAAY,EAAE,gBAAgB,EAAC,MAAM,uBAAuB,CAAA;AACzE,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,iBAAiB,CAAA;AAC/B,YAAY,EAAC,gBAAgB,EAAC,MAAM,sBAAsB,CAAA"} |
+5
-1
@@ -8,2 +8,3 @@ import { | ||
| INFINITY, | ||
| INSPECTED_STATE_NULL, | ||
| LOCATION_ATTRIBUTE_NAME, | ||
@@ -14,2 +15,3 @@ NAN, | ||
| NodeType, | ||
| OWNER_LOCATION_PROP, | ||
| PropGetterState, | ||
@@ -23,3 +25,3 @@ TreeWalkerMode, | ||
| getValueItemId | ||
| } from "./chunk-PZ4NZVSR.js"; | ||
| } from "./chunk-R4OAKKPG.js"; | ||
| export { | ||
@@ -32,2 +34,3 @@ DEFAULT_MAIN_VIEW, | ||
| INFINITY, | ||
| INSPECTED_STATE_NULL, | ||
| LOCATION_ATTRIBUTE_NAME, | ||
@@ -38,2 +41,3 @@ NAN, | ||
| NodeType, | ||
| OWNER_LOCATION_PROP, | ||
| PropGetterState, | ||
@@ -40,0 +44,0 @@ TreeWalkerMode, |
+2
-2
| { | ||
| "name": "@solid-devtools/debugger", | ||
| "version": "0.25.0", | ||
| "version": "0.26.0", | ||
| "description": "Debugger of the Solid's reactivity graph — a cornerstone of all solid-devtools.", | ||
@@ -62,3 +62,3 @@ "license": "MIT", | ||
| "@solid-primitives/utils": "^6.2.3", | ||
| "@solid-devtools/shared": "^0.18.0" | ||
| "@solid-devtools/shared": "^0.19.0" | ||
| }, | ||
@@ -65,0 +65,0 @@ "peerDependencies": { |
| // packages/debugger/src/inspector/types.ts | ||
| var INFINITY = "Infinity"; | ||
| var NEGATIVE_INFINITY = "NegativeInfinity"; | ||
| var NAN = "NaN"; | ||
| var UNDEFINED = "undefined"; | ||
| var ValueType = /* @__PURE__ */ ((ValueType2) => { | ||
| ValueType2["Number"] = "number"; | ||
| ValueType2["Boolean"] = "boolean"; | ||
| ValueType2["String"] = "string"; | ||
| ValueType2["Null"] = "null"; | ||
| ValueType2["Symbol"] = "symbol"; | ||
| ValueType2["Array"] = "array"; | ||
| ValueType2["Object"] = "object"; | ||
| ValueType2["Function"] = "function"; | ||
| ValueType2["Getter"] = "getter"; | ||
| ValueType2["Element"] = "element"; | ||
| ValueType2["Instance"] = "instance"; | ||
| ValueType2["Store"] = "store"; | ||
| ValueType2["Unknown"] = "unknown"; | ||
| return ValueType2; | ||
| })(ValueType || {}); | ||
| var PropGetterState = /* @__PURE__ */ ((PropGetterState2) => { | ||
| PropGetterState2["Live"] = "live"; | ||
| PropGetterState2["Stale"] = "stale"; | ||
| return PropGetterState2; | ||
| })(PropGetterState || {}); | ||
| var GLOBAL_GET_VALUE = "$SdtGetValue"; | ||
| // packages/debugger/src/locator/types.ts | ||
| var WINDOW_PROJECTPATH_PROPERTY = "$sdt_projectPath"; | ||
| var LOCATION_ATTRIBUTE_NAME = "data-source-loc"; | ||
| // packages/debugger/src/main/constants.ts | ||
| var DevtoolsMainView = /* @__PURE__ */ ((DevtoolsMainView2) => { | ||
| DevtoolsMainView2["Structure"] = "structure"; | ||
| return DevtoolsMainView2; | ||
| })(DevtoolsMainView || {}); | ||
| var DEFAULT_MAIN_VIEW = "structure" /* Structure */; | ||
| var DebuggerModule = /* @__PURE__ */ ((DebuggerModule2) => { | ||
| DebuggerModule2["Locator"] = "locator"; | ||
| DebuggerModule2["Structure"] = "structure"; | ||
| DebuggerModule2["Dgraph"] = "dgraph"; | ||
| return DebuggerModule2; | ||
| })(DebuggerModule || {}); | ||
| var TreeWalkerMode = /* @__PURE__ */ ((TreeWalkerMode2) => { | ||
| TreeWalkerMode2["Owners"] = "owners"; | ||
| TreeWalkerMode2["Components"] = "components"; | ||
| TreeWalkerMode2["DOM"] = "dom"; | ||
| return TreeWalkerMode2; | ||
| })(TreeWalkerMode || {}); | ||
| var DEFAULT_WALKER_MODE = "components" /* Components */; | ||
| var NodeType = /* @__PURE__ */ ((NodeType3) => { | ||
| NodeType3["Root"] = "root"; | ||
| NodeType3["Component"] = "component"; | ||
| NodeType3["Element"] = "element"; | ||
| NodeType3["Effect"] = "effect"; | ||
| NodeType3["Render"] = "render"; | ||
| NodeType3["Memo"] = "memo"; | ||
| NodeType3["Computation"] = "computation"; | ||
| NodeType3["Refresh"] = "refresh"; | ||
| NodeType3["Context"] = "context"; | ||
| NodeType3["CatchError"] = "catchError"; | ||
| NodeType3["Signal"] = "signal"; | ||
| NodeType3["Store"] = "store"; | ||
| return NodeType3; | ||
| })(NodeType || {}); | ||
| var NODE_TYPE_NAMES = { | ||
| ["root" /* Root */]: "Root", | ||
| ["component" /* Component */]: "Component", | ||
| ["element" /* Element */]: "Element", | ||
| ["effect" /* Effect */]: "Effect", | ||
| ["render" /* Render */]: "Render Effect", | ||
| ["memo" /* Memo */]: "Memo", | ||
| ["computation" /* Computation */]: "Computation", | ||
| ["refresh" /* Refresh */]: "Refresh", | ||
| ["context" /* Context */]: "Context", | ||
| ["catchError" /* CatchError */]: "CatchError", | ||
| ["signal" /* Signal */]: "Signal", | ||
| ["store" /* Store */]: "Store" | ||
| }; | ||
| var ValueItemType = /* @__PURE__ */ ((ValueItemType2) => { | ||
| ValueItemType2["Signal"] = "signal"; | ||
| ValueItemType2["Prop"] = "prop"; | ||
| ValueItemType2["Value"] = "value"; | ||
| return ValueItemType2; | ||
| })(ValueItemType || {}); | ||
| var UNKNOWN = "unknown"; | ||
| // packages/debugger/src/main/types.ts | ||
| var getValueItemId = (type, id) => { | ||
| if (type === "value" /* Value */) return "value" /* Value */; | ||
| return `${type}:${id}`; | ||
| }; | ||
| export { | ||
| DevtoolsMainView, | ||
| DEFAULT_MAIN_VIEW, | ||
| DebuggerModule, | ||
| TreeWalkerMode, | ||
| DEFAULT_WALKER_MODE, | ||
| NodeType, | ||
| NODE_TYPE_NAMES, | ||
| ValueItemType, | ||
| UNKNOWN, | ||
| INFINITY, | ||
| NEGATIVE_INFINITY, | ||
| NAN, | ||
| UNDEFINED, | ||
| ValueType, | ||
| PropGetterState, | ||
| GLOBAL_GET_VALUE, | ||
| WINDOW_PROJECTPATH_PROPERTY, | ||
| LOCATION_ATTRIBUTE_NAME, | ||
| getValueItemId | ||
| }; |
Sorry, the diff of this file is too big to display
248962
0.42%6328
0.89%+ Added
+ Added
- Removed
- Removed