@dxos/plugin-navtree 0.8.3-main.672df60 → 0.8.3-main.7f5a14c

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.
@@ -8,7 +8,7 @@ import {
8
8
  // packages/plugins/plugin-navtree/src/capabilities/state.ts
9
9
  import { effect } from "@preact/signals-core";
10
10
  import { Capabilities, contributes } from "@dxos/app-framework";
11
- import { live } from "@dxos/live-object";
11
+ import { Obj } from "@dxos/echo";
12
12
  import { Path } from "@dxos/react-ui-list";
13
13
  var KEY = `${NAVTREE_PLUGIN}/state/v1`;
14
14
  var getInitialState = () => {
@@ -20,7 +20,7 @@ var getInitialState = () => {
20
20
  const cached = JSON.parse(stringified);
21
21
  return cached.map(([key, value]) => [
22
22
  key,
23
- live({
23
+ Obj.make({
24
24
  open: value.open,
25
25
  current: false
26
26
  })
@@ -34,21 +34,21 @@ var state_default = (context) => {
34
34
  // TODO(thure): Initialize these dynamically.
35
35
  [
36
36
  "root",
37
- live({
37
+ Obj.make({
38
38
  open: true,
39
39
  current: false
40
40
  })
41
41
  ],
42
42
  [
43
43
  "root~dxos.org/plugin/space-spaces",
44
- live({
44
+ Obj.make({
45
45
  open: true,
46
46
  current: false
47
47
  })
48
48
  ],
49
49
  [
50
50
  "root~dxos.org/plugin/files",
51
- live({
51
+ Obj.make({
52
52
  open: true,
53
53
  current: false
54
54
  })
@@ -56,7 +56,7 @@ var state_default = (context) => {
56
56
  ]);
57
57
  const getItem = (_path) => {
58
58
  const path = Path.create(..._path);
59
- const value = state.get(path) ?? live({
59
+ const value = state.get(path) ?? Obj.make({
60
60
  open: false,
61
61
  current: false,
62
62
  alternateTree: false
@@ -111,4 +111,4 @@ var state_default = (context) => {
111
111
  export {
112
112
  state_default as default
113
113
  };
114
- //# sourceMappingURL=state-R2UMYAHN.mjs.map
114
+ //# sourceMappingURL=state-D7KDRDBV.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/state.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { effect } from '@preact/signals-core';\n\nimport { Capabilities, contributes, type PluginContext } from '@dxos/app-framework';\nimport { type Live, Obj } from '@dxos/echo';\nimport { Path } from '@dxos/react-ui-list';\n\nimport { NavTreeCapabilities } from './capabilities';\nimport { NAVTREE_PLUGIN } from '../meta';\n\nconst KEY = `${NAVTREE_PLUGIN}/state/v1`;\n\nconst getInitialState = () => {\n const stringified = localStorage.getItem(KEY);\n if (!stringified) {\n return;\n }\n\n try {\n const cached: [string, { open: boolean; current: boolean }][] = JSON.parse(stringified);\n return cached.map(([key, value]): [string, Live<{ open: boolean; current: boolean }>] => [\n key,\n Obj.make({ open: value.open, current: false }),\n ]);\n } catch {}\n};\n\nexport default (context: PluginContext) => {\n const layout = context.getCapability(Capabilities.Layout);\n\n // TODO(wittjosiah): This currently needs to be not a Live at the root.\n // If it is a Live then React errors when initializing new paths because of state change during render.\n // Ideally this could be a Live but be able to access and update the root level without breaking render.\n // Wrapping accesses and updates in `untracked` didn't seem to work in all cases.\n const state = new Map<string, Live<{ open: boolean; current: boolean; alternateTree?: boolean }>>(\n getInitialState() ?? [\n // TODO(thure): Initialize these dynamically.\n ['root', Obj.make({ open: true, current: false })],\n ['root~dxos.org/plugin/space-spaces', Obj.make({ open: true, current: false })],\n ['root~dxos.org/plugin/files', Obj.make({ open: true, current: false })],\n ],\n );\n\n const getItem = (_path: string[]) => {\n const path = Path.create(..._path);\n const value = state.get(path) ?? Obj.make({ open: false, current: false, alternateTree: false });\n if (!state.has(path)) {\n state.set(path, value);\n }\n\n return value;\n };\n\n const setItem = (path: string[], key: 'open' | 'current' | 'alternateTree', next: boolean) => {\n const value = getItem(path);\n value[key] = next;\n\n localStorage.setItem(KEY, JSON.stringify(Array.from(state.entries())));\n };\n\n const isOpen = (path: string[]) => getItem(path).open;\n const isCurrent = (path: string[]) => getItem(path).current;\n const isAlternateTree = (path: string[]) => {\n const item = getItem(path);\n return item.alternateTree ?? false;\n };\n\n let previous: string[] = [];\n const unsubscribe = effect(() => {\n const removed = previous.filter((id) => !layout.active.includes(id));\n previous = layout.active;\n\n // TODO(wittjosiah): This is setTimeout because there's a race between the keys be initialized.\n // This could be avoided if the location was a path as well and not just an id.\n setTimeout(() => {\n removed.forEach((id) => {\n const keys = Array.from(state.keys()).filter((key) => Path.last(key) === id);\n keys.forEach((key) => {\n setItem(Path.parts(key), 'current', false);\n });\n });\n\n layout.active.forEach((id) => {\n const keys = Array.from(new Set([...state.keys(), id])).filter((key) => Path.last(key) === id);\n keys.forEach((key) => {\n setItem(Path.parts(key), 'current', true);\n });\n });\n });\n });\n\n return contributes(NavTreeCapabilities.State, { state, getItem, setItem, isOpen, isCurrent, isAlternateTree }, () =>\n unsubscribe(),\n );\n};\n"],
5
+ "mappings": ";;;;;;;;AAIA,SAASA,cAAc;AAEvB,SAASC,cAAcC,mBAAuC;AAC9D,SAAoBC,WAAW;AAC/B,SAASC,YAAY;AAKrB,IAAMC,MAAM,GAAGC,cAAAA;AAEf,IAAMC,kBAAkB,MAAA;AACtB,QAAMC,cAAcC,aAAaC,QAAQL,GAAAA;AACzC,MAAI,CAACG,aAAa;AAChB;EACF;AAEA,MAAI;AACF,UAAMG,SAA0DC,KAAKC,MAAML,WAAAA;AAC3E,WAAOG,OAAOG,IAAI,CAAC,CAACC,KAAKC,KAAAA,MAAgE;MACvFD;MACAE,IAAIC,KAAK;QAAEC,MAAMH,MAAMG;QAAMC,SAAS;MAAM,CAAA;KAC7C;EACH,QAAQ;EAAC;AACX;AAEA,IAAA,gBAAe,CAACC,YAAAA;AACd,QAAMC,SAASD,QAAQE,cAAcC,aAAaC,MAAM;AAMxD,QAAMC,QAAQ,IAAIC,IAChBpB,gBAAAA,KAAqB;;IAEnB;MAAC;MAAQU,IAAIC,KAAK;QAAEC,MAAM;QAAMC,SAAS;MAAM,CAAA;;IAC/C;MAAC;MAAqCH,IAAIC,KAAK;QAAE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AKD,QAAQ,CAACxC,QAAAA;AACZqB,kBAAQN,KAAK4B,MAAM3C,GAAAA,GAAM,WAAW,KAAA;QACtC,CAAA;MACF,CAAA;AAEAO,aAAO8B,OAAOG,QAAQ,CAACJ,OAAAA;AACrB,cAAMK,OAAOjB,MAAMC,KAAK,oBAAImB,IAAI;aAAIjC,MAAM8B,KAAI;UAAIL;SAAG,CAAA,EAAGD,OAAO,CAACnC,QAAQe,KAAK2B,KAAK1C,GAAAA,MAASoC,EAAAA;AAC3FK,aAAKD,QAAQ,CAACxC,QAAAA;AACZqB,kBAAQN,KAAK4B,MAAM3C,GAAAA,GAAM,WAAW,IAAA;QACtC,CAAA;MACF,CAAA;IACF,CAAA;EACF,CAAA;AAEA,SAAO6C,YAAYC,oBAAoBC,OAAO;IAAEpC;IAAOhB;IAAS0B;IAASM;IAAQC;IAAWC;EAAgB,GAAG,MAC7GG,YAAAA,CAAAA;AAEJ;",
6
+ "names": ["effect", "Capabilities", "contributes", "Obj", "Path", "KEY", "NAVTREE_PLUGIN", "getInitialState", "stringified", "localStorage", "getItem", "cached", "JSON", "parse", "map", "key", "value", "Obj", "make", "open", "current", "context", "layout", "getCapability", "Capabilities", "Layout", "state", "Map", "_path", "path", "Path", "create", "get", "alternateTree", "has", "set", "setItem", "next", "stringify", "Array", "from", "entries", "isOpen", "isCurrent", "isAlternateTree", "item", "previous", "unsubscribe", "effect", "removed", "filter", "id", "active", "includes", "setTimeout", "forEach", "keys", "last", "parts", "Set", "contributes", "NavTreeCapabilities", "State"]
7
+ }
@@ -1,5 +1,5 @@
1
1
  import { type PluginContext } from '@dxos/app-framework';
2
- import { type Live } from '@dxos/live-object';
2
+ import { type Live } from '@dxos/echo';
3
3
  declare const _default: (context: PluginContext) => import("@dxos/app-framework").Capability<{
4
4
  state: Map<string, Live<{
5
5
  open: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/state.ts"],"names":[],"mappings":"AAMA,OAAO,EAA6B,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpF,OAAO,EAAE,KAAK,IAAI,EAAQ,MAAM,mBAAmB,CAAC;yBA4BpC,SAAS,aAAa;;;;qBAtBR,CAAC;;;;;qBAIvB,CAAC;;;;;;;AAkBT,wBAmEE"}
1
+ {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../../../src/capabilities/state.ts"],"names":[],"mappings":"AAMA,OAAO,EAA6B,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpF,OAAO,EAAE,KAAK,IAAI,EAAO,MAAM,YAAY,CAAC;yBAuB5B,SAAS,aAAa;;;;qBAjBA,CAAC;;;;;qBAIvB,CAAC;;;;;;;AAajB,wBAmEE"}
@@ -1 +1 @@
1
- {"version":3,"file":"NavTreeContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/NavTreeContainer.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAgD,MAAM,OAAO,CAAC;AAsBrE,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAOnD,eAAO,MAAM,SAAS,wBAAwB,CAAC;AAgC/C,MAAM,MAAM,qBAAqB,GAAG;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,GAAG,IAAI,CAAC,mBAAmB,EAAE,KAAK,CAAC,CAAC;AAErC,eAAO,MAAM,gBAAgB,+DAA2C,qBAAqB,uBA2P3F,CAAC"}
1
+ {"version":3,"file":"NavTreeContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/NavTreeContainer.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAgD,MAAM,OAAO,CAAC;AAuBrE,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAOnD,eAAO,MAAM,SAAS,wBAAwB,CAAC;AAgC/C,MAAM,MAAM,qBAAqB,GAAG;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,GAAG,IAAI,CAAC,mBAAmB,EAAE,KAAK,CAAC,CAAC;AAErC,eAAO,MAAM,gBAAgB,+DAA2C,qBAAqB,uBA2P3F,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { Schema } from 'effect';
2
- import { type Live } from '@dxos/live-object';
2
+ import { type Live } from '@dxos/echo';
3
3
  export type TestItem = {
4
4
  id: string;
5
5
  type: string;
@@ -1 +1 @@
1
- {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../../../src/testing/generator.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAIhC,OAAO,EAAQ,KAAK,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAQpD,MAAM,MAAM,QAAQ,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAE1E,KAAK,mBAAmB,GAAG;IACzB,YAAY,CAAC,EAAE,MAAM,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC;IAChD,UAAU,EAAE,MAAM,GAAG,CAAC;CACvB,CAAC;AAEF,KAAK,aAAa,CAAC,CAAC,SAAS,IAAI,CAAC,GAAG,CAAC,IAAI;IACxC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC;IACpC,YAAY,EAAE,MAAM,CAAC,CAAC;CACvB,CAAC;AAEF,KAAK,gBAAgB,GAAG;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,CAAC,GAAG,CAAC,CAAA;CAAE,CAAC;AAW/D,eAAO,MAAM,MAAM,UAAgC,CAAC;AACpD,eAAO,MAAM,QAAQ,UAAkB,CAAC;AAExC,eAAO,MAAM,iBAAiB,EAAE;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG,mBAAmB,CAAA;CAgCpE,CAAC;AAEF;;GAEG;AACH,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gBAAgB,GAAG;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,CAAC,GAAG,CAAC,CAAA;CAAE,CAAC;AAW/D,eAAO,MAAM,MAAM,UAAgC,CAAC;AACpD,eAAO,MAAM,QAAQ,UAAkB,CAAC;AAExC,eAAO,MAAM,iBAAiB,EAAE;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG,mBAAmB,CAAA;CAmCpE,CAAC;AAEF;;GAEG;AACH,qBAAa,mBAAmB;IAC9B,SAAgB,SAAS,EAAE,gBAAgB,CAAC;gBAEhC,EAAE,KAAK,EAAE,SAAS,EAAE,GAAE;QAAE,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,SAAS,CAAC,EAAE,gBAAgB,CAAA;KAAO;IASzF,IAAI,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,CAEzC;IAED,YAAY,CAAC,EAAE,KAAK,EAAE,GAAE;QAAE,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;KAAO;IAMjD,aAAa,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE;CAGtE;AAeD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+EtB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/plugin-navtree",
3
- "version": "0.8.3-main.672df60",
3
+ "version": "0.8.3-main.7f5a14c",
4
4
  "description": "DXOS Surface plugin for a tree view visualization of the graph.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -31,29 +31,29 @@
31
31
  "@radix-ui/react-use-controllable-state": "1.1.0",
32
32
  "date-fns": "^3.3.1",
33
33
  "effect": "^3.13.3",
34
- "@dxos/app-framework": "0.8.3-main.672df60",
35
- "@dxos/async": "0.8.3-main.672df60",
36
- "@dxos/debug": "0.8.3-main.672df60",
37
- "@dxos/app-graph": "0.8.3-main.672df60",
38
- "@dxos/echo": "0.8.3-main.672df60",
39
- "@dxos/echo-schema": "0.8.3-main.672df60",
40
- "@dxos/invariant": "0.8.3-main.672df60",
41
- "@dxos/keyboard": "0.8.3-main.672df60",
42
- "@dxos/live-object": "0.8.3-main.672df60",
43
- "@dxos/local-storage": "0.8.3-main.672df60",
44
- "@dxos/log": "0.8.3-main.672df60",
45
- "@dxos/plugin-graph": "0.8.3-main.672df60",
46
- "@dxos/plugin-deck": "0.8.3-main.672df60",
47
- "@dxos/plugin-observability": "0.8.3-main.672df60",
48
- "@dxos/protocols": "0.8.3-main.672df60",
49
- "@dxos/react-client": "0.8.3-main.672df60",
50
- "@dxos/react-ui-list": "0.8.3-main.672df60",
51
- "@dxos/react-ui-attention": "0.8.3-main.672df60",
52
- "@dxos/react-ui-menu": "0.8.3-main.672df60",
53
- "@dxos/react-ui-searchlist": "0.8.3-main.672df60",
54
- "@dxos/react-ui-stack": "0.8.3-main.672df60",
55
- "@dxos/react-ui-tabs": "0.8.3-main.672df60",
56
- "@dxos/util": "0.8.3-main.672df60"
34
+ "@dxos/app-graph": "0.8.3-main.7f5a14c",
35
+ "@dxos/async": "0.8.3-main.7f5a14c",
36
+ "@dxos/app-framework": "0.8.3-main.7f5a14c",
37
+ "@dxos/debug": "0.8.3-main.7f5a14c",
38
+ "@dxos/echo": "0.8.3-main.7f5a14c",
39
+ "@dxos/echo-schema": "0.8.3-main.7f5a14c",
40
+ "@dxos/invariant": "0.8.3-main.7f5a14c",
41
+ "@dxos/keyboard": "0.8.3-main.7f5a14c",
42
+ "@dxos/local-storage": "0.8.3-main.7f5a14c",
43
+ "@dxos/live-object": "0.8.3-main.7f5a14c",
44
+ "@dxos/log": "0.8.3-main.7f5a14c",
45
+ "@dxos/plugin-deck": "0.8.3-main.7f5a14c",
46
+ "@dxos/plugin-graph": "0.8.3-main.7f5a14c",
47
+ "@dxos/plugin-observability": "0.8.3-main.7f5a14c",
48
+ "@dxos/protocols": "0.8.3-main.7f5a14c",
49
+ "@dxos/react-ui-attention": "0.8.3-main.7f5a14c",
50
+ "@dxos/react-client": "0.8.3-main.7f5a14c",
51
+ "@dxos/react-ui-menu": "0.8.3-main.7f5a14c",
52
+ "@dxos/react-ui-list": "0.8.3-main.7f5a14c",
53
+ "@dxos/react-ui-searchlist": "0.8.3-main.7f5a14c",
54
+ "@dxos/react-ui-stack": "0.8.3-main.7f5a14c",
55
+ "@dxos/react-ui-tabs": "0.8.3-main.7f5a14c",
56
+ "@dxos/util": "0.8.3-main.7f5a14c"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@effect-rx/rx-react": "^0.34.1",
@@ -64,14 +64,14 @@
64
64
  "react": "~18.2.0",
65
65
  "react-dom": "~18.2.0",
66
66
  "vite": "5.4.7",
67
- "@dxos/echo-signals": "0.8.3-main.672df60",
68
- "@dxos/plugin-storybook-layout": "0.8.3-main.672df60",
69
- "@dxos/plugin-theme": "0.8.3-main.672df60",
70
- "@dxos/plugin-attention": "0.8.3-main.672df60",
71
- "@dxos/storybook-utils": "0.8.3-main.672df60",
72
- "@dxos/react-ui-theme": "0.8.3-main.672df60",
73
- "@dxos/react-ui": "0.8.3-main.672df60",
74
- "@dxos/random": "0.8.3-main.672df60"
67
+ "@dxos/echo-signals": "0.8.3-main.7f5a14c",
68
+ "@dxos/plugin-storybook-layout": "0.8.3-main.7f5a14c",
69
+ "@dxos/plugin-theme": "0.8.3-main.7f5a14c",
70
+ "@dxos/random": "0.8.3-main.7f5a14c",
71
+ "@dxos/plugin-attention": "0.8.3-main.7f5a14c",
72
+ "@dxos/react-ui": "0.8.3-main.7f5a14c",
73
+ "@dxos/react-ui-theme": "0.8.3-main.7f5a14c",
74
+ "@dxos/storybook-utils": "0.8.3-main.7f5a14c"
75
75
  },
76
76
  "peerDependencies": {
77
77
  "@effect-rx/rx-react": "^0.34.1",
@@ -80,8 +80,8 @@
80
80
  "effect": "^3.13.3",
81
81
  "react": "~18.2.0",
82
82
  "react-dom": "~18.2.0",
83
- "@dxos/react-ui": "0.8.3-main.672df60",
84
- "@dxos/react-ui-theme": "0.8.3-main.672df60"
83
+ "@dxos/react-ui": "0.8.3-main.7f5a14c",
84
+ "@dxos/react-ui-theme": "0.8.3-main.7f5a14c"
85
85
  },
86
86
  "publishConfig": {
87
87
  "access": "public"
@@ -5,7 +5,7 @@
5
5
  import { effect } from '@preact/signals-core';
6
6
 
7
7
  import { Capabilities, contributes, type PluginContext } from '@dxos/app-framework';
8
- import { type Live, live } from '@dxos/live-object';
8
+ import { type Live, Obj } from '@dxos/echo';
9
9
  import { Path } from '@dxos/react-ui-list';
10
10
 
11
11
  import { NavTreeCapabilities } from './capabilities';
@@ -21,15 +21,10 @@ const getInitialState = () => {
21
21
 
22
22
  try {
23
23
  const cached: [string, { open: boolean; current: boolean }][] = JSON.parse(stringified);
24
- return cached.map(
25
- ([key, value]): [
26
- string,
27
- Live<{
28
- open: boolean;
29
- current: boolean;
30
- }>,
31
- ] => [key, live({ open: value.open, current: false })],
32
- );
24
+ return cached.map(([key, value]): [string, Live<{ open: boolean; current: boolean }>] => [
25
+ key,
26
+ Obj.make({ open: value.open, current: false }),
27
+ ]);
33
28
  } catch {}
34
29
  };
35
30
 
@@ -43,15 +38,15 @@ export default (context: PluginContext) => {
43
38
  const state = new Map<string, Live<{ open: boolean; current: boolean; alternateTree?: boolean }>>(
44
39
  getInitialState() ?? [
45
40
  // TODO(thure): Initialize these dynamically.
46
- ['root', live({ open: true, current: false })],
47
- ['root~dxos.org/plugin/space-spaces', live({ open: true, current: false })],
48
- ['root~dxos.org/plugin/files', live({ open: true, current: false })],
41
+ ['root', Obj.make({ open: true, current: false })],
42
+ ['root~dxos.org/plugin/space-spaces', Obj.make({ open: true, current: false })],
43
+ ['root~dxos.org/plugin/files', Obj.make({ open: true, current: false })],
49
44
  ],
50
45
  );
51
46
 
52
47
  const getItem = (_path: string[]) => {
53
48
  const path = Path.create(..._path);
54
- const value = state.get(path) ?? live({ open: false, current: false, alternateTree: false });
49
+ const value = state.get(path) ?? Obj.make({ open: false, current: false, alternateTree: false });
55
50
  if (!state.has(path)) {
56
51
  state.set(path, value);
57
52
  }
@@ -19,7 +19,7 @@ import {
19
19
  useCapability,
20
20
  } from '@dxos/app-framework';
21
21
  import { withPluginManager } from '@dxos/app-framework/testing';
22
- import { live } from '@dxos/live-object';
22
+ import { Obj } from '@dxos/echo';
23
23
  import { AttentionPlugin } from '@dxos/plugin-attention';
24
24
  import { GraphPlugin } from '@dxos/plugin-graph';
25
25
  import { StorybookLayoutPlugin } from '@dxos/plugin-storybook-layout';
@@ -76,7 +76,7 @@ const StoryPlank = ({ attendableId }: { attendableId: string }) => {
76
76
  >
77
77
  <StoryPlankHeading attendableId={attendableId} />
78
78
  <StackItem.Content toolbar>
79
- <Toolbar.Root classNames='border-b border-separator'>
79
+ <Toolbar.Root classNames='border-b border-subduedSeparator'>
80
80
  <Toolbar.Button>Test</Toolbar.Button>
81
81
  </Toolbar.Root>
82
82
 
@@ -130,7 +130,7 @@ const meta: Meta<typeof NavTreeContainer> = {
130
130
  NavTreePlugin(),
131
131
  ],
132
132
  capabilities: (context) => [
133
- contributes(StoryState, live({ tab: 'space-0' })),
133
+ contributes(StoryState, Obj.make({ tab: 'space-0' })),
134
134
  contributes(Capabilities.AppGraphBuilder, storybookGraphBuilders),
135
135
  contributes(Capabilities.IntentResolver, [
136
136
  createResolver({
@@ -16,12 +16,13 @@ import {
16
16
  useIntentDispatcher,
17
17
  useLayout,
18
18
  } from '@dxos/app-framework';
19
- import { isAction, isActionLike, type ReadableGraph, ROOT_ID, type Node } from '@dxos/app-graph';
19
+ import { isAction, isActionLike, ROOT_ID, type Node, type ReadableGraph } from '@dxos/app-graph';
20
+ import { Obj } from '@dxos/echo';
20
21
  import { PLANK_COMPANION_TYPE } from '@dxos/plugin-deck/types';
21
22
  import { useConnections } from '@dxos/plugin-graph';
22
- import { isEchoObject, isSpace } from '@dxos/react-client/echo';
23
+ import { isSpace } from '@dxos/react-client/echo';
23
24
  import { useMediaQuery, useSidebars } from '@dxos/react-ui';
24
- import { isTreeData, type TreeData, type PropsFromTreeItem } from '@dxos/react-ui-list';
25
+ import { isTreeData, type PropsFromTreeItem, type TreeData } from '@dxos/react-ui-list';
25
26
  import { mx } from '@dxos/react-ui-theme';
26
27
  import { arrayMove, byPosition } from '@dxos/util';
27
28
 
@@ -31,7 +32,7 @@ import { type NavTreeContextValue } from './types';
31
32
  import { NavTreeCapabilities } from '../capabilities';
32
33
  import { NAVTREE_PLUGIN } from '../meta';
33
34
  import { type NavTreeItemGraphNode } from '../types';
34
- import { getActions as naturalGetActions, getChildren, getParent, resolveMigrationOperation } from '../util';
35
+ import { getChildren, getParent, getActions as naturalGetActions, resolveMigrationOperation } from '../util';
35
36
 
36
37
  // TODO(thure): Is NavTree truly authoritative in this regard?
37
38
  export const NODE_TYPE = 'dxos/app-graph/node';
@@ -157,9 +158,9 @@ export const NavTreeContainer = memo(({ tab, popoverAnchorId, topbar }: NavTreeC
157
158
  // TODO(wittjosiah): This shouldn't depend directly on client, there should be a graph-level abstraction.
158
159
  if (isSpace(targetNode.data)) {
159
160
  // TODO(wittjosiah): Find a way to only allow space as source for rearranging.
160
- return isEchoObject(sourceNode.data) || isSpace(sourceNode.data);
161
- } else if (isEchoObject(targetNode.data)) {
162
- return isEchoObject(sourceNode.data);
161
+ return Obj.isObject(sourceNode.data) || isSpace(sourceNode.data);
162
+ } else if (Obj.isObject(targetNode.data)) {
163
+ return Obj.isObject(sourceNode.data);
163
164
  } else {
164
165
  return false;
165
166
  }
@@ -5,8 +5,8 @@
5
5
  import { Schema } from 'effect';
6
6
 
7
7
  import { type NodeArg } from '@dxos/app-graph';
8
+ import { type Live, Obj } from '@dxos/echo';
8
9
  import { TypedObject } from '@dxos/echo-schema';
9
- import { live, type Live } from '@dxos/live-object';
10
10
  import { faker } from '@dxos/random';
11
11
  import { range } from '@dxos/util';
12
12
 
@@ -32,7 +32,7 @@ const createFactory = ({ createSchema, createData }: ObjectDataGenerator) => {
32
32
  const schema = createSchema?.();
33
33
  return {
34
34
  schema,
35
- createObject: () => (schema ? live(schema, createData()) : live(createData())),
35
+ createObject: () => (schema ? Obj.make(schema, createData()) : Obj.make(createData())),
36
36
  };
37
37
  };
38
38
 
@@ -58,7 +58,10 @@ export const defaultGenerators: { [type: string]: ObjectDataGenerator } = {
58
58
 
59
59
  project: {
60
60
  createSchema: () =>
61
- class ProjectType extends TypedObject({ typename: 'example.com/type/Project', version: '0.1.0' })({
61
+ class ProjectType extends TypedObject({
62
+ typename: 'example.com/type/Project',
63
+ version: '0.1.0',
64
+ })({
62
65
  title: Schema.String,
63
66
  repo: Schema.String,
64
67
  status: Schema.String,