@almadar/ui 3.7.2 → 3.8.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.
@@ -4992,9 +4992,6 @@ var init_Button = __esm({
4992
4992
  const resolvedRightIcon = resolveIconProp(rightIconValue, iconSizeStyles[size]);
4993
4993
  const handleClick = (e) => {
4994
4994
  if (action) {
4995
- if (typeof console !== "undefined") {
4996
- console.warn("[Button.click]", action, "actionPayload=", JSON.stringify(actionPayload));
4997
- }
4998
4995
  eventBus.emit(`UI:${action}`, actionPayload ?? {});
4999
4996
  }
5000
4997
  onClick?.(e);
@@ -46564,10 +46561,15 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
46564
46561
  if (!child || typeof child !== "object") return null;
46565
46562
  const childId = `${parentId}-${index}`;
46566
46563
  const childPath = parentPath === "root" ? `root.children.${index}` : `${parentPath}.children.${index}`;
46564
+ const { type: _childType, props: nestedProps, _id: _childNodeId, children: _childChildren, ...flatProps } = child;
46565
+ const resolvedProps = nestedProps !== void 0 ? nestedProps : flatProps;
46566
+ if (_childChildren !== void 0 && nestedProps === void 0) {
46567
+ resolvedProps.children = _childChildren;
46568
+ }
46567
46569
  const childContent = {
46568
46570
  id: childId,
46569
46571
  pattern: child.type,
46570
- props: child.props ?? {},
46572
+ props: resolvedProps,
46571
46573
  priority: 0,
46572
46574
  nodeId: child._id
46573
46575
  };
package/dist/avl/index.js CHANGED
@@ -4946,9 +4946,6 @@ var init_Button = __esm({
4946
4946
  const resolvedRightIcon = resolveIconProp(rightIconValue, iconSizeStyles[size]);
4947
4947
  const handleClick = (e) => {
4948
4948
  if (action) {
4949
- if (typeof console !== "undefined") {
4950
- console.warn("[Button.click]", action, "actionPayload=", JSON.stringify(actionPayload));
4951
- }
4952
4949
  eventBus.emit(`UI:${action}`, actionPayload ?? {});
4953
4950
  }
4954
4951
  onClick?.(e);
@@ -46518,10 +46515,15 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
46518
46515
  if (!child || typeof child !== "object") return null;
46519
46516
  const childId = `${parentId}-${index}`;
46520
46517
  const childPath = parentPath === "root" ? `root.children.${index}` : `${parentPath}.children.${index}`;
46518
+ const { type: _childType, props: nestedProps, _id: _childNodeId, children: _childChildren, ...flatProps } = child;
46519
+ const resolvedProps = nestedProps !== void 0 ? nestedProps : flatProps;
46520
+ if (_childChildren !== void 0 && nestedProps === void 0) {
46521
+ resolvedProps.children = _childChildren;
46522
+ }
46521
46523
  const childContent = {
46522
46524
  id: childId,
46523
46525
  pattern: child.type,
46524
- props: child.props ?? {},
46526
+ props: resolvedProps,
46525
46527
  priority: 0,
46526
46528
  nodeId: child._id
46527
46529
  };
@@ -484,9 +484,6 @@ var init_Button = __esm({
484
484
  const resolvedRightIcon = resolveIconProp(rightIconValue, iconSizeStyles[size]);
485
485
  const handleClick = (e) => {
486
486
  if (action) {
487
- if (typeof console !== "undefined") {
488
- console.warn("[Button.click]", action, "actionPayload=", JSON.stringify(actionPayload));
489
- }
490
487
  eventBus.emit(`UI:${action}`, actionPayload ?? {});
491
488
  }
492
489
  onClick?.(e);
@@ -37514,10 +37511,15 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
37514
37511
  if (!child || typeof child !== "object") return null;
37515
37512
  const childId = `${parentId}-${index}`;
37516
37513
  const childPath = parentPath === "root" ? `root.children.${index}` : `${parentPath}.children.${index}`;
37514
+ const { type: _childType, props: nestedProps, _id: _childNodeId, children: _childChildren, ...flatProps } = child;
37515
+ const resolvedProps = nestedProps !== void 0 ? nestedProps : flatProps;
37516
+ if (_childChildren !== void 0 && nestedProps === void 0) {
37517
+ resolvedProps.children = _childChildren;
37518
+ }
37517
37519
  const childContent = {
37518
37520
  id: childId,
37519
37521
  pattern: child.type,
37520
- props: child.props ?? {},
37522
+ props: resolvedProps,
37521
37523
  priority: 0,
37522
37524
  nodeId: child._id
37523
37525
  };
@@ -439,9 +439,6 @@ var init_Button = __esm({
439
439
  const resolvedRightIcon = resolveIconProp(rightIconValue, iconSizeStyles[size]);
440
440
  const handleClick = (e) => {
441
441
  if (action) {
442
- if (typeof console !== "undefined") {
443
- console.warn("[Button.click]", action, "actionPayload=", JSON.stringify(actionPayload));
444
- }
445
442
  eventBus.emit(`UI:${action}`, actionPayload ?? {});
446
443
  }
447
444
  onClick?.(e);
@@ -37469,10 +37466,15 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
37469
37466
  if (!child || typeof child !== "object") return null;
37470
37467
  const childId = `${parentId}-${index}`;
37471
37468
  const childPath = parentPath === "root" ? `root.children.${index}` : `${parentPath}.children.${index}`;
37469
+ const { type: _childType, props: nestedProps, _id: _childNodeId, children: _childChildren, ...flatProps } = child;
37470
+ const resolvedProps = nestedProps !== void 0 ? nestedProps : flatProps;
37471
+ if (_childChildren !== void 0 && nestedProps === void 0) {
37472
+ resolvedProps.children = _childChildren;
37473
+ }
37472
37474
  const childContent = {
37473
37475
  id: childId,
37474
37476
  pattern: child.type,
37475
- props: child.props ?? {},
37477
+ props: resolvedProps,
37476
37478
  priority: 0,
37477
37479
  nodeId: child._id
37478
37480
  };
@@ -3200,9 +3200,6 @@ var Button = React4__default.default.forwardRef(
3200
3200
  const resolvedRightIcon = resolveIconProp(rightIconValue, iconSizeStyles[size]);
3201
3201
  const handleClick = (e) => {
3202
3202
  if (action) {
3203
- if (typeof console !== "undefined") {
3204
- console.warn("[Button.click]", action, "actionPayload=", JSON.stringify(actionPayload));
3205
- }
3206
3203
  eventBus.emit(`UI:${action}`, actionPayload ?? {});
3207
3204
  }
3208
3205
  onClick?.(e);
@@ -3176,9 +3176,6 @@ var Button = React4.forwardRef(
3176
3176
  const resolvedRightIcon = resolveIconProp(rightIconValue, iconSizeStyles[size]);
3177
3177
  const handleClick = (e) => {
3178
3178
  if (action) {
3179
- if (typeof console !== "undefined") {
3180
- console.warn("[Button.click]", action, "actionPayload=", JSON.stringify(actionPayload));
3181
- }
3182
3179
  eventBus.emit(`UI:${action}`, actionPayload ?? {});
3183
3180
  }
3184
3181
  onClick?.(e);
@@ -3200,9 +3200,6 @@ var Button = React5__default.default.forwardRef(
3200
3200
  const resolvedRightIcon = resolveIconProp(rightIconValue, iconSizeStyles[size]);
3201
3201
  const handleClick = (e) => {
3202
3202
  if (action) {
3203
- if (typeof console !== "undefined") {
3204
- console.warn("[Button.click]", action, "actionPayload=", JSON.stringify(actionPayload));
3205
- }
3206
3203
  eventBus.emit(`UI:${action}`, actionPayload ?? {});
3207
3204
  }
3208
3205
  onClick?.(e);
@@ -3176,9 +3176,6 @@ var Button = React5.forwardRef(
3176
3176
  const resolvedRightIcon = resolveIconProp(rightIconValue, iconSizeStyles[size]);
3177
3177
  const handleClick = (e) => {
3178
3178
  if (action) {
3179
- if (typeof console !== "undefined") {
3180
- console.warn("[Button.click]", action, "actionPayload=", JSON.stringify(actionPayload));
3181
- }
3182
3179
  eventBus.emit(`UI:${action}`, actionPayload ?? {});
3183
3180
  }
3184
3181
  onClick?.(e);
@@ -1544,9 +1544,6 @@ var init_Button = __esm({
1544
1544
  const resolvedRightIcon = resolveIconProp(rightIconValue, iconSizeStyles[size]);
1545
1545
  const handleClick = (e) => {
1546
1546
  if (action) {
1547
- if (typeof console !== "undefined") {
1548
- console.warn("[Button.click]", action, "actionPayload=", JSON.stringify(actionPayload));
1549
- }
1550
1547
  eventBus.emit(`UI:${action}`, actionPayload ?? {});
1551
1548
  }
1552
1549
  onClick?.(e);
@@ -38023,10 +38020,15 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
38023
38020
  if (!child || typeof child !== "object") return null;
38024
38021
  const childId = `${parentId}-${index}`;
38025
38022
  const childPath = parentPath === "root" ? `root.children.${index}` : `${parentPath}.children.${index}`;
38023
+ const { type: _childType, props: nestedProps, _id: _childNodeId, children: _childChildren, ...flatProps } = child;
38024
+ const resolvedProps = nestedProps !== void 0 ? nestedProps : flatProps;
38025
+ if (_childChildren !== void 0 && nestedProps === void 0) {
38026
+ resolvedProps.children = _childChildren;
38027
+ }
38026
38028
  const childContent = {
38027
38029
  id: childId,
38028
38030
  pattern: child.type,
38029
- props: child.props ?? {},
38031
+ props: resolvedProps,
38030
38032
  priority: 0,
38031
38033
  nodeId: child._id
38032
38034
  };
@@ -1499,9 +1499,6 @@ var init_Button = __esm({
1499
1499
  const resolvedRightIcon = resolveIconProp(rightIconValue, iconSizeStyles[size]);
1500
1500
  const handleClick = (e) => {
1501
1501
  if (action) {
1502
- if (typeof console !== "undefined") {
1503
- console.warn("[Button.click]", action, "actionPayload=", JSON.stringify(actionPayload));
1504
- }
1505
1502
  eventBus.emit(`UI:${action}`, actionPayload ?? {});
1506
1503
  }
1507
1504
  onClick?.(e);
@@ -37978,10 +37975,15 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
37978
37975
  if (!child || typeof child !== "object") return null;
37979
37976
  const childId = `${parentId}-${index}`;
37980
37977
  const childPath = parentPath === "root" ? `root.children.${index}` : `${parentPath}.children.${index}`;
37978
+ const { type: _childType, props: nestedProps, _id: _childNodeId, children: _childChildren, ...flatProps } = child;
37979
+ const resolvedProps = nestedProps !== void 0 ? nestedProps : flatProps;
37980
+ if (_childChildren !== void 0 && nestedProps === void 0) {
37981
+ resolvedProps.children = _childChildren;
37982
+ }
37981
37983
  const childContent = {
37982
37984
  id: childId,
37983
37985
  pattern: child.type,
37984
- props: child.props ?? {},
37986
+ props: resolvedProps,
37985
37987
  priority: 0,
37986
37988
  nodeId: child._id
37987
37989
  };
@@ -2087,9 +2087,6 @@ var init_Button = __esm({
2087
2087
  const resolvedRightIcon = resolveIconProp(rightIconValue, iconSizeStyles[size]);
2088
2088
  const handleClick = (e) => {
2089
2089
  if (action) {
2090
- if (typeof console !== "undefined") {
2091
- console.warn("[Button.click]", action, "actionPayload=", JSON.stringify(actionPayload));
2092
- }
2093
2090
  eventBus.emit(`UI:${action}`, actionPayload ?? {});
2094
2091
  }
2095
2092
  onClick?.(e);
@@ -37609,10 +37606,15 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
37609
37606
  if (!child || typeof child !== "object") return null;
37610
37607
  const childId = `${parentId}-${index}`;
37611
37608
  const childPath = parentPath === "root" ? `root.children.${index}` : `${parentPath}.children.${index}`;
37609
+ const { type: _childType, props: nestedProps, _id: _childNodeId, children: _childChildren, ...flatProps } = child;
37610
+ const resolvedProps = nestedProps !== void 0 ? nestedProps : flatProps;
37611
+ if (_childChildren !== void 0 && nestedProps === void 0) {
37612
+ resolvedProps.children = _childChildren;
37613
+ }
37612
37614
  const childContent = {
37613
37615
  id: childId,
37614
37616
  pattern: child.type,
37615
- props: child.props ?? {},
37617
+ props: resolvedProps,
37616
37618
  priority: 0,
37617
37619
  nodeId: child._id
37618
37620
  };
@@ -2042,9 +2042,6 @@ var init_Button = __esm({
2042
2042
  const resolvedRightIcon = resolveIconProp(rightIconValue, iconSizeStyles[size]);
2043
2043
  const handleClick = (e) => {
2044
2044
  if (action) {
2045
- if (typeof console !== "undefined") {
2046
- console.warn("[Button.click]", action, "actionPayload=", JSON.stringify(actionPayload));
2047
- }
2048
2045
  eventBus.emit(`UI:${action}`, actionPayload ?? {});
2049
2046
  }
2050
2047
  onClick?.(e);
@@ -37564,10 +37561,15 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
37564
37561
  if (!child || typeof child !== "object") return null;
37565
37562
  const childId = `${parentId}-${index}`;
37566
37563
  const childPath = parentPath === "root" ? `root.children.${index}` : `${parentPath}.children.${index}`;
37564
+ const { type: _childType, props: nestedProps, _id: _childNodeId, children: _childChildren, ...flatProps } = child;
37565
+ const resolvedProps = nestedProps !== void 0 ? nestedProps : flatProps;
37566
+ if (_childChildren !== void 0 && nestedProps === void 0) {
37567
+ resolvedProps.children = _childChildren;
37568
+ }
37567
37569
  const childContent = {
37568
37570
  id: childId,
37569
37571
  pattern: child.type,
37570
- props: child.props ?? {},
37572
+ props: resolvedProps,
37571
37573
  priority: 0,
37572
37574
  nodeId: child._id
37573
37575
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/ui",
3
- "version": "3.7.2",
3
+ "version": "3.8.0",
4
4
  "description": "React UI components, hooks, and providers for Almadar",
5
5
  "type": "module",
6
6
  "main": "./dist/components/index.js",