@almadar/ui 5.17.0 → 5.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/avl/index.cjs +219 -171
  2. package/dist/avl/index.js +219 -171
  3. package/dist/components/atoms/Avatar.d.ts +4 -2
  4. package/dist/components/atoms/ConditionalWrapper.d.ts +2 -2
  5. package/dist/components/atoms/Icon.d.ts +6 -2
  6. package/dist/components/atoms/Input.d.ts +3 -2
  7. package/dist/components/atoms/LawReferenceTooltip.d.ts +2 -2
  8. package/dist/components/atoms/types.d.ts +10 -10
  9. package/dist/components/index.cjs +188 -156
  10. package/dist/components/index.js +188 -156
  11. package/dist/components/molecules/OptionConstraintGroup.d.ts +5 -3
  12. package/dist/components/molecules/ViolationAlert.d.ts +2 -2
  13. package/dist/components/molecules/game/CraftingRecipe.d.ts +4 -4
  14. package/dist/components/molecules/game/DialogueBox.d.ts +2 -2
  15. package/dist/components/organisms/ComponentPatterns.d.ts +2 -1
  16. package/dist/components/organisms/CustomPattern.d.ts +2 -1
  17. package/dist/components/organisms/DataTable.d.ts +1 -1
  18. package/dist/components/organisms/Form.d.ts +3 -3
  19. package/dist/components/organisms/LayoutPatterns.d.ts +4 -3
  20. package/dist/components/organisms/StateMachineView.d.ts +6 -3
  21. package/dist/components/organisms/book/types.d.ts +2 -2
  22. package/dist/components/organisms/game/CastleBoard.d.ts +4 -3
  23. package/dist/components/organisms/game/TraitStateViewer.d.ts +4 -4
  24. package/dist/components/organisms/game/UncontrolledBattleBoard.d.ts +9 -4
  25. package/dist/components/organisms/game/WorldMapBoard.d.ts +5 -4
  26. package/dist/components/organisms/game/puzzles/builder/BuilderBoard.d.ts +3 -3
  27. package/dist/components/organisms/game/puzzles/classifier/ClassifierBoard.d.ts +3 -3
  28. package/dist/components/organisms/game/puzzles/debugger/DebuggerBoard.d.ts +3 -3
  29. package/dist/components/organisms/game/puzzles/event-handler/EventHandlerBoard.d.ts +7 -4
  30. package/dist/components/organisms/game/puzzles/event-handler/ObjectRulePanel.d.ts +2 -2
  31. package/dist/components/organisms/game/puzzles/negotiator/NegotiatorBoard.d.ts +3 -3
  32. package/dist/components/organisms/game/puzzles/sequencer/SequencerBoard.d.ts +5 -4
  33. package/dist/components/organisms/game/puzzles/simulator/SimulatorBoard.d.ts +3 -3
  34. package/dist/components/organisms/game/puzzles/state-architect/StateArchitectBoard.d.ts +5 -4
  35. package/dist/components/templates/GenericAppTemplate.d.ts +1 -7
  36. package/dist/components/templates/types.d.ts +14 -6
  37. package/dist/docs/index.cjs +60 -22
  38. package/dist/docs/index.d.cts +9 -4
  39. package/dist/docs/index.js +58 -20
  40. package/dist/marketing/index.cjs +61 -23
  41. package/dist/marketing/index.d.cts +10 -6
  42. package/dist/marketing/index.js +58 -20
  43. package/dist/providers/index.cjs +188 -156
  44. package/dist/providers/index.js +188 -156
  45. package/dist/runtime/fn-form-lambda.d.ts +1 -1
  46. package/dist/runtime/index.cjs +219 -171
  47. package/dist/runtime/index.js +219 -171
  48. package/package.json +1 -1
@@ -27,9 +27,11 @@ export interface AvatarProps {
27
27
  */
28
28
  initials?: string;
29
29
  /**
30
- * Icon to display when no image or initials
30
+ * Icon to display when no image or initials. Accepts a Lucide component
31
+ * directly, or a canonical kebab-case icon name string (resolved via
32
+ * `resolveIcon`) so trait/factory authors can pass an icon by name.
31
33
  */
32
- icon?: LucideIcon;
34
+ icon?: LucideIcon | string;
33
35
  /**
34
36
  * Size of the avatar
35
37
  * @default 'md'
@@ -9,12 +9,12 @@ import { type SExpr } from '@almadar/evaluator';
9
9
  /**
10
10
  * Context for conditional evaluation
11
11
  */
12
- export interface ConditionalContext {
12
+ export type ConditionalContext = {
13
13
  formValues: Record<string, unknown>;
14
14
  globalVariables: Record<string, unknown>;
15
15
  localVariables?: Record<string, unknown>;
16
16
  entity?: Record<string, unknown>;
17
- }
17
+ };
18
18
  export interface ConditionalWrapperProps {
19
19
  /** The S-expression condition to evaluate */
20
20
  condition?: SExpr;
@@ -22,8 +22,12 @@ export type IconAnimation = 'spin' | 'pulse' | 'none';
22
22
  */
23
23
  export declare function resolveIcon(name: string): LucideIcon;
24
24
  export interface IconProps {
25
- /** Lucide icon component (preferred for type-safe usage) */
26
- icon?: LucideIcon;
25
+ /**
26
+ * Lucide icon component (preferred for type-safe usage), OR a canonical
27
+ * kebab-case icon name string — a string is treated exactly like `name` so
28
+ * trait/factory authors can pass an icon by name through the `icon` prop.
29
+ */
30
+ icon?: LucideIcon | string;
27
31
  /** Icon name as string (resolved from iconMap) */
28
32
  name?: string;
29
33
  /** Size of the icon */
@@ -21,8 +21,9 @@ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
21
21
  error?: string;
22
22
  leftIcon?: React.ReactNode;
23
23
  rightIcon?: React.ReactNode;
24
- /** Lucide icon component for left side (convenience prop) */
25
- icon?: LucideIcon;
24
+ /** Lucide icon component for left side (convenience prop), or a canonical
25
+ * kebab-case icon name string (resolved via `resolveIcon`). */
26
+ icon?: LucideIcon | string;
26
27
  /** Show clear button when input has value */
27
28
  clearable?: boolean;
28
29
  /** Callback when clear button is clicked */
@@ -8,7 +8,7 @@ import React from "react";
8
8
  /**
9
9
  * Law reference definition
10
10
  */
11
- export interface LawReference {
11
+ export type LawReference = {
12
12
  /** Law identifier (e.g., "VVO", "TPED") */
13
13
  law: string;
14
14
  /** Full name of the law */
@@ -19,7 +19,7 @@ export interface LawReference {
19
19
  clause?: string;
20
20
  /** Optional link to full law text */
21
21
  link?: string;
22
- }
22
+ };
23
23
  export interface LawReferenceTooltipProps {
24
24
  /** The law reference to display */
25
25
  reference: LawReference;
@@ -7,34 +7,34 @@
7
7
  * so existing call sites passing an `Error` keep working — this just gives the
8
8
  * pattern extractor a readable field schema instead of the opaque `Error` global.
9
9
  */
10
- export interface UiError {
10
+ export type UiError = {
11
11
  message: string;
12
12
  name?: string;
13
13
  code?: string;
14
14
  stack?: string;
15
- }
15
+ };
16
16
  /**
17
17
  * A labelled link/CTA used by marketing molecules (HeroSection, CTABanner,
18
18
  * PricingCard) for their primary/secondary call-to-action props.
19
19
  */
20
- export interface LinkAction {
20
+ export type LinkAction = {
21
21
  label: string;
22
22
  href: string;
23
- }
23
+ };
24
24
  /** An image with its required alt text. */
25
- export interface ImageSource {
25
+ export type ImageSource = {
26
26
  src: string;
27
27
  alt: string;
28
- }
28
+ };
29
29
  /** A 2D point in canvas/layout coordinates. */
30
- export interface Point {
30
+ export type Point = {
31
31
  x: number;
32
32
  y: number;
33
- }
33
+ };
34
34
  /** A 2D rectangle in canvas coordinates (`w`/`h` = width/height). */
35
- export interface Rect {
35
+ export type Rect = {
36
36
  x: number;
37
37
  y: number;
38
38
  w: number;
39
39
  h: number;
40
- }
40
+ };