@almadar/shell-web 0.0.0-stage → 0.1.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.
- package/bundling.d.mts +18 -0
- package/bundling.mjs +28 -0
- package/dist/ArbitraryClassCompiler-Mzabq-UB.d.ts +100 -0
- package/dist/AvlGlyph-JKJOAH23.js +6 -0
- package/dist/AvlStateMachine-PI4YGREK.js +8 -0
- package/dist/AvlTransitionDetail-ZH7V24UG.js +12 -0
- package/dist/AvlTransitionExplainer-ZSRT7L6Y.js +13 -0
- package/dist/BehaviorValueFrame-6RUJXT4A.js +29 -0
- package/dist/BehaviorValueFrame-SSEMEBTG.css +1756 -0
- package/dist/BehaviorView-RFEE5J6E.js +10 -0
- package/dist/Canvas3DHost-_Y-5uLM_.d.ts +552 -0
- package/dist/EventBusProvider-CVwjkV_2.d.ts +284 -0
- package/dist/FileTree-BCFnBEuQ.d.ts +254 -0
- package/dist/FlowCanvas-3JRMNJLV.css +1756 -0
- package/dist/FlowCanvas-STDC4OWK.js +27 -0
- package/dist/GameAudioProvider-Cm9BnvmP.d.ts +93 -0
- package/dist/KaTeX_AMS-Regular-CYEKBG2K.woff +0 -0
- package/dist/KaTeX_AMS-Regular-JKX5W2C4.ttf +0 -0
- package/dist/KaTeX_AMS-Regular-U6PRYMIZ.woff2 +0 -0
- package/dist/KaTeX_Caligraphic-Bold-5QL5CMTE.woff2 +0 -0
- package/dist/KaTeX_Caligraphic-Bold-WZ3QSGD3.woff +0 -0
- package/dist/KaTeX_Caligraphic-Bold-ZTS3R3HK.ttf +0 -0
- package/dist/KaTeX_Caligraphic-Regular-3LKEU76G.woff +0 -0
- package/dist/KaTeX_Caligraphic-Regular-A7XRTZ5Q.ttf +0 -0
- package/dist/KaTeX_Caligraphic-Regular-KX5MEWCF.woff2 +0 -0
- package/dist/KaTeX_Fraktur-Bold-2QVFK6NQ.woff2 +0 -0
- package/dist/KaTeX_Fraktur-Bold-T4SWXBMT.woff +0 -0
- package/dist/KaTeX_Fraktur-Bold-WGHVTYOR.ttf +0 -0
- package/dist/KaTeX_Fraktur-Regular-2PEIFJSJ.woff2 +0 -0
- package/dist/KaTeX_Fraktur-Regular-5U4OPH2X.ttf +0 -0
- package/dist/KaTeX_Fraktur-Regular-PQMHCIK6.woff +0 -0
- package/dist/KaTeX_Main-Bold-2GA4IZIN.woff +0 -0
- package/dist/KaTeX_Main-Bold-W5FBVCZM.ttf +0 -0
- package/dist/KaTeX_Main-Bold-YP5VVQRP.woff2 +0 -0
- package/dist/KaTeX_Main-BoldItalic-4P4C7HJH.woff +0 -0
- package/dist/KaTeX_Main-BoldItalic-N4V3DX7S.woff2 +0 -0
- package/dist/KaTeX_Main-BoldItalic-ODMLBJJQ.ttf +0 -0
- package/dist/KaTeX_Main-Italic-I43T2HSR.ttf +0 -0
- package/dist/KaTeX_Main-Italic-RELBIK7M.woff2 +0 -0
- package/dist/KaTeX_Main-Italic-SASNQFN2.woff +0 -0
- package/dist/KaTeX_Main-Regular-ARRPAO67.woff2 +0 -0
- package/dist/KaTeX_Main-Regular-P5I74A2A.woff +0 -0
- package/dist/KaTeX_Main-Regular-W74P5G27.ttf +0 -0
- package/dist/KaTeX_Math-BoldItalic-6EBV3DK5.woff +0 -0
- package/dist/KaTeX_Math-BoldItalic-K4WTGH3J.woff2 +0 -0
- package/dist/KaTeX_Math-BoldItalic-VB447A4D.ttf +0 -0
- package/dist/KaTeX_Math-Italic-6KGCHLFN.woff2 +0 -0
- package/dist/KaTeX_Math-Italic-KKK3USB2.woff +0 -0
- package/dist/KaTeX_Math-Italic-SON4MRCA.ttf +0 -0
- package/dist/KaTeX_SansSerif-Bold-RRNVJFFW.woff2 +0 -0
- package/dist/KaTeX_SansSerif-Bold-STQ6RXC7.ttf +0 -0
- package/dist/KaTeX_SansSerif-Bold-X5M5EMOD.woff +0 -0
- package/dist/KaTeX_SansSerif-Italic-HMPFTM52.woff2 +0 -0
- package/dist/KaTeX_SansSerif-Italic-PSN4QKYX.woff +0 -0
- package/dist/KaTeX_SansSerif-Italic-WTBAZBGY.ttf +0 -0
- package/dist/KaTeX_SansSerif-Regular-2TL3USAE.ttf +0 -0
- package/dist/KaTeX_SansSerif-Regular-OQCII6EP.woff +0 -0
- package/dist/KaTeX_SansSerif-Regular-XIQ62X4E.woff2 +0 -0
- package/dist/KaTeX_Script-Regular-72OLXYNA.ttf +0 -0
- package/dist/KaTeX_Script-Regular-A5IFOEBS.woff +0 -0
- package/dist/KaTeX_Script-Regular-APUWIHLP.woff2 +0 -0
- package/dist/KaTeX_Size1-Regular-4HRHTS65.woff +0 -0
- package/dist/KaTeX_Size1-Regular-5LRUTBFT.woff2 +0 -0
- package/dist/KaTeX_Size1-Regular-7K6AASVL.ttf +0 -0
- package/dist/KaTeX_Size2-Regular-222HN3GT.ttf +0 -0
- package/dist/KaTeX_Size2-Regular-K5ZHAIS6.woff +0 -0
- package/dist/KaTeX_Size2-Regular-LELKET5D.woff2 +0 -0
- package/dist/KaTeX_Size3-Regular-TLFPAHDE.woff +0 -0
- package/dist/KaTeX_Size3-Regular-UFCO6WCA.ttf +0 -0
- package/dist/KaTeX_Size3-Regular-WQRQ47UD.woff2 +0 -0
- package/dist/KaTeX_Size4-Regular-7PGNVPQK.ttf +0 -0
- package/dist/KaTeX_Size4-Regular-CDMV7U5C.woff2 +0 -0
- package/dist/KaTeX_Size4-Regular-PKMWZHNC.woff +0 -0
- package/dist/KaTeX_Typewriter-Regular-3F5K6SQ6.ttf +0 -0
- package/dist/KaTeX_Typewriter-Regular-MJMFSK64.woff +0 -0
- package/dist/KaTeX_Typewriter-Regular-VBYJ4NRC.woff2 +0 -0
- package/dist/KernelEngineContext-BOCQoFwk.d.ts +43 -0
- package/dist/LayersPanel-BBQ54IVG.js +7 -0
- package/dist/ModuleCard-3TT2X7IW.js +7 -0
- package/dist/OrbInspector-K6T6O7GI.js +27 -0
- package/dist/OrbInspector-MHLJ6OEE.css +1756 -0
- package/dist/Select-mDZIwNqN.d.ts +199 -0
- package/dist/ServerBridge-Cm1On51b.d.ts +233 -0
- package/dist/ThemeContext-DJmO59xd.d.ts +147 -0
- package/dist/TraitValueFrame-2PJGLLVI.js +28 -0
- package/dist/TraitValueFrame-4G3KOUBR.css +1756 -0
- package/dist/UISlotContext-Dl_ewwCI.d.ts +79 -0
- package/dist/UISlotRenderer-JKFSX24W.js +27 -0
- package/dist/UISlotRenderer-KVFO6J7R.css +1756 -0
- package/dist/UserContext-DqWeZkUZ.d.ts +100 -0
- package/dist/auth/browser/index.d.ts +2 -0
- package/dist/auth/browser/index.js +1 -0
- package/dist/auth/react/index.d.ts +49 -0
- package/dist/auth/react/index.js +119 -0
- package/dist/avl/index.css +1756 -0
- package/dist/avl/index.d.ts +2238 -0
- package/dist/avl/index.js +2693 -0
- package/dist/avl-3d-context-BIRKWpaL.d.ts +204 -0
- package/dist/avl-schema-parser-CtJxJ9KU.d.ts +132 -0
- package/dist/avl-zoom-state-CKMVuBFg.d.ts +17 -0
- package/dist/chunk-2PY54Z44.js +227 -0
- package/dist/chunk-2QOH2HWM.js +95 -0
- package/dist/chunk-3BBUBJFF.js +339 -0
- package/dist/chunk-42FY4RYA.js +191 -0
- package/dist/chunk-5QTYQTPS.js +15 -0
- package/dist/chunk-6P3MWXYE.js +440 -0
- package/dist/chunk-73SRAB4P.js +1053 -0
- package/dist/chunk-A2LR6VQQ.js +349 -0
- package/dist/chunk-AILY3XPS.js +562 -0
- package/dist/chunk-B4BU77LT.js +432 -0
- package/dist/chunk-DFNZUYX4.js +378 -0
- package/dist/chunk-DJ433ET5.js +1327 -0
- package/dist/chunk-DLZF4PVE.js +24 -0
- package/dist/chunk-DYEKAA4L.js +787 -0
- package/dist/chunk-DZ42OJQC.js +176 -0
- package/dist/chunk-EOWMARUB.js +16 -0
- package/dist/chunk-EQAMU2ZC.js +14 -0
- package/dist/chunk-FAJDTHWC.js +98 -0
- package/dist/chunk-FIW6WN23.js +508 -0
- package/dist/chunk-FP3WIKTC.js +303 -0
- package/dist/chunk-G7DCAZ22.js +19 -0
- package/dist/chunk-GAR5TQ5B.js +199 -0
- package/dist/chunk-GKIFONTE.js +131 -0
- package/dist/chunk-GYTPOFVC.js +47155 -0
- package/dist/chunk-KVQS4GXU.js +328 -0
- package/dist/chunk-L2DEKY4J.js +97 -0
- package/dist/chunk-L677XGY3.js +701 -0
- package/dist/chunk-MBQAMMSE.js +11877 -0
- package/dist/chunk-P4LNHAFI.js +1051 -0
- package/dist/chunk-P4ZFUQFF.js +93 -0
- package/dist/chunk-PC7K4SK7.js +1384 -0
- package/dist/chunk-R5O5AUPI.js +573 -0
- package/dist/chunk-SGM3FASH.js +672 -0
- package/dist/chunk-SJGJJKBY.js +502 -0
- package/dist/chunk-TESBIVUA.js +11 -0
- package/dist/chunk-TZZBINQY.js +82 -0
- package/dist/chunk-U6QRZASX.js +280 -0
- package/dist/chunk-VFF5OO47.js +319 -0
- package/dist/chunk-YDNJLLG6.js +516 -0
- package/dist/chunk-YHMRX6YA.js +455 -0
- package/dist/chunk-ZO6MXAS3.js +69 -0
- package/dist/components/index.css +1756 -0
- package/dist/components/index.d.ts +11093 -0
- package/dist/components/index.js +1110 -0
- package/dist/context/index.d.ts +9 -0
- package/dist/context/index.js +7 -0
- package/dist/core.d.ts +2523 -0
- package/dist/core.js +2 -0
- package/dist/design-classes/index.cjs +429 -0
- package/dist/design-classes/index.d.cts +165 -0
- package/dist/design-classes/index.d.ts +165 -0
- package/dist/design-classes/index.js +397 -0
- package/dist/emojiItems-QGSNAABW.js +20 -0
- package/dist/fx-CmQjnHmT.d.ts +371 -0
- package/dist/hooks/index.d.ts +936 -0
- package/dist/hooks/index.js +7 -0
- package/dist/index.d.ts +486 -0
- package/dist/index.js +38 -0
- package/dist/katexPlugin-FA7NX4PE.css +1161 -0
- package/dist/katexPlugin-NCDKOOQY.js +2 -0
- package/dist/kernel-client-ZH4PSMCN.js +367 -0
- package/dist/kernel-wire-B4S8pnP3.d.ts +65 -0
- package/dist/lib/index.d.ts +602 -0
- package/dist/lib/index.js +1288 -0
- package/dist/paintDispatch-ChW5mVuK.d.ts +698 -0
- package/dist/parseLessonSegments-GpCeMrb2.d.ts +334 -0
- package/dist/perf-CKiBKbkw.d.ts +22 -0
- package/dist/perf-Dr28-AgT.d.ts +57 -0
- package/dist/prism-AIWGN2X5.js +134 -0
- package/dist/providers/index.css +1756 -0
- package/dist/providers/index.d.ts +340 -0
- package/dist/providers/index.js +30 -0
- package/dist/renderer/index.d.ts +467 -0
- package/dist/renderer/index.js +3 -0
- package/dist/runtime/index.css +1756 -0
- package/dist/runtime/index.d.ts +440 -0
- package/dist/runtime/index.js +31 -0
- package/dist/slot-host-CPzrxLo9.d.ts +48 -0
- package/dist/ssr/index.cjs +7631 -0
- package/dist/ssr/index.d.cts +487 -0
- package/dist/ssr/index.d.ts +487 -0
- package/dist/ssr/index.js +7599 -0
- package/dist/storage/browser/index.d.ts +1 -0
- package/dist/storage/browser/index.js +1 -0
- package/dist/test-support.d.ts +35 -0
- package/dist/test-support.js +114 -0
- package/dist/themeTokens-CRd8AEDF.d.ts +125 -0
- package/dist/three/index.css +503 -0
- package/dist/three/index.d.ts +1185 -0
- package/dist/three/index.js +3896 -0
- package/dist/useKeyboardRouter-Dsq553Ur.d.ts +42 -0
- package/dist/useUISlots-CiobNFGb.d.ts +211 -0
- package/dist/verification-C5pTeMJv.d.ts +66 -0
- package/dist/verificationRegistry-CabxhfTv.d.ts +122 -0
- package/dist/wrapCallbackForEvent-B9QLbhxX.d.ts +19 -0
- package/index.css +199 -0
- package/package.json +269 -3
- package/src/core/locales/ar.json +1263 -0
- package/src/core/locales/en.json +1263 -0
- package/src/core/locales/index.ts +54 -0
- package/src/core/locales/sl.json +1263 -0
- package/src/core/tokens/native-tokens.json +369 -0
- package/tailwind-compile.cjs +29 -0
- package/tailwind-preset.cjs +991 -0
- package/themes/_base.css +451 -0
- package/themes/_contract.md +307 -0
- package/themes/_fonts-kenney.css +11 -0
- package/themes/_fonts.css +12 -0
- package/themes/_foundation.css +105 -0
- package/themes/_head.css +22 -0
- package/themes/_presets.css +67 -0
- package/themes/almadar-heritage.css +455 -0
- package/themes/almadar-website.css +269 -0
- package/themes/almadar.css +269 -0
- package/themes/aqua.css +455 -0
- package/themes/arabesque.css +459 -0
- package/themes/art-deco.css +457 -0
- package/themes/art-nouveau.css +459 -0
- package/themes/atelier.css +463 -0
- package/themes/bauhaus.css +461 -0
- package/themes/bloomberg-dense.css +463 -0
- package/themes/blueprint.css +457 -0
- package/themes/clay.css +449 -0
- package/themes/comic.css +453 -0
- package/themes/constructivist.css +457 -0
- package/themes/corporate.css +449 -0
- package/themes/cyberpunk.css +453 -0
- package/themes/frutiger-aero.css +458 -0
- package/themes/game-adventure.css +201 -0
- package/themes/game-rpg.css +203 -0
- package/themes/game-sci-fi.css +201 -0
- package/themes/game-ui-pack.css +200 -0
- package/themes/gazette.css +449 -0
- package/themes/glass.css +457 -0
- package/themes/gothic.css +453 -0
- package/themes/index.css +21 -0
- package/themes/ink-wash.css +459 -0
- package/themes/kawaii.css +459 -0
- package/themes/kflow.css +310 -0
- package/themes/kiosk.css +449 -0
- package/themes/linear-clean.css +463 -0
- package/themes/luxury.css +451 -0
- package/themes/mac-classic.css +455 -0
- package/themes/material.css +463 -0
- package/themes/memphis.css +453 -0
- package/themes/mid-century.css +455 -0
- package/themes/minimalist.css +449 -0
- package/themes/mudcloth.css +459 -0
- package/themes/nata.css +310 -0
- package/themes/neon.css +453 -0
- package/themes/neumorphic.css +451 -0
- package/themes/newsprint.css +455 -0
- package/themes/notion-editorial.css +463 -0
- package/themes/orb.css +465 -0
- package/themes/pixel.css +449 -0
- package/themes/prism.css +309 -0
- package/themes/rawi.css +310 -0
- package/themes/retro.css +452 -0
- package/themes/risograph.css +463 -0
- package/themes/scandi.css +469 -0
- package/themes/sketch.css +455 -0
- package/themes/solarpunk.css +469 -0
- package/themes/steampunk.css +451 -0
- package/themes/swiss.css +455 -0
- package/themes/terminal.css +466 -0
- package/themes/trait-wars.css +487 -0
- package/themes/ukiyo-e.css +459 -0
- package/themes/vaporwave.css +455 -0
- package/themes/victorian.css +453 -0
- package/themes/wabi-sabi.css +459 -0
- package/themes/win95.css +455 -0
- package/themes/wireframe.css +439 -0
- package/themes/zine.css +455 -0
- package/README.md +0 -3
|
@@ -0,0 +1,487 @@
|
|
|
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
|
+
/**
|
|
53
|
+
* PatternTile Atom
|
|
54
|
+
*
|
|
55
|
+
* Mathematically correct Islamic geometric pattern tiles using the
|
|
56
|
+
* Polygons-in-Contact (PIC) method (Hankin 1925, formalized by Kaplan 2005).
|
|
57
|
+
*
|
|
58
|
+
* Construction: A regular polygon tiling is overlaid with star motifs.
|
|
59
|
+
* Each motif touches the enclosing polygon at EDGE MIDPOINTS only.
|
|
60
|
+
* Two rays emanate from each midpoint into the polygon at a specific
|
|
61
|
+
* CONTACT ANGLE (theta). Where rays from adjacent midpoints intersect,
|
|
62
|
+
* they form the star points. Gap tiles (squares, triangles) between
|
|
63
|
+
* polygons receive inferred geometry by extending boundary rays inward.
|
|
64
|
+
*
|
|
65
|
+
* Variants:
|
|
66
|
+
* star8 — 8-fold star-and-cross on 4.8.8 tiling (theta = 67.5 deg)
|
|
67
|
+
* star6 — 6-fold star on hexagonal tiling (theta = 60 deg)
|
|
68
|
+
* khatam — 8-fold rosette with interlocking kites (theta = 72 deg)
|
|
69
|
+
* star10 — 10-fold girih on decagonal tiling (theta = 72 deg)
|
|
70
|
+
* star12 — 12-fold on dodecagonal tiling (theta = 75 deg)
|
|
71
|
+
*
|
|
72
|
+
* All tiles use stroke only (no fill), rendering as transparent overlays.
|
|
73
|
+
*/
|
|
74
|
+
|
|
75
|
+
type PatternVariant = 'star8' | 'star6' | 'khatam' | 'star10' | 'star12' | 'rosette-double' | 'rosette-filled' | 'seigaiha' | 'greek-key' | 'celtic-knot' | 'kolam' | 'arch' | 'arabesque-vine' | 'arabesque-net';
|
|
76
|
+
|
|
77
|
+
interface YouTubePlayer {
|
|
78
|
+
destroy(): void;
|
|
79
|
+
}
|
|
80
|
+
interface YouTubePlayerOptions {
|
|
81
|
+
videoId: string;
|
|
82
|
+
playerVars: {
|
|
83
|
+
autoplay: 0 | 1;
|
|
84
|
+
controls: 0 | 1;
|
|
85
|
+
start: number;
|
|
86
|
+
rel: 0;
|
|
87
|
+
};
|
|
88
|
+
events: {
|
|
89
|
+
onReady: () => void;
|
|
90
|
+
onError: (event: {
|
|
91
|
+
data: number;
|
|
92
|
+
}) => void;
|
|
93
|
+
onStateChange: (event: {
|
|
94
|
+
data: number;
|
|
95
|
+
}) => void;
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
interface YouTubeApi {
|
|
99
|
+
Player: new (host: HTMLElement, options: YouTubePlayerOptions) => YouTubePlayer;
|
|
100
|
+
}
|
|
101
|
+
declare global {
|
|
102
|
+
interface Window {
|
|
103
|
+
YT?: YouTubeApi;
|
|
104
|
+
onYouTubeIframeAPIReady?: () => void;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Event Bus Types
|
|
110
|
+
*
|
|
111
|
+
* Re-exports from @almadar/core so every package agrees on the same
|
|
112
|
+
* bus event envelope. @almadar/ui no longer owns its own KFlowEvent —
|
|
113
|
+
* that type was folded into core's BusEvent.
|
|
114
|
+
*
|
|
115
|
+
* @packageDocumentation
|
|
116
|
+
*/
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Event bus context type.
|
|
120
|
+
*
|
|
121
|
+
* `emit` accepts `EventPayload` from `@almadar/core` — the canonical
|
|
122
|
+
* object shape (index signature over `EventPayloadValue`) that the bus
|
|
123
|
+
* envelope stores and listeners consume. Pattern-specific payload types
|
|
124
|
+
* from `@almadar/core/patterns` (`ItemActionPayload`, `SelectionChangePayload`,
|
|
125
|
+
* `FormSubmitPayload`, ...) are structural subtypes of `EventPayload`,
|
|
126
|
+
* so components can pass them in without casts.
|
|
127
|
+
*/
|
|
128
|
+
interface EventBusContextType {
|
|
129
|
+
/**
|
|
130
|
+
* Emit an event to all listeners.
|
|
131
|
+
*
|
|
132
|
+
* @param type - Event type identifier
|
|
133
|
+
* @param payload - Optional payload data (shape matches {@link EventPayload})
|
|
134
|
+
* @param source - Optional origin info (orbital/trait/...)
|
|
135
|
+
*/
|
|
136
|
+
emit: (type: string, payload?: EventPayload, source?: BusEventSource) => void;
|
|
137
|
+
/**
|
|
138
|
+
* Subscribe to an event type.
|
|
139
|
+
*
|
|
140
|
+
* @param type - Event type to listen for
|
|
141
|
+
* @param listener - Callback function
|
|
142
|
+
* @returns Unsubscribe function
|
|
143
|
+
*/
|
|
144
|
+
on: (type: string, listener: BusEventListener) => Unsubscribe;
|
|
145
|
+
/**
|
|
146
|
+
* Subscribe to an event type, but only fire once.
|
|
147
|
+
*
|
|
148
|
+
* @param type - Event type to listen for
|
|
149
|
+
* @param listener - Callback function
|
|
150
|
+
* @returns Unsubscribe function
|
|
151
|
+
*/
|
|
152
|
+
once: (type: string, listener: BusEventListener) => Unsubscribe;
|
|
153
|
+
/**
|
|
154
|
+
* Check if there are any listeners for an event type.
|
|
155
|
+
*
|
|
156
|
+
* @param type - Event type to check
|
|
157
|
+
* @returns True if there are listeners
|
|
158
|
+
*/
|
|
159
|
+
hasListeners: (type: string) => boolean;
|
|
160
|
+
/**
|
|
161
|
+
* Subscribe to ALL events regardless of type.
|
|
162
|
+
* Useful for verification, debugging, and analytics.
|
|
163
|
+
*
|
|
164
|
+
* @param listener - Callback function invoked for every emitted event
|
|
165
|
+
* @returns Unsubscribe function
|
|
166
|
+
*/
|
|
167
|
+
onAny?: (listener: BusEventListener) => Unsubscribe;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
declare global {
|
|
171
|
+
interface Window {
|
|
172
|
+
__kflowEventBus?: EventBusContextType | null;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* EventBusProvider - React context provider for the event bus
|
|
178
|
+
*
|
|
179
|
+
* Provides a page-scoped event bus for trait communication.
|
|
180
|
+
* Each page has its own event bus instance.
|
|
181
|
+
*
|
|
182
|
+
* NOTE: Selection state has been moved to SelectionProvider.
|
|
183
|
+
* Use SelectionProvider for tracking selected entities.
|
|
184
|
+
*
|
|
185
|
+
* @packageDocumentation
|
|
186
|
+
*/
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Extended context type for backward compatibility.
|
|
190
|
+
*
|
|
191
|
+
* @deprecated getSelectedEntity and clearSelectedEntity are deprecated.
|
|
192
|
+
* Use SelectionProvider and useSelection hook instead.
|
|
193
|
+
*/
|
|
194
|
+
interface EventBusContextTypeExtended extends EventBusContextType {
|
|
195
|
+
/** @deprecated Use useSelection from SelectionProvider instead. */
|
|
196
|
+
getSelectedEntity: () => EntityRow | null;
|
|
197
|
+
/** @deprecated Use useSelection from SelectionProvider instead. */
|
|
198
|
+
clearSelectedEntity: () => void;
|
|
199
|
+
}
|
|
200
|
+
declare global {
|
|
201
|
+
var __almadarUiEventBusContext: React.Context<EventBusContextTypeExtended | null> | undefined;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* FeatureCard Molecule Component
|
|
206
|
+
*
|
|
207
|
+
* A card highlighting a feature with icon, title, description, and optional link.
|
|
208
|
+
* Composes Card, VStack, Icon, Typography, and Button atoms.
|
|
209
|
+
*/
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* FeatureCard — an icon-led card pairing a title and description to call out a
|
|
213
|
+
* single product feature.
|
|
214
|
+
*
|
|
215
|
+
* @capabilities feature highlight, benefit callout, product capability card, feature-grid tile
|
|
216
|
+
*/
|
|
217
|
+
interface FeatureCardProps extends A11yProps {
|
|
218
|
+
icon?: IconInput;
|
|
219
|
+
/** Feature title */
|
|
220
|
+
title: string;
|
|
221
|
+
/** Feature description */
|
|
222
|
+
description: string;
|
|
223
|
+
/** Optional link URL */
|
|
224
|
+
href?: string;
|
|
225
|
+
/** Label for the link button */
|
|
226
|
+
linkLabel?: string;
|
|
227
|
+
/** Card visual variant */
|
|
228
|
+
variant?: 'default' | 'bordered' | 'elevated' | 'interactive';
|
|
229
|
+
/** Card size affecting icon and spacing */
|
|
230
|
+
size?: 'sm' | 'md' | 'lg';
|
|
231
|
+
/** Additional class names */
|
|
232
|
+
className?: string;
|
|
233
|
+
}
|
|
234
|
+
declare const FeatureCard: React.FC<FeatureCardProps>;
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* FeatureGrid Molecule Component
|
|
238
|
+
*
|
|
239
|
+
* A responsive grid layout for displaying multiple FeatureCards.
|
|
240
|
+
* Composes SimpleGrid and FeatureCard molecules.
|
|
241
|
+
*/
|
|
242
|
+
|
|
243
|
+
interface FeatureGridProps extends A11yProps {
|
|
244
|
+
/** Array of feature card configurations */
|
|
245
|
+
items: FeatureCardProps[];
|
|
246
|
+
/** Number of grid columns */
|
|
247
|
+
columns?: 2 | 3 | 4 | 6;
|
|
248
|
+
/** Gap between grid items */
|
|
249
|
+
gap?: 'sm' | 'md' | 'lg';
|
|
250
|
+
/** Additional class names */
|
|
251
|
+
className?: string;
|
|
252
|
+
}
|
|
253
|
+
declare const FeatureGrid: React.FC<FeatureGridProps>;
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* SimpleGrid Component
|
|
257
|
+
*
|
|
258
|
+
* A simplified grid that automatically adjusts columns based on available space.
|
|
259
|
+
* Perfect for card layouts and item collections.
|
|
260
|
+
*/
|
|
261
|
+
|
|
262
|
+
type SimpleGridGap = 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
263
|
+
interface SimpleGridProps extends A11yProps {
|
|
264
|
+
/** Minimum width of each child (e.g., 200, "200px", "15rem") */
|
|
265
|
+
minChildWidth?: number | string;
|
|
266
|
+
/** Maximum number of columns */
|
|
267
|
+
maxCols?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
268
|
+
/** Exact number of columns (disables auto-fit) */
|
|
269
|
+
cols?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
270
|
+
/** Gap between items */
|
|
271
|
+
gap?: SimpleGridGap;
|
|
272
|
+
/** Custom class name */
|
|
273
|
+
className?: string;
|
|
274
|
+
/** Children elements */
|
|
275
|
+
children: React.ReactNode;
|
|
276
|
+
/** Element id forwarded to the grid element. */
|
|
277
|
+
id?: string;
|
|
278
|
+
/** DOM attributes forwarded to the grid element (aria-*, data-*, role, id). */
|
|
279
|
+
[attr: `aria-${string}` | `data-${string}`]: string | number | boolean | undefined;
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* SimpleGrid - Auto-responsive grid layout
|
|
283
|
+
*/
|
|
284
|
+
declare const SimpleGrid: React.FC<SimpleGridProps>;
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Container — max-width centering wrapper (distinct from Box).
|
|
288
|
+
* Box controls padding/margin/bg/shadow on an arbitrary element.
|
|
289
|
+
* Container constrains page width and centers; use it at the layout level,
|
|
290
|
+
* not as a generic div replacement.
|
|
291
|
+
*/
|
|
292
|
+
|
|
293
|
+
type ContainerSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full';
|
|
294
|
+
type ContainerPadding = 'none' | 'sm' | 'md' | 'lg' | 'xl';
|
|
295
|
+
interface ContainerProps extends A11yProps {
|
|
296
|
+
/** Maximum width */
|
|
297
|
+
size?: ContainerSize;
|
|
298
|
+
/** Alias for size (pattern compatibility) */
|
|
299
|
+
maxWidth?: ContainerSize;
|
|
300
|
+
/** Horizontal padding */
|
|
301
|
+
padding?: ContainerPadding;
|
|
302
|
+
/** Center horizontally */
|
|
303
|
+
center?: boolean;
|
|
304
|
+
/** Custom class name */
|
|
305
|
+
className?: string;
|
|
306
|
+
/** Children elements */
|
|
307
|
+
children?: React.ReactNode;
|
|
308
|
+
/** HTML element to render as */
|
|
309
|
+
as?: React.ElementType;
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* Container - Centers and constrains content width
|
|
313
|
+
*/
|
|
314
|
+
declare const Container: React.FC<ContainerProps>;
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* StatDisplay Molecule
|
|
318
|
+
*
|
|
319
|
+
* A compact stat display: label + value + optional icon.
|
|
320
|
+
* Molecule-level replacement for the stats (StatCard) organism in behavior schemas.
|
|
321
|
+
* No entity prop, no data fetching, no hooks beyond icon resolution.
|
|
322
|
+
*/
|
|
323
|
+
|
|
324
|
+
type StatDisplayLook = 'elevated' | 'flat' | 'progress-backed' | 'gauge' | 'sparkline';
|
|
325
|
+
interface StatDisplayProps extends A11yProps {
|
|
326
|
+
/** Display label (e.g., "Total", "Remaining") */
|
|
327
|
+
label: string;
|
|
328
|
+
/** Primary value (number or formatted string) */
|
|
329
|
+
value: number | string;
|
|
330
|
+
/** Optional denominator. >0 renders "value / max"; 0 or omitted hides the divider. */
|
|
331
|
+
max?: number;
|
|
332
|
+
/** Optional progress target. >0 renders a progress bar at value/target. */
|
|
333
|
+
target?: number;
|
|
334
|
+
/** Signed delta vs previous period. >0 renders ↑ green, <0 renders ↓ red, 0 hides. Polarity reversal via `trendPolarity`. */
|
|
335
|
+
trend?: number;
|
|
336
|
+
/** Controls whether `trend > 0` is "good" (default) or "bad". `lower-is-better` inverts the color logic. */
|
|
337
|
+
trendPolarity?: 'higher-is-better' | 'lower-is-better';
|
|
338
|
+
/** When `'percent'`, renders trend with a `%` suffix (e.g. `↓ 3.3%`); default is `'absolute'`. */
|
|
339
|
+
trendFormat?: 'absolute' | 'percent';
|
|
340
|
+
/** Optional inline sparkline data appended to the trend row. Length < 2 renders nothing. */
|
|
341
|
+
sparklineData?: readonly number[];
|
|
342
|
+
/** Event name emitted as `UI:{clickEvent}` with `{ metricLabel }` when the card is clicked. */
|
|
343
|
+
clickEvent?: string;
|
|
344
|
+
/** Prefix prepended to the formatted value (e.g. "≈ "). */
|
|
345
|
+
prefix?: string;
|
|
346
|
+
/** Suffix appended to the formatted value (e.g. " /mo", " ms"). */
|
|
347
|
+
suffix?: string;
|
|
348
|
+
/** Lucide icon name or component */
|
|
349
|
+
icon?: IconInput;
|
|
350
|
+
/** Icon background color class */
|
|
351
|
+
iconBg?: string;
|
|
352
|
+
/** Icon color class */
|
|
353
|
+
iconColor?: string;
|
|
354
|
+
/** Display format: "number", "currency", "percent" */
|
|
355
|
+
format?: string;
|
|
356
|
+
/** Size variant */
|
|
357
|
+
size?: 'sm' | 'md' | 'lg';
|
|
358
|
+
/** Color variant */
|
|
359
|
+
variant?: 'default' | 'primary' | 'success' | 'warning' | 'error' | 'info';
|
|
360
|
+
/** Compact mode (inline, no card wrapper) */
|
|
361
|
+
compact?: boolean;
|
|
362
|
+
/** Layer 2 visual treatment. */
|
|
363
|
+
look?: StatDisplayLook;
|
|
364
|
+
/** 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. */
|
|
365
|
+
surface?: SurfaceMode;
|
|
366
|
+
/** Additional CSS classes */
|
|
367
|
+
className?: string;
|
|
368
|
+
/** Loading state */
|
|
369
|
+
isLoading?: boolean;
|
|
370
|
+
/** Skeleton drawn while loading, and the shape an empty slot shows while this element's server render is in flight (`none` opts out). */
|
|
371
|
+
skeleton?: SkeletonSpec;
|
|
372
|
+
/** Error state */
|
|
373
|
+
error?: UiError | null;
|
|
374
|
+
}
|
|
375
|
+
declare const StatDisplay: React.FC<StatDisplayProps>;
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* GradientDivider Molecule Component
|
|
379
|
+
*
|
|
380
|
+
* A horizontal line that fades from transparent at edges to primary color at center.
|
|
381
|
+
* Used between major sections for visual separation without hard background-color breaks.
|
|
382
|
+
*/
|
|
383
|
+
|
|
384
|
+
interface GradientDividerProps extends A11yProps {
|
|
385
|
+
/** Semantic palette token or a raw CSS color value. Defaults to 'primary'. */
|
|
386
|
+
color?: ColorToken | string;
|
|
387
|
+
/** Additional class names */
|
|
388
|
+
className?: string;
|
|
389
|
+
}
|
|
390
|
+
declare const GradientDivider: React.FC<GradientDividerProps>;
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* AnimatedCounter Molecule Component
|
|
394
|
+
*
|
|
395
|
+
* Counts up to a target value once it scrolls into view, then eases between
|
|
396
|
+
* later value changes. Optional label below the number.
|
|
397
|
+
*/
|
|
398
|
+
|
|
399
|
+
interface AnimatedCounterProps extends A11yProps {
|
|
400
|
+
/** Target value. Strings may carry display affixes (e.g. "500+", "99.9%", "$1.2M"). */
|
|
401
|
+
value: string | number;
|
|
402
|
+
/** Label displayed below the number */
|
|
403
|
+
label?: string;
|
|
404
|
+
/** Animation duration in ms */
|
|
405
|
+
duration?: number;
|
|
406
|
+
/** Text displayed before the number */
|
|
407
|
+
prefix?: string;
|
|
408
|
+
/** Text displayed after the number */
|
|
409
|
+
suffix?: string;
|
|
410
|
+
/** "number" (locale grouping), "currency" (locale currency), "percent" (rounded %). Unset keeps the value's own decimals. */
|
|
411
|
+
format?: string;
|
|
412
|
+
/** Additional class names */
|
|
413
|
+
className?: string;
|
|
414
|
+
}
|
|
415
|
+
declare const AnimatedCounter: React.FC<AnimatedCounterProps>;
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* GeometricPattern Molecule
|
|
419
|
+
*
|
|
420
|
+
* Composes PatternTile into reusable layout modes for Islamic geometric
|
|
421
|
+
* background decoration. Supports four modes:
|
|
422
|
+
*
|
|
423
|
+
* background — full tiling fill behind content
|
|
424
|
+
* left/right — pattern fades from one side toward the other
|
|
425
|
+
* frame — thin decorative strips above and below content
|
|
426
|
+
*
|
|
427
|
+
* Uses SVG <pattern> for efficient tiling and <mask> for fade effects.
|
|
428
|
+
* All rendering is pure SVG (SSR-safe, no browser APIs).
|
|
429
|
+
*/
|
|
430
|
+
|
|
431
|
+
interface GeometricPatternProps {
|
|
432
|
+
/** Which geometric tile design */
|
|
433
|
+
variant?: PatternVariant;
|
|
434
|
+
/** Layout mode */
|
|
435
|
+
mode?: 'background' | 'left' | 'right' | 'dual' | 'around' | 'frame';
|
|
436
|
+
/** Overall opacity (default: 0.06) */
|
|
437
|
+
opacity?: number;
|
|
438
|
+
/** Stroke color passed to PatternTile */
|
|
439
|
+
color?: string;
|
|
440
|
+
/** Tile scale multiplier (default: 1) */
|
|
441
|
+
scale?: number;
|
|
442
|
+
/** Stroke width passed to PatternTile */
|
|
443
|
+
strokeWidth?: number;
|
|
444
|
+
/** Content to wrap (used in frame mode) */
|
|
445
|
+
children?: React.ReactNode;
|
|
446
|
+
className?: string;
|
|
447
|
+
}
|
|
448
|
+
declare const GeometricPattern: React.FC<GeometricPatternProps>;
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* EdgeDecoration Molecule
|
|
452
|
+
*
|
|
453
|
+
* Standalone SVG decorative elements positioned on section edges.
|
|
454
|
+
* Unlike GeometricPattern (which tiles small units), these are large
|
|
455
|
+
* singular shapes placed at specific positions: left edge, right edge,
|
|
456
|
+
* or both.
|
|
457
|
+
*
|
|
458
|
+
* Variants:
|
|
459
|
+
* arch — Concentric pointed mihrab arches (half-circles opening inward)
|
|
460
|
+
* vine — Flowing arabesque scroll tendrils running vertically
|
|
461
|
+
* lattice — Fine curved diamond lattice mesh
|
|
462
|
+
*
|
|
463
|
+
* Each variant renders as an absolutely-positioned SVG on one or both
|
|
464
|
+
* sides of the parent container.
|
|
465
|
+
*/
|
|
466
|
+
|
|
467
|
+
type EdgeVariant = 'arch' | 'vine' | 'lattice';
|
|
468
|
+
type EdgeSide = 'left' | 'right' | 'both';
|
|
469
|
+
interface EdgeDecorationProps {
|
|
470
|
+
/** Which decorative element */
|
|
471
|
+
variant?: EdgeVariant;
|
|
472
|
+
/** Which side(s) to place the decoration */
|
|
473
|
+
side?: EdgeSide;
|
|
474
|
+
/** Overall opacity (default: 0.15) */
|
|
475
|
+
opacity?: number;
|
|
476
|
+
/** Semantic palette token or a raw CSS color value for the stroke. */
|
|
477
|
+
color?: ColorToken | string;
|
|
478
|
+
/** Stroke width */
|
|
479
|
+
strokeWidth?: number;
|
|
480
|
+
/** Width of the decoration area as percentage of container (default: 15) */
|
|
481
|
+
width?: number;
|
|
482
|
+
className?: string;
|
|
483
|
+
}
|
|
484
|
+
declare const EdgeDecoration: React.FC<EdgeDecorationProps>;
|
|
485
|
+
|
|
486
|
+
export { AnimatedCounter, Container, EdgeDecoration, FeatureCard, FeatureGrid, GeometricPattern, GradientDivider, SimpleGrid, StatDisplay };
|
|
487
|
+
export type { AnimatedCounterProps, EdgeDecorationProps, EdgeSide, EdgeVariant, FeatureCardProps, FeatureGridProps, GeometricPatternProps, GradientDividerProps };
|