@dxos/plugin-debug 0.7.4 → 0.7.5-labs.a279d8c

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.
Files changed (80) hide show
  1. package/dist/lib/browser/{DebugApp-HCHR6GKO.mjs → DebugApp-LQHFFK3Y.mjs} +4 -2
  2. package/dist/lib/browser/{DebugApp-HCHR6GKO.mjs.map → DebugApp-LQHFFK3Y.mjs.map} +3 -3
  3. package/dist/lib/browser/{DebugSpace-DHKEAMIC.mjs → DebugSpace-4JHYA7FG.mjs} +7 -6
  4. package/dist/lib/browser/DebugSpace-4JHYA7FG.mjs.map +7 -0
  5. package/dist/lib/browser/{SpaceGenerator-BQ3645OS.mjs → SpaceGenerator-YNT3WDFI.mjs} +226 -20
  6. package/dist/lib/browser/SpaceGenerator-YNT3WDFI.mjs.map +7 -0
  7. package/dist/lib/browser/app-graph-builder-FXELWOFS.mjs +177 -0
  8. package/dist/lib/browser/app-graph-builder-FXELWOFS.mjs.map +7 -0
  9. package/dist/lib/browser/{chunk-CAENAAHY.mjs → chunk-I3ON45JK.mjs} +3 -3
  10. package/dist/lib/browser/chunk-I3ON45JK.mjs.map +7 -0
  11. package/dist/lib/browser/{chunk-LZEK532R.mjs → chunk-P7GHHMDB.mjs} +1 -11
  12. package/dist/lib/browser/chunk-P7GHHMDB.mjs.map +7 -0
  13. package/dist/lib/browser/index.mjs +66 -737
  14. package/dist/lib/browser/index.mjs.map +4 -4
  15. package/dist/lib/browser/meta.json +1 -1
  16. package/dist/lib/browser/react-context-OZU6J7G3.mjs +37 -0
  17. package/dist/lib/browser/react-context-OZU6J7G3.mjs.map +7 -0
  18. package/dist/lib/browser/react-surface-ACHNR2UU.mjs +481 -0
  19. package/dist/lib/browser/react-surface-ACHNR2UU.mjs.map +7 -0
  20. package/dist/lib/browser/settings-JCZUA643.mjs +25 -0
  21. package/dist/lib/browser/settings-JCZUA643.mjs.map +7 -0
  22. package/dist/types/src/DebugPlugin.d.ts +1 -2
  23. package/dist/types/src/DebugPlugin.d.ts.map +1 -1
  24. package/dist/types/src/capabilities/app-graph-builder.d.ts +181 -0
  25. package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
  26. package/dist/types/src/capabilities/index.d.ts +185 -0
  27. package/dist/types/src/capabilities/index.d.ts.map +1 -0
  28. package/dist/types/src/capabilities/react-context.d.ts +8 -0
  29. package/dist/types/src/capabilities/react-context.d.ts.map +1 -0
  30. package/dist/types/src/capabilities/react-surface.d.ts +4 -0
  31. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  32. package/dist/types/src/capabilities/settings.d.ts +4 -0
  33. package/dist/types/src/capabilities/settings.d.ts.map +1 -0
  34. package/dist/types/src/components/DebugObjectPanel.d.ts.map +1 -1
  35. package/dist/types/src/components/DebugSpace/DebugSpace.stories.d.ts.map +1 -1
  36. package/dist/types/src/components/DebugSpace/ObjectCreator.stories.d.ts.map +1 -1
  37. package/dist/types/src/components/DebugStatus.d.ts.map +1 -1
  38. package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts +2 -2
  39. package/dist/types/src/components/SpaceGenerator/ObjectGenerator.d.ts.map +1 -1
  40. package/dist/types/src/components/SpaceGenerator/SpaceGenerator.d.ts.map +1 -1
  41. package/dist/types/src/components/SpaceGenerator/draw-util.d.ts.map +1 -1
  42. package/dist/types/src/components/Wireframe.d.ts +2 -1
  43. package/dist/types/src/components/Wireframe.d.ts.map +1 -1
  44. package/dist/types/src/index.d.ts +1 -2
  45. package/dist/types/src/index.d.ts.map +1 -1
  46. package/dist/types/src/meta.d.ts +1 -2
  47. package/dist/types/src/meta.d.ts.map +1 -1
  48. package/dist/types/src/types.d.ts +0 -6
  49. package/dist/types/src/types.d.ts.map +1 -1
  50. package/dist/types/tsconfig.tsbuildinfo +1 -0
  51. package/package.json +48 -51
  52. package/src/DebugPlugin.tsx +60 -381
  53. package/src/capabilities/app-graph-builder.ts +177 -0
  54. package/src/capabilities/index.ts +10 -0
  55. package/src/capabilities/react-context.tsx +38 -0
  56. package/src/capabilities/react-surface.tsx +138 -0
  57. package/src/capabilities/settings.ts +18 -0
  58. package/src/components/DebugApp/DebugApp.tsx +1 -1
  59. package/src/components/DebugObjectPanel.tsx +17 -5
  60. package/src/components/DebugSettings.tsx +4 -4
  61. package/src/components/DebugSpace/DebugSpace.stories.tsx +4 -3
  62. package/src/components/DebugSpace/DebugSpace.tsx +1 -1
  63. package/src/components/DebugSpace/ObjectCreator.stories.tsx +4 -3
  64. package/src/components/DebugStatus.tsx +3 -9
  65. package/src/components/SpaceGenerator/ObjectGenerator.tsx +126 -18
  66. package/src/components/SpaceGenerator/SpaceGenerator.tsx +6 -4
  67. package/src/components/SpaceGenerator/draw-util.ts +7 -6
  68. package/src/components/Wireframe.tsx +2 -2
  69. package/src/index.ts +1 -4
  70. package/src/meta.ts +1 -1
  71. package/src/types.ts +0 -22
  72. package/dist/lib/browser/DebugSpace-DHKEAMIC.mjs.map +0 -7
  73. package/dist/lib/browser/SpaceGenerator-BQ3645OS.mjs.map +0 -7
  74. package/dist/lib/browser/chunk-CAENAAHY.mjs.map +0 -7
  75. package/dist/lib/browser/chunk-LZEK532R.mjs.map +0 -7
  76. package/dist/lib/browser/meta.mjs +0 -9
  77. package/dist/lib/browser/meta.mjs.map +0 -7
  78. package/dist/types/src/components/DebugSurface.d.ts +0 -9
  79. package/dist/types/src/components/DebugSurface.d.ts.map +0 -1
  80. package/src/components/DebugSurface.tsx +0 -55
@@ -0,0 +1,177 @@
1
+ import {
2
+ DEBUG_PLUGIN
3
+ } from "./chunk-I3ON45JK.mjs";
4
+
5
+ // packages/plugins/plugin-debug/src/capabilities/app-graph-builder.ts
6
+ import { contributes, Capabilities } from "@dxos/app-framework";
7
+ import { ClientCapabilities } from "@dxos/plugin-client";
8
+ import { createExtension, toSignal } from "@dxos/plugin-graph";
9
+ import { memoizeQuery } from "@dxos/plugin-space";
10
+ import { CollectionType } from "@dxos/plugin-space/types";
11
+ import { getTypename, parseId, SpaceState } from "@dxos/react-client/echo";
12
+ import { isSpace } from "@dxos/react-client/echo";
13
+ var app_graph_builder_default = (context) => {
14
+ const resolve = (typename) => context.requestCapabilities(Capabilities.Metadata).find(({ id }) => id === typename)?.metadata ?? {};
15
+ return contributes(Capabilities.AppGraphBuilder, [
16
+ // Devtools node.
17
+ createExtension({
18
+ id: "dxos.org/plugin/debug/devtools",
19
+ filter: (node) => {
20
+ const settings = context.requestCapabilities(Capabilities.SettingsStore)[0]?.getStore(DEBUG_PLUGIN)?.value;
21
+ return !!settings?.devtools && node.id === "root";
22
+ },
23
+ connector: () => [
24
+ {
25
+ // TODO(zan): Removed `/` because it breaks deck layout reload. Fix?
26
+ id: "dxos.org.plugin.debug.devtools",
27
+ data: "devtools",
28
+ type: "dxos.org/plugin/debug/devtools",
29
+ properties: {
30
+ label: [
31
+ "devtools label",
32
+ {
33
+ ns: DEBUG_PLUGIN
34
+ }
35
+ ],
36
+ icon: "ph--hammer--regular"
37
+ }
38
+ }
39
+ ]
40
+ }),
41
+ // Debug node.
42
+ createExtension({
43
+ id: "dxos.org/plugin/debug/debug",
44
+ filter: (node) => {
45
+ const settings = context.requestCapabilities(Capabilities.SettingsStore)[0]?.getStore(DEBUG_PLUGIN)?.value;
46
+ return !!settings?.debug && node.id === "root";
47
+ },
48
+ connector: () => {
49
+ const graph = context.requestCapability(Capabilities.AppGraph);
50
+ return [
51
+ {
52
+ id: "dxos.org/plugin/debug/debug",
53
+ type: "dxos.org/plugin/debug/debug",
54
+ data: {
55
+ graph
56
+ },
57
+ properties: {
58
+ label: [
59
+ "debug label",
60
+ {
61
+ ns: DEBUG_PLUGIN
62
+ }
63
+ ],
64
+ icon: "ph--bug--regular"
65
+ }
66
+ }
67
+ ];
68
+ }
69
+ }),
70
+ // Space debug nodes.
71
+ createExtension({
72
+ id: "dxos.org/plugin/debug/spaces",
73
+ filter: (node) => {
74
+ const settings = context.requestCapabilities(Capabilities.SettingsStore)[0]?.getStore(DEBUG_PLUGIN)?.value;
75
+ return !!settings?.debug && isSpace(node.data);
76
+ },
77
+ connector: ({ node }) => {
78
+ const space = node.data;
79
+ const state = toSignal((onChange) => space.state.subscribe(() => onChange()).unsubscribe, () => space.state.get(), space.id);
80
+ if (state !== SpaceState.SPACE_READY) {
81
+ return;
82
+ }
83
+ const collection = space.properties[CollectionType.typename]?.target;
84
+ if (!collection) {
85
+ return;
86
+ }
87
+ return [
88
+ {
89
+ id: `${space.id}-debug`,
90
+ type: "dxos.org/plugin/debug/space",
91
+ data: {
92
+ space,
93
+ type: "dxos.org/plugin/debug/space"
94
+ },
95
+ properties: {
96
+ label: [
97
+ "debug label",
98
+ {
99
+ ns: DEBUG_PLUGIN
100
+ }
101
+ ],
102
+ icon: "ph--bug--regular"
103
+ }
104
+ }
105
+ ];
106
+ }
107
+ }),
108
+ // Create nodes for debug sidebar.
109
+ createExtension({
110
+ id: `${DEBUG_PLUGIN}/debug-for-subject`,
111
+ resolver: ({ id }) => {
112
+ if (!id.endsWith("~debug")) {
113
+ return;
114
+ }
115
+ const type = "orphan-settings-for-subject";
116
+ const icon = "ph--bug--regular";
117
+ const client = context.requestCapability(ClientCapabilities.Client);
118
+ const [subjectId] = id.split("~");
119
+ const { spaceId, objectId } = parseId(subjectId);
120
+ const spaces = toSignal((onChange) => client.spaces.subscribe(() => onChange()).unsubscribe, () => client.spaces.get());
121
+ const space = spaces?.find((space2) => space2.state.get() === SpaceState.SPACE_READY && space2.id === spaceId);
122
+ if (!objectId) {
123
+ const label2 = space ? space.properties.name || [
124
+ "unnamed space label",
125
+ {
126
+ ns: DEBUG_PLUGIN
127
+ }
128
+ ] : [
129
+ "unnamed object settings label",
130
+ {
131
+ ns: DEBUG_PLUGIN
132
+ }
133
+ ];
134
+ return {
135
+ id,
136
+ type,
137
+ data: null,
138
+ properties: {
139
+ icon,
140
+ label: label2,
141
+ showResolvedThreads: false,
142
+ object: null,
143
+ space
144
+ }
145
+ };
146
+ }
147
+ const [object] = memoizeQuery(space, {
148
+ id: objectId
149
+ });
150
+ if (!object || !subjectId) {
151
+ return;
152
+ }
153
+ const meta = resolve(getTypename(object) ?? "");
154
+ const label = meta.label?.(object) || object.name || meta.placeholder || [
155
+ "unnamed object settings label",
156
+ {
157
+ ns: DEBUG_PLUGIN
158
+ }
159
+ ];
160
+ return {
161
+ id,
162
+ type,
163
+ data: null,
164
+ properties: {
165
+ icon,
166
+ label,
167
+ object
168
+ }
169
+ };
170
+ }
171
+ })
172
+ ]);
173
+ };
174
+ export {
175
+ app_graph_builder_default as default
176
+ };
177
+ //# sourceMappingURL=app-graph-builder-FXELWOFS.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/app-graph-builder.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { contributes, Capabilities, type PluginsContext } from '@dxos/app-framework';\nimport { ClientCapabilities } from '@dxos/plugin-client';\nimport { createExtension, toSignal, type Node } from '@dxos/plugin-graph';\nimport { memoizeQuery } from '@dxos/plugin-space';\nimport { CollectionType } from '@dxos/plugin-space/types';\nimport { getTypename, parseId, SpaceState } from '@dxos/react-client/echo';\nimport { isSpace, type Space } from '@dxos/react-client/echo';\n\nimport { DEBUG_PLUGIN } from '../meta';\nimport { type DebugSettingsProps } from '../types';\n\nexport default (context: PluginsContext) => {\n const resolve = (typename: string) =>\n context.requestCapabilities(Capabilities.Metadata).find(({ id }) => id === typename)?.metadata ?? {};\n\n return contributes(Capabilities.AppGraphBuilder, [\n // Devtools node.\n createExtension({\n id: 'dxos.org/plugin/debug/devtools',\n filter: (node): node is Node<null> => {\n const settings = context\n .requestCapabilities(Capabilities.SettingsStore)[0]\n ?.getStore<DebugSettingsProps>(DEBUG_PLUGIN)?.value;\n return !!settings?.devtools && node.id === 'root';\n },\n connector: () => [\n {\n // TODO(zan): Removed `/` because it breaks deck layout reload. Fix?\n id: 'dxos.org.plugin.debug.devtools',\n data: 'devtools',\n type: 'dxos.org/plugin/debug/devtools',\n properties: {\n label: ['devtools label', { ns: DEBUG_PLUGIN }],\n icon: 'ph--hammer--regular',\n },\n },\n ],\n }),\n\n // Debug node.\n createExtension({\n id: 'dxos.org/plugin/debug/debug',\n filter: (node): node is Node<null> => {\n const settings = context\n .requestCapabilities(Capabilities.SettingsStore)[0]\n ?.getStore<DebugSettingsProps>(DEBUG_PLUGIN)?.value;\n return !!settings?.debug && node.id === 'root';\n },\n connector: () => {\n const graph = context.requestCapability(Capabilities.AppGraph);\n\n return [\n {\n id: 'dxos.org/plugin/debug/debug',\n type: 'dxos.org/plugin/debug/debug',\n data: { graph },\n properties: {\n label: ['debug label', { ns: DEBUG_PLUGIN }],\n icon: 'ph--bug--regular',\n },\n },\n ];\n },\n }),\n\n // Space debug nodes.\n createExtension({\n id: 'dxos.org/plugin/debug/spaces',\n filter: (node): node is Node<Space> => {\n const settings = context\n .requestCapabilities(Capabilities.SettingsStore)[0]\n ?.getStore<DebugSettingsProps>(DEBUG_PLUGIN)?.value;\n return !!settings?.debug && isSpace(node.data);\n },\n connector: ({ node }) => {\n const space = node.data;\n const state = toSignal(\n (onChange) => space.state.subscribe(() => onChange()).unsubscribe,\n () => space.state.get(),\n space.id,\n );\n if (state !== SpaceState.SPACE_READY) {\n return;\n }\n\n // Not adding the debug node until the root collection is available aligns the behaviour of this\n // extension with that of the space plugin adding objects. This ensures that the debug node is added at\n // the same time as objects and prevents order from changing as the nodes are added.\n const collection = space.properties[CollectionType.typename]?.target as CollectionType | undefined;\n if (!collection) {\n return;\n }\n\n return [\n {\n id: `${space.id}-debug`, // TODO(burdon): Change to slashes consistently.\n type: 'dxos.org/plugin/debug/space',\n data: { space, type: 'dxos.org/plugin/debug/space' },\n properties: {\n label: ['debug label', { ns: DEBUG_PLUGIN }],\n icon: 'ph--bug--regular',\n },\n },\n ];\n },\n }),\n\n // Create nodes for debug sidebar.\n createExtension({\n id: `${DEBUG_PLUGIN}/debug-for-subject`,\n resolver: ({ id }) => {\n // TODO(Zan): Find util (or make one).\n if (!id.endsWith('~debug')) {\n return;\n }\n\n const type = 'orphan-settings-for-subject';\n const icon = 'ph--bug--regular';\n\n const client = context.requestCapability(ClientCapabilities.Client);\n const [subjectId] = id.split('~');\n const { spaceId, objectId } = parseId(subjectId);\n const spaces = toSignal(\n (onChange) => client.spaces.subscribe(() => onChange()).unsubscribe,\n () => client.spaces.get(),\n );\n const space = spaces?.find((space) => space.state.get() === SpaceState.SPACE_READY && space.id === spaceId);\n if (!objectId) {\n // TODO(burdon): Ref SPACE_PLUGIN ns.\n const label = space\n ? space.properties.name || ['unnamed space label', { ns: DEBUG_PLUGIN }]\n : ['unnamed object settings label', { ns: DEBUG_PLUGIN }];\n\n // TODO(wittjosiah): Support comments for arbitrary subjects.\n // This is to ensure that the comments panel is not stuck on an old object.\n return {\n id,\n type,\n data: null,\n properties: {\n icon,\n label,\n showResolvedThreads: false,\n object: null,\n space,\n },\n };\n }\n\n const [object] = memoizeQuery(space, { id: objectId });\n if (!object || !subjectId) {\n return;\n }\n\n const meta = resolve(getTypename(object) ?? '');\n const label = meta.label?.(object) ||\n object.name ||\n meta.placeholder || ['unnamed object settings label', { ns: DEBUG_PLUGIN }];\n\n return {\n id,\n type,\n data: null,\n properties: {\n icon,\n label,\n object,\n },\n };\n },\n }),\n ]);\n};\n"],
5
+ "mappings": ";;;;;AAIA,SAASA,aAAaC,oBAAyC;AAC/D,SAASC,0BAA0B;AACnC,SAASC,iBAAiBC,gBAA2B;AACrD,SAASC,oBAAoB;AAC7B,SAASC,sBAAsB;AAC/B,SAASC,aAAaC,SAASC,kBAAkB;AACjD,SAASC,eAA2B;AAKpC,IAAA,4BAAe,CAACC,YAAAA;AACd,QAAMC,UAAU,CAACC,aACfF,QAAQG,oBAAoBC,aAAaC,QAAQ,EAAEC,KAAK,CAAC,EAAEC,GAAE,MAAOA,OAAOL,QAAAA,GAAWM,YAAY,CAAC;AAErG,SAAOC,YAAYL,aAAaM,iBAAiB;;IAE/CC,gBAA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AAEA,cAAM,CAACyB,MAAAA,IAAUC,aAAa1B,OAAO;UAAEzB,IAAI6C;QAAS,CAAA;AACpD,YAAI,CAACK,UAAU,CAACR,WAAW;AACzB;QACF;AAEA,cAAMU,OAAO1D,QAAQ2D,YAAYH,MAAAA,KAAW,EAAA;AAC5C,cAAMjC,QAAQmC,KAAKnC,QAAQiC,MAAAA,KACzBA,OAAOF,QACPI,KAAKE,eAAe;UAAC;UAAiC;YAAEpC,IAAIR;UAAa;;AAE3E,eAAO;UACLV;UACAe;UACAD,MAAM;UACNE,YAAY;YACVG;YACAF;YACAiC;UACF;QACF;MACF;IACF,CAAA;GACD;AACH;",
6
+ "names": ["contributes", "Capabilities", "ClientCapabilities", "createExtension", "toSignal", "memoizeQuery", "CollectionType", "getTypename", "parseId", "SpaceState", "isSpace", "context", "resolve", "typename", "requestCapabilities", "Capabilities", "Metadata", "find", "id", "metadata", "contributes", "AppGraphBuilder", "createExtension", "filter", "node", "settings", "SettingsStore", "getStore", "DEBUG_PLUGIN", "value", "devtools", "connector", "data", "type", "properties", "label", "ns", "icon", "debug", "graph", "requestCapability", "AppGraph", "isSpace", "space", "state", "toSignal", "onChange", "subscribe", "unsubscribe", "get", "SpaceState", "SPACE_READY", "collection", "CollectionType", "target", "resolver", "endsWith", "client", "ClientCapabilities", "Client", "subjectId", "split", "spaceId", "objectId", "parseId", "spaces", "name", "showResolvedThreads", "object", "memoizeQuery", "meta", "getTypename", "placeholder"]
7
+ }
@@ -1,6 +1,6 @@
1
1
  // packages/plugins/plugin-debug/src/meta.ts
2
2
  var DEBUG_PLUGIN = "dxos.org/plugin/debug";
3
- var meta_default = {
3
+ var meta = {
4
4
  id: DEBUG_PLUGIN,
5
5
  name: "Debug",
6
6
  description: "DXOS debugging tools.",
@@ -13,6 +13,6 @@ var meta_default = {
13
13
 
14
14
  export {
15
15
  DEBUG_PLUGIN,
16
- meta_default
16
+ meta
17
17
  };
18
- //# sourceMappingURL=chunk-CAENAAHY.mjs.map
18
+ //# sourceMappingURL=chunk-I3ON45JK.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/meta.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type PluginMeta } from '@dxos/app-framework';\n\nexport const DEBUG_PLUGIN = 'dxos.org/plugin/debug';\n\nexport const meta = {\n id: DEBUG_PLUGIN,\n name: 'Debug',\n description: 'DXOS debugging tools.',\n icon: 'ph--bug--regular',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-debug',\n tags: ['experimental'],\n} satisfies PluginMeta;\n"],
5
+ "mappings": ";AAMO,IAAMA,eAAe;AAErB,IAAMC,OAAO;EAClBC,IAAIF;EACJG,MAAM;EACNC,aAAa;EACbC,MAAM;EACNC,QAAQ;EACRC,MAAM;IAAC;;AACT;",
6
+ "names": ["DEBUG_PLUGIN", "meta", "id", "name", "description", "icon", "source", "tags"]
7
+ }
@@ -1,15 +1,6 @@
1
- import {
2
- DEBUG_PLUGIN
3
- } from "./chunk-CAENAAHY.mjs";
4
-
5
1
  // packages/plugins/plugin-debug/src/types.ts
6
2
  import { createContext } from "react";
7
3
  import { S } from "@dxos/echo-schema";
8
- var DEBUG_ACTION = `${DEBUG_PLUGIN}/action`;
9
- var DebugAction;
10
- (function(DebugAction2) {
11
- DebugAction2[DebugAction2["OPEN_DEVTOOLS"] = `${DEBUG_ACTION}/open-devtools`] = "OPEN_DEVTOOLS";
12
- })(DebugAction || (DebugAction = {}));
13
4
  var DebugContext = createContext({
14
5
  running: false,
15
6
  start: () => {
@@ -24,8 +15,7 @@ var DebugSettingsSchema = S.mutable(S.Struct({
24
15
  }));
25
16
 
26
17
  export {
27
- DebugAction,
28
18
  DebugContext,
29
19
  DebugSettingsSchema
30
20
  };
31
- //# sourceMappingURL=chunk-LZEK532R.mjs.map
21
+ //# sourceMappingURL=chunk-P7GHHMDB.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/types.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Context, createContext } from 'react';\n\nimport type { TimerCallback, TimerOptions } from '@dxos/async';\nimport { S } from '@dxos/echo-schema';\n\nexport type DebugContextType = {\n running: boolean;\n start: (cb: TimerCallback, options: TimerOptions) => void;\n stop: () => void;\n};\n\nexport const DebugContext: Context<DebugContextType> = createContext<DebugContextType>({\n running: false,\n start: () => {},\n stop: () => {},\n});\n\nexport const DebugSettingsSchema = S.mutable(\n S.Struct({\n devtools: S.optional(S.Boolean),\n debug: S.optional(S.Boolean),\n wireframe: S.optional(S.Boolean),\n }),\n);\n\nexport interface DebugSettingsProps extends S.Schema.Type<typeof DebugSettingsSchema> {}\n"],
5
+ "mappings": ";AAIA,SAAuBA,qBAAqB;AAG5C,SAASC,SAAS;AAQX,IAAMC,eAA0CC,cAAgC;EACrFC,SAAS;EACTC,OAAO,MAAA;EAAO;EACdC,MAAM,MAAA;EAAO;AACf,CAAA;AAEO,IAAMC,sBAAsBC,EAAEC,QACnCD,EAAEE,OAAO;EACPC,UAAUH,EAAEI,SAASJ,EAAEK,OAAO;EAC9BC,OAAON,EAAEI,SAASJ,EAAEK,OAAO;EAC3BE,WAAWP,EAAEI,SAASJ,EAAEK,OAAO;AACjC,CAAA,CAAA;",
6
+ "names": ["createContext", "S", "DebugContext", "createContext", "running", "start", "stop", "DebugSettingsSchema", "S", "mutable", "Struct", "devtools", "optional", "Boolean", "debug", "wireframe"]
7
+ }