@almadar/ui 5.70.0 → 5.71.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 (55) hide show
  1. package/dist/avl/index.cjs +1953 -1802
  2. package/dist/avl/index.d.cts +93 -56
  3. package/dist/avl/index.js +677 -526
  4. package/dist/components/avl/molecules/AvlEventWireEdge.d.ts +2 -1
  5. package/dist/components/avl/molecules/AvlTransitionEdge.d.ts +2 -1
  6. package/dist/components/avl/molecules/avl-behavior-compose-converter.d.ts +7 -5
  7. package/dist/components/avl/molecules/avl-behavior-compose-types.d.ts +41 -21
  8. package/dist/components/avl/molecules/avl-canvas-types.d.ts +10 -7
  9. package/dist/components/avl/molecules/avl-preview-converter.d.ts +5 -5
  10. package/dist/components/avl/molecules/avl-preview-types.d.ts +15 -4
  11. package/dist/components/avl/organisms/FlowCanvas.d.ts +2 -2
  12. package/dist/components/avl/organisms/avl-schema-parser.d.ts +18 -16
  13. package/dist/components/core/atoms/Button.d.ts +2 -0
  14. package/dist/components/core/atoms/ConditionalWrapper.d.ts +5 -4
  15. package/dist/components/core/molecules/Carousel.d.ts +2 -2
  16. package/dist/components/core/molecules/OrbitalVisualization.d.ts +4 -3
  17. package/dist/components/core/molecules/PageHeader.d.ts +3 -3
  18. package/dist/components/core/molecules/RepeatableFormSection.d.ts +4 -3
  19. package/dist/components/core/molecules/ViolationAlert.d.ts +2 -0
  20. package/dist/components/core/molecules/WizardContainer.d.ts +23 -22
  21. package/dist/components/core/organisms/CardGrid.d.ts +2 -2
  22. package/dist/components/core/organisms/CustomPattern.d.ts +3 -4
  23. package/dist/components/core/organisms/DataTable.d.ts +2 -2
  24. package/dist/components/core/organisms/DetailPanel.d.ts +1 -1
  25. package/dist/components/core/organisms/Form.d.ts +11 -11
  26. package/dist/components/core/organisms/List.d.ts +3 -5
  27. package/dist/components/core/organisms/StatCard.d.ts +2 -2
  28. package/dist/components/core/organisms/book/types.d.ts +1 -1
  29. package/dist/components/core/organisms/debug/RuntimeDebugger.d.ts +2 -1
  30. package/dist/components/core/organisms/debug/tabs/EventDispatcherTab.d.ts +2 -1
  31. package/dist/components/core/organisms/layout/DashboardGrid.d.ts +0 -2
  32. package/dist/components/core/organisms/types.d.ts +3 -2
  33. package/dist/components/game/atoms/ScoreDisplay.d.ts +3 -1
  34. package/dist/components/game/molecules/three/hooks/useSceneGraph.d.ts +2 -1
  35. package/dist/components/game/molecules/three/index.cjs +37 -24
  36. package/dist/components/game/molecules/three/index.js +37 -24
  37. package/dist/components/game/organisms/PinballBoard.d.ts +4 -4
  38. package/dist/components/game/organisms/boardEntity.d.ts +6 -6
  39. package/dist/components/game/organisms/puzzles/debugger/DebuggerBoard.d.ts +16 -2
  40. package/dist/components/game/organisms/puzzles/event-handler/puzzleObject.d.ts +21 -10
  41. package/dist/components/game/organisms/puzzles/state-architect/StateJsonView.d.ts +2 -1
  42. package/dist/components/index.cjs +1690 -1562
  43. package/dist/components/index.js +569 -441
  44. package/dist/docs/index.cjs +107 -104
  45. package/dist/docs/index.d.cts +2 -0
  46. package/dist/docs/index.js +38 -35
  47. package/dist/lib/getNestedValue.d.ts +2 -13
  48. package/dist/marketing/index.cjs +97 -98
  49. package/dist/marketing/index.d.cts +2 -0
  50. package/dist/marketing/index.js +54 -55
  51. package/dist/providers/index.cjs +1663 -1535
  52. package/dist/providers/index.js +554 -426
  53. package/dist/runtime/index.cjs +1721 -1593
  54. package/dist/runtime/index.js +560 -432
  55. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import React8, { useCallback, useState, useRef, useMemo, useEffect, useLayoutEffect, useContext, useSyncExternalStore, createContext } from 'react';
1
+ import React10, { useCallback, useState, useRef, useMemo, useEffect, useLayoutEffect, useContext, useSyncExternalStore, createContext } from 'react';
2
2
  import { createLogger } from '@almadar/logger';
3
3
  import { jsx, jsxs } from 'react/jsx-runtime';
4
4
  import * as LucideIcons2 from 'lucide-react';
@@ -2816,7 +2816,7 @@ var init_Box = __esm({
2816
2816
  fixed: "fixed",
2817
2817
  sticky: "sticky"
2818
2818
  };
2819
- Box = React8.forwardRef(
2819
+ Box = React10.forwardRef(
2820
2820
  ({
2821
2821
  padding,
2822
2822
  paddingX,
@@ -2881,7 +2881,7 @@ var init_Box = __esm({
2881
2881
  onPointerDown?.(e);
2882
2882
  }, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
2883
2883
  const isClickable = action || onClick;
2884
- return React8.createElement(
2884
+ return React10.createElement(
2885
2885
  Component,
2886
2886
  {
2887
2887
  ref,
@@ -2977,9 +2977,8 @@ var init_Stack = __esm({
2977
2977
  };
2978
2978
  const isHorizontal = direction === "horizontal";
2979
2979
  const directionClass = responsive && isHorizontal ? reverse ? "flex-col-reverse md:flex-row-reverse" : "flex-col md:flex-row" : isHorizontal ? reverse ? "flex-row-reverse" : "flex-row" : reverse ? "flex-col-reverse" : "flex-col";
2980
- const Comp = Component;
2981
- return /* @__PURE__ */ jsx(
2982
- Comp,
2980
+ return React10.createElement(
2981
+ Component,
2983
2982
  {
2984
2983
  className: cn(
2985
2984
  "flex",
@@ -2995,9 +2994,9 @@ var init_Stack = __esm({
2995
2994
  onClick: action || onClick ? handleClick : void 0,
2996
2995
  onKeyDown,
2997
2996
  role,
2998
- tabIndex,
2999
- children
3000
- }
2997
+ tabIndex
2998
+ },
2999
+ children
3001
3000
  );
3002
3001
  };
3003
3002
  VStack = (props) => /* @__PURE__ */ jsx(Stack, { direction: "vertical", ...props });
@@ -3094,9 +3093,8 @@ var init_Typography = __esm({
3094
3093
  }) => {
3095
3094
  const variant = variantProp ?? (level ? `h${level}` : "body1");
3096
3095
  const Component = as || defaultElements[variant];
3097
- const Comp = Component;
3098
- return /* @__PURE__ */ jsx(
3099
- Comp,
3096
+ return React10.createElement(
3097
+ Component,
3100
3098
  {
3101
3099
  id,
3102
3100
  className: cn(
@@ -3109,9 +3107,9 @@ var init_Typography = __esm({
3109
3107
  overflow && overflowStyles2[overflow],
3110
3108
  className
3111
3109
  ),
3112
- style,
3113
- children: children ?? content
3114
- }
3110
+ style
3111
+ },
3112
+ children ?? content
3115
3113
  );
3116
3114
  };
3117
3115
  Typography.displayName = "Typography";
@@ -3176,7 +3174,7 @@ function loadLib(key, importer) {
3176
3174
  return p;
3177
3175
  }
3178
3176
  function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
3179
- const Lazy = React8.lazy(async () => {
3177
+ const Lazy = React10.lazy(async () => {
3180
3178
  const lib = await loadLib(libKey, importer);
3181
3179
  const Comp = pick(lib);
3182
3180
  if (!Comp) {
@@ -3186,7 +3184,7 @@ function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
3186
3184
  return { default: Comp };
3187
3185
  });
3188
3186
  const Wrapped = (props) => /* @__PURE__ */ jsx(
3189
- React8.Suspense,
3187
+ React10.Suspense,
3190
3188
  {
3191
3189
  fallback: /* @__PURE__ */ jsx(
3192
3190
  "span",
@@ -3854,9 +3852,10 @@ function resolveIcon(name) {
3854
3852
  function doResolve(name) {
3855
3853
  if (iconAliases[name]) return iconAliases[name];
3856
3854
  const pascalName = kebabToPascal2(name);
3857
- const directLookup = LucideIcons2[pascalName];
3855
+ const lucideMap = LucideIcons2;
3856
+ const directLookup = lucideMap[pascalName];
3858
3857
  if (directLookup && typeof directLookup === "object") return directLookup;
3859
- const asIs = LucideIcons2[name];
3858
+ const asIs = lucideMap[name];
3860
3859
  if (asIs && typeof asIs === "object") return asIs;
3861
3860
  return LucideIcons2.HelpCircle;
3862
3861
  }
@@ -3912,7 +3911,7 @@ var init_Icon = __esm({
3912
3911
  const directIcon = typeof icon === "string" ? void 0 : icon;
3913
3912
  const effectiveName = typeof icon === "string" ? icon : name;
3914
3913
  const family = useIconFamily();
3915
- const RenderedComponent = React8.useMemo(() => {
3914
+ const RenderedComponent = React10.useMemo(() => {
3916
3915
  if (directIcon) return null;
3917
3916
  return effectiveName ? resolveIconForFamily(effectiveName, family) : null;
3918
3917
  }, [directIcon, effectiveName, family]);
@@ -3962,6 +3961,9 @@ var init_Icon = __esm({
3962
3961
  Icon.displayName = "Icon";
3963
3962
  }
3964
3963
  });
3964
+ function isIconLike(v) {
3965
+ return typeof v.render === "function";
3966
+ }
3965
3967
  function resolveIconProp(value, sizeClass) {
3966
3968
  if (!value) return null;
3967
3969
  if (typeof value === "string") {
@@ -3971,10 +3973,10 @@ function resolveIconProp(value, sizeClass) {
3971
3973
  const IconComp = value;
3972
3974
  return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
3973
3975
  }
3974
- if (React8.isValidElement(value)) {
3976
+ if (React10.isValidElement(value)) {
3975
3977
  return value;
3976
3978
  }
3977
- if (typeof value === "object" && value !== null && "render" in value) {
3979
+ if (typeof value === "object" && value !== null && isIconLike(value)) {
3978
3980
  const IconComp = value;
3979
3981
  return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
3980
3982
  }
@@ -4047,7 +4049,7 @@ var init_Button = __esm({
4047
4049
  md: "h-icon-default w-icon-default",
4048
4050
  lg: "h-icon-default w-icon-default"
4049
4051
  };
4050
- Button = React8.forwardRef(
4052
+ Button = React10.forwardRef(
4051
4053
  ({
4052
4054
  className,
4053
4055
  variant = "primary",
@@ -4063,6 +4065,7 @@ var init_Button = __esm({
4063
4065
  label,
4064
4066
  children,
4065
4067
  onClick,
4068
+ "data-testid": dataTestId,
4066
4069
  ...props
4067
4070
  }, ref) => {
4068
4071
  const eventBus = useEventBus();
@@ -4095,7 +4098,7 @@ var init_Button = __esm({
4095
4098
  ),
4096
4099
  onClick: handleClick,
4097
4100
  ...props,
4098
- "data-testid": props["data-testid"] ?? (action ? `action-${action}` : void 0),
4101
+ "data-testid": dataTestId ?? (action ? `action-${action}` : void 0),
4099
4102
  children: [
4100
4103
  isLoading ? /* @__PURE__ */ jsx(Loader2, { className: "h-icon-default w-icon-default animate-spin" }) : resolvedLeftIcon && /* @__PURE__ */ jsx("span", { className: "flex-shrink-0", children: resolvedLeftIcon }),
4101
4104
  children || label,
@@ -4119,7 +4122,7 @@ var init_Spinner = __esm({
4119
4122
  md: "h-6 w-6",
4120
4123
  lg: "h-8 w-8"
4121
4124
  };
4122
- Spinner = React8.forwardRef(
4125
+ Spinner = React10.forwardRef(
4123
4126
  ({ className, size = "md", overlay, ...props }, ref) => {
4124
4127
  if (overlay) {
4125
4128
  return /* @__PURE__ */ jsx(
@@ -4209,7 +4212,7 @@ var init_Card = __esm({
4209
4212
  chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
4210
4213
  "tile-image-first": "p-0 overflow-hidden"
4211
4214
  };
4212
- Card = React8.forwardRef(
4215
+ Card = React10.forwardRef(
4213
4216
  ({
4214
4217
  className,
4215
4218
  variant = "bordered",
@@ -4257,9 +4260,9 @@ var init_Card = __esm({
4257
4260
  }
4258
4261
  );
4259
4262
  Card.displayName = "Card";
4260
- CardHeader = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
4263
+ CardHeader = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
4261
4264
  CardHeader.displayName = "CardHeader";
4262
- CardTitle = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4265
+ CardTitle = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4263
4266
  "h3",
4264
4267
  {
4265
4268
  ref,
@@ -4272,11 +4275,11 @@ var init_Card = __esm({
4272
4275
  }
4273
4276
  ));
4274
4277
  CardTitle.displayName = "CardTitle";
4275
- CardContent = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
4278
+ CardContent = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
4276
4279
  CardContent.displayName = "CardContent";
4277
4280
  CardBody = CardContent;
4278
4281
  CardBody.displayName = "CardBody";
4279
- CardFooter = React8.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4282
+ CardFooter = React10.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
4280
4283
  "div",
4281
4284
  {
4282
4285
  ref,
@@ -4979,7 +4982,7 @@ var init_Input = __esm({
4979
4982
  init_Icon();
4980
4983
  init_useTranslate();
4981
4984
  init_useEventBus();
4982
- Input = React8.forwardRef(
4985
+ Input = React10.forwardRef(
4983
4986
  ({
4984
4987
  className,
4985
4988
  inputType,
@@ -5328,7 +5331,7 @@ var init_DocBreadcrumb = __esm({
5328
5331
  "aria-label": t("aria.breadcrumb"),
5329
5332
  children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
5330
5333
  const isLast = idx === items.length - 1;
5331
- return /* @__PURE__ */ jsxs(React8.Fragment, { children: [
5334
+ return /* @__PURE__ */ jsxs(React10.Fragment, { children: [
5332
5335
  idx > 0 && /* @__PURE__ */ jsx(
5333
5336
  Icon,
5334
5337
  {
@@ -5386,7 +5389,7 @@ var init_Textarea = __esm({
5386
5389
  "components/core/atoms/Textarea.tsx"() {
5387
5390
  init_cn();
5388
5391
  init_useEventBus();
5389
- Textarea = React8.forwardRef(
5392
+ Textarea = React10.forwardRef(
5390
5393
  ({ className, error, onChange, ...props }, ref) => {
5391
5394
  const eventBus = useEventBus();
5392
5395
  const handleChange = (e) => {
@@ -5462,7 +5465,7 @@ var init_Badge = __esm({
5462
5465
  md: "px-2.5 py-1 text-sm",
5463
5466
  lg: "px-3 py-1.5 text-base"
5464
5467
  };
5465
- Badge = React8.forwardRef(
5468
+ Badge = React10.forwardRef(
5466
5469
  ({ className, variant = "default", size = "sm", amount, label, icon, children, onRemove, removeLabel, ...props }, ref) => {
5467
5470
  const iconSizes = {
5468
5471
  sm: "h-icon-default w-icon-default",
@@ -6055,7 +6058,7 @@ var init_CodeBlock = __esm({
6055
6058
  };
6056
6059
  LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
6057
6060
  HIDDEN_LINE_NUMBERS = { display: "none" };
6058
- CodeBlock = React8.memo(
6061
+ CodeBlock = React10.memo(
6059
6062
  ({
6060
6063
  code: rawCode,
6061
6064
  language = "text",
@@ -1,3 +1,4 @@
1
+ import type { FieldValue } from '@almadar/core';
1
2
  /**
2
3
  * Get Nested Value Utility
3
4
  *
@@ -6,19 +7,7 @@
6
7
  *
7
8
  * @packageDocumentation
8
9
  */
9
- /**
10
- * Get a nested value from an object using dot-notation path.
11
- *
12
- * @param obj - The object to traverse
13
- * @param path - Dot-notation path (e.g., "company.name", "address.city")
14
- * @returns The value at the path, or undefined if not found
15
- *
16
- * @example
17
- * const data = { company: { name: "Acme Corp", address: { city: "NYC" } } };
18
- * getNestedValue(data, "company.name"); // => "Acme Corp"
19
- * getNestedValue(data, "company.address.city"); // => "NYC"
20
- * getNestedValue(data, "company.missing"); // => undefined
21
- */
10
+ export declare function getNestedValue(obj: Record<string, FieldValue | undefined> | null | undefined, path: string): FieldValue | undefined;
22
11
  export declare function getNestedValue(obj: Record<string, unknown> | null | undefined, path: string): unknown;
23
12
  /**
24
13
  * Format a nested field path as a human-readable label.