@almadar/ui 6.55.0 → 6.57.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 (59) hide show
  1. package/dist/{ArbitraryClassCompiler-DvzdeHxc.d.ts → ArbitraryClassCompiler-tChQ3nVq.d.ts} +15 -1
  2. package/dist/{FileTree-DUi7e7Z8.d.ts → FileTree-BSfgp-HH.d.ts} +29 -2
  3. package/dist/Typography-LZTP72Y4.js +5 -0
  4. package/dist/{UISlotRenderer-QTHFT6Z4.js → UISlotRenderer-NCGDIXN4.js} +8 -8
  5. package/dist/avl/index.cjs +4832 -4212
  6. package/dist/avl/index.d.ts +74 -5
  7. package/dist/avl/index.js +68 -711
  8. package/dist/{avl-schema-parser-C0wnAp5x.d.ts → avl-schema-parser-CH1QoZw1.d.ts} +1 -1
  9. package/dist/{chunk-HCSJHRC4.js → chunk-4ZGXIW3B.js} +1 -1
  10. package/dist/{chunk-RNY5LJXJ.js → chunk-723MJUU3.js} +1 -1
  11. package/dist/{chunk-6EV3OEBQ.js → chunk-CHNC4UYE.js} +3 -2
  12. package/dist/{chunk-SGJHVPHC.js → chunk-GZGDBS4S.js} +2 -2
  13. package/dist/{chunk-Y53Q55H5.js → chunk-HA7CJWQX.js} +1123 -1121
  14. package/dist/{chunk-JRW33U35.js → chunk-I5QOYW2Z.js} +1 -1
  15. package/dist/{chunk-KQXXO42S.js → chunk-KJGVLXEN.js} +78 -1
  16. package/dist/{chunk-HRCR53OW.js → chunk-LZRW6GXG.js} +18 -3
  17. package/dist/{chunk-2LFBQ4IS.js → chunk-MZIDOJMD.js} +2 -2
  18. package/dist/{chunk-QGH4NAQO.js → chunk-N7JIG57B.js} +9 -4
  19. package/dist/{chunk-XZKGRSIO.js → chunk-PYJ2UQWM.js} +2487 -1156
  20. package/dist/{chunk-FQM37C56.js → chunk-RHP5WL55.js} +61 -55
  21. package/dist/chunk-YYYHH5BA.js +2519 -0
  22. package/dist/{cn-ClXGlIOY.d.ts → cn-DIql5232.d.ts} +152 -24
  23. package/dist/components/index.cjs +6876 -3072
  24. package/dist/components/index.d.ts +45 -94
  25. package/dist/components/index.js +14 -16
  26. package/dist/context/index.cjs +23 -0
  27. package/dist/context/index.d.ts +2 -2
  28. package/dist/context/index.js +20 -1
  29. package/dist/hooks/index.cjs +2544 -7
  30. package/dist/hooks/index.d.ts +4 -1
  31. package/dist/hooks/index.js +7 -6
  32. package/dist/lib/drawable/three/index.cjs +22 -6
  33. package/dist/lib/drawable/three/index.d.ts +1 -1
  34. package/dist/lib/drawable/three/index.js +7 -7
  35. package/dist/lib/index.cjs +18 -3
  36. package/dist/lib/index.d.ts +1 -1
  37. package/dist/lib/index.js +3 -4
  38. package/dist/locales/index.cjs +54 -9
  39. package/dist/locales/index.js +2 -2489
  40. package/dist/providers/index.cjs +4035 -2382
  41. package/dist/providers/index.d.ts +2 -2
  42. package/dist/providers/index.js +24 -13
  43. package/dist/runtime/index.cjs +4092 -2447
  44. package/dist/runtime/index.d.ts +0 -13
  45. package/dist/runtime/index.js +11 -10
  46. package/dist/ssr/index.cjs +23 -6
  47. package/dist/ssr/index.js +23 -6
  48. package/dist/{useEventBus-JUAH3EFW.js → useEventBus-SWRN475O.js} +1 -1
  49. package/locales/ar.json +18 -3
  50. package/locales/en.json +18 -3
  51. package/locales/sl.json +18 -3
  52. package/package.json +6 -6
  53. package/tailwind-preset.cjs +6 -0
  54. package/themes/_fonts.css +1 -1
  55. package/themes/_presets.css +1 -0
  56. package/themes/kflow.css +299 -0
  57. package/dist/Typography-7PDT62PG.js +0 -5
  58. package/dist/chunk-F4ZTPKZL.js +0 -284
  59. package/dist/chunk-OKWD7LPO.js +0 -80
@@ -1,8 +1,8 @@
1
1
  import React__default, { ReactNode } from 'react';
2
2
  import { EntityRow, SExpr, EventPayload, EffectTrace, SurfaceMode } from '@almadar/core';
3
3
  export { ANONYMOUS_USER, SurfaceMode, comparePathSpecificity, matchPath, matchPathAmong } from '@almadar/core';
4
- import { U as UIThemeDefinition } from '../ArbitraryClassCompiler-DvzdeHxc.js';
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, r as resetArbitraryClassStyles, u as useArbitraryClassStyles, m as useCurrentPagePath, n as useDesignTheme } from '../ArbitraryClassCompiler-DvzdeHxc.js';
4
+ import { U as UIThemeDefinition } from '../ArbitraryClassCompiler-tChQ3nVq.js';
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';
6
6
  import { b as UserData } from '../UserContext-D566nfWA.js';
7
7
  export { U as UserContext, a as UserContextValue, c as UserProvider, d as UserProviderProps, u as useHasPermission, e as useHasRole, f as useUser, g as useUserForEvaluation } from '../UserContext-D566nfWA.js';
8
8
  import { E as EventBusContextType } from '../NavStackContext-04NLdXsY.js';
@@ -1,21 +1,21 @@
1
1
  import { arbitraryClassesOf } from '../chunk-D2E44ODB.js';
2
- import { useGameAudio, SuspenseConfigProvider } from '../chunk-XZKGRSIO.js';
3
- import { Box } from '../chunk-Y53Q55H5.js';
4
- import '../chunk-HCSJHRC4.js';
5
- import '../chunk-JRW33U35.js';
2
+ import { useGameAudio, SuspenseConfigProvider } from '../chunk-PYJ2UQWM.js';
3
+ import { Box } from '../chunk-HA7CJWQX.js';
4
+ import '../chunk-4ZGXIW3B.js';
5
+ import '../chunk-I5QOYW2Z.js';
6
6
  import '../chunk-XJTHMW4G.js';
7
- import { setGlobalEventBus, useEventBus } from '../chunk-6EV3OEBQ.js';
8
- import '../chunk-KQXXO42S.js';
7
+ import { setGlobalEventBus, useEventBus } from '../chunk-CHNC4UYE.js';
8
+ import '../chunk-KJGVLXEN.js';
9
9
  import { registerCheck, recordTransition, bindEventBus, bindTraitStateGetter } from '../chunk-Q47ZN2DW.js';
10
- import '../chunk-64WACXM7.js';
10
+ import { cn } from '../chunk-64WACXM7.js';
11
11
  import { resolveThemeForRuntime, themeTokensToCssVars } from '../chunk-V3FGTQUE.js';
12
- import '../chunk-RNY5LJXJ.js';
13
- import '../chunk-HRCR53OW.js';
12
+ import '../chunk-723MJUU3.js';
13
+ import '../chunk-LZRW6GXG.js';
14
14
  import { useOfflineExecutor } from '../chunk-PQKU62LK.js';
15
15
  import '../chunk-PEST66PN.js';
16
16
  import '../chunk-QPXIAUJD.js';
17
17
  import React17, { createContext, useRef, useCallback, useMemo, useEffect, useState, useContext, useSyncExternalStore } from 'react';
18
- import { ThemeProvider, useThemeScope, useTheme, ThemeScopeContext } from '@almadar/ui/context';
18
+ import { ThemeProvider, useThemeScope, useTheme, registryKeyTheme, themeHasMode, ThemeScopeContext } from '@almadar/ui/context';
19
19
  export { DesignThemeProvider, useDesignTheme } from '@almadar/ui/context';
20
20
  import { createLogger } from '@almadar/logger';
21
21
  import { jsx, Fragment } from 'react/jsx-runtime';
@@ -614,15 +614,18 @@ function OrbitalThemeProvider({ theme: declared, override, children }) {
614
614
  const hostOverride = override || parent.override || void 0;
615
615
  const theme = hostOverride ?? declared;
616
616
  const resolved = resolveThemeForRuntime(theme);
617
- const { resolvedMode } = useTheme();
617
+ const { resolvedMode, availableThemes } = useTheme();
618
618
  const darkTypeScale = resolvedMode === "dark" ? resolved?.variants?.dark?.typeScale : void 0;
619
619
  useFontImport(darkTypeScale?.fontImport ?? resolved?.tokens.typeScale?.fontImport);
620
620
  if (isThemeRegistryKey(theme)) {
621
+ const keyTheme = registryKeyTheme(theme, availableThemes);
622
+ const mode = keyTheme === void 0 ? parent.mode : themeHasMode(keyTheme.theme, resolvedMode) ? resolvedMode : keyTheme.mode;
623
+ const key = keyTheme === void 0 ? theme : `${keyTheme.theme.name}-${mode}`;
621
624
  return /* @__PURE__ */ jsx(
622
625
  ThemeScopeContext.Provider,
623
626
  {
624
- value: hostOverride ? { ...parent, theme, vars: void 0, override: hostOverride } : { ...parent, theme },
625
- children: /* @__PURE__ */ jsx(Box, { "data-theme": theme, className: SURFACE, children })
627
+ value: hostOverride ? { ...parent, theme: key, mode, vars: void 0, override: key } : { ...parent, theme: key, mode },
628
+ children: /* @__PURE__ */ jsx(Box, { "data-theme": key, className: cn(SURFACE, keyTheme && mode), children })
626
629
  }
627
630
  );
628
631
  }
@@ -1375,6 +1378,14 @@ var NavStackRouterBridge = ({
1375
1378
  },
1376
1379
  [routerNavigate]
1377
1380
  );
1381
+ const eventBus = useEventBus();
1382
+ useEffect(
1383
+ () => eventBus.on("UI:NAVIGATE", (event) => {
1384
+ const url = event.payload?.url;
1385
+ if (typeof url === "string" && url.length > 0) routerNavigate(url);
1386
+ }),
1387
+ [eventBus, routerNavigate]
1388
+ );
1378
1389
  return /* @__PURE__ */ jsx(
1379
1390
  NavStackProvider,
1380
1391
  {