praxis-kit 3.0.0 → 3.1.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.
@@ -321,7 +321,7 @@ function isStandaloneTag(tag) {
321
321
  return STANDALONE_ROLES_SET.has(IMPLICIT_ROLE_RECORD[tag]);
322
322
  }
323
323
 
324
- // ../core/dist/chunk-BNVYTMYV.js
324
+ // ../core/dist/chunk-2NJ5XLOA.js
325
325
  var IMPLICIT_ROLE_RECORD2 = {
326
326
  article: "article",
327
327
  aside: "complementary",
@@ -350,26 +350,37 @@ function getImplicitRole(tag) {
350
350
  if (tag in IMPLICIT_ROLE_RECORD2) return IMPLICIT_ROLE_RECORD2[tag];
351
351
  return void 0;
352
352
  }
353
- var COMPONENT_DEFAULT_TAG = /* @__PURE__ */ Symbol("praxis.component-default-tag");
354
- function resolveChildTag(child) {
353
+ var COMPONENT_DEFAULT_TAG = /* @__PURE__ */ Symbol.for("praxis.component-default-tag");
354
+ function getAsProp(child) {
355
+ if (!isObject(child) || !("props" in child)) return void 0;
356
+ const props = child.props;
357
+ if (!isObject(props)) return void 0;
358
+ const as = props.as;
359
+ return isString(as) && as !== "" ? as : void 0;
360
+ }
361
+ function getTag(child) {
355
362
  if (!isObject(child) || !("type" in child)) return void 0;
356
363
  const t = child.type;
357
364
  if (isString(t)) return t;
358
- if (isObject(t) && COMPONENT_DEFAULT_TAG in t) {
365
+ if (typeof t === "function" || isObject(t)) {
359
366
  const defaultTag = t[COMPONENT_DEFAULT_TAG];
360
367
  if (!isString(defaultTag)) return void 0;
361
- const props = child.props;
362
- const as = isObject(props) && "as" in props ? props.as : void 0;
363
- return isString(as) ? as : defaultTag;
368
+ return getAsProp(child) ?? defaultTag;
364
369
  }
365
370
  return void 0;
366
371
  }
367
- function isTag(...tags) {
372
+ function isTag(...args) {
373
+ if (isString(args[0])) {
374
+ const set2 = new Set(args);
375
+ return (child2) => {
376
+ const tag2 = getTag(child2);
377
+ return tag2 !== void 0 && set2.has(tag2);
378
+ };
379
+ }
380
+ const [child, ...tags] = args;
368
381
  const set = new Set(tags);
369
- return (child) => {
370
- const tag = resolveChildTag(child);
371
- return tag !== void 0 && set.has(tag);
372
- };
382
+ const tag = getTag(child);
383
+ return tag !== void 0 && set.has(tag);
373
384
  }
374
385
  var pendingAsyncWarns = /* @__PURE__ */ new Set();
375
386
  var asyncWarnScheduled = false;
@@ -24,9 +24,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
24
  mod
25
25
  ));
26
26
 
27
- // ../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.4.1_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/deepMerge.js
27
+ // ../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.5.0_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/deepMerge.js
28
28
  var require_deepMerge = __commonJS({
29
- "../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.4.1_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/deepMerge.js"(exports) {
29
+ "../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.5.0_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/deepMerge.js"(exports) {
30
30
  "use strict";
31
31
  Object.defineProperty(exports, "__esModule", { value: true });
32
32
  exports.isObjectNotArray = isObjectNotArray;
@@ -59,9 +59,9 @@ var require_deepMerge = __commonJS({
59
59
  }
60
60
  });
61
61
 
62
- // ../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.4.1_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.js
62
+ // ../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.5.0_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.js
63
63
  var require_applyDefault = __commonJS({
64
- "../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.4.1_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.js"(exports) {
64
+ "../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.5.0_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/applyDefault.js"(exports) {
65
65
  "use strict";
66
66
  Object.defineProperty(exports, "__esModule", { value: true });
67
67
  exports.applyDefault = applyDefault;
@@ -86,9 +86,9 @@ var require_applyDefault = __commonJS({
86
86
  }
87
87
  });
88
88
 
89
- // ../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.4.1_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/parserSeemsToBeTSESLint.js
89
+ // ../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.5.0_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/parserSeemsToBeTSESLint.js
90
90
  var require_parserSeemsToBeTSESLint = __commonJS({
91
- "../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.4.1_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/parserSeemsToBeTSESLint.js"(exports) {
91
+ "../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.5.0_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/parserSeemsToBeTSESLint.js"(exports) {
92
92
  "use strict";
93
93
  Object.defineProperty(exports, "__esModule", { value: true });
94
94
  exports.parserSeemsToBeTSESLint = parserSeemsToBeTSESLint;
@@ -98,9 +98,9 @@ var require_parserSeemsToBeTSESLint = __commonJS({
98
98
  }
99
99
  });
100
100
 
101
- // ../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.4.1_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.js
101
+ // ../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.5.0_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.js
102
102
  var require_getParserServices = __commonJS({
103
- "../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.4.1_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.js"(exports) {
103
+ "../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.5.0_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/getParserServices.js"(exports) {
104
104
  "use strict";
105
105
  Object.defineProperty(exports, "__esModule", { value: true });
106
106
  exports.getParserServices = getParserServices;
@@ -131,17 +131,17 @@ var require_getParserServices = __commonJS({
131
131
  }
132
132
  });
133
133
 
134
- // ../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.4.1_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/InferTypesFromRule.js
134
+ // ../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.5.0_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/InferTypesFromRule.js
135
135
  var require_InferTypesFromRule = __commonJS({
136
- "../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.4.1_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/InferTypesFromRule.js"(exports) {
136
+ "../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.5.0_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/InferTypesFromRule.js"(exports) {
137
137
  "use strict";
138
138
  Object.defineProperty(exports, "__esModule", { value: true });
139
139
  }
140
140
  });
141
141
 
142
- // ../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.4.1_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/nullThrows.js
142
+ // ../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.5.0_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/nullThrows.js
143
143
  var require_nullThrows = __commonJS({
144
- "../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.4.1_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/nullThrows.js"(exports) {
144
+ "../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.5.0_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/nullThrows.js"(exports) {
145
145
  "use strict";
146
146
  Object.defineProperty(exports, "__esModule", { value: true });
147
147
  exports.NullThrowsReasons = void 0;
@@ -159,9 +159,9 @@ var require_nullThrows = __commonJS({
159
159
  }
160
160
  });
161
161
 
162
- // ../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.4.1_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.js
162
+ // ../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.5.0_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.js
163
163
  var require_RuleCreator = __commonJS({
164
- "../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.4.1_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.js"(exports) {
164
+ "../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.5.0_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/RuleCreator.js"(exports) {
165
165
  "use strict";
166
166
  Object.defineProperty(exports, "__esModule", { value: true });
167
167
  exports.RuleCreator = RuleCreator8;
@@ -207,9 +207,9 @@ var require_RuleCreator = __commonJS({
207
207
  }
208
208
  });
209
209
 
210
- // ../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.4.1_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/index.js
210
+ // ../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.5.0_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/index.js
211
211
  var require_eslint_utils = __commonJS({
212
- "../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.4.1_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/index.js"(exports) {
212
+ "../../node_modules/.pnpm/@typescript-eslint+utils@8.60.0_eslint@10.5.0_jiti@2.7.0__typescript@6.0.3/node_modules/@typescript-eslint/utils/dist/eslint-utils/index.js"(exports) {
213
213
  "use strict";
214
214
  var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
215
215
  if (k2 === void 0) k2 = k;
package/dist/lit/index.js CHANGED
@@ -585,7 +585,7 @@ function isStandaloneTag(tag) {
585
585
  return STANDALONE_ROLES_SET.has(IMPLICIT_ROLE_RECORD[tag]);
586
586
  }
587
587
 
588
- // ../core/dist/chunk-BNVYTMYV.js
588
+ // ../core/dist/chunk-2NJ5XLOA.js
589
589
  var IMPLICIT_ROLE_RECORD2 = {
590
590
  article: "article",
591
591
  aside: "complementary",
@@ -614,26 +614,37 @@ function getImplicitRole(tag) {
614
614
  if (tag in IMPLICIT_ROLE_RECORD2) return IMPLICIT_ROLE_RECORD2[tag];
615
615
  return void 0;
616
616
  }
617
- var COMPONENT_DEFAULT_TAG = /* @__PURE__ */ Symbol("praxis.component-default-tag");
618
- function resolveChildTag(child) {
617
+ var COMPONENT_DEFAULT_TAG = /* @__PURE__ */ Symbol.for("praxis.component-default-tag");
618
+ function getAsProp(child) {
619
+ if (!isObject(child) || !("props" in child)) return void 0;
620
+ const props = child.props;
621
+ if (!isObject(props)) return void 0;
622
+ const as = props.as;
623
+ return isString(as) && as !== "" ? as : void 0;
624
+ }
625
+ function getTag(child) {
619
626
  if (!isObject(child) || !("type" in child)) return void 0;
620
627
  const t = child.type;
621
628
  if (isString(t)) return t;
622
- if (isObject(t) && COMPONENT_DEFAULT_TAG in t) {
629
+ if (typeof t === "function" || isObject(t)) {
623
630
  const defaultTag = t[COMPONENT_DEFAULT_TAG];
624
631
  if (!isString(defaultTag)) return void 0;
625
- const props = child.props;
626
- const as = isObject(props) && "as" in props ? props.as : void 0;
627
- return isString(as) ? as : defaultTag;
632
+ return getAsProp(child) ?? defaultTag;
628
633
  }
629
634
  return void 0;
630
635
  }
631
- function isTag(...tags) {
636
+ function isTag(...args) {
637
+ if (isString(args[0])) {
638
+ const set2 = new Set(args);
639
+ return (child2) => {
640
+ const tag2 = getTag(child2);
641
+ return tag2 !== void 0 && set2.has(tag2);
642
+ };
643
+ }
644
+ const [child, ...tags] = args;
632
645
  const set = new Set(tags);
633
- return (child) => {
634
- const tag = resolveChildTag(child);
635
- return tag !== void 0 && set.has(tag);
636
- };
646
+ const tag = getTag(child);
647
+ return tag !== void 0 && set.has(tag);
637
648
  }
638
649
  var pendingAsyncWarns2 = /* @__PURE__ */ new Set();
639
650
  var asyncWarnScheduled2 = false;
@@ -10,7 +10,7 @@ function normalizeChildren(children) {
10
10
  }
11
11
 
12
12
  // ../shared/src/guards/children/component-id.ts
13
- var COMPONENT_DEFAULT_TAG = /* @__PURE__ */ Symbol("praxis.component-default-tag");
13
+ var COMPONENT_DEFAULT_TAG = /* @__PURE__ */ Symbol.for("praxis.component-default-tag");
14
14
 
15
15
  // ../../lib/primitive/src/utils/is-object.ts
16
16
  function isNull(value) {
@@ -625,7 +625,7 @@ function isKnownAriaRole(value) {
625
625
  return isString(value) && KNOWN_ARIA_ROLES_SET.has(value);
626
626
  }
627
627
 
628
- // ../core/dist/chunk-BNVYTMYV.js
628
+ // ../core/dist/chunk-2NJ5XLOA.js
629
629
  var IMPLICIT_ROLE_RECORD2 = {
630
630
  article: "article",
631
631
  aside: "complementary",
@@ -654,26 +654,37 @@ function getImplicitRole(tag) {
654
654
  if (tag in IMPLICIT_ROLE_RECORD2) return IMPLICIT_ROLE_RECORD2[tag];
655
655
  return void 0;
656
656
  }
657
- var COMPONENT_DEFAULT_TAG2 = /* @__PURE__ */ Symbol("praxis.component-default-tag");
658
- function resolveChildTag(child) {
657
+ var COMPONENT_DEFAULT_TAG2 = /* @__PURE__ */ Symbol.for("praxis.component-default-tag");
658
+ function getAsProp(child) {
659
+ if (!isObject2(child) || !("props" in child)) return void 0;
660
+ const props = child.props;
661
+ if (!isObject2(props)) return void 0;
662
+ const as = props.as;
663
+ return isString(as) && as !== "" ? as : void 0;
664
+ }
665
+ function getTag(child) {
659
666
  if (!isObject2(child) || !("type" in child)) return void 0;
660
667
  const t = child.type;
661
668
  if (isString(t)) return t;
662
- if (isObject2(t) && COMPONENT_DEFAULT_TAG2 in t) {
669
+ if (typeof t === "function" || isObject2(t)) {
663
670
  const defaultTag = t[COMPONENT_DEFAULT_TAG2];
664
671
  if (!isString(defaultTag)) return void 0;
665
- const props = child.props;
666
- const as = isObject2(props) && "as" in props ? props.as : void 0;
667
- return isString(as) ? as : defaultTag;
672
+ return getAsProp(child) ?? defaultTag;
668
673
  }
669
674
  return void 0;
670
675
  }
671
- function isTag(...tags) {
676
+ function isTag(...args) {
677
+ if (isString(args[0])) {
678
+ const set2 = new Set(args);
679
+ return (child2) => {
680
+ const tag2 = getTag(child2);
681
+ return tag2 !== void 0 && set2.has(tag2);
682
+ };
683
+ }
684
+ const [child, ...tags] = args;
672
685
  const set = new Set(tags);
673
- return (child) => {
674
- const tag = resolveChildTag(child);
675
- return tag !== void 0 && set.has(tag);
676
- };
686
+ const tag = getTag(child);
687
+ return tag !== void 0 && set.has(tag);
677
688
  }
678
689
  var pendingAsyncWarns2 = /* @__PURE__ */ new Set();
679
690
  var asyncWarnScheduled2 = false;
@@ -17,7 +17,7 @@ import {
17
17
  mergeRefs,
18
18
  mergeSlotProps,
19
19
  render
20
- } from "../chunk-PBBPAHMV.js";
20
+ } from "../chunk-6RJN5B6L.js";
21
21
 
22
22
  // ../../adapters/react/src/current/slot/cloneSlotChild.ts
23
23
  import { Fragment } from "react";
@@ -17,7 +17,7 @@ import {
17
17
  mergeRefs,
18
18
  mergeSlotProps,
19
19
  render
20
- } from "../chunk-PBBPAHMV.js";
20
+ } from "../chunk-6RJN5B6L.js";
21
21
 
22
22
  // ../../adapters/react/src/legacy/create-aria-enforced-component.ts
23
23
  import { forwardRef as forwardRef2 } from "react";
@@ -1,5 +1,5 @@
1
1
  // ../shared/src/guards/children/component-id.ts
2
- var COMPONENT_DEFAULT_TAG = /* @__PURE__ */ Symbol("praxis.component-default-tag");
2
+ var COMPONENT_DEFAULT_TAG = /* @__PURE__ */ Symbol.for("praxis.component-default-tag");
3
3
 
4
4
  // ../../adapters/solid/src/apply-display-name.ts
5
5
  function applyDisplayName(component, name) {
@@ -593,7 +593,7 @@ function isKnownAriaRole(value) {
593
593
  return isString(value) && KNOWN_ARIA_ROLES_SET.has(value);
594
594
  }
595
595
 
596
- // ../core/dist/chunk-BNVYTMYV.js
596
+ // ../core/dist/chunk-2NJ5XLOA.js
597
597
  var IMPLICIT_ROLE_RECORD2 = {
598
598
  article: "article",
599
599
  aside: "complementary",
@@ -622,26 +622,37 @@ function getImplicitRole(tag) {
622
622
  if (tag in IMPLICIT_ROLE_RECORD2) return IMPLICIT_ROLE_RECORD2[tag];
623
623
  return void 0;
624
624
  }
625
- var COMPONENT_DEFAULT_TAG2 = /* @__PURE__ */ Symbol("praxis.component-default-tag");
626
- function resolveChildTag(child) {
625
+ var COMPONENT_DEFAULT_TAG2 = /* @__PURE__ */ Symbol.for("praxis.component-default-tag");
626
+ function getAsProp(child) {
627
+ if (!isObject(child) || !("props" in child)) return void 0;
628
+ const props = child.props;
629
+ if (!isObject(props)) return void 0;
630
+ const as = props.as;
631
+ return isString(as) && as !== "" ? as : void 0;
632
+ }
633
+ function getTag(child) {
627
634
  if (!isObject(child) || !("type" in child)) return void 0;
628
635
  const t = child.type;
629
636
  if (isString(t)) return t;
630
- if (isObject(t) && COMPONENT_DEFAULT_TAG2 in t) {
637
+ if (typeof t === "function" || isObject(t)) {
631
638
  const defaultTag = t[COMPONENT_DEFAULT_TAG2];
632
639
  if (!isString(defaultTag)) return void 0;
633
- const props = child.props;
634
- const as = isObject(props) && "as" in props ? props.as : void 0;
635
- return isString(as) ? as : defaultTag;
640
+ return getAsProp(child) ?? defaultTag;
636
641
  }
637
642
  return void 0;
638
643
  }
639
- function isTag(...tags) {
644
+ function isTag(...args) {
645
+ if (isString(args[0])) {
646
+ const set2 = new Set(args);
647
+ return (child2) => {
648
+ const tag2 = getTag(child2);
649
+ return tag2 !== void 0 && set2.has(tag2);
650
+ };
651
+ }
652
+ const [child, ...tags] = args;
640
653
  const set = new Set(tags);
641
- return (child) => {
642
- const tag = resolveChildTag(child);
643
- return tag !== void 0 && set.has(tag);
644
- };
654
+ const tag = getTag(child);
655
+ return tag !== void 0 && set.has(tag);
645
656
  }
646
657
  var pendingAsyncWarns2 = /* @__PURE__ */ new Set();
647
658
  var asyncWarnScheduled2 = false;
@@ -571,7 +571,7 @@ function isStandaloneTag(tag) {
571
571
  return STANDALONE_ROLES_SET.has(IMPLICIT_ROLE_RECORD[tag]);
572
572
  }
573
573
 
574
- // ../core/dist/chunk-BNVYTMYV.js
574
+ // ../core/dist/chunk-2NJ5XLOA.js
575
575
  var IMPLICIT_ROLE_RECORD2 = {
576
576
  article: "article",
577
577
  aside: "complementary",
@@ -600,26 +600,37 @@ function getImplicitRole(tag) {
600
600
  if (tag in IMPLICIT_ROLE_RECORD2) return IMPLICIT_ROLE_RECORD2[tag];
601
601
  return void 0;
602
602
  }
603
- var COMPONENT_DEFAULT_TAG = /* @__PURE__ */ Symbol("praxis.component-default-tag");
604
- function resolveChildTag(child) {
603
+ var COMPONENT_DEFAULT_TAG = /* @__PURE__ */ Symbol.for("praxis.component-default-tag");
604
+ function getAsProp(child) {
605
+ if (!isObject(child) || !("props" in child)) return void 0;
606
+ const props = child.props;
607
+ if (!isObject(props)) return void 0;
608
+ const as = props.as;
609
+ return isString(as) && as !== "" ? as : void 0;
610
+ }
611
+ function getTag(child) {
605
612
  if (!isObject(child) || !("type" in child)) return void 0;
606
613
  const t = child.type;
607
614
  if (isString(t)) return t;
608
- if (isObject(t) && COMPONENT_DEFAULT_TAG in t) {
615
+ if (typeof t === "function" || isObject(t)) {
609
616
  const defaultTag = t[COMPONENT_DEFAULT_TAG];
610
617
  if (!isString(defaultTag)) return void 0;
611
- const props = child.props;
612
- const as = isObject(props) && "as" in props ? props.as : void 0;
613
- return isString(as) ? as : defaultTag;
618
+ return getAsProp(child) ?? defaultTag;
614
619
  }
615
620
  return void 0;
616
621
  }
617
- function isTag(...tags) {
622
+ function isTag(...args) {
623
+ if (isString(args[0])) {
624
+ const set2 = new Set(args);
625
+ return (child2) => {
626
+ const tag2 = getTag(child2);
627
+ return tag2 !== void 0 && set2.has(tag2);
628
+ };
629
+ }
630
+ const [child, ...tags] = args;
618
631
  const set = new Set(tags);
619
- return (child) => {
620
- const tag = resolveChildTag(child);
621
- return tag !== void 0 && set.has(tag);
622
- };
632
+ const tag = getTag(child);
633
+ return tag !== void 0 && set.has(tag);
623
634
  }
624
635
  var pendingAsyncWarns2 = /* @__PURE__ */ new Set();
625
636
  var asyncWarnScheduled2 = false;
package/dist/vue/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import { computed, defineComponent as defineComponent2 } from "vue";
3
3
 
4
4
  // ../shared/src/guards/children/component-id.ts
5
- var COMPONENT_DEFAULT_TAG = /* @__PURE__ */ Symbol("praxis.component-default-tag");
5
+ var COMPONENT_DEFAULT_TAG = /* @__PURE__ */ Symbol.for("praxis.component-default-tag");
6
6
 
7
7
  // ../../adapters/vue/src/apply-display-name.ts
8
8
  function applyDisplayName(component, name) {
@@ -596,7 +596,7 @@ function isKnownAriaRole(value) {
596
596
  return isString(value) && KNOWN_ARIA_ROLES_SET.has(value);
597
597
  }
598
598
 
599
- // ../core/dist/chunk-BNVYTMYV.js
599
+ // ../core/dist/chunk-2NJ5XLOA.js
600
600
  var IMPLICIT_ROLE_RECORD2 = {
601
601
  article: "article",
602
602
  aside: "complementary",
@@ -625,26 +625,37 @@ function getImplicitRole(tag) {
625
625
  if (tag in IMPLICIT_ROLE_RECORD2) return IMPLICIT_ROLE_RECORD2[tag];
626
626
  return void 0;
627
627
  }
628
- var COMPONENT_DEFAULT_TAG2 = /* @__PURE__ */ Symbol("praxis.component-default-tag");
629
- function resolveChildTag(child) {
628
+ var COMPONENT_DEFAULT_TAG2 = /* @__PURE__ */ Symbol.for("praxis.component-default-tag");
629
+ function getAsProp(child) {
630
+ if (!isObject(child) || !("props" in child)) return void 0;
631
+ const props = child.props;
632
+ if (!isObject(props)) return void 0;
633
+ const as = props.as;
634
+ return isString(as) && as !== "" ? as : void 0;
635
+ }
636
+ function getTag(child) {
630
637
  if (!isObject(child) || !("type" in child)) return void 0;
631
638
  const t = child.type;
632
639
  if (isString(t)) return t;
633
- if (isObject(t) && COMPONENT_DEFAULT_TAG2 in t) {
640
+ if (typeof t === "function" || isObject(t)) {
634
641
  const defaultTag = t[COMPONENT_DEFAULT_TAG2];
635
642
  if (!isString(defaultTag)) return void 0;
636
- const props = child.props;
637
- const as = isObject(props) && "as" in props ? props.as : void 0;
638
- return isString(as) ? as : defaultTag;
643
+ return getAsProp(child) ?? defaultTag;
639
644
  }
640
645
  return void 0;
641
646
  }
642
- function isTag(...tags) {
647
+ function isTag(...args) {
648
+ if (isString(args[0])) {
649
+ const set2 = new Set(args);
650
+ return (child2) => {
651
+ const tag2 = getTag(child2);
652
+ return tag2 !== void 0 && set2.has(tag2);
653
+ };
654
+ }
655
+ const [child, ...tags] = args;
643
656
  const set = new Set(tags);
644
- return (child) => {
645
- const tag = resolveChildTag(child);
646
- return tag !== void 0 && set.has(tag);
647
- };
657
+ const tag = getTag(child);
658
+ return tag !== void 0 && set.has(tag);
648
659
  }
649
660
  var pendingAsyncWarns2 = /* @__PURE__ */ new Set();
650
661
  var asyncWarnScheduled2 = false;
package/dist/web/index.js CHANGED
@@ -582,7 +582,7 @@ function isStandaloneTag(tag) {
582
582
  return STANDALONE_ROLES_SET.has(IMPLICIT_ROLE_RECORD[tag]);
583
583
  }
584
584
 
585
- // ../core/dist/chunk-BNVYTMYV.js
585
+ // ../core/dist/chunk-2NJ5XLOA.js
586
586
  var IMPLICIT_ROLE_RECORD2 = {
587
587
  article: "article",
588
588
  aside: "complementary",
@@ -611,26 +611,37 @@ function getImplicitRole(tag) {
611
611
  if (tag in IMPLICIT_ROLE_RECORD2) return IMPLICIT_ROLE_RECORD2[tag];
612
612
  return void 0;
613
613
  }
614
- var COMPONENT_DEFAULT_TAG = /* @__PURE__ */ Symbol("praxis.component-default-tag");
615
- function resolveChildTag(child) {
614
+ var COMPONENT_DEFAULT_TAG = /* @__PURE__ */ Symbol.for("praxis.component-default-tag");
615
+ function getAsProp(child) {
616
+ if (!isObject(child) || !("props" in child)) return void 0;
617
+ const props = child.props;
618
+ if (!isObject(props)) return void 0;
619
+ const as = props.as;
620
+ return isString(as) && as !== "" ? as : void 0;
621
+ }
622
+ function getTag(child) {
616
623
  if (!isObject(child) || !("type" in child)) return void 0;
617
624
  const t = child.type;
618
625
  if (isString(t)) return t;
619
- if (isObject(t) && COMPONENT_DEFAULT_TAG in t) {
626
+ if (typeof t === "function" || isObject(t)) {
620
627
  const defaultTag = t[COMPONENT_DEFAULT_TAG];
621
628
  if (!isString(defaultTag)) return void 0;
622
- const props = child.props;
623
- const as = isObject(props) && "as" in props ? props.as : void 0;
624
- return isString(as) ? as : defaultTag;
629
+ return getAsProp(child) ?? defaultTag;
625
630
  }
626
631
  return void 0;
627
632
  }
628
- function isTag(...tags) {
633
+ function isTag(...args) {
634
+ if (isString(args[0])) {
635
+ const set2 = new Set(args);
636
+ return (child2) => {
637
+ const tag2 = getTag(child2);
638
+ return tag2 !== void 0 && set2.has(tag2);
639
+ };
640
+ }
641
+ const [child, ...tags] = args;
629
642
  const set = new Set(tags);
630
- return (child) => {
631
- const tag = resolveChildTag(child);
632
- return tag !== void 0 && set.has(tag);
633
- };
643
+ const tag = getTag(child);
644
+ return tag !== void 0 && set.has(tag);
634
645
  }
635
646
  var pendingAsyncWarns2 = /* @__PURE__ */ new Set();
636
647
  var asyncWarnScheduled2 = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "praxis-kit",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  "./react": {
@@ -70,7 +70,7 @@
70
70
  "sideEffects": false,
71
71
  "dependencies": {
72
72
  "clsx": "^2.1.1",
73
- "type-fest": "^5.6.0"
73
+ "type-fest": "^5.7.0"
74
74
  },
75
75
  "peerDependencies": {
76
76
  "react": ">=18",