@almadar/ui 4.54.3 → 4.54.4

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.
@@ -54542,10 +54542,10 @@ function getToastPosition(position) {
54542
54542
  }
54543
54543
  }
54544
54544
  function renderPatternChildren(children, onDismiss, parentId = "root", parentPath = "root", sourceTrait) {
54545
- if (!children || !Array.isArray(children) || children.length === 0) {
54546
- return null;
54547
- }
54548
- return children.map((child, index) => {
54545
+ if (children === void 0 || children === null) return null;
54546
+ const childrenArray = Array.isArray(children) ? children : typeof children === "string" || typeof children === "object" && "type" in children ? [children] : [];
54547
+ if (childrenArray.length === 0) return null;
54548
+ return childrenArray.map((child, index) => {
54549
54549
  if (typeof child === "string") {
54550
54550
  const match = TRAIT_BINDING_RE.exec(child);
54551
54551
  if (match) {
@@ -54686,7 +54686,8 @@ function SlotContentRenderer({
54686
54686
  const PatternComponent = getComponentForPattern(content.pattern);
54687
54687
  if (PatternComponent) {
54688
54688
  const childrenConfig = content.props.children;
54689
- const hasChildren = PATTERNS_WITH_CHILDREN.has(content.pattern) || Array.isArray(childrenConfig) && childrenConfig.length > 0;
54689
+ const isSingleChild = typeof childrenConfig === "string" || typeof childrenConfig === "object" && childrenConfig !== null && !Array.isArray(childrenConfig) && "type" in childrenConfig;
54690
+ const hasChildren = PATTERNS_WITH_CHILDREN.has(content.pattern) || Array.isArray(childrenConfig) && childrenConfig.length > 0 || isSingleChild;
54690
54691
  const myPath = patternPath ?? "root";
54691
54692
  const renderedChildren = hasChildren ? renderPatternChildren(childrenConfig, onDismiss, content.id, myPath, content.sourceTrait) : void 0;
54692
54693
  const incomingChildren = content.props.children;
package/dist/avl/index.js CHANGED
@@ -54496,10 +54496,10 @@ function getToastPosition(position) {
54496
54496
  }
54497
54497
  }
54498
54498
  function renderPatternChildren(children, onDismiss, parentId = "root", parentPath = "root", sourceTrait) {
54499
- if (!children || !Array.isArray(children) || children.length === 0) {
54500
- return null;
54501
- }
54502
- return children.map((child, index) => {
54499
+ if (children === void 0 || children === null) return null;
54500
+ const childrenArray = Array.isArray(children) ? children : typeof children === "string" || typeof children === "object" && "type" in children ? [children] : [];
54501
+ if (childrenArray.length === 0) return null;
54502
+ return childrenArray.map((child, index) => {
54503
54503
  if (typeof child === "string") {
54504
54504
  const match = TRAIT_BINDING_RE.exec(child);
54505
54505
  if (match) {
@@ -54640,7 +54640,8 @@ function SlotContentRenderer({
54640
54640
  const PatternComponent = getComponentForPattern(content.pattern);
54641
54641
  if (PatternComponent) {
54642
54642
  const childrenConfig = content.props.children;
54643
- const hasChildren = PATTERNS_WITH_CHILDREN.has(content.pattern) || Array.isArray(childrenConfig) && childrenConfig.length > 0;
54643
+ const isSingleChild = typeof childrenConfig === "string" || typeof childrenConfig === "object" && childrenConfig !== null && !Array.isArray(childrenConfig) && "type" in childrenConfig;
54644
+ const hasChildren = PATTERNS_WITH_CHILDREN.has(content.pattern) || Array.isArray(childrenConfig) && childrenConfig.length > 0 || isSingleChild;
54644
54645
  const myPath = patternPath ?? "root";
54645
54646
  const renderedChildren = hasChildren ? renderPatternChildren(childrenConfig, onDismiss, content.id, myPath, content.sourceTrait) : void 0;
54646
54647
  const incomingChildren = content.props.children;
@@ -45545,10 +45545,10 @@ function getToastPosition(position) {
45545
45545
  }
45546
45546
  }
45547
45547
  function renderPatternChildren(children, onDismiss, parentId = "root", parentPath = "root", sourceTrait) {
45548
- if (!children || !Array.isArray(children) || children.length === 0) {
45549
- return null;
45550
- }
45551
- return children.map((child, index) => {
45548
+ if (children === void 0 || children === null) return null;
45549
+ const childrenArray = Array.isArray(children) ? children : typeof children === "string" || typeof children === "object" && "type" in children ? [children] : [];
45550
+ if (childrenArray.length === 0) return null;
45551
+ return childrenArray.map((child, index) => {
45552
45552
  if (typeof child === "string") {
45553
45553
  const match = TRAIT_BINDING_RE.exec(child);
45554
45554
  if (match) {
@@ -45689,7 +45689,8 @@ function SlotContentRenderer({
45689
45689
  const PatternComponent = getComponentForPattern(content.pattern);
45690
45690
  if (PatternComponent) {
45691
45691
  const childrenConfig = content.props.children;
45692
- const hasChildren = PATTERNS_WITH_CHILDREN.has(content.pattern) || Array.isArray(childrenConfig) && childrenConfig.length > 0;
45692
+ const isSingleChild = typeof childrenConfig === "string" || typeof childrenConfig === "object" && childrenConfig !== null && !Array.isArray(childrenConfig) && "type" in childrenConfig;
45693
+ const hasChildren = PATTERNS_WITH_CHILDREN.has(content.pattern) || Array.isArray(childrenConfig) && childrenConfig.length > 0 || isSingleChild;
45693
45694
  const myPath = patternPath ?? "root";
45694
45695
  const renderedChildren = hasChildren ? renderPatternChildren(childrenConfig, onDismiss, content.id, myPath, content.sourceTrait) : void 0;
45695
45696
  const incomingChildren = content.props.children;
@@ -45499,10 +45499,10 @@ function getToastPosition(position) {
45499
45499
  }
45500
45500
  }
45501
45501
  function renderPatternChildren(children, onDismiss, parentId = "root", parentPath = "root", sourceTrait) {
45502
- if (!children || !Array.isArray(children) || children.length === 0) {
45503
- return null;
45504
- }
45505
- return children.map((child, index) => {
45502
+ if (children === void 0 || children === null) return null;
45503
+ const childrenArray = Array.isArray(children) ? children : typeof children === "string" || typeof children === "object" && "type" in children ? [children] : [];
45504
+ if (childrenArray.length === 0) return null;
45505
+ return childrenArray.map((child, index) => {
45506
45506
  if (typeof child === "string") {
45507
45507
  const match = TRAIT_BINDING_RE.exec(child);
45508
45508
  if (match) {
@@ -45643,7 +45643,8 @@ function SlotContentRenderer({
45643
45643
  const PatternComponent = getComponentForPattern(content.pattern);
45644
45644
  if (PatternComponent) {
45645
45645
  const childrenConfig = content.props.children;
45646
- const hasChildren = PATTERNS_WITH_CHILDREN.has(content.pattern) || Array.isArray(childrenConfig) && childrenConfig.length > 0;
45646
+ const isSingleChild = typeof childrenConfig === "string" || typeof childrenConfig === "object" && childrenConfig !== null && !Array.isArray(childrenConfig) && "type" in childrenConfig;
45647
+ const hasChildren = PATTERNS_WITH_CHILDREN.has(content.pattern) || Array.isArray(childrenConfig) && childrenConfig.length > 0 || isSingleChild;
45647
45648
  const myPath = patternPath ?? "root";
45648
45649
  const renderedChildren = hasChildren ? renderPatternChildren(childrenConfig, onDismiss, content.id, myPath, content.sourceTrait) : void 0;
45649
45650
  const incomingChildren = content.props.children;
@@ -45866,10 +45866,10 @@ function getToastPosition(position) {
45866
45866
  }
45867
45867
  }
45868
45868
  function renderPatternChildren(children, onDismiss, parentId = "root", parentPath = "root", sourceTrait) {
45869
- if (!children || !Array.isArray(children) || children.length === 0) {
45870
- return null;
45871
- }
45872
- return children.map((child, index) => {
45869
+ if (children === void 0 || children === null) return null;
45870
+ const childrenArray = Array.isArray(children) ? children : typeof children === "string" || typeof children === "object" && "type" in children ? [children] : [];
45871
+ if (childrenArray.length === 0) return null;
45872
+ return childrenArray.map((child, index) => {
45873
45873
  if (typeof child === "string") {
45874
45874
  const match = TRAIT_BINDING_RE.exec(child);
45875
45875
  if (match) {
@@ -46010,7 +46010,8 @@ function SlotContentRenderer({
46010
46010
  const PatternComponent = getComponentForPattern(content.pattern);
46011
46011
  if (PatternComponent) {
46012
46012
  const childrenConfig = content.props.children;
46013
- const hasChildren = PATTERNS_WITH_CHILDREN.has(content.pattern) || Array.isArray(childrenConfig) && childrenConfig.length > 0;
46013
+ const isSingleChild = typeof childrenConfig === "string" || typeof childrenConfig === "object" && childrenConfig !== null && !Array.isArray(childrenConfig) && "type" in childrenConfig;
46014
+ const hasChildren = PATTERNS_WITH_CHILDREN.has(content.pattern) || Array.isArray(childrenConfig) && childrenConfig.length > 0 || isSingleChild;
46014
46015
  const myPath = patternPath ?? "root";
46015
46016
  const renderedChildren = hasChildren ? renderPatternChildren(childrenConfig, onDismiss, content.id, myPath, content.sourceTrait) : void 0;
46016
46017
  const incomingChildren = content.props.children;
@@ -45820,10 +45820,10 @@ function getToastPosition(position) {
45820
45820
  }
45821
45821
  }
45822
45822
  function renderPatternChildren(children, onDismiss, parentId = "root", parentPath = "root", sourceTrait) {
45823
- if (!children || !Array.isArray(children) || children.length === 0) {
45824
- return null;
45825
- }
45826
- return children.map((child, index) => {
45823
+ if (children === void 0 || children === null) return null;
45824
+ const childrenArray = Array.isArray(children) ? children : typeof children === "string" || typeof children === "object" && "type" in children ? [children] : [];
45825
+ if (childrenArray.length === 0) return null;
45826
+ return childrenArray.map((child, index) => {
45827
45827
  if (typeof child === "string") {
45828
45828
  const match = TRAIT_BINDING_RE.exec(child);
45829
45829
  if (match) {
@@ -45964,7 +45964,8 @@ function SlotContentRenderer({
45964
45964
  const PatternComponent = getComponentForPattern(content.pattern);
45965
45965
  if (PatternComponent) {
45966
45966
  const childrenConfig = content.props.children;
45967
- const hasChildren = PATTERNS_WITH_CHILDREN.has(content.pattern) || Array.isArray(childrenConfig) && childrenConfig.length > 0;
45967
+ const isSingleChild = typeof childrenConfig === "string" || typeof childrenConfig === "object" && childrenConfig !== null && !Array.isArray(childrenConfig) && "type" in childrenConfig;
45968
+ const hasChildren = PATTERNS_WITH_CHILDREN.has(content.pattern) || Array.isArray(childrenConfig) && childrenConfig.length > 0 || isSingleChild;
45968
45969
  const myPath = patternPath ?? "root";
45969
45970
  const renderedChildren = hasChildren ? renderPatternChildren(childrenConfig, onDismiss, content.id, myPath, content.sourceTrait) : void 0;
45970
45971
  const incomingChildren = content.props.children;
@@ -45452,10 +45452,10 @@ function getToastPosition(position) {
45452
45452
  }
45453
45453
  }
45454
45454
  function renderPatternChildren(children, onDismiss, parentId = "root", parentPath = "root", sourceTrait) {
45455
- if (!children || !Array.isArray(children) || children.length === 0) {
45456
- return null;
45457
- }
45458
- return children.map((child, index) => {
45455
+ if (children === void 0 || children === null) return null;
45456
+ const childrenArray = Array.isArray(children) ? children : typeof children === "string" || typeof children === "object" && "type" in children ? [children] : [];
45457
+ if (childrenArray.length === 0) return null;
45458
+ return childrenArray.map((child, index) => {
45459
45459
  if (typeof child === "string") {
45460
45460
  const match = TRAIT_BINDING_RE.exec(child);
45461
45461
  if (match) {
@@ -45596,7 +45596,8 @@ function SlotContentRenderer({
45596
45596
  const PatternComponent = getComponentForPattern(content.pattern);
45597
45597
  if (PatternComponent) {
45598
45598
  const childrenConfig = content.props.children;
45599
- const hasChildren = PATTERNS_WITH_CHILDREN.has(content.pattern) || Array.isArray(childrenConfig) && childrenConfig.length > 0;
45599
+ const isSingleChild = typeof childrenConfig === "string" || typeof childrenConfig === "object" && childrenConfig !== null && !Array.isArray(childrenConfig) && "type" in childrenConfig;
45600
+ const hasChildren = PATTERNS_WITH_CHILDREN.has(content.pattern) || Array.isArray(childrenConfig) && childrenConfig.length > 0 || isSingleChild;
45600
45601
  const myPath = patternPath ?? "root";
45601
45602
  const renderedChildren = hasChildren ? renderPatternChildren(childrenConfig, onDismiss, content.id, myPath, content.sourceTrait) : void 0;
45602
45603
  const incomingChildren = content.props.children;
@@ -45406,10 +45406,10 @@ function getToastPosition(position) {
45406
45406
  }
45407
45407
  }
45408
45408
  function renderPatternChildren(children, onDismiss, parentId = "root", parentPath = "root", sourceTrait) {
45409
- if (!children || !Array.isArray(children) || children.length === 0) {
45410
- return null;
45411
- }
45412
- return children.map((child, index) => {
45409
+ if (children === void 0 || children === null) return null;
45410
+ const childrenArray = Array.isArray(children) ? children : typeof children === "string" || typeof children === "object" && "type" in children ? [children] : [];
45411
+ if (childrenArray.length === 0) return null;
45412
+ return childrenArray.map((child, index) => {
45413
45413
  if (typeof child === "string") {
45414
45414
  const match = TRAIT_BINDING_RE.exec(child);
45415
45415
  if (match) {
@@ -45550,7 +45550,8 @@ function SlotContentRenderer({
45550
45550
  const PatternComponent = getComponentForPattern(content.pattern);
45551
45551
  if (PatternComponent) {
45552
45552
  const childrenConfig = content.props.children;
45553
- const hasChildren = PATTERNS_WITH_CHILDREN.has(content.pattern) || Array.isArray(childrenConfig) && childrenConfig.length > 0;
45553
+ const isSingleChild = typeof childrenConfig === "string" || typeof childrenConfig === "object" && childrenConfig !== null && !Array.isArray(childrenConfig) && "type" in childrenConfig;
45554
+ const hasChildren = PATTERNS_WITH_CHILDREN.has(content.pattern) || Array.isArray(childrenConfig) && childrenConfig.length > 0 || isSingleChild;
45554
45555
  const myPath = patternPath ?? "root";
45555
45556
  const renderedChildren = hasChildren ? renderPatternChildren(childrenConfig, onDismiss, content.id, myPath, content.sourceTrait) : void 0;
45556
45557
  const incomingChildren = content.props.children;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/ui",
3
- "version": "4.54.3",
3
+ "version": "4.54.4",
4
4
  "description": "React UI components, hooks, and providers for Almadar",
5
5
  "type": "module",
6
6
  "sideEffects": [