@almadar/ui 5.152.0 → 5.154.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/{EntityBindingContext-CD9ZoXb4.d.cts → EntityBindingContext-BfZGeDfX.d.cts} +4 -2
  2. package/dist/{EntityBindingContext-CD9ZoXb4.d.ts → EntityBindingContext-BfZGeDfX.d.ts} +4 -2
  3. package/dist/NavStackContext-BoVV9nWb.d.cts +83 -0
  4. package/dist/NavStackContext-BoVV9nWb.d.ts +83 -0
  5. package/dist/avl/index.cjs +571 -76
  6. package/dist/avl/index.js +572 -77
  7. package/dist/{avl-schema-parser-Cx_4SVg9.d.ts → avl-schema-parser-CLIm28Wa.d.ts} +1 -1
  8. package/dist/{avl-schema-parser-CVzkNzg7.d.cts → avl-schema-parser-Do_LPV1o.d.cts} +1 -1
  9. package/dist/{cn-DJTUjk1M.d.ts → cn-CFurBb2q.d.ts} +1 -1
  10. package/dist/{cn-BnAJZcNb.d.cts → cn-TH-RHihd.d.cts} +1 -1
  11. package/dist/components/index.cjs +502 -52
  12. package/dist/components/index.d.cts +58 -9
  13. package/dist/components/index.d.ts +58 -9
  14. package/dist/components/index.js +501 -55
  15. package/dist/hooks/index.cjs +4 -0
  16. package/dist/hooks/index.d.cts +1 -0
  17. package/dist/hooks/index.d.ts +1 -0
  18. package/dist/hooks/index.js +1 -0
  19. package/dist/lib/drawable/three/index.cjs +212 -0
  20. package/dist/lib/drawable/three/index.d.cts +3 -3
  21. package/dist/lib/drawable/three/index.d.ts +3 -3
  22. package/dist/lib/drawable/three/index.js +212 -0
  23. package/dist/lib/index.d.cts +2 -2
  24. package/dist/lib/index.d.ts +2 -2
  25. package/dist/{paintDispatch-CxdLjHQq.d.ts → paintDispatch-B5n2DTB-.d.ts} +178 -2
  26. package/dist/{paintDispatch-BjZjUbcb.d.cts → paintDispatch-DgBctxIq.d.cts} +178 -2
  27. package/dist/providers/index.cjs +677 -59
  28. package/dist/providers/index.d.cts +2 -1
  29. package/dist/providers/index.d.ts +2 -1
  30. package/dist/providers/index.js +677 -62
  31. package/dist/runtime/index.cjs +570 -75
  32. package/dist/runtime/index.d.cts +12 -5
  33. package/dist/runtime/index.d.ts +12 -5
  34. package/dist/runtime/index.js +571 -76
  35. package/package.json +4 -4
@@ -84,7 +84,7 @@ declare function useEntitySchema(): EntitySchemaContextValue;
84
84
  declare function useEntitySchemaOptional(): EntitySchemaContextValue | null;
85
85
 
86
86
  /** Wire-format client effect tuple from the server response. */
87
- type ClientEffectTuple = ['render-ui', string, AnyPatternConfig | null, ...SExpr[]] | ['navigate', string, ...SExpr[]] | ['notify', string, ...SExpr[]];
87
+ type ClientEffectTuple = ['render-ui', string, AnyPatternConfig | null, ...SExpr[]] | ['navigate', string, ...SExpr[]] | ['navigate-back'] | ['notify', string, ...SExpr[]];
88
88
  interface OrbitalEventResponse {
89
89
  success: boolean;
90
90
  transitioned: boolean;
@@ -114,11 +114,13 @@ interface OrbitalEventResponse {
114
114
  error?: string;
115
115
  }
116
116
  interface ServerClientEffect {
117
- type: 'render-ui' | 'navigate' | 'notify';
117
+ type: 'render-ui' | 'navigate' | 'navigate-back' | 'notify';
118
118
  slot?: string;
119
119
  pattern?: AnyPatternConfig;
120
120
  route?: string;
121
121
  params?: EventPayload;
122
+ /** Nav-stack entry label carried by the navigate effect's options. */
123
+ crumb?: string;
122
124
  message?: string;
123
125
  /**
124
126
  * Trait that emitted this effect. Used by `<TraitFrame>` to resolve
@@ -84,7 +84,7 @@ declare function useEntitySchema(): EntitySchemaContextValue;
84
84
  declare function useEntitySchemaOptional(): EntitySchemaContextValue | null;
85
85
 
86
86
  /** Wire-format client effect tuple from the server response. */
87
- type ClientEffectTuple = ['render-ui', string, AnyPatternConfig | null, ...SExpr[]] | ['navigate', string, ...SExpr[]] | ['notify', string, ...SExpr[]];
87
+ type ClientEffectTuple = ['render-ui', string, AnyPatternConfig | null, ...SExpr[]] | ['navigate', string, ...SExpr[]] | ['navigate-back'] | ['notify', string, ...SExpr[]];
88
88
  interface OrbitalEventResponse {
89
89
  success: boolean;
90
90
  transitioned: boolean;
@@ -114,11 +114,13 @@ interface OrbitalEventResponse {
114
114
  error?: string;
115
115
  }
116
116
  interface ServerClientEffect {
117
- type: 'render-ui' | 'navigate' | 'notify';
117
+ type: 'render-ui' | 'navigate' | 'navigate-back' | 'notify';
118
118
  slot?: string;
119
119
  pattern?: AnyPatternConfig;
120
120
  route?: string;
121
121
  params?: EventPayload;
122
+ /** Nav-stack entry label carried by the navigate effect's options. */
123
+ crumb?: string;
122
124
  message?: string;
123
125
  /**
124
126
  * Trait that emitted this effect. Used by `<TraitFrame>` to resolve
@@ -0,0 +1,83 @@
1
+ import React__default from 'react';
2
+ import { NavStackEntry } from '@almadar/core';
3
+
4
+ /**
5
+ * Navigation-stack core — the pure logic behind the orbital-scoped
6
+ * client-session navigation stack both execution paths share.
7
+ *
8
+ * The stack is what detail-page breadcrumb bands and the `navigate-back`
9
+ * effect read. It lives client-side only (per browser tab): the runtime
10
+ * path's OrbPreview and the compiled app's App.tsx both mount
11
+ * `NavStackProvider` (providers/NavStackContext.tsx), which drives this
12
+ * module on every route change.
13
+ *
14
+ * Semantics (deterministic):
15
+ * - One stack per ORBITAL, keyed by the orbital owning the current page.
16
+ * - On route change: an entry with the same href already in the stack
17
+ * truncates back to it (revisit); otherwise the new entry is pushed.
18
+ * - Cold load (deep link): the stack seeds from the declared page-path
19
+ * hierarchy — every declared page whose pattern matches a strict prefix
20
+ * of the concrete path becomes an ancestor entry — so the trail is never
21
+ * empty and back always has a target on nested paths.
22
+ * - Entry label = the `crumb` carried by the navigate effect when one was
23
+ * staged for this href, else the page's declared name humanized.
24
+ */
25
+
26
+ /** One declared page as the nav stack needs it: path pattern + name + owning orbital. */
27
+ interface NavPageDecl {
28
+ path: string;
29
+ name: string;
30
+ orbital: string;
31
+ }
32
+
33
+ /**
34
+ * NavStackProvider — the orbital-scoped client-session navigation stack.
35
+ *
36
+ * One provider instance per app host. Both execution paths mount it:
37
+ * - Runtime path: OrbPreview supplies `currentPath` + `navigate` explicitly.
38
+ * - Compiled path: the emitted App.tsx mounts `NavStackRouterBridge`, which
39
+ * reads react-router's location/navigate and renders this provider.
40
+ *
41
+ * Pure stack semantics live in lib/navStack.ts (one owner for both paths).
42
+ * State persists to sessionStorage (per-tab) so a compiled app's full page
43
+ * reload keeps the trail; every storage access is guarded with an in-memory
44
+ * fallback.
45
+ */
46
+
47
+ interface NavStackApi {
48
+ /** Stack of the current page's orbital, root-first (empty when no declared page matches). */
49
+ entries: readonly NavStackEntry[];
50
+ /** True when a previous entry exists for the current page's orbital. */
51
+ canGoBack: boolean;
52
+ /** Stage the crumb label for the entry the target page will record, then call navigate yourself. */
53
+ beginNavigate: (href: string, crumb?: string) => void;
54
+ /** Pop the current orbital's stack: navigate to the previous entry (no-op without one). */
55
+ back: () => void;
56
+ /** Navigate to an arbitrary stack entry (breadcrumb click). */
57
+ goTo: (href: string) => void;
58
+ }
59
+ declare function useNavStack(): NavStackApi;
60
+ interface NavStackProviderProps {
61
+ pages: readonly NavPageDecl[];
62
+ /** Concrete current path (route params substituted), e.g. /contracts/42. */
63
+ currentPath: string;
64
+ /** Host navigation function (SPA route change). */
65
+ navigate: (path: string) => void;
66
+ /** sessionStorage key; omit to keep the stack in memory only. */
67
+ storageKey?: string;
68
+ children: React__default.ReactNode;
69
+ }
70
+ declare const NavStackProvider: React__default.FC<NavStackProviderProps>;
71
+ interface NavStackRouterBridgeProps {
72
+ pages: readonly NavPageDecl[];
73
+ storageKey?: string;
74
+ children: React__default.ReactNode;
75
+ }
76
+ /**
77
+ * Compiled-path host: binds NavStackProvider to react-router. Must render
78
+ * inside a Router (the emitted App.tsx mounts it directly under
79
+ * BrowserRouter).
80
+ */
81
+ declare const NavStackRouterBridge: React__default.FC<NavStackRouterBridgeProps>;
82
+
83
+ export { type NavPageDecl as N, type NavStackApi as a, NavStackProvider as b, type NavStackProviderProps as c, NavStackRouterBridge as d, type NavStackRouterBridgeProps as e, useNavStack as u };
@@ -0,0 +1,83 @@
1
+ import React__default from 'react';
2
+ import { NavStackEntry } from '@almadar/core';
3
+
4
+ /**
5
+ * Navigation-stack core — the pure logic behind the orbital-scoped
6
+ * client-session navigation stack both execution paths share.
7
+ *
8
+ * The stack is what detail-page breadcrumb bands and the `navigate-back`
9
+ * effect read. It lives client-side only (per browser tab): the runtime
10
+ * path's OrbPreview and the compiled app's App.tsx both mount
11
+ * `NavStackProvider` (providers/NavStackContext.tsx), which drives this
12
+ * module on every route change.
13
+ *
14
+ * Semantics (deterministic):
15
+ * - One stack per ORBITAL, keyed by the orbital owning the current page.
16
+ * - On route change: an entry with the same href already in the stack
17
+ * truncates back to it (revisit); otherwise the new entry is pushed.
18
+ * - Cold load (deep link): the stack seeds from the declared page-path
19
+ * hierarchy — every declared page whose pattern matches a strict prefix
20
+ * of the concrete path becomes an ancestor entry — so the trail is never
21
+ * empty and back always has a target on nested paths.
22
+ * - Entry label = the `crumb` carried by the navigate effect when one was
23
+ * staged for this href, else the page's declared name humanized.
24
+ */
25
+
26
+ /** One declared page as the nav stack needs it: path pattern + name + owning orbital. */
27
+ interface NavPageDecl {
28
+ path: string;
29
+ name: string;
30
+ orbital: string;
31
+ }
32
+
33
+ /**
34
+ * NavStackProvider — the orbital-scoped client-session navigation stack.
35
+ *
36
+ * One provider instance per app host. Both execution paths mount it:
37
+ * - Runtime path: OrbPreview supplies `currentPath` + `navigate` explicitly.
38
+ * - Compiled path: the emitted App.tsx mounts `NavStackRouterBridge`, which
39
+ * reads react-router's location/navigate and renders this provider.
40
+ *
41
+ * Pure stack semantics live in lib/navStack.ts (one owner for both paths).
42
+ * State persists to sessionStorage (per-tab) so a compiled app's full page
43
+ * reload keeps the trail; every storage access is guarded with an in-memory
44
+ * fallback.
45
+ */
46
+
47
+ interface NavStackApi {
48
+ /** Stack of the current page's orbital, root-first (empty when no declared page matches). */
49
+ entries: readonly NavStackEntry[];
50
+ /** True when a previous entry exists for the current page's orbital. */
51
+ canGoBack: boolean;
52
+ /** Stage the crumb label for the entry the target page will record, then call navigate yourself. */
53
+ beginNavigate: (href: string, crumb?: string) => void;
54
+ /** Pop the current orbital's stack: navigate to the previous entry (no-op without one). */
55
+ back: () => void;
56
+ /** Navigate to an arbitrary stack entry (breadcrumb click). */
57
+ goTo: (href: string) => void;
58
+ }
59
+ declare function useNavStack(): NavStackApi;
60
+ interface NavStackProviderProps {
61
+ pages: readonly NavPageDecl[];
62
+ /** Concrete current path (route params substituted), e.g. /contracts/42. */
63
+ currentPath: string;
64
+ /** Host navigation function (SPA route change). */
65
+ navigate: (path: string) => void;
66
+ /** sessionStorage key; omit to keep the stack in memory only. */
67
+ storageKey?: string;
68
+ children: React__default.ReactNode;
69
+ }
70
+ declare const NavStackProvider: React__default.FC<NavStackProviderProps>;
71
+ interface NavStackRouterBridgeProps {
72
+ pages: readonly NavPageDecl[];
73
+ storageKey?: string;
74
+ children: React__default.ReactNode;
75
+ }
76
+ /**
77
+ * Compiled-path host: binds NavStackProvider to react-router. Must render
78
+ * inside a Router (the emitted App.tsx mounts it directly under
79
+ * BrowserRouter).
80
+ */
81
+ declare const NavStackRouterBridge: React__default.FC<NavStackRouterBridgeProps>;
82
+
83
+ export { type NavPageDecl as N, type NavStackApi as a, NavStackProvider as b, type NavStackProviderProps as c, NavStackRouterBridge as d, type NavStackRouterBridgeProps as e, useNavStack as u };