@thatopen/services 0.3.16 → 0.4.0

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 (74) hide show
  1. package/README.md +62 -62
  2. package/dist/cli.js +4 -1
  3. package/dist/core/client.d.ts +1 -0
  4. package/dist/core/platform-client.d.ts +7 -0
  5. package/dist/index.cjs.js +2 -2
  6. package/dist/index.es.js +382 -370
  7. package/dist/vite-env.d.ts +1 -1
  8. package/docs/ai-quickstart.md +130 -130
  9. package/docs/cli/create.md +29 -29
  10. package/docs/cli/local-server.md +38 -38
  11. package/docs/cli/login.md +32 -32
  12. package/docs/cli/publish.md +31 -31
  13. package/docs/cli/run.md +26 -26
  14. package/docs/cli/serve.md +43 -43
  15. package/docs/cli/swap.md +30 -30
  16. package/docs/cloud/GaussianSplatConverter.md +43 -43
  17. package/docs/cloud/PointCloudConverter.md +53 -53
  18. package/docs/revit-collab-quickstart.md +256 -256
  19. package/package.json +95 -95
  20. package/resources/AGENTS.md +40 -40
  21. package/src/built-in/CDEManager/example.ts +214 -214
  22. package/src/built-in/CDEManager/examples/FileEditing/example.ts +226 -226
  23. package/src/built-in/CDEManager/examples/FileMoves/example.ts +186 -186
  24. package/src/built-in/CDEManager/examples/FileOperations/example.ts +295 -295
  25. package/src/built-in/CDEManager/examples/FileTransfers/example.ts +210 -210
  26. package/src/built-in/CDEManager/examples/FolderManagement/example.ts +230 -230
  27. package/src/built-in/CDEManager/examples/MetadataSchema/example.ts +230 -230
  28. package/src/built-in/CDEManager/examples/MetadataViews/example.ts +166 -166
  29. package/src/built-in/CDEManager/examples/ProjectConfig/example.ts +177 -177
  30. package/src/built-in/ClashesManager/example.ts +283 -283
  31. package/src/built-in/UIManager/src/app/example.ts +97 -97
  32. package/src/built-in/UIManager/src/app/examples/AppState/example.ts +140 -140
  33. package/src/built-in/UIManager/src/app/examples/Banner/example.ts +159 -159
  34. package/src/built-in/UIManager/src/app/examples/Contexts/example.ts +123 -123
  35. package/src/built-in/UIManager/src/app/examples/FileDrop/example.ts +124 -124
  36. package/src/built-in/UIManager/src/app/examples/FloatingLayout/example.ts +90 -90
  37. package/src/built-in/UIManager/src/app/examples/Modal/example.ts +163 -163
  38. package/src/built-in/UIManager/src/app/examples/Notifications/example.ts +133 -133
  39. package/src/built-in/UIManager/src/app/examples/Sidebar/example.ts +102 -102
  40. package/src/cli/templates/app/README.md +217 -217
  41. package/src/cli/templates/app/index.html +35 -35
  42. package/src/cli/templates/app/package.json +32 -32
  43. package/src/cli/templates/app/src/app.ts +37 -37
  44. package/src/cli/templates/app/src/assets/tool-placeholder.ts +50 -50
  45. package/src/cli/templates/app/src/bim-components/CloudRunner/index.ts +95 -95
  46. package/src/cli/templates/app/src/bim-components/CloudRunner/src/index.ts +1 -1
  47. package/src/cli/templates/app/src/bim-components/CloudRunner/src/types.ts +5 -5
  48. package/src/cli/templates/app/src/bim-components/index.ts +1 -1
  49. package/src/cli/templates/app/src/globals.ts +1 -1
  50. package/src/cli/templates/app/src/main.ts +199 -199
  51. package/src/cli/templates/app/src/setups/reality-capture/lib/hidden-tiles-plugin.ts +88 -88
  52. package/src/cli/templates/app/src/setups/reality-capture/lib/point-tile-plugin.ts +166 -166
  53. package/src/cli/templates/app/src/setups/reality-capture/lib/render-frame.ts +31 -31
  54. package/src/cli/templates/app/src/setups/reality-capture/lib/splat-tile-plugin.ts +51 -51
  55. package/src/cli/templates/app/src/setups/reality-capture-viewer.ts +1383 -1383
  56. package/src/cli/templates/app/src/ui-components/app-info-section/index.ts +26 -26
  57. package/src/cli/templates/app/src/ui-components/app-info-section/src/index.ts +1 -1
  58. package/src/cli/templates/app/src/ui-components/app-info-section/src/types.ts +15 -15
  59. package/src/cli/templates/app/src/ui-components/cloud-runner-section/index.ts +37 -37
  60. package/src/cli/templates/app/src/ui-components/cloud-runner-section/src/index.ts +1 -1
  61. package/src/cli/templates/app/src/ui-components/cloud-runner-section/src/types.ts +14 -14
  62. package/src/cli/templates/app/src/ui-components/index.ts +2 -2
  63. package/src/cli/templates/app/tsconfig.json +16 -16
  64. package/src/cli/templates/app/vite.config.js +57 -57
  65. package/src/cli/templates/cloud-component/README.md +205 -205
  66. package/src/cli/templates/cloud-component/_thatopen +5 -5
  67. package/src/cli/templates/cloud-component/declarations.json +4 -4
  68. package/src/cli/templates/cloud-component/package.json +21 -21
  69. package/src/cli/templates/cloud-component/src/main.ts +70 -70
  70. package/src/cli/templates/cloud-component/tsconfig.json +16 -16
  71. package/src/cli/templates/cloud-component/vite.config.js +46 -46
  72. package/src/cli/templates/shared/AGENTS.md +8 -8
  73. package/src/cli/templates/shared/CLAUDE.md +1 -1
  74. package/src/cli/templates/shared/_gitignore +5 -5
package/package.json CHANGED
@@ -1,95 +1,95 @@
1
- {
2
- "name": "@thatopen/services",
3
- "description": "Client library and CLI for building BIM apps and cloud components on the That Open Platform",
4
- "author": "That Open Company",
5
- "license": "MIT",
6
- "homepage": "https://github.com/ThatOpen/engine_services#readme",
7
- "bugs": {
8
- "url": "https://github.com/ThatOpen/engine_services/issues"
9
- },
10
- "repository": {
11
- "type": "git",
12
- "url": "git+https://github.com/ThatOpen/engine_services.git"
13
- },
14
- "publishConfig": {
15
- "access": "public"
16
- },
17
- "private": false,
18
- "version": "0.3.16",
19
- "main": "dist/index.cjs.js",
20
- "module": "dist/index.es.js",
21
- "types": "dist/index.d.ts",
22
- "bin": {
23
- "thatopen": "dist/cli.js"
24
- },
25
- "files": [
26
- "dist",
27
- "src/cli/templates",
28
- "src/built-in",
29
- "docs",
30
- "resources"
31
- ],
32
- "scripts": {
33
- "dev": "vite",
34
- "lint": "eslint src/",
35
- "build": "eslint src/ && tsc && vite build && vite build --config vite.config.cli.mts && node scripts/generate-cli-docs-paths.mjs && node scripts/generate-client-examples-paths.mjs",
36
- "build:lib": "tsc && vite build",
37
- "test": "vitest run",
38
- "test:watch": "vitest",
39
- "build:cli": "vite build --config vite.config.cli.mts",
40
- "preview": "vite preview",
41
- "test:ui": "vite --config test/vite.config.mts",
42
- "template:app": "cd src/cli/templates/app && npm install && cd ../../../.. && node scripts/generate-template-tsconfig.mjs",
43
- "template:app:dev": "cd src/cli/templates/app && npm run dev",
44
- "changeset": "changeset",
45
- "version": "changeset version",
46
- "prepublishOnly": "npm run build"
47
- },
48
- "devDependencies": {
49
- "@changesets/cli": "^2.27.7",
50
- "@thatopen/components": "~3.4.0",
51
- "@thatopen/components-front": "~3.4.0",
52
- "@thatopen/fragments": "~3.4.0",
53
- "@thatopen/ui": "~3.4.0",
54
- "@thatopen/ui-obc": "~3.4.0",
55
- "@types/node": "^20.12.12",
56
- "@types/three": "^0.182.0",
57
- "commander": "^14.0.3",
58
- "esbuild": "^0.27.3",
59
- "eslint": "9.x",
60
- "eslint-config-prettier": "^9.1.0",
61
- "eslint-plugin-prettier": "^5.1.3",
62
- "globals": "^15.3.0",
63
- "jszip": "^3.10.1",
64
- "prettier": "^3.2.5",
65
- "three": ">=0.182.0",
66
- "tsx": "^4.16.2",
67
- "typescript": "^5.2.2",
68
- "typescript-eslint": "^7.10.0",
69
- "vite": "^5.2.0",
70
- "vite-plugin-dts": "^3.9.1",
71
- "vite-plugin-eslint": "^1.8.1",
72
- "vitest": "^4.1.4"
73
- },
74
- "dependencies": {
75
- "dotenv": "^16.4.5",
76
- "socket.io": "^4.8.0",
77
- "socket.io-client": "^4.8.0"
78
- },
79
- "peerDependencies": {
80
- "@thatopen/components": "~3.4.0",
81
- "@thatopen/ui": "~3.4.0",
82
- "three": ">=0.182.0"
83
- },
84
- "peerDependenciesMeta": {
85
- "@thatopen/components": {
86
- "optional": true
87
- },
88
- "@thatopen/ui": {
89
- "optional": true
90
- },
91
- "three": {
92
- "optional": true
93
- }
94
- }
95
- }
1
+ {
2
+ "name": "@thatopen/services",
3
+ "description": "Client library and CLI for building BIM apps and cloud components on the That Open Platform",
4
+ "author": "That Open Company",
5
+ "license": "MIT",
6
+ "homepage": "https://github.com/ThatOpen/platform_services#readme",
7
+ "bugs": {
8
+ "url": "https://github.com/ThatOpen/platform_services/issues"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/ThatOpen/platform_services.git"
13
+ },
14
+ "publishConfig": {
15
+ "access": "public"
16
+ },
17
+ "private": false,
18
+ "version": "0.4.0",
19
+ "main": "dist/index.cjs.js",
20
+ "module": "dist/index.es.js",
21
+ "types": "dist/index.d.ts",
22
+ "bin": {
23
+ "thatopen": "dist/cli.js"
24
+ },
25
+ "files": [
26
+ "dist",
27
+ "src/cli/templates",
28
+ "src/built-in",
29
+ "docs",
30
+ "resources"
31
+ ],
32
+ "scripts": {
33
+ "dev": "vite",
34
+ "lint": "eslint src/",
35
+ "build": "eslint src/ && tsc && vite build && vite build --config vite.config.cli.mts && node scripts/generate-cli-docs-paths.mjs && node scripts/generate-client-examples-paths.mjs",
36
+ "build:lib": "tsc && vite build",
37
+ "test": "vitest run",
38
+ "test:watch": "vitest",
39
+ "build:cli": "vite build --config vite.config.cli.mts",
40
+ "preview": "vite preview",
41
+ "test:ui": "vite --config test/vite.config.mts",
42
+ "template:app": "cd src/cli/templates/app && npm install && cd ../../../.. && node scripts/generate-template-tsconfig.mjs",
43
+ "template:app:dev": "cd src/cli/templates/app && npm run dev",
44
+ "changeset": "changeset",
45
+ "version": "changeset version",
46
+ "prepublishOnly": "npm run build"
47
+ },
48
+ "devDependencies": {
49
+ "@changesets/cli": "^2.27.7",
50
+ "@thatopen/components": "~3.4.0",
51
+ "@thatopen/components-front": "~3.4.0",
52
+ "@thatopen/fragments": "~3.4.0",
53
+ "@thatopen/ui": "~3.4.0",
54
+ "@thatopen/ui-obc": "~3.4.0",
55
+ "@types/node": "^20.12.12",
56
+ "@types/three": "^0.182.0",
57
+ "commander": "^14.0.3",
58
+ "esbuild": "^0.27.3",
59
+ "eslint": "9.x",
60
+ "eslint-config-prettier": "^9.1.0",
61
+ "eslint-plugin-prettier": "^5.1.3",
62
+ "globals": "^15.3.0",
63
+ "jszip": "^3.10.1",
64
+ "prettier": "^3.2.5",
65
+ "three": ">=0.182.0",
66
+ "tsx": "^4.16.2",
67
+ "typescript": "^5.2.2",
68
+ "typescript-eslint": "^7.10.0",
69
+ "vite": "^5.2.0",
70
+ "vite-plugin-dts": "^3.9.1",
71
+ "vite-plugin-eslint": "^1.8.1",
72
+ "vitest": "^4.1.4"
73
+ },
74
+ "dependencies": {
75
+ "dotenv": "^16.4.5",
76
+ "socket.io": "^4.8.0",
77
+ "socket.io-client": "^4.8.0"
78
+ },
79
+ "peerDependencies": {
80
+ "@thatopen/components": "~3.4.0",
81
+ "@thatopen/ui": "~3.4.0",
82
+ "three": ">=0.182.0"
83
+ },
84
+ "peerDependenciesMeta": {
85
+ "@thatopen/components": {
86
+ "optional": true
87
+ },
88
+ "@thatopen/ui": {
89
+ "optional": true
90
+ },
91
+ "three": {
92
+ "optional": true
93
+ }
94
+ }
95
+ }
@@ -1,41 +1,41 @@
1
- # Building on the That Open Platform — Agent Guide
2
-
3
- You are an AI assistant helping a user build a **BIM app** or **cloud component** on the
4
- That Open Platform using **`@thatopen/services`** (the `thatopen` CLI + client library).
5
-
6
- **Read this file first, then immediately load all indexes listed below before doing anything else.**
7
-
8
- > This guide is tool-agnostic: it works with any AI (Claude, Codex, your own). All local docs it
9
- > references ship inside the `@thatopen/services` package under `docs/`.
10
-
11
- ---
12
-
13
- ## Session start — load all indexes in parallel
14
-
15
- Do this before answering any question or writing any code. These are compact description indexes:
16
-
17
- | What | Where |
18
- |---|---|
19
- | Platform built-ins | `node_modules/@thatopen/services/docs/builtin/paths.json` |
20
- | Platform client API | `node_modules/@thatopen/services/docs/client/paths.json` |
21
- | CLI commands | `node_modules/@thatopen/services/docs/cli/paths.json` |
22
- | Engine components (`OBC`, `OBF`) | `https://raw.githubusercontent.com/ThatOpen/engine_components/refs/heads/main/examples/paths.json` |
23
- | Fragments (`FRAGS`) | `https://raw.githubusercontent.com/ThatOpen/engine_fragment/refs/heads/main/examples/paths.json` |
24
- | UI components (`BUI`) | `https://raw.githubusercontent.com/ThatOpen/engine_ui-components/refs/heads/main/examples/paths.json` — **skip** entries whose path contains `packages/obc` or `bim-grid` |
25
-
26
- Once you have these, you know everything available on the platform. Only then fetch a specific example file when you need implementation details.
27
-
28
- > **Path resolution:** all `path` entries inside the local indexes (`docs/`, `src/`) are relative to the `@thatopen/services` package root — prepend `node_modules/@thatopen/services/` when reading any of those files.
29
-
30
- ---
31
-
32
- ## How to work
33
-
34
- - **The scaffold is already a complete, working viewer** (model loading, spatial tree, properties).
35
- **Run it first** (`npm run dev`) to see it work, *then* extend it — don't rebuild a viewer from scratch.
36
- - **Propose a short plan and get the user's OK** before changing files. If scope is unclear, ask.
37
- - If something already exists in the indexes, use it — don't reimplement it.
38
-
39
- ## Hard rules (always apply)
40
-
1
+ # Building on the That Open Platform — Agent Guide
2
+
3
+ You are an AI assistant helping a user build a **BIM app** or **cloud component** on the
4
+ That Open Platform using **`@thatopen/services`** (the `thatopen` CLI + client library).
5
+
6
+ **Read this file first, then immediately load all indexes listed below before doing anything else.**
7
+
8
+ > This guide is tool-agnostic: it works with any AI (Claude, Codex, your own). All local docs it
9
+ > references ship inside the `@thatopen/services` package under `docs/`.
10
+
11
+ ---
12
+
13
+ ## Session start — load all indexes in parallel
14
+
15
+ Do this before answering any question or writing any code. These are compact description indexes:
16
+
17
+ | What | Where |
18
+ |---|---|
19
+ | Platform built-ins | `node_modules/@thatopen/services/docs/builtin/paths.json` |
20
+ | Platform client API | `node_modules/@thatopen/services/docs/client/paths.json` |
21
+ | CLI commands | `node_modules/@thatopen/services/docs/cli/paths.json` |
22
+ | Engine components (`OBC`, `OBF`) | `https://raw.githubusercontent.com/ThatOpen/engine_components/refs/heads/main/examples/paths.json` |
23
+ | Fragments (`FRAGS`) | `https://raw.githubusercontent.com/ThatOpen/engine_fragment/refs/heads/main/examples/paths.json` |
24
+ | UI components (`BUI`) | `https://raw.githubusercontent.com/ThatOpen/engine_ui-components/refs/heads/main/examples/paths.json` — **skip** entries whose path contains `packages/obc` or `bim-grid` |
25
+
26
+ Once you have these, you know everything available on the platform. Only then fetch a specific example file when you need implementation details.
27
+
28
+ > **Path resolution:** all `path` entries inside the local indexes (`docs/`, `src/`) are relative to the `@thatopen/services` package root — prepend `node_modules/@thatopen/services/` when reading any of those files.
29
+
30
+ ---
31
+
32
+ ## How to work
33
+
34
+ - **The scaffold is already a complete, working viewer** (model loading, spatial tree, properties).
35
+ **Run it first** (`npm run dev`) to see it work, *then* extend it — don't rebuild a viewer from scratch.
36
+ - **Propose a short plan and get the user's OK** before changing files. If scope is unclear, ask.
37
+ - If something already exists in the indexes, use it — don't reimplement it.
38
+
39
+ ## Hard rules (always apply)
40
+
41
41
  1. **All UI must be built with Lit**, using the web components from `@thatopen/ui` (`BUI`) — `bim-button`, `bim-panel`, `bim-panel-section`, `bim-toolbar`, `bim-dropdown`, `bim-input`, and the rest of `packages/core`. Always consult the design system before writing any UI: `https://raw.githubusercontent.com/ThatOpen/engine_ui-components/refs/heads/main/DESIGN.md`.