@svelte-vitals/core 0.40.1 → 0.41.1

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/index.js CHANGED
@@ -2464,9 +2464,21 @@ function isPenalized(detection, treatDynamicAs) {
2464
2464
  async function runRules(rules, ctx) {
2465
2465
  const examined = {};
2466
2466
  const perRule = await Promise.all(
2467
- rules.map((rule) => rule.check({ ...ctx, recordExamined: (counts) => void (examined[rule.id] = counts) }))
2467
+ rules.map(async (rule) => {
2468
+ try {
2469
+ return await rule.check({ ...ctx, recordExamined: (counts) => void (examined[rule.id] = counts) });
2470
+ } catch (err) {
2471
+ return { id: rule.id, message: err instanceof Error ? err.message : String(err) };
2472
+ }
2473
+ })
2468
2474
  );
2469
- return { results: perRule.flat(), examined };
2475
+ const results = [];
2476
+ const failedRules = [];
2477
+ for (const outcome of perRule) {
2478
+ if (Array.isArray(outcome)) results.push(...outcome);
2479
+ else failedRules.push(outcome);
2480
+ }
2481
+ return { results, examined, failedRules };
2470
2482
  }
2471
2483
 
2472
2484
  // src/rules/seo/title-presence.ts
@@ -2516,7 +2528,10 @@ var seoTitlePresence = {
2516
2528
 
2517
2529
  // src/rules/seo/head-tag-rule.ts
2518
2530
  function detect(head, match) {
2519
- const tag = head.tags.find(match);
2531
+ const matches = head.tags.filter(match);
2532
+ const rank = (t) => (t.value !== "absent" ? 2 : 0) + (t.presence === "own" ? 1 : 0);
2533
+ let tag;
2534
+ for (const m of matches) if (tag === void 0 || rank(m) > rank(tag)) tag = m;
2520
2535
  return tag ? { presence: tag.presence, value: tag.value } : { presence: "none", value: "absent" };
2521
2536
  }
2522
2537
  function headTagRule(opts) {
@@ -3058,6 +3073,16 @@ function settingOptions(setting) {
3058
3073
  function selectRules(rules, config) {
3059
3074
  return rules.filter((rule) => settingSeverity(config.rules[rule.id]) !== "off");
3060
3075
  }
3076
+ function withFailedRulesOff(config, failedRuleIds) {
3077
+ if (failedRuleIds.length === 0) return config;
3078
+ return {
3079
+ ...config,
3080
+ rules: {
3081
+ ...config.rules,
3082
+ ...Object.fromEntries(failedRuleIds.map((id) => [id, "off"]))
3083
+ }
3084
+ };
3085
+ }
3061
3086
  function applyRuleSeverities(results, config) {
3062
3087
  return results.map((result) => {
3063
3088
  const severity = settingSeverity(config.rules[result.id]);
@@ -3573,6 +3598,23 @@ var DATE_KEYS = /* @__PURE__ */ new Set([
3573
3598
  "validFrom",
3574
3599
  "expires"
3575
3600
  ]);
3601
+ function contextValues(nodes) {
3602
+ const out = [];
3603
+ const walk = (v) => {
3604
+ if (Array.isArray(v)) {
3605
+ v.forEach(walk);
3606
+ return;
3607
+ }
3608
+ if (v && typeof v === "object") {
3609
+ for (const [k, val] of Object.entries(v)) {
3610
+ if (k === "@context") out.push(val);
3611
+ walk(val);
3612
+ }
3613
+ }
3614
+ };
3615
+ nodes.forEach(walk);
3616
+ return out;
3617
+ }
3576
3618
  var DEPRECATED_TYPES = /* @__PURE__ */ new Set(["HowTo", "FAQPage", "ClaimReview"]);
3577
3619
  function hasNonEmpty(node, key) {
3578
3620
  if (!(key in node)) return false;
@@ -3631,7 +3673,7 @@ function jsonldRule(opts) {
3631
3673
  severity: opts.severity,
3632
3674
  detection: PENALIZED,
3633
3675
  route: head.route,
3634
- location: head.file,
3676
+ location: tag.file ?? head.file,
3635
3677
  message: problem,
3636
3678
  recommendation: opts.recommendation,
3637
3679
  docsUrl: docsUrl12,
@@ -3644,7 +3686,7 @@ function jsonldRule(opts) {
3644
3686
  route: head.route,
3645
3687
  // Same `location` the penalized branch above uses (design
3646
3688
  // 2026-08-08-pass-result-location-design.md).
3647
- location: head.file,
3689
+ location: tag.file ?? head.file,
3648
3690
  message: opts.label,
3649
3691
  recommendation: opts.recommendation,
3650
3692
  docsUrl: docsUrl12
@@ -3657,14 +3699,1112 @@ function jsonldRule(opts) {
3657
3699
  };
3658
3700
  }
3659
3701
 
3702
+ // src/rules/seo/schema-vocabulary.generated.ts
3703
+ var SCHEMA_ORG_TYPES = /* @__PURE__ */ new Set([
3704
+ "3DModel",
3705
+ "AMRadioChannel",
3706
+ "APIReference",
3707
+ "AboutPage",
3708
+ "AcceptAction",
3709
+ "Accommodation",
3710
+ "AccountingService",
3711
+ "AchieveAction",
3712
+ "Action",
3713
+ "ActionAccessSpecification",
3714
+ "ActionStatusType",
3715
+ "ActivateAction",
3716
+ "AddAction",
3717
+ "AdministrativeArea",
3718
+ "AdultEntertainment",
3719
+ "AdultOrientedEnumeration",
3720
+ "AdvertiserContentArticle",
3721
+ "AggregateOffer",
3722
+ "AggregateRating",
3723
+ "AgreeAction",
3724
+ "Airline",
3725
+ "Airport",
3726
+ "AlignmentObject",
3727
+ "AllocateAction",
3728
+ "AmpStory",
3729
+ "AmusementPark",
3730
+ "AnalysisNewsArticle",
3731
+ "AnatomicalStructure",
3732
+ "AnatomicalSystem",
3733
+ "AnimalShelter",
3734
+ "Answer",
3735
+ "Apartment",
3736
+ "ApartmentComplex",
3737
+ "AppendAction",
3738
+ "ApplyAction",
3739
+ "ApprovedIndication",
3740
+ "Aquarium",
3741
+ "ArchiveComponent",
3742
+ "ArchiveOrganization",
3743
+ "ArriveAction",
3744
+ "ArtGallery",
3745
+ "Artery",
3746
+ "Article",
3747
+ "AskAction",
3748
+ "AskPublicNewsArticle",
3749
+ "AssessAction",
3750
+ "AssignAction",
3751
+ "Atlas",
3752
+ "Attorney",
3753
+ "Audience",
3754
+ "AudioObject",
3755
+ "AudioObjectSnapshot",
3756
+ "Audiobook",
3757
+ "AuthenticateAction",
3758
+ "AuthorizeAction",
3759
+ "AutoBodyShop",
3760
+ "AutoDealer",
3761
+ "AutoPartsStore",
3762
+ "AutoRental",
3763
+ "AutoRepair",
3764
+ "AutoWash",
3765
+ "AutomatedTeller",
3766
+ "AutomotiveBusiness",
3767
+ "BackgroundNewsArticle",
3768
+ "Bakery",
3769
+ "BankAccount",
3770
+ "BankOrCreditUnion",
3771
+ "BarOrPub",
3772
+ "Barcode",
3773
+ "Beach",
3774
+ "BeautySalon",
3775
+ "BedAndBreakfast",
3776
+ "BedDetails",
3777
+ "BedType",
3778
+ "BefriendAction",
3779
+ "BikeStore",
3780
+ "BioChemEntity",
3781
+ "Blog",
3782
+ "BlogPosting",
3783
+ "BloodTest",
3784
+ "BoardingPolicyType",
3785
+ "BoatReservation",
3786
+ "BoatTerminal",
3787
+ "BoatTrip",
3788
+ "BodyMeasurementTypeEnumeration",
3789
+ "BodyOfWater",
3790
+ "Bone",
3791
+ "Book",
3792
+ "BookFormatType",
3793
+ "BookSeries",
3794
+ "BookStore",
3795
+ "BookmarkAction",
3796
+ "Boolean",
3797
+ "BorrowAction",
3798
+ "BowlingAlley",
3799
+ "BrainStructure",
3800
+ "Brand",
3801
+ "BreadcrumbList",
3802
+ "Brewery",
3803
+ "Bridge",
3804
+ "BroadcastChannel",
3805
+ "BroadcastEvent",
3806
+ "BroadcastFrequencySpecification",
3807
+ "BroadcastService",
3808
+ "BrokerageAccount",
3809
+ "BuddhistTemple",
3810
+ "BusOrCoach",
3811
+ "BusReservation",
3812
+ "BusStation",
3813
+ "BusStop",
3814
+ "BusTrip",
3815
+ "BusinessAudience",
3816
+ "BusinessEntityType",
3817
+ "BusinessEvent",
3818
+ "BusinessFunction",
3819
+ "BuyAction",
3820
+ "CDCPMDRecord",
3821
+ "CableOrSatelliteService",
3822
+ "CafeOrCoffeeShop",
3823
+ "Campground",
3824
+ "CampingPitch",
3825
+ "Canal",
3826
+ "CancelAction",
3827
+ "Car",
3828
+ "CarUsageType",
3829
+ "Casino",
3830
+ "CategoryCode",
3831
+ "CategoryCodeSet",
3832
+ "CatholicChurch",
3833
+ "Cemetery",
3834
+ "Certification",
3835
+ "CertificationStatusEnumeration",
3836
+ "Chapter",
3837
+ "CheckAction",
3838
+ "CheckInAction",
3839
+ "CheckOutAction",
3840
+ "CheckoutPage",
3841
+ "ChemicalSubstance",
3842
+ "ChildCare",
3843
+ "ChildrensEvent",
3844
+ "ChooseAction",
3845
+ "Church",
3846
+ "City",
3847
+ "CityHall",
3848
+ "CivicStructure",
3849
+ "Claim",
3850
+ "ClaimReview",
3851
+ "Class",
3852
+ "Clip",
3853
+ "ClothingStore",
3854
+ "Code",
3855
+ "Collection",
3856
+ "CollectionPage",
3857
+ "CollegeOrUniversity",
3858
+ "ComedyClub",
3859
+ "ComedyEvent",
3860
+ "ComicCoverArt",
3861
+ "ComicIssue",
3862
+ "ComicSeries",
3863
+ "ComicStory",
3864
+ "Comment",
3865
+ "CommentAction",
3866
+ "CommunicateAction",
3867
+ "CommunityHealth",
3868
+ "CompleteDataFeed",
3869
+ "CompoundPriceSpecification",
3870
+ "ComputerLanguage",
3871
+ "ComputerStore",
3872
+ "ConferenceEvent",
3873
+ "ConfirmAction",
3874
+ "Consortium",
3875
+ "ConstraintNode",
3876
+ "ConsumeAction",
3877
+ "ContactPage",
3878
+ "ContactPoint",
3879
+ "ContactPointOption",
3880
+ "Continent",
3881
+ "ControlAction",
3882
+ "ConvenienceStore",
3883
+ "Conversation",
3884
+ "CookAction",
3885
+ "Cooperative",
3886
+ "Corporation",
3887
+ "CorrectionComment",
3888
+ "Country",
3889
+ "Course",
3890
+ "CourseInstance",
3891
+ "Courthouse",
3892
+ "CoverArt",
3893
+ "CovidTestingFacility",
3894
+ "CreateAction",
3895
+ "CreativeWork",
3896
+ "CreativeWorkSeason",
3897
+ "CreativeWorkSeries",
3898
+ "Credential",
3899
+ "CreditCard",
3900
+ "Crematorium",
3901
+ "CriticReview",
3902
+ "CssSelectorType",
3903
+ "CurrencyConversionService",
3904
+ "DDxElement",
3905
+ "DENonprofitType",
3906
+ "DanceEvent",
3907
+ "DanceGroup",
3908
+ "DataCatalog",
3909
+ "DataDownload",
3910
+ "DataFeed",
3911
+ "DataFeedItem",
3912
+ "DataType",
3913
+ "Dataset",
3914
+ "Date",
3915
+ "DateTime",
3916
+ "DatedMoneySpecification",
3917
+ "DayOfWeek",
3918
+ "DaySpa",
3919
+ "DeactivateAction",
3920
+ "DefenceEstablishment",
3921
+ "DefinedRegion",
3922
+ "DefinedTerm",
3923
+ "DefinedTermSet",
3924
+ "DeleteAction",
3925
+ "DeliveryChargeSpecification",
3926
+ "DeliveryEvent",
3927
+ "DeliveryMethod",
3928
+ "DeliveryTimeSettings",
3929
+ "Demand",
3930
+ "Dentist",
3931
+ "DepartAction",
3932
+ "DepartmentStore",
3933
+ "DepositAccount",
3934
+ "Dermatology",
3935
+ "DiagnosticLab",
3936
+ "DiagnosticProcedure",
3937
+ "Diet",
3938
+ "DietNutrition",
3939
+ "DietarySupplement",
3940
+ "DigitalDocument",
3941
+ "DigitalDocumentPermission",
3942
+ "DigitalDocumentPermissionType",
3943
+ "DigitalPlatformEnumeration",
3944
+ "DisagreeAction",
3945
+ "DiscoverAction",
3946
+ "DiscussionForumPosting",
3947
+ "DislikeAction",
3948
+ "Distance",
3949
+ "Distillery",
3950
+ "DonateAction",
3951
+ "DoseSchedule",
3952
+ "DownloadAction",
3953
+ "DrawAction",
3954
+ "Drawing",
3955
+ "DrinkAction",
3956
+ "DriveWheelConfigurationValue",
3957
+ "Drug",
3958
+ "DrugClass",
3959
+ "DrugCost",
3960
+ "DrugCostCategory",
3961
+ "DrugLegalStatus",
3962
+ "DrugPregnancyCategory",
3963
+ "DrugPrescriptionStatus",
3964
+ "DrugStrength",
3965
+ "DryCleaningOrLaundry",
3966
+ "Duration",
3967
+ "EUEnergyEfficiencyEnumeration",
3968
+ "EatAction",
3969
+ "EducationEvent",
3970
+ "EducationalAudience",
3971
+ "EducationalOccupationalCredential",
3972
+ "EducationalOccupationalProgram",
3973
+ "EducationalOrganization",
3974
+ "Electrician",
3975
+ "ElectronicsStore",
3976
+ "ElementarySchool",
3977
+ "EmailMessage",
3978
+ "Embassy",
3979
+ "Emergency",
3980
+ "EmergencyService",
3981
+ "EmployeeRole",
3982
+ "EmployerAggregateRating",
3983
+ "EmployerReview",
3984
+ "EmploymentAgency",
3985
+ "EndorseAction",
3986
+ "EndorsementRating",
3987
+ "Energy",
3988
+ "EnergyConsumptionDetails",
3989
+ "EnergyEfficiencyEnumeration",
3990
+ "EnergyStarEnergyEfficiencyEnumeration",
3991
+ "EngineSpecification",
3992
+ "EntertainmentBusiness",
3993
+ "EntryPoint",
3994
+ "Enumeration",
3995
+ "Episode",
3996
+ "Error",
3997
+ "Event",
3998
+ "EventAttendanceModeEnumeration",
3999
+ "EventReservation",
4000
+ "EventSeries",
4001
+ "EventStatusType",
4002
+ "EventVenue",
4003
+ "ExchangeRateSpecification",
4004
+ "ExerciseAction",
4005
+ "ExerciseGym",
4006
+ "ExercisePlan",
4007
+ "ExhibitionEvent",
4008
+ "FAQPage",
4009
+ "FMRadioChannel",
4010
+ "FastFoodRestaurant",
4011
+ "Festival",
4012
+ "FilmAction",
4013
+ "FinancialIncentive",
4014
+ "FinancialProduct",
4015
+ "FinancialService",
4016
+ "FindAction",
4017
+ "FireStation",
4018
+ "Flight",
4019
+ "FlightReservation",
4020
+ "Float",
4021
+ "FloorPlan",
4022
+ "Florist",
4023
+ "FollowAction",
4024
+ "FoodEstablishment",
4025
+ "FoodEstablishmentReservation",
4026
+ "FoodEvent",
4027
+ "FoodService",
4028
+ "FulfillmentTypeEnumeration",
4029
+ "FundingAgency",
4030
+ "FundingScheme",
4031
+ "FurnitureStore",
4032
+ "Game",
4033
+ "GameAvailabilityEnumeration",
4034
+ "GamePlayMode",
4035
+ "GameServer",
4036
+ "GameServerStatus",
4037
+ "GardenStore",
4038
+ "GasStation",
4039
+ "GatedResidenceCommunity",
4040
+ "GenderType",
4041
+ "Gene",
4042
+ "GeneralContractor",
4043
+ "GeoCircle",
4044
+ "GeoCoordinates",
4045
+ "GeoShape",
4046
+ "GeospatialGeometry",
4047
+ "Geriatric",
4048
+ "GiveAction",
4049
+ "GolfCourse",
4050
+ "GovernmentBenefitsType",
4051
+ "GovernmentBuilding",
4052
+ "GovernmentOffice",
4053
+ "GovernmentOrganization",
4054
+ "GovernmentPermit",
4055
+ "GovernmentService",
4056
+ "Grant",
4057
+ "GroceryStore",
4058
+ "Guide",
4059
+ "Gynecologic",
4060
+ "HVACBusiness",
4061
+ "Hackathon",
4062
+ "HairSalon",
4063
+ "HardwareStore",
4064
+ "HealthAndBeautyBusiness",
4065
+ "HealthAspectEnumeration",
4066
+ "HealthClub",
4067
+ "HealthInsurancePlan",
4068
+ "HealthPlanCostSharingSpecification",
4069
+ "HealthPlanFormulary",
4070
+ "HealthPlanNetwork",
4071
+ "HealthTopicContent",
4072
+ "HighSchool",
4073
+ "HinduTemple",
4074
+ "HobbyShop",
4075
+ "HomeAndConstructionBusiness",
4076
+ "HomeGoodsStore",
4077
+ "Hospital",
4078
+ "Hostel",
4079
+ "Hotel",
4080
+ "HotelRoom",
4081
+ "House",
4082
+ "HousePainter",
4083
+ "HowTo",
4084
+ "HowToDirection",
4085
+ "HowToItem",
4086
+ "HowToSection",
4087
+ "HowToStep",
4088
+ "HowToSupply",
4089
+ "HowToTip",
4090
+ "HowToTool",
4091
+ "HyperToc",
4092
+ "HyperTocEntry",
4093
+ "IPTCDigitalSourceEnumeration",
4094
+ "ITNonprofitType",
4095
+ "IceCreamShop",
4096
+ "IgnoreAction",
4097
+ "ImageGallery",
4098
+ "ImageObject",
4099
+ "ImageObjectSnapshot",
4100
+ "ImagingTest",
4101
+ "IncentiveQualifiedExpenseType",
4102
+ "IncentiveStatus",
4103
+ "IncentiveType",
4104
+ "IndividualPhysician",
4105
+ "IndividualProduct",
4106
+ "InfectiousAgentClass",
4107
+ "InfectiousDisease",
4108
+ "InformAction",
4109
+ "InsertAction",
4110
+ "InstallAction",
4111
+ "InstantaneousEvent",
4112
+ "InsuranceAgency",
4113
+ "Intangible",
4114
+ "Integer",
4115
+ "InteractAction",
4116
+ "InteractionCounter",
4117
+ "InternetCafe",
4118
+ "InvestmentFund",
4119
+ "InvestmentOrDeposit",
4120
+ "InviteAction",
4121
+ "Invoice",
4122
+ "ItemAvailability",
4123
+ "ItemList",
4124
+ "ItemListOrderType",
4125
+ "ItemPage",
4126
+ "JewelryStore",
4127
+ "JobPosting",
4128
+ "JoinAction",
4129
+ "Joint",
4130
+ "LakeBodyOfWater",
4131
+ "Landform",
4132
+ "LandmarksOrHistoricalBuildings",
4133
+ "Language",
4134
+ "LearningResource",
4135
+ "LeaveAction",
4136
+ "LegalForceStatus",
4137
+ "LegalService",
4138
+ "LegalValueLevel",
4139
+ "Legislation",
4140
+ "LegislationObject",
4141
+ "LegislativeBuilding",
4142
+ "LendAction",
4143
+ "Library",
4144
+ "LibrarySystem",
4145
+ "LifestyleModification",
4146
+ "Ligament",
4147
+ "LikeAction",
4148
+ "LinkRole",
4149
+ "LiquorStore",
4150
+ "ListItem",
4151
+ "ListenAction",
4152
+ "LiteraryEvent",
4153
+ "LiveBlogPosting",
4154
+ "LoanOrCredit",
4155
+ "LocalBusiness",
4156
+ "LocationFeatureSpecification",
4157
+ "Locksmith",
4158
+ "LodgingBusiness",
4159
+ "LodgingReservation",
4160
+ "LoginAction",
4161
+ "LoseAction",
4162
+ "LymphaticVessel",
4163
+ "Manuscript",
4164
+ "Map",
4165
+ "MapCategoryType",
4166
+ "MarryAction",
4167
+ "Mass",
4168
+ "MathSolver",
4169
+ "MaximumDoseSchedule",
4170
+ "MeasurementMethodEnum",
4171
+ "MeasurementTypeEnumeration",
4172
+ "MediaEnumeration",
4173
+ "MediaGallery",
4174
+ "MediaManipulationRatingEnumeration",
4175
+ "MediaObject",
4176
+ "MediaReview",
4177
+ "MediaReviewItem",
4178
+ "MediaSubscription",
4179
+ "MedicalAudience",
4180
+ "MedicalAudienceType",
4181
+ "MedicalBusiness",
4182
+ "MedicalCause",
4183
+ "MedicalClinic",
4184
+ "MedicalCode",
4185
+ "MedicalCondition",
4186
+ "MedicalConditionStage",
4187
+ "MedicalContraindication",
4188
+ "MedicalDevice",
4189
+ "MedicalDevicePurpose",
4190
+ "MedicalEntity",
4191
+ "MedicalEnumeration",
4192
+ "MedicalEvidenceLevel",
4193
+ "MedicalGuideline",
4194
+ "MedicalGuidelineContraindication",
4195
+ "MedicalGuidelineRecommendation",
4196
+ "MedicalImagingTechnique",
4197
+ "MedicalIndication",
4198
+ "MedicalIntangible",
4199
+ "MedicalObservationalStudy",
4200
+ "MedicalObservationalStudyDesign",
4201
+ "MedicalOrganization",
4202
+ "MedicalProcedure",
4203
+ "MedicalProcedureType",
4204
+ "MedicalRiskCalculator",
4205
+ "MedicalRiskEstimator",
4206
+ "MedicalRiskFactor",
4207
+ "MedicalRiskScore",
4208
+ "MedicalScholarlyArticle",
4209
+ "MedicalSign",
4210
+ "MedicalSignOrSymptom",
4211
+ "MedicalSpecialty",
4212
+ "MedicalStudy",
4213
+ "MedicalStudyStatus",
4214
+ "MedicalSymptom",
4215
+ "MedicalTest",
4216
+ "MedicalTestPanel",
4217
+ "MedicalTherapy",
4218
+ "MedicalTrial",
4219
+ "MedicalTrialDesign",
4220
+ "MedicalWebPage",
4221
+ "MedicineSystem",
4222
+ "MeetingRoom",
4223
+ "MemberProgram",
4224
+ "MemberProgramTier",
4225
+ "MensClothingStore",
4226
+ "Menu",
4227
+ "MenuItem",
4228
+ "MenuSection",
4229
+ "MerchantReturnEnumeration",
4230
+ "MerchantReturnPolicy",
4231
+ "MerchantReturnPolicySeasonalOverride",
4232
+ "Message",
4233
+ "MiddleSchool",
4234
+ "Midwifery",
4235
+ "MobileApplication",
4236
+ "MobilePhoneStore",
4237
+ "MolecularEntity",
4238
+ "MonetaryAmount",
4239
+ "MonetaryAmountDistribution",
4240
+ "MonetaryGrant",
4241
+ "MoneyTransfer",
4242
+ "MortgageLoan",
4243
+ "Mosque",
4244
+ "Motel",
4245
+ "Motorcycle",
4246
+ "MotorcycleDealer",
4247
+ "MotorcycleRepair",
4248
+ "MotorizedBicycle",
4249
+ "Mountain",
4250
+ "MoveAction",
4251
+ "Movie",
4252
+ "MovieClip",
4253
+ "MovieRentalStore",
4254
+ "MovieSeries",
4255
+ "MovieTheater",
4256
+ "MovingCompany",
4257
+ "Muscle",
4258
+ "Museum",
4259
+ "MusicAlbum",
4260
+ "MusicAlbumProductionType",
4261
+ "MusicAlbumReleaseType",
4262
+ "MusicComposition",
4263
+ "MusicEvent",
4264
+ "MusicGroup",
4265
+ "MusicPlaylist",
4266
+ "MusicRecording",
4267
+ "MusicRelease",
4268
+ "MusicReleaseFormatType",
4269
+ "MusicStore",
4270
+ "MusicVenue",
4271
+ "MusicVideoObject",
4272
+ "NGO",
4273
+ "NLNonprofitType",
4274
+ "NailSalon",
4275
+ "Nerve",
4276
+ "NewsArticle",
4277
+ "NewsMediaOrganization",
4278
+ "Newspaper",
4279
+ "NightClub",
4280
+ "NonprofitType",
4281
+ "Notary",
4282
+ "NoteDigitalDocument",
4283
+ "Number",
4284
+ "Nursing",
4285
+ "NutritionInformation",
4286
+ "Observation",
4287
+ "Obstetric",
4288
+ "Occupation",
4289
+ "OccupationalExperienceRequirements",
4290
+ "OccupationalTherapy",
4291
+ "OceanBodyOfWater",
4292
+ "Offer",
4293
+ "OfferCatalog",
4294
+ "OfferForLease",
4295
+ "OfferForPurchase",
4296
+ "OfferItemCondition",
4297
+ "OfferShippingDetails",
4298
+ "OfficeEquipmentStore",
4299
+ "OnDemandEvent",
4300
+ "Oncologic",
4301
+ "OnlineBusiness",
4302
+ "OnlineMarketplace",
4303
+ "OnlineStore",
4304
+ "OpeningHoursSpecification",
4305
+ "OperatingSystem",
4306
+ "OpinionNewsArticle",
4307
+ "Optician",
4308
+ "Optometric",
4309
+ "Order",
4310
+ "OrderAction",
4311
+ "OrderItem",
4312
+ "OrderStatus",
4313
+ "Organization",
4314
+ "OrganizationRole",
4315
+ "OrganizeAction",
4316
+ "Otolaryngologic",
4317
+ "OutletStore",
4318
+ "OwnershipInfo",
4319
+ "PaintAction",
4320
+ "Painting",
4321
+ "PalliativeProcedure",
4322
+ "ParcelDelivery",
4323
+ "ParentAudience",
4324
+ "Park",
4325
+ "ParkingFacility",
4326
+ "PathologyTest",
4327
+ "Patient",
4328
+ "PawnShop",
4329
+ "PayAction",
4330
+ "PaymentCard",
4331
+ "PaymentChargeSpecification",
4332
+ "PaymentMethod",
4333
+ "PaymentMethodType",
4334
+ "PaymentService",
4335
+ "PaymentStatusType",
4336
+ "Pediatric",
4337
+ "PeopleAudience",
4338
+ "PerformAction",
4339
+ "PerformanceRole",
4340
+ "PerformingArtsEvent",
4341
+ "PerformingArtsTheater",
4342
+ "PerformingGroup",
4343
+ "Periodical",
4344
+ "Permit",
4345
+ "Person",
4346
+ "PetStore",
4347
+ "Pharmacy",
4348
+ "Photograph",
4349
+ "PhotographAction",
4350
+ "PhysicalActivity",
4351
+ "PhysicalActivityCategory",
4352
+ "PhysicalExam",
4353
+ "PhysicalTherapy",
4354
+ "Physician",
4355
+ "PhysiciansOffice",
4356
+ "Physiotherapy",
4357
+ "Place",
4358
+ "PlaceOfWorship",
4359
+ "PlanAction",
4360
+ "PlasticSurgery",
4361
+ "Play",
4362
+ "PlayAction",
4363
+ "PlayGameAction",
4364
+ "Playground",
4365
+ "Plumber",
4366
+ "PodcastEpisode",
4367
+ "PodcastSeason",
4368
+ "PodcastSeries",
4369
+ "Podiatric",
4370
+ "PoliceStation",
4371
+ "PoliticalParty",
4372
+ "Pond",
4373
+ "PostOffice",
4374
+ "PostalAddress",
4375
+ "PostalCodeRangeSpecification",
4376
+ "Poster",
4377
+ "PreOrderAction",
4378
+ "PrependAction",
4379
+ "Preschool",
4380
+ "PresentationDigitalDocument",
4381
+ "PreventionIndication",
4382
+ "PriceComponentTypeEnumeration",
4383
+ "PriceSpecification",
4384
+ "PriceTypeEnumeration",
4385
+ "PrimaryCare",
4386
+ "Product",
4387
+ "ProductCollection",
4388
+ "ProductGroup",
4389
+ "ProductModel",
4390
+ "ProductReturnEnumeration",
4391
+ "ProductReturnPolicy",
4392
+ "ProfessionalService",
4393
+ "ProfilePage",
4394
+ "ProgramMembership",
4395
+ "Project",
4396
+ "PronounceableText",
4397
+ "Property",
4398
+ "PropertyValue",
4399
+ "PropertyValueSpecification",
4400
+ "Protein",
4401
+ "Psychiatric",
4402
+ "PsychologicalTreatment",
4403
+ "PublicHealth",
4404
+ "PublicSwimmingPool",
4405
+ "PublicToilet",
4406
+ "PublicationEvent",
4407
+ "PublicationIssue",
4408
+ "PublicationVolume",
4409
+ "PurchaseType",
4410
+ "QAPage",
4411
+ "QualitativeValue",
4412
+ "QuantitativeValue",
4413
+ "QuantitativeValueDistribution",
4414
+ "Quantity",
4415
+ "Question",
4416
+ "Quiz",
4417
+ "Quotation",
4418
+ "QuoteAction",
4419
+ "RVPark",
4420
+ "RadiationTherapy",
4421
+ "RadioBroadcastService",
4422
+ "RadioChannel",
4423
+ "RadioClip",
4424
+ "RadioEpisode",
4425
+ "RadioSeason",
4426
+ "RadioSeries",
4427
+ "RadioStation",
4428
+ "Rating",
4429
+ "ReactAction",
4430
+ "ReadAction",
4431
+ "RealEstateAgent",
4432
+ "RealEstateListing",
4433
+ "ReceiveAction",
4434
+ "Recipe",
4435
+ "Recommendation",
4436
+ "RecommendedDoseSchedule",
4437
+ "RecyclingCenter",
4438
+ "RefundTypeEnumeration",
4439
+ "RegisterAction",
4440
+ "RejectAction",
4441
+ "RentAction",
4442
+ "RentalCarReservation",
4443
+ "RepaymentSpecification",
4444
+ "ReplaceAction",
4445
+ "ReplyAction",
4446
+ "Report",
4447
+ "ReportageNewsArticle",
4448
+ "ReportedDoseSchedule",
4449
+ "ResearchOrganization",
4450
+ "ResearchProject",
4451
+ "Researcher",
4452
+ "Reservation",
4453
+ "ReservationPackage",
4454
+ "ReservationStatusType",
4455
+ "ReserveAction",
4456
+ "Reservoir",
4457
+ "ResetPasswordAction",
4458
+ "Residence",
4459
+ "Resort",
4460
+ "RespiratoryTherapy",
4461
+ "Restaurant",
4462
+ "RestrictedDiet",
4463
+ "ResumeAction",
4464
+ "ReturnAction",
4465
+ "ReturnFeesEnumeration",
4466
+ "ReturnLabelSourceEnumeration",
4467
+ "ReturnMethodEnumeration",
4468
+ "Review",
4469
+ "ReviewAction",
4470
+ "ReviewNewsArticle",
4471
+ "RiverBodyOfWater",
4472
+ "Role",
4473
+ "RoofingContractor",
4474
+ "Room",
4475
+ "RsvpAction",
4476
+ "RsvpResponseType",
4477
+ "RuntimePlatform",
4478
+ "SaleEvent",
4479
+ "SatiricalArticle",
4480
+ "Schedule",
4481
+ "ScheduleAction",
4482
+ "ScholarlyArticle",
4483
+ "School",
4484
+ "SchoolDistrict",
4485
+ "ScreeningEvent",
4486
+ "Sculpture",
4487
+ "SeaBodyOfWater",
4488
+ "SearchAction",
4489
+ "SearchRescueOrganization",
4490
+ "SearchResultsPage",
4491
+ "Season",
4492
+ "Seat",
4493
+ "SeekToAction",
4494
+ "SelfStorage",
4495
+ "SellAction",
4496
+ "SendAction",
4497
+ "SequentialArt",
4498
+ "Series",
4499
+ "Service",
4500
+ "ServiceChannel",
4501
+ "ServicePeriod",
4502
+ "ShareAction",
4503
+ "SheetMusic",
4504
+ "ShippingConditions",
4505
+ "ShippingDeliveryTime",
4506
+ "ShippingRateSettings",
4507
+ "ShippingService",
4508
+ "ShoeStore",
4509
+ "ShoppingCenter",
4510
+ "ShortStory",
4511
+ "SingleFamilyResidence",
4512
+ "SiteNavigationElement",
4513
+ "SizeGroupEnumeration",
4514
+ "SizeSpecification",
4515
+ "SizeSystemEnumeration",
4516
+ "SkiResort",
4517
+ "SocialEvent",
4518
+ "SocialMediaPosting",
4519
+ "SoftwareApplication",
4520
+ "SoftwareSourceCode",
4521
+ "SolveMathAction",
4522
+ "SomeProducts",
4523
+ "SpeakableSpecification",
4524
+ "SpecialAnnouncement",
4525
+ "Specialty",
4526
+ "SportingGoodsStore",
4527
+ "SportsActivityLocation",
4528
+ "SportsClub",
4529
+ "SportsEvent",
4530
+ "SportsOrganization",
4531
+ "SportsTeam",
4532
+ "SpreadsheetDigitalDocument",
4533
+ "StadiumOrArena",
4534
+ "State",
4535
+ "Statement",
4536
+ "StatisticalPopulation",
4537
+ "StatisticalVariable",
4538
+ "StatusEnumeration",
4539
+ "SteeringPositionValue",
4540
+ "Store",
4541
+ "StructuredValue",
4542
+ "StupidType",
4543
+ "SubscribeAction",
4544
+ "Substance",
4545
+ "SubwayStation",
4546
+ "Suite",
4547
+ "SuperficialAnatomy",
4548
+ "SurgicalProcedure",
4549
+ "SuspendAction",
4550
+ "Syllabus",
4551
+ "Synagogue",
4552
+ "TVClip",
4553
+ "TVEpisode",
4554
+ "TVSeason",
4555
+ "TVSeries",
4556
+ "Table",
4557
+ "TakeAction",
4558
+ "TattooParlor",
4559
+ "Taxi",
4560
+ "TaxiReservation",
4561
+ "TaxiService",
4562
+ "TaxiStand",
4563
+ "Taxon",
4564
+ "TechArticle",
4565
+ "TelevisionChannel",
4566
+ "TelevisionStation",
4567
+ "TennisComplex",
4568
+ "Text",
4569
+ "TextDigitalDocument",
4570
+ "TextObject",
4571
+ "TheaterEvent",
4572
+ "TheaterGroup",
4573
+ "TherapeuticProcedure",
4574
+ "Thesis",
4575
+ "Thing",
4576
+ "Ticket",
4577
+ "TieAction",
4578
+ "TierBenefitEnumeration",
4579
+ "Time",
4580
+ "TipAction",
4581
+ "TireShop",
4582
+ "TouristAttraction",
4583
+ "TouristDestination",
4584
+ "TouristInformationCenter",
4585
+ "TouristTrip",
4586
+ "ToyStore",
4587
+ "TrackAction",
4588
+ "TradeAction",
4589
+ "TrainReservation",
4590
+ "TrainStation",
4591
+ "TrainTrip",
4592
+ "TransferAction",
4593
+ "TravelAction",
4594
+ "TravelAgency",
4595
+ "TreatmentIndication",
4596
+ "Trip",
4597
+ "TypeAndQuantityNode",
4598
+ "UKNonprofitType",
4599
+ "URL",
4600
+ "USNonprofitType",
4601
+ "UnRegisterAction",
4602
+ "UnitPriceSpecification",
4603
+ "UpdateAction",
4604
+ "UseAction",
4605
+ "UserBlocks",
4606
+ "UserCheckins",
4607
+ "UserComments",
4608
+ "UserDownloads",
4609
+ "UserInteraction",
4610
+ "UserLikes",
4611
+ "UserPageVisits",
4612
+ "UserPlays",
4613
+ "UserPlusOnes",
4614
+ "UserReview",
4615
+ "UserTweets",
4616
+ "VacationRental",
4617
+ "Vehicle",
4618
+ "Vein",
4619
+ "Vessel",
4620
+ "VeterinaryCare",
4621
+ "VideoGallery",
4622
+ "VideoGame",
4623
+ "VideoGameClip",
4624
+ "VideoGameSeries",
4625
+ "VideoObject",
4626
+ "VideoObjectSnapshot",
4627
+ "ViewAction",
4628
+ "VirtualLocation",
4629
+ "VisualArtsEvent",
4630
+ "VisualArtwork",
4631
+ "VitalSign",
4632
+ "Volcano",
4633
+ "VoteAction",
4634
+ "WPAdBlock",
4635
+ "WPFooter",
4636
+ "WPHeader",
4637
+ "WPSideBar",
4638
+ "WantAction",
4639
+ "WarrantyPromise",
4640
+ "WarrantyScope",
4641
+ "WatchAction",
4642
+ "Waterfall",
4643
+ "WearAction",
4644
+ "WearableMeasurementTypeEnumeration",
4645
+ "WearableSizeGroupEnumeration",
4646
+ "WearableSizeSystemEnumeration",
4647
+ "WebAPI",
4648
+ "WebApplication",
4649
+ "WebContent",
4650
+ "WebPage",
4651
+ "WebPageElement",
4652
+ "WebSite",
4653
+ "WholesaleStore",
4654
+ "WinAction",
4655
+ "Winery",
4656
+ "WorkBasedProgram",
4657
+ "WorkersUnion",
4658
+ "WriteAction",
4659
+ "XPathType",
4660
+ "Zoo",
4661
+ "iflastandards_info_ns_lrm_lrmoo_F31_Performance",
4662
+ "purl_bioontology_org_ontology_SNOMEDCT_105590001",
4663
+ "purl_bioontology_org_ontology_SNOMEDCT_116154003",
4664
+ "purl_bioontology_org_ontology_SNOMEDCT_277132007",
4665
+ "purl_bioontology_org_ontology_SNOMEDCT_387713003",
4666
+ "purl_bioontology_org_ontology_SNOMEDCT_410942007",
4667
+ "purl_bioontology_org_ontology_SNOMEDCT_50731006",
4668
+ "purl_bioontology_org_ontology_SNOMEDCT_51114001",
4669
+ "purl_bioontology_org_ontology_SNOMEDCT_63653004",
4670
+ "purl_org_dc_dcmitype_Dataset",
4671
+ "purl_org_dc_dcmitype_Event",
4672
+ "purl_org_dc_dcmitype_Image",
4673
+ "purl_org_dc_dcmitype_Text",
4674
+ "purl_org_ontology_bibo_Issue",
4675
+ "purl_org_ontology_bibo_Periodical",
4676
+ "rdfs_org_ns_void_Dataset",
4677
+ "ref_gs1_org_voc_CertificationDetails",
4678
+ "ref_gs1_org_voc_ContactPoint",
4679
+ "ref_gs1_org_voc_Country",
4680
+ "ref_gs1_org_voc_Organization",
4681
+ "ref_gs1_org_voc_PostalAddress",
4682
+ "sarif_info_Result",
4683
+ "spec_edmcouncil_org_fibo_ontology_BE_Corporations_Corporations_Corporation",
4684
+ "spec_edmcouncil_org_fibo_ontology_BE_LegalEntities_CorporateBodies_CooperativeSociety",
4685
+ "spec_edmcouncil_org_fibo_ontology_BE_NotForProfitOrganizations_NotForProfitOrganizations_NonGovernmentalOrganization",
4686
+ "spec_edmcouncil_org_fibo_ontology_FBC_ProductsAndServices_FinancialProductsAndServices_BankAccount",
4687
+ "spec_edmcouncil_org_fibo_ontology_FBC_ProductsAndServices_FinancialProductsAndServices_PaymentMechanism",
4688
+ "spec_edmcouncil_org_fibo_ontology_FND_Agreements_Contracts_MutualContractualAgreement",
4689
+ "spec_edmcouncil_org_fibo_ontology_FND_Arrangements_Documents_Certificate",
4690
+ "spec_edmcouncil_org_fibo_ontology_FND_Arrangements_Documents_Document",
4691
+ "spec_edmcouncil_org_fibo_ontology_FND_Arrangements_Documents_LegalDocument",
4692
+ "spec_edmcouncil_org_fibo_ontology_FND_DatesAndTimes_Occurrences_Occurrence",
4693
+ "spec_edmcouncil_org_fibo_ontology_FND_Organizations_Organizations_ContactPoint",
4694
+ "spec_edmcouncil_org_fibo_ontology_FND_Organizations_Organizations_Organization",
4695
+ "spec_edmcouncil_org_fibo_ontology_FND_Places_Addresses_PostalAddress",
4696
+ "spec_edmcouncil_org_fibo_ontology_FND_Places_Locations_Municipality",
4697
+ "spec_edmcouncil_org_fibo_ontology_FND_ProductsAndServices_ProductsAndServices_Offer",
4698
+ "spec_edmcouncil_org_fibo_ontology_FND_ProductsAndServices_ProductsAndServices_Price",
4699
+ "spec_edmcouncil_org_fibo_ontology_FND_ProductsAndServices_ProductsAndServices_Product",
4700
+ "spec_edmcouncil_org_fibo_ontology_PAY_PaymentServices_PaymentServices_PaymentService",
4701
+ "unece_org_vocab_AmountType",
4702
+ "unece_org_vocab_BrandName",
4703
+ "unece_org_vocab_Country",
4704
+ "unece_org_vocab_ElectronicDocument",
4705
+ "unece_org_vocab_FinancialCard",
4706
+ "unece_org_vocab_GeographicalCoordinate",
4707
+ "unece_org_vocab_Invoice",
4708
+ "unece_org_vocab_LineTradeAgreement",
4709
+ "unece_org_vocab_Offer",
4710
+ "unece_org_vocab_Order",
4711
+ "unece_org_vocab_PaymentMeans",
4712
+ "unece_org_vocab_RequestForQuotation",
4713
+ "unece_org_vocab_SpecifiedCertificate",
4714
+ "unece_org_vocab_SpecifiedTradeProduct",
4715
+ "unece_org_vocab_TradeAddress",
4716
+ "unece_org_vocab_TradeProduct",
4717
+ "unece_org_vocab_TransportMethod",
4718
+ "www_omg_org_spec_Commons_Classifiers_Classifier",
4719
+ "www_omg_org_spec_Commons_Collections_Collection",
4720
+ "www_omg_org_spec_Commons_DatesAndTimes_Date",
4721
+ "www_omg_org_spec_Commons_DatesAndTimes_DateTime",
4722
+ "www_omg_org_spec_Commons_DatesAndTimes_Duration",
4723
+ "www_omg_org_spec_Commons_GeopoliticalEntities_GeopoliticalEntity",
4724
+ "www_omg_org_spec_Commons_GeopoliticalEntities_Subdivision",
4725
+ "www_omg_org_spec_Commons_Locations_Address",
4726
+ "www_omg_org_spec_Commons_Locations_GeographicCoordinate",
4727
+ "www_omg_org_spec_Commons_Locations_Location",
4728
+ "www_omg_org_spec_LCC_Countries_CountryRepresentation_Continent",
4729
+ "www_omg_org_spec_LCC_Countries_CountryRepresentation_Country",
4730
+ "www_w3_org_2006_vcard_ns_VCard",
4731
+ "www_w3_org_ns_dcat_Catalog",
4732
+ "www_w3_org_ns_dcat_Dataset",
4733
+ "www_w3_org_ns_dcat_Distribution",
4734
+ "www_w3_org_ns_hydra_core_Error",
4735
+ "www_w3_org_ns_prov_InstantaneousEvent",
4736
+ "www_w3_org_ns_prov_atTime",
4737
+ "xmlns_com_foaf_0_1_Person"
4738
+ ]);
4739
+
3660
4740
  // src/rules/seo/json-ld-validity.ts
4741
+ var SCHEMA_ORG_CONTEXT_RE = /^https?:\/\/schema\.org\/?$/;
4742
+ var LOWERCASE_TO_CANONICAL = new Map(
4743
+ [...SCHEMA_ORG_TYPES].map((name) => [name.toLowerCase(), name])
4744
+ );
4745
+ var SORTED_TYPES = [...SCHEMA_ORG_TYPES].sort();
4746
+ var MAX_SUGGEST_DISTANCE = 2;
4747
+ function levenshteinWithin(a, b, maxDistance) {
4748
+ if (Math.abs(a.length - b.length) > maxDistance) return maxDistance + 1;
4749
+ let prev = Array.from({ length: b.length + 1 }, (_, j) => j);
4750
+ for (let i = 1; i <= a.length; i++) {
4751
+ const curr = [i];
4752
+ let rowMin = i;
4753
+ for (let j = 1; j <= b.length; j++) {
4754
+ const cost = a[i - 1] === b[j - 1] ? 0 : 1;
4755
+ const v = Math.min(prev[j] + 1, curr[j - 1] + 1, prev[j - 1] + cost);
4756
+ curr.push(v);
4757
+ if (v < rowMin) rowMin = v;
4758
+ }
4759
+ if (rowMin > maxDistance) return maxDistance + 1;
4760
+ prev = curr;
4761
+ }
4762
+ return prev[b.length];
4763
+ }
4764
+ function closestType(name, catalog) {
4765
+ const lower = name.toLowerCase();
4766
+ let best;
4767
+ let bestDistance = MAX_SUGGEST_DISTANCE + 1;
4768
+ for (const candidate of catalog) {
4769
+ if (Math.abs(candidate.length - name.length) > MAX_SUGGEST_DISTANCE) continue;
4770
+ const d = levenshteinWithin(lower, candidate.toLowerCase(), MAX_SUGGEST_DISTANCE);
4771
+ if (d < bestDistance) {
4772
+ bestDistance = d;
4773
+ best = candidate;
4774
+ }
4775
+ }
4776
+ return bestDistance <= MAX_SUGGEST_DISTANCE ? best : void 0;
4777
+ }
4778
+ function isSchemaOrgContextValue(v) {
4779
+ if (typeof v === "string") return SCHEMA_ORG_CONTEXT_RE.test(v);
4780
+ if (Array.isArray(v)) return v.every((m) => typeof m === "string" && SCHEMA_ORG_CONTEXT_RE.test(m));
4781
+ return false;
4782
+ }
4783
+ function isSchemaOrgOnly(nodes) {
4784
+ const contexts = contextValues(nodes);
4785
+ return contexts.length > 0 && contexts.every(isSchemaOrgContextValue);
4786
+ }
4787
+ function isBareTypeName(name) {
4788
+ return !name.includes(":") && !name.includes("/");
4789
+ }
4790
+ function unknownTypeNames(nodes) {
4791
+ const seen = /* @__PURE__ */ new Set();
4792
+ for (const name of collectValues(nodes, /* @__PURE__ */ new Set(["@type"]))) {
4793
+ if (isBareTypeName(name) && !SCHEMA_ORG_TYPES.has(name)) seen.add(name);
4794
+ }
4795
+ return [...seen];
4796
+ }
4797
+ function unknownTypeMessage(name) {
4798
+ const canonical = LOWERCASE_TO_CANONICAL.get(name.toLowerCase()) ?? closestType(name, SORTED_TYPES);
4799
+ return canonical ? `Unknown @type '${name}' \u2014 not a schema.org type. Did you mean '${canonical}'?` : `Unknown @type '${name}' \u2014 not a schema.org type.`;
4800
+ }
3661
4801
  var seoJsonLdValidity = {
3662
4802
  id: "seo/json-ld-validity",
3663
4803
  title: "JSON-LD validity",
3664
4804
  category: "seo",
3665
4805
  severity: "warning",
3666
4806
  scope: "route",
3667
- rationale: "Invalid JSON-LD \u2014 unparseable, or missing @context/@type \u2014 is silently ignored by search engines, so the structured data does nothing.",
4807
+ rationale: "Invalid JSON-LD \u2014 unparseable, missing @context/@type, or declaring a @type that is not a real schema.org type \u2014 is silently ignored by search engines, so the structured data does nothing.",
3668
4808
  fix: {
3669
4809
  description: "Make the JSON-LD valid: parseable JSON with both @context (schema.org) and @type.",
3670
4810
  snippet: '<svelte:head>\n <script type="application/ld+json">\n {"@context":"https://schema.org","@type":"WebPage","name":"\u2026"}\n </script>\n</svelte:head>',
@@ -3680,6 +4820,25 @@ var seoJsonLdValidity = {
3680
4820
  if (!parsed.ok) problem = "JSON-LD is not valid JSON";
3681
4821
  else if (!parsed.nodes.some((n) => "@context" in n)) problem = "JSON-LD is missing @context";
3682
4822
  else if (!parsed.nodes.some((n) => typeOf(n).length > 0)) problem = "JSON-LD is missing @type";
4823
+ if (!problem && isSchemaOrgOnly(parsed.nodes)) {
4824
+ const unknown = unknownTypeNames(parsed.nodes);
4825
+ if (unknown.length > 0) {
4826
+ for (const name of unknown) {
4827
+ out.push({
4828
+ id: "seo/json-ld-validity",
4829
+ category: "seo",
4830
+ severity: "warning",
4831
+ detection: PENALIZED,
4832
+ route: head.route,
4833
+ location: tag.file ?? head.file,
4834
+ message: unknownTypeMessage(name),
4835
+ recommendation: "Use the exact schema.org type name (case-sensitive), e.g. 'Article', 'Product'.",
4836
+ docsUrl: docsUrl12
4837
+ });
4838
+ }
4839
+ continue;
4840
+ }
4841
+ }
3683
4842
  out.push(
3684
4843
  problem ? {
3685
4844
  id: "seo/json-ld-validity",
@@ -3687,7 +4846,7 @@ var seoJsonLdValidity = {
3687
4846
  severity: "warning",
3688
4847
  detection: PENALIZED,
3689
4848
  route: head.route,
3690
- location: head.file,
4849
+ location: tag.file ?? head.file,
3691
4850
  message: problem,
3692
4851
  recommendation: "Make the JSON-LD valid JSON with both @context and @type.",
3693
4852
  docsUrl: docsUrl12,
@@ -3700,7 +4859,7 @@ var seoJsonLdValidity = {
3700
4859
  route: head.route,
3701
4860
  // Same `location` the penalized branch above uses (design
3702
4861
  // 2026-08-08-pass-result-location-design.md).
3703
- location: head.file,
4862
+ location: tag.file ?? head.file,
3704
4863
  message: "JSON-LD validity",
3705
4864
  recommendation: "Make the JSON-LD valid JSON with both @context and @type.",
3706
4865
  docsUrl: docsUrl12
@@ -4490,7 +5649,8 @@ var correctnessOrphanEffect = componentRule({
4490
5649
  rationale: "An $effect created outside component initialisation throws effect_orphan at runtime. The compiler does not catch it \u2014 the server compiler deletes $effect calls entirely, so SSR renders without error \u2014 and the crash happens client-side, when the module evaluates in the browser, breaking hydration rather than producing a server error.",
4491
5650
  // `orphanEffects` is typed required, but a facts object built by an older/external
4492
5651
  // constructor may omit it — default to empty rather than let `applies` throw and
4493
- // take the whole `runRules` Promise.all down with it.
5652
+ // surface this rule as failed (the engine isolates a throwing rule, but this one
5653
+ // can just work instead of getting flagged).
4494
5654
  applies: (c) => (c.orphanEffects ?? []).length > 0,
4495
5655
  bad: (c) => (c.orphanEffects ?? []).map((o) => ({
4496
5656
  line: o.line,
@@ -6293,6 +7453,20 @@ function scoreColor(p, score) {
6293
7453
  return p.red;
6294
7454
  }
6295
7455
 
7456
+ // src/reporter/sanitize.ts
7457
+ function inlineCode(text) {
7458
+ const longestRun = Math.max(0, ...(text.match(/`+/g) ?? []).map((run) => run.length));
7459
+ const fence = "`".repeat(longestRun + 1);
7460
+ const pad = text.startsWith("`") || text.endsWith("`") ? " " : "";
7461
+ return `${fence}${pad}${text}${pad}${fence}`;
7462
+ }
7463
+ function mdEscape(text) {
7464
+ return text.replace(/\r\n|\r|\n/g, " ").replace(/<[^>]+>/g, (tag) => inlineCode(tag)).replace(/\[([^\]]*)\]\(([^)]*)\)/g, "[$1]\\($2\\)");
7465
+ }
7466
+ function terminalSafe(text) {
7467
+ return text.replace(/\x1b\][^\x07\x1b]*(?:\x07|\x1b\\)?/g, "").replace(/\x1b\[[0-?]*[ -/]*[@-~]/g, "").replace(/[\x00-\x08\x0b-\x1f\x7f]/g, "");
7468
+ }
7469
+
6296
7470
  // src/reporter/console.ts
6297
7471
  var RULE = "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500";
6298
7472
  var SEVERITY_TITLE = {
@@ -6341,9 +7515,9 @@ function byRouteTree(p, results, config, verbose) {
6341
7515
  const shown = verbose ? scored : scored.slice(0, MAX_ROUTES_BY_ROUTE);
6342
7516
  const lines = [p.bold("By route"), p.dim(RULE)];
6343
7517
  for (const { route, rs, score } of shown) {
6344
- lines.push(`${route.padEnd(28)} ${scoreColor(p, score)(`${score}`)}`);
7518
+ lines.push(`${terminalSafe(route).padEnd(28)} ${scoreColor(p, score)(`${score}`)}`);
6345
7519
  for (const r of rs.filter((x) => classify(x, config) === "fail")) {
6346
- lines.push(` ${p.red("\u2717")} ${r.id} ${r.message}`);
7520
+ lines.push(` ${p.red("\u2717")} ${r.id} ${terminalSafe(r.message)}`);
6347
7521
  }
6348
7522
  }
6349
7523
  if (!verbose && scored.length > MAX_ROUTES_BY_ROUTE) {
@@ -6387,18 +7561,18 @@ function formatConsoleReport(results, config, options = {}) {
6387
7561
  lines.push(SEVERITY_COLOR[severity](`${SEVERITY_TITLE[severity]} (${bucket.length})`), p.dim(RULE));
6388
7562
  if (options.verbose) {
6389
7563
  for (const r of bucket) {
6390
- lines.push(`${p.red("\u2717")} ${r.id} ${r.message}`);
6391
- if (r.route) lines.push(p.dim(` ${r.route}`));
6392
- if (r.location) lines.push(p.dim(` ${r.location}${r.line ? `:${r.line}` : ""}`));
7564
+ lines.push(`${p.red("\u2717")} ${r.id} ${terminalSafe(r.message)}`);
7565
+ if (r.route) lines.push(p.dim(` ${terminalSafe(r.route)}`));
7566
+ if (r.location) lines.push(p.dim(` ${terminalSafe(r.location)}${r.line ? `:${r.line}` : ""}`));
6393
7567
  }
6394
7568
  } else {
6395
7569
  const groups = groupByRule(bucket);
6396
7570
  const shownGroups = groups.slice(0, MAX_RULE_GROUPS_PER_BUCKET);
6397
7571
  for (const group of shownGroups) {
6398
7572
  const r = group.results[0];
6399
- lines.push(`${p.red("\u2717")} ${r.id} ${r.message}`);
6400
- if (r.route) lines.push(p.dim(` ${r.route}`));
6401
- if (r.location) lines.push(p.dim(` ${r.location}${r.line ? `:${r.line}` : ""}`));
7573
+ lines.push(`${p.red("\u2717")} ${r.id} ${terminalSafe(r.message)}`);
7574
+ if (r.route) lines.push(p.dim(` ${terminalSafe(r.route)}`));
7575
+ if (r.location) lines.push(p.dim(` ${terminalSafe(r.location)}${r.line ? `:${r.line}` : ""}`));
6402
7576
  if (group.results.length > 1) {
6403
7577
  lines.push(p.dim(` \u2026and ${group.results.length - 1} more`));
6404
7578
  }
@@ -6419,8 +7593,8 @@ function formatConsoleReport(results, config, options = {}) {
6419
7593
  for (const r of passed) {
6420
7594
  const marker = classify(r, config) === "dynamic" ? p.cyan(" \u21AF dynamic") : "";
6421
7595
  const where = r.location ?? r.route;
6422
- const suffix = where ? ` ${where}` : "";
6423
- lines.push(`${p.green("\u2713")} ${r.id} ${r.message}${marker}${suffix}`);
7596
+ const suffix = where ? ` ${terminalSafe(where)}` : "";
7597
+ lines.push(`${p.green("\u2713")} ${r.id} ${terminalSafe(r.message)}${marker}${suffix}`);
6424
7598
  }
6425
7599
  }
6426
7600
  lines.push("");
@@ -6503,9 +7677,6 @@ function formatJsonReport(results, config, meta, ruleIds, examined) {
6503
7677
 
6504
7678
  // src/reporter/agent.ts
6505
7679
  var SEVERITY_RANK = { critical: 0, warning: 1, info: 2 };
6506
- function mdTags(text) {
6507
- return text.replace(/<[^>]+>/g, (tag) => `\`${tag}\``);
6508
- }
6509
7680
  function formatAgentReport(results, config) {
6510
7681
  const failing = results.filter((r) => classify(r, config) === "fail");
6511
7682
  const { health } = computeHealth(results, config);
@@ -6532,17 +7703,17 @@ function formatAgentReport(results, config) {
6532
7703
  rs.sort(
6533
7704
  (x, y) => SEVERITY_RANK[effectiveSeverity(x, config)] - SEVERITY_RANK[effectiveSeverity(y, config)] || x.id.localeCompare(y.id)
6534
7705
  );
6535
- lines.push(`## ${loc}`, "");
7706
+ lines.push(`## ${mdEscape(loc)}`, "");
6536
7707
  for (const r of rs) {
6537
- lines.push(`### ${r.id} \xB7 ${mdTags(r.message)} (${effectiveSeverity(r, config)})`);
7708
+ lines.push(`### ${r.id} \xB7 ${mdEscape(r.message)} (${effectiveSeverity(r, config)})`);
6538
7709
  if (r.fix) {
6539
- lines.push(`- Fix: ${mdTags(r.fix.description)}`);
7710
+ lines.push(`- Fix: ${mdEscape(r.fix.description)}`);
6540
7711
  if (r.fix.snippet) lines.push("", "```" + (r.fix.lang ?? "svelte"), r.fix.snippet, "```");
6541
7712
  } else if (r.recommendation) {
6542
- lines.push(`- Fix: ${mdTags(r.recommendation)}`);
7713
+ lines.push(`- Fix: ${mdEscape(r.recommendation)}`);
6543
7714
  }
6544
7715
  if (r.docsUrl) lines.push(`- Docs: ${r.docsUrl}`);
6545
- lines.push(`- Accept: re-run svelte-vitals; ${r.id} passes${r.route ? ` for ${r.route}` : ""}.`, "");
7716
+ lines.push(`- Accept: re-run svelte-vitals; ${r.id} passes${r.route ? ` for ${mdEscape(r.route)}` : ""}.`, "");
6546
7717
  }
6547
7718
  }
6548
7719
  return lines.join("\n").replace(/\n+$/, "\n");
@@ -6653,7 +7824,7 @@ var MAX_FINDINGS = 50;
6653
7824
  var SEVERITY_EMOJI = { critical: "\u{1F534}", warning: "\u{1F7E1}", info: "\u{1F535}" };
6654
7825
  var SEVERITY_RANK2 = { critical: 0, warning: 1, info: 2 };
6655
7826
  function escapeCell(s) {
6656
- return s.replace(/\|/g, "\\|").replace(/\r\n|\r|\n/g, " ");
7827
+ return mdEscape(s).replace(/(\\*)\|/g, (_, bs) => bs + bs + "\\|");
6657
7828
  }
6658
7829
  function locationOf(issue, route) {
6659
7830
  if (issue.location) return issue.line !== void 0 ? `${issue.location}:${issue.line}` : issue.location;
@@ -7525,6 +8696,7 @@ export {
7525
8696
  renderAppShell,
7526
8697
  resolveKitAliases,
7527
8698
  resolveKitPathsBase,
8699
+ resolveRepoLocalPath,
7528
8700
  resolveRuleOptions,
7529
8701
  resolveRunesModuleSpecifier,
7530
8702
  runRules,
@@ -7576,5 +8748,6 @@ export {
7576
8748
  textFromNodes,
7577
8749
  validateRuleOptions,
7578
8750
  validateRuleSetting,
7579
- valueFromNodes
8751
+ valueFromNodes,
8752
+ withFailedRulesOff
7580
8753
  };