@realitycollective/iwsdk-uiextensions 0.1.0-preview.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 (46) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/Examples/README.md +13 -0
  3. package/Examples/basic-window/main.ts +31 -0
  4. package/Examples/basic-window/window.uikitml +59 -0
  5. package/Examples/controls/controls.uikitml +50 -0
  6. package/Examples/controls/main.ts +44 -0
  7. package/Examples/dock-regions/main.ts +55 -0
  8. package/LICENSE +21 -0
  9. package/README.md +117 -0
  10. package/dist/components.d.ts +189 -0
  11. package/dist/components.js +97 -0
  12. package/dist/components.js.map +1 -0
  13. package/dist/factory.d.ts +55 -0
  14. package/dist/factory.js +63 -0
  15. package/dist/factory.js.map +1 -0
  16. package/dist/index.d.ts +24 -0
  17. package/dist/index.js +27 -0
  18. package/dist/index.js.map +1 -0
  19. package/dist/manager-registry.d.ts +8 -0
  20. package/dist/manager-registry.js +11 -0
  21. package/dist/manager-registry.js.map +1 -0
  22. package/dist/region-registry-store.d.ts +7 -0
  23. package/dist/region-registry-store.js +11 -0
  24. package/dist/region-registry-store.js.map +1 -0
  25. package/dist/register.d.ts +19 -0
  26. package/dist/register.js +20 -0
  27. package/dist/register.js.map +1 -0
  28. package/dist/scene-host.d.ts +23 -0
  29. package/dist/scene-host.js +145 -0
  30. package/dist/scene-host.js.map +1 -0
  31. package/dist/systems/controls-system.d.ts +24 -0
  32. package/dist/systems/controls-system.js +24 -0
  33. package/dist/systems/controls-system.js.map +1 -0
  34. package/dist/systems/dock-region-system.d.ts +230 -0
  35. package/dist/systems/dock-region-system.js +102 -0
  36. package/dist/systems/dock-region-system.js.map +1 -0
  37. package/dist/systems/dock-system.d.ts +205 -0
  38. package/dist/systems/dock-system.js +135 -0
  39. package/dist/systems/dock-system.js.map +1 -0
  40. package/dist/systems/drag-system.d.ts +280 -0
  41. package/dist/systems/drag-system.js +167 -0
  42. package/dist/systems/drag-system.js.map +1 -0
  43. package/dist/systems/window-system.d.ts +455 -0
  44. package/dist/systems/window-system.js +244 -0
  45. package/dist/systems/window-system.js.map +1 -0
  46. package/package.json +65 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,17 @@
1
+ # Changelog
2
+
3
+ Change log for the Reality Collective WebXR UI Extensions packages. All four packages are versioned and released together; the version below is the one carried by the `v<version>` release tag.
4
+
5
+ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Preview builds are not listed separately. The entry for a version accumulates while its previews are published, and is dated when that version is released.
6
+
7
+ ## [0.1.0]
8
+
9
+ ### Added
10
+
11
+ - `@realitycollective/webxr-uiextensions` - engine-free core: window manager, dock state and regions, drag maths, hold-to-drag, control models (stepper/toggle/expandable/log), the `SceneDescriptor` scene format, window chrome conventions and the platform-adapter contract.
12
+ - `@realitycollective/iwsdk-uiextensions` - Meta IWSDK adapter binding the core onto IWSDK's ECS, UIKitML and interaction systems, with shipped examples.
13
+ - `@realitycollective/xrblocks-uiextensions` - EXPERIMENTAL Google XR Blocks / plain three.js adapter: panel document, window host, follow and scale maths, desktop controls and locomotion, pointer forwarding.
14
+ - `@realitycollective/uix-devtools` - dev-only tooling: edit-session launch gate, runtime UIKitML compilation, and the `uix-dev` CLI (Cloudflare quick tunnel, QR onboarding, environment doctor).
15
+ - Demo clients: the IWSDK showcase, the devtools playground, and the multiplatform lab that picks its pipeline from the hardware.
16
+
17
+ [0.1.0]: https://github.com/realitycollective/WebXR-UIExtensions/commits/main
@@ -0,0 +1,13 @@
1
+ # Examples
2
+
3
+ Copy-paste starting points, shipped inside the npm package (Unity-style `Examples/` convention, as used across Reality Collective packages).
4
+
5
+ | Example | Shows |
6
+ | --- | --- |
7
+ | [`basic-window/`](./basic-window) | A managed window with chrome, pin/minimize/close and body-follow |
8
+ | [`dock-regions/`](./dock-regions) | Layout regions, drop-to-dock, a follow-region "toolbar" |
9
+ | [`controls/`](./controls) | `data-uix` stepper, toggle, expandable label and log view |
10
+
11
+ Each example assumes an IWSDK app created with `npm create @iwsdk@latest` (so the UIKitML Vite plugin is already wired: `.uikitml` files in `ui/` compile to `public/ui/*.json`).
12
+
13
+ For a complete integrated application - five windows, two regions, a registration form, event log, and horizon-kit Slider - see the `showcase/` client in the repository, which deploys to Cloudflare Pages from CI.
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Basic window - chrome, focus, docking and drag with one call.
3
+ * Put window.uikitml in your app's ui/ folder (compiles to /ui/window.json).
4
+ */
5
+ import { World } from '@iwsdk/core';
6
+ import {
7
+ DockMode,
8
+ createUIWindow,
9
+ registerUIExtensions,
10
+ } from '@realitycollective/iwsdk-uiextensions';
11
+
12
+ export async function start(container: HTMLDivElement) {
13
+ const world = await World.create(container, {
14
+ features: { spatialUI: true },
15
+ });
16
+
17
+ const windows = registerUIExtensions(world);
18
+
19
+ createUIWindow(world, {
20
+ id: 'hello',
21
+ title: 'Hello Window',
22
+ config: './ui/window.json',
23
+ dockMode: DockMode.BodyFollow, // follows until pinned or dragged
24
+ followOffset: [0, -0.15, -1.2],
25
+ });
26
+
27
+ windows.events.on('dockChanged', ({ window, previous }) => {
28
+ console.log(`[uix] ${window.title}: ${previous} → ${window.dockMode}`);
29
+ });
30
+ windows.events.on('closed', (w) => console.log(`[uix] ${w.title} closed`));
31
+ }
@@ -0,0 +1,59 @@
1
+ <style>
2
+ .uix-window {
3
+ display: flex;
4
+ flex-direction: column;
5
+ width: 300;
6
+ background-color: #101a26;
7
+ background-opacity: 0.92;
8
+ border-radius: 12.5;
9
+ border-color: #2e4a66;
10
+ border-width: 0.75;
11
+ }
12
+ .uix-titlebar {
13
+ display: flex;
14
+ flex-direction: row;
15
+ align-items: center;
16
+ justify-content: space-between;
17
+ width: 100%;
18
+ padding: 8;
19
+ background-color: #1b2c40;
20
+ border-top-left-radius: 12.5;
21
+ border-top-right-radius: 12.5;
22
+ cursor: pointer;
23
+ }
24
+ .uix-title { flex-shrink: 1; font-size: 12; font-weight: bold; color: #dce9f7; }
25
+ .uix-titlebar-buttons { display: flex; flex-direction: row; flex-shrink: 0; }
26
+ .uix-titlebar-button {
27
+ width: 34;
28
+ height: 20;
29
+ align-items: center;
30
+ justify-content: center;
31
+ text-align: center;
32
+ margin-left: 4;
33
+ font-size: 9;
34
+ color: #9fb8d4;
35
+ background-color: #223850;
36
+ border-radius: 6;
37
+ cursor: pointer;
38
+ }
39
+ .uix-titlebar-button:hover { background-color: #33547a; color: #ffffff; }
40
+ .uix-content { display: flex; flex-direction: column; width: 100%; padding: 10; }
41
+ .body-text { font-size: 11; color: #c4d6ea; }
42
+ </style>
43
+ <div id="uix-window" class="uix-window">
44
+ <div id="uix-titlebar" class="uix-titlebar">
45
+ <span id="uix-title" class="uix-title">.</span>
46
+ <div class="uix-titlebar-buttons">
47
+ <div id="uix-pin" class="uix-titlebar-button">PIN</div>
48
+ <div id="uix-dock" class="uix-titlebar-button">DOCK</div>
49
+ <div id="uix-minimize" class="uix-titlebar-button">MIN</div>
50
+ <div id="uix-close" class="uix-titlebar-button">X</div>
51
+ </div>
52
+ </div>
53
+ <div id="uix-content" class="uix-content">
54
+ <span class="body-text">
55
+ Drag my title bar to move me. PIN toggles between following you and
56
+ staying put. MIN collapses me to the title bar.
57
+ </span>
58
+ </div>
59
+ </div>
@@ -0,0 +1,50 @@
1
+ <style>
2
+ .panel {
3
+ display: flex;
4
+ flex-direction: column;
5
+ width: 300;
6
+ padding: 10;
7
+ background-color: #101a26;
8
+ background-opacity: 0.92;
9
+ border-radius: 12.5;
10
+ }
11
+ .row { display: flex; flex-direction: row; align-items: center; justify-content: space-between; width: 100%; margin-top: 7; }
12
+ .label { font-size: 11; color: #9fb8d4; }
13
+ .stepper { display: flex; flex-direction: row; align-items: center; }
14
+ .stepper-button { padding: 4; font-size: 13; color: #eaf6ff; background-color: #2c4a6b; border-radius: 6; cursor: pointer; }
15
+ .stepper-value { font-size: 13; color: #ffffff; margin-left: 7; margin-right: 7; }
16
+ .toggle { padding: 5.5; border-radius: 7; cursor: pointer; }
17
+ .toggle-label { font-size: 11; font-weight: bold; color: #ffffff; }
18
+ .long { display: flex; flex-direction: column; width: 100%; margin-top: 8; }
19
+ .long-text { font-size: 9.5; color: #c4d6ea; }
20
+ .long-toggle { margin-top: 3; font-size: 9.5; color: #6fb4ff; cursor: pointer; }
21
+ .log { display: flex; flex-direction: column; width: 100%; margin-top: 8; }
22
+ .log-line { font-size: 9; color: #9fe0a8; margin-top: 2; }
23
+ </style>
24
+ <div class="panel">
25
+ <div class="row">
26
+ <span class="label">Volume</span>
27
+ <div data-uix="stepper" data-uix-id="volume" data-uix-min="0" data-uix-max="10" class="stepper">
28
+ <div data-uix-role="decrement" class="stepper-button">-</div>
29
+ <span data-uix-role="value" class="stepper-value">.</span>
30
+ <div data-uix-role="increment" class="stepper-button">+</div>
31
+ </div>
32
+ </div>
33
+ <div class="row">
34
+ <span class="label">Music</span>
35
+ <div data-uix="toggle" data-uix-id="music" data-uix-on-color="#1f6d3d" data-uix-off-color="#5a3037" class="toggle">
36
+ <span data-uix-role="label" class="toggle-label">.</span>
37
+ </div>
38
+ </div>
39
+ <div data-uix="expandable-label" data-uix-id="details" data-uix-lines="2" data-uix-chars-per-line="40"
40
+ data-uix-text="Long descriptive text collapses to two lines with an ellipsis, and the more/less affordance expands it in place - no scrolling, no clipping."
41
+ class="long">
42
+ <span data-uix-role="text" class="long-text">.</span>
43
+ <div data-uix-role="toggle" class="long-toggle">more</div>
44
+ </div>
45
+ <div data-uix="log-view" data-uix-id="log" class="log">
46
+ <span data-uix-role="line" class="log-line">.</span>
47
+ <span data-uix-role="line" class="log-line">.</span>
48
+ <span data-uix-role="line" class="log-line">.</span>
49
+ </div>
50
+ </div>
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Controls - data-uix markup upgrades on any IWSDK panel.
3
+ *
4
+ * The controls work in plain panels too (no window required): the
5
+ * UIControlsSystem upgrades every loaded PanelDocument.
6
+ */
7
+ import { PanelDocument, PanelUI, UIKitDocument, World, createSystem, eq } from '@iwsdk/core';
8
+ import {
9
+ registerUIExtensions,
10
+ upgradePanel,
11
+ type UixElement,
12
+ } from '@realitycollective/iwsdk-uiextensions';
13
+
14
+ export async function start(container: HTMLDivElement) {
15
+ const world = await World.create(container, {
16
+ features: { spatialUI: true },
17
+ });
18
+ registerUIExtensions(world);
19
+
20
+ const panel = world
21
+ .createTransformEntity()
22
+ .addComponent(PanelUI, { config: './ui/controls.json', maxWidth: 0.8, maxHeight: 1 });
23
+ panel.object3D!.position.set(0, 1.5, -1.2);
24
+
25
+ // Wire the handles once the panel loads.
26
+ class WireSystem extends createSystem({
27
+ panel: {
28
+ required: [PanelUI, PanelDocument],
29
+ where: [eq(PanelUI, 'config', './ui/controls.json')],
30
+ },
31
+ }) {
32
+ override init(): void {
33
+ this.queries.panel.subscribe('qualify', (entity) => {
34
+ const document = PanelDocument.data.document[entity.index] as UIKitDocument;
35
+ // upgradePanel is idempotent - safe regardless of system order.
36
+ const controls = upgradePanel(document, document.rootElement as unknown as UixElement);
37
+ const log = controls.logView('log');
38
+ controls.stepper('volume').events.on('change', (v) => log.push(`volume ${v}`));
39
+ controls.toggle('music').events.on('change', (on) => log.push(`music ${on ? 'on' : 'off'}`));
40
+ });
41
+ }
42
+ }
43
+ world.registerSystem(WireSystem);
44
+ }
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Dock regions - snap windows into named layout regions.
3
+ *
4
+ * A region is an anchor entity with slot layout (row / column / grid).
5
+ * Drop a window inside its snap radius to dock it; drag it out to undock.
6
+ * Regions can follow the player, turning their contents into a toolbar.
7
+ */
8
+ import { World } from '@iwsdk/core';
9
+ import {
10
+ createDockRegion,
11
+ createUIWindow,
12
+ registerUIExtensions,
13
+ } from '@realitycollective/iwsdk-uiextensions';
14
+
15
+ export async function start(container: HTMLDivElement) {
16
+ const world = await World.create(container, {
17
+ features: { spatialUI: true },
18
+ });
19
+ registerUIExtensions(world);
20
+
21
+ // A world-locked column on the wall - drop windows to stack them.
22
+ createDockRegion(world, {
23
+ id: 'wall',
24
+ flow: 'column',
25
+ pitch: 0.6,
26
+ capacity: 3,
27
+ snapRadius: 0.65,
28
+ position: [1.6, 1.9, -1.5],
29
+ });
30
+
31
+ // A row that follows the player - a floating toolbar.
32
+ createDockRegion(world, {
33
+ id: 'toolbar',
34
+ flow: 'row',
35
+ pitch: 0.55,
36
+ follow: true,
37
+ followOffset: [0, -0.7, -1.1],
38
+ });
39
+
40
+ // Spawn a window straight into a region…
41
+ createUIWindow(world, {
42
+ id: 'docked',
43
+ title: 'Docked Window',
44
+ config: './ui/window.json',
45
+ region: 'wall',
46
+ });
47
+
48
+ // …and one free-floating to drag into either region.
49
+ createUIWindow(world, {
50
+ id: 'floating',
51
+ title: 'Drag Me Into A Region',
52
+ config: './ui/window.json',
53
+ position: [0, 1.5, -1.4],
54
+ });
55
+ }
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Reality Collective
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,117 @@
1
+ # @realitycollective/iwsdk-uiextensions
2
+
3
+ Windowing, docking, layout regions and extra controls for [Meta's Immersive Web SDK](https://iwsdk.dev) (`@iwsdk/core`).
4
+
5
+ **This is the Meta IWSDK adapter** - and the reference implementation - for the engine-free [`@realitycollective/webxr-uiextensions`](../webxr-uiextensions/README.md) core, which it re-exports in full: one dependency gets IWSDK apps the whole surface. (A sibling [`@realitycollective/xrblocks-uiextensions`](../xrblocks-uiextensions/README.md) adapter binds the same core to Google XR Blocks, experimentally.)
6
+
7
+ **Reuse, not recreation.** The IWSDK already ships an excellent spatial UI stack - UIKitML markup, `@pmndrs/uikit` rendering, `Follower`/`ScreenSpace` anchoring, grab/ray/poke interaction. This package adds the missing layer above it:
8
+
9
+ | Feature | What you get |
10
+ | --- | --- |
11
+ | **Windows** | Title-bar chrome (pin / minimize / close), focus & z-ordering, a per-world `WindowManager` with typed events |
12
+ | **Dock states** | `world-locked` (place in space) ⇄ `body-follow` (lazy follow) ⇄ `head-locked`, realised with the IWSDK's own `Follower`/`ScreenSpace` |
13
+ | **Manipulation** | Drag windows by the title bar (powered by `@pmndrs/handle`, the same library behind IWSDK grabbing), billboard-while-dragging, drop-to-dock |
14
+ | **Layout regions** | Named regions (row / column / grid slots) windows snap into; regions can themselves follow the player |
15
+ | **Controls** | `data-uix` markup upgrades: **stepper**, **toggle**, **expandable multi-line label**, **log/list view** - plus everything UIKitML already has (buttons, inputs, textareas, images, and the horizon kit's Slider/Checkbox/…) |
16
+
17
+ Everything is authored in plain UIKitML (HTML/CSS-like) - no new markup language, no custom renderer, no wrapper widgets around things the IWSDK already does.
18
+
19
+ ## Install
20
+
21
+ ```bash
22
+ npm install @realitycollective/iwsdk-uiextensions
23
+ # peer: @iwsdk/core >= 0.4
24
+ ```
25
+
26
+ ## Quick start
27
+
28
+ ```ts
29
+ import { World } from '@iwsdk/core';
30
+ import {
31
+ registerUIExtensions,
32
+ createUIWindow,
33
+ createDockRegion,
34
+ DockMode,
35
+ } from '@realitycollective/iwsdk-uiextensions';
36
+
37
+ const world = await World.create(container, {
38
+ features: { spatialUI: true },
39
+ });
40
+
41
+ const windows = registerUIExtensions(world); // registers all systems, returns the WindowManager
42
+
43
+ createDockRegion(world, { id: 'wall', flow: 'column', position: [1.5, 1.8, -1.5] });
44
+
45
+ createUIWindow(world, {
46
+ id: 'status',
47
+ title: 'Player Status',
48
+ config: './ui/status.json', // compiled UIKitML
49
+ dockMode: DockMode.BodyFollow, // follows until the user pins it
50
+ });
51
+
52
+ windows.events.on('closed', (w) => console.log(`${w.title} closed`));
53
+ ```
54
+
55
+ ### Window markup
56
+
57
+ Windows are ordinary UIKitML panels; the chrome is discovered by well-known element ids (only the ids are contractual - restyle freely):
58
+
59
+ ```html
60
+ <div id="uix-window" class="my-window">
61
+ <div id="uix-titlebar" class="my-titlebar"> <!-- drag surface -->
62
+ <span id="uix-title" class="my-title">.</span>
63
+ <div id="uix-pin">PIN</div> <!-- follow ⇄ placed; label auto-syncs to PIN/UNPIN -->
64
+ <div id="uix-dock">DOCK</div> <!-- return to home (spawn region / placement) -->
65
+ <div id="uix-minimize">MIN</div>
66
+ <div id="uix-close">X</div>
67
+ </div>
68
+ <div id="uix-content">
69
+ <!-- window body -->
70
+ </div>
71
+ </div>
72
+ ```
73
+
74
+ > Use `<div>`s (not `<button>`s) for chrome buttons: with a component kit registered, lowercase `<button>` resolves to the kit's Button component, whose intrinsic sizing fights compact title-bar chrome.
75
+
76
+ ### Controls markup
77
+
78
+ Annotate any element with `data-uix` and the `UIControlsSystem` upgrades it - in any panel, not just windows:
79
+
80
+ ```html
81
+ <div data-uix="stepper" data-uix-id="health" data-uix-min="0" data-uix-max="100" data-uix-step="10">
82
+ <button data-uix-role="decrement">-</button>
83
+ <span data-uix-role="value">.</span>
84
+ <button data-uix-role="increment">+</button>
85
+ </div>
86
+ ```
87
+
88
+ ```ts
89
+ import { panelControlsFor } from '@realitycollective/iwsdk-uiextensions';
90
+
91
+ const controls = panelControlsFor(document); // the panel's UIKitDocument
92
+ controls.stepper('health').events.on('change', (hp) => setHealth(hp));
93
+ ```
94
+
95
+ > UIKitML note: every dynamic-text element needs a literal placeholder child (`<span data-uix-role="value">.</span>`) or no Text node is created.
96
+
97
+ ### Interaction model
98
+
99
+ - **Drag** the title bar with the ray (or mouse on desktop) to move a window; it billboards toward you while dragging and settles facing you when released. A press only becomes a drag after `dragDelay` seconds (default 0.3, per-window on `UIWindow`) - shorter presses stay clicks, and the chrome buttons swallow their presses entirely, so PIN/DOCK/MIN/X never fight the drag gesture.
100
+ - **Drop** a window inside a region's snap radius to dock it into the next slot; drag it out again to undock.
101
+ - **Pin** toggles `body-follow` ⇄ `world-locked` ("place in space").
102
+ - Dragging a following window implicitly places it - pin re-attaches it.
103
+
104
+ See `Examples/` (shipped in this package) and the deployable showcase client in the repository for complete, working demonstrations of every feature.
105
+
106
+ ## Headless core
107
+
108
+ All decision logic (window manager, dock state machine, region slot math, drag math, control models) lives in `@realitycollective/webxr-uiextensions` - pure TypeScript with no engine imports, tested at 100% coverage. The ECS systems in this package are thin appliers of that core onto `@iwsdk/core` components.
109
+
110
+ ## Live demos
111
+
112
+ - Showcase: **[webxr-uiextensions.pages.dev](https://webxr-uiextensions.pages.dev)**
113
+ - Multiplatform lab: **[webxr-uix-lab.pages.dev](https://webxr-uix-lab.pages.dev)**
114
+
115
+ ## License
116
+
117
+ MIT © Reality Collective
@@ -0,0 +1,189 @@
1
+ /**
2
+ * ECS components for UI Extensions.
3
+ *
4
+ * These compose with the IWSDK's own components - a window entity typically
5
+ * carries `PanelUI` (the IWSDK loads/renders the panel), `UIWindow` (ours),
6
+ * and the IWSDK interaction tags (`RayInteractable`, `PokeInteractable`).
7
+ * The systems in this package add/remove the IWSDK `Follower` / `ScreenSpace`
8
+ * components to realise dock modes rather than re-implementing them.
9
+ */
10
+ import { Types } from '@iwsdk/core';
11
+ /** Region flow options mirrored as an enum object for the component schema. */
12
+ export declare const RegionFlowType: {
13
+ readonly Row: "row";
14
+ readonly Column: "column";
15
+ readonly Grid: "grid";
16
+ };
17
+ /**
18
+ * Marks a panel entity as a managed window with chrome, focus, docking and
19
+ * drag behaviour. Pair with `PanelUI` whose markup contains the window chrome
20
+ * elements (see `WINDOW_CHROME_IDS` / the Examples folder).
21
+ */
22
+ export declare const UIWindow: import("elics").Component<{
23
+ /** Stable id; auto-generated when empty. */
24
+ windowId: {
25
+ type: Types.String;
26
+ default: string;
27
+ };
28
+ /** Title text written into the `uix-title` element. */
29
+ title: {
30
+ type: Types.String;
31
+ default: string;
32
+ };
33
+ /** Current dock state. */
34
+ dockMode: {
35
+ type: Types.Enum;
36
+ enum: {
37
+ readonly WorldLocked: "world-locked";
38
+ readonly BodyFollow: "body-follow";
39
+ readonly HeadLocked: "head-locked";
40
+ };
41
+ default: "world-locked";
42
+ };
43
+ /** Whether the title bar drags the window. */
44
+ movable: {
45
+ type: Types.Boolean;
46
+ default: true;
47
+ };
48
+ /** Show/enable the close affordance. */
49
+ closable: {
50
+ type: Types.Boolean;
51
+ default: true;
52
+ };
53
+ /** Show/enable the minimize affordance. */
54
+ minimizable: {
55
+ type: Types.Boolean;
56
+ default: true;
57
+ };
58
+ /** Show/enable the pin (body-follow ⇄ world-locked) affordance. */
59
+ pinnable: {
60
+ type: Types.Boolean;
61
+ default: true;
62
+ };
63
+ /** Keep the window yawed toward the viewer while it is being dragged. */
64
+ billboardWhileDragging: {
65
+ type: Types.Boolean;
66
+ default: true;
67
+ };
68
+ /**
69
+ * Seconds a title-bar press must be held before it becomes a drag.
70
+ * Shorter presses stay clicks, so title-bar buttons don't fight the drag.
71
+ */
72
+ dragDelay: {
73
+ type: Types.Float32;
74
+ default: number;
75
+ };
76
+ /** Head-relative offset used in `body-follow` mode (meters). */
77
+ followOffset: {
78
+ type: Types.Vec3;
79
+ default: [number, number, number];
80
+ };
81
+ /** `Follower` lerp speed for body-follow. */
82
+ followSpeed: {
83
+ type: Types.Float32;
84
+ default: number;
85
+ };
86
+ /** `Follower` positional deadzone for body-follow (meters). */
87
+ followTolerance: {
88
+ type: Types.Float32;
89
+ default: number;
90
+ };
91
+ /** Meters the focused window is nudged toward the viewer per focus depth. */
92
+ focusBias: {
93
+ type: Types.Float32;
94
+ default: number;
95
+ };
96
+ /**
97
+ * World size box in meters, applied via `UIKitDocument.setTargetDimensions`
98
+ * once the document loads. IWSDK 0.5 removed `PanelUI.maxWidth/maxHeight`;
99
+ * this is the supported replacement. `0` leaves the document at its
100
+ * intrinsic markup size, scaled only by the entity transform.
101
+ */
102
+ targetWidth: {
103
+ type: Types.Float32;
104
+ default: number;
105
+ };
106
+ targetHeight: {
107
+ type: Types.Float32;
108
+ default: number;
109
+ };
110
+ }>;
111
+ /**
112
+ * Internal bookkeeping the systems keep on window entities - which dock mode
113
+ * has actually been applied to engine components, and whether chrome wiring
114
+ * has run for the current PanelDocument.
115
+ */
116
+ export declare const UIWindowState: import("elics").Component<{
117
+ appliedDockMode: {
118
+ type: Types.String;
119
+ default: string;
120
+ };
121
+ chromeWired: {
122
+ type: Types.Boolean;
123
+ default: false;
124
+ };
125
+ /** "Home" snapshot captured on adoption - the DOCK button returns here. */
126
+ homeDockMode: {
127
+ type: Types.String;
128
+ default: string;
129
+ };
130
+ homeRegion: {
131
+ type: Types.String;
132
+ default: string;
133
+ };
134
+ homePosition: {
135
+ type: Types.Vec3;
136
+ default: [number, number, number];
137
+ };
138
+ homeYaw: {
139
+ type: Types.Float32;
140
+ default: number;
141
+ };
142
+ }>;
143
+ /**
144
+ * A named layout region that docked windows snap to and are laid out within.
145
+ * Place the entity where the region should live (it can itself carry a
146
+ * `Follower` to make a body-locked region).
147
+ */
148
+ export declare const UIDockRegion: import("elics").Component<{
149
+ regionId: {
150
+ type: Types.String;
151
+ default: string;
152
+ };
153
+ flow: {
154
+ type: Types.Enum;
155
+ enum: {
156
+ readonly Row: "row";
157
+ readonly Column: "column";
158
+ readonly Grid: "grid";
159
+ };
160
+ default: "column";
161
+ };
162
+ /** Distance between slot origins (meters). */
163
+ pitch: {
164
+ type: Types.Float32;
165
+ default: number;
166
+ };
167
+ /** Columns per row (grid flow only). */
168
+ columns: {
169
+ type: Types.Float32;
170
+ default: number;
171
+ };
172
+ /** Max docked windows (0 = unlimited). */
173
+ capacity: {
174
+ type: Types.Float32;
175
+ default: number;
176
+ };
177
+ /** Drop-capture radius (meters). */
178
+ snapRadius: {
179
+ type: Types.Float32;
180
+ default: number;
181
+ };
182
+ }>;
183
+ /** Present on a window entity while it is docked into a region. */
184
+ export declare const UIDockedTo: import("elics").Component<{
185
+ regionId: {
186
+ type: Types.String;
187
+ default: string;
188
+ };
189
+ }>;