praxis-kit 4.0.1 → 4.0.3

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.
package/dist/lit/index.js CHANGED
@@ -531,159 +531,21 @@ var InvariantBase = class {
531
531
  }
532
532
  };
533
533
 
534
- // ../../lib/diagnostics/src/category.ts
535
- var DiagnosticCategory = /* @__PURE__ */ ((DiagnosticCategory2) => {
536
- DiagnosticCategory2[DiagnosticCategory2["Contract"] = 0] = "Contract";
537
- DiagnosticCategory2[DiagnosticCategory2["HTML"] = 1] = "HTML";
538
- DiagnosticCategory2[DiagnosticCategory2["ARIA"] = 2] = "ARIA";
539
- DiagnosticCategory2[DiagnosticCategory2["Composition"] = 3] = "Composition";
540
- DiagnosticCategory2[DiagnosticCategory2["Rendering"] = 4] = "Rendering";
541
- DiagnosticCategory2[DiagnosticCategory2["Accessibility"] = 5] = "Accessibility";
542
- DiagnosticCategory2[DiagnosticCategory2["Performance"] = 6] = "Performance";
543
- DiagnosticCategory2[DiagnosticCategory2["Internal"] = 7] = "Internal";
544
- DiagnosticCategory2[DiagnosticCategory2["Deprecation"] = 8] = "Deprecation";
545
- DiagnosticCategory2[DiagnosticCategory2["Lint"] = 9] = "Lint";
546
- return DiagnosticCategory2;
547
- })(DiagnosticCategory || {});
548
-
549
- // ../../lib/diagnostics/src/error.ts
550
- var PraxisError = class extends Error {
551
- diagnostic;
552
- constructor(diagnostic) {
553
- super(diagnostic.message);
554
- this.name = "PraxisError";
555
- this.diagnostic = diagnostic;
556
- }
557
- };
558
-
559
- // ../../lib/diagnostics/src/severity.ts
560
- var Severity = /* @__PURE__ */ ((Severity2) => {
561
- Severity2[Severity2["Debug"] = 0] = "Debug";
562
- Severity2[Severity2["Info"] = 1] = "Info";
563
- Severity2[Severity2["Warning"] = 2] = "Warning";
564
- Severity2[Severity2["Error"] = 3] = "Error";
565
- Severity2[Severity2["Fatal"] = 4] = "Fatal";
566
- return Severity2;
567
- })(Severity || {});
568
-
569
- // ../../lib/diagnostics/src/policy.ts
570
- var DefaultPolicy = class {
571
- reportThreshold;
572
- throwThreshold;
573
- constructor({
574
- reportThreshold = 1 /* Info */,
575
- throwThreshold = 4 /* Fatal */
576
- } = {}) {
577
- this.reportThreshold = reportThreshold;
578
- this.throwThreshold = throwThreshold;
579
- }
580
- resolve(diagnostic) {
581
- if (diagnostic.severity >= this.throwThreshold) return 2 /* Throw */;
582
- if (diagnostic.severity >= this.reportThreshold) return 1 /* Report */;
583
- return 0 /* Ignore */;
584
- }
585
- };
586
-
587
- // ../../lib/diagnostics/src/diagnostics.ts
588
- var Diagnostics = class {
589
- reporter;
590
- policy;
591
- // Pre-computed at construction time: true if Warning-level diagnostics are not ignored.
592
- active;
593
- constructor(reporter, policy = new DefaultPolicy()) {
594
- this.reporter = reporter;
595
- this.policy = policy;
596
- this.active = policy.resolve({ severity: 2 /* Warning */ }) !== 0 /* Ignore */;
597
- }
598
- report(diagnostic) {
599
- const enforcement = this.policy.resolve(diagnostic);
600
- if (enforcement === 0 /* Ignore */) return diagnostic;
601
- if (enforcement === 2 /* Throw */) throw new PraxisError(diagnostic);
602
- this.reporter.report(diagnostic);
603
- return diagnostic;
604
- }
605
- warn(input) {
606
- return this.report({ ...input, severity: 2 /* Warning */ });
607
- }
608
- error(input) {
609
- return this.report({ ...input, severity: 3 /* Error */ });
610
- }
611
- info(input) {
612
- return this.report({ ...input, severity: 1 /* Info */ });
613
- }
614
- };
615
-
616
- // ../../lib/diagnostics/src/formatter.ts
617
- function formatDiagnostic(diagnostic) {
618
- const level = Severity[diagnostic.severity];
619
- const category = DiagnosticCategory[diagnostic.category];
620
- const prefix = category !== void 0 ? `[${category}] ` : "";
621
- return `${level} ${diagnostic.code}: ${prefix}${diagnostic.message}`;
622
- }
623
-
624
- // ../../lib/diagnostics/src/console-reporter.ts
625
- var ConsoleReporter = class {
626
- report(diagnostic) {
627
- const message = formatDiagnostic(diagnostic);
628
- switch (diagnostic.severity) {
629
- case 0 /* Debug */:
630
- console.debug(message);
631
- break;
632
- case 1 /* Info */:
633
- console.info(message);
634
- break;
635
- case 2 /* Warning */:
636
- console.warn(message);
637
- break;
638
- case 3 /* Error */:
639
- case 4 /* Fatal */:
640
- console.error(message);
641
- break;
642
- }
643
- }
644
- };
645
-
646
- // ../../lib/diagnostics/src/null-reporter.ts
647
- var nullReporter = {
648
- report() {
649
- }
650
- };
651
-
652
- // ../../lib/diagnostics/src/presets.ts
653
- var ignoreAllPolicy = {
654
- resolve(_) {
655
- return 0 /* Ignore */;
656
- }
657
- };
658
- var warnOnlyReporter = {
659
- report(diagnostic) {
660
- console.warn(formatDiagnostic(diagnostic));
661
- }
662
- };
663
- var silentDiagnostics = new Diagnostics(nullReporter, ignoreAllPolicy);
664
- var warnDiagnostics = new Diagnostics(
665
- warnOnlyReporter,
666
- new DefaultPolicy({ reportThreshold: 2 /* Warning */, throwThreshold: 4 /* Fatal */ })
667
- );
668
- var throwDiagnostics = new Diagnostics(
669
- new ConsoleReporter(),
670
- new DefaultPolicy({ reportThreshold: 2 /* Warning */, throwThreshold: 3 /* Error */ })
671
- );
672
-
673
534
  // ../../lib/contract/src/diagnostics/aria.ts
535
+ import { DiagnosticCategory, DiagnosticCode } from "../_shared/diagnostics.js";
674
536
  var AriaDiagnostics = {
675
537
  /** Generic bridge for violations produced by external AriaRule functions. */
676
538
  fromViolation(v) {
677
539
  return {
678
- code: "ARIA2002" /* AriaViolation */,
679
- category: 2 /* ARIA */,
540
+ code: DiagnosticCode.AriaViolation,
541
+ category: DiagnosticCategory.ARIA,
680
542
  message: v.message
681
543
  };
682
544
  },
683
545
  attributeInvalid(key, role) {
684
546
  return {
685
- code: "ARIA2003" /* AriaAttributeInvalid */,
686
- category: 2 /* ARIA */,
547
+ code: DiagnosticCode.AriaAttributeInvalid,
548
+ category: DiagnosticCategory.ARIA,
687
549
  message: `"${key}" is not valid on role="${role}". It will be removed.`,
688
550
  rationale: "Invalid ARIA attributes are ignored by assistive technology and may trigger accessibility-tree warnings in browser devtools.",
689
551
  suggestions: [
@@ -696,8 +558,8 @@ var AriaDiagnostics = {
696
558
  },
697
559
  missingLiveRegion(role, impliedLive) {
698
560
  return {
699
- code: "ARIA2004" /* AriaMissingLiveRegion */,
700
- category: 2 /* ARIA */,
561
+ code: DiagnosticCode.AriaMissingLiveRegion,
562
+ category: DiagnosticCategory.ARIA,
701
563
  message: `role="${role}" implies aria-live="${impliedLive}" but it is missing. It has been injected.`,
702
564
  rationale: "Live-region roles announce dynamic content changes to screen readers. Without aria-live the politeness level is unspecified and announcements may be silent.",
703
565
  suggestions: [
@@ -711,8 +573,8 @@ var AriaDiagnostics = {
711
573
  },
712
574
  missingAtomic(role) {
713
575
  return {
714
- code: "ARIA2005" /* AriaMissingAtomic */,
715
- category: 2 /* ARIA */,
576
+ code: DiagnosticCode.AriaMissingAtomic,
577
+ category: DiagnosticCategory.ARIA,
716
578
  message: `role="${role}" is a live region. Consider setting aria-atomic="true" if the full region should be announced as a unit, or aria-atomic="false" if only changed nodes should be read.`,
717
579
  rationale: "aria-atomic controls whether assistive technology announces the entire live region or only the changed nodes. Omitting it leaves the behaviour browser-defined."
718
580
  };
@@ -720,8 +582,8 @@ var AriaDiagnostics = {
720
582
  relevantInvalidTokens(invalid) {
721
583
  const quoted = invalid.map((t) => `"${t}"`).join(", ");
722
584
  return {
723
- code: "ARIA2006" /* AriaRelevantInvalidToken */,
724
- category: 2 /* ARIA */,
585
+ code: DiagnosticCode.AriaRelevantInvalidToken,
586
+ category: DiagnosticCategory.ARIA,
725
587
  message: `aria-relevant contains invalid token(s): ${quoted}. Valid tokens are: additions, removals, text, all.`,
726
588
  rationale: "aria-relevant accepts a space-separated list of change types. Unrecognised tokens are silently ignored by assistive technology, making the attribute ineffective.",
727
589
  suggestions: [
@@ -734,8 +596,8 @@ var AriaDiagnostics = {
734
596
  },
735
597
  relevantSuperseded() {
736
598
  return {
737
- code: "ARIA2007" /* AriaRelevantSuperseded */,
738
- category: 2 /* ARIA */,
599
+ code: DiagnosticCode.AriaRelevantSuperseded,
600
+ category: DiagnosticCategory.ARIA,
739
601
  message: 'aria-relevant includes "all" alongside other tokens. "all" supersedes additions, removals, and text \u2014 use aria-relevant="all" alone.',
740
602
  rationale: '"all" is equivalent to "additions removals text". Combining it with other tokens is redundant and may confuse readers of the markup.',
741
603
  suggestions: [
@@ -748,8 +610,8 @@ var AriaDiagnostics = {
748
610
  },
749
611
  missingAccessibleName(tag) {
750
612
  return {
751
- code: "ARIA2009" /* AriaMissingAccessibleName */,
752
- category: 2 /* ARIA */,
613
+ code: DiagnosticCode.AriaMissingAccessibleName,
614
+ category: DiagnosticCategory.ARIA,
753
615
  message: `<${tag}> has no accessible name. Add aria-label or aria-labelledby.`,
754
616
  rationale: "Elements with a landmark or interactive role must have an accessible name so that assistive technology can identify them when presenting the page outline.",
755
617
  suggestions: [
@@ -766,8 +628,8 @@ var AriaDiagnostics = {
766
628
  },
767
629
  attributeOnPresentational(attr, tag) {
768
630
  return {
769
- code: "ARIA2010" /* AriaAttributeOnPresentational */,
770
- category: 2 /* ARIA */,
631
+ code: DiagnosticCode.AriaAttributeOnPresentational,
632
+ category: DiagnosticCategory.ARIA,
771
633
  message: `"${attr}" is not allowed on a presentational <${tag}>. Presentational elements are invisible to assistive technology.`,
772
634
  rationale: 'role="none" and role="presentation" (including <img alt="">) remove an element from the accessibility tree. ARIA attributes on such elements are ignored by assistive technology.',
773
635
  suggestions: [
@@ -780,8 +642,8 @@ var AriaDiagnostics = {
780
642
  },
781
643
  ariaHiddenOnFocusable(tag) {
782
644
  return {
783
- code: "ARIA2011" /* AriaHiddenOnFocusable */,
784
- category: 2 /* ARIA */,
645
+ code: DiagnosticCode.AriaHiddenOnFocusable,
646
+ category: DiagnosticCategory.ARIA,
785
647
  message: `aria-hidden="true" must not be used on focusable <${tag}> elements. Screen reader users who navigate by keyboard will encounter the element but receive no information about it.`,
786
648
  rationale: 'aria-hidden removes an element from the accessibility tree while leaving it keyboard-reachable. This creates a "ghost" \u2014 a focusable element assistive technology cannot describe.',
787
649
  suggestions: [
@@ -799,8 +661,8 @@ var AriaDiagnostics = {
799
661
  invalidAttributeValue(attr, value, expected) {
800
662
  const got = value === null ? "null" : value === void 0 ? "undefined" : typeof value === "string" ? `"${value}"` : String(value);
801
663
  return {
802
- code: "ARIA2013" /* AriaInvalidAttributeValue */,
803
- category: 2 /* ARIA */,
664
+ code: DiagnosticCode.AriaInvalidAttributeValue,
665
+ category: DiagnosticCategory.ARIA,
804
666
  message: `"${attr}" has an invalid value (${got}). Expected: ${expected}.`,
805
667
  rationale: "ARIA attributes with invalid values are silently ignored by assistive technology, making the markup semantically inert.",
806
668
  suggestions: [
@@ -813,8 +675,8 @@ var AriaDiagnostics = {
813
675
  },
814
676
  redundantAriaLevel(tag, level) {
815
677
  return {
816
- code: "ARIA2014" /* AriaRedundantLevelAttribute */,
817
- category: 2 /* ARIA */,
678
+ code: DiagnosticCode.AriaRedundantLevelAttribute,
679
+ category: DiagnosticCategory.ARIA,
818
680
  message: `aria-level="${level}" is redundant on <${tag}>: the element already has an implicit heading level of ${level}. Remove the attribute.`,
819
681
  rationale: 'Restating the implicit aria-level adds noise without semantic value. Use aria-level only to override the native heading level (e.g. aria-level="3" on <h2>).',
820
682
  suggestions: [
@@ -827,8 +689,8 @@ var AriaDiagnostics = {
827
689
  },
828
690
  requiredProperty(attr, role) {
829
691
  return {
830
- code: "ARIA2012" /* AriaRequiredProperty */,
831
- category: 2 /* ARIA */,
692
+ code: DiagnosticCode.AriaRequiredProperty,
693
+ category: DiagnosticCategory.ARIA,
832
694
  message: `"${attr}" is required for role="${role}" but is missing.`,
833
695
  rationale: `WAI-ARIA 1.2 specifies required states and properties for certain roles. Without "${attr}", assistive technology cannot correctly communicate the element's state to users.`,
834
696
  suggestions: [
@@ -841,8 +703,8 @@ var AriaDiagnostics = {
841
703
  },
842
704
  invalidRole(role, tag) {
843
705
  return {
844
- code: "ARIA2008" /* AriaInvalidRole */,
845
- category: 2 /* ARIA */,
706
+ code: DiagnosticCode.AriaInvalidRole,
707
+ category: DiagnosticCategory.ARIA,
846
708
  message: `Invalid role "${role ?? ""}" on <${tag}>.`,
847
709
  rationale: "An unrecognised or misapplied ARIA role is ignored by assistive technology and may degrade the accessibility of the element."
848
710
  };
@@ -850,11 +712,12 @@ var AriaDiagnostics = {
850
712
  };
851
713
 
852
714
  // ../../lib/contract/src/diagnostics/contract.ts
715
+ import { DiagnosticCategory as DiagnosticCategory2, DiagnosticCode as DiagnosticCode2 } from "../_shared/diagnostics.js";
853
716
  var ContractDiagnostics = {
854
717
  unexpectedChild(typeName, index, context) {
855
718
  return {
856
- code: "COMP1004" /* UnexpectedChild */,
857
- category: 0 /* Contract */,
719
+ code: DiagnosticCode2.UnexpectedChild,
720
+ category: DiagnosticCategory2.Contract,
858
721
  component: context,
859
722
  message: `${context}: unexpected child "${typeName}" at index ${index}.`
860
723
  };
@@ -862,69 +725,69 @@ var ContractDiagnostics = {
862
725
  ambiguousChild(typeName, index, ruleNames, context) {
863
726
  const quoted = ruleNames.map((n) => `"${n}"`).join(" and ");
864
727
  return {
865
- code: "COMP1005" /* AmbiguousChild */,
866
- category: 0 /* Contract */,
728
+ code: DiagnosticCode2.AmbiguousChild,
729
+ category: DiagnosticCategory2.Contract,
867
730
  component: context,
868
731
  message: `${context}: child "${typeName}" at index ${index} matches multiple child rules: ${quoted}.`
869
732
  };
870
733
  },
871
734
  cardinalityMin(ruleName, min, context) {
872
735
  return {
873
- code: "COMP1006" /* CardinalityMin */,
874
- category: 0 /* Contract */,
736
+ code: DiagnosticCode2.CardinalityMin,
737
+ category: DiagnosticCategory2.Contract,
875
738
  component: context,
876
739
  message: `${context}: "${ruleName}" requires at least ${min}.`
877
740
  };
878
741
  },
879
742
  cardinalityMax(ruleName, max, context) {
880
743
  return {
881
- code: "COMP1007" /* CardinalityMax */,
882
- category: 0 /* Contract */,
744
+ code: DiagnosticCode2.CardinalityMax,
745
+ category: DiagnosticCategory2.Contract,
883
746
  component: context,
884
747
  message: `${context}: "${ruleName}" allows at most ${max}.`
885
748
  };
886
749
  },
887
750
  positionViolation(ruleName, position, index, context) {
888
751
  return {
889
- code: "COMP1008" /* PositionViolation */,
890
- category: 0 /* Contract */,
752
+ code: DiagnosticCode2.PositionViolation,
753
+ category: DiagnosticCategory2.Contract,
891
754
  component: context,
892
755
  message: `${context}: "${ruleName}" must be ${position}, got index ${index}`
893
756
  };
894
757
  },
895
758
  unknownVariantDim(component, label2, dim) {
896
759
  return {
897
- code: "COMP1010" /* ContractUnknownVariantDim */,
898
- category: 0 /* Contract */,
760
+ code: DiagnosticCode2.ContractUnknownVariantDim,
761
+ category: DiagnosticCategory2.Contract,
899
762
  message: `${component}: ${label2} references unknown variant "${dim}".`
900
763
  };
901
764
  },
902
765
  unknownVariantValue(component, label2, dim, value, valid) {
903
766
  return {
904
- code: "COMP1011" /* ContractUnknownVariantValue */,
905
- category: 0 /* Contract */,
767
+ code: DiagnosticCode2.ContractUnknownVariantValue,
768
+ category: DiagnosticCategory2.Contract,
906
769
  message: `${component}: ${label2} sets "${dim}" to unknown value "${value}" (valid: ${valid.join(", ")}).`
907
770
  };
908
771
  },
909
772
  unknownRecipeKey(component, key) {
910
773
  return {
911
- code: "COMP1012" /* ContractUnknownRecipeKey */,
912
- category: 0 /* Contract */,
774
+ code: DiagnosticCode2.ContractUnknownRecipeKey,
775
+ category: DiagnosticCategory2.Contract,
913
776
  message: `${component} Unknown recipeKey "${key}" \u2014 no preset with that name exists.`
914
777
  };
915
778
  },
916
779
  invalidVariantValue(component, key, value) {
917
780
  return {
918
- code: "COMP1013" /* ContractInvalidVariantValue */,
919
- category: 0 /* Contract */,
781
+ code: DiagnosticCode2.ContractInvalidVariantValue,
782
+ category: DiagnosticCategory2.Contract,
920
783
  message: `${component} Variant "${key}=${value}" is not a defined value for the "${key}" dimension.`
921
784
  };
922
785
  },
923
786
  allowedAsViolation(tag, allowedAs, component) {
924
787
  const allowed = allowedAs.map((t) => `"${String(t)}"`).join(", ");
925
788
  return {
926
- code: "COMP1009" /* AllowedAsViolation */,
927
- category: 0 /* Contract */,
789
+ code: DiagnosticCode2.AllowedAsViolation,
790
+ category: DiagnosticCategory2.Contract,
928
791
  component,
929
792
  message: `<${component}>: "as" prop received "${tag}" but only [${allowed}] are allowed.`
930
793
  };
@@ -932,46 +795,47 @@ var ContractDiagnostics = {
932
795
  };
933
796
 
934
797
  // ../../lib/contract/src/diagnostics/html.ts
798
+ import { DiagnosticCategory as DiagnosticCategory3, DiagnosticCode as DiagnosticCode3 } from "../_shared/diagnostics.js";
935
799
  var HtmlDiagnostics = {
936
800
  emptyRole(tag) {
937
801
  return {
938
- code: "HTML3002" /* HtmlEmptyRole */,
939
- category: 1 /* HTML */,
802
+ code: DiagnosticCode3.HtmlEmptyRole,
803
+ category: DiagnosticCategory3.HTML,
940
804
  message: `<${tag}> has an explicit empty role="". Omit the attribute instead.`
941
805
  };
942
806
  },
943
807
  implicitRoleRedundant(tag, implicitRole) {
944
808
  return {
945
- code: "HTML3003" /* HtmlImplicitRoleRedundant */,
946
- category: 1 /* HTML */,
809
+ code: DiagnosticCode3.HtmlImplicitRoleRedundant,
810
+ category: DiagnosticCategory3.HTML,
947
811
  message: `<${tag}> already has implicit role="${implicitRole}". Avoid redundant role assignment.`
948
812
  };
949
813
  },
950
814
  implicitRoleOverride(tag, implicitRole, role) {
951
815
  return {
952
- code: "HTML3004" /* HtmlImplicitRoleOverride */,
953
- category: 1 /* HTML */,
816
+ code: DiagnosticCode3.HtmlImplicitRoleOverride,
817
+ category: DiagnosticCategory3.HTML,
954
818
  message: `<${tag}> should not override its implicit role="${implicitRole}" with role="${role}".`
955
819
  };
956
820
  },
957
821
  standaloneRegionOverride(tag, implicitRole) {
958
822
  return {
959
- code: "HTML3005" /* HtmlStandaloneRegionOverride */,
960
- category: 1 /* HTML */,
823
+ code: DiagnosticCode3.HtmlStandaloneRegionOverride,
824
+ category: DiagnosticCategory3.HTML,
961
825
  message: `<${tag}> is a self-contained element with implicit role="${implicitRole}". Assigning role="region" has been removed.`
962
826
  };
963
827
  },
964
828
  landmarkRoleOverride(tag, implicitRole, role) {
965
829
  return {
966
- code: "HTML3006" /* HtmlLandmarkRoleOverride */,
967
- category: 1 /* HTML */,
830
+ code: DiagnosticCode3.HtmlLandmarkRoleOverride,
831
+ category: DiagnosticCategory3.HTML,
968
832
  message: `<${tag}> has a fixed landmark role="${implicitRole}". role="${role}" overrides it and confuses assistive technology. The override has been removed.`
969
833
  };
970
834
  },
971
835
  invalidChild(child, parent, allowed) {
972
836
  return {
973
- code: "HTML3007" /* HtmlInvalidChild */,
974
- category: 1 /* HTML */,
837
+ code: DiagnosticCode3.HtmlInvalidChild,
838
+ category: DiagnosticCategory3.HTML,
975
839
  message: `<${child}> is not a valid direct child of <${parent}>. Allowed: ${allowed}.`
976
840
  };
977
841
  }
@@ -2135,6 +1999,7 @@ function createClassPipeline(resolved) {
2135
1999
  }
2136
2000
 
2137
2001
  // ../core/src/options/resolve-factory-options.ts
2002
+ import { silentDiagnostics } from "../_shared/diagnostics.js";
2138
2003
  var EMPTY_VARIANT_KEYS = /* @__PURE__ */ new Set();
2139
2004
  function composeNormalizers(normalizers, fn) {
2140
2005
  if (!normalizers?.length) return fn;
@@ -2226,21 +2091,25 @@ function validateRenderProps(diagnostics, options, props, recipeKey) {
2226
2091
  }
2227
2092
  }
2228
2093
 
2094
+ // ../core/src/factory/plugin-invariants.ts
2095
+ import { throwDiagnostics } from "../_shared/diagnostics.js";
2096
+
2229
2097
  // ../core/src/factory/plugin-diagnostics.ts
2098
+ import { DiagnosticCategory as DiagnosticCategory4, DiagnosticCode as DiagnosticCode4 } from "../_shared/diagnostics.js";
2230
2099
  var PluginDiagnostics = {
2231
2100
  invalidShape(received) {
2232
2101
  const got = received === null ? "null" : typeof received;
2233
2102
  return {
2234
- code: "PLUGIN7001" /* PluginInvalidShape */,
2235
- category: 7 /* Internal */,
2103
+ code: DiagnosticCode4.PluginInvalidShape,
2104
+ category: DiagnosticCategory4.Internal,
2236
2105
  message: `[praxis-kit] Plugin factory must return an object with a 'pipeline' function. Got: ${got}.`
2237
2106
  };
2238
2107
  },
2239
2108
  pipelineReturnType(received) {
2240
2109
  const got = received === null ? "null" : Array.isArray(received) ? "array" : typeof received;
2241
2110
  return {
2242
- code: "PLUGIN7002" /* PluginPipelineReturnType */,
2243
- category: 7 /* Internal */,
2111
+ code: DiagnosticCode4.PluginPipelineReturnType,
2112
+ category: DiagnosticCategory4.Internal,
2244
2113
  message: `[praxis-kit] Plugin pipeline must return a string. Got: ${got}.`
2245
2114
  };
2246
2115
  }
@@ -2369,7 +2238,8 @@ function composeFilter(ownedKeys, filterProps) {
2369
2238
  }
2370
2239
 
2371
2240
  // ../../lib/adapter-utils/src/resolve-adapter-common-options.ts
2372
- function resolveAdapterCommonOptions(options, defaultName = "PolymorphicComponent", defaultDiagnostics = throwDiagnostics) {
2241
+ import { throwDiagnostics as throwDiagnostics2, silentDiagnostics as silentDiagnostics2 } from "../_shared/diagnostics.js";
2242
+ function resolveAdapterCommonOptions(options, defaultName = "PolymorphicComponent", defaultDiagnostics = throwDiagnostics2) {
2373
2243
  return {
2374
2244
  name: options.name ?? defaultName,
2375
2245
  diagnostics: options.enforcement?.diagnostics ?? defaultDiagnostics
@@ -2377,10 +2247,11 @@ function resolveAdapterCommonOptions(options, defaultName = "PolymorphicComponen
2377
2247
  }
2378
2248
 
2379
2249
  // ../../adapters/lit/src/build-runtime.ts
2250
+ import { silentDiagnostics as silentDiagnostics3 } from "../_shared/diagnostics.js";
2380
2251
  function normalizeOptions(options) {
2381
2252
  return {
2382
2253
  ...options,
2383
- ...resolveAdapterCommonOptions(options, "PolymorphicElement", silentDiagnostics)
2254
+ ...resolveAdapterCommonOptions(options, "PolymorphicElement", silentDiagnostics3)
2384
2255
  };
2385
2256
  }
2386
2257
  function buildRuntime(options) {