@thatopen/services 0.1.3 → 0.3.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 (120) hide show
  1. package/README.md +59 -46
  2. package/dist/built-in/index.d.ts +486 -563
  3. package/dist/cli/lib/npmrc.d.ts +28 -0
  4. package/dist/cli/lib/npmrc.test.d.ts +1 -0
  5. package/dist/cli.js +91 -7
  6. package/dist/core/client.d.ts +10 -0
  7. package/dist/index.cjs.js +2 -2
  8. package/dist/index.d.ts +1 -0
  9. package/dist/index.es.js +42 -32
  10. package/dist/types/npm.d.ts +14 -0
  11. package/dist/vite-env.d.ts +1 -1
  12. package/docs/builtin/paths.json +74 -70
  13. package/docs/cli/create.md +28 -28
  14. package/docs/cli/local-server.md +38 -38
  15. package/docs/cli/login.md +32 -32
  16. package/docs/cli/publish.md +31 -31
  17. package/docs/cli/run.md +26 -26
  18. package/docs/cli/serve.md +43 -43
  19. package/docs/cli/swap.md +30 -30
  20. package/package.json +100 -100
  21. package/resources/AGENTS.md +40 -40
  22. package/src/built-in/CDEManager/example.ts +214 -214
  23. package/src/built-in/CDEManager/examples/FileEditing/example.ts +226 -226
  24. package/src/built-in/CDEManager/examples/FileMoves/example.ts +186 -186
  25. package/src/built-in/CDEManager/examples/FileOperations/example.ts +295 -295
  26. package/src/built-in/CDEManager/examples/FileTransfers/example.ts +210 -210
  27. package/src/built-in/CDEManager/examples/FolderManagement/example.ts +230 -230
  28. package/src/built-in/CDEManager/examples/MetadataSchema/example.ts +230 -230
  29. package/src/built-in/CDEManager/examples/MetadataViews/example.ts +166 -166
  30. package/src/built-in/CDEManager/examples/ProjectConfig/example.ts +177 -177
  31. package/src/built-in/UIManager/src/app/example.ts +99 -99
  32. package/src/built-in/UIManager/src/app/examples/AppState/example.ts +142 -142
  33. package/src/built-in/UIManager/src/app/examples/Banner/example.ts +161 -0
  34. package/src/built-in/UIManager/src/app/examples/Contexts/example.ts +125 -125
  35. package/src/built-in/UIManager/src/app/examples/FileDrop/example.ts +126 -0
  36. package/src/built-in/UIManager/src/app/examples/FloatingLayout/example.ts +92 -92
  37. package/src/built-in/UIManager/src/app/examples/Modal/example.ts +165 -0
  38. package/src/built-in/UIManager/src/app/examples/Notifications/example.ts +135 -161
  39. package/src/built-in/UIManager/src/app/examples/Sidebar/example.ts +104 -104
  40. package/src/built-in/index.ts +649 -755
  41. package/src/cli/templates/app/README.md +241 -241
  42. package/src/cli/templates/app/index.html +35 -27
  43. package/src/cli/templates/app/package.json +31 -27
  44. package/src/cli/templates/app/src/app.ts +37 -0
  45. package/src/cli/templates/app/src/assets/tool-placeholder.ts +50 -0
  46. package/src/cli/templates/app/src/bim-components/CloudRunner/index.ts +95 -87
  47. package/src/cli/templates/app/src/bim-components/CloudRunner/src/index.ts +1 -1
  48. package/src/cli/templates/app/src/bim-components/CloudRunner/src/types.ts +5 -5
  49. package/src/cli/templates/app/src/bim-components/index.ts +1 -1
  50. package/src/cli/templates/app/src/globals.ts +1 -0
  51. package/src/cli/templates/app/src/main.ts +340 -56
  52. package/src/cli/templates/app/src/setups/active-tool-hud.ts +69 -0
  53. package/src/cli/templates/app/src/setups/camera-tools.ts +63 -0
  54. package/src/cli/templates/app/src/setups/camera-views.ts +201 -0
  55. package/src/cli/templates/app/src/setups/card-header.ts +35 -0
  56. package/src/cli/templates/app/src/setups/clipper-panel.ts +167 -0
  57. package/src/cli/templates/app/src/setups/clipper-tool.ts +754 -0
  58. package/src/cli/templates/app/src/setups/clipper.ts +75 -0
  59. package/src/cli/templates/app/src/setups/cloud-runner.ts +13 -9
  60. package/src/cli/templates/app/src/setups/commands-panel.ts +239 -0
  61. package/src/cli/templates/app/src/setups/data-table-panel.ts +2224 -0
  62. package/src/cli/templates/app/src/setups/exploded-view.ts +246 -0
  63. package/src/cli/templates/app/src/setups/file-format-icons.ts +95 -0
  64. package/src/cli/templates/app/src/setups/files-panel.ts +1503 -0
  65. package/src/cli/templates/app/src/setups/fps-indicator.ts +63 -0
  66. package/src/cli/templates/app/src/setups/graphics-panel.ts +490 -0
  67. package/src/cli/templates/app/src/setups/helper-panel.ts +88 -0
  68. package/src/cli/templates/app/src/setups/hider.ts +98 -0
  69. package/src/cli/templates/app/src/setups/index.ts +33 -3
  70. package/src/cli/templates/app/src/setups/inspection.ts +136 -0
  71. package/src/cli/templates/app/src/setups/measurement-panel.ts +188 -0
  72. package/src/cli/templates/app/src/setups/measurement-settings-panel.ts +161 -0
  73. package/src/cli/templates/app/src/setups/measurement-tool.ts +570 -0
  74. package/src/cli/templates/app/src/setups/measurements.ts +133 -0
  75. package/src/cli/templates/app/src/setups/model-tree.ts +797 -0
  76. package/src/cli/templates/app/src/setups/navigation-gizmo.ts +316 -0
  77. package/src/cli/templates/app/src/setups/objects-panel.ts +127 -0
  78. package/src/cli/templates/app/src/setups/plans-panel.ts +619 -0
  79. package/src/cli/templates/app/src/setups/properties-panel.ts +1048 -0
  80. package/src/cli/templates/app/src/setups/reality-capture/lib/hidden-tiles-plugin.ts +88 -0
  81. package/src/cli/templates/app/src/setups/reality-capture/lib/point-tile-plugin.ts +166 -0
  82. package/src/cli/templates/app/src/setups/reality-capture/lib/render-frame.ts +31 -0
  83. package/src/cli/templates/app/src/setups/reality-capture/lib/splat-tile-plugin.ts +51 -0
  84. package/src/cli/templates/app/src/setups/reality-capture-viewer.ts +1383 -0
  85. package/src/cli/templates/app/src/setups/right-sidebar.ts +178 -0
  86. package/src/cli/templates/app/src/setups/settings-panel.ts +94 -0
  87. package/src/cli/templates/app/src/setups/styles-panel.ts +110 -0
  88. package/src/cli/templates/app/src/setups/styles.ts +375 -0
  89. package/src/cli/templates/app/src/setups/tool-mode-manager.ts +150 -0
  90. package/src/cli/templates/app/src/setups/tool-mode.ts +23 -0
  91. package/src/cli/templates/app/src/setups/toolbar.ts +229 -0
  92. package/src/cli/templates/app/src/setups/ui-manager.ts +27 -0
  93. package/src/cli/templates/app/src/setups/visibility-toolbar.ts +498 -0
  94. package/src/cli/templates/app/src/setups/walkthrough.ts +528 -0
  95. package/src/cli/templates/app/src/ui-components/app-info-section/index.ts +26 -0
  96. package/src/cli/templates/app/src/ui-components/app-info-section/src/index.ts +1 -0
  97. package/src/cli/templates/app/src/ui-components/app-info-section/src/types.ts +15 -0
  98. package/src/cli/templates/app/src/ui-components/cloud-runner-section/index.ts +37 -0
  99. package/src/cli/templates/app/src/ui-components/cloud-runner-section/src/index.ts +1 -0
  100. package/src/cli/templates/app/src/ui-components/cloud-runner-section/src/types.ts +14 -0
  101. package/src/cli/templates/app/src/ui-components/index.ts +2 -1
  102. package/src/cli/templates/app/tsconfig.json +16 -17
  103. package/src/cli/templates/app/vite.config.js +45 -42
  104. package/src/cli/templates/cloud-component/README.md +205 -205
  105. package/src/cli/templates/cloud-component/_thatopen +5 -5
  106. package/src/cli/templates/cloud-component/declarations.json +4 -4
  107. package/src/cli/templates/cloud-component/package.json +21 -21
  108. package/src/cli/templates/cloud-component/src/main.ts +70 -70
  109. package/src/cli/templates/cloud-component/tsconfig.json +16 -16
  110. package/src/cli/templates/cloud-component/vite.config.js +46 -46
  111. package/src/cli/templates/shared/AGENTS.md +8 -8
  112. package/src/cli/templates/shared/CLAUDE.md +1 -1
  113. package/src/cli/templates/shared/_gitignore +5 -4
  114. package/src/built-in/AppManager/example.ts +0 -86
  115. package/src/built-in/FileList/example.ts +0 -107
  116. package/src/built-in/TabbedNavigation/example.ts +0 -115
  117. package/src/built-in/ViewportsManager/example.ts +0 -106
  118. package/src/cli/templates/app/src/setups/fragments.ts +0 -18
  119. package/src/cli/templates/app/src/setups/ifc-loader.ts +0 -12
  120. package/src/cli/templates/app/src/ui-components/AppPanel/index.ts +0 -160
@@ -1,31 +1,31 @@
1
- ---
2
- description: "Build and upload the project to the platform. Automatically detects app vs cloud component from the local .thatopen config. On first publish, saves the assigned item ID back to .thatopen so subsequent runs update the same item instead of creating a new one."
3
- ---
4
-
5
- ## thatopen publish
6
-
7
- Builds the project and uploads it to the platform. Works for both apps and cloud components — the project type is read from `.thatopen` (`itemType: APP | COMPONENT`).
8
-
9
- First publish creates the item and auto-saves its ID to `.thatopen`. Subsequent publishes update that same item.
10
-
11
- **Usage:**
12
- ```bash
13
- thatopen publish [flags]
14
- ```
15
-
16
- **Flags:**
17
-
18
- - `--name <name>` — Item name on the platform. Defaults to `name` in `package.json`.
19
- - `--version-tag <tag>` — Version tag. Defaults to `version` in `package.json`.
20
- - `--app-id <id>` — Target an existing app by ID (overrides `.thatopen`).
21
- - `--component-id <id>` — Target an existing cloud component by ID (overrides `.thatopen`).
22
- - `--skip-build` — Skip the build step and upload the existing `dist/bundle.js`.
23
- - `--icon <path>` — Path to an icon file (PNG, WebP, or ICO, max 512 KB). Saved to `.thatopen` for future publishes.
24
-
25
- **Examples:**
26
- ```bash
27
- thatopen publish
28
- thatopen publish --version-tag 2.0.0
29
- thatopen publish --skip-build
30
- thatopen publish --icon assets/icon.png
31
- ```
1
+ ---
2
+ description: "Build and upload the project to the platform. Automatically detects app vs cloud component from the local .thatopen config. On first publish, saves the assigned item ID back to .thatopen so subsequent runs update the same item instead of creating a new one."
3
+ ---
4
+
5
+ ## thatopen publish
6
+
7
+ Builds the project and uploads it to the platform. Works for both apps and cloud components — the project type is read from `.thatopen` (`itemType: APP | COMPONENT`).
8
+
9
+ First publish creates the item and auto-saves its ID to `.thatopen`. Subsequent publishes update that same item.
10
+
11
+ **Usage:**
12
+ ```bash
13
+ thatopen publish [flags]
14
+ ```
15
+
16
+ **Flags:**
17
+
18
+ - `--name <name>` — Item name on the platform. Defaults to `name` in `package.json`.
19
+ - `--version-tag <tag>` — Version tag. Defaults to `version` in `package.json`.
20
+ - `--app-id <id>` — Target an existing app by ID (overrides `.thatopen`).
21
+ - `--component-id <id>` — Target an existing cloud component by ID (overrides `.thatopen`).
22
+ - `--skip-build` — Skip the build step and upload the existing `dist/bundle.js`.
23
+ - `--icon <path>` — Path to an icon file (PNG, WebP, or ICO, max 512 KB). Saved to `.thatopen` for future publishes.
24
+
25
+ **Examples:**
26
+ ```bash
27
+ thatopen publish
28
+ thatopen publish --version-tag 2.0.0
29
+ thatopen publish --skip-build
30
+ thatopen publish --icon assets/icon.png
31
+ ```
package/docs/cli/run.md CHANGED
@@ -1,26 +1,26 @@
1
- ---
2
- description: "Build and run a cloud component locally as a child process, mirroring the backend execution environment. Accepts execution parameters as JSON via --params, validates them against declarations.json, and streams progress output to the terminal."
3
- ---
4
-
5
- ## thatopen run
6
-
7
- Builds and executes a cloud component locally, replicating what the platform's cloud engine does. Useful for testing component logic and parameters before publishing.
8
-
9
- Execution output (`MESSAGE`, `PROGRESS`, `SUCCESS`, `FAIL`) is streamed to the terminal with elapsed time.
10
-
11
- **Usage:**
12
- ```bash
13
- thatopen run [flags]
14
- ```
15
-
16
- **Flags:**
17
-
18
- - `--params <json>` — Execution parameters as a JSON string. Default: `'{}'`. Validated against `declarations.json` if present (warns, does not fail).
19
- - `--skip-build` — Skip the build step and run the existing `dist/bundle.js`.
20
-
21
- **Examples:**
22
- ```bash
23
- thatopen run
24
- thatopen run --params '{"fileId": "abc123"}'
25
- thatopen run --skip-build
26
- ```
1
+ ---
2
+ description: "Build and run a cloud component locally as a child process, mirroring the backend execution environment. Accepts execution parameters as JSON via --params, validates them against declarations.json, and streams progress output to the terminal."
3
+ ---
4
+
5
+ ## thatopen run
6
+
7
+ Builds and executes a cloud component locally, replicating what the platform's cloud engine does. Useful for testing component logic and parameters before publishing.
8
+
9
+ Execution output (`MESSAGE`, `PROGRESS`, `SUCCESS`, `FAIL`) is streamed to the terminal with elapsed time.
10
+
11
+ **Usage:**
12
+ ```bash
13
+ thatopen run [flags]
14
+ ```
15
+
16
+ **Flags:**
17
+
18
+ - `--params <json>` — Execution parameters as a JSON string. Default: `'{}'`. Validated against `declarations.json` if present (warns, does not fail).
19
+ - `--skip-build` — Skip the build step and run the existing `dist/bundle.js`.
20
+
21
+ **Examples:**
22
+ ```bash
23
+ thatopen run
24
+ thatopen run --params '{"fileId": "abc123"}'
25
+ thatopen run --skip-build
26
+ ```
package/docs/cli/serve.md CHANGED
@@ -1,43 +1,43 @@
1
- ---
2
- description: "Start a local dev server for a browser app. Uses esbuild in watch mode and serves the IIFE bundle on port 4000 with SSE live reload. To connect: open the project on dev.platform.thatopen.com, click the Local App icon, then Get Started."
3
- ---
4
-
5
- ## thatopen serve
6
-
7
- Builds the app in watch mode and serves the IIFE bundle locally. On every save, esbuild rebuilds and the platform reloads the bundle automatically via SSE.
8
-
9
- Does **not** open a browser tab — the app runs inside the platform iframe. Open your project on the platform, then click the debug button to connect it to the local server.
10
-
11
- **Usage:**
12
- ```bash
13
- thatopen serve [flags]
14
- ```
15
-
16
- **Flags:**
17
-
18
- - `--port <port>` — Port to serve the bundle on. Default: `4000`.
19
-
20
- **Endpoints served:**
21
-
22
- - `GET /bundle.js` — The compiled IIFE bundle.
23
- - `GET /bundle.js.map` — Source map.
24
- - `GET /events` — SSE stream for live reload.
25
-
26
- **Example:**
27
- ```bash
28
- thatopen serve
29
- thatopen serve --port 4321
30
- ```
31
-
32
- **Connecting the platform to your local server:**
33
-
34
- 1. Go to [https://dev.platform.thatopen.com](https://dev.platform.thatopen.com) and open a project (create one first if needed).
35
- 2. In the top right corner, click the **Local App** icon.
36
- 3. Click **Get Started**.
37
-
38
- The platform loads the bundle from port 4000 and renders the app inside the project context, with full access to its models, data, and users. The dev server must be running before opening this URL — if nothing is served on port 4000, the platform will fail to load the app.
39
-
40
- The resulting URL follows this pattern:
41
- ```
42
- https://dev.platform.thatopen.com/dashboard/projects/{projectId}/apps/local-app
43
- ```
1
+ ---
2
+ description: "Start a local dev server for a browser app. Uses esbuild in watch mode and serves the IIFE bundle on port 4000 with SSE live reload. To connect: open the project on dev.platform.thatopen.com, click the Local App icon, then Get Started."
3
+ ---
4
+
5
+ ## thatopen serve
6
+
7
+ Builds the app in watch mode and serves the IIFE bundle locally. On every save, esbuild rebuilds and the platform reloads the bundle automatically via SSE.
8
+
9
+ Does **not** open a browser tab — the app runs inside the platform iframe. Open your project on the platform, then click the debug button to connect it to the local server.
10
+
11
+ **Usage:**
12
+ ```bash
13
+ thatopen serve [flags]
14
+ ```
15
+
16
+ **Flags:**
17
+
18
+ - `--port <port>` — Port to serve the bundle on. Default: `4000`.
19
+
20
+ **Endpoints served:**
21
+
22
+ - `GET /bundle.js` — The compiled IIFE bundle.
23
+ - `GET /bundle.js.map` — Source map.
24
+ - `GET /events` — SSE stream for live reload.
25
+
26
+ **Example:**
27
+ ```bash
28
+ thatopen serve
29
+ thatopen serve --port 4321
30
+ ```
31
+
32
+ **Connecting the platform to your local server:**
33
+
34
+ 1. Go to [https://dev.platform.thatopen.com](https://dev.platform.thatopen.com) and open a project (create one first if needed).
35
+ 2. In the top right corner, click the **Local App** icon.
36
+ 3. Click **Get Started**.
37
+
38
+ The platform loads the bundle from port 4000 and renders the app inside the project context, with full access to its models, data, and users. The dev server must be running before opening this URL — if nothing is served on port 4000, the platform will fail to load the app.
39
+
40
+ The resulting URL follows this pattern:
41
+ ```
42
+ https://dev.platform.thatopen.com/dashboard/projects/{projectId}/apps/local-app
43
+ ```
package/docs/cli/swap.md CHANGED
@@ -1,30 +1,30 @@
1
- ---
2
- description: "Toggle or explicitly set the engine library mode between stable public packages (@thatopen/*) and private beta packages (@thatopen-platform/*-beta). Updates package.json and .thatopen, then runs npm install. Source code never changes — aliases handle resolution."
3
- ---
4
-
5
- ## thatopen swap
6
-
7
- Switches the project between stable and beta engine libraries. Without flags, it toggles from the current state. Updates `package.json` dependencies and sets `beta` in `.thatopen` so `thatopen serve`, `thatopen local-server`, and `vite build` all pick up the change automatically.
8
-
9
- Source code stays unchanged — `@thatopen/components` imports resolve to the correct package via esbuild/vite aliases based on the `beta` flag in `.thatopen`.
10
-
11
- **Usage:**
12
- ```bash
13
- thatopen swap # toggle: stable → beta or beta → stable
14
- thatopen swap --beta # force beta
15
- thatopen swap --stable # force stable
16
- ```
17
-
18
- **Flags:**
19
-
20
- - `--beta` — Switch to beta libraries (`@thatopen-platform/*-beta`).
21
- - `--stable` — Switch back to stable public libraries (`@thatopen/*`).
22
-
23
- **Examples:**
24
- ```bash
25
- thatopen swap
26
- thatopen swap --beta
27
- thatopen swap --stable
28
- ```
29
-
30
- > Beta packages are private and the access must be explicitly granted by That Open Company.
1
+ ---
2
+ description: "Toggle or explicitly set the engine library mode between stable public packages (@thatopen/*) and private beta packages (@thatopen-platform/*-beta). Updates package.json and .thatopen, then runs npm install. Source code never changes — aliases handle resolution."
3
+ ---
4
+
5
+ ## thatopen swap
6
+
7
+ Switches the project between stable and beta engine libraries. Without flags, it toggles from the current state. Updates `package.json` dependencies and sets `beta` in `.thatopen` so `thatopen serve`, `thatopen local-server`, and `vite build` all pick up the change automatically.
8
+
9
+ Source code stays unchanged — `@thatopen/components` imports resolve to the correct package via esbuild/vite aliases based on the `beta` flag in `.thatopen`.
10
+
11
+ **Usage:**
12
+ ```bash
13
+ thatopen swap # toggle: stable → beta or beta → stable
14
+ thatopen swap --beta # force beta
15
+ thatopen swap --stable # force stable
16
+ ```
17
+
18
+ **Flags:**
19
+
20
+ - `--beta` — Switch to beta libraries (`@thatopen-platform/*-beta`).
21
+ - `--stable` — Switch back to stable public libraries (`@thatopen/*`).
22
+
23
+ **Examples:**
24
+ ```bash
25
+ thatopen swap
26
+ thatopen swap --beta
27
+ thatopen swap --stable
28
+ ```
29
+
30
+ > Beta packages are private and the access must be explicitly granted by That Open Company.
package/package.json CHANGED
@@ -1,100 +1,100 @@
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.1.3",
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
- "test:cli-build-app": "npm run build:cli && node test/setup-test-app.mjs",
43
- "test:cli-serve-app": "cd temp/test-app && thatopen serve",
44
- "test:cli-build-component": "npm run build:cli && node test/setup-test-component.mjs",
45
- "test:cli-run-component": "cd temp/test-component && thatopen run --skip-build",
46
- "test:cli-serve-component": "cd temp/test-component && thatopen local-server",
47
- "template:app": "cd src/cli/templates/app && npm install && cd ../../../.. && node scripts/generate-template-tsconfig.mjs",
48
- "template:app:dev": "cd src/cli/templates/app && npm run dev",
49
- "changeset": "changeset",
50
- "version": "changeset version",
51
- "prepublishOnly": "npm run build"
52
- },
53
- "devDependencies": {
54
- "@changesets/cli": "^2.27.7",
55
- "@thatopen/components": "~3.4.0",
56
- "@thatopen/components-front": "~3.4.0",
57
- "@thatopen/fragments": "~3.4.0",
58
- "@thatopen/ui": "~3.4.0",
59
- "@thatopen/ui-obc": "~3.4.0",
60
- "@types/node": "^20.12.12",
61
- "@types/three": "^0.182.0",
62
- "commander": "^14.0.3",
63
- "esbuild": "^0.27.3",
64
- "eslint": "9.x",
65
- "eslint-config-prettier": "^9.1.0",
66
- "eslint-plugin-prettier": "^5.1.3",
67
- "globals": "^15.3.0",
68
- "jszip": "^3.10.1",
69
- "prettier": "^3.2.5",
70
- "three": "^0.182.0",
71
- "tsx": "^4.16.2",
72
- "typescript": "^5.2.2",
73
- "typescript-eslint": "^7.10.0",
74
- "vite": "^5.2.0",
75
- "vite-plugin-dts": "^3.9.1",
76
- "vite-plugin-eslint": "^1.8.1",
77
- "vitest": "^4.1.4"
78
- },
79
- "dependencies": {
80
- "dotenv": "^16.4.5",
81
- "socket.io": "^4.8.0",
82
- "socket.io-client": "^4.8.0"
83
- },
84
- "peerDependencies": {
85
- "@thatopen/components": "~3.4.0",
86
- "@thatopen/ui": "~3.4.0",
87
- "three": "^0.182.0"
88
- },
89
- "peerDependenciesMeta": {
90
- "@thatopen/components": {
91
- "optional": true
92
- },
93
- "@thatopen/ui": {
94
- "optional": true
95
- },
96
- "three": {
97
- "optional": true
98
- }
99
- }
100
- }
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.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
+ "test:cli-build-app": "npm run build:cli && node test/setup-test-app.mjs",
43
+ "test:cli-serve-app": "cd temp/test-app && thatopen serve",
44
+ "test:cli-build-component": "npm run build:cli && node test/setup-test-component.mjs",
45
+ "test:cli-run-component": "cd temp/test-component && thatopen run --skip-build",
46
+ "test:cli-serve-component": "cd temp/test-component && thatopen local-server",
47
+ "template:app": "cd src/cli/templates/app && npm install && cd ../../../.. && node scripts/generate-template-tsconfig.mjs",
48
+ "template:app:dev": "cd src/cli/templates/app && npm run dev",
49
+ "changeset": "changeset",
50
+ "version": "changeset version",
51
+ "prepublishOnly": "npm run build"
52
+ },
53
+ "devDependencies": {
54
+ "@changesets/cli": "^2.27.7",
55
+ "@thatopen/components": "~3.4.0",
56
+ "@thatopen/components-front": "~3.4.0",
57
+ "@thatopen/fragments": "~3.4.0",
58
+ "@thatopen/ui": "~3.4.0",
59
+ "@thatopen/ui-obc": "~3.4.0",
60
+ "@types/node": "^20.12.12",
61
+ "@types/three": "^0.182.0",
62
+ "commander": "^14.0.3",
63
+ "esbuild": "^0.27.3",
64
+ "eslint": "9.x",
65
+ "eslint-config-prettier": "^9.1.0",
66
+ "eslint-plugin-prettier": "^5.1.3",
67
+ "globals": "^15.3.0",
68
+ "jszip": "^3.10.1",
69
+ "prettier": "^3.2.5",
70
+ "three": "^0.182.0",
71
+ "tsx": "^4.16.2",
72
+ "typescript": "^5.2.2",
73
+ "typescript-eslint": "^7.10.0",
74
+ "vite": "^5.2.0",
75
+ "vite-plugin-dts": "^3.9.1",
76
+ "vite-plugin-eslint": "^1.8.1",
77
+ "vitest": "^4.1.4"
78
+ },
79
+ "dependencies": {
80
+ "dotenv": "^16.4.5",
81
+ "socket.io": "^4.8.0",
82
+ "socket.io-client": "^4.8.0"
83
+ },
84
+ "peerDependencies": {
85
+ "@thatopen/components": "~3.4.0",
86
+ "@thatopen/ui": "~3.4.0",
87
+ "three": "^0.182.0"
88
+ },
89
+ "peerDependenciesMeta": {
90
+ "@thatopen/components": {
91
+ "optional": true
92
+ },
93
+ "@thatopen/ui": {
94
+ "optional": true
95
+ },
96
+ "three": {
97
+ "optional": true
98
+ }
99
+ }
100
+ }
@@ -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`.