@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
@@ -67,6 +67,20 @@ interface ThemeScope {
67
67
  }
68
68
  declare const ThemeScopeContext: React__default.Context<ThemeScope>;
69
69
  declare function useThemeScope(): ThemeScope;
70
+ /**
71
+ * The mode a registry `data-theme` key was built with: `<name>-light` /
72
+ * `<name>-dark` of a declared theme that has that mode (the same construction
73
+ * as `appliedTheme`). Undefined for any key no declared theme builds.
74
+ */
75
+ declare function registryKeyMode(key: string, themes: readonly UIThemeDefinition[]): ResolvedMode | undefined;
76
+ /** The declared theme and mode a registry key was built from, or undefined. */
77
+ declare function registryKeyTheme(key: string, themes: readonly UIThemeDefinition[]): {
78
+ theme: UIThemeDefinition;
79
+ mode: ResolvedMode;
80
+ } | undefined;
81
+ declare function themeHasMode(theme: UIThemeDefinition, mode: ResolvedMode): boolean;
82
+ /** The color mode in effect at this point of the tree: a pinned orbital theme's, else the document's. */
83
+ declare function useScopedMode(): ResolvedMode;
70
84
  interface ThemeProviderProps {
71
85
  children: React__default.ReactNode;
72
86
  /** Available themes (will be merged with built-in themes) */
@@ -213,4 +227,4 @@ declare function ArbitraryClassCompilerProvider({ compile, children }: Arbitrary
213
227
  declare function resetArbitraryClassStyles(): void;
214
228
  declare function useArbitraryClassStyles(schema: OrbitalSchema | null | undefined): void;
215
229
 
216
- export { ARBITRARY_CLASS_STYLE_ID as A, type ColorMode as C, type DesignTheme as D, OrbitalThemeProvider as O, type ResolvedMode as R, ThemeContext as T, type UIThemeDefinition as U, type ArbitraryClassCompiler as a, ArbitraryClassCompilerProvider as b, type ArbitraryClassCompilerProviderProps as c, CurrentPagePathContext as d, CurrentPagePathProvider as e, type CurrentPagePathProviderProps as f, DesignThemeProvider as g, type OrbitalThemeProviderProps as h, ThemeProvider as i, type ThemeProviderProps as j, type ThemeScope as k, ThemeScopeContext as l, useCurrentPagePath as m, useDesignTheme as n, useTheme as o, useThemeScope as p, resetArbitraryClassStyles as r, useArbitraryClassStyles as u };
230
+ export { ARBITRARY_CLASS_STYLE_ID as A, type ColorMode as C, type DesignTheme as D, OrbitalThemeProvider as O, type ResolvedMode as R, ThemeContext as T, type UIThemeDefinition as U, type ArbitraryClassCompiler as a, ArbitraryClassCompilerProvider as b, type ArbitraryClassCompilerProviderProps as c, CurrentPagePathContext as d, CurrentPagePathProvider as e, type CurrentPagePathProviderProps as f, DesignThemeProvider as g, type OrbitalThemeProviderProps as h, ThemeProvider as i, type ThemeProviderProps as j, type ThemeScope as k, ThemeScopeContext as l, registryKeyTheme as m, useCurrentPagePath as n, useDesignTheme as o, useScopedMode as p, useTheme as q, registryKeyMode as r, useThemeScope as s, themeHasMode as t, useArbitraryClassStyles as u, resetArbitraryClassStyles as v };
@@ -1,8 +1,27 @@
1
1
  import React__default from 'react';
2
2
  import { A11yProps, EventEmit, JsonObject, EntityPersistence, OrbitalSchema } from '@almadar/core';
3
- import { T as TraitLevelData, F as FieldInfo, O as OrbitalTraitInfo, a as OrbitalPageInfo, E as ExternalLink } from './avl-schema-parser-C0wnAp5x.js';
3
+ import { T as TraitLevelData, F as FieldInfo, O as OrbitalTraitInfo, a as OrbitalPageInfo, E as ExternalLink } from './avl-schema-parser-CH1QoZw1.js';
4
4
  import { Node, Edge } from '@xyflow/react';
5
5
 
6
+ /**
7
+ * Author-supplied explanations for AVL diagrams: a note per state, per
8
+ * transition event and per effect type, shown in a popover on hover/focus.
9
+ */
10
+ interface AvlNote {
11
+ /** Short heading. */
12
+ title?: string;
13
+ /** The explanation. */
14
+ body: string;
15
+ }
16
+ interface AvlAnnotations {
17
+ /** Keyed by state name. */
18
+ states?: Record<string, AvlNote>;
19
+ /** Keyed by transition event. */
20
+ transitions?: Record<string, AvlNote>;
21
+ /** Keyed by effect type (e.g. `persist`). */
22
+ effects?: Record<string, AvlNote>;
23
+ }
24
+
6
25
  /**
7
26
  * AvlStateMachine — the one state-machine renderer: a trait's states and
8
27
  * transitions laid out left→right (ELK), themed entirely through tokens, with
@@ -50,6 +69,10 @@ interface AvlStateMachineProps extends A11yProps {
50
69
  direction?: 'ltr' | 'rtl';
51
70
  /** Show the trait header (name, entity, listens/emits). @default true */
52
71
  showHeader?: boolean;
72
+ /** Author explanations shown in a popover on hover: a note per state name, per transition event and per effect type.
73
+ * @example {"states":{"pending":{"title":"Unpaid","body":"Every order starts here."}},"transitions":{"PAY":{"body":"Only fires when the amount is positive."}},"effects":{"persist":{"body":"Saves the order."}}}
74
+ */
75
+ annotations?: AvlAnnotations;
53
76
  className?: string;
54
77
  }
55
78
  declare const AvlStateMachine: React__default.FC<AvlStateMachineProps>;
@@ -110,6 +133,10 @@ interface ModuleCardProps extends Omit<React__default.AriaAttributes, keyof A11y
110
133
  * @example {"orbitalName":"OrderOrbital","entityName":"Order","persistence":"persistent","fields":[{"name":"customer","type":"string","required":true,"hasDefault":false},{"name":"qty","type":"number","required":true,"hasDefault":true},{"name":"status","type":"string","required":false,"hasDefault":true}],"traits":[{"name":"OrderFlow","stateCount":5,"eventCount":7,"transitionCount":7,"emits":["ORDER_SAVED"],"listens":["PAYMENT_OK"]}],"pages":[{"name":"Orders","route":"/orders"}],"traitDetails":{"OrderFlow":{"name":"OrderFlow","linkedEntity":"Order","states":[{"name":"browsing","isInitial":true,"isTerminal":false},{"name":"editing","isInitial":false,"isTerminal":false},{"name":"saving","isInitial":false,"isTerminal":false},{"name":"confirmed","isInitial":false,"isTerminal":true},{"name":"failed","isInitial":false,"isTerminal":false}],"transitions":[{"from":"browsing","to":"editing","event":"EDIT","effects":[{"type":"render-ui","args":[]}],"index":0},{"from":"editing","to":"saving","event":"SAVE","effects":[{"type":"persist","args":[]},{"type":"notify","args":[]}],"index":1},{"from":"saving","to":"confirmed","event":"SAVED","effects":[{"type":"emit","args":[]},{"type":"render-ui","args":[]}],"index":2},{"from":"saving","to":"failed","event":"SAVE_FAILED","effects":[{"type":"notify","args":[]}],"index":3},{"from":"failed","to":"editing","event":"RETRY","effects":[],"index":4},{"from":"editing","to":"browsing","event":"CANCEL","effects":[{"type":"render-ui","args":[]}],"index":5},{"from":"confirmed","to":"browsing","event":"DONE","effects":[{"type":"navigate","args":[]}],"index":6}],"emittedEvents":["ORDER_SAVED"],"listenedEvents":["PAYMENT_OK"]}},"externalLinks":[{"targetOrbital":"PaymentOrbital","eventName":"PAYMENT_OK","direction":"in","traitName":"OrderFlow"}]}
111
134
  */
112
135
  data: AvlNodeData;
136
+ /** Author explanations per trait name (states, transition events, effect types), shown in a popover on hover.
137
+ * @example {"OrderFlow":{"states":{"saving":{"body":"Waiting for the server to confirm."}},"effects":{"persist":{"body":"Saves the order."}}}}
138
+ */
139
+ annotations?: Record<string, AvlAnnotations>;
113
140
  }
114
141
  /**
115
142
  * Self-contained ModuleCard. The connection `<Handle>`s need the ReactFlow store,
@@ -221,4 +248,4 @@ interface FileTreeProps extends Omit<React__default.AriaAttributes, keyof A11yPr
221
248
  }
222
249
  declare const FileTree: React__default.FC<FileTreeProps>;
223
250
 
224
- export { type AvlNodeData as A, BehaviorView as B, type FileTreeItem as F, ModuleCard as M, type AvlEdgeData as a, AvlStateMachine as b, type AvlStateMachineProps as c, type BehaviorViewProps as d, FileTree as e, type FileTreeNode as f, type FileTreeProps as g, type ModuleCardProps as h, schemaToFlowGraph as s };
251
+ export { type AvlAnnotations as A, BehaviorView as B, type FileTreeItem as F, ModuleCard as M, type AvlNodeData as a, type AvlNote as b, type AvlEdgeData as c, AvlStateMachine as d, type AvlStateMachineProps as e, type BehaviorViewProps as f, FileTree as g, type FileTreeNode as h, type FileTreeProps as i, type ModuleCardProps as j, schemaToFlowGraph as s };
@@ -0,0 +1,5 @@
1
+ export { Typography } from './chunk-4ZGXIW3B.js';
2
+ import './chunk-64WACXM7.js';
3
+ import './chunk-723MJUU3.js';
4
+ import './chunk-LZRW6GXG.js';
5
+ import './chunk-QPXIAUJD.js';
@@ -1,14 +1,14 @@
1
- export { SlotContainedContext, SlotContentRenderer, SuspenseConfigProvider, UISlotComponent, UISlotRenderer, renderPatternValue } from './chunk-XZKGRSIO.js';
2
- import './chunk-Y53Q55H5.js';
3
- import './chunk-HCSJHRC4.js';
4
- import './chunk-JRW33U35.js';
1
+ export { SlotContainedContext, SlotContentRenderer, SuspenseConfigProvider, UISlotComponent, UISlotRenderer, renderPatternValue } from './chunk-PYJ2UQWM.js';
2
+ import './chunk-HA7CJWQX.js';
3
+ import './chunk-4ZGXIW3B.js';
4
+ import './chunk-I5QOYW2Z.js';
5
5
  import './chunk-XJTHMW4G.js';
6
- import './chunk-6EV3OEBQ.js';
7
- import './chunk-KQXXO42S.js';
6
+ import './chunk-CHNC4UYE.js';
7
+ import './chunk-KJGVLXEN.js';
8
8
  import './chunk-Q47ZN2DW.js';
9
9
  import './chunk-64WACXM7.js';
10
- import './chunk-RNY5LJXJ.js';
11
- import './chunk-HRCR53OW.js';
10
+ import './chunk-723MJUU3.js';
11
+ import './chunk-LZRW6GXG.js';
12
12
  import './chunk-PQKU62LK.js';
13
13
  import './chunk-PEST66PN.js';
14
14
  import './chunk-QPXIAUJD.js';