@almadar/ui 6.59.0 → 6.62.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 (91) hide show
  1. package/dist/BehaviorValueFrame-3ORZHPWQ.css +1252 -0
  2. package/dist/BehaviorValueFrame-QYFJEMN5.js +18 -0
  3. package/dist/TraitValueFrame-2WMYJOA5.css +1252 -0
  4. package/dist/TraitValueFrame-X6IL3UST.js +17 -0
  5. package/dist/Typography-KBATMU2V.js +5 -0
  6. package/dist/{UISlotRenderer-YNY7V2UJ.js → UISlotRenderer-NZBV5BUI.js} +12 -10
  7. package/dist/avl/index.cjs +32263 -28103
  8. package/dist/avl/index.d.ts +36 -13
  9. package/dist/avl/index.js +298 -6130
  10. package/dist/{avl-3d-context-BpBKZIbc.d.ts → avl-3d-context-Dxun3-ri.d.ts} +2 -0
  11. package/dist/{chunk-YYYHH5BA.js → chunk-7JRWELUC.js} +4 -6
  12. package/dist/{chunk-723MJUU3.js → chunk-CXQENFO2.js} +1 -1
  13. package/dist/chunk-D4NAA2JW.js +49 -0
  14. package/dist/{chunk-I5QOYW2Z.js → chunk-DXPCAQJU.js} +205 -2
  15. package/dist/{chunk-J755QADM.js → chunk-EDPUQ2ZJ.js} +327 -18
  16. package/dist/{chunk-4ZGXIW3B.js → chunk-ERDYADVZ.js} +1 -1
  17. package/dist/{chunk-7CVXM2KS.js → chunk-EZ5FSNOE.js} +2 -2
  18. package/dist/{chunk-E6MWYQVZ.js → chunk-G6EFTACU.js} +9713 -786
  19. package/dist/{chunk-MZIDOJMD.js → chunk-GVQOTA7T.js} +2 -1
  20. package/dist/{chunk-Q47ZN2DW.js → chunk-N23SVGTH.js} +83 -1
  21. package/dist/{chunk-KJGVLXEN.js → chunk-N4IJS5DD.js} +50 -116
  22. package/dist/{chunk-LZRW6GXG.js → chunk-QOV3TUAA.js} +2 -3
  23. package/dist/chunk-WBWXBA5H.js +434 -0
  24. package/dist/{chunk-V3FGTQUE.js → chunk-ZR45FGW3.js} +7 -1
  25. package/dist/{cn-DIql5232.d.ts → cn-CDIhHCUC.d.ts} +40 -16
  26. package/dist/components/index.cjs +14779 -4354
  27. package/dist/components/index.d.ts +200 -180
  28. package/dist/components/index.js +16 -17
  29. package/dist/context/index.cjs +9 -1
  30. package/dist/context/index.js +3 -1
  31. package/dist/hooks/index.cjs +78 -9
  32. package/dist/hooks/index.d.ts +43 -2
  33. package/dist/hooks/index.js +6 -7
  34. package/dist/lib/drawable/three/index.cjs +361 -27
  35. package/dist/lib/drawable/three/index.d.ts +2 -2
  36. package/dist/lib/drawable/three/index.js +28 -7
  37. package/dist/lib/index.cjs +117 -5
  38. package/dist/lib/index.d.ts +2 -2
  39. package/dist/lib/index.js +99 -6
  40. package/dist/locales/index.cjs +6 -9
  41. package/dist/locales/index.js +2 -2
  42. package/dist/providers/index.cjs +14137 -1311
  43. package/dist/providers/index.d.ts +36 -4
  44. package/dist/providers/index.js +37 -17
  45. package/dist/runtime/index.cjs +28769 -18640
  46. package/dist/runtime/index.d.ts +70 -3
  47. package/dist/runtime/index.js +15 -381
  48. package/dist/ssr/index.cjs +508 -134
  49. package/dist/ssr/index.d.cts +56 -4
  50. package/dist/ssr/index.d.ts +56 -4
  51. package/dist/ssr/index.js +446 -72
  52. package/dist/{verificationRegistry-B3dj1Zl8.d.ts → verificationRegistry-B5aGl7WF.d.ts} +2 -1
  53. package/locales/ar.json +2 -3
  54. package/locales/en.json +2 -3
  55. package/locales/sl.json +2 -3
  56. package/package.json +8 -8
  57. package/tailwind-preset.cjs +78 -8
  58. package/themes/_base.css +27 -0
  59. package/themes/_contract.md +6 -0
  60. package/themes/_fonts.css +4 -4
  61. package/themes/_foundation.css +11 -0
  62. package/themes/_presets.css +2 -0
  63. package/themes/almadar-website.css +10 -0
  64. package/themes/almadar.css +10 -0
  65. package/themes/atelier.css +10 -0
  66. package/themes/bauhaus.css +10 -0
  67. package/themes/bloomberg-dense.css +10 -0
  68. package/themes/clay.css +10 -0
  69. package/themes/corporate.css +10 -0
  70. package/themes/gazette.css +10 -0
  71. package/themes/glass.css +10 -0
  72. package/themes/kflow.css +5 -0
  73. package/themes/kiosk.css +10 -0
  74. package/themes/linear-clean.css +10 -0
  75. package/themes/material.css +10 -0
  76. package/themes/minimalist.css +10 -0
  77. package/themes/nata.css +304 -0
  78. package/themes/neon.css +10 -0
  79. package/themes/notion-editorial.css +10 -0
  80. package/themes/orb.css +10 -0
  81. package/themes/prism.css +10 -0
  82. package/themes/rawi.css +304 -0
  83. package/themes/retro.css +10 -0
  84. package/themes/risograph.css +10 -0
  85. package/themes/scandi.css +10 -0
  86. package/themes/solarpunk.css +10 -0
  87. package/themes/terminal.css +138 -128
  88. package/dist/Typography-LZTP72Y4.js +0 -5
  89. package/dist/chunk-D2E44ODB.js +0 -350
  90. package/dist/chunk-N7JIG57B.js +0 -138
  91. package/dist/chunk-QJIAJ6EH.js +0 -2256
@@ -1,5 +1,5 @@
1
1
  import React__default, { ReactNode } from 'react';
2
- import { EntityRow, SExpr, EventPayload, EffectTrace, SurfaceMode } from '@almadar/core';
2
+ import { EntityRow, SExpr, EventPayload, EffectTrace, PageAccess, ViewerAuthority, SurfaceMode } from '@almadar/core';
3
3
  export { ANONYMOUS_USER, SurfaceMode, comparePathSpecificity, matchPath, matchPathAmong } from '@almadar/core';
4
4
  import { U as UIThemeDefinition } from '../ArbitraryClassCompiler-tChQ3nVq.js';
5
5
  export { A as ARBITRARY_CLASS_STYLE_ID, a as ArbitraryClassCompiler, b as ArbitraryClassCompilerProvider, c as ArbitraryClassCompilerProviderProps, d as CurrentPagePathContext, e as CurrentPagePathProvider, f as CurrentPagePathProviderProps, g as DesignThemeProvider, O as OrbitalThemeProvider, h as OrbitalThemeProviderProps, v as resetArbitraryClassStyles, u as useArbitraryClassStyles, n as useCurrentPagePath, o as useDesignTheme } from '../ArbitraryClassCompiler-tChQ3nVq.js';
@@ -10,9 +10,9 @@ export { N as NavPageDecl, a as NavStackApi, b as NavStackProvider, c as NavStac
10
10
  export { n as AwaitingSkeletonContext, A as AwaitingSkeletonSource, o as EntityBindingContext, E as EntityBindingSource, a as EntitySchemaContextValue, b as EntitySchemaProvider, c as EntitySchemaProviderProps, d as ServerBridgeContextValue, e as ServerBridgeProvider, p as ServerBridgeProviderProps, S as ServerBridgeTransport, T as TraitContext, f as TraitContextValue, g as TraitInstance, h as TraitProvider, i as TraitProviderProps, q as useAwaitingSkeleton, r as useEntityBindingSnapshot, u as useEntitySchema, j as useEntitySchemaOptional, k as useServerBridge, l as useTrait, m as useTraitContext } from '../AwaitingSkeletonContext-Bh399p1x.js';
11
11
  import { i as UseOfflineExecutorResult, U as UseOfflineExecutorOptions } from '../offline-executor-C0TWucBj.js';
12
12
  export { N as NavigationContextValue, c as NavigationProvider, d as NavigationProviderProps, e as NavigationState, k as extractRouteParams, l as findPageByName, m as findPageByPath, n as getAllPages, o as getDefaultPage, p as pathMatches, u as useActivePage, q as useInitPayload, r as useNavigateTo, s as useNavigation, t as useNavigationId, v as useNavigationState } from '../offline-executor-C0TWucBj.js';
13
- import '../verificationRegistry-B3dj1Zl8.js';
13
+ import '../verificationRegistry-B5aGl7WF.js';
14
14
  export { G as GameAudioContext, a as GameAudioContextValue, b as GameAudioProvider, c as GameAudioProviderProps, u as useGameAudioContext, d as useGameAudioContextOptional } from '../GameAudioProvider-Dv_L-PHt.js';
15
- export { A as Avl3DConfig, a as Avl3DContext, b as Avl3DModelOverrides, u as useAvl3DConfig, c as useAvl3DPalette } from '../avl-3d-context-BpBKZIbc.js';
15
+ export { A as Avl3DConfig, a as Avl3DContext, b as Avl3DModelOverrides, u as useAvl3DConfig, c as useAvl3DPalette } from '../avl-3d-context-Dxun3-ri.js';
16
16
  export { AccessTokenProvider } from '@almadar/runtime';
17
17
  import '../paintDispatch-Cp1_S93j.js';
18
18
  import 'lucide-react';
@@ -509,6 +509,38 @@ declare function useOfflineMode(): OfflineModeContextValue;
509
509
  */
510
510
  declare function useOptionalOfflineMode(): OfflineModeContextValue | null;
511
511
 
512
+ /**
513
+ * The page's declared `access`, enforced at the page boundary on both
514
+ * execution paths: an `access: authenticated` page's subtree (its whole trait
515
+ * circuit) mounts only once the host's auth provider has resolved an
516
+ * authenticated viewer, and is keyed by that viewer so a different user never
517
+ * inherits the previous user's circuit. Any other resolved authority sends the
518
+ * viewer to the app's declared `signIn` route. Public and undeclared pages pass
519
+ * straight through — no auth wait, no gate.
520
+ *
521
+ * @packageDocumentation
522
+ */
523
+
524
+ interface PageAccessHostProps {
525
+ /** The page's declared `access:` modifier; absent = no gate. */
526
+ access?: PageAccess;
527
+ /** What the host's auth provider has resolved the viewer to be. */
528
+ authority: ViewerAuthority;
529
+ /** The admitted viewer's identity; a change remounts the page subtree. */
530
+ viewerId?: string;
531
+ /** The app's `signIn:` route. */
532
+ signIn?: string;
533
+ /** The concrete path being opened — handed to `onDenied` as the return path. */
534
+ path: string;
535
+ /** Navigate a non-admitted viewer to `signIn`, carrying `returnTo`. */
536
+ onDenied: (signIn: string, returnTo: string) => void;
537
+ children: React__default.ReactNode;
538
+ }
539
+ declare function PageAccessHost({ access, authority, viewerId, signIn, path, onDenied, children, }: PageAccessHostProps): React__default.ReactElement | null;
540
+ declare namespace PageAccessHost {
541
+ var displayName: string;
542
+ }
543
+
512
544
  /**
513
545
  * Content surfaces: the background box behind a content block (table,
514
546
  * calendar, list, chart …). Every block paints the theme-owned `.surface-content`
@@ -534,4 +566,4 @@ declare function useContentSurface(surface?: SurfaceMode): ContentSurface;
534
566
  /** True when an ancestor already painted a surface. */
535
567
  declare function useOnSurface(): boolean;
536
568
 
537
- export { type ContentSurface, EventBusContext, EventBusProvider, type OfflineModeContextValue, OfflineModeProvider, type OfflineModeProviderProps, OrbitalProvider, type OrbitalProviderProps, RenderSlotProvider, type RenderSlotProviderProps, SelectionContext, type SelectionContextType, SelectionProvider, SurfaceBoundary, type TraitScope, TraitScopeProvider, type TraitScopeProviderProps, UIThemeDefinition, UserData, VerificationProvider, type VerificationProviderProps, mapServerEffectResults, useContentSurface, useOfflineMode, useOnSurface, useOptionalOfflineMode, useRenderSlot, useSelection, useSelectionOptional, useTraitScope, useTraitScopeChain };
569
+ export { type ContentSurface, EventBusContext, EventBusProvider, type OfflineModeContextValue, OfflineModeProvider, type OfflineModeProviderProps, OrbitalProvider, type OrbitalProviderProps, PageAccessHost, type PageAccessHostProps, RenderSlotProvider, type RenderSlotProviderProps, SelectionContext, type SelectionContextType, SelectionProvider, SurfaceBoundary, type TraitScope, TraitScopeProvider, type TraitScopeProviderProps, UIThemeDefinition, UserData, VerificationProvider, type VerificationProviderProps, mapServerEffectResults, useContentSurface, useOfflineMode, useOnSurface, useOptionalOfflineMode, useRenderSlot, useSelection, useSelectionOptional, useTraitScope, useTraitScopeChain };
@@ -1,20 +1,21 @@
1
- import { arbitraryClassesOf } from '../chunk-D2E44ODB.js';
2
- import { useGameAudio, SuspenseConfigProvider } from '../chunk-E6MWYQVZ.js';
3
- import { Box } from '../chunk-J755QADM.js';
4
- import '../chunk-4ZGXIW3B.js';
5
- import '../chunk-I5QOYW2Z.js';
1
+ import { resolveThemeForRuntime, themeTokensToCssVars } from '../chunk-ZR45FGW3.js';
2
+ import { useGameAudio, arbitraryClassesOf, SuspenseConfigProvider } from '../chunk-G6EFTACU.js';
3
+ import { useOfflineExecutor } from '../chunk-PQKU62LK.js';
4
+ import { Box } from '../chunk-EDPUQ2ZJ.js';
5
+ import '../chunk-ERDYADVZ.js';
6
+ import '../chunk-DXPCAQJU.js';
6
7
  import '../chunk-XJTHMW4G.js';
7
8
  import { setGlobalEventBus, useEventBus } from '../chunk-CHNC4UYE.js';
8
- import '../chunk-KJGVLXEN.js';
9
- import { registerCheck, recordTransition, bindEventBus, bindTraitStateGetter } from '../chunk-Q47ZN2DW.js';
10
- import { cn } from '../chunk-64WACXM7.js';
11
- import { resolveThemeForRuntime, themeTokensToCssVars } from '../chunk-V3FGTQUE.js';
12
- import '../chunk-723MJUU3.js';
13
- import '../chunk-LZRW6GXG.js';
14
- import { useOfflineExecutor } from '../chunk-PQKU62LK.js';
9
+ import '../chunk-L3MTZ3RH.js';
15
10
  import '../chunk-PEST66PN.js';
11
+ import '../chunk-7JRWELUC.js';
12
+ import '../chunk-N4IJS5DD.js';
13
+ import { registerCheck, recordTransition, bindEventBus, bindTraitStateGetter } from '../chunk-N23SVGTH.js';
14
+ import { cn } from '../chunk-64WACXM7.js';
15
+ import '../chunk-CXQENFO2.js';
16
+ import '../chunk-QOV3TUAA.js';
16
17
  import '../chunk-QPXIAUJD.js';
17
- import React17, { createContext, useRef, useCallback, useMemo, useEffect, useState, useContext, useSyncExternalStore } from 'react';
18
+ import React18, { createContext, useRef, useCallback, useMemo, useEffect, useState, useContext, useSyncExternalStore } from 'react';
18
19
  import { ThemeProvider, useThemeScope, useTheme, registryKeyTheme, themeHasMode, ThemeScopeContext } from '@almadar/ui/context';
19
20
  export { DesignThemeProvider, useDesignTheme } from '@almadar/ui/context';
20
21
  import { createLogger } from '@almadar/logger';
@@ -1148,6 +1149,25 @@ function GameAudioProvider({
1148
1149
  return /* @__PURE__ */ jsx(GameAudioContext.Provider, { value, children });
1149
1150
  }
1150
1151
  GameAudioProvider.displayName = "GameAudioProvider";
1152
+ function PageAccessHost({
1153
+ access,
1154
+ authority,
1155
+ viewerId,
1156
+ signIn,
1157
+ path,
1158
+ onDenied,
1159
+ children
1160
+ }) {
1161
+ const gated = access === "authenticated";
1162
+ const denied = gated && authority !== "pending" && authority !== "authenticated";
1163
+ useEffect(() => {
1164
+ if (denied && signIn !== void 0) onDenied(signIn, path);
1165
+ }, [denied, signIn, path, onDenied]);
1166
+ if (!gated) return /* @__PURE__ */ jsx(Fragment, { children });
1167
+ if (authority !== "authenticated") return null;
1168
+ return /* @__PURE__ */ jsx(React18.Fragment, { children }, viewerId);
1169
+ }
1170
+ PageAccessHost.displayName = "PageAccessHost";
1151
1171
  function pageEntryLabel(page, navLabels) {
1152
1172
  return page.label ?? navLabels?.[page.path] ?? page.name;
1153
1173
  }
@@ -1440,12 +1460,12 @@ function useAvl3DConfig() {
1440
1460
  function useAvl3DPalette() {
1441
1461
  return useContext(Avl3DContext).palette;
1442
1462
  }
1443
- var SurfaceContext = React17.createContext(false);
1463
+ var SurfaceContext = React18.createContext(false);
1444
1464
  function SurfaceBoundary({ children }) {
1445
1465
  return /* @__PURE__ */ jsx(SurfaceContext.Provider, { value: true, children });
1446
1466
  }
1447
1467
  function useContentSurface(surface = "auto") {
1448
- const onSurface = React17.useContext(SurfaceContext);
1468
+ const onSurface = React18.useContext(SurfaceContext);
1449
1469
  const paints = surface === "auto" && !onSurface;
1450
1470
  return {
1451
1471
  className: paints ? "surface-content" : void 0,
@@ -1453,7 +1473,7 @@ function useContentSurface(surface = "auto") {
1453
1473
  };
1454
1474
  }
1455
1475
  function useOnSurface() {
1456
- return React17.useContext(SurfaceContext);
1476
+ return React18.useContext(SurfaceContext);
1457
1477
  }
1458
1478
 
1459
- export { ARBITRARY_CLASS_STYLE_ID, ArbitraryClassCompilerProvider, Avl3DContext, AwaitingSkeletonContext, CurrentPagePathContext, CurrentPagePathProvider, EntityBindingContext, EntitySchemaProvider, EventBusContext, EventBusProvider, GameAudioContext, GameAudioProvider, NavStackProvider, NavStackRouterBridge, NavigationProvider, OfflineModeProvider, OrbitalProvider, OrbitalThemeProvider, RenderSlotProvider, SelectionContext, SelectionProvider, ServerBridgeProvider, SurfaceBoundary, TraitContext, TraitProvider, TraitScopeProvider, UserContext, UserProvider, VerificationProvider, extractRouteParams, findPageByName, findPageByPath, getAllPages, getDefaultPage, isInertNavStack, mapServerEffectResults, pathMatches, resetArbitraryClassStyles, useActivePage, useArbitraryClassStyles, useAvl3DConfig, useAvl3DPalette, useAwaitingSkeleton, useContentSurface, useCurrentPagePath, useEntityBindingSnapshot, useEntitySchema, useEntitySchemaOptional, useGameAudioContext, useGameAudioContextOptional, useHasPermission, useHasRole, useInitPayload, useNavStack, useNavigateTo, useNavigation, useNavigationId, useNavigationState, useOfflineMode, useOnSurface, useOptionalOfflineMode, useRenderSlot, useSelection, useSelectionOptional, useServerBridge, useTrait, useTraitContext, useTraitScope, useTraitScopeChain, useUser, useUserForEvaluation };
1479
+ export { ARBITRARY_CLASS_STYLE_ID, ArbitraryClassCompilerProvider, Avl3DContext, AwaitingSkeletonContext, CurrentPagePathContext, CurrentPagePathProvider, EntityBindingContext, EntitySchemaProvider, EventBusContext, EventBusProvider, GameAudioContext, GameAudioProvider, NavStackProvider, NavStackRouterBridge, NavigationProvider, OfflineModeProvider, OrbitalProvider, OrbitalThemeProvider, PageAccessHost, RenderSlotProvider, SelectionContext, SelectionProvider, ServerBridgeProvider, SurfaceBoundary, TraitContext, TraitProvider, TraitScopeProvider, UserContext, UserProvider, VerificationProvider, extractRouteParams, findPageByName, findPageByPath, getAllPages, getDefaultPage, isInertNavStack, mapServerEffectResults, pathMatches, resetArbitraryClassStyles, useActivePage, useArbitraryClassStyles, useAvl3DConfig, useAvl3DPalette, useAwaitingSkeleton, useContentSurface, useCurrentPagePath, useEntityBindingSnapshot, useEntitySchema, useEntitySchemaOptional, useGameAudioContext, useGameAudioContextOptional, useHasPermission, useHasRole, useInitPayload, useNavStack, useNavigateTo, useNavigation, useNavigationId, useNavigationState, useOfflineMode, useOnSurface, useOptionalOfflineMode, useRenderSlot, useSelection, useSelectionOptional, useServerBridge, useTrait, useTraitContext, useTraitScope, useTraitScopeChain, useUser, useUserForEvaluation };