code-languages 1.39.0 → 1.40.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.
package/dist/api.cjs CHANGED
@@ -17421,6 +17421,288 @@ var detectMatchingEntries = (entries, filename) => {
17421
17421
  var detectLanguageSlugs = (filename) => detectMatchingEntries(languageIndex, filename).map((entry) => entry.slug);
17422
17422
  var detectLanguageSlug = (filename) => detectLanguageSlugs(filename).at(0);
17423
17423
 
17424
+ // src/domain/ecosystem/registry.ts
17425
+ var ECOSYSTEM_REGISTRY = [
17426
+ // Web
17427
+ {
17428
+ slug: "web",
17429
+ name: "Web",
17430
+ description: "Languages used for building websites, web apps, and web standards.",
17431
+ aliases: ["web", "frontend", "browser"],
17432
+ targets: ["Web", "Frontend", "JavaScript", "Static Sites", "CMS", "Web Servers"]
17433
+ },
17434
+ // JavaScript ecosystem
17435
+ {
17436
+ slug: "node",
17437
+ name: "Node.js",
17438
+ description: "Languages that run on or integrate with the Node.js server-side runtime.",
17439
+ aliases: ["node", "nodejs", "node.js"],
17440
+ targets: ["Node.js"]
17441
+ },
17442
+ // JVM
17443
+ {
17444
+ slug: "jvm",
17445
+ name: "JVM",
17446
+ description: "Languages that run on the Java Virtual Machine.",
17447
+ aliases: ["jvm", "java"],
17448
+ targets: ["JVM", "Java", "Kotlin", "Groovy", "Scala"]
17449
+ },
17450
+ // .NET
17451
+ {
17452
+ slug: "dotnet",
17453
+ name: ".NET",
17454
+ description: "Languages that target the .NET platform and runtime.",
17455
+ aliases: ["dotnet", ".net", "net"],
17456
+ targets: [".NET", "ASP.NET", "Blazor", "ASP.NET Core"]
17457
+ },
17458
+ // DevOps / Cloud
17459
+ {
17460
+ slug: "devops",
17461
+ name: "DevOps",
17462
+ description: "Languages used for CI/CD, infrastructure, and automation pipelines.",
17463
+ aliases: ["devops", "cicd", "ci-cd"],
17464
+ targets: ["DevOps", "CI/CD", "Platform Automation", "Cloud tooling"]
17465
+ },
17466
+ {
17467
+ slug: "cloud",
17468
+ name: "Cloud",
17469
+ description: "Languages used for cloud computing, cloud-native applications, and IaC.",
17470
+ aliases: ["cloud", "cloud-native"],
17471
+ targets: [
17472
+ "Cloud",
17473
+ "Cloud Computing",
17474
+ "Cloud Native",
17475
+ "Infrastructure as Code",
17476
+ "Infrastructure"
17477
+ ]
17478
+ },
17479
+ {
17480
+ slug: "kubernetes",
17481
+ name: "Kubernetes",
17482
+ description: "Languages and tools used in the Kubernetes ecosystem.",
17483
+ aliases: ["kubernetes", "k8s"],
17484
+ targets: ["Kubernetes"]
17485
+ },
17486
+ // Data
17487
+ {
17488
+ slug: "data-science",
17489
+ name: "Data Science",
17490
+ description: "Languages used for data analysis, machine learning, and statistical computing.",
17491
+ aliases: ["data-science", "ml", "machine-learning", "ai"],
17492
+ targets: ["Data Science", "Machine Learning", "AI", "ML", "Data Analysis", "Analytics"]
17493
+ },
17494
+ {
17495
+ slug: "scientific",
17496
+ name: "Scientific Computing",
17497
+ description: "Languages used in research, numerical computing, and scientific simulations.",
17498
+ aliases: ["scientific", "scientific-computing", "hpc", "research"],
17499
+ targets: [
17500
+ "Scientific Computing",
17501
+ "Research",
17502
+ "HPC",
17503
+ "Numerical Computing",
17504
+ "Numerical Analysis",
17505
+ "Bioinformatics"
17506
+ ]
17507
+ },
17508
+ // Systems & Embedded
17509
+ {
17510
+ slug: "systems",
17511
+ name: "Systems",
17512
+ description: "Languages used for operating systems, system utilities, and native development.",
17513
+ aliases: ["systems", "systems-programming", "native"],
17514
+ targets: [
17515
+ "Systems",
17516
+ "Systems Programming",
17517
+ "Systems programming",
17518
+ "Operating Systems",
17519
+ "Native",
17520
+ "Native Applications",
17521
+ "Native applications"
17522
+ ]
17523
+ },
17524
+ {
17525
+ slug: "embedded",
17526
+ name: "Embedded",
17527
+ description: "Languages used in firmware, microcontrollers, and embedded hardware.",
17528
+ aliases: ["embedded", "firmware", "iot"],
17529
+ targets: [
17530
+ "Embedded",
17531
+ "Embedded Systems",
17532
+ "Embedded systems",
17533
+ "Firmware",
17534
+ "IoT",
17535
+ "Microcontroller Firmware"
17536
+ ]
17537
+ },
17538
+ // Game development
17539
+ {
17540
+ slug: "game-dev",
17541
+ name: "Game Development",
17542
+ description: "Languages used for building video games and game engines.",
17543
+ aliases: ["game-dev", "games", "game-development", "gamedev"],
17544
+ targets: ["Game Development", "Games", "2D Games", "3D Games", "Indie Games", "Modding"]
17545
+ },
17546
+ // Mobile
17547
+ {
17548
+ slug: "mobile",
17549
+ name: "Mobile",
17550
+ description: "Languages used for iOS, Android, and cross-platform mobile development.",
17551
+ aliases: ["mobile", "ios", "android"],
17552
+ targets: ["Mobile", "iOS", "Android", "Flutter", "Mobile Applications", "Mobile UI"]
17553
+ },
17554
+ // Blockchain
17555
+ {
17556
+ slug: "blockchain",
17557
+ name: "Blockchain",
17558
+ description: "Languages used for smart contracts, DeFi, and blockchain development.",
17559
+ aliases: ["blockchain", "web3", "smart-contracts", "crypto"],
17560
+ targets: ["Blockchain", "Smart Contracts", "Ethereum", "Web3", "EVM", "DeFi"]
17561
+ },
17562
+ // GPU / Graphics
17563
+ {
17564
+ slug: "gpu",
17565
+ name: "GPU",
17566
+ description: "Languages used for GPU computing, graphics, and shader programming.",
17567
+ aliases: ["gpu", "graphics", "gpu-programming"],
17568
+ targets: [
17569
+ "GPU Programming",
17570
+ "GPU Computing",
17571
+ "GPU Compute",
17572
+ "WebGPU",
17573
+ "WebGL",
17574
+ "DirectX",
17575
+ "Graphics",
17576
+ "Khronos"
17577
+ ]
17578
+ },
17579
+ // WebAssembly
17580
+ {
17581
+ slug: "wasm",
17582
+ name: "WebAssembly",
17583
+ description: "Languages that compile to or run on WebAssembly.",
17584
+ aliases: ["wasm", "webassembly"],
17585
+ targets: ["WebAssembly", "WASI", "WebAssembly Component Model"]
17586
+ },
17587
+ // Enterprise
17588
+ {
17589
+ slug: "enterprise",
17590
+ name: "Enterprise",
17591
+ description: "Languages used in large-scale enterprise software and business applications.",
17592
+ aliases: ["enterprise"],
17593
+ targets: ["Enterprise", "Enterprise Applications", "Enterprise Data", "Enterprise Integration"]
17594
+ },
17595
+ // Formal methods / Verification
17596
+ {
17597
+ slug: "formal-methods",
17598
+ name: "Formal Methods",
17599
+ description: "Languages used for formal proofs, verification, and correctness guarantees.",
17600
+ aliases: ["formal-methods", "verification", "proof-assistants"],
17601
+ targets: [
17602
+ "Formal Methods",
17603
+ "Formal methods",
17604
+ "Verification",
17605
+ "Proof Assistants",
17606
+ "Proof assistants",
17607
+ "Low-level Verification"
17608
+ ]
17609
+ },
17610
+ // Compilers / Language tooling
17611
+ {
17612
+ slug: "compilers",
17613
+ name: "Compilers",
17614
+ description: "Languages used in compiler development, language design, and tooling.",
17615
+ aliases: ["compilers", "language-design", "language-tooling"],
17616
+ targets: [
17617
+ "Compilers",
17618
+ "Language Design",
17619
+ "Language Research",
17620
+ "Language Tools",
17621
+ "Language Implementation",
17622
+ "Compiler Development"
17623
+ ]
17624
+ },
17625
+ // Unix / Linux
17626
+ {
17627
+ slug: "unix",
17628
+ name: "Unix",
17629
+ description: "Languages and tools used in Unix-like operating systems and shell environments.",
17630
+ aliases: ["unix", "linux", "posix"],
17631
+ targets: ["Unix", "Linux", "macOS", "BSD", "Operating systems"]
17632
+ },
17633
+ // Documentation / Publishing
17634
+ {
17635
+ slug: "documentation",
17636
+ name: "Documentation",
17637
+ description: "Languages used for writing, publishing, and technical documentation.",
17638
+ aliases: ["documentation", "publishing", "technical-writing"],
17639
+ targets: [
17640
+ "Documentation",
17641
+ "Publishing",
17642
+ "Technical Writing",
17643
+ "Technical writing",
17644
+ "Academic Writing",
17645
+ "Academic publishing"
17646
+ ]
17647
+ },
17648
+ // Configuration
17649
+ {
17650
+ slug: "configuration",
17651
+ name: "Configuration",
17652
+ description: "Languages used for application and infrastructure configuration.",
17653
+ aliases: ["configuration", "config"],
17654
+ targets: ["Configuration", "Configuration Management"]
17655
+ },
17656
+ // Scripting / Automation
17657
+ {
17658
+ slug: "automation",
17659
+ name: "Automation",
17660
+ description: "Languages used for task automation, scripting, and workflow orchestration.",
17661
+ aliases: ["automation", "scripting"],
17662
+ targets: ["Automation", "Scripting", "DevOps", "CLI", "CLI Tools"]
17663
+ },
17664
+ // Apple / macOS
17665
+ {
17666
+ slug: "apple",
17667
+ name: "Apple",
17668
+ description: "Languages used for macOS, iOS, and the broader Apple platform.",
17669
+ aliases: ["apple", "macos", "apple-platforms"],
17670
+ targets: ["Apple", "Apple Platforms", "macOS", "iOS", "tvOS", "visionOS", "iPadOS"]
17671
+ },
17672
+ // Windows
17673
+ {
17674
+ slug: "windows",
17675
+ name: "Windows",
17676
+ description: "Languages used for Windows application and system development.",
17677
+ aliases: ["windows"],
17678
+ targets: ["Windows", "Windows Forms", "WPF", "UWP", "Desktop Applications"]
17679
+ },
17680
+ // Observability
17681
+ {
17682
+ slug: "observability",
17683
+ name: "Observability",
17684
+ description: "Languages used for monitoring, metrics, logging, and security analytics.",
17685
+ aliases: ["observability", "monitoring", "metrics"],
17686
+ targets: ["Observability", "Monitoring", "Metrics", "Security analytics"]
17687
+ }
17688
+ ];
17689
+ function findEcosystem(value) {
17690
+ const key = value.trim().toLowerCase();
17691
+ return ECOSYSTEM_REGISTRY.find((e) => e.aliases.includes(key));
17692
+ }
17693
+ function matchesEcosystem(lang, targets) {
17694
+ const pool = lang.tooling?.ecosystems ?? [];
17695
+ return targets.some((t) => pool.some((s) => s.toLowerCase().includes(t.toLowerCase())));
17696
+ }
17697
+ function ecosystemInfoFromDefinition(def) {
17698
+ return {
17699
+ slug: def.slug,
17700
+ name: def.name,
17701
+ description: def.description,
17702
+ aliases: def.aliases
17703
+ };
17704
+ }
17705
+
17424
17706
  // src/domain/i18n/index.ts
17425
17707
  var localizeLanguage = (language, locale = "en") => {
17426
17708
  const { i18n, ...metadata } = language;
@@ -18026,7 +18308,6 @@ var languages = [
18026
18308
  // src/domain/package-manager/registry.ts
18027
18309
  var PACKAGE_MANAGER_REGISTRY = [
18028
18310
  {
18029
- slug: "npm",
18030
18311
  name: "npm",
18031
18312
  color: "#CB3837",
18032
18313
  logo: "https://cdn.simpleicons.org/npm",
@@ -18035,7 +18316,6 @@ var PACKAGE_MANAGER_REGISTRY = [
18035
18316
  targets: ["npm"]
18036
18317
  },
18037
18318
  {
18038
- slug: "pnpm",
18039
18319
  name: "pnpm",
18040
18320
  color: "#F69220",
18041
18321
  logo: "https://cdn.simpleicons.org/pnpm",
@@ -18044,7 +18324,6 @@ var PACKAGE_MANAGER_REGISTRY = [
18044
18324
  targets: ["pnpm"]
18045
18325
  },
18046
18326
  {
18047
- slug: "yarn",
18048
18327
  name: "Yarn",
18049
18328
  color: "#2C8EBB",
18050
18329
  logo: "https://cdn.simpleicons.org/yarn",
@@ -18053,7 +18332,6 @@ var PACKAGE_MANAGER_REGISTRY = [
18053
18332
  targets: ["Yarn"]
18054
18333
  },
18055
18334
  {
18056
- slug: "pip",
18057
18335
  name: "pip",
18058
18336
  color: "#3775A9",
18059
18337
  logo: "https://cdn.simpleicons.org/pypi",
@@ -18062,7 +18340,6 @@ var PACKAGE_MANAGER_REGISTRY = [
18062
18340
  targets: ["pip"]
18063
18341
  },
18064
18342
  {
18065
- slug: "poetry",
18066
18343
  name: "Poetry",
18067
18344
  color: "#60A5FA",
18068
18345
  logo: "https://cdn.simpleicons.org/poetry",
@@ -18071,7 +18348,6 @@ var PACKAGE_MANAGER_REGISTRY = [
18071
18348
  targets: ["Poetry"]
18072
18349
  },
18073
18350
  {
18074
- slug: "uv",
18075
18351
  name: "uv",
18076
18352
  color: "#DE5FE9",
18077
18353
  logo: "https://avatars.githubusercontent.com/u/115962839?v=4",
@@ -18080,7 +18356,6 @@ var PACKAGE_MANAGER_REGISTRY = [
18080
18356
  targets: ["uv"]
18081
18357
  },
18082
18358
  {
18083
- slug: "conda",
18084
18359
  name: "conda",
18085
18360
  color: "#44A833",
18086
18361
  logo: "https://cdn.simpleicons.org/anaconda",
@@ -18089,7 +18364,6 @@ var PACKAGE_MANAGER_REGISTRY = [
18089
18364
  targets: ["conda"]
18090
18365
  },
18091
18366
  {
18092
- slug: "cargo",
18093
18367
  name: "Cargo",
18094
18368
  color: "#CE422B",
18095
18369
  logo: "https://cdn.simpleicons.org/rust",
@@ -18098,7 +18372,6 @@ var PACKAGE_MANAGER_REGISTRY = [
18098
18372
  targets: ["Cargo"]
18099
18373
  },
18100
18374
  {
18101
- slug: "maven",
18102
18375
  name: "Maven",
18103
18376
  color: "#C71A36",
18104
18377
  logo: "https://cdn.simpleicons.org/apachemaven",
@@ -18107,7 +18380,6 @@ var PACKAGE_MANAGER_REGISTRY = [
18107
18380
  targets: ["Maven"]
18108
18381
  },
18109
18382
  {
18110
- slug: "gradle",
18111
18383
  name: "Gradle",
18112
18384
  color: "#02303A",
18113
18385
  logo: "https://cdn.simpleicons.org/gradle",
@@ -18116,7 +18388,6 @@ var PACKAGE_MANAGER_REGISTRY = [
18116
18388
  targets: ["Gradle"]
18117
18389
  },
18118
18390
  {
18119
- slug: "nuget",
18120
18391
  name: "NuGet",
18121
18392
  color: "#004880",
18122
18393
  logo: "https://cdn.simpleicons.org/nuget",
@@ -18125,7 +18396,6 @@ var PACKAGE_MANAGER_REGISTRY = [
18125
18396
  targets: ["NuGet"]
18126
18397
  },
18127
18398
  {
18128
- slug: "composer",
18129
18399
  name: "Composer",
18130
18400
  color: "#885630",
18131
18401
  logo: "https://cdn.simpleicons.org/composer",
@@ -18134,7 +18404,6 @@ var PACKAGE_MANAGER_REGISTRY = [
18134
18404
  targets: ["Composer"]
18135
18405
  },
18136
18406
  {
18137
- slug: "hex",
18138
18407
  name: "Hex",
18139
18408
  color: "#6E4A7E",
18140
18409
  logo: "https://cdn.simpleicons.org/elixir",
@@ -18143,7 +18412,6 @@ var PACKAGE_MANAGER_REGISTRY = [
18143
18412
  targets: ["Hex"]
18144
18413
  },
18145
18414
  {
18146
- slug: "mix",
18147
18415
  name: "Mix",
18148
18416
  color: "#6E4A7E",
18149
18417
  logo: "https://cdn.simpleicons.org/elixir",
@@ -18152,7 +18420,6 @@ var PACKAGE_MANAGER_REGISTRY = [
18152
18420
  targets: ["Mix"]
18153
18421
  },
18154
18422
  {
18155
- slug: "cabal",
18156
18423
  name: "Cabal",
18157
18424
  color: "#5D4F85",
18158
18425
  logo: "https://cdn.simpleicons.org/haskell",
@@ -18161,7 +18428,6 @@ var PACKAGE_MANAGER_REGISTRY = [
18161
18428
  targets: ["Cabal"]
18162
18429
  },
18163
18430
  {
18164
- slug: "stack",
18165
18431
  name: "Stack",
18166
18432
  color: "#5D4F85",
18167
18433
  logo: "https://cdn.simpleicons.org/haskell",
@@ -18170,7 +18436,6 @@ var PACKAGE_MANAGER_REGISTRY = [
18170
18436
  targets: ["Stack"]
18171
18437
  },
18172
18438
  {
18173
- slug: "pub",
18174
18439
  name: "pub",
18175
18440
  color: "#0175C2",
18176
18441
  logo: "https://cdn.simpleicons.org/dart",
@@ -18179,7 +18444,6 @@ var PACKAGE_MANAGER_REGISTRY = [
18179
18444
  targets: ["pub"]
18180
18445
  },
18181
18446
  {
18182
- slug: "cocoapods",
18183
18447
  name: "CocoaPods",
18184
18448
  color: "#EE3322",
18185
18449
  logo: "https://cdn.simpleicons.org/cocoapods",
@@ -18188,7 +18452,6 @@ var PACKAGE_MANAGER_REGISTRY = [
18188
18452
  targets: ["CocoaPods"]
18189
18453
  },
18190
18454
  {
18191
- slug: "spm",
18192
18455
  name: "Swift PM",
18193
18456
  color: "#F05138",
18194
18457
  logo: "https://cdn.simpleicons.org/swift",
@@ -18197,7 +18460,6 @@ var PACKAGE_MANAGER_REGISTRY = [
18197
18460
  targets: ["Swift Package Manager"]
18198
18461
  },
18199
18462
  {
18200
- slug: "rubygems",
18201
18463
  name: "RubyGems",
18202
18464
  color: "#E9573F",
18203
18465
  logo: "https://cdn.simpleicons.org/rubygems",
@@ -18206,7 +18468,6 @@ var PACKAGE_MANAGER_REGISTRY = [
18206
18468
  targets: ["RubyGems", "Bundler"]
18207
18469
  },
18208
18470
  {
18209
- slug: "go-mod",
18210
18471
  name: "Go modules",
18211
18472
  color: "#00ADD8",
18212
18473
  logo: "https://cdn.simpleicons.org/go",
@@ -18215,7 +18476,6 @@ var PACKAGE_MANAGER_REGISTRY = [
18215
18476
  targets: ["Go modules"]
18216
18477
  },
18217
18478
  {
18218
- slug: "luarocks",
18219
18479
  name: "LuaRocks",
18220
18480
  color: "#2C2D72",
18221
18481
  logo: "https://cdn.simpleicons.org/lua",
@@ -18224,7 +18484,6 @@ var PACKAGE_MANAGER_REGISTRY = [
18224
18484
  targets: ["LuaRocks"]
18225
18485
  },
18226
18486
  {
18227
- slug: "opam",
18228
18487
  name: "Opam",
18229
18488
  color: "#EF7A08",
18230
18489
  logo: "https://avatars.githubusercontent.com/u/1841483?v=4",
@@ -18233,7 +18492,6 @@ var PACKAGE_MANAGER_REGISTRY = [
18233
18492
  targets: ["opam"]
18234
18493
  },
18235
18494
  {
18236
- slug: "cpan",
18237
18495
  name: "CPAN",
18238
18496
  color: "#39457E",
18239
18497
  logo: "https://cdn.simpleicons.org/perl",
@@ -18251,8 +18509,9 @@ function matchesPackageManager(lang, targets) {
18251
18509
  return targets.some((t) => pool.some((s) => s.toLowerCase().includes(t.toLowerCase())));
18252
18510
  }
18253
18511
  function packageManagerInfoFromDefinition(def) {
18512
+ const slug = def.aliases[0] ?? def.name.toLowerCase();
18254
18513
  return {
18255
- slug: def.slug,
18514
+ slug,
18256
18515
  name: def.name,
18257
18516
  website: def.website,
18258
18517
  logo: def.logo,
@@ -18261,6 +18520,145 @@ function packageManagerInfoFromDefinition(def) {
18261
18520
  };
18262
18521
  }
18263
18522
 
18523
+ // src/domain/paradigm/registry.ts
18524
+ var PARADIGM_REGISTRY = [
18525
+ {
18526
+ slug: "functional",
18527
+ name: "Functional",
18528
+ description: "Computation through function evaluation, immutability, and avoiding side effects.",
18529
+ aliases: ["functional", "fp", "pure-functional"],
18530
+ targets: ["functional", "pure functional", "pure"]
18531
+ },
18532
+ {
18533
+ slug: "object-oriented",
18534
+ name: "Object-Oriented",
18535
+ description: "Organizes code around objects with encapsulation, inheritance, and polymorphism.",
18536
+ aliases: ["object-oriented", "oop", "object-oriented-programming"],
18537
+ targets: ["object-oriented", "class-based", "prototype-based"]
18538
+ },
18539
+ {
18540
+ slug: "imperative",
18541
+ name: "Imperative",
18542
+ description: "Specifies sequences of statements that change program state step by step.",
18543
+ aliases: ["imperative", "procedural"],
18544
+ targets: ["imperative", "procedural", "structured"]
18545
+ },
18546
+ {
18547
+ slug: "declarative",
18548
+ name: "Declarative",
18549
+ description: "Expresses the logic of a computation without describing control flow.",
18550
+ aliases: ["declarative"],
18551
+ targets: ["declarative"]
18552
+ },
18553
+ {
18554
+ slug: "logic",
18555
+ name: "Logic",
18556
+ description: "Programs expressed as logical facts, rules, and constraints.",
18557
+ aliases: ["logic", "logic-programming", "constraint"],
18558
+ targets: ["logic", "constraint", "relational"]
18559
+ },
18560
+ {
18561
+ slug: "concurrent",
18562
+ name: "Concurrent",
18563
+ description: "Languages with first-class support for concurrency, actors, and message passing.",
18564
+ aliases: ["concurrent", "actor-model", "parallel"],
18565
+ targets: ["concurrent", "actor-model", "message-passing", "parallel", "distributed"]
18566
+ },
18567
+ {
18568
+ slug: "reactive",
18569
+ name: "Reactive",
18570
+ description: "Languages oriented around data flows and propagation of change.",
18571
+ aliases: ["reactive", "dataflow", "event-driven"],
18572
+ targets: ["reactive", "dataflow", "event-driven"]
18573
+ },
18574
+ {
18575
+ slug: "generic",
18576
+ name: "Generic",
18577
+ description: "Languages with parametric polymorphism and generic type abstractions.",
18578
+ aliases: ["generic", "generics"],
18579
+ targets: ["generic"]
18580
+ },
18581
+ {
18582
+ slug: "scripting",
18583
+ name: "Scripting",
18584
+ description: "Languages designed for automation, shell scripting, and task execution.",
18585
+ aliases: ["scripting", "shell"],
18586
+ targets: ["scripting", "shell"]
18587
+ },
18588
+ {
18589
+ slug: "query",
18590
+ name: "Query",
18591
+ description: "Languages for querying structured data sources and databases.",
18592
+ aliases: ["query", "querying"],
18593
+ targets: ["query"]
18594
+ },
18595
+ {
18596
+ slug: "markup",
18597
+ name: "Markup",
18598
+ description: "Languages for annotating documents with structural tags and formatting.",
18599
+ aliases: ["markup"],
18600
+ targets: ["markup", "hypertext"]
18601
+ },
18602
+ {
18603
+ slug: "templating",
18604
+ name: "Templating",
18605
+ description: "Languages for generating text documents from parameterized templates.",
18606
+ aliases: ["templating", "template"],
18607
+ targets: ["templating", "template"]
18608
+ },
18609
+ {
18610
+ slug: "array",
18611
+ name: "Array",
18612
+ description: "Languages built around vectorized array and matrix operations.",
18613
+ aliases: ["array", "array-oriented"],
18614
+ targets: ["array", "array-oriented"]
18615
+ },
18616
+ {
18617
+ slug: "metaprogramming",
18618
+ name: "Metaprogramming",
18619
+ description: "Languages with strong support for macros, code generation, and reflection.",
18620
+ aliases: ["metaprogramming", "meta", "macro"],
18621
+ targets: ["metaprogramming", "meta-programming", "macro"]
18622
+ },
18623
+ {
18624
+ slug: "systems",
18625
+ name: "Systems",
18626
+ description: "Low-level languages designed for systems, embedded, and OS programming.",
18627
+ aliases: ["systems", "low-level"],
18628
+ targets: ["systems", "low-level"]
18629
+ },
18630
+ {
18631
+ slug: "stack-based",
18632
+ name: "Stack-Based",
18633
+ description: "Languages where computation operates on an explicit stack.",
18634
+ aliases: ["stack-based", "concatenative", "stack"],
18635
+ targets: ["stack-based", "concatenative"]
18636
+ },
18637
+ {
18638
+ slug: "shader",
18639
+ name: "Shader",
18640
+ description: "Languages for GPU programming, graphics pipelines, and shader stages.",
18641
+ aliases: ["shader", "shading", "gpu"],
18642
+ targets: ["shader", "shading", "gpu-programming", "gpu-compute"]
18643
+ }
18644
+ ];
18645
+ function findParadigm(value) {
18646
+ const key = value.trim().toLowerCase();
18647
+ return PARADIGM_REGISTRY.find((p) => p.aliases.includes(key));
18648
+ }
18649
+ function matchesParadigm(lang, targets) {
18650
+ const pool = lang.paradigms;
18651
+ return targets.some((t) => pool.some((s) => s.toLowerCase().includes(t.toLowerCase())));
18652
+ }
18653
+ function paradigmInfoFromDefinition(def) {
18654
+ return {
18655
+ slug: def.slug,
18656
+ name: def.name,
18657
+ description: def.description,
18658
+ aliases: def.aliases
18659
+ };
18660
+ }
18661
+
18264
18662
  // src/domain/runtime/registry.ts
18265
18663
  var RUNTIME_REGISTRY = [
18266
18664
  // JavaScript runtimes
@@ -18759,6 +19157,7 @@ function runtimesForPackageManager(targets) {
18759
19157
 
18760
19158
  // src/api.ts
18761
19159
  var defaultLocale = "en";
19160
+ var languageMap = new Map(languages.map((l) => [l.slug, l]));
18762
19161
  var normalizeLanguageSlug = (slug) => slug.trim().toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9-]/g, "");
18763
19162
  var localizeOptionalLanguage = (language, locale) => language ? localizeLanguage(language, locale) : void 0;
18764
19163
  var createLanguageRequest = (getLanguage, loadLanguageModule) => {
@@ -18800,7 +19199,7 @@ var loadDetectedLanguages = async (filename) => {
18800
19199
  );
18801
19200
  return detectedLanguages.filter((language) => Boolean(language));
18802
19201
  };
18803
- var getLanguageBySlug = (slug) => languages.find((language) => language.slug === slug);
19202
+ var getLanguageBySlug = (slug) => languageMap.get(slug);
18804
19203
  var getDetectedLanguages = (filename) => detectLanguageSlugs(filename).map((slug) => getLanguageBySlug(slug)).filter((language) => Boolean(language));
18805
19204
  var api = {
18806
19205
  /**
@@ -18814,7 +19213,7 @@ var api = {
18814
19213
  language(slug) {
18815
19214
  const normalizedSlug = normalizeLanguageSlug(slug);
18816
19215
  return createLanguageRequest(
18817
- () => languages.find((language) => language.slug === normalizedSlug),
19216
+ () => languageMap.get(normalizedSlug),
18818
19217
  () => loadLanguage(normalizedSlug)
18819
19218
  );
18820
19219
  },
@@ -18932,6 +19331,58 @@ var api = {
18932
19331
  }
18933
19332
  };
18934
19333
  },
19334
+ /**
19335
+ * Selects every language that uses the given programming paradigm.
19336
+ *
19337
+ * Accepts common aliases: 'functional', 'fp', 'object-oriented', 'oop', 'declarative', etc.
19338
+ * Searches `language.paradigms`.
19339
+ *
19340
+ * @example
19341
+ * api.paradigm('functional').langs().locale('es').get();
19342
+ * api.paradigm('oop').info();
19343
+ */
19344
+ paradigm(value) {
19345
+ const definition = findParadigm(value);
19346
+ const targets = definition?.targets ?? [value];
19347
+ return {
19348
+ info() {
19349
+ return definition ? paradigmInfoFromDefinition(definition) : void 0;
19350
+ },
19351
+ langs() {
19352
+ const filtered = () => languages.filter((lang) => matchesParadigm(lang, targets));
19353
+ return createLanguageCollectionRequest(filtered, async () => {
19354
+ const loaded = await Promise.all(filtered().map((lang) => loadLanguage(lang.slug)));
19355
+ return loaded.filter((lang) => Boolean(lang));
19356
+ });
19357
+ }
19358
+ };
19359
+ },
19360
+ /**
19361
+ * Selects every language that belongs to the given ecosystem.
19362
+ *
19363
+ * Accepts common aliases: 'web', 'jvm', 'dotnet', 'devops', 'data-science', 'embedded', etc.
19364
+ * Searches `tooling.ecosystems`.
19365
+ *
19366
+ * @example
19367
+ * api.ecosystem('jvm').langs().locale('es').get();
19368
+ * api.ecosystem('blockchain').info();
19369
+ */
19370
+ ecosystem(value) {
19371
+ const definition = findEcosystem(value);
19372
+ const targets = definition?.targets ?? [value];
19373
+ return {
19374
+ info() {
19375
+ return definition ? ecosystemInfoFromDefinition(definition) : void 0;
19376
+ },
19377
+ langs() {
19378
+ const filtered = () => languages.filter((lang) => matchesEcosystem(lang, targets));
19379
+ return createLanguageCollectionRequest(filtered, async () => {
19380
+ const loaded = await Promise.all(filtered().map((lang) => loadLanguage(lang.slug)));
19381
+ return loaded.filter((lang) => Boolean(lang));
19382
+ });
19383
+ }
19384
+ };
19385
+ },
18935
19386
  /**
18936
19387
  * Detects every matching language for a filename or path.
18937
19388
  *