@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
package/dist/core.d.ts
ADDED
|
@@ -0,0 +1,2523 @@
|
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
|
+
import React__default, { RefObject } from 'react';
|
|
3
|
+
import { A11yProps, AssetUrl, EventKey, TextureAtlas, Tilesheet, SpriteSheetAtlas, EventPayload, EventEmit, FieldValue, SExpr, Asset, OrbitalSchema, OrbitalPage, NavStackEntry, IconFamily as IconFamily$1, JsonValue, TraitIndex, SurfaceMode } from '@almadar/core';
|
|
4
|
+
export { BusEvent, BusEventListener, BusEventSource, BusEventListener as EventListener, SurfaceMode, Unsubscribe, comparePathSpecificity, matchPath, matchPathAmong } from '@almadar/core';
|
|
5
|
+
import { I as IconInput } from './fx-CmQjnHmT.js';
|
|
6
|
+
export { B as Badge, b as BadgeColor, c as BadgeProps, d as BadgeSize, e as BadgeVariant, C as CONFETTI_BURST_KEYFRAMES, f as CONFETTI_COLORS, g as ColorToken, h as ConfettiParticle, D as DisplayField, i as DisplayFieldFormat, j as DisplayFieldVariant, F as FxItem, k as FxLifecycle, l as FxOverlayItem, m as FxOverlayKind, a as FxPreset, n as FxProceduralShape, o as FxSpace, p as FxView, q as Icon, r as IconAnimation, s as IconProps, t as IconSize, u as ImageSource, L as LinkAction, P as Point, R as Rect, U as UiError, v as createConfettiParticles, w as fxHash01, x as fxLifecycle, y as resolveFxView, z as resolveIcon } from './fx-CmQjnHmT.js';
|
|
7
|
+
export { B as Button, a as ButtonProps, b as ButtonSize, c as ButtonVariant, I as Input, d as InputProps, P as PatternTile, e as PatternTileProps, f as PatternVariant, S as Select, g as SelectOption, h as SelectOptionGroup, i as SelectProps, j as getTileDimensions } from './Select-mDZIwNqN.js';
|
|
8
|
+
export { E as EventBusContext, a as EventBusContextType, b as EventBusContextTypeExtended, c as EventBusProvider, V as VideoEmbed, d as VideoEmbedProps, e as VideoErrorPayload, f as VideoPlayPayload, g as VideoReadyPayload, h as getGlobalEventBus, s as setGlobalEventBus, u as useEmitEvent, i as useEventBus, j as useEventListener, k as useEventSubscription, l as useRootEventBus } from './EventBusProvider-CVwjkV_2.js';
|
|
9
|
+
import { ClassValue } from 'clsx';
|
|
10
|
+
import { LucideIcon } from 'lucide-react';
|
|
11
|
+
import { EvalContextWire } from '@almadar/core/kernel-wire';
|
|
12
|
+
import { U as UIThemeDefinition } from './ThemeContext-DJmO59xd.js';
|
|
13
|
+
export { C as ColorMode, D as DesignTheme, R as ResolvedMode, a as ResolvedTheme, b as Theme, c as ThemeProvider, T as ThemeProviderProps, d as ThemeScope, e as ThemeScopeContext, k as keyInViewerMode, r as registryKeyMode, f as registryKeyTheme, t as themeHasMode, u as useScopedMode, g as useTheme, h as useThemeScope } from './ThemeContext-DJmO59xd.js';
|
|
14
|
+
|
|
15
|
+
type GraphicAnimation = 'draw' | 'fill' | 'pulse' | 'morph';
|
|
16
|
+
/** @accessibleName alt */
|
|
17
|
+
interface AnimatedGraphicProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>, keyof A11yProps>, A11yProps {
|
|
18
|
+
/** Additional CSS classes applied to the root element. */
|
|
19
|
+
className?: string;
|
|
20
|
+
/** URL to an SVG file. Fetched and inlined to enable stroke/fill animations. */
|
|
21
|
+
src?: AssetUrl;
|
|
22
|
+
/** Inline SVG string. Takes precedence over src if both provided. */
|
|
23
|
+
svgContent?: string;
|
|
24
|
+
/** Animation type applied to SVG paths/shapes */
|
|
25
|
+
animation?: GraphicAnimation;
|
|
26
|
+
/** Whether to run the animation (default: false). Controlled externally or via AnimatedReveal. */
|
|
27
|
+
animate?: boolean;
|
|
28
|
+
/** Animation duration in ms (default: 1200) */
|
|
29
|
+
duration?: number;
|
|
30
|
+
/** Delay before animation starts in ms (default: 0) */
|
|
31
|
+
delay?: number;
|
|
32
|
+
/** Easing function (default: cubic-bezier(0.16, 1, 0.3, 1)) */
|
|
33
|
+
easing?: string;
|
|
34
|
+
/** Width of the graphic container */
|
|
35
|
+
width?: string | number;
|
|
36
|
+
/** Height of the graphic container */
|
|
37
|
+
height?: string | number;
|
|
38
|
+
/** Stroke color override for SVG paths */
|
|
39
|
+
strokeColor?: string;
|
|
40
|
+
/** Fill color for the 'fill' animation end state */
|
|
41
|
+
fillColor?: string;
|
|
42
|
+
/** Alt text for accessibility */
|
|
43
|
+
alt?: string;
|
|
44
|
+
}
|
|
45
|
+
declare const AnimatedGraphic: React__default.ForwardRefExoticComponent<AnimatedGraphicProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
46
|
+
|
|
47
|
+
type RevealTrigger = 'scroll' | 'hover' | 'manual';
|
|
48
|
+
type RevealAnimation = 'fade-up' | 'fade-down' | 'fade-in' | 'fade-left' | 'fade-right' | 'scale' | 'scale-up' | 'none';
|
|
49
|
+
interface AnimatedRevealProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>, 'children' | keyof A11yProps>, A11yProps {
|
|
50
|
+
/** Additional CSS classes applied to the root element. */
|
|
51
|
+
className?: string;
|
|
52
|
+
/** What triggers the animation */
|
|
53
|
+
trigger?: RevealTrigger;
|
|
54
|
+
/** Built-in animation preset */
|
|
55
|
+
animation?: RevealAnimation;
|
|
56
|
+
/** Animation duration in ms (default: 600) */
|
|
57
|
+
duration?: number;
|
|
58
|
+
/** Delay before animation starts in ms (default: 0) */
|
|
59
|
+
delay?: number;
|
|
60
|
+
/** How much of the element must be visible before triggering, 0-1 (default: 0.15) */
|
|
61
|
+
threshold?: number;
|
|
62
|
+
/**
|
|
63
|
+
* scroll trigger: event emitted once (as UI:{revealEvent}) the first time the element scrolls into view; never under reduced motion
|
|
64
|
+
* @notification
|
|
65
|
+
*/
|
|
66
|
+
revealEvent?: EventKey;
|
|
67
|
+
/**
|
|
68
|
+
* scroll trigger: event emitted (as UI:{enterEvent}) every time the element enters the view
|
|
69
|
+
* @notification
|
|
70
|
+
*/
|
|
71
|
+
enterEvent?: EventKey;
|
|
72
|
+
/**
|
|
73
|
+
* scroll trigger: event emitted (as UI:{leaveEvent}) every time the element leaves the view after having entered it
|
|
74
|
+
* @notification
|
|
75
|
+
*/
|
|
76
|
+
leaveEvent?: EventKey;
|
|
77
|
+
/** Animate only the first time the element enters the viewport (default: true) */
|
|
78
|
+
once?: boolean;
|
|
79
|
+
/** Manual control: when trigger='manual', set this to true to animate */
|
|
80
|
+
animate?: boolean;
|
|
81
|
+
/** Easing function (default: cubic-bezier(0.16, 1, 0.3, 1)) */
|
|
82
|
+
easing?: string;
|
|
83
|
+
/** Children: ReactNode or render function receiving animated state */
|
|
84
|
+
children: React__default.ReactNode | ((animated: boolean) => React__default.ReactNode);
|
|
85
|
+
}
|
|
86
|
+
declare const AnimatedReveal: React__default.ForwardRefExoticComponent<AnimatedRevealProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Aside Atom Component
|
|
90
|
+
*
|
|
91
|
+
* Semantic wrapper for the native `<aside>` landmark. Owns raw HTML so
|
|
92
|
+
* molecules (SidePanel, navigation rails, callouts) can compose the
|
|
93
|
+
* semantic-aside primitive without falling back to a raw element.
|
|
94
|
+
*/
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Aside — a secondary side panel that hosts navigation links or supplementary
|
|
98
|
+
* content alongside a main content area.
|
|
99
|
+
*
|
|
100
|
+
* @capabilities settings navigation sidebar, preferences menu panel, account settings nav, secondary panel, side navigation rail
|
|
101
|
+
*/
|
|
102
|
+
interface AsideProps extends Omit<React__default.HTMLAttributes<HTMLElement>, keyof A11yProps>, A11yProps {
|
|
103
|
+
/** Additional CSS classes */
|
|
104
|
+
className?: string;
|
|
105
|
+
/** Aside contents */
|
|
106
|
+
children?: React__default.ReactNode;
|
|
107
|
+
}
|
|
108
|
+
declare const Aside: React__default.ForwardRefExoticComponent<AsideProps & React__default.RefAttributes<HTMLElement>>;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* atlasSlice — the ONLY place a packed sheet is cut at runtime.
|
|
112
|
+
*
|
|
113
|
+
* An `Asset` may carry `{ url: <sheet.png>, atlas: <atlas.json>, sprite: <name|index> }`. This
|
|
114
|
+
* module fetches + caches the atlas JSON (a `TextureAtlas` of named sub-rects or a uniform
|
|
115
|
+
* `Tilesheet`) and resolves the source rectangle for a `sprite`, so the canvas can `drawImage`
|
|
116
|
+
* exactly that sub-region of the sheet. Coexists with the whole-PNG path (an Asset with no
|
|
117
|
+
* `atlas`/`sprite` draws the whole image) and the `useUnitSpriteAtlas` animation path.
|
|
118
|
+
*
|
|
119
|
+
* See `docs/Almadar_Std_Assets.md` §2, §7.
|
|
120
|
+
*
|
|
121
|
+
* @packageDocumentation
|
|
122
|
+
*/
|
|
123
|
+
|
|
124
|
+
/** The minimal draw-relevant projection of an `Asset` — a sheet URL plus an optional atlas
|
|
125
|
+
* sub-texture reference. A full `@almadar/core` `Asset` is structurally assignable. */
|
|
126
|
+
interface SpriteRef {
|
|
127
|
+
url?: string;
|
|
128
|
+
atlas?: string;
|
|
129
|
+
sprite?: string;
|
|
130
|
+
}
|
|
131
|
+
type ParsedAtlas = TextureAtlas | Tilesheet | SpriteSheetAtlas;
|
|
132
|
+
/** True for an animated sprite-sheet manifest (frame grid + animation rows). */
|
|
133
|
+
declare function isSpriteSheetAtlas(a: ParsedAtlas): a is SpriteSheetAtlas;
|
|
134
|
+
/**
|
|
135
|
+
* Get a parsed atlas by URL, fetching+caching on first request. Returns undefined until loaded;
|
|
136
|
+
* `onReady` fires once when the fetch resolves so the caller can trigger a re-render.
|
|
137
|
+
*/
|
|
138
|
+
declare function getAtlas(url: string, onReady: () => void): ParsedAtlas | undefined;
|
|
139
|
+
/** True when the atlas fetch for `url` has failed (cached null). `getAtlas`
|
|
140
|
+
* collapses in-flight and failed to `undefined`; this distinguishes them. */
|
|
141
|
+
declare function atlasFailed(url: string): boolean;
|
|
142
|
+
interface SubRect {
|
|
143
|
+
sx: number;
|
|
144
|
+
sy: number;
|
|
145
|
+
sw: number;
|
|
146
|
+
sh: number;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Resolve the source rect for `sprite` in `atlas`.
|
|
150
|
+
* - `TextureAtlas`: `sprite` is a SubTexture name (e.g. `"blockBrown.png"`).
|
|
151
|
+
* - `Tilesheet`: `sprite` is `"col,row"` or a flat index into the row-major grid.
|
|
152
|
+
* Returns null if the name/index doesn't resolve.
|
|
153
|
+
*/
|
|
154
|
+
declare function subRectFor(atlas: ParsedAtlas, sprite: string): SubRect | null;
|
|
155
|
+
/** True when the asset points into a sheet (needs slicing) rather than being a whole PNG. */
|
|
156
|
+
/** The asset's atlas manifest URL; an empty string means no atlas. */
|
|
157
|
+
declare function atlasUrlOf(asset: SpriteRef | undefined | null): string | undefined;
|
|
158
|
+
declare function isAtlasAsset(asset: SpriteRef | undefined | null): boolean;
|
|
159
|
+
interface AssetSource {
|
|
160
|
+
img: HTMLImageElement;
|
|
161
|
+
/** Sub-rect to blit; null = draw the whole image. */
|
|
162
|
+
rect: SubRect | null;
|
|
163
|
+
/** Source aspect ratio (width/height) — sub-rect for a slice, natural otherwise. */
|
|
164
|
+
aspect: number;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Resolve what to draw for `asset` given its loaded sheet `img`. Returns null when the asset is
|
|
168
|
+
* an atlas ref whose JSON isn't loaded yet (or whose sprite name doesn't resolve) — `onReady`
|
|
169
|
+
* will trigger a re-render once the fetch lands. Callers use `.aspect` to size, then `blit`.
|
|
170
|
+
*/
|
|
171
|
+
declare function resolveAssetSource(img: HTMLImageElement, asset: SpriteRef | undefined | null, onReady: () => void): AssetSource | null;
|
|
172
|
+
/** Draw a resolved source at `(dx,dy,dw,dh)` — sliced sub-rect or whole image. */
|
|
173
|
+
declare function blit(ctx: CanvasRenderingContext2D, src: AssetSource, dx: number, dy: number, dw: number, dh: number): void;
|
|
174
|
+
|
|
175
|
+
/** Asset-compatible input: sheet url + optional atlas sub-texture reference. */
|
|
176
|
+
interface AtlasImageAsset extends SpriteRef {
|
|
177
|
+
name?: string;
|
|
178
|
+
category?: string;
|
|
179
|
+
}
|
|
180
|
+
/** @accessibleName alt */
|
|
181
|
+
interface AtlasImageProps extends Omit<A11yProps, 'aria-hidden'> {
|
|
182
|
+
asset?: AtlasImageAsset;
|
|
183
|
+
/** Square pixel size (icon usage). Ignored when `fill`. */
|
|
184
|
+
size?: number;
|
|
185
|
+
width?: number;
|
|
186
|
+
height?: number;
|
|
187
|
+
/** Absolutely fill the nearest positioned ancestor (background usage). */
|
|
188
|
+
fill?: boolean;
|
|
189
|
+
fit?: 'contain' | 'cover' | 'fill';
|
|
190
|
+
alt?: string;
|
|
191
|
+
className?: string;
|
|
192
|
+
style?: React$1.CSSProperties;
|
|
193
|
+
'aria-hidden'?: boolean;
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Resolve an atlas slice to a standalone dataURL (extracted once, cached) so CSS can 9-slice or
|
|
197
|
+
* tile it — `border-image`/`background-repeat` can't crop a packed sheet. Returns undefined until
|
|
198
|
+
* the sheet + atlas are loaded; `onReady` re-fires the caller when they land.
|
|
199
|
+
*/
|
|
200
|
+
declare function useAtlasSliceDataUrl(asset: AtlasImageAsset | undefined): string | undefined;
|
|
201
|
+
interface AtlasPanelProps extends Omit<A11yProps, 'aria-hidden'> {
|
|
202
|
+
asset?: AtlasImageAsset;
|
|
203
|
+
/** Border thickness (source pixels) for the 9-slice cut. */
|
|
204
|
+
borderSlice?: number;
|
|
205
|
+
/** Rendered border width in CSS px. */
|
|
206
|
+
borderWidth?: number;
|
|
207
|
+
/** 'nineSlice' scales edges crisp (panels/buttons); 'repeat' tiles the slice (pattern fills). */
|
|
208
|
+
mode?: 'nineSlice' | 'repeat';
|
|
209
|
+
className?: string;
|
|
210
|
+
style?: React$1.CSSProperties;
|
|
211
|
+
children?: React$1.ReactNode;
|
|
212
|
+
'aria-hidden'?: boolean;
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* A container skinned by an atlas slice: 9-sliced panel chrome or a tiled pattern. The pack sheet
|
|
216
|
+
* is cropped once to a dataURL; CSS border-image / background-repeat does the scaling. Falls back
|
|
217
|
+
* to a plain container while the sheet/atlas load.
|
|
218
|
+
*/
|
|
219
|
+
declare function AtlasPanel({ asset, borderSlice, borderWidth, mode, className, style, children, 'aria-hidden': ariaHidden, ...rest }: AtlasPanelProps): React$1.JSX.Element;
|
|
220
|
+
declare namespace AtlasPanel {
|
|
221
|
+
var displayName: string;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* The one chrome-side renderer for `Asset` images. With `atlas`+`sprite` it draws EXACTLY that
|
|
225
|
+
* sub-rect of the packed sheet into a canvas (never the whole sheet); otherwise it renders the
|
|
226
|
+
* plain `<img>` path. `fill` + `fit` cover background/panel usage (GameShell, card frames).
|
|
227
|
+
*/
|
|
228
|
+
declare function AtlasImage({ asset, size, width, height, fill, fit, alt, className, style, 'aria-hidden': ariaHidden, ...rest }: AtlasImageProps): React$1.JSX.Element | null;
|
|
229
|
+
declare namespace AtlasImage {
|
|
230
|
+
var displayName: string;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
type AvatarSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
234
|
+
type AvatarStatus = "online" | "offline" | "away" | "busy";
|
|
235
|
+
/** @accessibleName alt name */
|
|
236
|
+
interface AvatarProps extends A11yProps {
|
|
237
|
+
/**
|
|
238
|
+
* Image source URL
|
|
239
|
+
*/
|
|
240
|
+
src?: AssetUrl;
|
|
241
|
+
/**
|
|
242
|
+
* Alt text for the image
|
|
243
|
+
*/
|
|
244
|
+
alt?: string;
|
|
245
|
+
/**
|
|
246
|
+
* Full name - initials will be generated automatically
|
|
247
|
+
*/
|
|
248
|
+
name?: string;
|
|
249
|
+
/**
|
|
250
|
+
* Initials to display (e.g., "JD" for John Doe)
|
|
251
|
+
* If not provided but name is, initials will be auto-generated
|
|
252
|
+
*/
|
|
253
|
+
initials?: string;
|
|
254
|
+
/**
|
|
255
|
+
* Icon to display when no image or initials. Accepts a Lucide component
|
|
256
|
+
* directly, or a canonical kebab-case icon name string (resolved via
|
|
257
|
+
* `resolveIcon`) so trait/factory authors can pass an icon by name.
|
|
258
|
+
*/
|
|
259
|
+
icon?: IconInput;
|
|
260
|
+
/**
|
|
261
|
+
* Size of the avatar
|
|
262
|
+
* @default 'md'
|
|
263
|
+
*/
|
|
264
|
+
size?: AvatarSize;
|
|
265
|
+
/**
|
|
266
|
+
* Status indicator
|
|
267
|
+
*/
|
|
268
|
+
status?: AvatarStatus;
|
|
269
|
+
/**
|
|
270
|
+
* Badge content (e.g., notification count)
|
|
271
|
+
*/
|
|
272
|
+
badge?: string | number;
|
|
273
|
+
/**
|
|
274
|
+
* Additional CSS classes
|
|
275
|
+
*/
|
|
276
|
+
className?: string;
|
|
277
|
+
/**
|
|
278
|
+
* Click handler
|
|
279
|
+
*/
|
|
280
|
+
onClick?: () => void;
|
|
281
|
+
/** Declarative event name — emits UI:{action} via eventBus on click */
|
|
282
|
+
action?: EventKey;
|
|
283
|
+
/** Payload to include with the action event
|
|
284
|
+
* @payloadFor action
|
|
285
|
+
*/
|
|
286
|
+
actionPayload?: EventPayload;
|
|
287
|
+
}
|
|
288
|
+
declare const Avatar: React__default.FC<AvatarProps>;
|
|
289
|
+
|
|
290
|
+
type BandEdge = 'none' | 'curve' | 'wave' | 'arc' | 'tilt' | 'step' | 'scallop';
|
|
291
|
+
type BandEdgeColor = 'background' | 'muted' | 'surface' | 'gradient' | 'inverse';
|
|
292
|
+
declare const BAND_SHAPES: Record<Exclude<BandEdge, 'none' | 'curve'>, string>;
|
|
293
|
+
declare const BAND_ACCENT_FALLBACK = "linear-gradient(180deg, color-mix(in oklab, var(--color-primary) 12%, var(--color-background)), var(--color-background))";
|
|
294
|
+
declare const BAND_EDGE_FILL: Record<BandEdgeColor, string>;
|
|
295
|
+
declare function bandEdgeMask(edge: Exclude<BandEdge, 'none'>): string;
|
|
296
|
+
declare function bandEdgeHeight(edge: Exclude<BandEdge, 'none'>): string;
|
|
297
|
+
interface BandEdgeLayerStyle {
|
|
298
|
+
height: string;
|
|
299
|
+
background: string;
|
|
300
|
+
maskImage: string;
|
|
301
|
+
WebkitMaskImage: string;
|
|
302
|
+
transform?: string;
|
|
303
|
+
backgroundSize?: string;
|
|
304
|
+
backgroundAttachment?: string;
|
|
305
|
+
}
|
|
306
|
+
declare function bandEdgeLayerStyle(edge: Exclude<BandEdge, 'none'>, side: 'top' | 'bottom', flip: boolean, color: BandEdgeColor): BandEdgeLayerStyle;
|
|
307
|
+
declare function bandPadding(basePad: string, edge: BandEdge): string | undefined;
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Box Component
|
|
311
|
+
*
|
|
312
|
+
* A versatile layout primitive that provides spacing, background, border, and shadow controls.
|
|
313
|
+
* Think of it as a styled div with consistent design tokens.
|
|
314
|
+
*/
|
|
315
|
+
|
|
316
|
+
type BoxPadding = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
317
|
+
type BoxMargin = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "auto";
|
|
318
|
+
type BoxBg = "transparent" | "primary" | "secondary" | "muted" | "accent" | "surface" | "overlay" | "gradient" | "inverse";
|
|
319
|
+
type BoxRounded = "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "full";
|
|
320
|
+
type BoxShadow = "none" | "sm" | "md" | "lg" | "xl";
|
|
321
|
+
interface BoxProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>, keyof A11yProps>, A11yProps {
|
|
322
|
+
/** Additional CSS classes applied to the root element. */
|
|
323
|
+
className?: string;
|
|
324
|
+
/** Data-theme attribute applied to the root element for CSS theme scoping (e.g. almadar-website-dark). */
|
|
325
|
+
'data-theme'?: string;
|
|
326
|
+
/**
|
|
327
|
+
* Padding on all sides
|
|
328
|
+
* @example md
|
|
329
|
+
*/
|
|
330
|
+
padding?: BoxPadding;
|
|
331
|
+
/** Horizontal padding (overrides padding for x-axis) */
|
|
332
|
+
paddingX?: BoxPadding;
|
|
333
|
+
/** Vertical padding (overrides padding for y-axis) */
|
|
334
|
+
paddingY?: BoxPadding;
|
|
335
|
+
/** Margin on all sides */
|
|
336
|
+
margin?: BoxMargin;
|
|
337
|
+
/** Horizontal margin */
|
|
338
|
+
marginX?: BoxMargin;
|
|
339
|
+
/** Vertical margin */
|
|
340
|
+
marginY?: BoxMargin;
|
|
341
|
+
/** Background color */
|
|
342
|
+
bg?: BoxBg;
|
|
343
|
+
/**
|
|
344
|
+
* Show border
|
|
345
|
+
* @example true
|
|
346
|
+
*/
|
|
347
|
+
border?: boolean;
|
|
348
|
+
/** Border radius */
|
|
349
|
+
rounded?: BoxRounded;
|
|
350
|
+
/** Box shadow */
|
|
351
|
+
shadow?: BoxShadow;
|
|
352
|
+
/** Display type */
|
|
353
|
+
display?: "block" | "inline" | "inline-block" | "flex" | "inline-flex" | "grid";
|
|
354
|
+
/** Fill available width */
|
|
355
|
+
fullWidth?: boolean;
|
|
356
|
+
/** Fill available height */
|
|
357
|
+
fullHeight?: boolean;
|
|
358
|
+
/** Overflow behavior */
|
|
359
|
+
overflow?: "auto" | "hidden" | "visible" | "scroll";
|
|
360
|
+
/** Position */
|
|
361
|
+
position?: "relative" | "absolute" | "fixed" | "sticky";
|
|
362
|
+
/** HTML element to render as */
|
|
363
|
+
as?: React__default.ElementType;
|
|
364
|
+
/** Declarative event name — emits UI:{action} via eventBus on click */
|
|
365
|
+
action?: EventKey;
|
|
366
|
+
/** Payload to include with the action event
|
|
367
|
+
* @payloadFor action
|
|
368
|
+
*/
|
|
369
|
+
actionPayload?: EventPayload;
|
|
370
|
+
/**
|
|
371
|
+
* Declarative hover event — emits UI:{hoverEvent} with { hovered: true/false } on mouseEnter/mouseLeave
|
|
372
|
+
* @notification
|
|
373
|
+
*/
|
|
374
|
+
hoverEvent?: EventEmit<{
|
|
375
|
+
hovered: boolean;
|
|
376
|
+
}>;
|
|
377
|
+
/** When true (default), a touch/pen tap also fires `hoverEvent` (toggling hovered) so hover-only reveals work on touch. */
|
|
378
|
+
tapReveal?: boolean;
|
|
379
|
+
/** Maximum width (CSS value, e.g., "550px", "80rem") */
|
|
380
|
+
maxWidth?: string;
|
|
381
|
+
/** Shape cut into the top edge of a full-width band; "curve" uses the theme's shape */
|
|
382
|
+
edgeTop?: BandEdge;
|
|
383
|
+
/** Shape cut into the bottom edge of a full-width band; "curve" uses the theme's shape */
|
|
384
|
+
edgeBottom?: BandEdge;
|
|
385
|
+
/** Surface of the neighbouring band, which fills the cut */
|
|
386
|
+
edgeColor?: BandEdgeColor;
|
|
387
|
+
/** Mirror the edge shapes horizontally */
|
|
388
|
+
edgeFlip?: boolean;
|
|
389
|
+
/** Lay the theme's texture over the band */
|
|
390
|
+
texture?: boolean;
|
|
391
|
+
/** Content that appears or changes inside the box eases in instead of switching in one frame (new rows, swapped views, changed text), played in presentation motion (the theme's dramatic duration, standard easing) so it can be watched. Off under reduced motion. */
|
|
392
|
+
animateChanges?: boolean;
|
|
393
|
+
/** Scene behind the band's content (photo, illustration, pattern); never takes clicks */
|
|
394
|
+
backdrop?: React__default.ReactNode;
|
|
395
|
+
/** Children elements */
|
|
396
|
+
children?: React__default.ReactNode;
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* Box - Versatile container component with design tokens
|
|
400
|
+
*/
|
|
401
|
+
declare const Box: React__default.ForwardRefExoticComponent<BoxProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
402
|
+
|
|
403
|
+
type CardShadow = "none" | "sm" | "md" | "lg";
|
|
404
|
+
/**
|
|
405
|
+
* Layer 2 visual treatment for the card pattern — orthogonal to the semantic
|
|
406
|
+
* `variant` (which conveys role / state).
|
|
407
|
+
*/
|
|
408
|
+
type CardLook = "elevated" | "flat-bordered" | "borderless-divider" | "ticket" | "invoice" | "chip" | "tile-image-first";
|
|
409
|
+
interface CardProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>, keyof A11yProps>, A11yProps {
|
|
410
|
+
/** Additional CSS classes applied to the root element. */
|
|
411
|
+
className?: string;
|
|
412
|
+
variant?: "default" | "bordered" | "elevated" | "interactive";
|
|
413
|
+
padding?: "none" | "sm" | "md" | "lg";
|
|
414
|
+
/** Card title - renders in header if provided */
|
|
415
|
+
title?: string;
|
|
416
|
+
/** Card subtitle - renders below title */
|
|
417
|
+
subtitle?: string;
|
|
418
|
+
/** Shadow size override */
|
|
419
|
+
shadow?: CardShadow;
|
|
420
|
+
/** Layer 2 visual treatment — orthogonal to the semantic variant. */
|
|
421
|
+
look?: CardLook;
|
|
422
|
+
/** Card content */
|
|
423
|
+
children?: React__default.ReactNode;
|
|
424
|
+
/** Declarative event key emitted on click for trait dispatch */
|
|
425
|
+
action?: EventKey;
|
|
426
|
+
/** Shows a skeleton/spinner overlay while true. */
|
|
427
|
+
loading?: boolean;
|
|
428
|
+
}
|
|
429
|
+
declare const Card: React__default.ForwardRefExoticComponent<CardProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
430
|
+
declare const CardHeader: React__default.ForwardRefExoticComponent<React__default.HTMLAttributes<HTMLDivElement> & React__default.RefAttributes<HTMLDivElement>>;
|
|
431
|
+
declare const CardTitle: React__default.ForwardRefExoticComponent<React__default.HTMLAttributes<HTMLHeadingElement> & React__default.RefAttributes<HTMLHeadingElement>>;
|
|
432
|
+
declare const CardContent: React__default.ForwardRefExoticComponent<React__default.HTMLAttributes<HTMLDivElement> & React__default.RefAttributes<HTMLDivElement>>;
|
|
433
|
+
declare const CardBody: React__default.ForwardRefExoticComponent<React__default.HTMLAttributes<HTMLDivElement> & React__default.RefAttributes<HTMLDivElement>>;
|
|
434
|
+
declare const CardFooter: React__default.ForwardRefExoticComponent<React__default.HTMLAttributes<HTMLDivElement> & React__default.RefAttributes<HTMLDivElement>>;
|
|
435
|
+
|
|
436
|
+
interface CenterProps extends A11yProps {
|
|
437
|
+
/** Center inline (width fits content) vs block (full width) */
|
|
438
|
+
inline?: boolean;
|
|
439
|
+
/** Center only horizontally */
|
|
440
|
+
horizontal?: boolean;
|
|
441
|
+
/** Center only vertically */
|
|
442
|
+
vertical?: boolean;
|
|
443
|
+
/** Minimum height (useful for vertical centering) */
|
|
444
|
+
minHeight?: string | number;
|
|
445
|
+
/** Fill available height */
|
|
446
|
+
fullHeight?: boolean;
|
|
447
|
+
/** Fill available width */
|
|
448
|
+
fullWidth?: boolean;
|
|
449
|
+
/** Custom class name */
|
|
450
|
+
className?: string;
|
|
451
|
+
/** Inline styles */
|
|
452
|
+
style?: React__default.CSSProperties;
|
|
453
|
+
/** Children elements */
|
|
454
|
+
children: React__default.ReactNode;
|
|
455
|
+
/** HTML element to render as */
|
|
456
|
+
as?: React__default.ElementType;
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* Center - Centers content horizontally and/or vertically
|
|
460
|
+
*/
|
|
461
|
+
declare const Center: React__default.FC<CenterProps>;
|
|
462
|
+
|
|
463
|
+
/** @accessibleName label */
|
|
464
|
+
interface CheckboxProps extends Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "type" | "onChange" | keyof A11yProps>, A11yProps {
|
|
465
|
+
/** Additional CSS classes applied to the root element. */
|
|
466
|
+
className?: string;
|
|
467
|
+
/** Whether the checkbox is checked */
|
|
468
|
+
checked?: boolean;
|
|
469
|
+
/** Default checked state (uncontrolled) */
|
|
470
|
+
defaultChecked?: boolean;
|
|
471
|
+
label?: string;
|
|
472
|
+
/** Error message */
|
|
473
|
+
error?: string;
|
|
474
|
+
/** onChange handler or declarative event key for trait dispatch */
|
|
475
|
+
onChange?: React__default.ChangeEventHandler<HTMLInputElement> | EventEmit<{
|
|
476
|
+
checked: boolean;
|
|
477
|
+
}>;
|
|
478
|
+
}
|
|
479
|
+
declare const Checkbox: React__default.ForwardRefExoticComponent<CheckboxProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
480
|
+
|
|
481
|
+
/**
|
|
482
|
+
* ConditionalWrapper Atom Component
|
|
483
|
+
*
|
|
484
|
+
* A wrapper component that conditionally renders its children based on
|
|
485
|
+
* S-expression evaluation. Used for dynamic field visibility in inspection forms.
|
|
486
|
+
*/
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* Context for conditional evaluation
|
|
490
|
+
*/
|
|
491
|
+
type ConditionalContext = {
|
|
492
|
+
formValues: Record<string, FieldValue>;
|
|
493
|
+
globalVariables: Record<string, FieldValue>;
|
|
494
|
+
localVariables?: Record<string, FieldValue>;
|
|
495
|
+
entity?: Record<string, FieldValue>;
|
|
496
|
+
};
|
|
497
|
+
interface ConditionalWrapperProps {
|
|
498
|
+
/** The S-expression condition to evaluate */
|
|
499
|
+
condition?: SExpr;
|
|
500
|
+
/** Context for evaluating the condition */
|
|
501
|
+
context: ConditionalContext;
|
|
502
|
+
/** Children to render when condition is true (or when no condition is provided) */
|
|
503
|
+
children: React__default.ReactNode;
|
|
504
|
+
/** Optional fallback to render when condition is false */
|
|
505
|
+
fallback?: React__default.ReactNode;
|
|
506
|
+
/** Whether to animate the transition (uses CSS transitions) */
|
|
507
|
+
animate?: boolean;
|
|
508
|
+
}
|
|
509
|
+
/**
|
|
510
|
+
* ConditionalWrapper conditionally renders children based on S-expression evaluation.
|
|
511
|
+
*
|
|
512
|
+
* Supported bindings:
|
|
513
|
+
* - @entity.formValues.fieldId - Access form field values
|
|
514
|
+
* - @entity.globalVariables.HG_VAR - Access global inspection variables
|
|
515
|
+
* - @entity.localVariables.H_VAR - Access document-local variables
|
|
516
|
+
* - @state - Current state machine state
|
|
517
|
+
* - @now - Current timestamp
|
|
518
|
+
*
|
|
519
|
+
* @example
|
|
520
|
+
* // Simple condition - show field when another field equals a value
|
|
521
|
+
* <ConditionalWrapper
|
|
522
|
+
* condition={["=", "@entity.formValues.vehicleType", "commercial"]}
|
|
523
|
+
* context={{ formValues: { vehicleType: "commercial" }, globalVariables: {} }}
|
|
524
|
+
* >
|
|
525
|
+
* <Input name="commercialLicenseNumber" />
|
|
526
|
+
* </ConditionalWrapper>
|
|
527
|
+
*
|
|
528
|
+
* @example
|
|
529
|
+
* // With fallback - show message when condition not met
|
|
530
|
+
* <ConditionalWrapper
|
|
531
|
+
* condition={[">=", "@entity.formValues.loadWeight", 3500]}
|
|
532
|
+
* context={formContext}
|
|
533
|
+
* fallback={<Typography variant="small">Load weight must be at least 3500kg</Typography>}
|
|
534
|
+
* >
|
|
535
|
+
* <HeavyVehicleFields />
|
|
536
|
+
* </ConditionalWrapper>
|
|
537
|
+
*
|
|
538
|
+
* @example
|
|
539
|
+
* // Using global variables for cross-form conditions
|
|
540
|
+
* <ConditionalWrapper
|
|
541
|
+
* condition={["=", "@entity.globalVariables.HG_POTROSNIKI", "DA"]}
|
|
542
|
+
* context={{ formValues: {}, globalVariables: { HG_POTROSNIKI: "DA" } }}
|
|
543
|
+
* >
|
|
544
|
+
* <PriceMarkingSection />
|
|
545
|
+
* </ConditionalWrapper>
|
|
546
|
+
*/
|
|
547
|
+
declare const ConditionalWrapper: React__default.FC<ConditionalWrapperProps>;
|
|
548
|
+
|
|
549
|
+
interface ConfettiEffectProps extends A11yProps {
|
|
550
|
+
/** When this changes from false to true, a burst of particles is spawned */
|
|
551
|
+
trigger: boolean;
|
|
552
|
+
/** How long the animation lasts in milliseconds */
|
|
553
|
+
duration?: number;
|
|
554
|
+
/** Number of particles to spawn */
|
|
555
|
+
particleCount?: number;
|
|
556
|
+
/** Additional class names */
|
|
557
|
+
className?: string;
|
|
558
|
+
}
|
|
559
|
+
declare const ConfettiEffect: React__default.FC<ConfettiEffectProps>;
|
|
560
|
+
|
|
561
|
+
interface DayCellProps extends A11yProps {
|
|
562
|
+
/** The date this cell represents. Optional at the dynamic render edge: an
|
|
563
|
+
* unbound `@config.date` arrives as `undefined`, so the cell falls back to today. */
|
|
564
|
+
date?: Date;
|
|
565
|
+
/** Whether this date is today */
|
|
566
|
+
isToday?: boolean;
|
|
567
|
+
/** Called when the day is clicked */
|
|
568
|
+
onClick?: (date: Date) => void;
|
|
569
|
+
/** Additional CSS classes */
|
|
570
|
+
className?: string;
|
|
571
|
+
}
|
|
572
|
+
declare function DayCell({ date, isToday, onClick, className, ...rest }: DayCellProps): React__default.JSX.Element;
|
|
573
|
+
declare namespace DayCell {
|
|
574
|
+
var displayName: string;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
/**
|
|
578
|
+
* Dialog Atom Component
|
|
579
|
+
*
|
|
580
|
+
* Semantic wrapper for the native `<dialog>` element. Owns the raw
|
|
581
|
+
* HTML rendering so molecules (Modal, ConfirmDialog, etc.) can compose
|
|
582
|
+
* the dialog primitive without dropping back to raw HTML.
|
|
583
|
+
*
|
|
584
|
+
* Defaults `role="dialog"` and `aria-modal="true"`; both overridable
|
|
585
|
+
* for non-modal use cases.
|
|
586
|
+
*/
|
|
587
|
+
|
|
588
|
+
interface DialogProps extends Omit<React__default.DialogHTMLAttributes<HTMLDialogElement>, keyof A11yProps>, A11yProps {
|
|
589
|
+
/** Additional CSS classes */
|
|
590
|
+
className?: string;
|
|
591
|
+
/** Dialog contents */
|
|
592
|
+
children?: React__default.ReactNode;
|
|
593
|
+
}
|
|
594
|
+
declare const Dialog: React__default.ForwardRefExoticComponent<DialogProps & React__default.RefAttributes<HTMLDialogElement>>;
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* Divider Atom Component
|
|
598
|
+
*
|
|
599
|
+
* A divider component for separating content sections.
|
|
600
|
+
*/
|
|
601
|
+
|
|
602
|
+
type DividerOrientation = "horizontal" | "vertical";
|
|
603
|
+
type DividerVariant = "solid" | "dashed" | "dotted";
|
|
604
|
+
interface DividerProps extends A11yProps {
|
|
605
|
+
/**
|
|
606
|
+
* Orientation of the divider
|
|
607
|
+
* @default 'horizontal'
|
|
608
|
+
*/
|
|
609
|
+
orientation?: DividerOrientation;
|
|
610
|
+
/**
|
|
611
|
+
* Text label to display in the divider
|
|
612
|
+
*/
|
|
613
|
+
label?: string;
|
|
614
|
+
/**
|
|
615
|
+
* Line style variant
|
|
616
|
+
* @default 'solid'
|
|
617
|
+
*/
|
|
618
|
+
variant?: DividerVariant;
|
|
619
|
+
/**
|
|
620
|
+
* Additional CSS classes
|
|
621
|
+
*/
|
|
622
|
+
className?: string;
|
|
623
|
+
}
|
|
624
|
+
declare const Divider: React__default.FC<DividerProps>;
|
|
625
|
+
|
|
626
|
+
type FilterPillVariant = "default" | "primary" | "secondary" | "success" | "warning" | "danger" | "info" | "neutral";
|
|
627
|
+
type FilterPillSize = "sm" | "md" | "lg";
|
|
628
|
+
interface FilterPillProps extends Omit<React__default.HTMLAttributes<HTMLSpanElement>, "onClick" | keyof A11yProps>, A11yProps {
|
|
629
|
+
/** Additional CSS classes applied to the root element. */
|
|
630
|
+
className?: string;
|
|
631
|
+
variant?: FilterPillVariant;
|
|
632
|
+
size?: FilterPillSize;
|
|
633
|
+
/** Pill label text (alternative to children for schema-driven rendering). */
|
|
634
|
+
label?: string | number;
|
|
635
|
+
/** Lucide icon component or canonical kebab-case icon name string */
|
|
636
|
+
icon?: IconInput;
|
|
637
|
+
/** Called when the user clicks the remove (×) button
|
|
638
|
+
* @offByDefault */
|
|
639
|
+
onRemove?: () => void;
|
|
640
|
+
/** Disable the remove button (renders without × control) */
|
|
641
|
+
removable?: boolean;
|
|
642
|
+
/** Click handler for the body of the pill (filter toggle) */
|
|
643
|
+
onClick?: () => void;
|
|
644
|
+
/** Event name dispatched via event bus when the pill body is clicked. Payload: { label } */
|
|
645
|
+
clickEvent?: EventEmit<{
|
|
646
|
+
label: string | number | undefined;
|
|
647
|
+
}>;
|
|
648
|
+
/** Event name dispatched via event bus when the remove (×) button is clicked. Payload: { label }
|
|
649
|
+
* @offByDefault */
|
|
650
|
+
removeEvent?: EventEmit<{
|
|
651
|
+
label: string | number | undefined;
|
|
652
|
+
}>;
|
|
653
|
+
}
|
|
654
|
+
declare const FilterPill: React__default.ForwardRefExoticComponent<FilterPillProps & React__default.RefAttributes<HTMLSpanElement>>;
|
|
655
|
+
|
|
656
|
+
/**
|
|
657
|
+
* FlipContainer — CSS 3D perspective atom (distinct from FlipCard molecule).
|
|
658
|
+
* Owns perspective/preserve-3d/rotateY only. Children are the raw face elements.
|
|
659
|
+
* Use FlipCard when you need standard card chrome; use FlipContainer when you
|
|
660
|
+
* need the flip mechanic around custom face content.
|
|
661
|
+
*/
|
|
662
|
+
|
|
663
|
+
interface FlipContainerProps extends A11yProps {
|
|
664
|
+
/** Whether the container is flipped (rotateY 180deg) */
|
|
665
|
+
flipped: boolean;
|
|
666
|
+
/** Optional className for the outer wrapper */
|
|
667
|
+
className?: string;
|
|
668
|
+
/** The two face elements (front and back) */
|
|
669
|
+
children: React__default.ReactNode;
|
|
670
|
+
/** Click handler on the outer wrapper */
|
|
671
|
+
onClick?: () => void;
|
|
672
|
+
}
|
|
673
|
+
declare const FlipContainer: {
|
|
674
|
+
({ flipped, className, children, onClick, ...rest }: FlipContainerProps): React__default.JSX.Element;
|
|
675
|
+
displayName: string;
|
|
676
|
+
};
|
|
677
|
+
|
|
678
|
+
/** @accessibleName alt */
|
|
679
|
+
interface GameIconProps extends A11yProps {
|
|
680
|
+
/** Asset — when url is present, renders an img (Asset-primary). */
|
|
681
|
+
assetUrl?: Asset;
|
|
682
|
+
/** Lucide component or kebab-case icon name (fallback when no assetUrl). */
|
|
683
|
+
icon: IconInput;
|
|
684
|
+
/** Pixel size or named variant. */
|
|
685
|
+
size?: number | 'sm' | 'md' | 'lg';
|
|
686
|
+
/** Alt text for the img (defaults to assetUrl.category). */
|
|
687
|
+
alt?: string;
|
|
688
|
+
/** Additional CSS classes. */
|
|
689
|
+
className?: string;
|
|
690
|
+
}
|
|
691
|
+
declare function GameIcon({ assetUrl, icon, size, alt, className, ...rest }: GameIconProps): React$1.JSX.Element;
|
|
692
|
+
declare namespace GameIcon {
|
|
693
|
+
var displayName: string;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
type ImageFit = 'cover' | 'contain' | 'fill' | 'none';
|
|
697
|
+
type ImageAspect = 'auto' | '1/1' | '4/3' | '3/2' | '16/9' | '21/9';
|
|
698
|
+
type ImageRounded = 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'full';
|
|
699
|
+
type ImagePosition = 'center' | 'top' | 'bottom' | 'left' | 'right';
|
|
700
|
+
/** @accessibleName alt */
|
|
701
|
+
interface ImageProps extends A11yProps {
|
|
702
|
+
/** Image source URL */
|
|
703
|
+
src: AssetUrl;
|
|
704
|
+
/** Alternative text; empty string marks the image decorative */
|
|
705
|
+
alt: string;
|
|
706
|
+
/** How the image fills its box */
|
|
707
|
+
fit?: ImageFit;
|
|
708
|
+
/** Fixed aspect ratio of the box; "auto" keeps the image's own */
|
|
709
|
+
aspect?: ImageAspect;
|
|
710
|
+
/** Corner rounding */
|
|
711
|
+
rounded?: ImageRounded;
|
|
712
|
+
/** Draw a subtle border around the image */
|
|
713
|
+
bordered?: boolean;
|
|
714
|
+
/** "lazy" defers off-screen images; "eager" for above-the-fold media */
|
|
715
|
+
loading?: 'lazy' | 'eager';
|
|
716
|
+
/** Which part of the image stays visible when it is cropped */
|
|
717
|
+
position?: ImagePosition;
|
|
718
|
+
/** Candidate sources at different widths (the HTML `srcset`) */
|
|
719
|
+
srcSet?: string;
|
|
720
|
+
/** Rendered widths at each breakpoint (the HTML `sizes`) */
|
|
721
|
+
sizes?: string;
|
|
722
|
+
/** The page's main image: load it first */
|
|
723
|
+
priority?: boolean;
|
|
724
|
+
/** Additional class names */
|
|
725
|
+
className?: string;
|
|
726
|
+
}
|
|
727
|
+
declare const Image: React__default.FC<ImageProps>;
|
|
728
|
+
|
|
729
|
+
interface InfiniteScrollSentinelProps extends A11yProps {
|
|
730
|
+
/** Event name to emit when load-more is triggered (emitted as UI:{loadMoreEvent}) */
|
|
731
|
+
loadMoreEvent: EventKey;
|
|
732
|
+
/** Optional payload to include with the load-more event
|
|
733
|
+
* @payloadFor loadMoreEvent
|
|
734
|
+
*/
|
|
735
|
+
loadMorePayload?: EventPayload;
|
|
736
|
+
/** Whether a load operation is currently in progress */
|
|
737
|
+
isLoading?: boolean;
|
|
738
|
+
/** Whether there are more items to load */
|
|
739
|
+
hasMore?: boolean;
|
|
740
|
+
/** IntersectionObserver rootMargin for early trigger */
|
|
741
|
+
threshold?: string;
|
|
742
|
+
/** Additional class names */
|
|
743
|
+
className?: string;
|
|
744
|
+
}
|
|
745
|
+
declare const InfiniteScrollSentinel: React__default.FC<InfiniteScrollSentinelProps>;
|
|
746
|
+
|
|
747
|
+
interface LabelProps extends Omit<React__default.LabelHTMLAttributes<HTMLLabelElement>, keyof A11yProps>, A11yProps {
|
|
748
|
+
/** Additional CSS classes applied to the root element. */
|
|
749
|
+
className?: string;
|
|
750
|
+
/** Label text content */
|
|
751
|
+
text?: string;
|
|
752
|
+
/** Associated input element ID */
|
|
753
|
+
htmlFor?: string;
|
|
754
|
+
/** Show required indicator (decorative; the field itself carries aria-required) */
|
|
755
|
+
required?: boolean;
|
|
756
|
+
}
|
|
757
|
+
declare const Label: React__default.ForwardRefExoticComponent<LabelProps & React__default.RefAttributes<HTMLLabelElement>>;
|
|
758
|
+
|
|
759
|
+
/**
|
|
760
|
+
* LawReferenceTooltip Atom Component
|
|
761
|
+
*
|
|
762
|
+
* A specialized tooltip for displaying law references in inspection forms.
|
|
763
|
+
* Shows law name, article number, and relevant clause text.
|
|
764
|
+
*/
|
|
765
|
+
|
|
766
|
+
/**
|
|
767
|
+
* Law reference definition
|
|
768
|
+
*/
|
|
769
|
+
type LawReference = {
|
|
770
|
+
/** Law identifier (e.g., "VVO", "TPED") */
|
|
771
|
+
law: string;
|
|
772
|
+
/** Full name of the law */
|
|
773
|
+
lawName?: string;
|
|
774
|
+
/** Article number (e.g., "§8", "Artikel 5") */
|
|
775
|
+
article: string;
|
|
776
|
+
/** Clause or paragraph text */
|
|
777
|
+
clause?: string;
|
|
778
|
+
/** Optional link to full law text */
|
|
779
|
+
link?: string;
|
|
780
|
+
};
|
|
781
|
+
interface LawReferenceTooltipProps extends A11yProps {
|
|
782
|
+
/** The law reference to display */
|
|
783
|
+
reference: LawReference;
|
|
784
|
+
/** Children element that triggers the tooltip */
|
|
785
|
+
children: React__default.ReactNode;
|
|
786
|
+
/** Tooltip position */
|
|
787
|
+
position?: "top" | "bottom" | "left" | "right";
|
|
788
|
+
/** Additional CSS classes */
|
|
789
|
+
className?: string;
|
|
790
|
+
}
|
|
791
|
+
/**
|
|
792
|
+
* LawReferenceTooltip displays legal references with structured formatting.
|
|
793
|
+
*
|
|
794
|
+
* @example
|
|
795
|
+
* <LawReferenceTooltip
|
|
796
|
+
* reference={{
|
|
797
|
+
* law: "VVO",
|
|
798
|
+
* lawName: "Verkehrsverordnung",
|
|
799
|
+
* article: "§8 Abs. 3",
|
|
800
|
+
* clause: "Die zulässige Gesamtmasse darf 3500 kg nicht überschreiten."
|
|
801
|
+
* }}
|
|
802
|
+
* >
|
|
803
|
+
* <Typography variant="small" className="text-blue-600 underline cursor-help">VVO §8</Typography>
|
|
804
|
+
* </LawReferenceTooltip>
|
|
805
|
+
*/
|
|
806
|
+
declare const LawReferenceTooltip: React__default.FC<LawReferenceTooltipProps>;
|
|
807
|
+
|
|
808
|
+
interface OverlayProps extends A11yProps {
|
|
809
|
+
isVisible?: boolean;
|
|
810
|
+
onClick?: (e: React__default.MouseEvent) => void;
|
|
811
|
+
className?: string;
|
|
812
|
+
blur?: boolean;
|
|
813
|
+
/** Declarative event name — emits UI:{action} via eventBus on click */
|
|
814
|
+
action?: EventKey;
|
|
815
|
+
}
|
|
816
|
+
declare const Overlay: React__default.FC<OverlayProps>;
|
|
817
|
+
|
|
818
|
+
/**
|
|
819
|
+
* Presence Atom — the single enter/leave animation mechanism.
|
|
820
|
+
*
|
|
821
|
+
* React unmounts children synchronously, so an exit animation is impossible
|
|
822
|
+
* unless a wrapper keeps the child mounted for one more frame. `usePresence`
|
|
823
|
+
* extracts Modal's `closing` + `onAnimationEnd` pattern into one reusable
|
|
824
|
+
* hook; the `<Presence>` component is a thin wrapper for the arbitrary case.
|
|
825
|
+
*
|
|
826
|
+
* Every animated surface converges on this: Overlay/Drawer/SidePanel/Popover/
|
|
827
|
+
* Toast call `usePresence` and spread the result onto their own element (no
|
|
828
|
+
* extra wrapper div — important for fixed/absolute positioning). Token-driven:
|
|
829
|
+
* the `animation` prop maps to the `animate-<name>-in/out` utilities, which
|
|
830
|
+
* read `--motion-*` / `--duration-*` / `--easing-*`. Toggle off per-instance
|
|
831
|
+
* (`animate={false}`), globally (`--motion-enable: off`), or via the OS
|
|
832
|
+
* (`prefers-reduced-motion`, collapsed in `_base.css`).
|
|
833
|
+
*
|
|
834
|
+
* @packageDocumentation
|
|
835
|
+
*/
|
|
836
|
+
|
|
837
|
+
type PresenceAnimation = "modal" | "overlay" | "slide-up" | "drawer" | "popover" | "toast" | "fade" | "page";
|
|
838
|
+
/** Whether token-driven motion is on (`--motion-enable` is not `off`). */
|
|
839
|
+
declare function isMotionEnabled(): boolean;
|
|
840
|
+
interface UsePresenceOptions {
|
|
841
|
+
/** Which motion preset to use (maps to `animate-<name>-in/out`). */
|
|
842
|
+
animation: PresenceAnimation;
|
|
843
|
+
/** Per-instance opt-out. Global opt-out is `--motion-enable` / reduced-motion. @default true */
|
|
844
|
+
animate?: boolean;
|
|
845
|
+
/**
|
|
846
|
+
* Fired after the exit animation completes (before unmount).
|
|
847
|
+
* @notification
|
|
848
|
+
*/
|
|
849
|
+
onExited?: () => void;
|
|
850
|
+
}
|
|
851
|
+
interface PresenceResult {
|
|
852
|
+
/** Whether the element should be in the tree (enter or exit phase). */
|
|
853
|
+
mounted: boolean;
|
|
854
|
+
/** True during the exit animation. */
|
|
855
|
+
exiting: boolean;
|
|
856
|
+
/** Class to merge onto the animated element: `animate-<name>-in` or `-out` (empty if disabled). */
|
|
857
|
+
className: string;
|
|
858
|
+
/** Attach to the animated element's `onAnimationEnd`. */
|
|
859
|
+
onAnimationEnd: (e: React__default.AnimationEvent) => void;
|
|
860
|
+
}
|
|
861
|
+
/**
|
|
862
|
+
* The single enter/leave mechanism. Call from a molecule, spread `className`
|
|
863
|
+
* (via `cn`) and `onAnimationEnd` onto the element that carries the animation.
|
|
864
|
+
*/
|
|
865
|
+
declare function usePresence(show: boolean, opts: UsePresenceOptions): PresenceResult;
|
|
866
|
+
interface PresenceProps extends UsePresenceOptions, A11yProps {
|
|
867
|
+
/** When false, the exit animation runs, then children unmount. */
|
|
868
|
+
show: boolean;
|
|
869
|
+
className?: string;
|
|
870
|
+
children: React__default.ReactNode;
|
|
871
|
+
}
|
|
872
|
+
/**
|
|
873
|
+
* Wrapper form of `usePresence` for arbitrary content that doesn't already
|
|
874
|
+
* own its animated element. Renders a `<div>` carrying the animation class.
|
|
875
|
+
*/
|
|
876
|
+
declare const Presence: React__default.FC<PresenceProps>;
|
|
877
|
+
|
|
878
|
+
/**
|
|
879
|
+
* ProgressBar Atom Component
|
|
880
|
+
*
|
|
881
|
+
* A progress bar component with linear, circular, and stepped variants.
|
|
882
|
+
*/
|
|
883
|
+
|
|
884
|
+
type ProgressBarType = "linear" | "circular" | "stepped";
|
|
885
|
+
type ProgressBarVariant = "default" | "primary" | "success" | "warning" | "error" | "danger";
|
|
886
|
+
type ProgressBarColor = ProgressBarVariant;
|
|
887
|
+
interface ProgressBarProps extends A11yProps {
|
|
888
|
+
/**
|
|
889
|
+
* Progress value (0-100)
|
|
890
|
+
*/
|
|
891
|
+
value: number;
|
|
892
|
+
/**
|
|
893
|
+
* Maximum value (for calculating percentage)
|
|
894
|
+
* @default 100
|
|
895
|
+
*/
|
|
896
|
+
max?: number;
|
|
897
|
+
/**
|
|
898
|
+
* Type of the progress bar (linear, circular, stepped)
|
|
899
|
+
* @default 'linear'
|
|
900
|
+
*/
|
|
901
|
+
progressType?: ProgressBarType;
|
|
902
|
+
/**
|
|
903
|
+
* Variant/color of the progress bar
|
|
904
|
+
* @default 'primary'
|
|
905
|
+
*/
|
|
906
|
+
variant?: ProgressBarVariant;
|
|
907
|
+
/**
|
|
908
|
+
* Color variant (alias for variant; `variant` applies when omitted)
|
|
909
|
+
*/
|
|
910
|
+
color?: ProgressBarColor;
|
|
911
|
+
/**
|
|
912
|
+
* Show percentage text
|
|
913
|
+
* @default false
|
|
914
|
+
*/
|
|
915
|
+
showPercentage?: boolean;
|
|
916
|
+
/**
|
|
917
|
+
* Alias for showPercentage (pattern compatibility)
|
|
918
|
+
*/
|
|
919
|
+
showLabel?: boolean;
|
|
920
|
+
/**
|
|
921
|
+
* Label text
|
|
922
|
+
*/
|
|
923
|
+
label?: string;
|
|
924
|
+
/**
|
|
925
|
+
* Size (for circular variant)
|
|
926
|
+
* @default 'md'
|
|
927
|
+
*/
|
|
928
|
+
size?: "sm" | "md" | "lg";
|
|
929
|
+
/**
|
|
930
|
+
* Number of steps (for stepped variant)
|
|
931
|
+
* @default 5
|
|
932
|
+
*/
|
|
933
|
+
steps?: number;
|
|
934
|
+
/**
|
|
935
|
+
* Additional CSS classes
|
|
936
|
+
*/
|
|
937
|
+
className?: string;
|
|
938
|
+
}
|
|
939
|
+
declare const ProgressBar: React__default.FC<ProgressBarProps>;
|
|
940
|
+
|
|
941
|
+
/**
|
|
942
|
+
* Radio Atom Component
|
|
943
|
+
*
|
|
944
|
+
* A radio button component with label support and accessibility.
|
|
945
|
+
*/
|
|
946
|
+
|
|
947
|
+
/** @accessibleName label */
|
|
948
|
+
interface RadioProps extends Omit<React__default.InputHTMLAttributes<HTMLInputElement>, "type" | "size" | keyof A11yProps>, A11yProps {
|
|
949
|
+
/** Additional CSS classes applied to the root element. */
|
|
950
|
+
className?: string;
|
|
951
|
+
/** Radio options (string array or SelectOption array) */
|
|
952
|
+
options?: string[];
|
|
953
|
+
/** Current selected value */
|
|
954
|
+
value?: string;
|
|
955
|
+
/** Declarative event name for trait dispatch */
|
|
956
|
+
action?: EventEmit<{
|
|
957
|
+
value: string;
|
|
958
|
+
}>;
|
|
959
|
+
/**
|
|
960
|
+
* Label text displayed next to the radio button
|
|
961
|
+
*/
|
|
962
|
+
label?: string;
|
|
963
|
+
/**
|
|
964
|
+
* Helper text displayed below the radio button
|
|
965
|
+
*/
|
|
966
|
+
helperText?: string;
|
|
967
|
+
/**
|
|
968
|
+
* Error message displayed below the radio button
|
|
969
|
+
*/
|
|
970
|
+
error?: string;
|
|
971
|
+
/**
|
|
972
|
+
* Size of the radio button
|
|
973
|
+
* @default 'md'
|
|
974
|
+
*/
|
|
975
|
+
size?: "sm" | "md" | "lg";
|
|
976
|
+
}
|
|
977
|
+
declare const Radio: React__default.ForwardRefExoticComponent<RadioProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
978
|
+
|
|
979
|
+
type RangeSliderSize = "sm" | "md" | "lg";
|
|
980
|
+
interface RangeSliderProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>, "onChange" | keyof A11yProps>, A11yProps {
|
|
981
|
+
/** Additional CSS classes applied to the root element. */
|
|
982
|
+
className?: string;
|
|
983
|
+
/** Minimum value */
|
|
984
|
+
min?: number;
|
|
985
|
+
/** Maximum value */
|
|
986
|
+
max?: number;
|
|
987
|
+
/** Current value */
|
|
988
|
+
value?: number;
|
|
989
|
+
/** Step increment */
|
|
990
|
+
step?: number;
|
|
991
|
+
/** Show tooltip with current value on drag */
|
|
992
|
+
showTooltip?: boolean;
|
|
993
|
+
/** Show tick marks at step intervals */
|
|
994
|
+
showTicks?: boolean;
|
|
995
|
+
/** Buffered range (0-100), for media seek bars */
|
|
996
|
+
buffered?: number;
|
|
997
|
+
/** Slider size */
|
|
998
|
+
size?: RangeSliderSize;
|
|
999
|
+
/** Disabled state */
|
|
1000
|
+
disabled?: boolean;
|
|
1001
|
+
/** Declarative event name for value changes */
|
|
1002
|
+
action?: EventEmit<{
|
|
1003
|
+
value: number;
|
|
1004
|
+
}>;
|
|
1005
|
+
/** Payload to include with the action event
|
|
1006
|
+
* @payloadFor action
|
|
1007
|
+
*/
|
|
1008
|
+
actionPayload?: EventPayload;
|
|
1009
|
+
/** Direct onChange callback */
|
|
1010
|
+
onChange?: (value: number) => void;
|
|
1011
|
+
/** Format function for tooltip display */
|
|
1012
|
+
formatValue?: (value: number) => string;
|
|
1013
|
+
}
|
|
1014
|
+
declare const RangeSlider: React__default.ForwardRefExoticComponent<RangeSliderProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
1015
|
+
|
|
1016
|
+
interface SectionHeaderProps extends A11yProps {
|
|
1017
|
+
/** Section title text */
|
|
1018
|
+
title: string;
|
|
1019
|
+
/** Optional subtitle text */
|
|
1020
|
+
subtitle?: string;
|
|
1021
|
+
/** Text alignment */
|
|
1022
|
+
align?: "center" | "left" | "right";
|
|
1023
|
+
/** Heading level (1, 2, or 3) */
|
|
1024
|
+
level?: 1 | 2 | 3;
|
|
1025
|
+
/** Additional class names */
|
|
1026
|
+
className?: string;
|
|
1027
|
+
}
|
|
1028
|
+
declare const SectionHeader: React__default.FC<SectionHeaderProps>;
|
|
1029
|
+
|
|
1030
|
+
/**
|
|
1031
|
+
* Spacer Component
|
|
1032
|
+
*
|
|
1033
|
+
* A flexible spacer that expands to fill available space in a flex container.
|
|
1034
|
+
* Useful for pushing elements apart or creating consistent spacing.
|
|
1035
|
+
*/
|
|
1036
|
+
|
|
1037
|
+
type SpacerSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'auto';
|
|
1038
|
+
interface SpacerProps extends A11yProps {
|
|
1039
|
+
/** Fixed size (auto = flex grow) */
|
|
1040
|
+
size?: SpacerSize;
|
|
1041
|
+
/** Orientation (for fixed sizes) */
|
|
1042
|
+
axis?: 'horizontal' | 'vertical';
|
|
1043
|
+
/** Custom class name */
|
|
1044
|
+
className?: string;
|
|
1045
|
+
}
|
|
1046
|
+
/**
|
|
1047
|
+
* Spacer - Flexible spacing element for flex layouts
|
|
1048
|
+
*
|
|
1049
|
+
* Usage:
|
|
1050
|
+
* - size="auto" (default): Expands to fill available space (flex: 1)
|
|
1051
|
+
* - size="md": Fixed size spacing
|
|
1052
|
+
*/
|
|
1053
|
+
declare const Spacer: React__default.FC<SpacerProps>;
|
|
1054
|
+
|
|
1055
|
+
/**
|
|
1056
|
+
* Sparkline Atom Component
|
|
1057
|
+
*
|
|
1058
|
+
* Minimal inline trend chart. Pure SVG polyline over a numeric series.
|
|
1059
|
+
* Extracted from StatCard's sparkline path so any KPI or list row can
|
|
1060
|
+
* include a trend visualization without compositing the whole card.
|
|
1061
|
+
*/
|
|
1062
|
+
|
|
1063
|
+
type SparklineColor = "auto" | "primary" | "success" | "warning" | "error" | "info" | "muted";
|
|
1064
|
+
interface SparklineProps extends A11yProps {
|
|
1065
|
+
/** Numeric series to plot. Length < 2 renders nothing. */
|
|
1066
|
+
data: readonly number[];
|
|
1067
|
+
/**
|
|
1068
|
+
* Stroke color.
|
|
1069
|
+
* `auto` (default): success when the series trends up (last ≥ first),
|
|
1070
|
+
* error when it trends down.
|
|
1071
|
+
*/
|
|
1072
|
+
color?: SparklineColor;
|
|
1073
|
+
/** SVG width in px. Default 80. */
|
|
1074
|
+
width?: number;
|
|
1075
|
+
/** SVG height in px. Default 32. */
|
|
1076
|
+
height?: number;
|
|
1077
|
+
/** Stroke width in px. Default 2. */
|
|
1078
|
+
strokeWidth?: number;
|
|
1079
|
+
/** Fill the area under the line with the stroke color at low opacity. */
|
|
1080
|
+
fill?: boolean;
|
|
1081
|
+
/** Additional CSS classes. */
|
|
1082
|
+
className?: string;
|
|
1083
|
+
}
|
|
1084
|
+
declare const Sparkline: React__default.FC<SparklineProps>;
|
|
1085
|
+
|
|
1086
|
+
type SpinnerSize = "xs" | "sm" | "md" | "lg";
|
|
1087
|
+
interface SpinnerProps extends Omit<React__default.HTMLAttributes<HTMLDivElement>, keyof A11yProps>, A11yProps {
|
|
1088
|
+
/** Additional CSS classes applied to the root element. */
|
|
1089
|
+
className?: string;
|
|
1090
|
+
size?: SpinnerSize;
|
|
1091
|
+
/** Renders a centered overlay backdrop instead of inline. */
|
|
1092
|
+
overlay?: boolean;
|
|
1093
|
+
}
|
|
1094
|
+
declare const Spinner: React__default.ForwardRefExoticComponent<SpinnerProps & React__default.RefAttributes<HTMLDivElement>>;
|
|
1095
|
+
|
|
1096
|
+
/**
|
|
1097
|
+
* Stack Component
|
|
1098
|
+
*
|
|
1099
|
+
* A layout primitive for arranging children in a vertical or horizontal stack with consistent spacing.
|
|
1100
|
+
* Includes convenience exports VStack and HStack for common use cases.
|
|
1101
|
+
*/
|
|
1102
|
+
|
|
1103
|
+
type StackDirection = "horizontal" | "vertical";
|
|
1104
|
+
type StackGap = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
1105
|
+
type StackAlign = "start" | "center" | "end" | "stretch" | "baseline";
|
|
1106
|
+
type StackJustify = "start" | "center" | "end" | "between" | "around" | "evenly";
|
|
1107
|
+
interface StackProps extends Omit<React__default.AriaAttributes, keyof A11yProps>, A11yProps {
|
|
1108
|
+
/** Stack direction */
|
|
1109
|
+
direction?: StackDirection;
|
|
1110
|
+
/** Gap between children */
|
|
1111
|
+
gap?: StackGap;
|
|
1112
|
+
/** Align items on the cross axis */
|
|
1113
|
+
align?: StackAlign;
|
|
1114
|
+
/** Justify items on the main axis */
|
|
1115
|
+
justify?: StackJustify;
|
|
1116
|
+
/** Allow items to wrap */
|
|
1117
|
+
wrap?: boolean;
|
|
1118
|
+
/** Reverse the order of children */
|
|
1119
|
+
reverse?: boolean;
|
|
1120
|
+
/** Fill available space (flex: 1) */
|
|
1121
|
+
flex?: boolean;
|
|
1122
|
+
/** Custom class name */
|
|
1123
|
+
className?: string;
|
|
1124
|
+
/** Inline styles */
|
|
1125
|
+
style?: React__default.CSSProperties;
|
|
1126
|
+
/** Children elements */
|
|
1127
|
+
children?: React__default.ReactNode;
|
|
1128
|
+
/** HTML element to render as */
|
|
1129
|
+
as?: React__default.ElementType;
|
|
1130
|
+
/** Click handler */
|
|
1131
|
+
onClick?: (e: React__default.MouseEvent) => void;
|
|
1132
|
+
/**
|
|
1133
|
+
* Keyboard handler
|
|
1134
|
+
* @notification
|
|
1135
|
+
*/
|
|
1136
|
+
onKeyDown?: (e: React__default.KeyboardEvent) => void;
|
|
1137
|
+
/** Element id */
|
|
1138
|
+
id?: string;
|
|
1139
|
+
/** Declarative event name — emits UI:{action} via eventBus on click */
|
|
1140
|
+
action?: EventKey;
|
|
1141
|
+
/** Payload to include with the action event
|
|
1142
|
+
* @payloadFor action
|
|
1143
|
+
*/
|
|
1144
|
+
actionPayload?: EventPayload;
|
|
1145
|
+
/** When true, horizontal stacks flip to vertical below the md breakpoint (768px) */
|
|
1146
|
+
responsive?: boolean;
|
|
1147
|
+
}
|
|
1148
|
+
/**
|
|
1149
|
+
* Stack - Flexible layout component for arranging children
|
|
1150
|
+
*/
|
|
1151
|
+
declare const Stack: React__default.FC<StackProps>;
|
|
1152
|
+
/**
|
|
1153
|
+
* VStack - Vertical stack shorthand
|
|
1154
|
+
*/
|
|
1155
|
+
interface VStackProps extends Omit<StackProps, "direction"> {
|
|
1156
|
+
}
|
|
1157
|
+
declare const VStack: React__default.FC<VStackProps>;
|
|
1158
|
+
/**
|
|
1159
|
+
* HStack - Horizontal stack shorthand
|
|
1160
|
+
*/
|
|
1161
|
+
interface HStackProps extends Omit<StackProps, "direction"> {
|
|
1162
|
+
}
|
|
1163
|
+
declare const HStack: React__default.FC<HStackProps>;
|
|
1164
|
+
|
|
1165
|
+
type StatusDotStatus = "online" | "offline" | "away" | "busy" | "warning" | "critical";
|
|
1166
|
+
type StatusDotSize = "sm" | "md" | "lg";
|
|
1167
|
+
interface StatusDotProps extends Omit<React__default.HTMLAttributes<HTMLSpanElement>, keyof A11yProps>, A11yProps {
|
|
1168
|
+
/** Additional CSS classes applied to the root element. */
|
|
1169
|
+
className?: string;
|
|
1170
|
+
/** Status determines the dot color */
|
|
1171
|
+
status?: StatusDotStatus;
|
|
1172
|
+
/** Enable pulse animation for active/critical states */
|
|
1173
|
+
pulse?: boolean;
|
|
1174
|
+
/** Dot size */
|
|
1175
|
+
size?: StatusDotSize;
|
|
1176
|
+
/** Accessible label (rendered as sr-only text) */
|
|
1177
|
+
label?: string;
|
|
1178
|
+
}
|
|
1179
|
+
declare const StatusDot: React__default.ForwardRefExoticComponent<StatusDotProps & React__default.RefAttributes<HTMLSpanElement>>;
|
|
1180
|
+
|
|
1181
|
+
/** @accessibleName label */
|
|
1182
|
+
interface SwitchProps extends A11yProps {
|
|
1183
|
+
checked?: boolean;
|
|
1184
|
+
defaultChecked?: boolean;
|
|
1185
|
+
onChange?: (checked: boolean) => void;
|
|
1186
|
+
/** Declarative event name — emits UI:{action} with `actionPayload` and the new `checked` value on toggle */
|
|
1187
|
+
action?: EventKey;
|
|
1188
|
+
/** Payload to include with the action event (the new `checked` is added to it)
|
|
1189
|
+
* @payloadFor action
|
|
1190
|
+
*/
|
|
1191
|
+
actionPayload?: EventPayload;
|
|
1192
|
+
disabled?: boolean;
|
|
1193
|
+
label?: string;
|
|
1194
|
+
id?: string;
|
|
1195
|
+
name?: string;
|
|
1196
|
+
className?: string;
|
|
1197
|
+
}
|
|
1198
|
+
declare const Switch: React$1.ForwardRefExoticComponent<SwitchProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1199
|
+
|
|
1200
|
+
/**
|
|
1201
|
+
* TextHighlight Atom Component
|
|
1202
|
+
*
|
|
1203
|
+
* A styled span component for highlighting text with annotations (questions or notes).
|
|
1204
|
+
* Uses different colors for different annotation types:
|
|
1205
|
+
* - Questions: Blue highlight
|
|
1206
|
+
* - Notes: Yellow highlight
|
|
1207
|
+
*/
|
|
1208
|
+
|
|
1209
|
+
type HighlightType = "question" | "note";
|
|
1210
|
+
interface TextHighlightProps extends A11yProps {
|
|
1211
|
+
/**
|
|
1212
|
+
* Type of highlight (determines color)
|
|
1213
|
+
*/
|
|
1214
|
+
highlightType: HighlightType;
|
|
1215
|
+
/**
|
|
1216
|
+
* Whether the highlight is currently active/focused
|
|
1217
|
+
* @default false
|
|
1218
|
+
*/
|
|
1219
|
+
isActive?: boolean;
|
|
1220
|
+
/**
|
|
1221
|
+
* Callback when highlight is clicked
|
|
1222
|
+
*/
|
|
1223
|
+
onClick?: () => void;
|
|
1224
|
+
/**
|
|
1225
|
+
* Callback when highlight is hovered
|
|
1226
|
+
* @notification
|
|
1227
|
+
*/
|
|
1228
|
+
onMouseEnter?: () => void;
|
|
1229
|
+
/**
|
|
1230
|
+
* Callback when hover ends
|
|
1231
|
+
* @notification
|
|
1232
|
+
*/
|
|
1233
|
+
onMouseLeave?: () => void;
|
|
1234
|
+
/**
|
|
1235
|
+
* Unique ID for the annotation
|
|
1236
|
+
*/
|
|
1237
|
+
annotationId?: string;
|
|
1238
|
+
/**
|
|
1239
|
+
* Additional CSS classes
|
|
1240
|
+
*/
|
|
1241
|
+
className?: string;
|
|
1242
|
+
/**
|
|
1243
|
+
* Highlighted text content
|
|
1244
|
+
*/
|
|
1245
|
+
children: React__default.ReactNode;
|
|
1246
|
+
/** Declarative event name — emits UI:{action} via eventBus on click */
|
|
1247
|
+
action?: EventEmit<{
|
|
1248
|
+
annotationId?: string;
|
|
1249
|
+
}>;
|
|
1250
|
+
/**
|
|
1251
|
+
* Declarative hover event — emits UI:{hoverEvent} with { hovered, annotationId }
|
|
1252
|
+
* @notification
|
|
1253
|
+
*/
|
|
1254
|
+
hoverEvent?: EventEmit<{
|
|
1255
|
+
hovered: boolean;
|
|
1256
|
+
annotationId?: string;
|
|
1257
|
+
}>;
|
|
1258
|
+
}
|
|
1259
|
+
/**
|
|
1260
|
+
* TextHighlight component for rendering highlighted text annotations
|
|
1261
|
+
*/
|
|
1262
|
+
declare const TextHighlight: React__default.FC<TextHighlightProps>;
|
|
1263
|
+
|
|
1264
|
+
/** @accessibleName label */
|
|
1265
|
+
interface TextareaProps extends Omit<React__default.TextareaHTMLAttributes<HTMLTextAreaElement>, 'onChange' | keyof A11yProps>, A11yProps {
|
|
1266
|
+
/** Additional CSS classes applied to the root element. */
|
|
1267
|
+
className?: string;
|
|
1268
|
+
/** Visible label naming the field. */
|
|
1269
|
+
label?: string;
|
|
1270
|
+
/** Placeholder text */
|
|
1271
|
+
placeholder?: string;
|
|
1272
|
+
/** Number of visible rows */
|
|
1273
|
+
rows?: number;
|
|
1274
|
+
/** Controlled value, for a field the program fills or clears. */
|
|
1275
|
+
value?: string;
|
|
1276
|
+
/** Declarative event: fires on ⌘/Ctrl+Enter with `{ value }`. */
|
|
1277
|
+
action?: EventEmit<{
|
|
1278
|
+
value: string;
|
|
1279
|
+
}>;
|
|
1280
|
+
/** Helper text describing the field. */
|
|
1281
|
+
helperText?: string;
|
|
1282
|
+
/** Error message */
|
|
1283
|
+
error?: string;
|
|
1284
|
+
/** onChange handler or declarative event key for trait dispatch */
|
|
1285
|
+
onChange?: React__default.ChangeEventHandler<HTMLTextAreaElement> | EventEmit<{
|
|
1286
|
+
value: string;
|
|
1287
|
+
}>;
|
|
1288
|
+
}
|
|
1289
|
+
declare const Textarea: React__default.ForwardRefExoticComponent<TextareaProps & React__default.RefAttributes<HTMLTextAreaElement>>;
|
|
1290
|
+
|
|
1291
|
+
/**
|
|
1292
|
+
* ThemeToggle Atom Component
|
|
1293
|
+
*
|
|
1294
|
+
* A button that toggles between light and dark themes.
|
|
1295
|
+
* Uses Sun and Moon icons to indicate current/target theme.
|
|
1296
|
+
*
|
|
1297
|
+
* @packageDocumentation
|
|
1298
|
+
*/
|
|
1299
|
+
|
|
1300
|
+
interface ThemeToggleProps extends A11yProps {
|
|
1301
|
+
/** Additional CSS classes */
|
|
1302
|
+
className?: string;
|
|
1303
|
+
/** Size variant */
|
|
1304
|
+
size?: "sm" | "md" | "lg";
|
|
1305
|
+
/** Show label text */
|
|
1306
|
+
showLabel?: boolean;
|
|
1307
|
+
}
|
|
1308
|
+
/**
|
|
1309
|
+
* ThemeToggle component for switching between light and dark modes
|
|
1310
|
+
*
|
|
1311
|
+
* @example
|
|
1312
|
+
* ```tsx
|
|
1313
|
+
* // Basic usage
|
|
1314
|
+
* <ThemeToggle />
|
|
1315
|
+
*
|
|
1316
|
+
* // With label
|
|
1317
|
+
* <ThemeToggle showLabel />
|
|
1318
|
+
*
|
|
1319
|
+
* // Custom size
|
|
1320
|
+
* <ThemeToggle size="lg" />
|
|
1321
|
+
* ```
|
|
1322
|
+
*/
|
|
1323
|
+
declare const ThemeToggle: React__default.FC<ThemeToggleProps>;
|
|
1324
|
+
|
|
1325
|
+
/**
|
|
1326
|
+
* TimeSlotCell
|
|
1327
|
+
*
|
|
1328
|
+
* Calendar time slot atom. Renders a clickable container for a single
|
|
1329
|
+
* time slot that can hold event content via children.
|
|
1330
|
+
*/
|
|
1331
|
+
|
|
1332
|
+
interface TimeSlotCellProps extends A11yProps {
|
|
1333
|
+
/** Time label for this slot (e.g. "09:00") */
|
|
1334
|
+
time: string;
|
|
1335
|
+
/** Called when the slot is clicked */
|
|
1336
|
+
onClick?: (time: string) => void;
|
|
1337
|
+
/** Additional CSS classes */
|
|
1338
|
+
className?: string;
|
|
1339
|
+
/** Event content placed inside the slot */
|
|
1340
|
+
children?: React__default.ReactNode;
|
|
1341
|
+
/** Whether this slot contains an event */
|
|
1342
|
+
isOccupied?: boolean;
|
|
1343
|
+
onPointerDown?: React__default.PointerEventHandler<HTMLDivElement>;
|
|
1344
|
+
onPointerUp?: React__default.PointerEventHandler<HTMLDivElement>;
|
|
1345
|
+
onPointerCancel?: React__default.PointerEventHandler<HTMLDivElement>;
|
|
1346
|
+
/** @notification */
|
|
1347
|
+
onPointerLeave?: React__default.PointerEventHandler<HTMLDivElement>;
|
|
1348
|
+
"data-testid"?: string;
|
|
1349
|
+
}
|
|
1350
|
+
declare function TimeSlotCell({ time, onClick, className, children, isOccupied, onPointerDown, onPointerUp, onPointerCancel, onPointerLeave, "data-testid": testId, ...rest }: TimeSlotCellProps): React__default.JSX.Element;
|
|
1351
|
+
declare namespace TimeSlotCell {
|
|
1352
|
+
var displayName: string;
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
type TrendDirection = "up" | "down" | "flat";
|
|
1356
|
+
type TrendIndicatorSize = "sm" | "md" | "lg";
|
|
1357
|
+
interface TrendIndicatorProps extends Omit<React__default.HTMLAttributes<HTMLSpanElement>, keyof A11yProps>, A11yProps {
|
|
1358
|
+
/** Additional CSS classes applied to the root element. */
|
|
1359
|
+
className?: string;
|
|
1360
|
+
/** Numeric value to display (e.g., 12.5 for +12.5%) */
|
|
1361
|
+
value?: number;
|
|
1362
|
+
/** Override automatic direction detection (positive=up, negative=down, zero=flat) */
|
|
1363
|
+
direction?: TrendDirection;
|
|
1364
|
+
/** Show the formatted value text next to the arrow */
|
|
1365
|
+
showValue?: boolean;
|
|
1366
|
+
/** Invert color logic (for metrics where down is good, e.g., error rate, bounce rate) */
|
|
1367
|
+
invert?: boolean;
|
|
1368
|
+
/** Accessible label override */
|
|
1369
|
+
label?: string;
|
|
1370
|
+
/** Size of the indicator */
|
|
1371
|
+
size?: TrendIndicatorSize;
|
|
1372
|
+
}
|
|
1373
|
+
declare const TrendIndicator: React__default.ForwardRefExoticComponent<TrendIndicatorProps & React__default.RefAttributes<HTMLSpanElement>>;
|
|
1374
|
+
|
|
1375
|
+
/**
|
|
1376
|
+
* TypewriterText Atom Component
|
|
1377
|
+
*
|
|
1378
|
+
* Reveals text character-by-character with a blinking cursor
|
|
1379
|
+
* that disappears after the full text has been typed out.
|
|
1380
|
+
*/
|
|
1381
|
+
|
|
1382
|
+
interface TypewriterTextProps extends A11yProps {
|
|
1383
|
+
/** The full text to reveal */
|
|
1384
|
+
text: string;
|
|
1385
|
+
/** Milliseconds per character */
|
|
1386
|
+
speed?: number;
|
|
1387
|
+
/** Delay before typing starts (ms) */
|
|
1388
|
+
startDelay?: number;
|
|
1389
|
+
/** Additional class names */
|
|
1390
|
+
className?: string;
|
|
1391
|
+
/**
|
|
1392
|
+
* Called when the entire text has been revealed
|
|
1393
|
+
* @notification
|
|
1394
|
+
*/
|
|
1395
|
+
onComplete?: () => void;
|
|
1396
|
+
}
|
|
1397
|
+
declare const TypewriterText: React__default.FC<TypewriterTextProps>;
|
|
1398
|
+
|
|
1399
|
+
/**
|
|
1400
|
+
* Typography Atom Component
|
|
1401
|
+
*
|
|
1402
|
+
* Text elements following the KFlow design system with theme-aware styling.
|
|
1403
|
+
*/
|
|
1404
|
+
|
|
1405
|
+
type TypographyVariant = "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "heading" | "subheading" | "body1" | "body2" | "body" | "caption" | "overline" | "small" | "large" | "label";
|
|
1406
|
+
/** `none` = no size override — the variant's baked size applies. */
|
|
1407
|
+
type TypographySize = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl";
|
|
1408
|
+
interface TypographyProps extends Omit<React__default.AriaAttributes, keyof A11yProps>, A11yProps {
|
|
1409
|
+
/** Typography variant */
|
|
1410
|
+
variant?: TypographyVariant;
|
|
1411
|
+
/** Heading level (1-6) - alternative to variant for headings */
|
|
1412
|
+
level?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
1413
|
+
/** Text color */
|
|
1414
|
+
color?: "primary" | "secondary" | "muted" | "error" | "success" | "warning" | "inherit";
|
|
1415
|
+
/** Text alignment */
|
|
1416
|
+
align?: "left" | "center" | "right";
|
|
1417
|
+
/** Font weight override — `none` = no override, the variant's baked weight applies */
|
|
1418
|
+
weight?: "none" | "light" | "normal" | "medium" | "semibold" | "bold";
|
|
1419
|
+
/** Font size override */
|
|
1420
|
+
size?: TypographySize;
|
|
1421
|
+
/** Truncate with ellipsis (single line) */
|
|
1422
|
+
truncate?: boolean;
|
|
1423
|
+
/** Overflow handling mode */
|
|
1424
|
+
overflow?: "visible" | "hidden" | "wrap" | "clamp-2" | "clamp-3";
|
|
1425
|
+
/** Custom HTML element */
|
|
1426
|
+
as?: keyof React__default.JSX.IntrinsicElements;
|
|
1427
|
+
/** HTML id attribute */
|
|
1428
|
+
id?: string;
|
|
1429
|
+
/** Additional class names */
|
|
1430
|
+
className?: string;
|
|
1431
|
+
/** Inline style */
|
|
1432
|
+
style?: React__default.CSSProperties;
|
|
1433
|
+
/**
|
|
1434
|
+
* Value formatting applied to string/number/Date content — `none` (the
|
|
1435
|
+
* default) renders content as-is. Covers the raw-ISO-date class: a bound
|
|
1436
|
+
* datetime renders human-readable via `format="date"|"time"|"datetime"`.
|
|
1437
|
+
*/
|
|
1438
|
+
format?: "none" | "date" | "time" | "datetime" | "number" | "currency" | "percent";
|
|
1439
|
+
/** Text content (alternative to children) */
|
|
1440
|
+
content?: React__default.ReactNode;
|
|
1441
|
+
/** Children elements */
|
|
1442
|
+
children?: React__default.ReactNode;
|
|
1443
|
+
}
|
|
1444
|
+
declare const Typography: React__default.FC<TypographyProps>;
|
|
1445
|
+
|
|
1446
|
+
interface SvgBranchProps extends A11yProps {
|
|
1447
|
+
x?: number;
|
|
1448
|
+
y?: number;
|
|
1449
|
+
variant?: 'fork' | 'merge' | 'diamond';
|
|
1450
|
+
branches?: number;
|
|
1451
|
+
size?: number;
|
|
1452
|
+
color?: string;
|
|
1453
|
+
opacity?: number;
|
|
1454
|
+
className?: string;
|
|
1455
|
+
/** When true (default), wraps in a standalone <svg> so the shape is visible without a parent SVG context. */
|
|
1456
|
+
asRoot?: boolean;
|
|
1457
|
+
width?: number;
|
|
1458
|
+
height?: number;
|
|
1459
|
+
}
|
|
1460
|
+
declare const SvgBranch: React__default.FC<SvgBranchProps>;
|
|
1461
|
+
|
|
1462
|
+
interface SvgConnectionProps extends A11yProps {
|
|
1463
|
+
x1?: number;
|
|
1464
|
+
y1?: number;
|
|
1465
|
+
x2?: number;
|
|
1466
|
+
y2?: number;
|
|
1467
|
+
variant?: 'solid' | 'dashed' | 'animated';
|
|
1468
|
+
color?: string;
|
|
1469
|
+
strokeWidth?: number;
|
|
1470
|
+
opacity?: number;
|
|
1471
|
+
className?: string;
|
|
1472
|
+
/** When true (default), wraps in a standalone <svg> so the shape is visible without a parent SVG context. */
|
|
1473
|
+
asRoot?: boolean;
|
|
1474
|
+
width?: number;
|
|
1475
|
+
height?: number;
|
|
1476
|
+
}
|
|
1477
|
+
declare const SvgConnection: React__default.FC<SvgConnectionProps>;
|
|
1478
|
+
|
|
1479
|
+
interface SvgFlowProps extends A11yProps {
|
|
1480
|
+
points?: Array<[number, number]>;
|
|
1481
|
+
color?: string;
|
|
1482
|
+
strokeWidth?: number;
|
|
1483
|
+
animated?: boolean;
|
|
1484
|
+
opacity?: number;
|
|
1485
|
+
className?: string;
|
|
1486
|
+
/** When true (default), wraps in a standalone <svg> so the shape is visible without a parent SVG context. */
|
|
1487
|
+
asRoot?: boolean;
|
|
1488
|
+
width?: number;
|
|
1489
|
+
height?: number;
|
|
1490
|
+
}
|
|
1491
|
+
declare const SvgFlow: React__default.FC<SvgFlowProps>;
|
|
1492
|
+
|
|
1493
|
+
interface SvgGridProps extends A11yProps {
|
|
1494
|
+
x?: number;
|
|
1495
|
+
y?: number;
|
|
1496
|
+
cols?: number;
|
|
1497
|
+
rows?: number;
|
|
1498
|
+
spacing?: number;
|
|
1499
|
+
nodeRadius?: number;
|
|
1500
|
+
color?: string;
|
|
1501
|
+
opacity?: number;
|
|
1502
|
+
className?: string;
|
|
1503
|
+
highlights?: number[];
|
|
1504
|
+
/** When true (default), wraps in a standalone <svg> so the shape is visible without a parent SVG context. */
|
|
1505
|
+
asRoot?: boolean;
|
|
1506
|
+
width?: number;
|
|
1507
|
+
height?: number;
|
|
1508
|
+
}
|
|
1509
|
+
declare const SvgGrid: React__default.FC<SvgGridProps>;
|
|
1510
|
+
|
|
1511
|
+
interface SvgLobeProps extends A11yProps {
|
|
1512
|
+
cx?: number;
|
|
1513
|
+
cy?: number;
|
|
1514
|
+
rx?: number;
|
|
1515
|
+
ry?: number;
|
|
1516
|
+
rotation?: number;
|
|
1517
|
+
shells?: number;
|
|
1518
|
+
color?: string;
|
|
1519
|
+
opacity?: number;
|
|
1520
|
+
className?: string;
|
|
1521
|
+
/** When true (default), wraps in a standalone <svg> so the shape is visible without a parent SVG context. */
|
|
1522
|
+
asRoot?: boolean;
|
|
1523
|
+
width?: number;
|
|
1524
|
+
height?: number;
|
|
1525
|
+
}
|
|
1526
|
+
declare const SvgLobe: React__default.FC<SvgLobeProps>;
|
|
1527
|
+
|
|
1528
|
+
interface SvgMeshProps extends A11yProps {
|
|
1529
|
+
cx?: number;
|
|
1530
|
+
cy?: number;
|
|
1531
|
+
nodes?: number;
|
|
1532
|
+
radius?: number;
|
|
1533
|
+
color?: string;
|
|
1534
|
+
connectionDensity?: number;
|
|
1535
|
+
opacity?: number;
|
|
1536
|
+
className?: string;
|
|
1537
|
+
/** When true (default), wraps in a standalone <svg> so the shape is visible without a parent SVG context. */
|
|
1538
|
+
asRoot?: boolean;
|
|
1539
|
+
width?: number;
|
|
1540
|
+
height?: number;
|
|
1541
|
+
}
|
|
1542
|
+
declare const SvgMesh: React__default.FC<SvgMeshProps>;
|
|
1543
|
+
|
|
1544
|
+
interface SvgMorphProps extends A11yProps {
|
|
1545
|
+
x?: number;
|
|
1546
|
+
y?: number;
|
|
1547
|
+
size?: number;
|
|
1548
|
+
variant?: 'text-to-code' | 'code-to-app' | 'generic';
|
|
1549
|
+
color?: string;
|
|
1550
|
+
opacity?: number;
|
|
1551
|
+
className?: string;
|
|
1552
|
+
/** When true (default), wraps in a standalone <svg> so the shape is visible without a parent SVG context. */
|
|
1553
|
+
asRoot?: boolean;
|
|
1554
|
+
width?: number;
|
|
1555
|
+
height?: number;
|
|
1556
|
+
}
|
|
1557
|
+
declare const SvgMorph: React__default.FC<SvgMorphProps>;
|
|
1558
|
+
|
|
1559
|
+
interface SvgNodeProps extends A11yProps {
|
|
1560
|
+
x?: number;
|
|
1561
|
+
y?: number;
|
|
1562
|
+
r?: number;
|
|
1563
|
+
variant?: 'filled' | 'stroked' | 'pulse';
|
|
1564
|
+
color?: string;
|
|
1565
|
+
opacity?: number;
|
|
1566
|
+
className?: string;
|
|
1567
|
+
label?: string;
|
|
1568
|
+
/** When true (default), wraps in a standalone <svg> so the shape is visible without a parent SVG context. */
|
|
1569
|
+
asRoot?: boolean;
|
|
1570
|
+
width?: number;
|
|
1571
|
+
height?: number;
|
|
1572
|
+
}
|
|
1573
|
+
declare const SvgNode: React__default.FC<SvgNodeProps>;
|
|
1574
|
+
|
|
1575
|
+
interface SvgPulseProps extends A11yProps {
|
|
1576
|
+
cx?: number;
|
|
1577
|
+
cy?: number;
|
|
1578
|
+
rings?: number;
|
|
1579
|
+
maxRadius?: number;
|
|
1580
|
+
color?: string;
|
|
1581
|
+
animated?: boolean;
|
|
1582
|
+
opacity?: number;
|
|
1583
|
+
className?: string;
|
|
1584
|
+
/** When true (default), wraps in a standalone <svg> so the shape is visible without a parent SVG context. */
|
|
1585
|
+
asRoot?: boolean;
|
|
1586
|
+
width?: number;
|
|
1587
|
+
height?: number;
|
|
1588
|
+
}
|
|
1589
|
+
declare const SvgPulse: React__default.FC<SvgPulseProps>;
|
|
1590
|
+
|
|
1591
|
+
interface SvgRingProps extends A11yProps {
|
|
1592
|
+
cx?: number;
|
|
1593
|
+
cy?: number;
|
|
1594
|
+
r?: number;
|
|
1595
|
+
variant?: 'solid' | 'dashed' | 'glow';
|
|
1596
|
+
color?: string;
|
|
1597
|
+
strokeWidth?: number;
|
|
1598
|
+
opacity?: number;
|
|
1599
|
+
className?: string;
|
|
1600
|
+
label?: string;
|
|
1601
|
+
/** When true (default), wraps in a standalone <svg> so the shape is visible without a parent SVG context. */
|
|
1602
|
+
asRoot?: boolean;
|
|
1603
|
+
width?: number;
|
|
1604
|
+
height?: number;
|
|
1605
|
+
}
|
|
1606
|
+
declare const SvgRing: React__default.FC<SvgRingProps>;
|
|
1607
|
+
|
|
1608
|
+
interface SvgShieldProps extends A11yProps {
|
|
1609
|
+
x?: number;
|
|
1610
|
+
y?: number;
|
|
1611
|
+
size?: number;
|
|
1612
|
+
variant?: 'outline' | 'filled' | 'check';
|
|
1613
|
+
color?: string;
|
|
1614
|
+
opacity?: number;
|
|
1615
|
+
className?: string;
|
|
1616
|
+
/** When true (default), wraps in a standalone <svg> so the shape is visible without a parent SVG context. */
|
|
1617
|
+
asRoot?: boolean;
|
|
1618
|
+
width?: number;
|
|
1619
|
+
height?: number;
|
|
1620
|
+
}
|
|
1621
|
+
declare const SvgShield: React__default.FC<SvgShieldProps>;
|
|
1622
|
+
|
|
1623
|
+
interface SvgStackProps extends A11yProps {
|
|
1624
|
+
x?: number;
|
|
1625
|
+
y?: number;
|
|
1626
|
+
layers?: number;
|
|
1627
|
+
width?: number;
|
|
1628
|
+
height?: number;
|
|
1629
|
+
color?: string;
|
|
1630
|
+
opacity?: number;
|
|
1631
|
+
className?: string;
|
|
1632
|
+
labels?: string[];
|
|
1633
|
+
/** When true (default), wraps in a standalone <svg> so the shape is visible without a parent SVG context. */
|
|
1634
|
+
asRoot?: boolean;
|
|
1635
|
+
svgWidth?: number;
|
|
1636
|
+
svgHeight?: number;
|
|
1637
|
+
}
|
|
1638
|
+
declare const SvgStack: React__default.FC<SvgStackProps>;
|
|
1639
|
+
|
|
1640
|
+
/**
|
|
1641
|
+
* useDialogBehavior — the one owner of modal-dialog keyboard behavior
|
|
1642
|
+
* (WAI-ARIA APG dialog pattern), shared by Modal and Drawer:
|
|
1643
|
+
*
|
|
1644
|
+
* - focus moves into the dialog on open and returns to the opener on close;
|
|
1645
|
+
* - Tab / Shift+Tab wrap inside the dialog (focus trap);
|
|
1646
|
+
* - Escape reaches only the top-most open dialog, so stacked overlays close
|
|
1647
|
+
* one at a time.
|
|
1648
|
+
*
|
|
1649
|
+
* A non-modal dialog (`modal: false`, e.g. Popover) joins the Escape stack
|
|
1650
|
+
* but neither takes focus on open nor traps Tab.
|
|
1651
|
+
*/
|
|
1652
|
+
|
|
1653
|
+
interface DialogBehaviorOptions {
|
|
1654
|
+
open: boolean;
|
|
1655
|
+
containerRef: RefObject<HTMLElement | null>;
|
|
1656
|
+
onEscape: () => void;
|
|
1657
|
+
closeOnEscape?: boolean;
|
|
1658
|
+
modal?: boolean;
|
|
1659
|
+
/** Where focus returns on close; defaults to whatever had focus at open
|
|
1660
|
+
* (a click does not focus a button in every browser, so triggers pass it). */
|
|
1661
|
+
returnFocusRef?: RefObject<HTMLElement | null>;
|
|
1662
|
+
}
|
|
1663
|
+
declare function useDialogBehavior({ open, containerRef, onEscape, closeOnEscape, modal, returnFocusRef }: DialogBehaviorOptions): void;
|
|
1664
|
+
|
|
1665
|
+
interface InfiniteScrollOptions {
|
|
1666
|
+
/** Root margin for IntersectionObserver (default: "200px") */
|
|
1667
|
+
rootMargin?: string;
|
|
1668
|
+
/** Whether more items are available to load */
|
|
1669
|
+
hasMore?: boolean;
|
|
1670
|
+
/** Whether a load is currently in progress */
|
|
1671
|
+
isLoading?: boolean;
|
|
1672
|
+
}
|
|
1673
|
+
interface InfiniteScrollResult {
|
|
1674
|
+
/** Ref to attach to the sentinel element */
|
|
1675
|
+
sentinelRef: React.RefCallback<HTMLElement>;
|
|
1676
|
+
}
|
|
1677
|
+
declare function useInfiniteScroll(onLoadMore: () => void, options?: InfiniteScrollOptions): InfiniteScrollResult;
|
|
1678
|
+
|
|
1679
|
+
/**
|
|
1680
|
+
* Reactively track a CSS media query (e.g. `'(pointer: coarse)'`).
|
|
1681
|
+
*
|
|
1682
|
+
* Components whose LAYOUT MATH depends on a media feature (a JS-computed
|
|
1683
|
+
* grid track, an inline-action budget) can't express it in CSS alone —
|
|
1684
|
+
* this hook is the one owner for that. `false` on the server and wherever
|
|
1685
|
+
* there is no `matchMedia`.
|
|
1686
|
+
*/
|
|
1687
|
+
declare function useMediaQuery(query: string): boolean;
|
|
1688
|
+
|
|
1689
|
+
/** Whether the OS asks for reduced motion — the one gate for JS/rAF/camera animations (CSS ones collapse in `_base.css`). */
|
|
1690
|
+
declare function usePrefersReducedMotion(): boolean;
|
|
1691
|
+
|
|
1692
|
+
/**
|
|
1693
|
+
* Hover-only reveals (tooltips, hover-popovers, submenus, `Box.hoverEvent`) have no hover on
|
|
1694
|
+
* touch, so they're invisible/unreachable. This adds the tap-to-reveal fallback: on a touch/pen
|
|
1695
|
+
* tap the surface reveals and fires the SAME event the hover path fires; a tap outside dismisses.
|
|
1696
|
+
* Mouse is left to the component's existing hover handlers (`pointerType === 'mouse'` is ignored),
|
|
1697
|
+
* so this is purely additive — no behavior change on desktop.
|
|
1698
|
+
*/
|
|
1699
|
+
interface TapRevealOptions {
|
|
1700
|
+
/** Fired when a tap reveals — reuse to emit the component's existing hover event. */
|
|
1701
|
+
onReveal?: () => void;
|
|
1702
|
+
/** Fired when an outside tap (or a second trigger tap) dismisses. */
|
|
1703
|
+
onDismiss?: () => void;
|
|
1704
|
+
/**
|
|
1705
|
+
* Elements considered "inside" for outside-tap detection. Pass the trigger and the surface
|
|
1706
|
+
* (the surface may be portaled, so it isn't a DOM descendant of the trigger). A tap whose
|
|
1707
|
+
* target is inside none of these dismisses.
|
|
1708
|
+
*/
|
|
1709
|
+
refs?: ReadonlyArray<React.RefObject<HTMLElement | null>>;
|
|
1710
|
+
/** When false, taps are ignored (hover-only). Default true. */
|
|
1711
|
+
enabled?: boolean;
|
|
1712
|
+
}
|
|
1713
|
+
interface TapRevealResult {
|
|
1714
|
+
/** Whether the surface is currently revealed via a tap. OR this with the hover state. */
|
|
1715
|
+
revealed: boolean;
|
|
1716
|
+
/** Spread on the trigger; toggles reveal on a touch/pen tap (ignores mouse). */
|
|
1717
|
+
triggerProps: {
|
|
1718
|
+
onPointerDown: (e: React.PointerEvent) => void;
|
|
1719
|
+
};
|
|
1720
|
+
reveal: () => void;
|
|
1721
|
+
dismiss: () => void;
|
|
1722
|
+
}
|
|
1723
|
+
declare function useTapReveal(options?: TapRevealOptions): TapRevealResult;
|
|
1724
|
+
|
|
1725
|
+
/**
|
|
1726
|
+
* Shared value formatting — the single owner of the locale-aware format
|
|
1727
|
+
* vocabulary used by every data display. Labels are never derived from names:
|
|
1728
|
+
* a display shows the declared label, or the name/value as stored.
|
|
1729
|
+
*/
|
|
1730
|
+
|
|
1731
|
+
type ValueFormat = 'none' | 'date' | 'time' | 'datetime' | 'number' | 'currency' | 'percent' | 'boolean';
|
|
1732
|
+
/**
|
|
1733
|
+
* A `YYYY-MM-DD` value is a calendar day with no time zone. `new Date(s)`
|
|
1734
|
+
* reads it as UTC midnight, which shows the previous day west of UTC; this
|
|
1735
|
+
* parses it as local midnight instead. Returns null for any other shape.
|
|
1736
|
+
*/
|
|
1737
|
+
declare function parseCalendarDate(value: string): Date | null;
|
|
1738
|
+
/** Value for an `<input type="date">`: the LOCAL calendar day. */
|
|
1739
|
+
declare function toDateInputValue(value: FieldValue | undefined): string;
|
|
1740
|
+
/** Value for an `<input type="datetime-local">`: LOCAL wall-clock time. */
|
|
1741
|
+
declare function toDateTimeInputValue(value: FieldValue | undefined): string;
|
|
1742
|
+
declare function formatDate(value: FieldValue | undefined, locale?: string): string;
|
|
1743
|
+
declare function formatTime(value: FieldValue | undefined, locale?: string): string;
|
|
1744
|
+
declare function formatDateTime(value: FieldValue | undefined, locale?: string): string;
|
|
1745
|
+
/** Translated boolean words, resolved by the caller (`t('common.yes')` / `t('common.no')`). */
|
|
1746
|
+
interface BooleanLabels {
|
|
1747
|
+
yes: string;
|
|
1748
|
+
no: string;
|
|
1749
|
+
}
|
|
1750
|
+
/** The app's formatting settings (see `useFormatContext`). */
|
|
1751
|
+
interface FormatContext {
|
|
1752
|
+
/** BCP 47 locale; omitted, the runtime default */
|
|
1753
|
+
locale?: string;
|
|
1754
|
+
/** ISO 4217 currency for `currency` values */
|
|
1755
|
+
currency?: string;
|
|
1756
|
+
/** Translated Yes/No */
|
|
1757
|
+
booleanLabels?: BooleanLabels;
|
|
1758
|
+
}
|
|
1759
|
+
/** Money is USD unless the host declares the app's currency (I18nContext `currency`). */
|
|
1760
|
+
declare const DEFAULT_CURRENCY = "USD";
|
|
1761
|
+
/**
|
|
1762
|
+
* Format a field value for display. Booleans always render Yes/No regardless
|
|
1763
|
+
* of the declared format (a raw `true`/`false` cell is never intended output).
|
|
1764
|
+
*/
|
|
1765
|
+
declare function formatValue(value: FieldValue | undefined, format?: string, fmt?: FormatContext): string;
|
|
1766
|
+
/** Sort direction for {@link sortRows}. */
|
|
1767
|
+
type SortDirection = 'asc' | 'desc';
|
|
1768
|
+
/**
|
|
1769
|
+
* Order two cell values by their own type, never by what the field is called.
|
|
1770
|
+
*
|
|
1771
|
+
* Numbers compare numerically, date-like strings chronologically, everything
|
|
1772
|
+
* else by locale string order. `null`/`undefined` sort last in both directions
|
|
1773
|
+
* so empty cells never displace real data at the top of a list.
|
|
1774
|
+
*/
|
|
1775
|
+
declare function compareCellValues(a: FieldValue | undefined, b: FieldValue | undefined): number;
|
|
1776
|
+
/**
|
|
1777
|
+
* Return a new array ordered by `field`. Non-mutating, and a no-op without a
|
|
1778
|
+
* field so callers can pass the prop through unconditionally.
|
|
1779
|
+
*
|
|
1780
|
+
* NOTE: this orders only the rows already fetched. A collection larger than its
|
|
1781
|
+
* `limit` still needs ordering at the data layer — see `L-NO-COLLECTION-ORDERING`.
|
|
1782
|
+
*/
|
|
1783
|
+
declare function sortRows<T extends Record<string, FieldValue | undefined>>(rows: readonly T[], field?: string, direction?: SortDirection): readonly T[];
|
|
1784
|
+
|
|
1785
|
+
/**
|
|
1786
|
+
* useTranslate — i18n hook for Almadar UI components.
|
|
1787
|
+
*
|
|
1788
|
+
* Provides locale-aware string translation via React context.
|
|
1789
|
+
* No provider = passthrough: t('key') returns 'key' as-is (never crashes).
|
|
1790
|
+
*
|
|
1791
|
+
* Usage in organisms:
|
|
1792
|
+
* const { t, locale, direction } = useTranslate();
|
|
1793
|
+
* <Button>{t('common.save')}</Button>
|
|
1794
|
+
* <Typography>{t('table.showing', { count: 5, total: 20 })}</Typography>
|
|
1795
|
+
*
|
|
1796
|
+
* Templates MUST NOT use this hook (flattener rule). They receive
|
|
1797
|
+
* translated strings via entity props from the organism above.
|
|
1798
|
+
*/
|
|
1799
|
+
|
|
1800
|
+
type TranslateFunction = (key: string, params?: Record<string, string | number>) => string;
|
|
1801
|
+
interface I18nContextValue {
|
|
1802
|
+
/** Current locale code (e.g. 'en', 'ar', 'sl') */
|
|
1803
|
+
locale: string;
|
|
1804
|
+
/** Text direction for the current locale */
|
|
1805
|
+
direction: 'ltr' | 'rtl';
|
|
1806
|
+
/** Translate a key, with optional interpolation params */
|
|
1807
|
+
t: TranslateFunction;
|
|
1808
|
+
/** The active locale's program catalog (qualified `<behavior>:<key>` → message): the runtime evaluates `i18n/t` against it. */
|
|
1809
|
+
messages?: Readonly<Record<string, string>>;
|
|
1810
|
+
/** ISO 4217 currency of the app's money values, declared by the host with the locale (e.g. `SAR` for an ar-SA app) */
|
|
1811
|
+
currency?: string;
|
|
1812
|
+
}
|
|
1813
|
+
/**
|
|
1814
|
+
* Provider component — wrap your app or Storybook decorator with this.
|
|
1815
|
+
*
|
|
1816
|
+
* ```tsx
|
|
1817
|
+
* <I18nProvider value={{ locale: 'ar', direction: 'rtl', t: createTranslate(arMessages) }}>
|
|
1818
|
+
* <App />
|
|
1819
|
+
* </I18nProvider>
|
|
1820
|
+
* ```
|
|
1821
|
+
*/
|
|
1822
|
+
interface I18nProviderProps {
|
|
1823
|
+
value: I18nContextValue;
|
|
1824
|
+
children?: React__default.ReactNode;
|
|
1825
|
+
/** The app's root provider: mirrors locale + direction onto `<html lang dir>`.
|
|
1826
|
+
* Embedded previews omit it so they never rewrite their host document. */
|
|
1827
|
+
documentRoot?: boolean;
|
|
1828
|
+
}
|
|
1829
|
+
declare function I18nProvider({ value, children, documentRoot }: I18nProviderProps): React__default.ReactElement;
|
|
1830
|
+
/**
|
|
1831
|
+
* Hook to access the current locale and translate function.
|
|
1832
|
+
* Safe to call without a provider — returns passthrough t().
|
|
1833
|
+
*/
|
|
1834
|
+
declare function useTranslate(): I18nContextValue;
|
|
1835
|
+
/** The viewer's locale and its catalog, for `i18n/t` / `@locale` evaluated in the browser. */
|
|
1836
|
+
interface RenderI18n {
|
|
1837
|
+
locale: string;
|
|
1838
|
+
messages: Readonly<Record<string, string>>;
|
|
1839
|
+
}
|
|
1840
|
+
/** The provider's locale + catalog as one identity-stable value; undefined when the host supplied no catalog. */
|
|
1841
|
+
declare function useRenderI18n(): RenderI18n | undefined;
|
|
1842
|
+
/** The app's formatting settings for `formatValue`: its locale, currency and translated Yes/No. */
|
|
1843
|
+
declare function useFormatContext(): FormatContext;
|
|
1844
|
+
/**
|
|
1845
|
+
* Create a translate function from a flat messages object.
|
|
1846
|
+
*
|
|
1847
|
+
* ```ts
|
|
1848
|
+
* const t = createTranslate({ 'common.save': 'Save', 'table.showing': 'Showing {{count}} of {{total}}' });
|
|
1849
|
+
* t('common.save') // → 'Save'
|
|
1850
|
+
* t('table.showing', { count: 5, total: 20 }) // → 'Showing 5 of 20'
|
|
1851
|
+
* t('missing.key') // → 'missing.key' (fallback)
|
|
1852
|
+
* ```
|
|
1853
|
+
*
|
|
1854
|
+
* Pass `locale` so built-in component labels the app catalog doesn't carry
|
|
1855
|
+
* come from the UI's own catalog for that locale before English.
|
|
1856
|
+
*/
|
|
1857
|
+
declare function createTranslate(messages: Record<string, string>, locale?: string): TranslateFunction;
|
|
1858
|
+
|
|
1859
|
+
/**
|
|
1860
|
+
* Changes inside a container ease in instead of switching in one frame: an
|
|
1861
|
+
* element that appears fades and rises in, text that changes in place fades
|
|
1862
|
+
* in on its element, blocks the change pushed glide to their new place, and the
|
|
1863
|
+
* container's own height eases to fit its new content. Rows with their own motion (item glides, entrance classes) are left alone. Timing is the theme's `--duration-normal` /
|
|
1864
|
+
* `--easing-emphasized`; off under reduced motion.
|
|
1865
|
+
*/
|
|
1866
|
+
|
|
1867
|
+
declare function useAnimateChanges(ref: RefObject<HTMLElement | null>, enabled: boolean): void;
|
|
1868
|
+
|
|
1869
|
+
/**
|
|
1870
|
+
* Utility function to merge Tailwind CSS classes
|
|
1871
|
+
* Combines clsx for conditional classes with tailwind-merge to handle conflicts
|
|
1872
|
+
*/
|
|
1873
|
+
declare function cn(...inputs: ClassValue[]): string;
|
|
1874
|
+
|
|
1875
|
+
/**
|
|
1876
|
+
* The attribute namespaces a layout/text primitive forwards to its element:
|
|
1877
|
+
* `aria-*`, `data-*`, `role`, `id`, `lang`, `dir` and `tabIndex` (HTML's own
|
|
1878
|
+
* global-attribute contract; @almadar/core A11yProps).
|
|
1879
|
+
* The runtime renderer spreads schema props onto components, so anything else
|
|
1880
|
+
* stays off the DOM.
|
|
1881
|
+
*/
|
|
1882
|
+
type DomPassthrough = Record<string, string | number | boolean | undefined>;
|
|
1883
|
+
declare function domPassthrough(props: object): DomPassthrough;
|
|
1884
|
+
|
|
1885
|
+
/**
|
|
1886
|
+
* NavigationContext - Schema-Driven Navigation for Orbital Runtime
|
|
1887
|
+
*
|
|
1888
|
+
* Provides navigation within the orbital schema without react-router dependency.
|
|
1889
|
+
* Navigation works by:
|
|
1890
|
+
* 1. Matching path to a page in the schema
|
|
1891
|
+
* 2. Extracting route params (e.g., /inspection/:id → { id: "123" })
|
|
1892
|
+
* 3. Switching active page
|
|
1893
|
+
* 4. Triggering INIT with merged payload
|
|
1894
|
+
*
|
|
1895
|
+
* This approach works whether OrbitalRuntime is standalone or embedded in another app.
|
|
1896
|
+
*
|
|
1897
|
+
* Used by both:
|
|
1898
|
+
* - Builder runtime (interpreted execution)
|
|
1899
|
+
* - Compiled shells (generated applications)
|
|
1900
|
+
*
|
|
1901
|
+
* @packageDocumentation
|
|
1902
|
+
*/
|
|
1903
|
+
|
|
1904
|
+
/**
|
|
1905
|
+
* Extract route params from a path given its pattern.
|
|
1906
|
+
* Wrapper around matchPath for explicit use.
|
|
1907
|
+
*/
|
|
1908
|
+
declare function extractRouteParams(pattern: string, path: string): Record<string, string>;
|
|
1909
|
+
/**
|
|
1910
|
+
* Check if a path matches a pattern.
|
|
1911
|
+
*/
|
|
1912
|
+
declare function pathMatches(pattern: string, path: string): boolean;
|
|
1913
|
+
/**
|
|
1914
|
+
* Find a page in the schema by matching its path pattern against a concrete path.
|
|
1915
|
+
* Returns the page and extracted route params.
|
|
1916
|
+
*/
|
|
1917
|
+
declare function findPageByPath(schema: OrbitalSchema, path: string): {
|
|
1918
|
+
page: OrbitalPage;
|
|
1919
|
+
params: Record<string, string>;
|
|
1920
|
+
orbitalName: string;
|
|
1921
|
+
} | null;
|
|
1922
|
+
/**
|
|
1923
|
+
* Find a page by name.
|
|
1924
|
+
*/
|
|
1925
|
+
declare function findPageByName(schema: OrbitalSchema, pageName: string): {
|
|
1926
|
+
page: OrbitalPage;
|
|
1927
|
+
orbitalName: string;
|
|
1928
|
+
} | null;
|
|
1929
|
+
/**
|
|
1930
|
+
* Get the first page in the schema (default page).
|
|
1931
|
+
*/
|
|
1932
|
+
declare function getDefaultPage(schema: OrbitalSchema): {
|
|
1933
|
+
page: OrbitalPage;
|
|
1934
|
+
orbitalName: string;
|
|
1935
|
+
} | null;
|
|
1936
|
+
/**
|
|
1937
|
+
* Get all pages from the schema.
|
|
1938
|
+
*/
|
|
1939
|
+
declare function getAllPages(schema: OrbitalSchema): Array<{
|
|
1940
|
+
page: OrbitalPage;
|
|
1941
|
+
orbitalName: string;
|
|
1942
|
+
}>;
|
|
1943
|
+
interface NavigationState {
|
|
1944
|
+
/** Current active page name */
|
|
1945
|
+
activePage: string;
|
|
1946
|
+
/** Current path (for URL sync) */
|
|
1947
|
+
currentPath: string;
|
|
1948
|
+
/** Payload to pass to INIT when page loads */
|
|
1949
|
+
initPayload: Record<string, FieldValue>;
|
|
1950
|
+
/** Navigation counter (increments on each navigation) */
|
|
1951
|
+
navigationId: number;
|
|
1952
|
+
}
|
|
1953
|
+
interface NavigationContextValue {
|
|
1954
|
+
/** Current navigation state */
|
|
1955
|
+
state: NavigationState;
|
|
1956
|
+
/** Navigate to a path with optional payload */
|
|
1957
|
+
navigateTo: (path: string, payload?: Record<string, FieldValue>) => void;
|
|
1958
|
+
/** Navigate to a page by name with optional payload */
|
|
1959
|
+
navigateToPage: (pageName: string, payload?: Record<string, FieldValue>) => void;
|
|
1960
|
+
/** The schema being navigated */
|
|
1961
|
+
schema: OrbitalSchema;
|
|
1962
|
+
/** Whether navigation is ready (schema loaded) */
|
|
1963
|
+
isReady: boolean;
|
|
1964
|
+
}
|
|
1965
|
+
interface NavigationProviderProps {
|
|
1966
|
+
/** The schema to navigate within */
|
|
1967
|
+
schema: OrbitalSchema;
|
|
1968
|
+
/** Initial page name (optional, defaults to first page) */
|
|
1969
|
+
initialPage?: string;
|
|
1970
|
+
/** Whether to update browser URL on navigation (default: true) */
|
|
1971
|
+
updateUrl?: boolean;
|
|
1972
|
+
/** Callback when navigation occurs */
|
|
1973
|
+
onNavigate?: (pageName: string, path: string, payload: Record<string, FieldValue>) => void;
|
|
1974
|
+
/** Children */
|
|
1975
|
+
children: React__default.ReactNode;
|
|
1976
|
+
}
|
|
1977
|
+
/**
|
|
1978
|
+
* NavigationProvider - Provides schema-driven navigation context
|
|
1979
|
+
*
|
|
1980
|
+
* @example
|
|
1981
|
+
* ```tsx
|
|
1982
|
+
* <NavigationProvider schema={mySchema}>
|
|
1983
|
+
* <OrbitalRuntimeContent />
|
|
1984
|
+
* </NavigationProvider>
|
|
1985
|
+
* ```
|
|
1986
|
+
*/
|
|
1987
|
+
declare function NavigationProvider({ schema, initialPage, updateUrl, onNavigate, children, }: NavigationProviderProps): React__default.ReactElement;
|
|
1988
|
+
/**
|
|
1989
|
+
* Hook to access navigation context.
|
|
1990
|
+
* Returns null if not within NavigationProvider.
|
|
1991
|
+
*/
|
|
1992
|
+
declare function useNavigation(): NavigationContextValue | null;
|
|
1993
|
+
/**
|
|
1994
|
+
* Hook to get the navigateTo function.
|
|
1995
|
+
* Returns a no-op function if not within NavigationProvider.
|
|
1996
|
+
*/
|
|
1997
|
+
declare function useNavigateTo(): (path: string, payload?: Record<string, FieldValue>) => void;
|
|
1998
|
+
/**
|
|
1999
|
+
* Hook to get current navigation state.
|
|
2000
|
+
*/
|
|
2001
|
+
declare function useNavigationState(): NavigationState | null;
|
|
2002
|
+
/**
|
|
2003
|
+
* Hook to get the current INIT payload (for passing to trait INIT events).
|
|
2004
|
+
*/
|
|
2005
|
+
declare function useInitPayload(): Record<string, FieldValue>;
|
|
2006
|
+
/**
|
|
2007
|
+
* Hook to get current active page name.
|
|
2008
|
+
*/
|
|
2009
|
+
declare function useActivePage(): string | null;
|
|
2010
|
+
/**
|
|
2011
|
+
* Hook to get navigation ID (changes on each navigation, useful for triggering effects).
|
|
2012
|
+
*/
|
|
2013
|
+
declare function useNavigationId(): number;
|
|
2014
|
+
|
|
2015
|
+
/**
|
|
2016
|
+
* Navigation-stack core — the pure logic behind the orbital-scoped
|
|
2017
|
+
* client-session navigation stack both execution paths share.
|
|
2018
|
+
*
|
|
2019
|
+
* The stack is what detail-page breadcrumb bands and the `navigate-back`
|
|
2020
|
+
* effect read. It lives client-side only (per browser tab): the runtime
|
|
2021
|
+
* path's OrbPreview and the compiled app's App.tsx both mount
|
|
2022
|
+
* `NavStackProvider` (providers/NavStackContext.tsx), which drives this
|
|
2023
|
+
* module on every route change.
|
|
2024
|
+
*
|
|
2025
|
+
* Semantics (deterministic):
|
|
2026
|
+
* - One stack per ORBITAL, keyed by the orbital owning the current page.
|
|
2027
|
+
* - On route change: an entry with the same href already in the stack
|
|
2028
|
+
* truncates back to it (revisit); otherwise the new entry is pushed.
|
|
2029
|
+
* - Cold load (deep link): the stack seeds from the declared page-path
|
|
2030
|
+
* hierarchy — every declared page whose pattern matches a strict prefix
|
|
2031
|
+
* of the concrete path becomes an ancestor entry — so the trail is never
|
|
2032
|
+
* empty and back always has a target on nested paths.
|
|
2033
|
+
* - Entry label = the `crumb` carried by the navigate effect when one was
|
|
2034
|
+
* staged for this href, else the page's declared label, else its name as written.
|
|
2035
|
+
*/
|
|
2036
|
+
|
|
2037
|
+
/** One declared page as the nav stack needs it: path pattern + name + owning orbital + declared label. */
|
|
2038
|
+
interface NavPageDecl {
|
|
2039
|
+
path: string;
|
|
2040
|
+
name: string;
|
|
2041
|
+
orbital: string;
|
|
2042
|
+
/** Declared nav label (`@label`); absent = the page name as written. */
|
|
2043
|
+
label?: string;
|
|
2044
|
+
}
|
|
2045
|
+
/** Per-orbital stacks. */
|
|
2046
|
+
type NavStackState = Record<string, NavStackEntry[]>;
|
|
2047
|
+
/** Crumb staged by a `(navigate … { crumb })` effect, consumed by the next sync. */
|
|
2048
|
+
interface PendingCrumb {
|
|
2049
|
+
href: string;
|
|
2050
|
+
crumb: string;
|
|
2051
|
+
}
|
|
2052
|
+
/** A page's entry label: its declared label, else the declared navItem label for it, else its name as written (never derived). */
|
|
2053
|
+
declare function pageEntryLabel(page: NavPageDecl, navLabels?: NavItemLabels): string;
|
|
2054
|
+
/** Declared navItem labels keyed by the page path each item's href resolves to. */
|
|
2055
|
+
type NavItemLabels = Readonly<Record<string, string>>;
|
|
2056
|
+
/** A declared navigation item (the app shell's `navItems`), children included. */
|
|
2057
|
+
interface NavItemDecl {
|
|
2058
|
+
href: string;
|
|
2059
|
+
label: string;
|
|
2060
|
+
children?: readonly NavItemDecl[];
|
|
2061
|
+
}
|
|
2062
|
+
/** Map every navItem (children too) to the declared page its href resolves to; hrefs matching no page are skipped. */
|
|
2063
|
+
declare function navLabelsFromItems(pages: readonly NavPageDecl[], items: readonly NavItemDecl[]): Record<string, string>;
|
|
2064
|
+
/**
|
|
2065
|
+
* Entries whose label is still their page's own fallback (declared label or
|
|
2066
|
+
* name) take the page's navItem label; a staged record crumb is left alone.
|
|
2067
|
+
*/
|
|
2068
|
+
declare function resolveEntryLabels(entries: readonly NavStackEntry[], pages: readonly NavPageDecl[], navLabels: NavItemLabels): readonly NavStackEntry[];
|
|
2069
|
+
/** The page a concrete path resolves to (specificity-ranked), or null. */
|
|
2070
|
+
declare function matchNavPage(pages: readonly NavPageDecl[], path: string): NavPageDecl | null;
|
|
2071
|
+
/**
|
|
2072
|
+
* Fold a route change into the stack state. Returns the next state plus the
|
|
2073
|
+
* orbital owning the current path (`null` when no declared page matches —
|
|
2074
|
+
* e.g. /login — in which case the state is returned unchanged).
|
|
2075
|
+
*/
|
|
2076
|
+
declare function syncNavStack(state: NavStackState, pages: readonly NavPageDecl[], path: string, pending: PendingCrumb | null): {
|
|
2077
|
+
state: NavStackState;
|
|
2078
|
+
orbital: string | null;
|
|
2079
|
+
};
|
|
2080
|
+
/**
|
|
2081
|
+
* Relabel the entry for the current path — the loaded record's real title
|
|
2082
|
+
* replacing the page-name fallback (`Contract Detail` → the contract's
|
|
2083
|
+
* title). Fed by DetailPanel when it renders a resolved record in the
|
|
2084
|
+
* routed main slot, so cold loads and refreshes read like in-app pushes.
|
|
2085
|
+
* Returns the same state object when nothing changes (no page match, or
|
|
2086
|
+
* the label already equals `label`) so callers can skip re-renders.
|
|
2087
|
+
*/
|
|
2088
|
+
declare function relabelCurrent(state: NavStackState, pages: readonly NavPageDecl[], path: string, label: string): NavStackState;
|
|
2089
|
+
/**
|
|
2090
|
+
* The previous entry for the current path's orbital — the `navigate-back`
|
|
2091
|
+
* target — or null when the stack holds no earlier entry (top-level page).
|
|
2092
|
+
*/
|
|
2093
|
+
declare function previousEntry(state: NavStackState, pages: readonly NavPageDecl[], path: string): NavStackEntry | null;
|
|
2094
|
+
/** Entries for the current path's orbital (empty when no page matches). */
|
|
2095
|
+
declare function entriesFor(state: NavStackState, pages: readonly NavPageDecl[], path: string): readonly NavStackEntry[];
|
|
2096
|
+
|
|
2097
|
+
/**
|
|
2098
|
+
* NavStackProvider — the orbital-scoped client-session navigation stack.
|
|
2099
|
+
*
|
|
2100
|
+
* One provider instance per app host. Both execution paths mount it:
|
|
2101
|
+
* - Runtime path: OrbPreview supplies `currentPath` + `navigate` explicitly.
|
|
2102
|
+
* - Compiled path: the emitted App.tsx mounts `NavStackRouterBridge`, which
|
|
2103
|
+
* reads react-router's location/navigate and renders this provider.
|
|
2104
|
+
*
|
|
2105
|
+
* Pure stack semantics live in lib/navStack.ts (one owner for both paths).
|
|
2106
|
+
* State persists to sessionStorage (per-tab) so a compiled app's full page
|
|
2107
|
+
* reload keeps the trail; every storage access is guarded with an in-memory
|
|
2108
|
+
* fallback.
|
|
2109
|
+
*/
|
|
2110
|
+
|
|
2111
|
+
interface NavStackApi {
|
|
2112
|
+
/** Stack of the current page's orbital, root-first (empty when no declared page matches). */
|
|
2113
|
+
entries: readonly NavStackEntry[];
|
|
2114
|
+
/** True when a previous entry exists for the current page's orbital. */
|
|
2115
|
+
canGoBack: boolean;
|
|
2116
|
+
/** Stage the crumb label for the entry the target page will record, then call navigate yourself. */
|
|
2117
|
+
beginNavigate: (href: string, crumb?: string) => void;
|
|
2118
|
+
/** Pop the current orbital's stack: navigate to the previous entry (no-op without one). */
|
|
2119
|
+
back: () => void;
|
|
2120
|
+
/** Navigate to an arbitrary stack entry (breadcrumb click). */
|
|
2121
|
+
goTo: (href: string) => void;
|
|
2122
|
+
/** Relabel the current page's stack entry with the loaded record's title
|
|
2123
|
+
* (idempotent; no-op when the label already matches). DetailPanel calls
|
|
2124
|
+
* this from the routed main slot so cold-loaded crumbs read like pushes. */
|
|
2125
|
+
setCurrentLabel: (label: string) => void;
|
|
2126
|
+
/** The app shell's declared navItems: a page reached by one shows that item's label in the trail. */
|
|
2127
|
+
registerNavItems: (items: readonly NavItemDecl[]) => void;
|
|
2128
|
+
}
|
|
2129
|
+
/** True when no NavStackProvider is mounted above (plain React / SSR hosts). */
|
|
2130
|
+
declare function isInertNavStack(api: NavStackApi): boolean;
|
|
2131
|
+
declare function useNavStack(): NavStackApi;
|
|
2132
|
+
interface NavStackProviderProps {
|
|
2133
|
+
pages: readonly NavPageDecl[];
|
|
2134
|
+
/** Concrete current path (route params substituted), e.g. /contracts/42. */
|
|
2135
|
+
currentPath: string;
|
|
2136
|
+
/** Host navigation function (SPA route change). */
|
|
2137
|
+
navigate: (path: string) => void;
|
|
2138
|
+
/** sessionStorage key; omit to keep the stack in memory only. */
|
|
2139
|
+
storageKey?: string;
|
|
2140
|
+
children: React__default.ReactNode;
|
|
2141
|
+
}
|
|
2142
|
+
declare const NavStackProvider: React__default.FC<NavStackProviderProps>;
|
|
2143
|
+
interface NavStackRouterBridgeProps {
|
|
2144
|
+
pages: readonly NavPageDecl[];
|
|
2145
|
+
storageKey?: string;
|
|
2146
|
+
children: React__default.ReactNode;
|
|
2147
|
+
}
|
|
2148
|
+
/**
|
|
2149
|
+
* Compiled-path host: binds NavStackProvider to react-router. Must render
|
|
2150
|
+
* inside a Router (the emitted App.tsx mounts it directly under
|
|
2151
|
+
* BrowserRouter).
|
|
2152
|
+
*/
|
|
2153
|
+
declare const NavStackRouterBridge: React__default.FC<NavStackRouterBridgeProps>;
|
|
2154
|
+
|
|
2155
|
+
/** True for an absolute URL (`https:`, `mailto:`, …) that must load outside the app. */
|
|
2156
|
+
declare function isAbsoluteHref(href: string): boolean;
|
|
2157
|
+
/** Follow an href: an in-page `#anchor` scrolls to it, an absolute URL loads, a path goes through the nav stack (or loads when there is none). */
|
|
2158
|
+
declare function followHref(href: string, navStack: NavStackApi): void;
|
|
2159
|
+
|
|
2160
|
+
/**
|
|
2161
|
+
* Icon family runtime resolver (Layer 1 Iconography axis).
|
|
2162
|
+
*
|
|
2163
|
+
* Reads the active `--icon-family` CSS variable from the document element and
|
|
2164
|
+
* dispatches a canonical icon name (kebab-case, matching lucide's vocabulary)
|
|
2165
|
+
* to the equivalent lucide component. Subscribes to data-theme attribute changes
|
|
2166
|
+
* via MutationObserver so a theme switch re-renders icons without a page reload.
|
|
2167
|
+
*
|
|
2168
|
+
* Non-lucide families (phosphor, tabler, fontawesome) are temporarily disabled
|
|
2169
|
+
* to keep them out of client bundles. They can be re-enabled later behind an
|
|
2170
|
+
* async chunk boundary once the workspace/publish dust settles.
|
|
2171
|
+
*
|
|
2172
|
+
* See `docs/Almadar_Std_Variations.md` §2 and `themes/_contract.md`.
|
|
2173
|
+
*/
|
|
2174
|
+
|
|
2175
|
+
type IconFamily = IconFamily$1;
|
|
2176
|
+
/** Adapter props that EVERY family-specific icon component accepts at this layer. */
|
|
2177
|
+
interface RenderedIconProps {
|
|
2178
|
+
className?: string;
|
|
2179
|
+
strokeWidth?: number;
|
|
2180
|
+
size?: number;
|
|
2181
|
+
style?: React__default.CSSProperties;
|
|
2182
|
+
}
|
|
2183
|
+
/** Read --icon-family from <html> at runtime. Returns 'lucide' on SSR. */
|
|
2184
|
+
declare function getCurrentIconFamily(): IconFamily;
|
|
2185
|
+
/** React hook: whether the theme's `--icon-stroke-width` applies to the rendered icons. */
|
|
2186
|
+
declare function useThemeIconStrokeApplies(ref: React__default.RefObject<Element | null>): boolean;
|
|
2187
|
+
/** React hook: returns the active icon family, re-renders on theme switch. */
|
|
2188
|
+
declare function useIconFamily(): IconFamily;
|
|
2189
|
+
type RenderedIcon = React__default.ForwardRefExoticComponent<RenderedIconProps & React__default.RefAttributes<SVGSVGElement>>;
|
|
2190
|
+
/**
|
|
2191
|
+
* Dispatch a canonical icon name to the active family component.
|
|
2192
|
+
* Non-lucide families are currently disabled and fall back to lucide.
|
|
2193
|
+
*/
|
|
2194
|
+
declare function resolveIconForFamily(name: string, _family: IconFamily): RenderedIcon;
|
|
2195
|
+
/**
|
|
2196
|
+
* Resolve a canonical icon name to a family-aware component. The returned
|
|
2197
|
+
* component re-renders the icon into the active family's library on theme
|
|
2198
|
+
* switch (via useIconFamily's MutationObserver subscription).
|
|
2199
|
+
*/
|
|
2200
|
+
declare function useResolvedIcon(name: string): RenderedIcon;
|
|
2201
|
+
|
|
2202
|
+
/**
|
|
2203
|
+
* The attribute a component puts on the element that shows one of its text
|
|
2204
|
+
* props (value: the prop name), so an editor can edit that text in place and
|
|
2205
|
+
* write it back to exactly that prop.
|
|
2206
|
+
*/
|
|
2207
|
+
declare const INLINE_TEXT_ATTR = "data-inline-text";
|
|
2208
|
+
|
|
2209
|
+
/** Kebab-case to PascalCase: 'shopping-cart' -> 'ShoppingCart', 'trash-2' -> 'Trash2'. */
|
|
2210
|
+
declare function kebabToPascal(name: string): string;
|
|
2211
|
+
/** The lucide module key for a kebab-case or PascalCase icon name; undefined when lucide has no such icon. */
|
|
2212
|
+
declare function lucideIconKey(name: string): string | undefined;
|
|
2213
|
+
/**
|
|
2214
|
+
* Resolve an icon name to a lucide component, sync. Aliases and the help glyph are bundled; every other icon
|
|
2215
|
+
* is its own on-demand module, so a client downloads only the icons its program names.
|
|
2216
|
+
*/
|
|
2217
|
+
declare function resolveLucideByName(name: string): LucideIcon;
|
|
2218
|
+
|
|
2219
|
+
/** A CSS `<time>` (`400ms`, `.4s`) in milliseconds; NaN when it is not one. */
|
|
2220
|
+
declare function cssTimeMs(value: string): number;
|
|
2221
|
+
/**
|
|
2222
|
+
* Duration + easing from the named tokens as they resolve at `scope` (default: the page root),
|
|
2223
|
+
* or undefined when motion is off (theme, OS reduced motion, or tokens absent).
|
|
2224
|
+
*/
|
|
2225
|
+
declare function motionTiming(durationToken: string, easingToken: string, scope?: Element): {
|
|
2226
|
+
duration: number;
|
|
2227
|
+
easing: string;
|
|
2228
|
+
} | undefined;
|
|
2229
|
+
/**
|
|
2230
|
+
* How much `el` is scaled on screen by transforms above it (a desktop-size demo scaled to fit):
|
|
2231
|
+
* its on-screen width over its layout width; 1 when it is not laid out. Script-driven motion
|
|
2232
|
+
* measures on screen and animates in layout pixels, so it divides by this.
|
|
2233
|
+
*/
|
|
2234
|
+
declare function layoutScale(el: Element): number;
|
|
2235
|
+
|
|
2236
|
+
/** A fresh key for one activation of a control. */
|
|
2237
|
+
declare function newPendingKey(): string;
|
|
2238
|
+
/** A dispatch carrying `key` started. */
|
|
2239
|
+
declare function beginPending(key: string): void;
|
|
2240
|
+
/** A dispatch carrying `key` settled. */
|
|
2241
|
+
declare function endPending(key: string): void;
|
|
2242
|
+
declare function isPending(key: string): boolean;
|
|
2243
|
+
declare function subscribePending(key: string, cb: () => void): () => void;
|
|
2244
|
+
/**
|
|
2245
|
+
* A region (a modal) that holds still while an action started inside it is in
|
|
2246
|
+
* flight: its confirm button stays busy and the dialog does not leave before
|
|
2247
|
+
* the action settles.
|
|
2248
|
+
*/
|
|
2249
|
+
interface PendingScopeValue {
|
|
2250
|
+
track: (key: string) => void;
|
|
2251
|
+
hasPending: () => boolean;
|
|
2252
|
+
subscribe: (cb: () => void) => () => void;
|
|
2253
|
+
}
|
|
2254
|
+
declare const PendingScopeContext: React$1.Context<PendingScopeValue | null>;
|
|
2255
|
+
/** Builds the value a `PendingScopeContext.Provider` carries. */
|
|
2256
|
+
declare function usePendingScopeValue(): PendingScopeValue;
|
|
2257
|
+
/** Whether the nearest pending scope (or the given one) has an action in flight. */
|
|
2258
|
+
declare function useScopeHasPending(scope: PendingScopeValue | null): boolean;
|
|
2259
|
+
/**
|
|
2260
|
+
* One control's busy state. `activate(emit)` hands `emit` a fresh key to stamp
|
|
2261
|
+
* on the event it sends; `pending` is true until every dispatch that event
|
|
2262
|
+
* started has settled.
|
|
2263
|
+
*/
|
|
2264
|
+
declare function usePendingAction(): {
|
|
2265
|
+
pending: boolean;
|
|
2266
|
+
activate: (emit: (pendingKey: string) => void) => void;
|
|
2267
|
+
};
|
|
2268
|
+
/**
|
|
2269
|
+
* Busy state per row of a collection: a row action marks ITS row pending while
|
|
2270
|
+
* the dispatches it started are in flight.
|
|
2271
|
+
*/
|
|
2272
|
+
declare function usePendingRows(): {
|
|
2273
|
+
isRowPending: (rowId: string) => boolean;
|
|
2274
|
+
activateRow: (rowId: string, emit: (pendingKey: string) => void) => void;
|
|
2275
|
+
};
|
|
2276
|
+
|
|
2277
|
+
/**
|
|
2278
|
+
* pressableProps — props that make a non-button surface (a card, a row, a cell)
|
|
2279
|
+
* an operable control: `role="button"`, a tab stop, and Enter/Space activation
|
|
2280
|
+
* (WAI-ARIA APG button). Without a handler it returns nothing, so a surface is
|
|
2281
|
+
* only ever a control when it declares an action. A plain function, not a
|
|
2282
|
+
* hook, so row loops can call it. Enter/Space dispatch a real
|
|
2283
|
+
* click, so the surface's `onClick` receives the same MouseEvent either way.
|
|
2284
|
+
*/
|
|
2285
|
+
|
|
2286
|
+
interface PressableProps<T extends Element = HTMLElement> {
|
|
2287
|
+
role?: 'button';
|
|
2288
|
+
tabIndex?: number;
|
|
2289
|
+
'aria-disabled'?: true;
|
|
2290
|
+
onClick?: (e: React__default.MouseEvent<T>) => void;
|
|
2291
|
+
onKeyDown?: (e: React__default.KeyboardEvent<T>) => void;
|
|
2292
|
+
}
|
|
2293
|
+
declare function pressableProps<T extends Element = HTMLElement>(onPress: ((e: React__default.MouseEvent<T>) => void) | undefined, options?: {
|
|
2294
|
+
disabled?: boolean;
|
|
2295
|
+
}): PressableProps<T>;
|
|
2296
|
+
interface RowActivationProps<T extends Element = HTMLElement> {
|
|
2297
|
+
tabIndex?: number;
|
|
2298
|
+
onClick?: (e: React__default.MouseEvent<T>) => void;
|
|
2299
|
+
onKeyDown?: (e: React__default.KeyboardEvent<T>) => void;
|
|
2300
|
+
}
|
|
2301
|
+
/**
|
|
2302
|
+
* A clickable table/list row keeps its own role (`row`), so it cannot become a
|
|
2303
|
+
* button; it gets a tab stop and Enter activation instead, dispatching the
|
|
2304
|
+
* same click.
|
|
2305
|
+
*/
|
|
2306
|
+
declare function rowActivationProps<T extends Element = HTMLElement>(onActivate: ((e: React__default.MouseEvent<T>) => void) | undefined): RowActivationProps<T>;
|
|
2307
|
+
/**
|
|
2308
|
+
* The keyboard/AT half of a clickable row: the row container owns the plain
|
|
2309
|
+
* `onClick` (no role, no tab stop), and ONE element inside it — the title, or
|
|
2310
|
+
* an overlay for custom-rendered rows — is the named `role="button"` tab stop.
|
|
2311
|
+
* Enter/Space dispatch a real click that bubbles to the row, so activation runs
|
|
2312
|
+
* through the one handler and row-action buttons stay siblings instead of
|
|
2313
|
+
* buttons nested inside a button. Action clusters must stop propagation.
|
|
2314
|
+
*/
|
|
2315
|
+
declare function rowOpenControlProps<T extends Element = HTMLElement>(enabled: boolean): {
|
|
2316
|
+
role?: 'button';
|
|
2317
|
+
tabIndex?: number;
|
|
2318
|
+
onKeyDown?: (e: React__default.KeyboardEvent<T>) => void;
|
|
2319
|
+
};
|
|
2320
|
+
/** Focus ring for a row-open control, painted over its whole row via `::after` (row needs `relative`). */
|
|
2321
|
+
declare const STRETCHED_CONTROL = "after:absolute after:inset-0 after:content-[''] after:rounded-[inherit] focus-visible:outline-none focus-visible:after:ring-2 focus-visible:after:ring-primary focus-visible:after:ring-inset";
|
|
2322
|
+
/** Lifts interactive row content (action clusters, checkboxes) above a STRETCHED_CONTROL's ::after. */
|
|
2323
|
+
declare const STRETCHED_ABOVE = "relative z-[1]";
|
|
2324
|
+
|
|
2325
|
+
/**
|
|
2326
|
+
* Render-time expression evaluation on the kernel's one evaluator.
|
|
2327
|
+
*
|
|
2328
|
+
* A render binds many expressions against one context (a form's conditional fields and sections, a list's
|
|
2329
|
+
* row actions). Each helper here takes the whole batch and crosses into the kernel once; a caller with no
|
|
2330
|
+
* expression never touches the kernel. The module that loads the kernel installs the evaluator
|
|
2331
|
+
* (`KernelEngineProvider`), and there is no other evaluator to fall back on.
|
|
2332
|
+
*
|
|
2333
|
+
* @packageDocumentation
|
|
2334
|
+
*/
|
|
2335
|
+
|
|
2336
|
+
/** The value of each expression against `context`, in one crossing; throws `KernelEvalError` on the first that fails. */
|
|
2337
|
+
declare function evaluateBindings(context: EvalContextWire, expressions: readonly SExpr[]): JsonValue[];
|
|
2338
|
+
/** The value of one expression against `context`; throws `KernelEvalError` when it fails. */
|
|
2339
|
+
declare function evaluateBinding(context: EvalContextWire, expression: SExpr): JsonValue;
|
|
2340
|
+
/** Whether each guard holds against `context` (the kernel's truthiness), in one crossing; throws on the first that fails. */
|
|
2341
|
+
declare function guardsHold(context: EvalContextWire, guards: readonly SExpr[]): boolean[];
|
|
2342
|
+
|
|
2343
|
+
declare const SVG_MOTION_CLASSES: {
|
|
2344
|
+
readonly flowDash: "almadar-svg-flow-dash";
|
|
2345
|
+
readonly pulseRing: "almadar-svg-pulse-ring";
|
|
2346
|
+
readonly pulseExpand: "almadar-svg-pulse-expand";
|
|
2347
|
+
};
|
|
2348
|
+
type SvgMotion = keyof typeof SVG_MOTION_CLASSES;
|
|
2349
|
+
/** The class for `motion` when the element animates and theme motion is on. */
|
|
2350
|
+
declare function svgMotionClass(motion: SvgMotion, animated: boolean): string | undefined;
|
|
2351
|
+
|
|
2352
|
+
/**
|
|
2353
|
+
* The custom scale keys `tailwind-preset.cjs` adds on top of Tailwind's stock
|
|
2354
|
+
* scales, by theme group. `cn` registers them with tailwind-merge so a caller's
|
|
2355
|
+
* class replaces a component's default of the same group; `cn.test.ts` fails
|
|
2356
|
+
* when the preset gains a key that is missing here.
|
|
2357
|
+
*/
|
|
2358
|
+
declare const THEME_SCALE_KEYS: {
|
|
2359
|
+
readonly height: readonly ["button-sm", "button-md", "button-lg", "input-sm", "input-md", "input-lg", "row-compact", "row-normal", "row-spacious", "icon-default"];
|
|
2360
|
+
readonly minHeight: readonly ["button-sm", "button-md", "button-lg", "input-sm", "input-md", "input-lg", "row-compact", "row-normal", "row-spacious"];
|
|
2361
|
+
readonly width: readonly ["icon-default"];
|
|
2362
|
+
readonly fontSize: readonly ["display-1", "display-2"];
|
|
2363
|
+
readonly borderRadius: readonly ["container", "interactive", "pill"];
|
|
2364
|
+
readonly boxShadow: readonly ["elevation-card", "elevation-popover", "elevation-dialog", "elevation-toast", "elevation-interactive", "elevation-pressed"];
|
|
2365
|
+
readonly spacing: readonly ["card-sm", "card-md", "card-lg", "dialog", "section"];
|
|
2366
|
+
};
|
|
2367
|
+
|
|
2368
|
+
/**
|
|
2369
|
+
* Which traits have rendered output on screen — what a `[visible]` tick asks
|
|
2370
|
+
* before it fires (LOLO §11). A trait is `absent` when nothing it renders is
|
|
2371
|
+
* mounted, `on-screen` when any of its output is near the viewport in a
|
|
2372
|
+
* visible tab, and `off-screen` otherwise.
|
|
2373
|
+
*
|
|
2374
|
+
* Only watched traits are tracked: `TraitScopeProvider` wraps a trait's output
|
|
2375
|
+
* in a layout-neutral `display: contents` element only while some tick runner
|
|
2376
|
+
* watches that trait, so programs without `[visible]` ticks render unchanged.
|
|
2377
|
+
*/
|
|
2378
|
+
|
|
2379
|
+
type TraitPresenceState = 'absent' | 'on-screen' | 'off-screen';
|
|
2380
|
+
interface TraitPresence {
|
|
2381
|
+
/** Ask for these traits' output to be tracked; returns the release. */
|
|
2382
|
+
watch(traits: readonly string[]): () => void;
|
|
2383
|
+
isWatched(trait: string): boolean;
|
|
2384
|
+
/** Notified when the watched set changes. */
|
|
2385
|
+
subscribe(listener: () => void): () => void;
|
|
2386
|
+
/** Track `wrapper`'s rendered boxes as `trait`'s output; returns the detach. */
|
|
2387
|
+
attach(trait: string, wrapper: Element): () => void;
|
|
2388
|
+
/** The presence of a group: on screen when any member is, absent when no member renders. */
|
|
2389
|
+
state(traits: readonly string[]): TraitPresenceState;
|
|
2390
|
+
}
|
|
2391
|
+
declare function createTraitPresence(): TraitPresence;
|
|
2392
|
+
/** The one presence registry for this document. */
|
|
2393
|
+
declare function getTraitPresence(): TraitPresence;
|
|
2394
|
+
/** The traits whose output decides `traitName`'s presence: itself, or every trait sharing its `[shared]` entity's frame (LOLO §11). */
|
|
2395
|
+
declare function presenceGroup(traitIndex: TraitIndex, traitName: string): string[];
|
|
2396
|
+
|
|
2397
|
+
/**
|
|
2398
|
+
* Content surfaces: the background box behind a content block (table,
|
|
2399
|
+
* calendar, list, chart …). Every block paints the theme-owned `.surface-content`
|
|
2400
|
+
* by default, so a patterned page never shows through one block and not the
|
|
2401
|
+
* next; the THEME decides what that surface looks like via `--surface-content-*`.
|
|
2402
|
+
*
|
|
2403
|
+
* Anything that already is a surface (a Card, a dialog, a panel, or a block that
|
|
2404
|
+
* painted one) marks its subtree, and a block inside that subtree stays flat —
|
|
2405
|
+
* declared ancestry, so a surface never nests inside another.
|
|
2406
|
+
*/
|
|
2407
|
+
|
|
2408
|
+
/** Marks its subtree as already sitting on a surface. */
|
|
2409
|
+
declare function SurfaceBoundary({ children }: {
|
|
2410
|
+
children?: React__default.ReactNode;
|
|
2411
|
+
}): React__default.ReactElement;
|
|
2412
|
+
interface ContentSurface {
|
|
2413
|
+
/** `surface-content` when this block paints the surface, otherwise undefined. */
|
|
2414
|
+
className: string | undefined;
|
|
2415
|
+
/** Wraps the block's content so nested blocks know they already sit on a surface. */
|
|
2416
|
+
provide: (node: React__default.ReactNode) => React__default.ReactElement;
|
|
2417
|
+
}
|
|
2418
|
+
declare function useContentSurface(surface?: SurfaceMode): ContentSurface;
|
|
2419
|
+
/** True when an ancestor already painted a surface. */
|
|
2420
|
+
declare function useOnSurface(): boolean;
|
|
2421
|
+
|
|
2422
|
+
/**
|
|
2423
|
+
* GENERATED — do not edit by hand. One entry per @almadar/core theme preset
|
|
2424
|
+
* (packages/almadar-core/themes/*.json). Regenerate: almadar-sync themes.
|
|
2425
|
+
*/
|
|
2426
|
+
|
|
2427
|
+
declare const BUILT_IN_THEMES: UIThemeDefinition[];
|
|
2428
|
+
|
|
2429
|
+
/**
|
|
2430
|
+
* TraitScopeProvider
|
|
2431
|
+
*
|
|
2432
|
+
* Wraps a trait's rendered subtree with its owning `{ orbital, trait }`
|
|
2433
|
+
* pair. Pure components inside the subtree (Button, Form, etc.) keep
|
|
2434
|
+
* calling `useEventBus().emit('UI:X', ...)` exactly as today; the
|
|
2435
|
+
* scoped wrapper that `useEventBus` returns inside this provider
|
|
2436
|
+
* rewrites bare `UI:X` keys into the qualified
|
|
2437
|
+
* `UI:Orbital.Trait.X` form that `useTraitStateMachine` (and the rest
|
|
2438
|
+
* of the post-Phase 4 subscriber side) listens on.
|
|
2439
|
+
*
|
|
2440
|
+
* Producer-side fix for the gap where Button-emitted bare keys never
|
|
2441
|
+
* reached the trait state machine in the runtime path. The compiled
|
|
2442
|
+
* path's codegen wraps each trait view with the same provider so both
|
|
2443
|
+
* paths share the qualification contract.
|
|
2444
|
+
*
|
|
2445
|
+
* ## Embedded-trait emit bubbling (R-EMBEDDED-EMIT-BUBBLE)
|
|
2446
|
+
*
|
|
2447
|
+
* Providers NEST: when a trait's `render-ui` embeds another trait
|
|
2448
|
+
* (`@trait.X` / inline `<External.Trait …/>`), the embedded view is
|
|
2449
|
+
* rendered inside the host's subtree AND wraps itself in its own
|
|
2450
|
+
* provider. The context therefore carries the full scope CHAIN
|
|
2451
|
+
* (innermost-first), not a single scope. `useEventBus` fans every
|
|
2452
|
+
* `UI:*` emit out to each scope on the chain so the host trait's
|
|
2453
|
+
* subscribers hear emits from the embedded trait — a button authored
|
|
2454
|
+
* as `<UiButton.traits.ButtonRender action={CREATE}/>` inside a host
|
|
2455
|
+
* dispatches on the host's qualified key, not only the hoisted atom's.
|
|
2456
|
+
*
|
|
2457
|
+
* @packageDocumentation
|
|
2458
|
+
*/
|
|
2459
|
+
|
|
2460
|
+
interface TraitScope {
|
|
2461
|
+
/** Owning orbital name (e.g. `"ContactOrbital"`). */
|
|
2462
|
+
orbital: string;
|
|
2463
|
+
/** Trait name within the orbital (e.g. `"ContactBrowse"`). */
|
|
2464
|
+
trait: string;
|
|
2465
|
+
}
|
|
2466
|
+
/**
|
|
2467
|
+
* Scope chain, innermost-first. `chain[0]` is the trait whose subtree
|
|
2468
|
+
* the caller renders inside; `chain[1..]` are its host ancestors (the
|
|
2469
|
+
* traits whose `render-ui` embedded it, outermost last). An empty
|
|
2470
|
+
* chain means the caller is outside any `TraitScopeProvider`.
|
|
2471
|
+
*/
|
|
2472
|
+
type TraitScopeChain = readonly TraitScope[];
|
|
2473
|
+
interface TraitScopeProviderProps {
|
|
2474
|
+
orbital: string;
|
|
2475
|
+
trait: string;
|
|
2476
|
+
children?: React__default.ReactNode;
|
|
2477
|
+
}
|
|
2478
|
+
/**
|
|
2479
|
+
* Wrap a trait's rendered subtree to qualify bare `UI:*` emits with the
|
|
2480
|
+
* trait's scope. Mount this at the slot-content boundary in runtime
|
|
2481
|
+
* mode (UISlotRenderer) and at each generated trait view's outermost
|
|
2482
|
+
* element in compiled mode (orbital-shell-typescript codegen). Nesting
|
|
2483
|
+
* is preserved: a provider prepends itself to the parent chain so
|
|
2484
|
+
* embedded-trait emits can bubble to their host.
|
|
2485
|
+
*/
|
|
2486
|
+
declare function TraitScopeProvider({ orbital, trait, children, }: TraitScopeProviderProps): React__default.ReactElement;
|
|
2487
|
+
/**
|
|
2488
|
+
* Read the full trait-scope chain, innermost-first. Empty when called
|
|
2489
|
+
* outside any `TraitScopeProvider` (e.g. Storybook, design-system
|
|
2490
|
+
* catalog). `useEventBus` uses this to fan embedded-trait emits out to
|
|
2491
|
+
* every host ancestor.
|
|
2492
|
+
*/
|
|
2493
|
+
declare function useTraitScopeChain(): TraitScopeChain;
|
|
2494
|
+
/**
|
|
2495
|
+
* Read the innermost (nearest) trait scope. Returns `null` when called
|
|
2496
|
+
* outside any `TraitScopeProvider`. Kept for callers that only need the
|
|
2497
|
+
* immediate scope.
|
|
2498
|
+
*/
|
|
2499
|
+
declare function useTraitScope(): TraitScope | null;
|
|
2500
|
+
|
|
2501
|
+
/**
|
|
2502
|
+
* Core locale loader for @almadar/ui.
|
|
2503
|
+
*
|
|
2504
|
+
* Exports message maps for en/ar/sl and a helper to merge
|
|
2505
|
+
* project-specific messages on top of core.
|
|
2506
|
+
*/
|
|
2507
|
+
type SupportedLocale = 'en' | 'ar' | 'sl';
|
|
2508
|
+
interface LocaleMeta {
|
|
2509
|
+
locale: string;
|
|
2510
|
+
direction: 'ltr' | 'rtl';
|
|
2511
|
+
}
|
|
2512
|
+
/** Core messages keyed by locale */
|
|
2513
|
+
declare const coreMessages: Record<SupportedLocale, Record<string, string>>;
|
|
2514
|
+
/** Locale metadata */
|
|
2515
|
+
declare const localeMeta: Record<SupportedLocale, LocaleMeta>;
|
|
2516
|
+
/**
|
|
2517
|
+
* Merge core messages with project-specific messages.
|
|
2518
|
+
* Project keys override core keys.
|
|
2519
|
+
*/
|
|
2520
|
+
declare function mergeMessages(locale: SupportedLocale, projectMessages: Record<string, string>): Record<string, string>;
|
|
2521
|
+
|
|
2522
|
+
export { AnimatedGraphic, AnimatedReveal, Aside, AtlasImage, AtlasPanel, Avatar, BAND_ACCENT_FALLBACK, BAND_EDGE_FILL, BAND_SHAPES, BUILT_IN_THEMES, Box, Card, CardBody, CardContent, CardFooter, CardHeader, CardTitle, Center, Checkbox, ConditionalWrapper, ConfettiEffect, DEFAULT_CURRENCY, DayCell, Dialog, Divider, FilterPill, FlipContainer, GameIcon, HStack, I18nProvider, INLINE_TEXT_ATTR, IconInput, Image, InfiniteScrollSentinel, Label, LawReferenceTooltip, NavStackProvider, NavStackRouterBridge, NavigationProvider, Overlay, PendingScopeContext, Presence, ProgressBar, Radio, RangeSlider, STRETCHED_ABOVE, STRETCHED_CONTROL, SVG_MOTION_CLASSES, SectionHeader, Spacer, Sparkline, Spinner, Stack, StatusDot, SurfaceBoundary, SvgBranch, SvgConnection, SvgFlow, SvgGrid, SvgLobe, SvgMesh, SvgMorph, SvgNode, SvgPulse, SvgRing, SvgShield, SvgStack, Switch, THEME_SCALE_KEYS, TextHighlight, Textarea, ThemeToggle, TimeSlotCell, TraitScopeProvider, TrendIndicator, TypewriterText, Typography, UIThemeDefinition, VStack, atlasFailed, atlasUrlOf, bandEdgeHeight, bandEdgeLayerStyle, bandEdgeMask, bandPadding, beginPending, blit, cn, compareCellValues, coreMessages, createTraitPresence, createTranslate, cssTimeMs, domPassthrough, endPending, entriesFor, evaluateBinding, evaluateBindings, extractRouteParams, findPageByName, findPageByPath, followHref, formatDate, formatDateTime, formatTime, formatValue, getAllPages, getAtlas, getCurrentIconFamily, getDefaultPage, getTraitPresence, guardsHold, isAbsoluteHref, isAtlasAsset, isInertNavStack, isMotionEnabled, isPending, isSpriteSheetAtlas, kebabToPascal, layoutScale, localeMeta, lucideIconKey, matchNavPage, mergeMessages, motionTiming, navLabelsFromItems, newPendingKey, pageEntryLabel, parseCalendarDate, pathMatches, presenceGroup, pressableProps, previousEntry, relabelCurrent, resolveAssetSource, resolveEntryLabels, resolveIconForFamily, resolveLucideByName, rowActivationProps, rowOpenControlProps, sortRows, subRectFor, subscribePending, svgMotionClass, syncNavStack, toDateInputValue, toDateTimeInputValue, useActivePage, useAnimateChanges, useAtlasSliceDataUrl, useContentSurface, useDialogBehavior, useFormatContext, useIconFamily, useInfiniteScroll, useInitPayload, useMediaQuery, useNavStack, useNavigateTo, useNavigation, useNavigationId, useNavigationState, useOnSurface, usePendingAction, usePendingRows, usePendingScopeValue, usePrefersReducedMotion, usePresence, useRenderI18n, useResolvedIcon, useScopeHasPending, useTapReveal, useThemeIconStrokeApplies, useTraitScope, useTraitScopeChain, useTranslate };
|
|
2523
|
+
export type { AnimatedGraphicProps, AnimatedRevealProps, AsideProps, AssetSource, AtlasImageAsset, AtlasImageProps, AtlasPanelProps, AvatarProps, AvatarSize, AvatarStatus, BandEdge, BandEdgeColor, BandEdgeLayerStyle, BooleanLabels, BoxBg, BoxMargin, BoxPadding, BoxProps, BoxRounded, BoxShadow, CardLook, CardProps, CardShadow, CenterProps, CheckboxProps, ConditionalContext, ConditionalWrapperProps, ConfettiEffectProps, ContentSurface, DayCellProps, DialogBehaviorOptions, DialogProps, DividerOrientation, DividerProps, DividerVariant, DomPassthrough, FilterPillProps, FilterPillSize, FilterPillVariant, FlipContainerProps, FormatContext, GameIconProps, GraphicAnimation, HStackProps, HighlightType, I18nContextValue, I18nProviderProps, IconFamily, ImageAspect, ImageFit, ImagePosition, ImageProps, ImageRounded, InfiniteScrollOptions, InfiniteScrollResult, InfiniteScrollSentinelProps, LabelProps, LawReference, LawReferenceTooltipProps, LocaleMeta, NavItemDecl, NavItemLabels, NavPageDecl, NavStackApi, NavStackProviderProps, NavStackRouterBridgeProps, NavStackState, NavigationContextValue, NavigationProviderProps, NavigationState, OverlayProps, PendingCrumb, PendingScopeValue, PresenceAnimation, PresenceProps, PresenceResult, PressableProps, ProgressBarColor, ProgressBarProps, ProgressBarType, ProgressBarVariant, RadioProps, RangeSliderProps, RangeSliderSize, RenderI18n, RenderedIcon, RenderedIconProps, RevealAnimation, RevealTrigger, RowActivationProps, SectionHeaderProps, SortDirection, SpacerProps, SpacerSize, SparklineColor, SparklineProps, SpinnerProps, SpinnerSize, SpriteRef, StackAlign, StackDirection, StackGap, StackJustify, StackProps, StatusDotProps, StatusDotSize, StatusDotStatus, SubRect, SupportedLocale, SvgBranchProps, SvgConnectionProps, SvgFlowProps, SvgGridProps, SvgLobeProps, SvgMeshProps, SvgMorphProps, SvgMotion, SvgNodeProps, SvgPulseProps, SvgRingProps, SvgShieldProps, SvgStackProps, SwitchProps, TapRevealOptions, TapRevealResult, TextHighlightProps, TextareaProps, ThemeToggleProps, TimeSlotCellProps, TraitPresence, TraitPresenceState, TraitScope, TraitScopeProviderProps, TranslateFunction, TrendDirection, TrendIndicatorProps, TrendIndicatorSize, TypewriterTextProps, TypographyProps, TypographySize, TypographyVariant, UsePresenceOptions, VStackProps, ValueFormat };
|