@almadar/shell-web 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundling.d.mts +18 -0
- package/bundling.mjs +28 -0
- package/dist/ArbitraryClassCompiler-CO_iASBn.d.ts +195 -0
- package/dist/AvlGlyph-EPJKFEO3.js +6 -0
- package/dist/AvlStateMachine-RKZIKNGC.js +9 -0
- package/dist/AvlTransitionDetail-63SD6GZF.js +11 -0
- package/dist/AvlTransitionExplainer-ZBTLOM3T.js +12 -0
- package/dist/BehaviorView-YS5G4GNB.js +11 -0
- package/dist/Canvas3DHost-BkZQB5l2.d.ts +552 -0
- package/dist/EventBusProvider-BFFHfN4O.d.ts +296 -0
- package/dist/FileTree-BCFnBEuQ.d.ts +254 -0
- package/dist/FlowCanvas-3JRMNJLV.css +1756 -0
- package/dist/FlowCanvas-AUMTWMNG.js +26 -0
- package/dist/GameAudioProvider-ceM_n0ey.d.ts +90 -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-CcxGYtlr.d.ts +33 -0
- package/dist/LayersPanel-M2LHWUFF.js +6 -0
- package/dist/ModuleCard-QHDGK5XK.js +7 -0
- package/dist/OrbInspector-MHLJ6OEE.css +1756 -0
- package/dist/OrbInspector-QCPEPUPH.js +26 -0
- package/dist/Select-B-iDdnvE.d.ts +185 -0
- package/dist/ServerBridge-Bqsj-lOU.d.ts +124 -0
- package/dist/ThemeContext-DJmO59xd.d.ts +147 -0
- package/dist/UISlotContext-Dl_ewwCI.d.ts +79 -0
- package/dist/UISlotRenderer-C7WWOK43.js +26 -0
- package/dist/UISlotRenderer-KVFO6J7R.css +1756 -0
- package/dist/auth/browser/index.d.ts +2 -0
- package/dist/auth/browser/index.js +2 -0
- package/dist/auth/react/index.d.ts +56 -0
- package/dist/auth/react/index.js +157 -0
- package/dist/avl/index.css +1756 -0
- package/dist/avl/index.d.ts +2248 -0
- package/dist/avl/index.js +2693 -0
- package/dist/avl-3d-context-BycmO6tG.d.ts +201 -0
- package/dist/avl-schema-parser-CtJxJ9KU.d.ts +132 -0
- package/dist/avl-zoom-state-CKMVuBFg.d.ts +17 -0
- package/dist/chunk-3BBUBJFF.js +339 -0
- package/dist/chunk-3S54FWRC.js +131 -0
- package/dist/chunk-3VZ36ZKO.js +775 -0
- package/dist/chunk-4T3P43NS.js +1133 -0
- package/dist/chunk-4YXBKHHM.js +11488 -0
- package/dist/chunk-57DC34LY.js +525 -0
- package/dist/chunk-5QTYQTPS.js +15 -0
- package/dist/chunk-A2LR6VQQ.js +349 -0
- package/dist/chunk-AB3X7QTE.js +505 -0
- package/dist/chunk-AE7VCQB6.js +561 -0
- package/dist/chunk-AGXD77SL.js +98 -0
- package/dist/chunk-AU7O65OX.js +66 -0
- package/dist/chunk-CPLN6NBQ.js +701 -0
- package/dist/chunk-DZBQA2OW.js +176 -0
- package/dist/chunk-E6KA4J6N.js +227 -0
- package/dist/chunk-EOWMARUB.js +16 -0
- package/dist/chunk-G7DCAZ22.js +19 -0
- package/dist/chunk-GFXCPUMX.js +1334 -0
- package/dist/chunk-HH5KSMH5.js +311 -0
- package/dist/chunk-ILQXJ2AR.js +280 -0
- package/dist/chunk-ILZ7ORX7.js +432 -0
- package/dist/chunk-K4MOPSEL.js +674 -0
- package/dist/chunk-LHP2TK7O.js +47587 -0
- package/dist/chunk-P4ZFUQFF.js +93 -0
- package/dist/chunk-PCR37T3U.js +296 -0
- package/dist/chunk-PRXQGGCO.js +580 -0
- package/dist/chunk-REXYVBUO.js +191 -0
- package/dist/chunk-ROICKAU7.js +24 -0
- package/dist/chunk-SP5CDJ6K.js +338 -0
- package/dist/chunk-TUPZWTRE.js +1051 -0
- package/dist/chunk-TXAUOLWZ.js +490 -0
- package/dist/chunk-TZZBINQY.js +82 -0
- package/dist/chunk-UTDC2NEA.js +14 -0
- package/dist/chunk-UU57VNS2.js +1053 -0
- package/dist/chunk-UXLE3IPR.js +421 -0
- package/dist/chunk-VO2TTLS5.js +94 -0
- package/dist/chunk-X3DMMX27.js +11 -0
- package/dist/chunk-YHMRX6YA.js +455 -0
- package/dist/components/index.css +1756 -0
- package/dist/components/index.d.ts +11299 -0
- package/dist/components/index.js +1110 -0
- package/dist/context/index.d.ts +8 -0
- package/dist/context/index.js +8 -0
- package/dist/core.d.ts +2599 -0
- package/dist/core.js +3 -0
- package/dist/design-classes/index.cjs +431 -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 +399 -0
- package/dist/emojiItems-QGSNAABW.js +20 -0
- package/dist/fx-CmQjnHmT.d.ts +371 -0
- package/dist/hooks/index.d.ts +971 -0
- package/dist/hooks/index.js +8 -0
- package/dist/index.d.ts +408 -0
- package/dist/index.js +178 -0
- package/dist/katexPlugin-FA7NX4PE.css +1161 -0
- package/dist/katexPlugin-NCDKOOQY.js +2 -0
- package/dist/kernel-client-TZKGHJRY.js +516 -0
- package/dist/kernel-wire-wNdAPfhJ.d.ts +88 -0
- package/dist/lib/index.d.ts +602 -0
- package/dist/lib/index.js +1289 -0
- package/dist/paintDispatch-CuJLsr9Y.d.ts +688 -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-X5YWKXO5.js +136 -0
- package/dist/providers/index.css +1756 -0
- package/dist/providers/index.d.ts +355 -0
- package/dist/providers/index.js +29 -0
- package/dist/renderer/index.d.ts +465 -0
- package/dist/renderer/index.js +4 -0
- package/dist/runtime/index.css +1756 -0
- package/dist/runtime/index.d.ts +239 -0
- package/dist/runtime/index.js +28 -0
- package/dist/slot-host-CPzrxLo9.d.ts +48 -0
- package/dist/ssr/index.cjs +9739 -0
- package/dist/ssr/index.d.cts +464 -0
- package/dist/ssr/index.d.ts +464 -0
- package/dist/ssr/index.js +9703 -0
- package/dist/storage/browser/index.d.ts +1 -0
- package/dist/storage/browser/index.js +2 -0
- package/dist/test-support.d.ts +42 -0
- package/dist/test-support.js +181 -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 +3908 -0
- package/dist/useUISlots-CiobNFGb.d.ts +211 -0
- package/dist/verification-C5pTeMJv.d.ts +66 -0
- package/dist/verificationRegistry-CVrcxG1s.d.ts +122 -0
- package/dist/wrapCallbackForEvent-B9QLbhxX.d.ts +19 -0
- package/index.css +199 -0
- package/package.json +273 -3
- package/src/core/lib/band-shapes.json +7 -0
- package/src/core/locales/ar.json +1276 -0
- package/src/core/locales/en.json +1276 -0
- package/src/core/locales/index.ts +54 -0
- package/src/core/locales/sl.json +1276 -0
- package/src/core/tokens/native-tokens.json +369 -0
- package/tailwind-compile.cjs +29 -0
- package/tailwind-preset.cjs +1020 -0
- package/themes/_base.css +451 -0
- package/themes/_contract.md +307 -0
- package/themes/_fonts-kenney.css +11 -0
- package/themes/_fonts.css +12 -0
- package/themes/_foundation.css +105 -0
- package/themes/_head.css +22 -0
- package/themes/_presets.css +67 -0
- package/themes/almadar-heritage.css +455 -0
- package/themes/almadar-website.css +269 -0
- package/themes/almadar.css +269 -0
- package/themes/aqua.css +455 -0
- package/themes/arabesque.css +459 -0
- package/themes/art-deco.css +457 -0
- package/themes/art-nouveau.css +459 -0
- package/themes/atelier.css +463 -0
- package/themes/bauhaus.css +461 -0
- package/themes/bloomberg-dense.css +463 -0
- package/themes/blueprint.css +457 -0
- package/themes/clay.css +449 -0
- package/themes/comic.css +453 -0
- package/themes/constructivist.css +457 -0
- package/themes/corporate.css +449 -0
- package/themes/cyberpunk.css +453 -0
- package/themes/frutiger-aero.css +458 -0
- package/themes/game-adventure.css +201 -0
- package/themes/game-rpg.css +203 -0
- package/themes/game-sci-fi.css +201 -0
- package/themes/game-ui-pack.css +200 -0
- package/themes/gazette.css +449 -0
- package/themes/glass.css +457 -0
- package/themes/gothic.css +453 -0
- package/themes/index.css +21 -0
- package/themes/ink-wash.css +459 -0
- package/themes/kawaii.css +459 -0
- package/themes/kflow.css +310 -0
- package/themes/kiosk.css +449 -0
- package/themes/linear-clean.css +463 -0
- package/themes/luxury.css +451 -0
- package/themes/mac-classic.css +455 -0
- package/themes/material.css +463 -0
- package/themes/memphis.css +453 -0
- package/themes/mid-century.css +455 -0
- package/themes/minimalist.css +449 -0
- package/themes/mudcloth.css +459 -0
- package/themes/nata.css +310 -0
- package/themes/neon.css +453 -0
- package/themes/neumorphic.css +451 -0
- package/themes/newsprint.css +455 -0
- package/themes/notion-editorial.css +463 -0
- package/themes/orb.css +465 -0
- package/themes/pixel.css +449 -0
- package/themes/prism.css +309 -0
- package/themes/rawi.css +310 -0
- package/themes/retro.css +452 -0
- package/themes/risograph.css +463 -0
- package/themes/scandi.css +469 -0
- package/themes/sketch.css +455 -0
- package/themes/solarpunk.css +469 -0
- package/themes/steampunk.css +451 -0
- package/themes/swiss.css +455 -0
- package/themes/terminal.css +466 -0
- package/themes/trait-wars.css +487 -0
- package/themes/ukiyo-e.css +459 -0
- package/themes/vaporwave.css +455 -0
- package/themes/victorian.css +453 -0
- package/themes/wabi-sabi.css +459 -0
- package/themes/win95.css +455 -0
- package/themes/wireframe.css +439 -0
- package/themes/zine.css +455 -0
- package/README.md +0 -3
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
import { A11yProps, Asset, AssetUrl, ScenePos } from '@almadar/core';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { LucideIcon } from 'lucide-react';
|
|
4
|
+
|
|
5
|
+
type BadgeVariant = "default" | "primary" | "secondary" | "success" | "warning" | "danger" | "error" | "info" | "neutral";
|
|
6
|
+
type BadgeSize = "sm" | "md" | "lg";
|
|
7
|
+
interface BadgeProps extends Omit<React__default.HTMLAttributes<HTMLSpanElement>, keyof A11yProps>, A11yProps {
|
|
8
|
+
/** Additional CSS classes applied to the root element. */
|
|
9
|
+
className?: string;
|
|
10
|
+
variant?: BadgeVariant;
|
|
11
|
+
size?: BadgeSize;
|
|
12
|
+
/** Numeric count or amount to display in badge */
|
|
13
|
+
amount?: number;
|
|
14
|
+
/** Badge label text (alternative to children for schema-driven rendering).
|
|
15
|
+
* Numeric values are auto-coerced to string for rendering — common case
|
|
16
|
+
* is unread counts, error counts, status codes, etc. */
|
|
17
|
+
label?: string | number;
|
|
18
|
+
/** Lucide icon component or canonical kebab-case icon name string */
|
|
19
|
+
icon?: IconInput;
|
|
20
|
+
/** Asset image rendered as the badge icon; takes precedence over icon when provided. */
|
|
21
|
+
iconAsset?: Asset;
|
|
22
|
+
/** When set, renders a small X button on the right of the badge that
|
|
23
|
+
* invokes this handler — turns the badge into a removable chip.
|
|
24
|
+
* Used by the TagInput molecule and other "list of removable values"
|
|
25
|
+
* surfaces.
|
|
26
|
+
* @offByDefault */
|
|
27
|
+
onRemove?: () => void;
|
|
28
|
+
/** Accessible label for the remove button. Defaults to "Remove". */
|
|
29
|
+
removeLabel?: string;
|
|
30
|
+
}
|
|
31
|
+
declare const Badge: React__default.ForwardRefExoticComponent<BadgeProps & React__default.RefAttributes<HTMLSpanElement>>;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Cross-cutting atom-level prop shapes shared across the design system.
|
|
35
|
+
*/
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Canonical semantic color palette. Values are the Tailwind / CSS-var token
|
|
39
|
+
* names that every component in the design system understands. Prefer this
|
|
40
|
+
* over a bare `string` for any `color` or `variant` prop.
|
|
41
|
+
*/
|
|
42
|
+
type ColorToken = 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'muted';
|
|
43
|
+
/**
|
|
44
|
+
* Concrete error-state shape read by display components (`error.message`,
|
|
45
|
+
* occasionally `error.stack`). Structurally assignable from the global `Error`,
|
|
46
|
+
* so existing call sites passing an `Error` keep working — this just gives the
|
|
47
|
+
* pattern extractor a readable field schema instead of the opaque `Error` global.
|
|
48
|
+
*/
|
|
49
|
+
type UiError = {
|
|
50
|
+
message: string;
|
|
51
|
+
name?: string;
|
|
52
|
+
code?: string;
|
|
53
|
+
stack?: string;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* A labelled link/CTA used by marketing molecules (HeroSection, CTABanner,
|
|
57
|
+
* PricingCard) for their primary/secondary call-to-action props.
|
|
58
|
+
*/
|
|
59
|
+
type LinkAction = {
|
|
60
|
+
label: string;
|
|
61
|
+
href: string;
|
|
62
|
+
};
|
|
63
|
+
/** An image with its required alt text. */
|
|
64
|
+
type ImageSource = {
|
|
65
|
+
src: AssetUrl;
|
|
66
|
+
alt: string;
|
|
67
|
+
};
|
|
68
|
+
/** A 2D point in canvas/layout coordinates. */
|
|
69
|
+
type Point = {
|
|
70
|
+
x: number;
|
|
71
|
+
y: number;
|
|
72
|
+
};
|
|
73
|
+
/** A 2D rectangle in canvas coordinates (`w`/`h` = width/height). */
|
|
74
|
+
type Rect = {
|
|
75
|
+
x: number;
|
|
76
|
+
y: number;
|
|
77
|
+
w: number;
|
|
78
|
+
h: number;
|
|
79
|
+
};
|
|
80
|
+
/** A badge colour a field's `colorMap` may name (`destructive` is the shadcn alias of `danger`). */
|
|
81
|
+
type BadgeColor = BadgeVariant | 'destructive';
|
|
82
|
+
/** How a display field renders: `h3`/`h4` is the record's title, `badge` a
|
|
83
|
+
* status pill, `progress` a progress bar, `body` a prose block. */
|
|
84
|
+
type DisplayFieldVariant = 'h3' | 'h4' | 'overline' | 'avatar' | 'body' | 'caption' | 'badge' | 'small' | 'progress';
|
|
85
|
+
/** How a display field's value is formatted. */
|
|
86
|
+
type DisplayFieldFormat = 'date' | 'time' | 'datetime' | 'currency' | 'number' | 'boolean' | 'percent';
|
|
87
|
+
/**
|
|
88
|
+
* One field of a record shown by a data display (DataGrid, DataList, List,
|
|
89
|
+
* CardGrid, DetailPanel, Timeline). Every slot a field fills — title, badge,
|
|
90
|
+
* progress, date — is declared here; nothing is inferred from its name or value.
|
|
91
|
+
*/
|
|
92
|
+
interface DisplayField {
|
|
93
|
+
/** Entity field name (dot-notation supported) */
|
|
94
|
+
name: string;
|
|
95
|
+
/** Display label (the `name` as written if omitted) */
|
|
96
|
+
label?: string;
|
|
97
|
+
/** Icon shown beside the field */
|
|
98
|
+
icon?: IconInput;
|
|
99
|
+
/** Rendering variant */
|
|
100
|
+
variant?: DisplayFieldVariant;
|
|
101
|
+
/** Value format */
|
|
102
|
+
format?: DisplayFieldFormat;
|
|
103
|
+
/** Badge colour per exact value (for `variant: 'badge'`); unmapped values are neutral */
|
|
104
|
+
colorMap?: Readonly<Record<string, BadgeColor>>;
|
|
105
|
+
/** Display text per exact value (e.g. `in_progress` → "In progress"); unmapped values show as stored */
|
|
106
|
+
labels?: Readonly<Record<string, string>>;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Icon Atom Component
|
|
111
|
+
*
|
|
112
|
+
* Renders an icon from the active icon family (Layer 1 Iconography axis —
|
|
113
|
+
* see lib/iconFamily.ts). Canonical names are lucide kebab-case; the resolver
|
|
114
|
+
* dispatches to phosphor / tabler / fa-solid when `--icon-family` selects them,
|
|
115
|
+
* re-rendering automatically on theme switch.
|
|
116
|
+
*
|
|
117
|
+
* Supports two APIs:
|
|
118
|
+
* - `icon` prop: Pass a LucideIcon component directly (bypasses family resolver
|
|
119
|
+
* — used for direct lucide component refs, stays in lucide regardless of theme)
|
|
120
|
+
* - `name` prop: Pass a canonical kebab-case name (family-aware, swaps on theme)
|
|
121
|
+
*/
|
|
122
|
+
|
|
123
|
+
type IconSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
124
|
+
type IconAnimation = 'spin' | 'pulse' | 'none';
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Canonical icon-input type: a Lucide component reference OR a canonical
|
|
128
|
+
* kebab-case icon name string. The single source of truth for every
|
|
129
|
+
* icon-bearing prop across `@almadar/ui` — pattern-sync's parser maps this
|
|
130
|
+
* union to the `icon` config type, so the factory inspector renders an
|
|
131
|
+
* IconPicker and a string name resolves via `resolveIcon`. Never declare an
|
|
132
|
+
* icon prop as `React.ReactNode` (it collapses to a non-editable `node`).
|
|
133
|
+
*/
|
|
134
|
+
type IconInput = LucideIcon | string;
|
|
135
|
+
/**
|
|
136
|
+
* Resolve an icon name to a Lucide icon component.
|
|
137
|
+
* Supports all 1500+ Lucide icons by kebab-case or PascalCase name; each icon loads on demand.
|
|
138
|
+
* Falls back to the help glyph if not found.
|
|
139
|
+
*/
|
|
140
|
+
declare function resolveIcon(name: string): LucideIcon;
|
|
141
|
+
interface IconProps extends A11yProps {
|
|
142
|
+
/**
|
|
143
|
+
* Lucide icon component (preferred for type-safe usage), OR a canonical
|
|
144
|
+
* kebab-case icon name string — a string is treated exactly like `name` so
|
|
145
|
+
* trait/factory authors can pass an icon by name through the `icon` prop.
|
|
146
|
+
*/
|
|
147
|
+
icon?: IconInput;
|
|
148
|
+
/** Icon name as string (resolved from iconMap) */
|
|
149
|
+
name?: string;
|
|
150
|
+
/** Size of the icon */
|
|
151
|
+
size?: IconSize;
|
|
152
|
+
/** Semantic palette token or an arbitrary Tailwind color class. */
|
|
153
|
+
color?: ColorToken | string;
|
|
154
|
+
/** Animation type */
|
|
155
|
+
animation?: IconAnimation;
|
|
156
|
+
/** Additional CSS classes */
|
|
157
|
+
className?: string;
|
|
158
|
+
/** Icon stroke width - uses theme default if not specified */
|
|
159
|
+
strokeWidth?: number;
|
|
160
|
+
/** Inline style */
|
|
161
|
+
style?: React__default.CSSProperties;
|
|
162
|
+
}
|
|
163
|
+
declare const Icon: React__default.FC<IconProps>;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* fx — the shared transient-effect contract (type-only module + pure helpers).
|
|
167
|
+
*
|
|
168
|
+
* One `FxItem` descriptor feeds BOTH render substrates: `draw-fx-layer` (game
|
|
169
|
+
* molecules — world-space, painted on the canvas) and `fx-overlay` (core
|
|
170
|
+
* molecules — screen-space, DOM/CSS). The substrate is NAME-BLIND: an item's
|
|
171
|
+
* look comes entirely from its resolved typed fields (color/size/shape/…),
|
|
172
|
+
* never from a kind→look table inside a component. The effect-kind vocabulary
|
|
173
|
+
* (`hit`, `explosion`, `correct-burst`, …) is declared by the CONSUMER — a
|
|
174
|
+
* board, lab, or themed organism — as an `FxPreset[]` table in its own `.lolo`
|
|
175
|
+
* config; `resolveFxView` merges the matching row under the item's own fields.
|
|
176
|
+
*
|
|
177
|
+
* Lifetime is owned by the fx mechanic (`std-fx-particles`): `ttl` decays every
|
|
178
|
+
* `tickMs` and removal is authoritative. Renderers derive smooth per-frame
|
|
179
|
+
* progress from `bornAt` (epoch ms, stamped at spawn) against the paint clock,
|
|
180
|
+
* falling back to the stepped `1 − ttl/maxTtl` fraction when `bornAt` is absent
|
|
181
|
+
* or no clock is running. Sub-particle scatter is seeded from the item `id` —
|
|
182
|
+
* deterministic, no `Math.random` at paint time.
|
|
183
|
+
*/
|
|
184
|
+
|
|
185
|
+
/** Which render substrate an fx entry belongs to. */
|
|
186
|
+
type FxSpace = 'world' | 'screen';
|
|
187
|
+
/** The screen-space render kinds `fx-overlay` can play — component capability, not domain vocabulary. */
|
|
188
|
+
type FxOverlayKind = 'confetti' | 'flash' | 'shake' | 'sparkle' | 'float-text' | 'streak-glow';
|
|
189
|
+
/** The procedural world-space recipes `draw-fx-layer` can paint — component capability, not domain vocabulary. */
|
|
190
|
+
type FxProceduralShape = 'spark' | 'ring' | 'puff' | 'streak';
|
|
191
|
+
/**
|
|
192
|
+
* One live transient effect — a row of the fx mechanic's `fx` entity list.
|
|
193
|
+
* Only `id`/`type`/`x`/`ttl` are guaranteed; everything else is optional so the
|
|
194
|
+
* 13 pre-existing producer emit sites keep compiling unchanged.
|
|
195
|
+
*/
|
|
196
|
+
interface FxItem {
|
|
197
|
+
/** Stable identity — the render key and the deterministic scatter seed. */
|
|
198
|
+
id: string;
|
|
199
|
+
/** Effect-kind key into the consumer-declared `FxPreset[]` table. */
|
|
200
|
+
type: string;
|
|
201
|
+
/** Canonical scene position; when absent the renderer derives it from `x`/`z`/`y`. */
|
|
202
|
+
position?: ScenePos;
|
|
203
|
+
/** Scene x in world units. */
|
|
204
|
+
x: number;
|
|
205
|
+
/** Ground-plane row in world units (2D boards paint it as screen y). */
|
|
206
|
+
z?: number;
|
|
207
|
+
/** Vertical axis in world units (3D height; 2D fallback row). */
|
|
208
|
+
y?: number;
|
|
209
|
+
/** Floating text painted with the effect (damage numbers, "+1", …). */
|
|
210
|
+
message?: string;
|
|
211
|
+
/** Remaining lifetime in mechanic ticks — the authoritative removal clock. */
|
|
212
|
+
ttl: number;
|
|
213
|
+
/** Spawn-time ttl (stamped by the mechanic when absent); grounds the fade fraction. */
|
|
214
|
+
maxTtl?: number;
|
|
215
|
+
/** Spawn timestamp in epoch ms (stamped by the mechanic) — enables smooth paint-clock progress. */
|
|
216
|
+
bornAt?: number;
|
|
217
|
+
/** Render substrate routing; default `world`. */
|
|
218
|
+
space?: FxSpace;
|
|
219
|
+
/** Screen-space render kind (`fx-overlay` vocabulary); ignored by the world layer. */
|
|
220
|
+
effect?: FxOverlayKind;
|
|
221
|
+
/** Primary color; renderer defaults apply when absent. */
|
|
222
|
+
color?: string;
|
|
223
|
+
/** Size in world units (canvas) / relative scale (overlay). */
|
|
224
|
+
size?: number;
|
|
225
|
+
/** Drift velocity along scene x, world-units/sec (render hint — the mechanic never integrates). */
|
|
226
|
+
vx?: number;
|
|
227
|
+
/** Drift velocity along the vertical axis, world-units/sec. */
|
|
228
|
+
vy?: number;
|
|
229
|
+
/** Drift velocity along the ground-plane row, world-units/sec. */
|
|
230
|
+
vz?: number;
|
|
231
|
+
/** Sub-particle count override (procedural burst / confetti). */
|
|
232
|
+
particleCount?: number;
|
|
233
|
+
/** Sprite-sheet animation name (e.g. "burst") — used when the resolved look is a sprite atlas. */
|
|
234
|
+
animation?: string;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* One row of a consumer-declared effect vocabulary: the look + recipe for one
|
|
238
|
+
* fx `type`. Item fields always win over the preset row (`resolveFxView`).
|
|
239
|
+
*/
|
|
240
|
+
interface FxPreset {
|
|
241
|
+
/** The effect-kind key this row styles. */
|
|
242
|
+
type: string;
|
|
243
|
+
/** Primary color. */
|
|
244
|
+
color?: string;
|
|
245
|
+
/** Secondary color (ring stroke / puff core accents). */
|
|
246
|
+
color2?: string;
|
|
247
|
+
/** Size in world units (canvas) / relative scale (overlay). */
|
|
248
|
+
size?: number;
|
|
249
|
+
/** Procedural recipe when no vector art or sprite matches. Default `spark`. */
|
|
250
|
+
shape?: FxProceduralShape;
|
|
251
|
+
/** Sub-particle count for the procedural recipe. */
|
|
252
|
+
count?: number;
|
|
253
|
+
/** Glow strength — soft shadow blur in world units around procedural particles. */
|
|
254
|
+
glow?: number;
|
|
255
|
+
/** Downward acceleration in world-units/sec² applied to the drift. */
|
|
256
|
+
gravity?: number;
|
|
257
|
+
/** Default drift velocities, world-units/sec. */
|
|
258
|
+
vx?: number;
|
|
259
|
+
vy?: number;
|
|
260
|
+
vz?: number;
|
|
261
|
+
/** Render substrate routing for this kind. */
|
|
262
|
+
space?: FxSpace;
|
|
263
|
+
/** Screen-space render kind for this kind. */
|
|
264
|
+
effect?: FxOverlayKind;
|
|
265
|
+
/** Sub-particle count for screen-space kinds (confetti/sparkle). */
|
|
266
|
+
particleCount?: number;
|
|
267
|
+
/** Sprite-sheet animation name to play when this preset resolves to a sprite atlas. */
|
|
268
|
+
animation?: string;
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* A screen-space fx entry as `fx-overlay` consumes it — the same mechanic rows,
|
|
272
|
+
* filtered to `space == "screen"`. Deliberately carries NO `ScenePos`: overlay
|
|
273
|
+
* coordinates are viewport fractions, and the absence of a core `ScenePos` is
|
|
274
|
+
* what keeps `fx-overlay` out of the canvas-drawable capability.
|
|
275
|
+
*/
|
|
276
|
+
interface FxOverlayItem {
|
|
277
|
+
/** Stable identity — the mount key that starts the CSS animation, and the scatter seed. */
|
|
278
|
+
id: string;
|
|
279
|
+
/** Effect-kind key (consumer vocabulary); display comes from `effect` + style fields. */
|
|
280
|
+
type: string;
|
|
281
|
+
/** Overlay render kind; default `sparkle`. */
|
|
282
|
+
effect?: FxOverlayKind;
|
|
283
|
+
/** Floating text (`float-text`). */
|
|
284
|
+
message?: string;
|
|
285
|
+
/** Primary color. */
|
|
286
|
+
color?: string;
|
|
287
|
+
/** Relative scale multiplier. */
|
|
288
|
+
size?: number;
|
|
289
|
+
/** Horizontal viewport fraction 0..1; default 0.5. */
|
|
290
|
+
x?: number;
|
|
291
|
+
/** Vertical viewport fraction 0..1 (`z` wins, then `y`); default 0.4. */
|
|
292
|
+
z?: number;
|
|
293
|
+
y?: number;
|
|
294
|
+
/** Remaining lifetime in mechanic ticks — removal unmounts the node. */
|
|
295
|
+
ttl: number;
|
|
296
|
+
/** Spawn-time ttl; animation duration = maxTtl × tickMs. */
|
|
297
|
+
maxTtl?: number;
|
|
298
|
+
/** Spawn timestamp in epoch ms. */
|
|
299
|
+
bornAt?: number;
|
|
300
|
+
/** Render substrate routing; `world` entries are skipped defensively. */
|
|
301
|
+
space?: FxSpace;
|
|
302
|
+
/** Particle count for confetti/sparkle. */
|
|
303
|
+
particleCount?: number;
|
|
304
|
+
/** Drift velocities (unused by the DOM overlay; present so mechanic rows pass through untouched). */
|
|
305
|
+
vx?: number;
|
|
306
|
+
vy?: number;
|
|
307
|
+
vz?: number;
|
|
308
|
+
}
|
|
309
|
+
/** An `FxItem` with its preset row merged in — what the expanders consume. */
|
|
310
|
+
interface FxView extends FxItem {
|
|
311
|
+
/** Procedural recipe (preset-only field). */
|
|
312
|
+
shape?: FxProceduralShape;
|
|
313
|
+
/** Sub-particle count (preset-only field). */
|
|
314
|
+
count?: number;
|
|
315
|
+
/** Glow strength (preset-only field). */
|
|
316
|
+
glow?: number;
|
|
317
|
+
/** Downward acceleration (preset-only field). */
|
|
318
|
+
gravity?: number;
|
|
319
|
+
/** Secondary color (preset-only field). */
|
|
320
|
+
color2?: string;
|
|
321
|
+
}
|
|
322
|
+
/** Merge the matching preset row UNDER the item's own fields (item wins). Unknown `type` → the item as-is. */
|
|
323
|
+
declare function resolveFxView(item: FxItem, presets?: FxPreset[]): FxView;
|
|
324
|
+
/** The derived lifetime view of one fx entry at one instant. */
|
|
325
|
+
interface FxLifecycle {
|
|
326
|
+
/** Total lifetime in ms (`maxTtl × tickMs`). */
|
|
327
|
+
lifeMs: number;
|
|
328
|
+
/** Elapsed ms since spawn (smooth via `bornAt`, else stepped from ttl). */
|
|
329
|
+
ageMs: number;
|
|
330
|
+
/** 0..1 elapsed fraction, clamped. */
|
|
331
|
+
progress: number;
|
|
332
|
+
/** 1..0 remaining fraction — the fade envelope. */
|
|
333
|
+
fade: number;
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* Derive per-frame progress. `epochNowMs > 0` + `bornAt` → smooth wall-clock
|
|
337
|
+
* age; otherwise the stepped `1 − ttl/maxTtl` fraction (correct at every
|
|
338
|
+
* mechanic tick, coarse between them).
|
|
339
|
+
*/
|
|
340
|
+
declare function fxLifecycle(item: {
|
|
341
|
+
ttl: number;
|
|
342
|
+
maxTtl?: number;
|
|
343
|
+
bornAt?: number;
|
|
344
|
+
}, epochNowMs: number, tickMs: number): FxLifecycle;
|
|
345
|
+
/** Deterministic 0..1 hash of `seed` + `salt` — the scatter randomness (FNV-1a + avalanche; no `Math.random`). */
|
|
346
|
+
declare function fxHash01(seed: string, salt: number): number;
|
|
347
|
+
/** One confetti particle's CSS-animation parameters. */
|
|
348
|
+
interface ConfettiParticle {
|
|
349
|
+
id: number;
|
|
350
|
+
color: string;
|
|
351
|
+
/** Origin as % of container width. */
|
|
352
|
+
left: number;
|
|
353
|
+
/** Animation delay ms. */
|
|
354
|
+
delay: number;
|
|
355
|
+
/** Launch angle in degrees. */
|
|
356
|
+
angle: number;
|
|
357
|
+
/** Travel distance in px. */
|
|
358
|
+
distance: number;
|
|
359
|
+
/** Total rotation in degrees. */
|
|
360
|
+
rotation: number;
|
|
361
|
+
/** Particle size in px. */
|
|
362
|
+
size: number;
|
|
363
|
+
}
|
|
364
|
+
declare const CONFETTI_COLORS: string[];
|
|
365
|
+
/** Build a deterministic burst — same `seed` → same particles. */
|
|
366
|
+
declare function createConfettiParticles(count: number, seed: string): ConfettiParticle[];
|
|
367
|
+
/** The confetti burst keyframes (per-particle travel via CSS custom props). */
|
|
368
|
+
declare const CONFETTI_BURST_KEYFRAMES = "\n@keyframes confetti-burst {\n 0% {\n opacity: 1;\n transform: translate(0, 0) rotate(0deg) scale(1);\n }\n 70% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n transform: translate(var(--confetti-tx), var(--confetti-ty)) rotate(var(--confetti-rotate)) scale(0.5);\n }\n}\n";
|
|
369
|
+
|
|
370
|
+
export { Badge as B, CONFETTI_BURST_KEYFRAMES as C, CONFETTI_COLORS as f, Icon as q, createConfettiParticles as v, fxHash01 as w, fxLifecycle as x, resolveFxView as y, resolveIcon as z };
|
|
371
|
+
export type { DisplayField as D, FxItem as F, IconInput as I, LinkAction as L, Point as P, Rect as R, UiError as U, FxPreset as a, BadgeColor as b, BadgeProps as c, BadgeSize as d, BadgeVariant as e, ColorToken as g, ConfettiParticle as h, DisplayFieldFormat as i, DisplayFieldVariant as j, FxLifecycle as k, FxOverlayItem as l, FxOverlayKind as m, FxProceduralShape as n, FxSpace as o, FxView as p, IconAnimation as r, IconProps as s, IconSize as t, ImageSource as u };
|