@astrale-os/shell-react 0.1.0 → 0.2.1
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/application/apps/app-host.d.ts +2 -2
- package/dist/application/apps/app-host.d.ts.map +1 -1
- package/dist/application/apps/app-host.js +3 -3
- package/dist/application/apps/apps.hook.d.ts +1 -1
- package/dist/application/apps/apps.hook.d.ts.map +1 -1
- package/dist/application/apps/apps.hook.js +4 -4
- package/dist/application/apps/open-app.hook.d.ts +1 -1
- package/dist/application/apps/open-app.hook.d.ts.map +1 -1
- package/dist/application/apps/open-app.hook.js +3 -3
- package/dist/application/index.d.ts +16 -16
- package/dist/application/index.d.ts.map +1 -1
- package/dist/application/index.js +9 -9
- package/dist/application/roles.hook.d.ts +1 -1
- package/dist/application/roles.hook.d.ts.map +1 -1
- package/dist/application/roles.hook.js +3 -3
- package/dist/application/spaces/current-space.hook.d.ts +1 -1
- package/dist/application/spaces/current-space.hook.d.ts.map +1 -1
- package/dist/application/spaces/current-space.hook.js +3 -3
- package/dist/application/spaces/space.hook.d.ts +1 -1
- package/dist/application/spaces/space.hook.d.ts.map +1 -1
- package/dist/application/spaces/space.hook.js +4 -4
- package/dist/application/spaces/spaces.hook.d.ts +2 -2
- package/dist/application/spaces/spaces.hook.d.ts.map +1 -1
- package/dist/application/spaces/spaces.hook.js +5 -5
- package/dist/application/user/user.hook.js +2 -2
- package/dist/auth/act-as.context.d.ts +1 -1
- package/dist/auth/act-as.context.d.ts.map +1 -1
- package/dist/auth/act-as.context.js +1 -1
- package/dist/auth/auth.hook.js +2 -2
- package/dist/auth/can.hook.d.ts +1 -1
- package/dist/auth/can.hook.d.ts.map +1 -1
- package/dist/auth/can.hook.js +2 -2
- package/dist/auth/index.d.ts +5 -5
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +4 -4
- package/dist/auth/self.hook.d.ts +1 -1
- package/dist/auth/self.hook.d.ts.map +1 -1
- package/dist/auth/self.hook.js +1 -1
- package/dist/auth/session-kernel.d.ts +1 -1
- package/dist/auth/session-kernel.d.ts.map +1 -1
- package/dist/auth/session-kernel.js +2 -2
- package/dist/graph/async.d.ts +1 -1
- package/dist/graph/async.d.ts.map +1 -1
- package/dist/graph/call/call.hook.d.ts +1 -1
- package/dist/graph/call/call.hook.d.ts.map +1 -1
- package/dist/graph/call/call.hook.js +2 -2
- package/dist/graph/call/stream.hook.js +1 -1
- package/dist/graph/index.d.ts +18 -18
- package/dist/graph/index.d.ts.map +1 -1
- package/dist/graph/index.js +8 -8
- package/dist/graph/memory/read/idle.d.ts +1 -1
- package/dist/graph/memory/read/idle.d.ts.map +1 -1
- package/dist/graph/memory/read/read.d.ts +1 -1
- package/dist/graph/memory/read/read.d.ts.map +1 -1
- package/dist/graph/memory/read/read.js +3 -3
- package/dist/graph/memory/scope.js +3 -3
- package/dist/graph/mutate/move.hook.d.ts +2 -2
- package/dist/graph/mutate/move.hook.d.ts.map +1 -1
- package/dist/graph/mutate/move.hook.js +3 -3
- package/dist/graph/mutate/mutate.hook.d.ts +1 -1
- package/dist/graph/mutate/mutate.hook.d.ts.map +1 -1
- package/dist/graph/mutate/mutate.hook.js +2 -2
- package/dist/graph/query/children.hook.d.ts +2 -2
- package/dist/graph/query/children.hook.d.ts.map +1 -1
- package/dist/graph/query/children.hook.js +2 -2
- package/dist/graph/query/graph.hook.js +1 -1
- package/dist/graph/query/neighbors.hook.d.ts +2 -2
- package/dist/graph/query/neighbors.hook.d.ts.map +1 -1
- package/dist/graph/query/neighbors.hook.js +2 -2
- package/dist/graph/query/node.hook.d.ts +2 -2
- package/dist/graph/query/node.hook.d.ts.map +1 -1
- package/dist/graph/query/node.hook.js +2 -2
- package/dist/graph/query/query.hook.d.ts +1 -1
- package/dist/graph/query/query.hook.d.ts.map +1 -1
- package/dist/graph/query/query.hook.js +1 -1
- package/dist/index.d.ts +25 -25
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -11
- package/dist/intents/index.d.ts +5 -5
- package/dist/intents/index.d.ts.map +1 -1
- package/dist/intents/index.js +2 -2
- package/dist/intents/listen-intent.hook.d.ts +1 -1
- package/dist/intents/listen-intent.hook.d.ts.map +1 -1
- package/dist/intents/listen-intent.hook.js +3 -3
- package/dist/intents/reply.js +1 -1
- package/dist/intents/send-intent.hook.d.ts +1 -1
- package/dist/intents/send-intent.hook.d.ts.map +1 -1
- package/dist/intents/send-intent.hook.js +2 -2
- package/dist/navigation/adapters/adapter.d.ts +1 -1
- package/dist/navigation/adapters/adapter.d.ts.map +1 -1
- package/dist/navigation/adapters/memory.adapter.d.ts +2 -2
- package/dist/navigation/adapters/memory.adapter.d.ts.map +1 -1
- package/dist/navigation/adapters/url.adapter.d.ts +1 -1
- package/dist/navigation/adapters/url.adapter.d.ts.map +1 -1
- package/dist/navigation/hooks/ancestors.hook.d.ts +2 -2
- package/dist/navigation/hooks/ancestors.hook.d.ts.map +1 -1
- package/dist/navigation/hooks/ancestors.hook.js +5 -5
- package/dist/navigation/hooks/location.hook.d.ts +1 -1
- package/dist/navigation/hooks/location.hook.d.ts.map +1 -1
- package/dist/navigation/hooks/location.hook.js +2 -2
- package/dist/navigation/hooks/navigate.hook.d.ts +1 -1
- package/dist/navigation/hooks/navigate.hook.d.ts.map +1 -1
- package/dist/navigation/hooks/navigate.hook.js +1 -1
- package/dist/navigation/hooks/scope.hook.d.ts +3 -3
- package/dist/navigation/hooks/scope.hook.d.ts.map +1 -1
- package/dist/navigation/hooks/scope.hook.js +3 -3
- package/dist/navigation/index.d.ts +15 -15
- package/dist/navigation/index.d.ts.map +1 -1
- package/dist/navigation/index.js +8 -8
- package/dist/navigation/link.d.ts +1 -1
- package/dist/navigation/link.d.ts.map +1 -1
- package/dist/navigation/link.js +2 -2
- package/dist/navigation/location.d.ts +1 -1
- package/dist/navigation/location.d.ts.map +1 -1
- package/dist/navigation/scope.context.d.ts +5 -5
- package/dist/navigation/scope.context.d.ts.map +1 -1
- package/dist/navigation/scope.context.js +5 -5
- package/dist/navigation/snapshot.d.ts +3 -3
- package/dist/navigation/snapshot.d.ts.map +1 -1
- package/dist/schema/bind-read.d.ts +2 -2
- package/dist/schema/bind-read.d.ts.map +1 -1
- package/dist/schema/bind-read.js +5 -5
- package/dist/schema/binding.d.ts +1 -1
- package/dist/schema/binding.d.ts.map +1 -1
- package/dist/schema/binding.js +2 -2
- package/dist/schema/domain.hook.js +3 -3
- package/dist/schema/function.hook.d.ts +2 -2
- package/dist/schema/function.hook.d.ts.map +1 -1
- package/dist/schema/function.hook.js +2 -2
- package/dist/schema/index.d.ts +9 -9
- package/dist/schema/index.d.ts.map +1 -1
- package/dist/schema/index.js +6 -6
- package/dist/schema/kernel.hook.js +3 -3
- package/dist/schema/method.hook.d.ts +1 -1
- package/dist/schema/method.hook.d.ts.map +1 -1
- package/dist/schema/method.hook.js +2 -2
- package/dist/schema/types.d.ts +2 -2
- package/dist/schema/types.d.ts.map +1 -1
- package/dist/schema/write.d.ts +1 -1
- package/dist/schema/write.d.ts.map +1 -1
- package/dist/selection/index.d.ts +3 -3
- package/dist/selection/index.d.ts.map +1 -1
- package/dist/selection/index.js +2 -2
- package/dist/selection/live.js +1 -1
- package/dist/selection/scope.context.d.ts +1 -1
- package/dist/selection/scope.context.d.ts.map +1 -1
- package/dist/selection/scope.context.js +1 -1
- package/dist/selection/selection.hook.d.ts +1 -1
- package/dist/selection/selection.hook.d.ts.map +1 -1
- package/dist/selection/selection.hook.js +1 -1
- package/dist/session/boot/boot.d.ts +1 -1
- package/dist/session/boot/boot.d.ts.map +1 -1
- package/dist/session/boot/status.d.ts +1 -1
- package/dist/session/boot/status.d.ts.map +1 -1
- package/dist/session/connection/connection.hook.d.ts +1 -1
- package/dist/session/connection/connection.hook.d.ts.map +1 -1
- package/dist/session/connection/connection.hook.js +2 -2
- package/dist/session/index.d.ts +7 -7
- package/dist/session/index.d.ts.map +1 -1
- package/dist/session/index.js +5 -5
- package/dist/session/kernel-client.hook.js +1 -1
- package/dist/session/kernel-instance.hook.js +1 -1
- package/dist/session/provider.js +8 -8
- package/dist/session/shell.hook.js +1 -1
- package/dist/window/adopt.d.ts +2 -2
- package/dist/window/adopt.d.ts.map +1 -1
- package/dist/window/hooks/close-guard.hook.js +1 -1
- package/dist/window/hooks/target-node.hook.d.ts +2 -2
- package/dist/window/hooks/target-node.hook.d.ts.map +1 -1
- package/dist/window/hooks/target-node.hook.js +2 -2
- package/dist/window/hooks/views-for.hook.d.ts +2 -2
- package/dist/window/hooks/views-for.hook.d.ts.map +1 -1
- package/dist/window/hooks/views-for.hook.js +2 -2
- package/dist/window/hooks/window.hook.d.ts +1 -1
- package/dist/window/hooks/window.hook.d.ts.map +1 -1
- package/dist/window/hooks/window.hook.js +2 -2
- package/dist/window/hooks/windows.hook.js +2 -2
- package/dist/window/host.d.ts +2 -2
- package/dist/window/host.d.ts.map +1 -1
- package/dist/window/host.js +4 -4
- package/dist/window/hub.d.ts +3 -3
- package/dist/window/hub.d.ts.map +1 -1
- package/dist/window/hub.js +1 -1
- package/dist/window/index.d.ts +14 -14
- package/dist/window/index.d.ts.map +1 -1
- package/dist/window/index.js +7 -7
- package/dist/window/stage.js +3 -3
- package/package.json +9 -7
- package/src/application/apps/app-host.tsx +6 -6
- package/src/application/apps/apps.hook.ts +6 -6
- package/src/application/apps/open-app.hook.ts +4 -4
- package/src/application/index.ts +16 -16
- package/src/application/roles.hook.ts +4 -4
- package/src/application/spaces/current-space.hook.ts +4 -4
- package/src/application/spaces/space.hook.ts +5 -5
- package/src/application/spaces/spaces.hook.ts +7 -7
- package/src/application/user/user.hook.ts +2 -2
- package/src/auth/act-as.context.tsx +2 -2
- package/src/auth/auth.hook.ts +3 -3
- package/src/auth/can.hook.ts +3 -3
- package/src/auth/index.ts +5 -5
- package/src/auth/self.hook.ts +2 -2
- package/src/auth/session-kernel.ts +3 -3
- package/src/graph/async.ts +1 -1
- package/src/graph/call/call.hook.ts +3 -3
- package/src/graph/call/stream.hook.ts +1 -1
- package/src/graph/index.ts +18 -18
- package/src/graph/memory/read/idle.ts +1 -1
- package/src/graph/memory/read/read.ts +4 -4
- package/src/graph/memory/scope.ts +3 -3
- package/src/graph/mutate/move.hook.ts +5 -5
- package/src/graph/mutate/mutate.hook.ts +3 -3
- package/src/graph/query/children.hook.ts +4 -4
- package/src/graph/query/graph.hook.ts +1 -1
- package/src/graph/query/neighbors.hook.ts +4 -4
- package/src/graph/query/node.hook.ts +4 -4
- package/src/graph/query/query.hook.ts +2 -2
- package/src/index.ts +25 -25
- package/src/intents/index.ts +5 -5
- package/src/intents/listen-intent.hook.ts +4 -4
- package/src/intents/reply.ts +1 -1
- package/src/intents/send-intent.hook.ts +3 -3
- package/src/navigation/adapters/adapter.ts +1 -1
- package/src/navigation/adapters/memory.adapter.ts +2 -2
- package/src/navigation/adapters/url.adapter.ts +2 -2
- package/src/navigation/hooks/ancestors.hook.ts +7 -7
- package/src/navigation/hooks/location.hook.ts +3 -3
- package/src/navigation/hooks/navigate.hook.ts +2 -2
- package/src/navigation/hooks/scope.hook.ts +6 -6
- package/src/navigation/index.ts +15 -15
- package/src/navigation/link.tsx +3 -3
- package/src/navigation/location.ts +1 -1
- package/src/navigation/scope.context.tsx +9 -9
- package/src/navigation/snapshot.ts +3 -3
- package/src/schema/bind-read.ts +7 -7
- package/src/schema/binding.ts +3 -3
- package/src/schema/domain.hook.ts +3 -3
- package/src/schema/function.hook.ts +4 -4
- package/src/schema/index.ts +15 -9
- package/src/schema/kernel.hook.ts +3 -3
- package/src/schema/method.hook.ts +4 -4
- package/src/schema/types.ts +2 -2
- package/src/schema/write.ts +1 -1
- package/src/selection/index.ts +3 -3
- package/src/selection/live.ts +1 -1
- package/src/selection/scope.context.tsx +2 -2
- package/src/selection/selection.hook.ts +2 -2
- package/src/session/boot/boot.ts +1 -1
- package/src/session/boot/status.ts +1 -1
- package/src/session/connection/connection.hook.ts +3 -3
- package/src/session/index.ts +7 -7
- package/src/session/kernel-client.hook.ts +1 -1
- package/src/session/kernel-instance.hook.ts +1 -1
- package/src/session/provider.tsx +12 -12
- package/src/session/shell.hook.ts +1 -1
- package/src/window/adopt.ts +2 -2
- package/src/window/hooks/close-guard.hook.ts +1 -1
- package/src/window/hooks/target-node.hook.ts +4 -4
- package/src/window/hooks/views-for.hook.ts +4 -4
- package/src/window/hooks/window.hook.ts +3 -3
- package/src/window/hooks/windows.hook.ts +2 -2
- package/src/window/host.tsx +8 -8
- package/src/window/hub.ts +4 -4
- package/src/window/index.ts +14 -14
- package/src/window/stage.tsx +3 -3
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* `useSyncExternalStore` (rule 3). Throws outside a `<ShellProvider>`.
|
|
5
5
|
*/
|
|
6
6
|
import { useSyncExternalStore } from 'react';
|
|
7
|
-
import { useShell } from '../shell.hook';
|
|
8
|
-
import { connectionStore } from './connection.store';
|
|
7
|
+
import { useShell } from '../shell.hook.js';
|
|
8
|
+
import { connectionStore } from './connection.store.js';
|
|
9
9
|
export function useConnection() {
|
|
10
10
|
const store = connectionStore(useShell());
|
|
11
11
|
return useSyncExternalStore(store.subscribe, store.getSnapshot, store.getSnapshot);
|
package/dist/session/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { ShellProvider } from './provider';
|
|
2
|
-
export type { ShellError, ShellProviderProps } from './provider';
|
|
3
|
-
export { useShell } from './shell.hook';
|
|
4
|
-
export { useKernelClient } from './kernel-client.hook';
|
|
5
|
-
export { useKernelInstance } from './kernel-instance.hook';
|
|
6
|
-
export type { KernelInstance } from './kernel-instance.hook';
|
|
7
|
-
export { useConnection } from './connection/connection.hook';
|
|
1
|
+
export { ShellProvider } from './provider.js';
|
|
2
|
+
export type { ShellError, ShellProviderProps } from './provider.js';
|
|
3
|
+
export { useShell } from './shell.hook.js';
|
|
4
|
+
export { useKernelClient } from './kernel-client.hook.js';
|
|
5
|
+
export { useKernelInstance } from './kernel-instance.hook.js';
|
|
6
|
+
export type { KernelInstance } from './kernel-instance.hook.js';
|
|
7
|
+
export { useConnection } from './connection/connection.hook.js';
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/session/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/session/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAC7C,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAC7D,YAAY,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA"}
|
package/dist/session/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// session — API §2 (provider) + §3 (session hooks). See SHELL_REACT_API.md.
|
|
2
|
-
export { ShellProvider } from './provider';
|
|
3
|
-
export { useShell } from './shell.hook';
|
|
4
|
-
export { useKernelClient } from './kernel-client.hook';
|
|
5
|
-
export { useKernelInstance } from './kernel-instance.hook';
|
|
6
|
-
export { useConnection } from './connection/connection.hook';
|
|
2
|
+
export { ShellProvider } from './provider.js';
|
|
3
|
+
export { useShell } from './shell.hook.js';
|
|
4
|
+
export { useKernelClient } from './kernel-client.hook.js';
|
|
5
|
+
export { useKernelInstance } from './kernel-instance.hook.js';
|
|
6
|
+
export { useConnection } from './connection/connection.hook.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
|
-
import { useKernelClient } from './kernel-client.hook';
|
|
2
|
+
import { useKernelClient } from './kernel-client.hook.js';
|
|
3
3
|
/** Low-level access for direct kernel-envelope calls and token exchange code. */
|
|
4
4
|
export function useKernelInstance() {
|
|
5
5
|
const kernel = useKernelClient();
|
package/dist/session/provider.js
CHANGED
|
@@ -9,14 +9,14 @@ import { createShell } from '@astrale-os/shell';
|
|
|
9
9
|
* render only at `ready`, so useShell/useSelf are synchronous below.
|
|
10
10
|
*/
|
|
11
11
|
import { useCallback, useEffect, useMemo, useReducer, useRef, useState } from 'react';
|
|
12
|
-
import { primeUser } from '../application/user/user.store';
|
|
13
|
-
import { GraphContext } from '../graph/graph.context';
|
|
14
|
-
import { baseMemoryFor, setMemoryErrorSink } from '../graph/memory/base';
|
|
15
|
-
import { configIdentity, isShellConfig, resolveSelf } from './boot/boot';
|
|
16
|
-
import { cancelTeardown, disposeShell, scheduleTeardown } from './boot/ownership';
|
|
17
|
-
import { bootReducer, INITIAL_BOOT } from './boot/status';
|
|
18
|
-
import { connectionStore } from './connection/connection.store';
|
|
19
|
-
import { ShellContext } from './session.context';
|
|
12
|
+
import { primeUser } from '../application/user/user.store.js';
|
|
13
|
+
import { GraphContext } from '../graph/graph.context.js';
|
|
14
|
+
import { baseMemoryFor, setMemoryErrorSink } from '../graph/memory/base.js';
|
|
15
|
+
import { configIdentity, isShellConfig, resolveSelf } from './boot/boot.js';
|
|
16
|
+
import { cancelTeardown, disposeShell, scheduleTeardown } from './boot/ownership.js';
|
|
17
|
+
import { bootReducer, INITIAL_BOOT } from './boot/status.js';
|
|
18
|
+
import { connectionStore } from './connection/connection.store.js';
|
|
19
|
+
import { ShellContext } from './session.context.js';
|
|
20
20
|
/**
|
|
21
21
|
* Map a memory event to the documented `ShellError` union (API §2). `refresh`
|
|
22
22
|
* (warm-read revalidation failure) and `mutation` (rolled-back write) are the
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* hook builds on.
|
|
5
5
|
*/
|
|
6
6
|
import { useContext } from 'react';
|
|
7
|
-
import { ShellContext } from './session.context';
|
|
7
|
+
import { ShellContext } from './session.context.js';
|
|
8
8
|
/** The live shell for this subtree. Throws outside a `<ShellProvider>`. */
|
|
9
9
|
export function useShell() {
|
|
10
10
|
const runtime = useContext(ShellContext);
|
package/dist/window/adopt.d.ts
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* record, and either the remount takes it (one macrotask) or it disposes.
|
|
6
6
|
*/
|
|
7
7
|
import type { Window } from '@astrale-os/shell';
|
|
8
|
-
import type { WindowState } from './lifecycle/states';
|
|
9
|
-
import type { StageSlot } from './placement';
|
|
8
|
+
import type { WindowState } from './lifecycle/states.js';
|
|
9
|
+
import type { StageSlot } from './placement.js';
|
|
10
10
|
export interface AdoptRecord {
|
|
11
11
|
readonly windowId: string;
|
|
12
12
|
readonly window: Window;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adopt.d.ts","sourceRoot":"","sources":["../../src/window/adopt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAE/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"adopt.d.ts","sourceRoot":"","sources":["../../src/window/adopt.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAE/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAE/C,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;IACxB,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAA;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;IACrC,0FAA0F;IAC1F,OAAO,IAAI,IAAI,CAAA;CAChB;AAED,MAAM,WAAW,UAAU;IACzB,yFAAyF;IACzF,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,IAAI,CAAA;IAC7C,yFAAyF;IACzF,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAAA;CACtC;AAED,yDAAyD;AACzD,wBAAgB,gBAAgB,IAAI,UAAU,CA2B7C"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* answered exactly once regardless of how many guards are mounted.
|
|
7
7
|
*/
|
|
8
8
|
import { useEffect, useRef } from 'react';
|
|
9
|
-
import { useShell } from '../../session/shell.hook';
|
|
9
|
+
import { useShell } from '../../session/shell.hook.js';
|
|
10
10
|
function sendAck(parent) {
|
|
11
11
|
parent.send({
|
|
12
12
|
type: 'intent',
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ReadState } from '../../graph/memory/read/envelope';
|
|
2
|
-
import type { Node } from '../lifecycle/mount';
|
|
1
|
+
import type { ReadState } from '../../graph/memory/read/envelope.js';
|
|
2
|
+
import type { Node } from '../lifecycle/mount.js';
|
|
3
3
|
export interface NodeResult extends ReadState {
|
|
4
4
|
readonly node: Node | null;
|
|
5
5
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"target-node.hook.d.ts","sourceRoot":"","sources":["../../../src/window/hooks/target-node.hook.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"target-node.hook.d.ts","sourceRoot":"","sources":["../../../src/window/hooks/target-node.hook.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAA;AACpE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAKjD,MAAM,WAAW,UAAW,SAAQ,SAAS;IAC3C,QAAQ,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAA;CAC3B;AAeD,wBAAgB,aAAa,IAAI,UAAU,CAe1C"}
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
* it becomes real stale-while-revalidate liveness with no consumer change.
|
|
9
9
|
*/
|
|
10
10
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
11
|
-
import { idleReadState } from '../../graph/memory/read/idle';
|
|
12
|
-
import { useShell } from '../../session/shell.hook';
|
|
11
|
+
import { idleReadState } from '../../graph/memory/read/idle.js';
|
|
12
|
+
import { useShell } from '../../session/shell.hook.js';
|
|
13
13
|
/** Address a bare node id by graph id (`@<id>`); pass paths/anchors through. */
|
|
14
14
|
function toRef(id) {
|
|
15
15
|
return id.startsWith('/') || id.startsWith('@') ? id : `@${id}`;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PathLike } from '@astrale-os/kernel-client/graph';
|
|
2
|
-
import type { ReadState } from '../../graph/memory/read/envelope';
|
|
3
|
-
import type { Node, ViewDescriptor } from '../lifecycle/mount';
|
|
2
|
+
import type { ReadState } from '../../graph/memory/read/envelope.js';
|
|
3
|
+
import type { Node, ViewDescriptor } from '../lifecycle/mount.js';
|
|
4
4
|
export interface ViewsForResult extends ReadState {
|
|
5
5
|
readonly views: readonly ViewDescriptor[];
|
|
6
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"views-for.hook.d.ts","sourceRoot":"","sources":["../../../src/window/hooks/views-for.hook.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAA;AAW/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"views-for.hook.d.ts","sourceRoot":"","sources":["../../../src/window/hooks/views-for.hook.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAA;AAW/D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAA;AACpE,OAAO,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAKjE,MAAM,WAAW,cAAe,SAAQ,SAAS;IAC/C,QAAQ,CAAC,KAAK,EAAE,SAAS,cAAc,EAAE,CAAA;CAC1C;AAiBD,wBAAgB,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,QAAQ,GAAG,IAAI,GAAG,SAAS,GAAG,cAAc,CAqBpF"}
|
|
@@ -6,8 +6,8 @@ import { K } from '@astrale-os/kernel-core';
|
|
|
6
6
|
* caller-visible Views (USE-visibility enforced kernel-side), each with mount url.
|
|
7
7
|
*/
|
|
8
8
|
import { useMemo } from 'react';
|
|
9
|
-
import { useAsyncResource } from '../../graph/async';
|
|
10
|
-
import { useKernelClient } from '../../session/kernel-client.hook';
|
|
9
|
+
import { useAsyncResource } from '../../graph/async.js';
|
|
10
|
+
import { useKernelClient } from '../../session/kernel-client.hook.js';
|
|
11
11
|
/** The `View.resolve` wire address — the qualified static-method slug from the schema. */
|
|
12
12
|
const VIEW_RESOLVE_METHOD = K.View.resolve.path.method.raw;
|
|
13
13
|
const NO_VIEWS = Object.freeze([]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { WindowView } from '../hub';
|
|
1
|
+
import type { WindowView } from '../hub.js';
|
|
2
2
|
/** One window's live phase + shell `Window` (null id / unknown id → no window). */
|
|
3
3
|
export declare function useWindow(windowId: string | null): WindowView;
|
|
4
4
|
//# sourceMappingURL=window.hook.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"window.hook.d.ts","sourceRoot":"","sources":["../../../src/window/hooks/window.hook.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"window.hook.d.ts","sourceRoot":"","sources":["../../../src/window/hooks/window.hook.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAK3C,mFAAmF;AACnF,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,UAAU,CAK7D"}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* unknown id → a stable "no window"), reactive over the per-shell hub registry.
|
|
4
4
|
*/
|
|
5
5
|
import { useMemo, useSyncExternalStore } from 'react';
|
|
6
|
-
import { useShell } from '../../session/shell.hook';
|
|
7
|
-
import { getStageHub } from '../hub';
|
|
6
|
+
import { useShell } from '../../session/shell.hook.js';
|
|
7
|
+
import { getStageHub } from '../hub.js';
|
|
8
8
|
/** One window's live phase + shell `Window` (null id / unknown id → no window). */
|
|
9
9
|
export function useWindow(windowId) {
|
|
10
10
|
const shell = useShell();
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* tracked here — flagged in the module report as a shell foundation gap.
|
|
7
7
|
*/
|
|
8
8
|
import { useMemo, useSyncExternalStore } from 'react';
|
|
9
|
-
import { useShell } from '../../session/shell.hook';
|
|
10
|
-
import { getStageHub } from '../hub';
|
|
9
|
+
import { useShell } from '../../session/shell.hook.js';
|
|
10
|
+
import { getStageHub } from '../hub.js';
|
|
11
11
|
/** Every host-mounted window in this shell's tree, keyed by windowId. Reactive. */
|
|
12
12
|
export function useWindows() {
|
|
13
13
|
const shell = useShell();
|
package/dist/window/host.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { NodeRefInput } from '@astrale-os/kernel-client';
|
|
2
2
|
import type { CloseResult, IntentRegistry, MountCredential, SandboxProfile } from '@astrale-os/shell';
|
|
3
3
|
import type { CSSProperties, ReactNode } from 'react';
|
|
4
|
-
import type { ViewSource } from './lifecycle/mount';
|
|
5
|
-
import type { WindowState } from './lifecycle/states';
|
|
4
|
+
import type { ViewSource } from './lifecycle/mount.js';
|
|
5
|
+
import type { WindowState } from './lifecycle/states.js';
|
|
6
6
|
/** Imperative handle on a mounted `ViewHost` (API §10). */
|
|
7
7
|
export interface ViewHostHandle {
|
|
8
8
|
readonly windowId: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../src/window/host.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,EACV,WAAW,EACX,cAAc,EACd,eAAe,EAEf,cAAc,EAEf,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EAAE,aAAa,EAAgB,SAAS,EAAE,MAAM,OAAO,CAAA;AAqBnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../src/window/host.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,EACV,WAAW,EACX,cAAc,EACd,eAAe,EAEf,cAAc,EAEf,MAAM,mBAAmB,CAAA;AAC1B,OAAO,KAAK,EAAE,aAAa,EAAgB,SAAS,EAAE,MAAM,OAAO,CAAA;AAqBnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAcxD,2DAA2D;AAC3D,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC,KAAK,CAAC,IAAI,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,WAAW,CAAC,CAAA;IAC3E,gCAAgC;IAChC,OAAO,IAAI,IAAI,CAAA;CAChB;AAED,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG;IACvC,iFAAiF;IACjF,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB,YAAY,CAAC,EAAE;QAAE,OAAO,EAAE,SAAS,CAAC,MAAM,cAAc,CAAC,EAAE,CAAA;KAAE,CAAA;IAC7D,OAAO,CAAC,EAAE,cAAc,GAAG,IAAI,CAAA;IAC/B,UAAU,CAAC,EAAE,eAAe,CAAA;IAC5B,iEAAiE;IACjE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,SAAS,CAAA;IAC5C,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAA;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,aAAa,CAAA;CACtB,CAAA;AAYD,eAAO,MAAM,QAAQ,0GAyQpB,CAAA"}
|
package/dist/window/host.js
CHANGED
|
@@ -7,10 +7,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
7
7
|
* StrictMode double-mount, and downgrades a fallbackable handshake to plain.
|
|
8
8
|
*/
|
|
9
9
|
import { forwardRef, useCallback, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState, } from 'react';
|
|
10
|
-
import { useShell } from '../session/shell.hook';
|
|
11
|
-
import { getStageHub } from './hub';
|
|
12
|
-
import { isFallbackableHandshakeError, refToId, resolveSource, sendSetTarget, sourceKey, } from './lifecycle/mount';
|
|
13
|
-
import { rectOf, sameRect } from './placement';
|
|
10
|
+
import { useShell } from '../session/shell.hook.js';
|
|
11
|
+
import { getStageHub } from './hub.js';
|
|
12
|
+
import { isFallbackableHandshakeError, refToId, resolveSource, sendSetTarget, sourceKey, } from './lifecycle/mount.js';
|
|
13
|
+
import { rectOf, sameRect } from './placement.js';
|
|
14
14
|
const MOUNTING = { phase: 'mounting' };
|
|
15
15
|
export const ViewHost = forwardRef(function ViewHost(props, ref) {
|
|
16
16
|
const shell = useShell();
|
package/dist/window/hub.d.ts
CHANGED
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* controller (the slot layer, published by the stage), and the adopt stash.
|
|
7
7
|
*/
|
|
8
8
|
import type { Shell, Window } from '@astrale-os/shell';
|
|
9
|
-
import type { AdoptRecord } from './adopt';
|
|
10
|
-
import type { WindowState } from './lifecycle/states';
|
|
11
|
-
import type { StageController } from './placement';
|
|
9
|
+
import type { AdoptRecord } from './adopt.js';
|
|
10
|
+
import type { WindowState } from './lifecycle/states.js';
|
|
11
|
+
import type { StageController } from './placement.js';
|
|
12
12
|
/** A `useWindow` projection — a window's phase plus its shell `Window` (or none). */
|
|
13
13
|
export type WindowView = WindowState & {
|
|
14
14
|
readonly window: Window | null;
|
package/dist/window/hub.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hub.d.ts","sourceRoot":"","sources":["../../src/window/hub.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAEtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"hub.d.ts","sourceRoot":"","sources":["../../src/window/hub.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAEtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAYrD,qFAAqF;AACrF,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG;IAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAA;AAEzE,MAAM,WAAW,cAAc;IAC7B,8EAA8E;IAC9E,WAAW,IAAI,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC1C,4EAA4E;IAC5E,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,UAAU,CAAA;IAC3C,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAA;IAC3C,sDAAsD;IACtD,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,GAAG,IAAI,CAAA;IAClE,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,GAAG,IAAI,CAAA;IACjD,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;CAC/B;AAqED,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAA;IACjC,aAAa,IAAI,eAAe,GAAG,IAAI,CAAA;IACvC,uEAAuE;IACvE,aAAa,CAAC,UAAU,EAAE,eAAe,GAAG,IAAI,GAAG,IAAI,CAAA;IACvD,4EAA4E;IAC5E,YAAY,CAAC,EAAE,EAAE,CAAC,UAAU,EAAE,eAAe,GAAG,IAAI,KAAK,IAAI,GAAG,MAAM,IAAI,CAAA;IAC1E,yFAAyF;IACzF,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,IAAI,CAAA;IACrD,yFAAyF;IACzF,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAAA;CAC3C;AAID,kFAAkF;AAClF,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,QAAQ,CAkClD"}
|
package/dist/window/hub.js
CHANGED
package/dist/window/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export { ViewStage } from './stage';
|
|
2
|
-
export { ViewHost } from './host';
|
|
3
|
-
export type { ViewHostProps, ViewHostHandle } from './host';
|
|
4
|
-
export { useWindows, useWindowList } from './hooks/windows.hook';
|
|
5
|
-
export type { WindowListEntry } from './hooks/windows.hook';
|
|
6
|
-
export { useWindow } from './hooks/window.hook';
|
|
7
|
-
export type { WindowView } from './hub';
|
|
8
|
-
export { useViewsFor } from './hooks/views-for.hook';
|
|
9
|
-
export type { ViewsForResult } from './hooks/views-for.hook';
|
|
10
|
-
export { useTargetNode } from './hooks/target-node.hook';
|
|
11
|
-
export { useCloseGuard } from './hooks/close-guard.hook';
|
|
12
|
-
export type { CloseGuard, CloseVerdict } from './hooks/close-guard.hook';
|
|
13
|
-
export type { ViewDescriptor, ViewSource, Node } from './lifecycle/mount';
|
|
14
|
-
export type { WindowState } from './lifecycle/states';
|
|
1
|
+
export { ViewStage } from './stage.js';
|
|
2
|
+
export { ViewHost } from './host.js';
|
|
3
|
+
export type { ViewHostProps, ViewHostHandle } from './host.js';
|
|
4
|
+
export { useWindows, useWindowList } from './hooks/windows.hook.js';
|
|
5
|
+
export type { WindowListEntry } from './hooks/windows.hook.js';
|
|
6
|
+
export { useWindow } from './hooks/window.hook.js';
|
|
7
|
+
export type { WindowView } from './hub.js';
|
|
8
|
+
export { useViewsFor } from './hooks/views-for.hook.js';
|
|
9
|
+
export type { ViewsForResult } from './hooks/views-for.hook.js';
|
|
10
|
+
export { useTargetNode } from './hooks/target-node.hook.js';
|
|
11
|
+
export { useCloseGuard } from './hooks/close-guard.hook.js';
|
|
12
|
+
export type { CloseGuard, CloseVerdict } from './hooks/close-guard.hook.js';
|
|
13
|
+
export type { ViewDescriptor, ViewSource, Node } from './lifecycle/mount.js';
|
|
14
|
+
export type { WindowState } from './lifecycle/states.js';
|
|
15
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/window/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/window/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACpC,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC9D,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACnE,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAA;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AAClD,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AACvD,YAAY,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAC3D,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAC3E,YAAY,EAAE,cAAc,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAC5E,YAAY,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA"}
|
package/dist/window/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// window — API §10. ViewStage/ViewHost (the physical iframe-slot layer + a host
|
|
2
2
|
// that projects placement into a slot), the reactive window hooks, the child-side
|
|
3
3
|
// target-node + close-guard, and the (G5) view-resolution hook.
|
|
4
|
-
export { ViewStage } from './stage';
|
|
5
|
-
export { ViewHost } from './host';
|
|
6
|
-
export { useWindows, useWindowList } from './hooks/windows.hook';
|
|
7
|
-
export { useWindow } from './hooks/window.hook';
|
|
8
|
-
export { useViewsFor } from './hooks/views-for.hook';
|
|
9
|
-
export { useTargetNode } from './hooks/target-node.hook';
|
|
10
|
-
export { useCloseGuard } from './hooks/close-guard.hook';
|
|
4
|
+
export { ViewStage } from './stage.js';
|
|
5
|
+
export { ViewHost } from './host.js';
|
|
6
|
+
export { useWindows, useWindowList } from './hooks/windows.hook.js';
|
|
7
|
+
export { useWindow } from './hooks/window.hook.js';
|
|
8
|
+
export { useViewsFor } from './hooks/views-for.hook.js';
|
|
9
|
+
export { useTargetNode } from './hooks/target-node.hook.js';
|
|
10
|
+
export { useCloseGuard } from './hooks/close-guard.hook.js';
|
package/dist/window/stage.js
CHANGED
|
@@ -7,9 +7,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
7
7
|
* reconciliation of the hosts; only the slot's box is repositioned.
|
|
8
8
|
*/
|
|
9
9
|
import { useEffect, useMemo, useRef } from 'react';
|
|
10
|
-
import { useShell } from '../session/shell.hook';
|
|
11
|
-
import { getStageHub } from './hub';
|
|
12
|
-
import { createStageController } from './placement';
|
|
10
|
+
import { useShell } from '../session/shell.hook.js';
|
|
11
|
+
import { getStageHub } from './hub.js';
|
|
12
|
+
import { createStageController } from './placement.js';
|
|
13
13
|
/**
|
|
14
14
|
* A full-viewport overlay that does not intercept pointer events — individual
|
|
15
15
|
* slots re-enable them, so only the iframes are interactive, not the gaps.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrale-os/shell-react",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Astrale shell-react — the React face of the shell (provider, hooks, view components)",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -25,10 +25,12 @@
|
|
|
25
25
|
"access": "public"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@astrale-domains/
|
|
29
|
-
"@astrale-os/kernel-client": ">=0.
|
|
30
|
-
"@astrale-os/kernel-core": ">=0.
|
|
31
|
-
"@astrale-os/kernel-dsl": ">=0.1.
|
|
28
|
+
"@astrale-domains/shell-schema": ">=0.3.1 <1.0.0",
|
|
29
|
+
"@astrale-os/kernel-client": ">=0.4.0 <1.0.0",
|
|
30
|
+
"@astrale-os/kernel-core": ">=0.7.1 <1.0.0",
|
|
31
|
+
"@astrale-os/kernel-dsl": ">=0.1.3 <1.0.0",
|
|
32
|
+
"jose": "^6.2.3",
|
|
33
|
+
"zod": "^4.3.6"
|
|
32
34
|
},
|
|
33
35
|
"devDependencies": {
|
|
34
36
|
"@testing-library/dom": "^10.4.0",
|
|
@@ -42,7 +44,7 @@
|
|
|
42
44
|
"react-dom": "^19.2.0",
|
|
43
45
|
"typescript": "~6.0.1-rc",
|
|
44
46
|
"vitest": "^3.2.4",
|
|
45
|
-
"@astrale-os/shell": "0.
|
|
47
|
+
"@astrale-os/shell": "0.3.1"
|
|
46
48
|
},
|
|
47
49
|
"peerDependencies": {
|
|
48
50
|
"@astrale-os/shell": ">=0.2.0 <1.0.0",
|
|
@@ -54,6 +56,6 @@
|
|
|
54
56
|
"typecheck": "tsgo --noEmit && tsgo --noEmit -p tsconfig.test.json",
|
|
55
57
|
"test": "vitest run",
|
|
56
58
|
"test:watch": "vitest",
|
|
57
|
-
"preinstall": "node
|
|
59
|
+
"preinstall": "node -e \"try{require('./.check-workspace.cjs')}catch{}\""
|
|
58
60
|
}
|
|
59
61
|
}
|
|
@@ -11,13 +11,13 @@ import type { CSSProperties, ReactElement, ReactNode } from 'react'
|
|
|
11
11
|
*/
|
|
12
12
|
import { forwardRef, useEffect, useRef, useState } from 'react'
|
|
13
13
|
|
|
14
|
-
import type { ViewHostHandle } from '../../window/host'
|
|
15
|
-
import type { ViewDescriptor } from '../../window/lifecycle/mount'
|
|
16
|
-
import type { WindowState } from '../../window/lifecycle/states'
|
|
14
|
+
import type { ViewHostHandle } from '../../window/host.js'
|
|
15
|
+
import type { ViewDescriptor } from '../../window/lifecycle/mount.js'
|
|
16
|
+
import type { WindowState } from '../../window/lifecycle/states.js'
|
|
17
17
|
|
|
18
|
-
import { ViewHost } from '../../window/host'
|
|
19
|
-
import { toRef } from './apps.hook'
|
|
20
|
-
import { useOpenApp } from './open-app.hook'
|
|
18
|
+
import { ViewHost } from '../../window/host.js'
|
|
19
|
+
import { toRef } from './apps.hook.js'
|
|
20
|
+
import { useOpenApp } from './open-app.hook.js'
|
|
21
21
|
|
|
22
22
|
/** The states `AppHost`'s fallback answers — the frame's, plus the two OS phases. */
|
|
23
23
|
export type AppHostFallbackState =
|
|
@@ -11,13 +11,13 @@ import { normalizeRef } from '@astrale-os/kernel-client'
|
|
|
11
11
|
*/
|
|
12
12
|
import { useCallback, useEffect, useMemo, useSyncExternalStore } from 'react'
|
|
13
13
|
|
|
14
|
-
import type { ReadState } from '../../graph/memory/read/envelope'
|
|
15
|
-
import type { CurrentSpaceSnapshot } from '../spaces/current-space.store'
|
|
14
|
+
import type { ReadState } from '../../graph/memory/read/envelope.js'
|
|
15
|
+
import type { CurrentSpaceSnapshot } from '../spaces/current-space.store.js'
|
|
16
16
|
|
|
17
|
-
import { useAsyncResource } from '../../graph/async'
|
|
18
|
-
import { useShell } from '../../session/shell.hook'
|
|
19
|
-
import { currentSpaceStore } from '../spaces/current-space.store'
|
|
20
|
-
import { isOsPlaneAvailable } from '../user/user.store'
|
|
17
|
+
import { useAsyncResource } from '../../graph/async.js'
|
|
18
|
+
import { useShell } from '../../session/shell.hook.js'
|
|
19
|
+
import { currentSpaceStore } from '../spaces/current-space.store.js'
|
|
20
|
+
import { isOsPlaneAvailable } from '../user/user.store.js'
|
|
21
21
|
|
|
22
22
|
const NO_APPS: readonly ApplicationNode[] = []
|
|
23
23
|
const IDLE_CURRENT: CurrentSpaceSnapshot = { space: null, pending: false, error: undefined }
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
import type { NodeRefInput } from '@astrale-os/kernel-client'
|
|
7
7
|
import type { ApplicationNode, AppSession } from '@astrale-os/shell'
|
|
8
8
|
|
|
9
|
-
import type { Action } from '../../graph/action'
|
|
9
|
+
import type { Action } from '../../graph/action.js'
|
|
10
10
|
|
|
11
|
-
import { useAction } from '../../graph/action'
|
|
12
|
-
import { useShell } from '../../session/shell.hook'
|
|
13
|
-
import { toRef } from './apps.hook'
|
|
11
|
+
import { useAction } from '../../graph/action.js'
|
|
12
|
+
import { useShell } from '../../session/shell.hook.js'
|
|
13
|
+
import { toRef } from './apps.hook.js'
|
|
14
14
|
|
|
15
15
|
export function useOpenApp(): Action<[ApplicationNode | NodeRefInput], AppSession> {
|
|
16
16
|
const shell = useShell()
|
package/src/application/index.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
// application — API §12.2. The OS-plane hooks over the shell package's
|
|
2
2
|
// `shell.user/spaces/apps` namespaces + the window module: useUser, useSpaces,
|
|
3
3
|
// useCurrentSpace, useSpace, useApps, useRoles, useOpenApp, AppHost, AppLogo.
|
|
4
|
-
export { useUser } from './user/user.hook'
|
|
5
|
-
export { useSpaces } from './spaces/spaces.hook'
|
|
6
|
-
export type { SpacesResult } from './spaces/spaces.hook'
|
|
7
|
-
export { useCurrentSpace } from './spaces/current-space.hook'
|
|
8
|
-
export type { CurrentSpaceResult } from './spaces/current-space.hook'
|
|
9
|
-
export { useSpace } from './spaces/space.hook'
|
|
10
|
-
export type { SpaceResult } from './spaces/space.hook'
|
|
11
|
-
export { useApps } from './apps/apps.hook'
|
|
12
|
-
export type { AppsResult } from './apps/apps.hook'
|
|
13
|
-
export { useOpenApp } from './apps/open-app.hook'
|
|
14
|
-
export { AppHost } from './apps/app-host'
|
|
15
|
-
export type { AppHostFallbackState, AppHostProps } from './apps/app-host'
|
|
16
|
-
export { AppLogo } from './apps/app-logo'
|
|
17
|
-
export type { AppLogoProps } from './apps/app-logo'
|
|
18
|
-
export { useRoles } from './roles.hook'
|
|
19
|
-
export type { RolesResult } from './roles.hook'
|
|
4
|
+
export { useUser } from './user/user.hook.js'
|
|
5
|
+
export { useSpaces } from './spaces/spaces.hook.js'
|
|
6
|
+
export type { SpacesResult } from './spaces/spaces.hook.js'
|
|
7
|
+
export { useCurrentSpace } from './spaces/current-space.hook.js'
|
|
8
|
+
export type { CurrentSpaceResult } from './spaces/current-space.hook.js'
|
|
9
|
+
export { useSpace } from './spaces/space.hook.js'
|
|
10
|
+
export type { SpaceResult } from './spaces/space.hook.js'
|
|
11
|
+
export { useApps } from './apps/apps.hook.js'
|
|
12
|
+
export type { AppsResult } from './apps/apps.hook.js'
|
|
13
|
+
export { useOpenApp } from './apps/open-app.hook.js'
|
|
14
|
+
export { AppHost } from './apps/app-host.js'
|
|
15
|
+
export type { AppHostFallbackState, AppHostProps } from './apps/app-host.js'
|
|
16
|
+
export { AppLogo } from './apps/app-logo.js'
|
|
17
|
+
export type { AppLogoProps } from './apps/app-logo.js'
|
|
18
|
+
export { useRoles } from './roles.hook.js'
|
|
19
|
+
export type { RolesResult } from './roles.hook.js'
|
|
20
20
|
|
|
21
21
|
// The OS node/session types (from the shell package, single import surface).
|
|
22
22
|
export type { ApplicationNode, AppSession, RoleNode, SpaceNode, UserNode } from '@astrale-os/shell'
|
|
@@ -6,11 +6,11 @@ import type { RoleNode } from '@astrale-os/shell'
|
|
|
6
6
|
*/
|
|
7
7
|
import { useMemo } from 'react'
|
|
8
8
|
|
|
9
|
-
import type { ReadState } from '../graph/memory/read/envelope'
|
|
9
|
+
import type { ReadState } from '../graph/memory/read/envelope.js'
|
|
10
10
|
|
|
11
|
-
import { useAsyncResource } from '../graph/async'
|
|
12
|
-
import { useShell } from '../session/shell.hook'
|
|
13
|
-
import { isOsPlaneAvailable } from './user/user.store'
|
|
11
|
+
import { useAsyncResource } from '../graph/async.js'
|
|
12
|
+
import { useShell } from '../session/shell.hook.js'
|
|
13
|
+
import { isOsPlaneAvailable } from './user/user.store.js'
|
|
14
14
|
|
|
15
15
|
const NO_ROLES: readonly RoleNode[] = []
|
|
16
16
|
|
|
@@ -7,11 +7,11 @@ import type { SpaceNode } from '@astrale-os/shell'
|
|
|
7
7
|
*/
|
|
8
8
|
import { useEffect, useMemo, useSyncExternalStore } from 'react'
|
|
9
9
|
|
|
10
|
-
import type { ReadState } from '../../graph/memory/read/envelope'
|
|
10
|
+
import type { ReadState } from '../../graph/memory/read/envelope.js'
|
|
11
11
|
|
|
12
|
-
import { useShell } from '../../session/shell.hook'
|
|
13
|
-
import { isOsPlaneAvailable } from '../user/user.store'
|
|
14
|
-
import { currentSpaceStore, idleSnapshot, noopSubscribe } from './current-space.store'
|
|
12
|
+
import { useShell } from '../../session/shell.hook.js'
|
|
13
|
+
import { isOsPlaneAvailable } from '../user/user.store.js'
|
|
14
|
+
import { currentSpaceStore, idleSnapshot, noopSubscribe } from './current-space.store.js'
|
|
15
15
|
|
|
16
16
|
export interface CurrentSpaceResult extends ReadState {
|
|
17
17
|
readonly space: SpaceNode | null
|
|
@@ -8,12 +8,12 @@ import { normalizeRef } from '@astrale-os/kernel-client'
|
|
|
8
8
|
*/
|
|
9
9
|
import { useMemo } from 'react'
|
|
10
10
|
|
|
11
|
-
import type { CurrentSpaceResult } from './current-space.hook'
|
|
11
|
+
import type { CurrentSpaceResult } from './current-space.hook.js'
|
|
12
12
|
|
|
13
|
-
import { useAsyncResource } from '../../graph/async'
|
|
14
|
-
import { isIdleInput } from '../../graph/memory/read/idle'
|
|
15
|
-
import { useShell } from '../../session/shell.hook'
|
|
16
|
-
import { isOsPlaneAvailable } from '../user/user.store'
|
|
13
|
+
import { useAsyncResource } from '../../graph/async.js'
|
|
14
|
+
import { isIdleInput } from '../../graph/memory/read/idle.js'
|
|
15
|
+
import { useShell } from '../../session/shell.hook.js'
|
|
16
|
+
import { isOsPlaneAvailable } from '../user/user.store.js'
|
|
17
17
|
|
|
18
18
|
export type SpaceResult = CurrentSpaceResult
|
|
19
19
|
|
|
@@ -11,14 +11,14 @@ import { normalizeRef } from '@astrale-os/kernel-client'
|
|
|
11
11
|
*/
|
|
12
12
|
import { useEffect, useMemo, useSyncExternalStore } from 'react'
|
|
13
13
|
|
|
14
|
-
import type { Action } from '../../graph/action'
|
|
15
|
-
import type { ReadState } from '../../graph/memory/read/envelope'
|
|
14
|
+
import type { Action } from '../../graph/action.js'
|
|
15
|
+
import type { ReadState } from '../../graph/memory/read/envelope.js'
|
|
16
16
|
|
|
17
|
-
import { useAction } from '../../graph/action'
|
|
18
|
-
import { useAsyncResource } from '../../graph/async'
|
|
19
|
-
import { useShell } from '../../session/shell.hook'
|
|
20
|
-
import { isOsPlaneAvailable } from '../user/user.store'
|
|
21
|
-
import { currentSpaceStore, idleSnapshot, noopSubscribe } from './current-space.store'
|
|
17
|
+
import { useAction } from '../../graph/action.js'
|
|
18
|
+
import { useAsyncResource } from '../../graph/async.js'
|
|
19
|
+
import { useShell } from '../../session/shell.hook.js'
|
|
20
|
+
import { isOsPlaneAvailable } from '../user/user.store.js'
|
|
21
|
+
import { currentSpaceStore, idleSnapshot, noopSubscribe } from './current-space.store.js'
|
|
22
22
|
|
|
23
23
|
const NO_SPACES: readonly SpaceNode[] = []
|
|
24
24
|
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import type { UserNode } from '@astrale-os/shell'
|
|
9
9
|
|
|
10
|
-
import { useShell } from '../../session/shell.hook'
|
|
11
|
-
import { loadUser, userCache } from './user.store'
|
|
10
|
+
import { useShell } from '../../session/shell.hook.js'
|
|
11
|
+
import { loadUser, userCache } from './user.store.js'
|
|
12
12
|
|
|
13
13
|
export function useUser(): UserNode {
|
|
14
14
|
const shell = useShell()
|