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