@softov/scena 0.1.2 → 0.1.3

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 (276) hide show
  1. package/dist/core/builtins.d.ts +3 -0
  2. package/dist/{runtime → core}/builtins.js +1 -1
  3. package/dist/core/controls/command.d.ts +18 -0
  4. package/dist/{controls → core/controls}/command.js +2 -2
  5. package/dist/{controls → core/controls}/events.d.ts +1 -1
  6. package/dist/{controls → core/controls}/events.js +1 -1
  7. package/dist/core/controls/keybinding.d.ts +9 -0
  8. package/dist/{controls → core/controls}/keybinding.js +1 -1
  9. package/dist/core/controls/layout.d.ts +31 -0
  10. package/dist/{controls → core/controls}/layout.js +24 -7
  11. package/dist/core/controls/manifest.d.ts +21 -0
  12. package/dist/{controls → core/controls}/manifest.js +2 -2
  13. package/dist/core/controls/session.d.ts +16 -0
  14. package/dist/{controls → core/controls}/session.js +5 -13
  15. package/dist/{controls → core/controls}/shell.d.ts +2 -2
  16. package/dist/{controls → core/controls}/shell.js +1 -1
  17. package/dist/{controls → core/controls}/storage/layout-local.d.ts +1 -1
  18. package/dist/{controls → core/controls}/storage/session-local.d.ts +1 -1
  19. package/dist/{controls → core/controls}/when.d.ts +2 -2
  20. package/dist/{controls → core/controls}/when.js +1 -1
  21. package/dist/{converters → core/converters}/a2ui-v0.10.d.ts +1 -1
  22. package/dist/core/{component-graph.d.ts → graph/component-graph.d.ts} +1 -1
  23. package/dist/core/{component-graph.js → graph/component-graph.js} +1 -1
  24. package/dist/core/{mount-menu.d.ts → graph/mount-menu.d.ts} +1 -1
  25. package/dist/core/{mount-menu.js → graph/mount-menu.js} +1 -1
  26. package/dist/core/graph/mount-surface.d.ts +15 -0
  27. package/dist/core/{mount-surface.js → graph/mount-surface.js} +23 -4
  28. package/dist/core/{surface-presentation.d.ts → graph/surface-presentation.d.ts} +3 -3
  29. package/dist/{i18n → core/i18n}/i18n-backend.d.ts +1 -1
  30. package/dist/core/index.d.ts +34 -43
  31. package/dist/core/index.js +35 -38
  32. package/dist/core/{component-registry.d.ts → registry/component-registry.d.ts} +2 -2
  33. package/dist/core/{component-registry.js → registry/component-registry.js} +1 -1
  34. package/dist/core/registry/converter-registry.d.ts +2 -0
  35. package/dist/core/{converter-registry.js → registry/converter-registry.js} +1 -1
  36. package/dist/core/resolve/binding-resolver.d.ts +7 -0
  37. package/dist/core/{binding-resolver.js → resolve/binding-resolver.js} +2 -2
  38. package/dist/core/{dynamic-resolver.d.ts → resolve/dynamic-resolver.d.ts} +2 -2
  39. package/dist/core/{dynamic-resolver.js → resolve/dynamic-resolver.js} +1 -1
  40. package/dist/core/{path-resolver.d.ts → resolve/path-resolver.d.ts} +2 -2
  41. package/dist/core/{permissions.d.ts → resolve/permissions.d.ts} +1 -1
  42. package/dist/core/scena.d.ts +1 -1
  43. package/dist/core/scena.js +17 -16
  44. package/dist/core/{backends → store/backends}/modus-backend.d.ts +1 -1
  45. package/dist/core/{backends → store/backends}/storage-backend.d.ts +1 -1
  46. package/dist/core/{backends → store/backends}/yjs-backend.d.ts +1 -1
  47. package/dist/core/{reactive-store.d.ts → store/reactive-store.d.ts} +4 -4
  48. package/dist/core/{reactive-store.js → store/reactive-store.js} +2 -2
  49. package/dist/index.d.ts +8 -0
  50. package/dist/index.js +13 -0
  51. package/dist/porta/Limen.d.ts +1 -0
  52. package/dist/porta/Limen.js +1 -0
  53. package/dist/porta/PortaLock.d.ts +1 -0
  54. package/dist/porta/PortaLock.js +6 -2
  55. package/dist/porta/SigillumGate.d.ts +1 -0
  56. package/dist/porta/SigillumGate.js +1 -0
  57. package/dist/porta/commands.d.ts +1 -1
  58. package/dist/porta/login-form.block.d.ts +1 -1
  59. package/dist/porta/provider.d.ts +1 -1
  60. package/dist/porta/register-blocks.d.ts +2 -2
  61. package/dist/porta/register-blocks.js +4 -7
  62. package/dist/porta/register.d.ts +1 -1
  63. package/dist/porta/sigillum.d.ts +2 -2
  64. package/dist/react/DefaultShell.d.ts +47 -1
  65. package/dist/react/DefaultShell.js +81 -12
  66. package/dist/react/Scena.d.ts +2 -2
  67. package/dist/react/ScenaProvider.d.ts +1 -1
  68. package/dist/react/ShellSplitter.d.ts +1 -1
  69. package/dist/react/SurfaceArea.d.ts +5 -3
  70. package/dist/react/SurfaceArea.js +2 -2
  71. package/dist/react/ViewMount.d.ts +1 -1
  72. package/dist/react/ViewMount.js +4 -4
  73. package/dist/react/hooks/useI18n.d.ts +1 -1
  74. package/dist/react/hooks/useI18n.js +1 -1
  75. package/dist/react/hooks/useLabel.d.ts +1 -1
  76. package/dist/react/hooks/useLabel.js +1 -1
  77. package/dist/react/hooks/useLayout.d.ts +1 -1
  78. package/dist/react/hooks/useMounts.d.ts +1 -1
  79. package/dist/react/hooks/useStore.d.ts +1 -1
  80. package/dist/react/hooks/useStore.js +2 -2
  81. package/dist/react/hooks/useStoreLabel.d.ts +2 -2
  82. package/dist/react/hooks/useStoreLabel.js +1 -1
  83. package/dist/react/hooks/useSurfacePresentation.d.ts +3 -3
  84. package/dist/react/hooks/useSurfacePresentation.js +1 -1
  85. package/dist/react/mount-context.d.ts +1 -1
  86. package/dist/react/useSurfaceResize.d.ts +2 -2
  87. package/dist/runtime/client-handlers.d.ts +1 -1
  88. package/dist/runtime/in-memory-socket.d.ts +2 -2
  89. package/dist/runtime/index.d.ts +3 -3
  90. package/dist/runtime/index.js +2 -2
  91. package/dist/runtime/layout-commands.d.ts +3 -3
  92. package/dist/runtime/layout-commands.js +2 -2
  93. package/dist/runtime/opener-commands.d.ts +5 -5
  94. package/dist/runtime/opener-commands.js +3 -3
  95. package/dist/runtime/surface-bridge.d.ts +5 -5
  96. package/dist/runtime/surface-bridge.js +1 -1
  97. package/dist/{runtime → sdk}/args-schema.d.ts +1 -1
  98. package/dist/{core → sdk}/disposable.d.ts +3 -1
  99. package/dist/{types → sdk}/index.d.ts +1 -0
  100. package/dist/{types → sdk}/index.js +1 -0
  101. package/dist/{types → sdk}/label.d.ts +1 -0
  102. package/dist/{core → sdk}/label.js +0 -1
  103. package/dist/{types → sdk}/layout.d.ts +25 -0
  104. package/dist/{types → sdk}/mount-surface.d.ts +19 -1
  105. package/dist/{types → sdk}/scena.d.ts +2 -1
  106. package/dist/styles/bar.css +8 -4
  107. package/dist/styles/base.css +18 -16
  108. package/dist/styles/controller.d.ts +27 -0
  109. package/dist/styles/controller.js +74 -0
  110. package/dist/styles/form.css +10 -0
  111. package/dist/styles/index.d.ts +2 -0
  112. package/dist/styles/index.js +3 -0
  113. package/dist/styles/surface.css +69 -3
  114. package/dist/styles/themes/tokens.css +1 -1
  115. package/dist/ui/_utils.d.ts +1 -1
  116. package/dist/ui/_utils.js +2 -2
  117. package/dist/ui/campus/CampusMappa.js +1 -1
  118. package/dist/ui/chart/catalog.d.ts +1 -1
  119. package/dist/ui/control/ButtonBar.css +61 -0
  120. package/dist/ui/control/ButtonBar.d.ts +36 -0
  121. package/dist/ui/control/ButtonBar.js +42 -0
  122. package/dist/ui/control/ThemeModeToggle.css +22 -0
  123. package/dist/ui/control/ThemeModeToggle.d.ts +20 -0
  124. package/dist/ui/control/ThemeModeToggle.js +34 -0
  125. package/dist/ui/control/ThemePicker.css +24 -0
  126. package/dist/ui/control/ThemePicker.d.ts +27 -0
  127. package/dist/ui/control/ThemePicker.js +33 -0
  128. package/dist/ui/control/catalog.d.ts +1 -1
  129. package/dist/ui/control/catalog.js +5 -1
  130. package/dist/ui/control/index.d.ts +6 -0
  131. package/dist/ui/control/index.js +3 -0
  132. package/dist/ui/data/Filter.d.ts +1 -1
  133. package/dist/ui/data/Listable.d.ts +3 -2
  134. package/dist/ui/data/Listable.js +4 -2
  135. package/dist/ui/data/Pagination.d.ts +4 -1
  136. package/dist/ui/data/Pagination.js +37 -9
  137. package/dist/ui/data/Tree.d.ts +2 -2
  138. package/dist/ui/data/Tree.js +1 -1
  139. package/dist/ui/data/catalog.d.ts +1 -1
  140. package/dist/ui/display/Alert.css +15 -10
  141. package/dist/ui/display/Badge.css +22 -14
  142. package/dist/ui/display/Badge.d.ts +1 -1
  143. package/dist/ui/display/Badge.js +1 -1
  144. package/dist/ui/display/DetailHeader.css +3 -3
  145. package/dist/ui/display/DetailList.js +3 -2
  146. package/dist/ui/display/DetailNotFound.d.ts +1 -1
  147. package/dist/ui/display/DetailNotFound.js +1 -1
  148. package/dist/ui/display/Progress.d.ts +1 -1
  149. package/dist/ui/display/Progress.js +1 -1
  150. package/dist/ui/display/Spinner.d.ts +1 -1
  151. package/dist/ui/display/Spinner.js +1 -1
  152. package/dist/ui/display/StatusDot.css +46 -0
  153. package/dist/ui/display/StatusDot.d.ts +17 -0
  154. package/dist/ui/display/StatusDot.js +16 -0
  155. package/dist/ui/display/Svg.d.ts +1 -1
  156. package/dist/ui/display/Svg.js +1 -1
  157. package/dist/ui/display/catalog.d.ts +1 -1
  158. package/dist/ui/display/catalog.js +1 -0
  159. package/dist/ui/display/index.d.ts +2 -0
  160. package/dist/ui/display/index.js +1 -0
  161. package/dist/ui/forms/LoginForm.d.ts +1 -0
  162. package/dist/ui/forms/LoginForm.js +1 -0
  163. package/dist/ui/forms/SettingsContainer.d.ts +2 -1
  164. package/dist/ui/forms/SettingsContainer.js +2 -2
  165. package/dist/ui/forms/catalog.d.ts +1 -1
  166. package/dist/ui/index.d.ts +6 -1
  167. package/dist/ui/index.js +3 -1
  168. package/dist/ui/layout/BarLayout.d.ts +1 -1
  169. package/dist/ui/layout/FloatingLayout.d.ts +1 -1
  170. package/dist/ui/layout/InlineLayout.d.ts +1 -1
  171. package/dist/ui/layout/MountTitle.d.ts +2 -2
  172. package/dist/ui/layout/MountTitle.js +2 -2
  173. package/dist/ui/layout/RailLayout.d.ts +1 -1
  174. package/dist/ui/layout/SectionHeader.d.ts +2 -2
  175. package/dist/ui/layout/SectionHeader.js +4 -7
  176. package/dist/ui/layout/SingleLayout.d.ts +1 -1
  177. package/dist/ui/layout/SpatialCard.d.ts +2 -2
  178. package/dist/ui/layout/SpatialLayout.d.ts +1 -1
  179. package/dist/ui/layout/SplitLayout.d.ts +1 -1
  180. package/dist/ui/layout/StackHeader.d.ts +1 -1
  181. package/dist/ui/layout/StackLayout.d.ts +1 -1
  182. package/dist/ui/layout/TabLayout.d.ts +1 -1
  183. package/dist/ui/layout/TabPanelLayout.d.ts +2 -2
  184. package/dist/ui/layout/TabPanelLayout.js +1 -1
  185. package/dist/ui/layout/catalog.d.ts +1 -1
  186. package/dist/ui/layout/register.d.ts +2 -2
  187. package/dist/ui/layout/register.js +1 -1
  188. package/dist/ui/media/catalog.d.ts +1 -1
  189. package/dist/ui/menu/ActionList.d.ts +2 -2
  190. package/dist/ui/menu/ActionList.js +1 -1
  191. package/dist/ui/menu/ContainerMenu.d.ts +2 -2
  192. package/dist/ui/menu/ContextMenu.d.ts +2 -2
  193. package/dist/ui/menu/useChatPicker.d.ts +2 -2
  194. package/dist/ui/navigation/ActivityBarItem.css +81 -0
  195. package/dist/ui/navigation/ActivityBarItem.d.ts +61 -0
  196. package/dist/ui/navigation/ActivityBarItem.js +68 -0
  197. package/dist/ui/navigation/catalog.d.ts +1 -1
  198. package/dist/ui/navigation/catalog.js +1 -0
  199. package/dist/ui/navigation/index.d.ts +2 -0
  200. package/dist/ui/navigation/index.js +1 -0
  201. package/dist/ui/overlay/catalog.d.ts +1 -1
  202. package/dist/ui/register.d.ts +3 -3
  203. package/dist/ui/register.js +1 -1
  204. package/package.json +15 -7
  205. package/dist/controls/command.d.ts +0 -18
  206. package/dist/controls/keybinding.d.ts +0 -9
  207. package/dist/controls/layout.d.ts +0 -16
  208. package/dist/controls/manifest.d.ts +0 -21
  209. package/dist/controls/session.d.ts +0 -16
  210. package/dist/core/binding-resolver.d.ts +0 -7
  211. package/dist/core/converter-registry.d.ts +0 -2
  212. package/dist/core/label.d.ts +0 -2
  213. package/dist/core/mount-surface.d.ts +0 -15
  214. package/dist/runtime/builtins.d.ts +0 -3
  215. package/dist/types/disposable.d.ts +0 -3
  216. package/dist/types/disposable.js +0 -1
  217. package/dist/types/label.js +0 -1
  218. /package/dist/{controls → core/controls}/index.d.ts +0 -0
  219. /package/dist/{controls → core/controls}/index.js +0 -0
  220. /package/dist/{controls → core/controls}/storage/layout-local.js +0 -0
  221. /package/dist/{controls → core/controls}/storage/session-local.js +0 -0
  222. /package/dist/{converters → core/converters}/a2ui-v0.10.js +0 -0
  223. /package/dist/{converters → core/converters}/index.d.ts +0 -0
  224. /package/dist/{converters → core/converters}/index.js +0 -0
  225. /package/dist/core/{surface-presentation.js → graph/surface-presentation.js} +0 -0
  226. /package/dist/{i18n → core/i18n}/i18n-backend.js +0 -0
  227. /package/dist/{i18n → core/i18n}/registry.d.ts +0 -0
  228. /package/dist/{i18n → core/i18n}/registry.js +0 -0
  229. /package/dist/core/{path-resolver.js → resolve/path-resolver.js} +0 -0
  230. /package/dist/core/{permissions.js → resolve/permissions.js} +0 -0
  231. /package/dist/core/{backends → store/backends}/modus-backend.js +0 -0
  232. /package/dist/core/{backends → store/backends}/storage-backend.js +0 -0
  233. /package/dist/core/{backends → store/backends}/yjs-backend.js +0 -0
  234. /package/dist/core/{computed-dsl.d.ts → store/computed-dsl.d.ts} +0 -0
  235. /package/dist/core/{computed-dsl.js → store/computed-dsl.js} +0 -0
  236. /package/dist/{runtime → sdk}/args-schema.js +0 -0
  237. /package/dist/{types → sdk}/binding-resolver.d.ts +0 -0
  238. /package/dist/{types → sdk}/binding-resolver.js +0 -0
  239. /package/dist/{types → sdk}/colors.d.ts +0 -0
  240. /package/dist/{types → sdk}/colors.js +0 -0
  241. /package/dist/{types → sdk}/command.d.ts +0 -0
  242. /package/dist/{types → sdk}/command.js +0 -0
  243. /package/dist/{types → sdk}/component-graph.d.ts +0 -0
  244. /package/dist/{types → sdk}/component-graph.js +0 -0
  245. /package/dist/{types → sdk}/component-registry.d.ts +0 -0
  246. /package/dist/{types → sdk}/component-registry.js +0 -0
  247. /package/dist/{types → sdk}/converter-registry.d.ts +0 -0
  248. /package/dist/{types → sdk}/converter-registry.js +0 -0
  249. /package/dist/{core → sdk}/disposable.js +0 -0
  250. /package/dist/{types → sdk}/events.d.ts +0 -0
  251. /package/dist/{types → sdk}/events.js +0 -0
  252. /package/dist/{types → sdk}/host.d.ts +0 -0
  253. /package/dist/{types → sdk}/host.js +0 -0
  254. /package/dist/{types → sdk}/keybinding.d.ts +0 -0
  255. /package/dist/{types → sdk}/keybinding.js +0 -0
  256. /package/dist/{types → sdk}/layout.js +0 -0
  257. /package/dist/{types → sdk}/manifest.d.ts +0 -0
  258. /package/dist/{types → sdk}/manifest.js +0 -0
  259. /package/dist/{types → sdk}/mount-menu.d.ts +0 -0
  260. /package/dist/{types → sdk}/mount-menu.js +0 -0
  261. /package/dist/{types → sdk}/mount-surface.js +0 -0
  262. /package/dist/{types → sdk}/permissions.d.ts +0 -0
  263. /package/dist/{types → sdk}/permissions.js +0 -0
  264. /package/dist/{types → sdk}/query.d.ts +0 -0
  265. /package/dist/{types → sdk}/query.js +0 -0
  266. /package/dist/{types → sdk}/reactive-store.d.ts +0 -0
  267. /package/dist/{types → sdk}/reactive-store.js +0 -0
  268. /package/dist/{types → sdk}/scena.js +0 -0
  269. /package/dist/{types → sdk}/scope-backend.d.ts +0 -0
  270. /package/dist/{types → sdk}/scope-backend.js +0 -0
  271. /package/dist/{types → sdk}/session.d.ts +0 -0
  272. /package/dist/{types → sdk}/session.js +0 -0
  273. /package/dist/{types → sdk}/shell.d.ts +0 -0
  274. /package/dist/{types → sdk}/shell.js +0 -0
  275. /package/dist/{types → sdk}/when.d.ts +0 -0
  276. /package/dist/{types → sdk}/when.js +0 -0
@@ -1,5 +1,5 @@
1
- import { isAction, isDataBinding, isFunctionCall, } from '../types/component-graph.js';
2
- import { combineDisposables, disposableFrom } from './disposable.js';
1
+ import { isAction, isDataBinding, isFunctionCall, } from '../../sdk/component-graph.js';
2
+ import { combineDisposables, disposableFrom } from '../../sdk/disposable.js';
3
3
  import { parsePath } from './path-resolver.js';
4
4
  export function createBindingResolver(deps) {
5
5
  const { store } = deps;
@@ -1,5 +1,5 @@
1
- import type { Action, BindingPath, DataBinding, DynamicBoolean, DynamicNumber, DynamicString, DynamicStringList, DynamicValue, FunctionCall, PropValue } from '../types/component-graph.js';
2
- import type { Scena } from '../types/scena.js';
1
+ import type { Action, BindingPath, DataBinding, DynamicBoolean, DynamicNumber, DynamicString, DynamicStringList, DynamicValue, FunctionCall, PropValue } from '../../sdk/component-graph.js';
2
+ import type { Scena } from '../../sdk/scena.js';
3
3
  export declare function resolveDynamicValue(value: PropValue, dataContext: BindingPath | undefined, scena: Scena): unknown;
4
4
  export declare function resolveFunctionCall(fc: FunctionCall, dataContext: BindingPath | undefined, scena: Scena): unknown;
5
5
  export declare function resolveDynamicString(v: DynamicString, dataContext: BindingPath | undefined, scena: Scena): string;
@@ -1,4 +1,4 @@
1
- import { isAction, isDataBinding, isFunctionCall, } from '../types/component-graph.js';
1
+ import { isAction, isDataBinding, isFunctionCall, } from '../../sdk/component-graph.js';
2
2
  import { readPath, writePath } from './path-resolver.js';
3
3
  // Resolves a DynamicValue to its concrete value.
4
4
  // literal → returned as-is
@@ -1,5 +1,5 @@
1
- import type { BindingPath } from '../types/component-graph.js';
2
- import type { ReactiveStore, ScopeName } from '../types/reactive-store.js';
1
+ import type { BindingPath } from '../../sdk/component-graph.js';
2
+ import type { ReactiveStore, ScopeName } from '../../sdk/reactive-store.js';
3
3
  export interface ParsedPath {
4
4
  absolute: boolean;
5
5
  segments: string[];
@@ -1,2 +1,2 @@
1
- import type { PermissionEngine } from '../types/permissions.js';
1
+ import type { PermissionEngine } from '../../sdk/permissions.js';
2
2
  export declare function createPermissionEngine(): PermissionEngine;
@@ -1,2 +1,2 @@
1
- import type { CreateScena } from '../types/scena.js';
1
+ import type { CreateScena } from '../sdk/scena.js';
2
2
  export declare const createScena: CreateScena;
@@ -1,19 +1,19 @@
1
- import { createEventBus } from '../controls/events.js';
2
- import { createWhenEngine } from '../controls/when.js';
3
- import { createCommandRegistry } from '../controls/command.js';
4
- import { createKeybindingRegistry } from '../controls/keybinding.js';
5
- import { createLayoutAPI, createLayoutRegistry } from '../controls/layout.js';
6
- import { createSessionAPI } from '../controls/session.js';
7
- import { createShellRegistry } from '../controls/shell.js';
8
- import { createManifestAPI } from '../controls/manifest.js';
9
- import { createPermissionEngine } from './permissions.js';
10
- import { createReactiveStore } from './reactive-store.js';
11
- import { createBindingResolver } from './binding-resolver.js';
12
- import { createComponentRegistry } from './component-registry.js';
13
- import { createConverterRegistry } from './converter-registry.js';
14
- import { createMountSurfaceRegistry } from './mount-surface.js';
15
- import { createMountMenuRegistry } from './mount-menu.js';
16
- import { registerBuiltinFunctions } from '../runtime/builtins.js';
1
+ import { createEventBus } from './controls/events.js';
2
+ import { createWhenEngine } from './controls/when.js';
3
+ import { createCommandRegistry } from './controls/command.js';
4
+ import { createKeybindingRegistry } from './controls/keybinding.js';
5
+ import { createLayoutAPI, createLayoutRegistry } from './controls/layout.js';
6
+ import { createSessionAPI } from './controls/session.js';
7
+ import { createShellRegistry } from './controls/shell.js';
8
+ import { createManifestAPI } from './controls/manifest.js';
9
+ import { createPermissionEngine } from './resolve/permissions.js';
10
+ import { createReactiveStore } from './store/reactive-store.js';
11
+ import { createBindingResolver } from './resolve/binding-resolver.js';
12
+ import { createComponentRegistry } from './registry/component-registry.js';
13
+ import { createConverterRegistry } from './registry/converter-registry.js';
14
+ import { createMountSurfaceRegistry } from './graph/mount-surface.js';
15
+ import { createMountMenuRegistry } from './graph/mount-menu.js';
16
+ import { registerBuiltinFunctions } from './builtins.js';
17
17
  export const createScena = (opts = {}) => {
18
18
  const events = opts.events ?? createEventBus();
19
19
  const permissions = createPermissionEngine();
@@ -34,6 +34,7 @@ export const createScena = (opts = {}) => {
34
34
  events,
35
35
  store,
36
36
  initial: opts.initialLayout,
37
+ surfaceDefaults: opts.surfaceDefaults,
37
38
  storage: opts.layoutStorage,
38
39
  });
39
40
  const scenaRef = { current: null };
@@ -1,4 +1,4 @@
1
- import type { ScopeBackend } from '../../types/scope-backend.js';
1
+ import type { ScopeBackend } from '../../../sdk/scope-backend.js';
2
2
  export type ModusClass = 'xsmall' | 'small' | 'medium' | 'large';
3
3
  export interface ModusBreakpoints {
4
4
  small: number;
@@ -1,4 +1,4 @@
1
- import type { ScopeBackend } from '../../types/scope-backend.js';
1
+ import type { ScopeBackend } from '../../../sdk/scope-backend.js';
2
2
  export interface BackendStorage {
3
3
  load(): Record<string, unknown> | null;
4
4
  save(data: Record<string, unknown>): void;
@@ -1,3 +1,3 @@
1
1
  import type * as Y from 'yjs';
2
- import type { ScopeBackend } from '../../types/scope-backend.js';
2
+ import type { ScopeBackend } from '../../../sdk/scope-backend.js';
3
3
  export declare function createYjsBackend(scope: string, doc: Y.Doc, mapName?: string): ScopeBackend;
@@ -1,7 +1,7 @@
1
- import type { BindingPath } from '../types/component-graph.js';
2
- import type { EventBus } from '../types/events.js';
3
- import type { ReactiveStore, ScopeName, SocketBridge } from '../types/reactive-store.js';
4
- import type { ScopeBackendFactory } from '../types/scope-backend.js';
1
+ import type { BindingPath } from '../../sdk/component-graph.js';
2
+ import type { EventBus } from '../../sdk/events.js';
3
+ import type { ReactiveStore, ScopeName, SocketBridge } from '../../sdk/reactive-store.js';
4
+ import type { ScopeBackendFactory } from '../../sdk/scope-backend.js';
5
5
  interface Deps {
6
6
  events: EventBus;
7
7
  socket?: SocketBridge;
@@ -1,5 +1,5 @@
1
- import { disposableFrom } from './disposable.js';
2
- import { parsePath, joinSegments, hasWildcard } from './path-resolver.js';
1
+ import { disposableFrom } from '../../sdk/disposable.js';
2
+ import { parsePath, joinSegments, hasWildcard } from '../resolve/path-resolver.js';
3
3
  import { compileSelect } from './computed-dsl.js';
4
4
  function makeNode() {
5
5
  return { hasValue: false, value: undefined };
@@ -0,0 +1,8 @@
1
+ export * from './core/index.js';
2
+ export { createSurfaceBridge } from './runtime/surface-bridge.js';
3
+ export { registerClientHandler, getClientHandler, } from './runtime/client-handlers.js';
4
+ export { createInMemorySocket } from './runtime/in-memory-socket.js';
5
+ export type { InMemorySocket } from './runtime/in-memory-socket.js';
6
+ export { registerLayoutCommands } from './runtime/layout-commands.js';
7
+ export { registerOpenerCommands } from './runtime/opener-commands.js';
8
+ export type { RegisterOpenerCommandsOptions } from './runtime/opener-commands.js';
package/dist/index.js ADDED
@@ -0,0 +1,13 @@
1
+ // The package root export (`@softov/scena`).
2
+ //
3
+ // core/ is the store, the graph, the resolvers and the registries; runtime/ is
4
+ // the behaviour wired on top of a live scena — the surface bridge, the sockets,
5
+ // and the layout/opener command sets. Both are flat on the root surface, but
6
+ // they are assembled here rather than inside core/index.ts, so that core never
7
+ // imports the layer built on it.
8
+ export * from './core/index.js';
9
+ export { createSurfaceBridge } from './runtime/surface-bridge.js';
10
+ export { registerClientHandler, getClientHandler, } from './runtime/client-handlers.js';
11
+ export { createInMemorySocket } from './runtime/in-memory-socket.js';
12
+ export { registerLayoutCommands } from './runtime/layout-commands.js';
13
+ export { registerOpenerCommands } from './runtime/opener-commands.js';
@@ -14,3 +14,4 @@ export interface LimenProps {
14
14
  children?: ReactNode;
15
15
  }
16
16
  export declare function Limen({ permission, fallback, title, subtitle, top, bottom, left, right, child, children, }: LimenProps): ReactNode;
17
+ export default Limen;
@@ -12,3 +12,4 @@ export function Limen({ permission, fallback, title = 'Welcome', subtitle, top,
12
12
  return child ?? children;
13
13
  return (_jsxs("div", { className: "porta-limen", children: [top ? _jsx("div", { className: "porta-limen__top", children: top }) : null, left ? _jsx("div", { className: "porta-limen__left", children: left }) : null, _jsx("div", { className: "porta-limen__center", children: _jsxs("div", { className: "porta-limen__panel", children: [_jsx("div", { className: "porta-limen__title", children: title }), subtitle ? _jsx("div", { className: "porta-limen__subtitle", children: subtitle }) : null, fallback ?? _jsx(Suspense, { fallback: _jsx("div", { children: "Loading..." }), children: _jsx(LoginForm, {}) })] }) }), right ? _jsx("div", { className: "porta-limen__right", children: right }) : null, bottom ? _jsx("div", { className: "porta-limen__bottom", children: bottom }) : null] }));
14
14
  }
15
+ export default Limen;
@@ -8,3 +8,4 @@ export interface PortaLockProps {
8
8
  children?: ReactNode;
9
9
  }
10
10
  export declare function PortaLock({ permission, fallback, title, child, children, }: PortaLockProps): ReactNode;
11
+ export default PortaLock;
@@ -1,13 +1,17 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { lazy, Suspense } from 'react';
2
3
  import { useStore } from '../react/hooks/useStore.js';
3
4
  import { SIGILLUM_PATHS } from './sigillum.js';
4
- import { LoginForm } from '../ui/forms/LoginForm.js';
5
5
  import { hasScope } from './match.js';
6
6
  import './PortaLock.css';
7
+ const LoginForm = lazy(() => import('../ui/forms/LoginForm.js').then((module) => ({
8
+ default: module.LoginForm,
9
+ })));
7
10
  export function PortaLock({ permission, fallback, title, child, children, }) {
8
11
  const session = useStore(SIGILLUM_PATHS.session) ?? null;
9
12
  const ok = hasScope(session, permission);
10
13
  if (ok)
11
14
  return child ?? children;
12
- return (_jsxs("div", { className: "porta-locked", children: [_jsx("span", { className: "porta-locked__title", children: title ?? (permission ? `Sign in required (${permission})` : 'Sign in required') }), fallback ?? _jsx(LoginForm, {})] }));
15
+ return (_jsxs("div", { className: "porta-locked", children: [_jsx("span", { className: "porta-locked__title", children: title ?? (permission ? `Sign in required (${permission})` : 'Sign in required') }), fallback ?? (_jsx(Suspense, { fallback: null, children: _jsx(LoginForm, {}) }))] }));
13
16
  }
17
+ export default PortaLock;
@@ -6,3 +6,4 @@ export interface SigillumProps {
6
6
  children?: ReactNode;
7
7
  }
8
8
  export declare function Sigillum({ permission, fallback, child, children, }: SigillumProps): ReactNode;
9
+ export default Sigillum;
@@ -5,3 +5,4 @@ export function Sigillum({ permission, fallback = null, child, children, }) {
5
5
  const session = useStore(SIGILLUM_PATHS.session) ?? null;
6
6
  return hasScope(session, permission) ? (child ?? children) : fallback;
7
7
  }
8
+ export default Sigillum;
@@ -1,3 +1,3 @@
1
- import type { Scena } from '../types/scena.js';
1
+ import type { Scena } from '../sdk/scena.js';
2
2
  import type { PortaProvider } from './provider.js';
3
3
  export declare function registerSigillumCommands(scena: Scena, providers: Map<string, PortaProvider>): void;
@@ -1,2 +1,2 @@
1
- import type { ComponentNode } from '../types/component-graph.js';
1
+ import type { ComponentNode } from '../sdk/component-graph.js';
2
2
  export declare const loginFormBlock: ComponentNode;
@@ -1,5 +1,5 @@
1
1
  import type { ReactNode } from 'react';
2
- import type { DataBinding } from '../types/component-graph.js';
2
+ import type { DataBinding } from '../sdk/component-graph.js';
3
3
  export type ProviderLabel = string | DataBinding;
4
4
  export type PortaProviderKind = 'oauth-button' | 'form-fields' | 'otp' | 'magic-link';
5
5
  export interface AuthField {
@@ -1,3 +1,3 @@
1
- import type { Scena } from '../types/scena.js';
2
- import type { Disposable } from '../types/disposable.js';
1
+ import type { Scena } from '../sdk/scena.js';
2
+ import type { Disposable } from '../sdk/disposable.js';
3
3
  export declare function registerPortaBlocks(scena: Scena): Disposable;
@@ -1,7 +1,4 @@
1
- import { combineDisposables } from '../core/disposable.js';
2
- import { LoginForm } from '../ui/forms/LoginForm.js';
3
- import { PortaLock } from './PortaLock.js';
4
- import { Sigillum } from './SigillumGate.js';
1
+ import { combineDisposables } from '../sdk/disposable.js';
5
2
  import { Limen } from './Limen.js';
6
3
  // Registers the porta blocks as scena components so they can be referenced
7
4
  // by name from ComponentNode trees and agent-sent payloads.
@@ -14,15 +11,15 @@ export function registerPortaBlocks(scena) {
14
11
  return combineDisposables(scena.components.register({
15
12
  component: 'Porta.LoginForm',
16
13
  category: 'page',
17
- renderer: { kind: 'react', load: async () => ({ default: LoginForm }) },
14
+ renderer: { kind: 'react', load: async () => import('../ui/forms/LoginForm.js') },
18
15
  }), scena.components.register({
19
16
  component: 'Porta.PortaLock',
20
17
  category: 'page',
21
- renderer: { kind: 'react', load: async () => ({ default: PortaLock }) },
18
+ renderer: { kind: 'react', load: async () => import('./PortaLock.js') },
22
19
  }), scena.components.register({
23
20
  component: 'Porta.Sigillum',
24
21
  category: 'page',
25
- renderer: { kind: 'react', load: async () => ({ default: Sigillum }) },
22
+ renderer: { kind: 'react', load: async () => import('./SigillumGate.js') },
26
23
  }), scena.components.register({
27
24
  component: 'Porta.Limen',
28
25
  category: 'page',
@@ -1,4 +1,4 @@
1
- import type { Scena } from '../types/scena.js';
1
+ import type { Scena } from '../sdk/scena.js';
2
2
  import type { PortaProvider } from './provider.js';
3
3
  import { type Sigillum } from './sigillum.js';
4
4
  export interface CreatePortaOpts {
@@ -1,5 +1,5 @@
1
- import type { BindingPath } from '../types/component-graph.js';
2
- import type { Scena } from '../types/scena.js';
1
+ import type { BindingPath } from '../sdk/component-graph.js';
2
+ import type { Scena } from '../sdk/scena.js';
3
3
  import type { Session } from './provider.js';
4
4
  export declare const SIGILLUM_PATHS: {
5
5
  readonly session: BindingPath;
@@ -1 +1,47 @@
1
- export declare function DefaultShell(): import("react").JSX.Element;
1
+ import type { PresentationPolicy } from '../core/graph/surface-presentation.js';
2
+ export interface DefaultShellProps {
3
+ /**
4
+ * How this app's surfaces occupy space as the viewport narrows.
5
+ *
6
+ * scena ships the mechanism and no policy: whether a right sidebar floats
7
+ * before a left one is a claim about a specific app's information
8
+ * architecture. With none, every surface stays `docked` at every size, which
9
+ * is what this shell did before it read a policy at all.
10
+ */
11
+ presentation?: PresentationPolicy;
12
+ /**
13
+ * Clicking the scrim closes whatever is overlaying `main`.
14
+ *
15
+ * On by default because a drawer that cannot be dismissed by tapping beside
16
+ * it is a trap on the size of screen that produces drawers in the first
17
+ * place. Pass false for an app that wants a modal drawer.
18
+ */
19
+ dismissOnScrim?: boolean;
20
+ }
21
+ /**
22
+ * Minimal flex shell.
23
+ *
24
+ * Each surface renders through `SurfaceArea`, which delegates to the layout
25
+ * registered for it (tab / split / stack / rail / inline / floating), and is
26
+ * stamped with the edge it closes on and the kind of region it is so that CSS
27
+ * can style it without matching its name.
28
+ *
29
+ * Two things it deliberately does itself rather than leaving to the app,
30
+ * because every app was otherwise writing them:
31
+ *
32
+ * - it resolves the presentation policy per surface, so a sidebar lifts over
33
+ * `main` on a narrow viewport instead of taking width from it;
34
+ * - it renders the scrim when something is lifted, and closes on a click.
35
+ *
36
+ * Resizing is by each surface's own edge (`SurfaceArea`'s `resize` prop) rather
37
+ * than by a `ShellSplitter` placed beside it. The two are alternatives: a
38
+ * splitter is an element between two surfaces, which means a shell has to know
39
+ * the arrangement well enough to place one, and it has nothing to sit against
40
+ * once a surface floats. Self-edge resize travels with the surface and stands
41
+ * down on its own when the presentation is not `docked`. `ShellSplitter` is
42
+ * still exported for shells that want the explicit version.
43
+ *
44
+ * An app that wants different chrome composes `SurfaceArea` itself -- see the
45
+ * playground's CustomShell.
46
+ */
47
+ export declare function DefaultShell({ presentation, dismissOnScrim }?: DefaultShellProps): import("react").JSX.Element;
@@ -1,14 +1,48 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { isOverlaid, resolveSurfacePresentation } from '../core/graph/surface-presentation.js';
3
+ import { useScena } from './ScenaProvider.js';
2
4
  import { useLayout } from './hooks/useLayout.js';
5
+ import { useStore } from './hooks/useStore.js';
3
6
  import { SurfaceArea } from './SurfaceArea.js';
4
- import { ShellSplitter } from './ShellSplitter.js';
5
- // Minimal flex shell. Each surface is rendered via SurfaceArea, which
6
- // delegates to the registered layout for that surface (tab / split / stack /
7
- // rail / inline / floating). Apps that want a different chrome layout can
8
- // compose SurfaceArea + ShellSplitter directly — see web-next/CustomShell.
9
- export function DefaultShell() {
7
+ // Surfaces that can end up lifted over `main`, in the order the scrim closes
8
+ // them. `main`, the bars and the rail are never overlaid by this shell -- a
9
+ // `bar` presentation keeps occupying its edge, so nothing covers anything.
10
+ const OVERLAYABLE = ['sidebar:left', 'sidebar:right', 'panel:bottom'];
11
+ /**
12
+ * Minimal flex shell.
13
+ *
14
+ * Each surface renders through `SurfaceArea`, which delegates to the layout
15
+ * registered for it (tab / split / stack / rail / inline / floating), and is
16
+ * stamped with the edge it closes on and the kind of region it is so that CSS
17
+ * can style it without matching its name.
18
+ *
19
+ * Two things it deliberately does itself rather than leaving to the app,
20
+ * because every app was otherwise writing them:
21
+ *
22
+ * - it resolves the presentation policy per surface, so a sidebar lifts over
23
+ * `main` on a narrow viewport instead of taking width from it;
24
+ * - it renders the scrim when something is lifted, and closes on a click.
25
+ *
26
+ * Resizing is by each surface's own edge (`SurfaceArea`'s `resize` prop) rather
27
+ * than by a `ShellSplitter` placed beside it. The two are alternatives: a
28
+ * splitter is an element between two surfaces, which means a shell has to know
29
+ * the arrangement well enough to place one, and it has nothing to sit against
30
+ * once a surface floats. Self-edge resize travels with the surface and stands
31
+ * down on its own when the presentation is not `docked`. `ShellSplitter` is
32
+ * still exported for shells that want the explicit version.
33
+ *
34
+ * An app that wants different chrome composes `SurfaceArea` itself -- see the
35
+ * playground's CustomShell.
36
+ */
37
+ export function DefaultShell({ presentation, dismissOnScrim = true } = {}) {
38
+ const scena = useScena();
10
39
  const layout = useLayout();
11
40
  const surfaces = layout.surfaces;
41
+ // `$/modus/class` is published by the modus backend. Without it registered
42
+ // there is no size class to resolve against, and `large` keeps everything
43
+ // docked -- the same as having no policy.
44
+ const modus = useStore('$/modus/class') ?? 'large';
45
+ const presentationOf = (surface) => resolveSurfacePresentation(surface, modus, presentation);
12
46
  const sidebarLeftWidth = surfaces['sidebar:left']?.size ?? 240;
13
47
  const sidebarRightWidth = surfaces['sidebar:right']?.size ?? 280;
14
48
  const panelBottomHeight = surfaces['panel:bottom']?.size ?? 200;
@@ -18,17 +52,52 @@ export function DefaultShell() {
18
52
  const activitybarVisible = surfaces['activitybar']?.visible ?? true;
19
53
  const statusbarVisible = surfaces['statusbar']?.visible ?? true;
20
54
  const titlebarVisible = surfaces['titlebar']?.visible ?? true;
55
+ const leftPresentation = presentationOf('sidebar:left');
56
+ const rightPresentation = presentationOf('sidebar:right');
57
+ const bottomPresentation = presentationOf('panel:bottom');
58
+ const visibleOf = {
59
+ 'sidebar:left': sidebarLeftVisible,
60
+ 'sidebar:right': sidebarRightVisible,
61
+ 'panel:bottom': panelBottomVisible,
62
+ };
63
+ // Something is over `main` right now. `bar` is excluded by `isOverlaid`,
64
+ // which is the point of asking it rather than comparing the size class:
65
+ // a rail rotated to the bottom edge still occupies that edge.
66
+ const lifted = OVERLAYABLE.filter((surface) => visibleOf[surface] && isOverlaid(presentationOf(surface)));
67
+ // An overlaid surface takes no width from `main`, so the flex sizing that
68
+ // would reserve it has to stand down as well -- otherwise the drawer floats
69
+ // over a `main` that is still short by the drawer's width.
70
+ const dockedStyle = (docked, style) => (docked ? style : undefined);
71
+ function closeLifted() {
72
+ for (const surface of lifted) {
73
+ scena.layout.setSurface(surface, { ...surfaces[surface], visible: false });
74
+ }
75
+ }
21
76
  return (_jsxs("div", { className: "oo-shell", style: {
22
77
  display: 'flex',
23
78
  flexDirection: 'column',
24
79
  height: '100vh',
25
80
  width: '100vw',
26
81
  overflow: 'hidden',
27
- }, children: [titlebarVisible ? _jsx(SurfaceArea, { surface: "titlebar", layout: "bar" }) : null, _jsxs("div", { style: { display: 'flex', flex: 1, minHeight: 0, overflow: 'hidden' }, children: [activitybarVisible ? _jsx(SurfaceArea, { surface: "activitybar", layout: "rail" }) : null, sidebarLeftVisible ? (_jsxs(_Fragment, { children: [_jsx(SurfaceArea, { surface: "sidebar:left", layout: "stack", style: { width: sidebarLeftWidth, flex: '0 0 auto', overflow: 'hidden' } }), _jsx(ShellSplitter, { surface: "sidebar:left", orientation: "vertical", min: 120, max: 600 })] })) : null, _jsxs("div", { style: { flex: 1, minWidth: 0, display: 'flex', flexDirection: 'column' }, children: [_jsx(SurfaceArea, { surface: "main", layout: "tab", style: { flex: 1, minHeight: 0, overflow: 'hidden' } }), panelBottomVisible ? (_jsxs(_Fragment, { children: [_jsx(ShellSplitter, { surface: "panel:bottom", orientation: "horizontal", invert: true, min: 80, max: 500 }), _jsx(SurfaceArea, { surface: "panel:bottom", layout: "tab", style: {
28
- height: panelBottomHeight,
29
- flex: '0 0 auto',
30
- overflow: 'hidden',
31
- } })] })) : null] }), sidebarRightVisible ? (_jsxs(_Fragment, { children: [_jsx(ShellSplitter, { surface: "sidebar:right", orientation: "vertical", invert: true, min: 160, max: 600 }), _jsx(SurfaceArea, { surface: "sidebar:right", layout: "stack", style: { width: sidebarRightWidth, flex: '0 0 auto', overflow: 'hidden' } })] })) : null] }), statusbarVisible ? _jsx(SurfaceArea, { surface: "statusbar", layout: "bar" }) : null, _jsx(SurfaceArea, { surface: "overlay", layout: "floating", style: {
82
+ }, children: [titlebarVisible ? (_jsx(SurfaceArea, { surface: "titlebar", layout: "bar", role: "bar", edge: "block-end" })) : null, _jsxs("div", { style: {
83
+ display: 'flex',
84
+ flex: 1,
85
+ minHeight: 0,
86
+ overflow: 'hidden',
87
+ position: 'relative',
88
+ }, children: [activitybarVisible ? (_jsx(SurfaceArea, { surface: "activitybar", layout: "rail", role: "rail", edge: "inline-end", presentation: presentationOf('activitybar') })) : null, sidebarLeftVisible ? (_jsx(SurfaceArea, { surface: "sidebar:left", layout: "stack", role: "panel", edge: "inline-end", presentation: leftPresentation, resize: { edge: 'right', min: 120, max: 600 }, style: dockedStyle(!isOverlaid(leftPresentation), {
89
+ width: sidebarLeftWidth,
90
+ flex: '0 0 auto',
91
+ overflow: 'hidden',
92
+ }) })) : null, _jsxs("div", { style: { flex: 1, minWidth: 0, display: 'flex', flexDirection: 'column' }, children: [_jsx(SurfaceArea, { surface: "main", layout: "tab", role: "main", style: { flex: 1, minHeight: 0, overflow: 'hidden' } }), panelBottomVisible ? (_jsx(SurfaceArea, { surface: "panel:bottom", layout: "tab", role: "panel", edge: "block-start", presentation: bottomPresentation, resize: { edge: 'top', min: 80, max: 500 }, style: dockedStyle(!isOverlaid(bottomPresentation), {
93
+ height: panelBottomHeight,
94
+ flex: '0 0 auto',
95
+ overflow: 'hidden',
96
+ }) })) : null] }), sidebarRightVisible ? (_jsx(SurfaceArea, { surface: "sidebar:right", layout: "stack", role: "panel", edge: "inline-start", presentation: rightPresentation, resize: { edge: 'left', min: 160, max: 600 }, style: dockedStyle(!isOverlaid(rightPresentation), {
97
+ width: sidebarRightWidth,
98
+ flex: '0 0 auto',
99
+ overflow: 'hidden',
100
+ }) })) : null, lifted.length > 0 ? (dismissOnScrim ? (_jsx("button", { type: "button", className: "oo-surface-scrim", "aria-label": "Close", onClick: closeLifted })) : (_jsx("div", { className: "oo-surface-scrim", "aria-hidden": "true" }))) : null] }), statusbarVisible ? (_jsx(SurfaceArea, { surface: "statusbar", layout: "bar", role: "bar", edge: "block-start" })) : null, _jsx(SurfaceArea, { surface: "overlay", layout: "floating", role: "overlay", style: {
32
101
  position: 'fixed',
33
102
  inset: 0,
34
103
  pointerEvents: 'none',
@@ -1,6 +1,6 @@
1
1
  import { type ReactNode } from 'react';
2
- import type { Scena as ScenaInstance } from '../types/scena.js';
3
- import type { CreateScenaOptions } from '../types/scena.js';
2
+ import type { Scena as ScenaInstance } from '../sdk/scena.js';
3
+ import type { CreateScenaOptions } from '../sdk/scena.js';
4
4
  export interface ScenaComponentProps {
5
5
  options?: CreateScenaOptions;
6
6
  onRender?: (scena: ScenaInstance) => void;
@@ -1,5 +1,5 @@
1
1
  import { type ReactNode } from 'react';
2
- import type { Scena } from '../types/scena.js';
2
+ import type { Scena } from '../sdk/scena.js';
3
3
  export interface ScenaProviderProps {
4
4
  scena: Scena;
5
5
  children: ReactNode;
@@ -1,5 +1,5 @@
1
1
  import { type CSSProperties } from 'react';
2
- import type { SurfaceName } from '../types/mount-surface.js';
2
+ import type { SurfaceName } from '../sdk/mount-surface.js';
3
3
  export interface ShellSplitterProps {
4
4
  surface: SurfaceName;
5
5
  orientation: 'vertical' | 'horizontal';
@@ -1,6 +1,6 @@
1
1
  import { type CSSProperties } from 'react';
2
- import type { SurfacePresentation } from '../types/layout.js';
3
- import type { SurfaceName } from '../types/mount-surface.js';
2
+ import type { SurfaceEdge, SurfacePresentation, SurfaceRole } from '../sdk/layout.js';
3
+ import type { SurfaceName } from '../sdk/mount-surface.js';
4
4
  import { type SurfaceResizeSpec } from './useSurfaceResize.js';
5
5
  export interface SurfaceAreaProps {
6
6
  surface: SurfaceName;
@@ -9,5 +9,7 @@ export interface SurfaceAreaProps {
9
9
  className?: string;
10
10
  presentation?: SurfacePresentation;
11
11
  resize?: SurfaceResizeSpec;
12
+ edge?: SurfaceEdge;
13
+ role?: SurfaceRole;
12
14
  }
13
- export declare function SurfaceArea({ surface, layout, style, className, presentation, resize, }: SurfaceAreaProps): import("react").JSX.Element;
15
+ export declare function SurfaceArea({ surface, layout, style, className, presentation, resize, edge, role, }: SurfaceAreaProps): import("react").JSX.Element;
@@ -11,7 +11,7 @@ function renderOneMount(mount) {
11
11
  function FallbackLayout({ mounts }) {
12
12
  return (_jsx(_Fragment, { children: mounts.map((m) => (_jsx("div", { style: { display: 'contents' }, children: renderOneMount(m) }, m.key))) }));
13
13
  }
14
- export function SurfaceArea({ surface, layout, style, className, presentation = 'docked', resize, }) {
14
+ export function SurfaceArea({ surface, layout, style, className, presentation = 'docked', resize, edge, role, }) {
15
15
  const scena = useScena();
16
16
  const layoutState = useLayout();
17
17
  const mounts = useMounts(surface);
@@ -60,7 +60,7 @@ export function SurfaceArea({ surface, layout, style, className, presentation =
60
60
  });
61
61
  },
62
62
  };
63
- return (_jsx("div", { "data-surface": surface, "data-presentation": presentation, className: [
63
+ return (_jsx("div", { "data-surface": surface, "data-presentation": presentation, "data-surface-edge": edge, "data-surface-role": role, className: [
64
64
  'oo-surface',
65
65
  `oo-surface--${surface.replace(':', '-')}`,
66
66
  className,
@@ -1,5 +1,5 @@
1
1
  import { type ReactNode } from 'react';
2
- import type { BindingPath, ComponentNode } from '../types/component-graph.js';
2
+ import type { BindingPath, ComponentNode } from '../sdk/component-graph.js';
3
3
  interface ViewMountProps {
4
4
  node: ComponentNode;
5
5
  }
@@ -1,11 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useCallback, useEffect, useReducer, useRef, useState, } from 'react';
3
- import { isAction, isComponentNode, isDataBinding, isDynamicChildList, isFunctionCall, } from '../types/component-graph.js';
3
+ import { isAction, isComponentNode, isDataBinding, isDynamicChildList, isFunctionCall, } from '../sdk/component-graph.js';
4
4
  import { useScena } from './ScenaProvider.js';
5
5
  import { DataContextContext, MountContext, WriteContext, useCurrentMountKey, useDataContext, } from './mount-context.js';
6
- import { joinAbsolute, readPath } from '../core/path-resolver.js';
7
- import { resolveAction, resolveDynamicValue, writeDynamic, } from '../core/dynamic-resolver.js';
8
- import { rewriteLocal } from '../core/reactive-store.js';
6
+ import { joinAbsolute, readPath } from '../core/resolve/path-resolver.js';
7
+ import { resolveAction, resolveDynamicValue, writeDynamic, } from '../core/resolve/dynamic-resolver.js';
8
+ import { rewriteLocal } from '../core/store/reactive-store.js';
9
9
  const RESERVED_KEYS = new Set(['id', 'component', '$meta']);
10
10
  const reactComponentCache = new WeakMap();
11
11
  const reactLoadingPromises = new WeakMap();
@@ -1,4 +1,4 @@
1
- import { type LocaleInfo, type TranslateOptions } from '../../i18n/registry.js';
1
+ import { type LocaleInfo, type TranslateOptions } from '../../core/i18n/registry.js';
2
2
  export interface UseI18nResult {
3
3
  t: (key: string, fallbackOrOptions?: string | TranslateOptions) => string;
4
4
  locale: string;
@@ -1,5 +1,5 @@
1
1
  import { useCallback, useSyncExternalStore } from 'react';
2
- import { subscribeI18n, getLocale, getLocaleInfo, listLocaleInfo, translate, setLocale, } from '../../i18n/registry.js';
2
+ import { subscribeI18n, getLocale, getLocaleInfo, listLocaleInfo, translate, setLocale, } from '../../core/i18n/registry.js';
3
3
  // Reactive translation for hand-written React. Subscribes to the i18n registry,
4
4
  // so the component re-renders on locale switch / message registration. Optional
5
5
  // `namespace` is prefixed to every key. For declarative ComponentNodes, bind
@@ -1,2 +1,2 @@
1
- import type { Label } from '../../types/label.js';
1
+ import type { Label } from '../../sdk/label.js';
2
2
  export declare function useLabel(label?: Label): string;
@@ -1,6 +1,6 @@
1
1
  import { useStore } from './useStore.js';
2
2
  import { useI18n } from './useI18n.js';
3
- import { translate } from '../../i18n/registry.js';
3
+ import { translate } from '../../core/i18n/registry.js';
4
4
  // Resolve a Label (string | { path } | { t }) reactively: `{ path }` follows the
5
5
  // store, `{ t }` follows the locale, a string is returned as-is.
6
6
  export function useLabel(label) {
@@ -1,2 +1,2 @@
1
- import type { ScenaLayout } from '../../types/layout.js';
1
+ import type { ScenaLayout } from '../../sdk/layout.js';
2
2
  export declare function useLayout(): ScenaLayout;
@@ -1,2 +1,2 @@
1
- import type { ResolvedMount, SurfaceName } from '../../types/mount-surface.js';
1
+ import type { ResolvedMount, SurfaceName } from '../../sdk/mount-surface.js';
2
2
  export declare function useMounts(surface: SurfaceName): ResolvedMount[];
@@ -1,3 +1,3 @@
1
- import type { BindingPath } from '../../types/component-graph.js';
1
+ import type { BindingPath } from '../../sdk/component-graph.js';
2
2
  export declare function useStore<T = unknown>(path: BindingPath | undefined, dataContextOverride?: BindingPath): T | undefined;
3
3
  export declare function useStoreSetter(): (path: BindingPath, value: unknown) => void;
@@ -1,8 +1,8 @@
1
1
  import { useMemo, useSyncExternalStore } from 'react';
2
2
  import { useScena } from '../ScenaProvider.js';
3
3
  import { useCurrentMountKey, useDataContext } from '../mount-context.js';
4
- import { rewriteLocal } from '../../core/reactive-store.js';
5
- import { joinAbsolute, readPath } from '../../core/path-resolver.js';
4
+ import { rewriteLocal } from '../../core/store/reactive-store.js';
5
+ import { joinAbsolute, readPath } from '../../core/resolve/path-resolver.js';
6
6
  function resolveForRead(path, mountKey, dataContext) {
7
7
  if (path.startsWith('/') && !path.startsWith('$/')) {
8
8
  return joinAbsolute(dataContext, path);