@thatopen/services 0.3.7 → 0.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -2,8 +2,8 @@ var Fe = Object.defineProperty;
2
2
  var ge = (n) => {
3
3
  throw TypeError(n);
4
4
  };
5
- var Ve = (n, e, t) => e in n ? Fe(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
6
- var _ = (n, e, t) => Ve(n, typeof e != "symbol" ? e + "" : e, t), J = (n, e, t) => e.has(n) || ge("Cannot " + t);
5
+ var Me = (n, e, t) => e in n ? Fe(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
6
+ var _ = (n, e, t) => Me(n, typeof e != "symbol" ? e + "" : e, t), J = (n, e, t) => e.has(n) || ge("Cannot " + t);
7
7
  var j = (n, e, t) => (J(n, e, "read from private field"), t ? t.call(n) : e.get(n)), Y = (n, e, t) => e.has(n) ? ge("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), we = (n, e, t, s) => (J(n, e, "write to private field"), s ? s.call(n, t) : e.set(n, t), t), c = (n, e, t) => (J(n, e, "access private method"), t);
8
8
  const k = /* @__PURE__ */ Object.create(null);
9
9
  k.open = "0";
@@ -24,22 +24,22 @@ const ee = { type: "error", data: "parser error" }, Ae = typeof Blob == "functio
24
24
  e("b" + (s || ""));
25
25
  }, t.readAsDataURL(n);
26
26
  };
27
- function Ee(n) {
27
+ function be(n) {
28
28
  return n instanceof Uint8Array ? n : n instanceof ArrayBuffer ? new Uint8Array(n) : new Uint8Array(n.buffer, n.byteOffset, n.byteLength);
29
29
  }
30
30
  let K;
31
- function Me(n, e) {
31
+ function Ve(n, e) {
32
32
  if (Ae && n.data instanceof Blob)
33
- return n.data.arrayBuffer().then(Ee).then(e);
33
+ return n.data.arrayBuffer().then(be).then(e);
34
34
  if (Oe && (n.data instanceof ArrayBuffer || Se(n.data)))
35
- return e(Ee(n.data));
35
+ return e(be(n.data));
36
36
  ue(n, !1, (t) => {
37
37
  K || (K = new TextEncoder()), e(K.encode(t));
38
38
  });
39
39
  }
40
- const be = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", N = typeof Uint8Array > "u" ? [] : new Uint8Array(256);
41
- for (let n = 0; n < be.length; n++)
42
- N[be.charCodeAt(n)] = n;
40
+ const Ee = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", N = typeof Uint8Array > "u" ? [] : new Uint8Array(256);
41
+ for (let n = 0; n < Ee.length; n++)
42
+ N[Ee.charCodeAt(n)] = n;
43
43
  const He = (n) => {
44
44
  let e = n.length * 0.75, t = n.length, s, r = 0, i, o, h, l;
45
45
  n[n.length - 1] === "=" && (e--, n[n.length - 2] === "=" && e--);
@@ -97,7 +97,7 @@ const He = (n) => {
97
97
  function Ke() {
98
98
  return new TransformStream({
99
99
  transform(n, e) {
100
- Me(n, (t) => {
100
+ Ve(n, (t) => {
101
101
  const s = t.length;
102
102
  let r;
103
103
  if (s < 126)
@@ -219,13 +219,13 @@ g.prototype.listeners = function(n) {
219
219
  g.prototype.hasListeners = function(n) {
220
220
  return !!this.listeners(n).length;
221
221
  };
222
- const H = typeof Promise == "function" && typeof Promise.resolve == "function" ? (e) => Promise.resolve().then(e) : (e, t) => t(e, 0), E = typeof self < "u" ? self : typeof window < "u" ? window : Function("return this")(), Xe = "arraybuffer";
222
+ const H = typeof Promise == "function" && typeof Promise.resolve == "function" ? (e) => Promise.resolve().then(e) : (e, t) => t(e, 0), b = typeof self < "u" ? self : typeof window < "u" ? window : Function("return this")(), Xe = "arraybuffer";
223
223
  function Be(n, ...e) {
224
224
  return e.reduce((t, s) => (n.hasOwnProperty(s) && (t[s] = n[s]), t), {});
225
225
  }
226
- const Qe = E.setTimeout, Ze = E.clearTimeout;
226
+ const Qe = b.setTimeout, Ze = b.clearTimeout;
227
227
  function G(n, e) {
228
- e.useNativeTimers ? (n.setTimeoutFn = Qe.bind(E), n.clearTimeoutFn = Ze.bind(E)) : (n.setTimeoutFn = E.setTimeout.bind(E), n.clearTimeoutFn = E.clearTimeout.bind(E));
228
+ e.useNativeTimers ? (n.setTimeoutFn = Qe.bind(b), n.clearTimeoutFn = Ze.bind(b)) : (n.setTimeoutFn = b.setTimeout.bind(b), n.clearTimeoutFn = b.clearTimeout.bind(b));
229
229
  }
230
230
  const et = 1.33;
231
231
  function tt(n) {
@@ -602,7 +602,7 @@ if (typeof document < "u") {
602
602
  if (typeof attachEvent == "function")
603
603
  attachEvent("onunload", Te);
604
604
  else if (typeof addEventListener == "function") {
605
- const n = "onpagehide" in E ? "pagehide" : "unload";
605
+ const n = "onpagehide" in b ? "pagehide" : "unload";
606
606
  addEventListener(n, Te, !1);
607
607
  }
608
608
  }
@@ -635,7 +635,7 @@ function Pe(n) {
635
635
  }
636
636
  if (!e)
637
637
  try {
638
- return new E[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP");
638
+ return new b[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP");
639
639
  } catch {
640
640
  }
641
641
  }
@@ -696,7 +696,7 @@ class ft extends fe {
696
696
  return this.opts.timestampRequests && (t[this.opts.timestampParam] = xe()), this.supportsBinary || (t.b64 = 1), this.createUri(e, t);
697
697
  }
698
698
  }
699
- const z = E.WebSocket || E.MozWebSocket;
699
+ const z = b.WebSocket || b.MozWebSocket;
700
700
  class pt extends ft {
701
701
  createSocket(e, t, s) {
702
702
  return Le ? new z(e, t, s) : t ? new z(e, t) : new z(e);
@@ -1066,7 +1066,7 @@ class $ extends g {
1066
1066
  }
1067
1067
  }
1068
1068
  $.protocol = Re;
1069
- class Et extends $ {
1069
+ class bt extends $ {
1070
1070
  constructor() {
1071
1071
  super(...arguments), this._upgrades = [];
1072
1072
  }
@@ -1138,7 +1138,7 @@ class Et extends $ {
1138
1138
  return t;
1139
1139
  }
1140
1140
  }
1141
- let bt = class extends Et {
1141
+ let Et = class extends bt {
1142
1142
  constructor(e, t = {}) {
1143
1143
  const s = typeof e == "object" ? e : t;
1144
1144
  (!s.transports || s.transports && typeof s.transports[0] == "string") && (s.transports = (s.transports || ["polling", "websocket", "webtransport"]).map((r) => yt[r]).filter((r) => !!r)), super(e, s);
@@ -1420,7 +1420,7 @@ const xt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1420
1420
  return p;
1421
1421
  }
1422
1422
  }, Symbol.toStringTag, { value: "Module" }));
1423
- function b(n, e, t) {
1423
+ function E(n, e, t) {
1424
1424
  return n.on(e, t), function() {
1425
1425
  n.off(e, t);
1426
1426
  };
@@ -1468,10 +1468,10 @@ class qe extends g {
1468
1468
  return;
1469
1469
  const e = this.io;
1470
1470
  this.subs = [
1471
- b(e, "open", this.onopen.bind(this)),
1472
- b(e, "packet", this.onpacket.bind(this)),
1473
- b(e, "error", this.onerror.bind(this)),
1474
- b(e, "close", this.onclose.bind(this))
1471
+ E(e, "open", this.onopen.bind(this)),
1472
+ E(e, "packet", this.onpacket.bind(this)),
1473
+ E(e, "error", this.onerror.bind(this)),
1474
+ E(e, "close", this.onclose.bind(this))
1475
1475
  ];
1476
1476
  }
1477
1477
  /**
@@ -2100,14 +2100,14 @@ class ie extends g {
2100
2100
  open(e) {
2101
2101
  if (~this._readyState.indexOf("open"))
2102
2102
  return this;
2103
- this.engine = new bt(this.uri, this.opts);
2103
+ this.engine = new Et(this.uri, this.opts);
2104
2104
  const t = this.engine, s = this;
2105
2105
  this._readyState = "opening", this.skipReconnect = !1;
2106
- const r = b(t, "open", function() {
2106
+ const r = E(t, "open", function() {
2107
2107
  s.onopen(), e && e();
2108
2108
  }), i = (h) => {
2109
2109
  this.cleanup(), this._readyState = "closed", this.emitReserved("error", h), e ? e(h) : this.maybeReconnectOnOpen();
2110
- }, o = b(t, "error", i);
2110
+ }, o = E(t, "error", i);
2111
2111
  if (this._timeout !== !1) {
2112
2112
  const h = this._timeout, l = this.setTimeoutFn(() => {
2113
2113
  r(), i(new Error("timeout")), t.close();
@@ -2136,12 +2136,12 @@ class ie extends g {
2136
2136
  this.cleanup(), this._readyState = "open", this.emitReserved("open");
2137
2137
  const e = this.engine;
2138
2138
  this.subs.push(
2139
- b(e, "ping", this.onping.bind(this)),
2140
- b(e, "data", this.ondata.bind(this)),
2141
- b(e, "error", this.onerror.bind(this)),
2142
- b(e, "close", this.onclose.bind(this)),
2139
+ E(e, "ping", this.onping.bind(this)),
2140
+ E(e, "data", this.ondata.bind(this)),
2141
+ E(e, "error", this.onerror.bind(this)),
2142
+ E(e, "close", this.onclose.bind(this)),
2143
2143
  // @ts-ignore
2144
- b(this.decoder, "decoded", this.ondecoded.bind(this))
2144
+ E(this.decoder, "decoded", this.ondecoded.bind(this))
2145
2145
  );
2146
2146
  }
2147
2147
  /**
@@ -2327,7 +2327,7 @@ class Lt extends Error {
2327
2327
  }
2328
2328
  }
2329
2329
  const T = "item/folder", f = "item", O = "processor", It = "npm-registry", S = "hidden", X = "FILE", Q = "TOOL", Z = "APP";
2330
- var a, ae, u, C, V, M, ce, he, Ue;
2330
+ var a, ae, u, C, M, V, ce, he, Ue;
2331
2331
  const ye = class ye {
2332
2332
  /**
2333
2333
  * Creates a new EngineServicesClient instance.
@@ -2475,7 +2475,7 @@ const ye = class ye {
2475
2475
  * @returns The created item and its first version.
2476
2476
  */
2477
2477
  async createFile(e) {
2478
- return await c(this, a, M).call(this, e, X);
2478
+ return await c(this, a, V).call(this, e, X);
2479
2479
  }
2480
2480
  /**
2481
2481
  * Updates an existing file. Can rename, move to a different folder,
@@ -2508,7 +2508,7 @@ const ye = class ye {
2508
2508
  * @returns A fetch Response containing the file data.
2509
2509
  */
2510
2510
  async downloadFile(e, t) {
2511
- return await c(this, a, V).call(this, e, t);
2511
+ return await c(this, a, M).call(this, e, t);
2512
2512
  }
2513
2513
  /**
2514
2514
  * Retrieves the free-JSON metadata for a specific file version.
@@ -2655,7 +2655,7 @@ const ye = class ye {
2655
2655
  */
2656
2656
  async createComponent(e) {
2657
2657
  const { componentProps: t } = e;
2658
- return await c(this, a, M).call(this, e, Q, t);
2658
+ return await c(this, a, V).call(this, e, Q, t);
2659
2659
  }
2660
2660
  /**
2661
2661
  * Updates an existing component. Can rename, move, and/or upload a new version.
@@ -2674,7 +2674,7 @@ const ye = class ye {
2674
2674
  * @returns A fetch Response containing the ZIP data.
2675
2675
  */
2676
2676
  async downloadComponent(e, t) {
2677
- return await c(this, a, V).call(this, e, t);
2677
+ return await c(this, a, M).call(this, e, t);
2678
2678
  }
2679
2679
  /**
2680
2680
  * Downloads only the JavaScript bundle from a component's ZIP.
@@ -2831,7 +2831,7 @@ return main;`)(...h), d = (y == null ? void 0 : y.componentDefinition) ?? y;
2831
2831
  */
2832
2832
  async createApp(e) {
2833
2833
  const { appProps: t } = e;
2834
- return await c(this, a, M).call(this, e, Z, t);
2834
+ return await c(this, a, V).call(this, e, Z, t);
2835
2835
  }
2836
2836
  /**
2837
2837
  * Downloads an app's full ZIP file. Returns the raw fetch Response.
@@ -2840,7 +2840,7 @@ return main;`)(...h), d = (y == null ? void 0 : y.componentDefinition) ?? y;
2840
2840
  * @returns A fetch Response containing the ZIP data.
2841
2841
  */
2842
2842
  async downloadApp(e, t) {
2843
- return await c(this, a, V).call(this, e, t);
2843
+ return await c(this, a, M).call(this, e, t);
2844
2844
  }
2845
2845
  /**
2846
2846
  * Downloads only the JavaScript bundle from an app's ZIP.
@@ -3220,7 +3220,7 @@ a = new WeakSet(), ae = function(e) {
3220
3220
  }
3221
3221
  }
3222
3222
  );
3223
- }, V = async function(e, t) {
3223
+ }, M = async function(e, t) {
3224
3224
  const { versionTag: s, withDraft: r } = t || {};
3225
3225
  return await c(this, a, C).call(this, `${f}/${e}/download`, {
3226
3226
  query: {
@@ -3228,7 +3228,7 @@ a = new WeakSet(), ae = function(e) {
3228
3228
  ...r && { withDraft: r }
3229
3229
  }
3230
3230
  });
3231
- }, M = async function(e, t, s) {
3231
+ }, V = async function(e, t, s) {
3232
3232
  const { name: r, versionTag: i, parentFolderId: o, projectId: h, file: l, metadata: y } = e, d = new FormData();
3233
3233
  return d.append("file", l), d.append("name", r), d.append("versionTag", i), d.append("itemType", t), o && d.append("folderId", o), h && d.append("projectId", h), s && d.append("extraProps", JSON.stringify(s)), y && d.append("metadata", JSON.stringify(y)), await c(this, a, u).call(this, "POST", f, {
3234
3234
  body: d
@@ -3343,14 +3343,15 @@ const Dt = {
3343
3343
  MAX_FIELDS: 200,
3344
3344
  MAX_KEY_LENGTH: 50,
3345
3345
  MAX_VALUE_LENGTH: 50
3346
- }, Ft = { uuid: "a3f82c1d-5b74-4e9a-bc30-d7e12f894a61" }, Vt = { uuid: "b0b5e2a2-0b3a-4a6b-8b1c-0b1c4a6b8b1c" }, Mt = { uuid: "2c4ae432-fc24-43e9-9783-0c960c674e96" }, Ht = { uuid: "234f1416-528d-452a-9cc9-a16c5239b2eb" };
3346
+ }, Ft = { uuid: "a3f82c1d-5b74-4e9a-bc30-d7e12f894a61" }, Mt = { uuid: "2c9f4e8d-3a1b-4c5e-9d7f-0a2b6c8e1d3f" }, Vt = { uuid: "b0b5e2a2-0b3a-4a6b-8b1c-0b1c4a6b8b1c" }, Ht = { uuid: "2c4ae432-fc24-43e9-9783-0c960c674e96" }, Gt = { uuid: "234f1416-528d-452a-9cc9-a16c5239b2eb" };
3347
3347
  export {
3348
3348
  Ft as CDEManager,
3349
+ Mt as ClashesManager,
3349
3350
  oe as EngineServicesClient,
3350
3351
  Vt as FileList,
3351
- Mt as HelloWorld,
3352
+ Ht as HelloWorld,
3352
3353
  Dt as METADATA_LIMITS,
3353
3354
  ke as PlatformClient,
3354
3355
  Lt as RequestError,
3355
- Ht as UIManager
3356
+ Gt as UIManager
3356
3357
  };
@@ -1,78 +1,86 @@
1
- [
2
- {
3
- "path": "src/built-in/CDEManager/example.ts",
4
- "description": "CDEManager — CDEManager is the central state machine for a Common Data Environment. It holds files, folders, metadata schemas, viewer groups, and user permissions, and exposes a typed state machine that all file operations — selecting, editing, uploading, viewing — route through. It has no DOM or Three.js dependencies and can run in Node, a browser, or a server-side worker wherever `@thatopen/components` is available."
5
- },
6
- {
7
- "path": "src/built-in/CDEManager/examples/FileEditing/example.ts",
8
- "description": "Bulk file editing — stage, preview, revert, and commit — A project manager preparing a deliverable handoff needs to update discipline tags across fifteen IFC files after a scope change, rename each to match the new naming convention, and archive three superseded models — all before anything is sent to the backend. Doing the changes one file at a time risks leaving the file list in a half-updated state if the session is interrupted, and there is no way to review exactly what will change before committing."
9
- },
10
- {
11
- "path": "src/built-in/CDEManager/examples/FileMoves/example.ts",
12
- "description": "Drag-and-drop file and folder moves — A coordinator restructures the project after a scope change: structural files move from the root into a dedicated discipline folder, a MEP sub-folder needs to be promoted to the top level, and a few documents need to come back to root to appear in the general view. Drag-and-drop is the natural gesture for all of this, but each drag session has intermediate stages — the file is \"in the air\", hovering over a candidate target — and every panel watching the file table should see the right state without coordinating directly with the drag component."
13
- },
14
- {
15
- "path": "src/built-in/CDEManager/examples/FileOperations/example.ts",
16
- "description": "File operations — inline edit, rename, view, download, archive — BIM coordinators reviewing a model drop repeat the same small actions throughout their session: correcting a discipline tag that changed after a scope revision, renaming a file to match the agreed convention, opening it alongside the structural model to check for clashes, handing it off to a sub-consultant, or removing a superseded version from the live set. If every panel in the platform handles these separately, two panels looking at the same file at the same time can show contradictory states — one says \"uploading\", another still shows the old name."
17
- },
18
- {
19
- "path": "src/built-in/CDEManager/examples/FileTransfers/example.ts",
20
- "description": "File uploads, versioning, and the download cache — A site coordinator drops a batch of files onto the CDE every Monday after the weekend review: some are entirely new models, some are revised versions of files already in the project, and sometimes the metadata group they upload into should be stamped automatically onto the new files. If the platform makes the coordinator sort this out manually, it slows the handoff and introduces naming errors. And if an upload fails halfway through a batch, the file table should land in a safe state rather than freeze at a loading spinner."
21
- },
22
- {
23
- "path": "src/built-in/CDEManager/examples/FolderManagement/example.ts",
24
- "description": "Folder management — create, rename, archive, and commit — A project reaches the construction phase and the coordination team needs to restructure the folder hierarchy: add a \"Facades\" discipline folder, rename \"Structural\" to its official abbreviation, and archive two superseded folders that have been merged. Doing these one at a time through separate API calls means the folder tree flickers between invalid states as each change lands — a freshly created folder appears before its sibling is renamed, and the archived folders briefly disappear before the new one is visible."
25
- },
26
- {
27
- "path": "src/built-in/CDEManager/examples/MetadataSchema/example.ts",
28
- "description": "Metadata schema — define, stage, and publish field definitions — Every project has its own vocabulary for describing files: discipline codes, revision phases, area zones, review statuses. A metadata schema defines which fields exist, what values they accept, and whether they are mandatory. Without a structured schema, each user invents their own labels and the file list becomes impossible to filter or report on consistently."
29
- },
30
- {
31
- "path": "src/built-in/CDEManager/examples/MetadataViews/example.ts",
32
- "description": "Metadata views — organize fields into named table layouts — A structural engineer and an MEP coordinator look at the same file list but care about completely different metadata. Showing every field to everyone produces a wide table that is hard to navigate. Metadata views let each role define which fields appear in which order — saving the layout so the table opens correctly next time without requiring a manual setup every session."
33
- },
34
- {
35
- "path": "src/built-in/CDEManager/examples/ProjectConfig/example.ts",
36
- "description": "Project configuration — read, write, and reload persistent data — A CDE application needs to store two kinds of configuration: project-wide settings that all team members share (the metadata schema, custom naming rules) and personal settings that belong to one user (which columns are visible, which metadata views are pinned). Both live inside the project's file storage under a reserved system folder, so they travel with the project and don't rely on a separate configuration service."
37
- },
38
- {
39
- "path": "src/built-in/UIManager/src/app/example.ts",
40
- "description": "top-app — Front-end developers building BIM web apps need to coordinate several async initialization steps before the UI can be shown — loading the engine, preparing fragment workers, registering loaders — and users need visible feedback on what is happening during that wait, rather than a blank screen."
41
- },
42
- {
43
- "path": "src/built-in/UIManager/src/app/examples/AppState/example.ts",
44
- "description": "Shared reactive state with AppState — Developers building interactive BIM panels often need sibling components — a filter selector and a results table, for example — to stay in sync without a shared parent. Lifting state to a common ancestor and threading it down as props works for shallow trees but becomes unwieldy as the component tree grows."
45
- },
46
- {
47
- "path": "src/built-in/UIManager/src/app/examples/Banner/example.ts",
48
- "description": "Persistent banners with top:banner — Some application states need a persistent, visible indicator that stays on screen until the state is explicitly cleared — an archived-files mode, a read-only permission warning, a degraded-connectivity notice. A toast auto-dismisses after a few seconds, which is wrong for these cases. A modal blocks interaction entirely, which is too heavy."
49
- },
50
- {
51
- "path": "src/built-in/UIManager/src/app/examples/Contexts/example.ts",
52
- "description": "Consuming platform contexts in child components — Developers building custom BIM panels need access to the 3D engine, the platform API, and the current project's metadata — but threading these objects down through props across multiple component layers forces every intermediate element to know about data it doesn't use, making trees brittle and hard to refactor."
53
- },
54
- {
55
- "path": "src/built-in/UIManager/src/app/examples/FileDrop/example.ts",
56
- "description": "File drag-and-drop with top:files-dropped — Desktop BIM workflows often rely on dragging files straight from the OS file manager onto the browser window — but wiring a document-level dragenter, dragover, dragleave, and drop handler that correctly tracks nested enter/leave counts, shows a visual overlay, and forwards the files to the right component is tedious boilerplate to repeat for every app."
57
- },
58
- {
59
- "path": "src/built-in/UIManager/src/app/examples/FloatingLayout/example.ts",
60
- "description": "Floating layout — Developers building BIM coordination tools often want the 3D model to fill the entire window while control panels float above it — but standard grid layouts give every area equal standing, shrinking the viewer into one cell and leaving visible seams between it and the panels."
61
- },
62
- {
63
- "path": "src/built-in/UIManager/src/app/examples/Modal/example.ts",
64
- "description": "Confirmation modals with top:modal — Destructive or irreversible actions — deleting records, overwriting files, leaving unsaved changes — should ask the user to confirm before proceeding. Opening a custom dialog element from a deeply nested component means threading a reference to a controller up through every layer of the tree."
65
- },
66
- {
67
- "path": "src/built-in/UIManager/src/app/examples/Notifications/example.ts",
68
- "description": "Toasts and cross-component notifications — Developers building BIM processing UIs need to surface status updates, errors, and async feedback to users from different points in the component tree — but reaching back to the app root to trigger a notification from a deeply nested component requires threading a reference through every layer in between."
69
- },
70
- {
71
- "path": "src/built-in/UIManager/src/app/examples/Sidebar/example.ts",
72
- "description": "Sidebar navigation — Product teams building BIM apps often need multiple distinct views — a 3D model viewer, a data browser, a settings screen — but wiring a custom nav bar and managing view transitions from scratch adds complexity before any real feature work begins."
73
- },
74
- {
75
- "path": "src/built-in/UIManager/src/models-list/example.ts",
76
- "description": "top-models-list — top-models-list is the project files panel: it lists the project's files, uploads new ones, converts IFC to fragments, and loads `.frag` models into the 3D scene. Its loaders are PLUGGABLE — the panel owns the UI and the orchestration (progress, refresh, association), but the HOST decides how each file format is loaded, so you can teach it new formats without forking the built-in."
77
- }
78
- ]
1
+ [
2
+ {
3
+ "path": "src/built-in/CDEManager/example.ts",
4
+ "description": "CDEManager — CDEManager is the central state machine for a Common Data Environment. It holds files, folders, metadata schemas, viewer groups, and user permissions, and exposes a typed state machine that all file operations — selecting, editing, uploading, viewing — route through. It has no DOM or Three.js dependencies and can run in Node, a browser, or a server-side worker wherever `@thatopen/components` is available."
5
+ },
6
+ {
7
+ "path": "src/built-in/CDEManager/examples/FileEditing/example.ts",
8
+ "description": "Bulk file editing — stage, preview, revert, and commit — A project manager preparing a deliverable handoff needs to update discipline tags across fifteen IFC files after a scope change, rename each to match the new naming convention, and archive three superseded models — all before anything is sent to the backend. Doing the changes one file at a time risks leaving the file list in a half-updated state if the session is interrupted, and there is no way to review exactly what will change before committing."
9
+ },
10
+ {
11
+ "path": "src/built-in/CDEManager/examples/FileMoves/example.ts",
12
+ "description": "Drag-and-drop file and folder moves — A coordinator restructures the project after a scope change: structural files move from the root into a dedicated discipline folder, a MEP sub-folder needs to be promoted to the top level, and a few documents need to come back to root to appear in the general view. Drag-and-drop is the natural gesture for all of this, but each drag session has intermediate stages — the file is \"in the air\", hovering over a candidate target — and every panel watching the file table should see the right state without coordinating directly with the drag component."
13
+ },
14
+ {
15
+ "path": "src/built-in/CDEManager/examples/FileOperations/example.ts",
16
+ "description": "File operations — inline edit, rename, view, download, archive — BIM coordinators reviewing a model drop repeat the same small actions throughout their session: correcting a discipline tag that changed after a scope revision, renaming a file to match the agreed convention, opening it alongside the structural model to check for clashes, handing it off to a sub-consultant, or removing a superseded version from the live set. If every panel in the platform handles these separately, two panels looking at the same file at the same time can show contradictory states — one says \"uploading\", another still shows the old name."
17
+ },
18
+ {
19
+ "path": "src/built-in/CDEManager/examples/FileTransfers/example.ts",
20
+ "description": "File uploads, versioning, and the download cache — A site coordinator drops a batch of files onto the CDE every Monday after the weekend review: some are entirely new models, some are revised versions of files already in the project, and sometimes the metadata group they upload into should be stamped automatically onto the new files. If the platform makes the coordinator sort this out manually, it slows the handoff and introduces naming errors. And if an upload fails halfway through a batch, the file table should land in a safe state rather than freeze at a loading spinner."
21
+ },
22
+ {
23
+ "path": "src/built-in/CDEManager/examples/FolderManagement/example.ts",
24
+ "description": "Folder management — create, rename, archive, and commit — A project reaches the construction phase and the coordination team needs to restructure the folder hierarchy: add a \"Facades\" discipline folder, rename \"Structural\" to its official abbreviation, and archive two superseded folders that have been merged. Doing these one at a time through separate API calls means the folder tree flickers between invalid states as each change lands — a freshly created folder appears before its sibling is renamed, and the archived folders briefly disappear before the new one is visible."
25
+ },
26
+ {
27
+ "path": "src/built-in/CDEManager/examples/MetadataSchema/example.ts",
28
+ "description": "Metadata schema — define, stage, and publish field definitions — Every project has its own vocabulary for describing files: discipline codes, revision phases, area zones, review statuses. A metadata schema defines which fields exist, what values they accept, and whether they are mandatory. Without a structured schema, each user invents their own labels and the file list becomes impossible to filter or report on consistently."
29
+ },
30
+ {
31
+ "path": "src/built-in/CDEManager/examples/MetadataViews/example.ts",
32
+ "description": "Metadata views — organize fields into named table layouts — A structural engineer and an MEP coordinator look at the same file list but care about completely different metadata. Showing every field to everyone produces a wide table that is hard to navigate. Metadata views let each role define which fields appear in which order — saving the layout so the table opens correctly next time without requiring a manual setup every session."
33
+ },
34
+ {
35
+ "path": "src/built-in/CDEManager/examples/ProjectConfig/example.ts",
36
+ "description": "Project configuration — read, write, and reload persistent data — A CDE application needs to store two kinds of configuration: project-wide settings that all team members share (the metadata schema, custom naming rules) and personal settings that belong to one user (which columns are visible, which metadata views are pinned). Both live inside the project's file storage under a reserved system folder, so they travel with the project and don't rely on a separate configuration service."
37
+ },
38
+ {
39
+ "path": "src/built-in/ClashesManager/example.ts",
40
+ "description": "ClashesManager — Structural engineers and BIM coordinators routinely detect geometric clashes between disciplines — structural steel penetrating ductwork, pipes clashing with slabs — and need to track the status of each issue through resolution without leaving their BIM environment."
41
+ },
42
+ {
43
+ "path": "src/built-in/UIManager/src/app/example.ts",
44
+ "description": "top-app — Front-end developers building BIM web apps need to coordinate several async initialization steps before the UI can be shown — loading the engine, preparing fragment workers, registering loaders — and users need visible feedback on what is happening during that wait, rather than a blank screen."
45
+ },
46
+ {
47
+ "path": "src/built-in/UIManager/src/app/examples/AppState/example.ts",
48
+ "description": "Shared reactive state with AppState — Developers building interactive BIM panels often need sibling components — a filter selector and a results table, for example — to stay in sync without a shared parent. Lifting state to a common ancestor and threading it down as props works for shallow trees but becomes unwieldy as the component tree grows."
49
+ },
50
+ {
51
+ "path": "src/built-in/UIManager/src/app/examples/Banner/example.ts",
52
+ "description": "Persistent banners with top:banner — Some application states need a persistent, visible indicator that stays on screen until the state is explicitly cleared — an archived-files mode, a read-only permission warning, a degraded-connectivity notice. A toast auto-dismisses after a few seconds, which is wrong for these cases. A modal blocks interaction entirely, which is too heavy."
53
+ },
54
+ {
55
+ "path": "src/built-in/UIManager/src/app/examples/Contexts/example.ts",
56
+ "description": "Consuming platform contexts in child components — Developers building custom BIM panels need access to the 3D engine, the platform API, and the current project's metadata — but threading these objects down through props across multiple component layers forces every intermediate element to know about data it doesn't use, making trees brittle and hard to refactor."
57
+ },
58
+ {
59
+ "path": "src/built-in/UIManager/src/app/examples/FileDrop/example.ts",
60
+ "description": "File drag-and-drop with top:files-dropped — Desktop BIM workflows often rely on dragging files straight from the OS file manager onto the browser window — but wiring a document-level dragenter, dragover, dragleave, and drop handler that correctly tracks nested enter/leave counts, shows a visual overlay, and forwards the files to the right component is tedious boilerplate to repeat for every app."
61
+ },
62
+ {
63
+ "path": "src/built-in/UIManager/src/app/examples/FloatingLayout/example.ts",
64
+ "description": "Floating layout — Developers building BIM coordination tools often want the 3D model to fill the entire window while control panels float above it — but standard grid layouts give every area equal standing, shrinking the viewer into one cell and leaving visible seams between it and the panels."
65
+ },
66
+ {
67
+ "path": "src/built-in/UIManager/src/app/examples/Modal/example.ts",
68
+ "description": "Confirmation modals with top:modal — Destructive or irreversible actions — deleting records, overwriting files, leaving unsaved changes — should ask the user to confirm before proceeding. Opening a custom dialog element from a deeply nested component means threading a reference to a controller up through every layer of the tree."
69
+ },
70
+ {
71
+ "path": "src/built-in/UIManager/src/app/examples/Notifications/example.ts",
72
+ "description": "Toasts and cross-component notifications — Developers building BIM processing UIs need to surface status updates, errors, and async feedback to users from different points in the component tree — but reaching back to the app root to trigger a notification from a deeply nested component requires threading a reference through every layer in between."
73
+ },
74
+ {
75
+ "path": "src/built-in/UIManager/src/app/examples/Sidebar/example.ts",
76
+ "description": "Sidebar navigation — Product teams building BIM apps often need multiple distinct views — a 3D model viewer, a data browser, a settings screen — but wiring a custom nav bar and managing view transitions from scratch adds complexity before any real feature work begins."
77
+ },
78
+ {
79
+ "path": "src/built-in/UIManager/src/clashes-panel/example.ts",
80
+ "description": "clashes-panel — BIM coordinators need a dedicated review environment where they can see all detected clashes, filter by status, navigate to each issue in the 3D viewer, and mark items as resolved — without writing any UI code themselves."
81
+ },
82
+ {
83
+ "path": "src/built-in/UIManager/src/models-list/example.ts",
84
+ "description": "top-models-list — top-models-list is the project files panel: it lists the project's files, uploads new ones, converts IFC to fragments, and loads `.frag` models into the 3D scene. Its loaders are PLUGGABLE — the panel owns the UI and the orchestration (progress, refresh, association), but the HOST decides how each file format is loaded, so you can teach it new formats without forking the built-in."
85
+ }
86
+ ]
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "access": "public"
16
16
  },
17
17
  "private": false,
18
- "version": "0.3.7",
18
+ "version": "0.3.8",
19
19
  "main": "dist/index.cjs.js",
20
20
  "module": "dist/index.es.js",
21
21
  "types": "dist/index.d.ts",
@@ -92,4 +92,4 @@
92
92
  "optional": true
93
93
  }
94
94
  }
95
- }
95
+ }