@almadar/shell-web 0.0.0-stage → 1.0.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 (266) hide show
  1. package/bundling.d.mts +18 -0
  2. package/bundling.mjs +28 -0
  3. package/dist/ArbitraryClassCompiler-CO_iASBn.d.ts +195 -0
  4. package/dist/AvlGlyph-EPJKFEO3.js +6 -0
  5. package/dist/AvlStateMachine-RKZIKNGC.js +9 -0
  6. package/dist/AvlTransitionDetail-63SD6GZF.js +11 -0
  7. package/dist/AvlTransitionExplainer-ZBTLOM3T.js +12 -0
  8. package/dist/BehaviorView-YS5G4GNB.js +11 -0
  9. package/dist/Canvas3DHost-BkZQB5l2.d.ts +552 -0
  10. package/dist/EventBusProvider-BFFHfN4O.d.ts +296 -0
  11. package/dist/FileTree-BCFnBEuQ.d.ts +254 -0
  12. package/dist/FlowCanvas-3JRMNJLV.css +1756 -0
  13. package/dist/FlowCanvas-AUMTWMNG.js +26 -0
  14. package/dist/GameAudioProvider-ceM_n0ey.d.ts +90 -0
  15. package/dist/KaTeX_AMS-Regular-CYEKBG2K.woff +0 -0
  16. package/dist/KaTeX_AMS-Regular-JKX5W2C4.ttf +0 -0
  17. package/dist/KaTeX_AMS-Regular-U6PRYMIZ.woff2 +0 -0
  18. package/dist/KaTeX_Caligraphic-Bold-5QL5CMTE.woff2 +0 -0
  19. package/dist/KaTeX_Caligraphic-Bold-WZ3QSGD3.woff +0 -0
  20. package/dist/KaTeX_Caligraphic-Bold-ZTS3R3HK.ttf +0 -0
  21. package/dist/KaTeX_Caligraphic-Regular-3LKEU76G.woff +0 -0
  22. package/dist/KaTeX_Caligraphic-Regular-A7XRTZ5Q.ttf +0 -0
  23. package/dist/KaTeX_Caligraphic-Regular-KX5MEWCF.woff2 +0 -0
  24. package/dist/KaTeX_Fraktur-Bold-2QVFK6NQ.woff2 +0 -0
  25. package/dist/KaTeX_Fraktur-Bold-T4SWXBMT.woff +0 -0
  26. package/dist/KaTeX_Fraktur-Bold-WGHVTYOR.ttf +0 -0
  27. package/dist/KaTeX_Fraktur-Regular-2PEIFJSJ.woff2 +0 -0
  28. package/dist/KaTeX_Fraktur-Regular-5U4OPH2X.ttf +0 -0
  29. package/dist/KaTeX_Fraktur-Regular-PQMHCIK6.woff +0 -0
  30. package/dist/KaTeX_Main-Bold-2GA4IZIN.woff +0 -0
  31. package/dist/KaTeX_Main-Bold-W5FBVCZM.ttf +0 -0
  32. package/dist/KaTeX_Main-Bold-YP5VVQRP.woff2 +0 -0
  33. package/dist/KaTeX_Main-BoldItalic-4P4C7HJH.woff +0 -0
  34. package/dist/KaTeX_Main-BoldItalic-N4V3DX7S.woff2 +0 -0
  35. package/dist/KaTeX_Main-BoldItalic-ODMLBJJQ.ttf +0 -0
  36. package/dist/KaTeX_Main-Italic-I43T2HSR.ttf +0 -0
  37. package/dist/KaTeX_Main-Italic-RELBIK7M.woff2 +0 -0
  38. package/dist/KaTeX_Main-Italic-SASNQFN2.woff +0 -0
  39. package/dist/KaTeX_Main-Regular-ARRPAO67.woff2 +0 -0
  40. package/dist/KaTeX_Main-Regular-P5I74A2A.woff +0 -0
  41. package/dist/KaTeX_Main-Regular-W74P5G27.ttf +0 -0
  42. package/dist/KaTeX_Math-BoldItalic-6EBV3DK5.woff +0 -0
  43. package/dist/KaTeX_Math-BoldItalic-K4WTGH3J.woff2 +0 -0
  44. package/dist/KaTeX_Math-BoldItalic-VB447A4D.ttf +0 -0
  45. package/dist/KaTeX_Math-Italic-6KGCHLFN.woff2 +0 -0
  46. package/dist/KaTeX_Math-Italic-KKK3USB2.woff +0 -0
  47. package/dist/KaTeX_Math-Italic-SON4MRCA.ttf +0 -0
  48. package/dist/KaTeX_SansSerif-Bold-RRNVJFFW.woff2 +0 -0
  49. package/dist/KaTeX_SansSerif-Bold-STQ6RXC7.ttf +0 -0
  50. package/dist/KaTeX_SansSerif-Bold-X5M5EMOD.woff +0 -0
  51. package/dist/KaTeX_SansSerif-Italic-HMPFTM52.woff2 +0 -0
  52. package/dist/KaTeX_SansSerif-Italic-PSN4QKYX.woff +0 -0
  53. package/dist/KaTeX_SansSerif-Italic-WTBAZBGY.ttf +0 -0
  54. package/dist/KaTeX_SansSerif-Regular-2TL3USAE.ttf +0 -0
  55. package/dist/KaTeX_SansSerif-Regular-OQCII6EP.woff +0 -0
  56. package/dist/KaTeX_SansSerif-Regular-XIQ62X4E.woff2 +0 -0
  57. package/dist/KaTeX_Script-Regular-72OLXYNA.ttf +0 -0
  58. package/dist/KaTeX_Script-Regular-A5IFOEBS.woff +0 -0
  59. package/dist/KaTeX_Script-Regular-APUWIHLP.woff2 +0 -0
  60. package/dist/KaTeX_Size1-Regular-4HRHTS65.woff +0 -0
  61. package/dist/KaTeX_Size1-Regular-5LRUTBFT.woff2 +0 -0
  62. package/dist/KaTeX_Size1-Regular-7K6AASVL.ttf +0 -0
  63. package/dist/KaTeX_Size2-Regular-222HN3GT.ttf +0 -0
  64. package/dist/KaTeX_Size2-Regular-K5ZHAIS6.woff +0 -0
  65. package/dist/KaTeX_Size2-Regular-LELKET5D.woff2 +0 -0
  66. package/dist/KaTeX_Size3-Regular-TLFPAHDE.woff +0 -0
  67. package/dist/KaTeX_Size3-Regular-UFCO6WCA.ttf +0 -0
  68. package/dist/KaTeX_Size3-Regular-WQRQ47UD.woff2 +0 -0
  69. package/dist/KaTeX_Size4-Regular-7PGNVPQK.ttf +0 -0
  70. package/dist/KaTeX_Size4-Regular-CDMV7U5C.woff2 +0 -0
  71. package/dist/KaTeX_Size4-Regular-PKMWZHNC.woff +0 -0
  72. package/dist/KaTeX_Typewriter-Regular-3F5K6SQ6.ttf +0 -0
  73. package/dist/KaTeX_Typewriter-Regular-MJMFSK64.woff +0 -0
  74. package/dist/KaTeX_Typewriter-Regular-VBYJ4NRC.woff2 +0 -0
  75. package/dist/KernelEngineContext-CcxGYtlr.d.ts +33 -0
  76. package/dist/LayersPanel-M2LHWUFF.js +6 -0
  77. package/dist/ModuleCard-QHDGK5XK.js +7 -0
  78. package/dist/OrbInspector-MHLJ6OEE.css +1756 -0
  79. package/dist/OrbInspector-QCPEPUPH.js +26 -0
  80. package/dist/Select-B-iDdnvE.d.ts +185 -0
  81. package/dist/ServerBridge-Bqsj-lOU.d.ts +124 -0
  82. package/dist/ThemeContext-DJmO59xd.d.ts +147 -0
  83. package/dist/UISlotContext-Dl_ewwCI.d.ts +79 -0
  84. package/dist/UISlotRenderer-C7WWOK43.js +26 -0
  85. package/dist/UISlotRenderer-KVFO6J7R.css +1756 -0
  86. package/dist/auth/browser/index.d.ts +2 -0
  87. package/dist/auth/browser/index.js +2 -0
  88. package/dist/auth/react/index.d.ts +56 -0
  89. package/dist/auth/react/index.js +157 -0
  90. package/dist/avl/index.css +1756 -0
  91. package/dist/avl/index.d.ts +2248 -0
  92. package/dist/avl/index.js +2693 -0
  93. package/dist/avl-3d-context-BycmO6tG.d.ts +201 -0
  94. package/dist/avl-schema-parser-CtJxJ9KU.d.ts +132 -0
  95. package/dist/avl-zoom-state-CKMVuBFg.d.ts +17 -0
  96. package/dist/chunk-3BBUBJFF.js +339 -0
  97. package/dist/chunk-3S54FWRC.js +131 -0
  98. package/dist/chunk-3VZ36ZKO.js +775 -0
  99. package/dist/chunk-4T3P43NS.js +1133 -0
  100. package/dist/chunk-4YXBKHHM.js +11488 -0
  101. package/dist/chunk-57DC34LY.js +525 -0
  102. package/dist/chunk-5QTYQTPS.js +15 -0
  103. package/dist/chunk-A2LR6VQQ.js +349 -0
  104. package/dist/chunk-AB3X7QTE.js +505 -0
  105. package/dist/chunk-AE7VCQB6.js +561 -0
  106. package/dist/chunk-AGXD77SL.js +98 -0
  107. package/dist/chunk-AU7O65OX.js +66 -0
  108. package/dist/chunk-CPLN6NBQ.js +701 -0
  109. package/dist/chunk-DZBQA2OW.js +176 -0
  110. package/dist/chunk-E6KA4J6N.js +227 -0
  111. package/dist/chunk-EOWMARUB.js +16 -0
  112. package/dist/chunk-G7DCAZ22.js +19 -0
  113. package/dist/chunk-GFXCPUMX.js +1334 -0
  114. package/dist/chunk-HH5KSMH5.js +311 -0
  115. package/dist/chunk-ILQXJ2AR.js +280 -0
  116. package/dist/chunk-ILZ7ORX7.js +432 -0
  117. package/dist/chunk-K4MOPSEL.js +674 -0
  118. package/dist/chunk-LHP2TK7O.js +47587 -0
  119. package/dist/chunk-P4ZFUQFF.js +93 -0
  120. package/dist/chunk-PCR37T3U.js +296 -0
  121. package/dist/chunk-PRXQGGCO.js +580 -0
  122. package/dist/chunk-REXYVBUO.js +191 -0
  123. package/dist/chunk-ROICKAU7.js +24 -0
  124. package/dist/chunk-SP5CDJ6K.js +338 -0
  125. package/dist/chunk-TUPZWTRE.js +1051 -0
  126. package/dist/chunk-TXAUOLWZ.js +490 -0
  127. package/dist/chunk-TZZBINQY.js +82 -0
  128. package/dist/chunk-UTDC2NEA.js +14 -0
  129. package/dist/chunk-UU57VNS2.js +1053 -0
  130. package/dist/chunk-UXLE3IPR.js +421 -0
  131. package/dist/chunk-VO2TTLS5.js +94 -0
  132. package/dist/chunk-X3DMMX27.js +11 -0
  133. package/dist/chunk-YHMRX6YA.js +455 -0
  134. package/dist/components/index.css +1756 -0
  135. package/dist/components/index.d.ts +11299 -0
  136. package/dist/components/index.js +1110 -0
  137. package/dist/context/index.d.ts +8 -0
  138. package/dist/context/index.js +8 -0
  139. package/dist/core.d.ts +2599 -0
  140. package/dist/core.js +3 -0
  141. package/dist/design-classes/index.cjs +431 -0
  142. package/dist/design-classes/index.d.cts +165 -0
  143. package/dist/design-classes/index.d.ts +165 -0
  144. package/dist/design-classes/index.js +399 -0
  145. package/dist/emojiItems-QGSNAABW.js +20 -0
  146. package/dist/fx-CmQjnHmT.d.ts +371 -0
  147. package/dist/hooks/index.d.ts +971 -0
  148. package/dist/hooks/index.js +8 -0
  149. package/dist/index.d.ts +408 -0
  150. package/dist/index.js +178 -0
  151. package/dist/katexPlugin-FA7NX4PE.css +1161 -0
  152. package/dist/katexPlugin-NCDKOOQY.js +2 -0
  153. package/dist/kernel-client-TZKGHJRY.js +516 -0
  154. package/dist/kernel-wire-wNdAPfhJ.d.ts +88 -0
  155. package/dist/lib/index.d.ts +602 -0
  156. package/dist/lib/index.js +1289 -0
  157. package/dist/paintDispatch-CuJLsr9Y.d.ts +688 -0
  158. package/dist/parseLessonSegments-GpCeMrb2.d.ts +334 -0
  159. package/dist/perf-CKiBKbkw.d.ts +22 -0
  160. package/dist/perf-Dr28-AgT.d.ts +57 -0
  161. package/dist/prism-X5YWKXO5.js +136 -0
  162. package/dist/providers/index.css +1756 -0
  163. package/dist/providers/index.d.ts +355 -0
  164. package/dist/providers/index.js +29 -0
  165. package/dist/renderer/index.d.ts +465 -0
  166. package/dist/renderer/index.js +4 -0
  167. package/dist/runtime/index.css +1756 -0
  168. package/dist/runtime/index.d.ts +239 -0
  169. package/dist/runtime/index.js +28 -0
  170. package/dist/slot-host-CPzrxLo9.d.ts +48 -0
  171. package/dist/ssr/index.cjs +9739 -0
  172. package/dist/ssr/index.d.cts +464 -0
  173. package/dist/ssr/index.d.ts +464 -0
  174. package/dist/ssr/index.js +9703 -0
  175. package/dist/storage/browser/index.d.ts +1 -0
  176. package/dist/storage/browser/index.js +2 -0
  177. package/dist/test-support.d.ts +42 -0
  178. package/dist/test-support.js +181 -0
  179. package/dist/themeTokens-CRd8AEDF.d.ts +125 -0
  180. package/dist/three/index.css +503 -0
  181. package/dist/three/index.d.ts +1185 -0
  182. package/dist/three/index.js +3908 -0
  183. package/dist/useUISlots-CiobNFGb.d.ts +211 -0
  184. package/dist/verification-C5pTeMJv.d.ts +66 -0
  185. package/dist/verificationRegistry-CVrcxG1s.d.ts +122 -0
  186. package/dist/wrapCallbackForEvent-B9QLbhxX.d.ts +19 -0
  187. package/index.css +199 -0
  188. package/package.json +273 -3
  189. package/src/core/lib/band-shapes.json +7 -0
  190. package/src/core/locales/ar.json +1276 -0
  191. package/src/core/locales/en.json +1276 -0
  192. package/src/core/locales/index.ts +54 -0
  193. package/src/core/locales/sl.json +1276 -0
  194. package/src/core/tokens/native-tokens.json +369 -0
  195. package/tailwind-compile.cjs +29 -0
  196. package/tailwind-preset.cjs +1020 -0
  197. package/themes/_base.css +451 -0
  198. package/themes/_contract.md +307 -0
  199. package/themes/_fonts-kenney.css +11 -0
  200. package/themes/_fonts.css +12 -0
  201. package/themes/_foundation.css +105 -0
  202. package/themes/_head.css +22 -0
  203. package/themes/_presets.css +67 -0
  204. package/themes/almadar-heritage.css +455 -0
  205. package/themes/almadar-website.css +269 -0
  206. package/themes/almadar.css +269 -0
  207. package/themes/aqua.css +455 -0
  208. package/themes/arabesque.css +459 -0
  209. package/themes/art-deco.css +457 -0
  210. package/themes/art-nouveau.css +459 -0
  211. package/themes/atelier.css +463 -0
  212. package/themes/bauhaus.css +461 -0
  213. package/themes/bloomberg-dense.css +463 -0
  214. package/themes/blueprint.css +457 -0
  215. package/themes/clay.css +449 -0
  216. package/themes/comic.css +453 -0
  217. package/themes/constructivist.css +457 -0
  218. package/themes/corporate.css +449 -0
  219. package/themes/cyberpunk.css +453 -0
  220. package/themes/frutiger-aero.css +458 -0
  221. package/themes/game-adventure.css +201 -0
  222. package/themes/game-rpg.css +203 -0
  223. package/themes/game-sci-fi.css +201 -0
  224. package/themes/game-ui-pack.css +200 -0
  225. package/themes/gazette.css +449 -0
  226. package/themes/glass.css +457 -0
  227. package/themes/gothic.css +453 -0
  228. package/themes/index.css +21 -0
  229. package/themes/ink-wash.css +459 -0
  230. package/themes/kawaii.css +459 -0
  231. package/themes/kflow.css +310 -0
  232. package/themes/kiosk.css +449 -0
  233. package/themes/linear-clean.css +463 -0
  234. package/themes/luxury.css +451 -0
  235. package/themes/mac-classic.css +455 -0
  236. package/themes/material.css +463 -0
  237. package/themes/memphis.css +453 -0
  238. package/themes/mid-century.css +455 -0
  239. package/themes/minimalist.css +449 -0
  240. package/themes/mudcloth.css +459 -0
  241. package/themes/nata.css +310 -0
  242. package/themes/neon.css +453 -0
  243. package/themes/neumorphic.css +451 -0
  244. package/themes/newsprint.css +455 -0
  245. package/themes/notion-editorial.css +463 -0
  246. package/themes/orb.css +465 -0
  247. package/themes/pixel.css +449 -0
  248. package/themes/prism.css +309 -0
  249. package/themes/rawi.css +310 -0
  250. package/themes/retro.css +452 -0
  251. package/themes/risograph.css +463 -0
  252. package/themes/scandi.css +469 -0
  253. package/themes/sketch.css +455 -0
  254. package/themes/solarpunk.css +469 -0
  255. package/themes/steampunk.css +451 -0
  256. package/themes/swiss.css +455 -0
  257. package/themes/terminal.css +466 -0
  258. package/themes/trait-wars.css +487 -0
  259. package/themes/ukiyo-e.css +459 -0
  260. package/themes/vaporwave.css +455 -0
  261. package/themes/victorian.css +453 -0
  262. package/themes/wabi-sabi.css +459 -0
  263. package/themes/win95.css +455 -0
  264. package/themes/wireframe.css +439 -0
  265. package/themes/zine.css +455 -0
  266. package/README.md +0 -3
@@ -0,0 +1,464 @@
1
+ import { EventPayload, BusEventSource, BusEventListener, Unsubscribe, EntityRow, A11yProps, SurfaceMode, SkeletonSpec } from '@almadar/core';
2
+ import React from 'react';
3
+ import { LucideIcon } from 'lucide-react';
4
+
5
+ /**
6
+ * Cross-cutting atom-level prop shapes shared across the design system.
7
+ */
8
+
9
+ /**
10
+ * Canonical semantic color palette. Values are the Tailwind / CSS-var token
11
+ * names that every component in the design system understands. Prefer this
12
+ * over a bare `string` for any `color` or `variant` prop.
13
+ */
14
+ type ColorToken = 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'muted';
15
+ /**
16
+ * Concrete error-state shape read by display components (`error.message`,
17
+ * occasionally `error.stack`). Structurally assignable from the global `Error`,
18
+ * so existing call sites passing an `Error` keep working — this just gives the
19
+ * pattern extractor a readable field schema instead of the opaque `Error` global.
20
+ */
21
+ type UiError = {
22
+ message: string;
23
+ name?: string;
24
+ code?: string;
25
+ stack?: string;
26
+ };
27
+
28
+ /**
29
+ * Icon Atom Component
30
+ *
31
+ * Renders an icon from the active icon family (Layer 1 Iconography axis —
32
+ * see lib/iconFamily.ts). Canonical names are lucide kebab-case; the resolver
33
+ * dispatches to phosphor / tabler / fa-solid when `--icon-family` selects them,
34
+ * re-rendering automatically on theme switch.
35
+ *
36
+ * Supports two APIs:
37
+ * - `icon` prop: Pass a LucideIcon component directly (bypasses family resolver
38
+ * — used for direct lucide component refs, stays in lucide regardless of theme)
39
+ * - `name` prop: Pass a canonical kebab-case name (family-aware, swaps on theme)
40
+ */
41
+
42
+ /**
43
+ * Canonical icon-input type: a Lucide component reference OR a canonical
44
+ * kebab-case icon name string. The single source of truth for every
45
+ * icon-bearing prop across `@almadar/ui` — pattern-sync's parser maps this
46
+ * union to the `icon` config type, so the factory inspector renders an
47
+ * IconPicker and a string name resolves via `resolveIcon`. Never declare an
48
+ * icon prop as `React.ReactNode` (it collapses to a non-editable `node`).
49
+ */
50
+ type IconInput = LucideIcon | string;
51
+
52
+ type PatternVariant = 'star8' | 'star6' | 'khatam' | 'star10' | 'star12' | 'rosette-double' | 'rosette-filled' | 'seigaiha' | 'greek-key' | 'celtic-knot' | 'kolam' | 'arch' | 'arabesque-vine' | 'arabesque-net';
53
+
54
+ interface YouTubePlayer {
55
+ destroy(): void;
56
+ }
57
+ interface YouTubePlayerOptions {
58
+ videoId: string;
59
+ playerVars: {
60
+ autoplay: 0 | 1;
61
+ controls: 0 | 1;
62
+ start: number;
63
+ rel: 0;
64
+ };
65
+ events: {
66
+ onReady: () => void;
67
+ onError: (event: {
68
+ data: number;
69
+ }) => void;
70
+ onStateChange: (event: {
71
+ data: number;
72
+ }) => void;
73
+ };
74
+ }
75
+ interface YouTubeApi {
76
+ Player: new (host: HTMLElement, options: YouTubePlayerOptions) => YouTubePlayer;
77
+ }
78
+ declare global {
79
+ interface Window {
80
+ YT?: YouTubeApi;
81
+ onYouTubeIframeAPIReady?: () => void;
82
+ }
83
+ }
84
+
85
+ /**
86
+ * Event Bus Types
87
+ *
88
+ * Re-exports from @almadar/core so every package agrees on the same
89
+ * bus event envelope. @almadar/ui no longer owns its own KFlowEvent —
90
+ * that type was folded into core's BusEvent.
91
+ *
92
+ * @packageDocumentation
93
+ */
94
+
95
+ /**
96
+ * Event bus context type.
97
+ *
98
+ * `emit` accepts `EventPayload` from `@almadar/core` — the canonical
99
+ * object shape (index signature over `EventPayloadValue`) that the bus
100
+ * envelope stores and listeners consume. Pattern-specific payload types
101
+ * from `@almadar/core/patterns` (`ItemActionPayload`, `SelectionChangePayload`,
102
+ * `FormSubmitPayload`, ...) are structural subtypes of `EventPayload`,
103
+ * so components can pass them in without casts.
104
+ */
105
+ interface EventBusContextType {
106
+ /**
107
+ * Emit an event to all listeners.
108
+ *
109
+ * @param type - Event type identifier
110
+ * @param payload - Optional payload data (shape matches {@link EventPayload})
111
+ * @param source - Optional origin info (orbital/trait/...)
112
+ */
113
+ emit: (type: string, payload?: EventPayload, source?: BusEventSource) => void;
114
+ /**
115
+ * Subscribe to an event type.
116
+ *
117
+ * @param type - Event type to listen for
118
+ * @param listener - Callback function
119
+ * @returns Unsubscribe function
120
+ */
121
+ on: (type: string, listener: BusEventListener) => Unsubscribe;
122
+ /**
123
+ * Subscribe to an event type, but only fire once.
124
+ *
125
+ * @param type - Event type to listen for
126
+ * @param listener - Callback function
127
+ * @returns Unsubscribe function
128
+ */
129
+ once: (type: string, listener: BusEventListener) => Unsubscribe;
130
+ /**
131
+ * Check if there are any listeners for an event type.
132
+ *
133
+ * @param type - Event type to check
134
+ * @returns True if there are listeners
135
+ */
136
+ hasListeners: (type: string) => boolean;
137
+ /**
138
+ * Subscribe to ALL events regardless of type.
139
+ * Useful for verification, debugging, and analytics.
140
+ *
141
+ * @param listener - Callback function invoked for every emitted event
142
+ * @returns Unsubscribe function
143
+ */
144
+ onAny?: (listener: BusEventListener) => Unsubscribe;
145
+ }
146
+
147
+ declare global {
148
+ interface Window {
149
+ __kflowEventBus?: EventBusContextType | null;
150
+ }
151
+ }
152
+
153
+ /**
154
+ * EventBusProvider - React context provider for the event bus
155
+ *
156
+ * Provides a page-scoped event bus for trait communication.
157
+ * Each page has its own event bus instance.
158
+ *
159
+ * NOTE: Selection state has been moved to SelectionProvider.
160
+ * Use SelectionProvider for tracking selected entities.
161
+ *
162
+ * @packageDocumentation
163
+ */
164
+
165
+ /**
166
+ * Extended context type for backward compatibility.
167
+ *
168
+ * @deprecated getSelectedEntity and clearSelectedEntity are deprecated.
169
+ * Use SelectionProvider and useSelection hook instead.
170
+ */
171
+ interface EventBusContextTypeExtended extends EventBusContextType {
172
+ /** @deprecated Use useSelection from SelectionProvider instead. */
173
+ getSelectedEntity: () => EntityRow | null;
174
+ /** @deprecated Use useSelection from SelectionProvider instead. */
175
+ clearSelectedEntity: () => void;
176
+ }
177
+ declare global {
178
+ var __almadarUiEventBusContext: React.Context<EventBusContextTypeExtended | null> | undefined;
179
+ }
180
+
181
+ /**
182
+ * FeatureCard Molecule Component
183
+ *
184
+ * A card highlighting a feature with icon, title, description, and optional link.
185
+ * Composes Card, VStack, Icon, Typography, and Button atoms.
186
+ */
187
+
188
+ /**
189
+ * FeatureCard — an icon-led card pairing a title and description to call out a
190
+ * single product feature.
191
+ *
192
+ * @capabilities feature highlight, benefit callout, product capability card, feature-grid tile
193
+ */
194
+ interface FeatureCardProps extends A11yProps {
195
+ icon?: IconInput;
196
+ /** Feature title */
197
+ title: string;
198
+ /** Feature description */
199
+ description: string;
200
+ /** Optional link URL */
201
+ href?: string;
202
+ /** Label for the link button */
203
+ linkLabel?: string;
204
+ /** Card visual variant */
205
+ variant?: 'default' | 'bordered' | 'elevated' | 'interactive';
206
+ /** Card size affecting icon and spacing */
207
+ size?: 'sm' | 'md' | 'lg';
208
+ /** Additional class names */
209
+ className?: string;
210
+ }
211
+ declare const FeatureCard: React.FC<FeatureCardProps>;
212
+
213
+ /**
214
+ * FeatureGrid Molecule Component
215
+ *
216
+ * A responsive grid layout for displaying multiple FeatureCards.
217
+ * Composes SimpleGrid and FeatureCard molecules.
218
+ */
219
+
220
+ interface FeatureGridProps extends A11yProps {
221
+ /** Array of feature card configurations */
222
+ items: FeatureCardProps[];
223
+ /** Number of grid columns */
224
+ columns?: 2 | 3 | 4 | 6;
225
+ /** Gap between grid items */
226
+ gap?: 'sm' | 'md' | 'lg';
227
+ /** Additional class names */
228
+ className?: string;
229
+ }
230
+ declare const FeatureGrid: React.FC<FeatureGridProps>;
231
+
232
+ /**
233
+ * SimpleGrid Component
234
+ *
235
+ * A simplified grid that automatically adjusts columns based on available space.
236
+ * Perfect for card layouts and item collections.
237
+ */
238
+
239
+ type SimpleGridGap = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
240
+ interface SimpleGridProps extends A11yProps {
241
+ /** Minimum width of each child (e.g., 200, "200px", "15rem") */
242
+ minChildWidth?: number | string;
243
+ /** Maximum number of columns */
244
+ maxCols?: 1 | 2 | 3 | 4 | 5 | 6;
245
+ /** Exact number of columns (disables auto-fit) */
246
+ cols?: 1 | 2 | 3 | 4 | 5 | 6;
247
+ /** Gap between items */
248
+ gap?: SimpleGridGap;
249
+ /** Custom class name */
250
+ className?: string;
251
+ /** Children elements */
252
+ children: React.ReactNode;
253
+ /** Element id forwarded to the grid element. */
254
+ id?: string;
255
+ /** DOM attributes forwarded to the grid element (aria-*, data-*, role, id). */
256
+ [attr: `aria-${string}` | `data-${string}`]: string | number | boolean | undefined;
257
+ }
258
+ /**
259
+ * SimpleGrid - Auto-responsive grid layout
260
+ */
261
+ declare const SimpleGrid: React.FC<SimpleGridProps>;
262
+
263
+ /**
264
+ * Container — max-width centering wrapper (distinct from Box).
265
+ * Box controls padding/margin/bg/shadow on an arbitrary element.
266
+ * Container constrains page width and centers; use it at the layout level,
267
+ * not as a generic div replacement.
268
+ */
269
+
270
+ type ContainerSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full';
271
+ type ContainerPadding = 'none' | 'sm' | 'md' | 'lg' | 'xl';
272
+ interface ContainerProps extends A11yProps {
273
+ /** Maximum width */
274
+ size?: ContainerSize;
275
+ /** Alias for size (pattern compatibility) */
276
+ maxWidth?: ContainerSize;
277
+ /** Horizontal padding */
278
+ padding?: ContainerPadding;
279
+ /** Center horizontally */
280
+ center?: boolean;
281
+ /** Custom class name */
282
+ className?: string;
283
+ /** Children elements */
284
+ children?: React.ReactNode;
285
+ /** HTML element to render as */
286
+ as?: React.ElementType;
287
+ }
288
+ /**
289
+ * Container - Centers and constrains content width
290
+ */
291
+ declare const Container: React.FC<ContainerProps>;
292
+
293
+ /**
294
+ * StatDisplay Molecule
295
+ *
296
+ * A compact stat display: label + value + optional icon.
297
+ * Molecule-level replacement for the stats (StatCard) organism in behavior schemas.
298
+ * No entity prop, no data fetching, no hooks beyond icon resolution.
299
+ */
300
+
301
+ type StatDisplayLook = 'elevated' | 'flat' | 'progress-backed' | 'gauge' | 'sparkline';
302
+ interface StatDisplayProps extends A11yProps {
303
+ /** Display label (e.g., "Total", "Remaining") */
304
+ label: string;
305
+ /** Primary value (number or formatted string) */
306
+ value: number | string;
307
+ /** Optional denominator. >0 renders "value / max"; 0 or omitted hides the divider. */
308
+ max?: number;
309
+ /** Optional progress target. >0 renders a progress bar at value/target. */
310
+ target?: number;
311
+ /** Signed delta vs previous period. >0 renders ↑ green, <0 renders ↓ red, 0 hides. Polarity reversal via `trendPolarity`. */
312
+ trend?: number;
313
+ /** Controls whether `trend > 0` is "good" (default) or "bad". `lower-is-better` inverts the color logic. */
314
+ trendPolarity?: 'higher-is-better' | 'lower-is-better';
315
+ /** When `'percent'`, renders trend with a `%` suffix (e.g. `↓ 3.3%`); default is `'absolute'`. */
316
+ trendFormat?: 'absolute' | 'percent';
317
+ /** Optional inline sparkline data appended to the trend row. Length < 2 renders nothing. */
318
+ sparklineData?: readonly number[];
319
+ /** Event name emitted as `UI:{clickEvent}` with `{ metricLabel }` when the card is clicked. */
320
+ clickEvent?: string;
321
+ /** Prefix prepended to the formatted value (e.g. "≈ "). */
322
+ prefix?: string;
323
+ /** Suffix appended to the formatted value (e.g. " /mo", " ms"). */
324
+ suffix?: string;
325
+ /** Lucide icon name or component */
326
+ icon?: IconInput;
327
+ /** Icon background color class */
328
+ iconBg?: string;
329
+ /** Icon color class */
330
+ iconColor?: string;
331
+ /** Display format: "number", "currency", "percent" */
332
+ format?: string;
333
+ /** Size variant */
334
+ size?: 'sm' | 'md' | 'lg';
335
+ /** Color variant */
336
+ variant?: 'default' | 'primary' | 'success' | 'warning' | 'error' | 'info';
337
+ /** Compact mode (inline, no card wrapper) */
338
+ compact?: boolean;
339
+ /** Layer 2 visual treatment. */
340
+ look?: StatDisplayLook;
341
+ /** Content surface: `auto` paints the theme's surface behind this block unless it already sits on one (a card, dialog or another block); `none` opts out. */
342
+ surface?: SurfaceMode;
343
+ /** Additional CSS classes */
344
+ className?: string;
345
+ /** Loading state */
346
+ isLoading?: boolean;
347
+ /** Skeleton drawn while loading, and the shape an empty slot shows while this element's server render is in flight (`none` opts out). */
348
+ skeleton?: SkeletonSpec;
349
+ /** Error state */
350
+ error?: UiError | null;
351
+ }
352
+ declare const StatDisplay: React.FC<StatDisplayProps>;
353
+
354
+ /**
355
+ * GradientDivider Molecule Component
356
+ *
357
+ * A horizontal line that fades from transparent at edges to primary color at center.
358
+ * Used between major sections for visual separation without hard background-color breaks.
359
+ */
360
+
361
+ interface GradientDividerProps extends A11yProps {
362
+ /** Semantic palette token or a raw CSS color value. Defaults to 'primary'. */
363
+ color?: ColorToken | string;
364
+ /** Additional class names */
365
+ className?: string;
366
+ }
367
+ declare const GradientDivider: React.FC<GradientDividerProps>;
368
+
369
+ /**
370
+ * AnimatedCounter Molecule Component
371
+ *
372
+ * Counts up to a target value once it scrolls into view, then eases between
373
+ * later value changes. Optional label below the number.
374
+ */
375
+
376
+ interface AnimatedCounterProps extends A11yProps {
377
+ /** Target value. Strings may carry display affixes (e.g. "500+", "99.9%", "$1.2M"). */
378
+ value: string | number;
379
+ /** Label displayed below the number */
380
+ label?: string;
381
+ /** Animation duration in ms */
382
+ duration?: number;
383
+ /** Text displayed before the number */
384
+ prefix?: string;
385
+ /** Text displayed after the number */
386
+ suffix?: string;
387
+ /** "number" (locale grouping), "currency" (locale currency), "percent" (rounded %). Unset keeps the value's own decimals. */
388
+ format?: string;
389
+ /** Additional class names */
390
+ className?: string;
391
+ }
392
+ declare const AnimatedCounter: React.FC<AnimatedCounterProps>;
393
+
394
+ /**
395
+ * GeometricPattern Molecule
396
+ *
397
+ * Composes PatternTile into reusable layout modes for Islamic geometric
398
+ * background decoration. Supports four modes:
399
+ *
400
+ * background — full tiling fill behind content
401
+ * left/right — pattern fades from one side toward the other
402
+ * frame — thin decorative strips above and below content
403
+ *
404
+ * Uses SVG <pattern> for efficient tiling and <mask> for fade effects.
405
+ * All rendering is pure SVG (SSR-safe, no browser APIs).
406
+ */
407
+
408
+ interface GeometricPatternProps {
409
+ /** Which geometric tile design */
410
+ variant?: PatternVariant;
411
+ /** Layout mode */
412
+ mode?: 'background' | 'left' | 'right' | 'dual' | 'around' | 'frame';
413
+ /** Overall opacity (default: 0.06) */
414
+ opacity?: number;
415
+ /** Stroke color passed to PatternTile */
416
+ color?: string;
417
+ /** Tile scale multiplier (default: 1) */
418
+ scale?: number;
419
+ /** Stroke width passed to PatternTile */
420
+ strokeWidth?: number;
421
+ /** Content to wrap (used in frame mode) */
422
+ children?: React.ReactNode;
423
+ className?: string;
424
+ }
425
+ declare const GeometricPattern: React.FC<GeometricPatternProps>;
426
+
427
+ /**
428
+ * EdgeDecoration Molecule
429
+ *
430
+ * Standalone SVG decorative elements positioned on section edges.
431
+ * Unlike GeometricPattern (which tiles small units), these are large
432
+ * singular shapes placed at specific positions: left edge, right edge,
433
+ * or both.
434
+ *
435
+ * Variants:
436
+ * arch — Concentric pointed mihrab arches (half-circles opening inward)
437
+ * vine — Flowing arabesque scroll tendrils running vertically
438
+ * lattice — Fine curved diamond lattice mesh
439
+ *
440
+ * Each variant renders as an absolutely-positioned SVG on one or both
441
+ * sides of the parent container.
442
+ */
443
+
444
+ type EdgeVariant = 'arch' | 'vine' | 'lattice';
445
+ type EdgeSide = 'left' | 'right' | 'both';
446
+ interface EdgeDecorationProps {
447
+ /** Which decorative element */
448
+ variant?: EdgeVariant;
449
+ /** Which side(s) to place the decoration */
450
+ side?: EdgeSide;
451
+ /** Overall opacity (default: 0.15) */
452
+ opacity?: number;
453
+ /** Semantic palette token or a raw CSS color value for the stroke. */
454
+ color?: ColorToken | string;
455
+ /** Stroke width */
456
+ strokeWidth?: number;
457
+ /** Width of the decoration area as percentage of container (default: 15) */
458
+ width?: number;
459
+ className?: string;
460
+ }
461
+ declare const EdgeDecoration: React.FC<EdgeDecorationProps>;
462
+
463
+ export { AnimatedCounter, Container, EdgeDecoration, FeatureCard, FeatureGrid, GeometricPattern, GradientDivider, SimpleGrid, StatDisplay };
464
+ export type { AnimatedCounterProps, EdgeDecorationProps, EdgeSide, EdgeVariant, FeatureCardProps, FeatureGridProps, GeometricPatternProps, GradientDividerProps };