@vadimcomanescu/nadicode-design-system 2.0.8 → 2.0.9

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.
@@ -10,7 +10,7 @@ Binary rules for consumer apps using the Seed Design System. Every rule is non-n
10
10
  ## Component Catalog
11
11
 
12
12
  Start with `consumer-contract.json` (shipped in the package under `contracts/`) for the machine-readable entrypoint map and ownership rules. Then read catalog.json (shipped in the package under dist/) for the authoritative list of components, variant names, props, and tiers. Verify component names and variant values against the catalog. Do not guess variant names or prop values.
13
- Registry digest: `sha256:8d4c41b59ad4154a0e8af35ca1c79510dc42379c2fb5100b0fa7fcd22b12fea3`
13
+ Registry digest: `sha256:b5370c96c1bb877883860055c4b3d2c7c67ef7c2b1df4acacd7ea5cb0847da78`
14
14
 
15
15
  ## Import Rules
16
16
 
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
- "generatedAt": "2026-03-26T09:55:16.565Z",
3
+ "generatedAt": "2026-03-26T10:57:12.195Z",
4
4
  "package": {
5
5
  "name": "@vadimcomanescu/nadicode-design-system",
6
- "version": "2.0.8",
6
+ "version": "2.0.9",
7
7
  "distributionModel": "package-backed",
8
8
  "install": {
9
9
  "canonicalStrategy": "exact-version-package-install",
@@ -73,20 +73,7 @@
73
73
  "Administrative lock policy orchestration",
74
74
  "Support ticketing backend implementation"
75
75
  ]
76
- },
77
- "forbiddenComponents": [
78
- "./metric-card",
79
- "./chart-card",
80
- "./data-table",
81
- "./kanban-board",
82
- "./sidebar",
83
- "./agent-conversation-block",
84
- "./hero-block",
85
- "./pricing-block",
86
- "./feature-block",
87
- "./faq-block",
88
- "./call-to-action-block"
89
- ]
76
+ }
90
77
  }
91
78
  },
92
79
  {
@@ -271,20 +258,7 @@
271
258
  "Sandbox/process execution orchestration",
272
259
  "Persistence strategy for run logs and artifacts"
273
260
  ]
274
- },
275
- "forbiddenComponents": [
276
- "./login-block",
277
- "./reset-password-block",
278
- "./password-recovery-block",
279
- "./two-factor-challenge-block",
280
- "./account-locked-block",
281
- "./auth-success-block",
282
- "./hero-block",
283
- "./pricing-block",
284
- "./feature-block",
285
- "./call-to-action-block",
286
- "./newsletter-block"
287
- ]
261
+ }
288
262
  }
289
263
  },
290
264
  {
@@ -368,20 +342,7 @@
368
342
  "Real-time stream fanout for analytics pipelines",
369
343
  "Domain-specific anomaly detection policies"
370
344
  ]
371
- },
372
- "forbiddenComponents": [
373
- "./login-block",
374
- "./reset-password-block",
375
- "./password-recovery-block",
376
- "./two-factor-challenge-block",
377
- "./account-locked-block",
378
- "./auth-success-block",
379
- "./hero-block",
380
- "./pricing-block",
381
- "./feature-block",
382
- "./call-to-action-block",
383
- "./newsletter-block"
384
- ]
345
+ }
385
346
  }
386
347
  },
387
348
  {
@@ -751,19 +712,7 @@
751
712
  "Search indexing and ranking policy engines",
752
713
  "Content moderation backend orchestration"
753
714
  ]
754
- },
755
- "forbiddenComponents": [
756
- "./data-table",
757
- "./kanban-board",
758
- "./agent-conversation-block",
759
- "./form-wizard",
760
- "./sidebar",
761
- "./login-block",
762
- "./reset-password-block",
763
- "./password-recovery-block",
764
- "./two-factor-challenge-block",
765
- "./account-locked-block"
766
- ]
715
+ }
767
716
  }
768
717
  },
769
718
  {
@@ -1308,19 +1257,7 @@
1308
1257
  "PCI-sensitive backend tokenization workflows",
1309
1258
  "Financial ledger reconciliation implementation"
1310
1259
  ]
1311
- },
1312
- "forbiddenComponents": [
1313
- "./data-table",
1314
- "./kanban-board",
1315
- "./agent-conversation-block",
1316
- "./form-wizard",
1317
- "./sidebar",
1318
- "./login-block",
1319
- "./reset-password-block",
1320
- "./password-recovery-block",
1321
- "./two-factor-challenge-block",
1322
- "./account-locked-block"
1323
- ]
1260
+ }
1324
1261
  }
1325
1262
  },
1326
1263
  {
@@ -1421,19 +1358,7 @@
1421
1358
  "Scheduling provider API orchestration",
1422
1359
  "CRM record mutation policy decisions"
1423
1360
  ]
1424
- },
1425
- "forbiddenComponents": [
1426
- "./data-table",
1427
- "./kanban-board",
1428
- "./agent-conversation-block",
1429
- "./form-wizard",
1430
- "./sidebar",
1431
- "./login-block",
1432
- "./reset-password-block",
1433
- "./password-recovery-block",
1434
- "./two-factor-challenge-block",
1435
- "./account-locked-block"
1436
- ]
1361
+ }
1437
1362
  }
1438
1363
  },
1439
1364
  {
@@ -1607,20 +1532,7 @@
1607
1532
  "Retry queue durability guarantees",
1608
1533
  "Audit-log append policy decisions"
1609
1534
  ]
1610
- },
1611
- "forbiddenComponents": [
1612
- "./login-block",
1613
- "./reset-password-block",
1614
- "./password-recovery-block",
1615
- "./two-factor-challenge-block",
1616
- "./account-locked-block",
1617
- "./auth-success-block",
1618
- "./hero-block",
1619
- "./pricing-block",
1620
- "./feature-block",
1621
- "./call-to-action-block",
1622
- "./newsletter-block"
1623
- ]
1535
+ }
1624
1536
  }
1625
1537
  },
1626
1538
  {
@@ -1672,20 +1584,7 @@
1672
1584
  "Search index synchronization scheduling",
1673
1585
  "Per-tenant data retention policy decisions"
1674
1586
  ]
1675
- },
1676
- "forbiddenComponents": [
1677
- "./login-block",
1678
- "./reset-password-block",
1679
- "./password-recovery-block",
1680
- "./two-factor-challenge-block",
1681
- "./account-locked-block",
1682
- "./auth-success-block",
1683
- "./hero-block",
1684
- "./pricing-block",
1685
- "./feature-block",
1686
- "./call-to-action-block",
1687
- "./newsletter-block"
1688
- ]
1587
+ }
1689
1588
  }
1690
1589
  },
1691
1590
  {
@@ -1733,20 +1632,7 @@
1733
1632
  "Background job scheduling for dashboard hydration",
1734
1633
  "Multi-tenant access-control policy evaluation"
1735
1634
  ]
1736
- },
1737
- "forbiddenComponents": [
1738
- "./login-block",
1739
- "./reset-password-block",
1740
- "./password-recovery-block",
1741
- "./two-factor-challenge-block",
1742
- "./account-locked-block",
1743
- "./auth-success-block",
1744
- "./hero-block",
1745
- "./pricing-block",
1746
- "./feature-block",
1747
- "./call-to-action-block",
1748
- "./newsletter-block"
1749
- ]
1635
+ }
1750
1636
  }
1751
1637
  },
1752
1638
  {
@@ -1934,8 +1820,7 @@
1934
1820
  "Server retry orchestration policy",
1935
1821
  "Infrastructure incident remediation workflows"
1936
1822
  ]
1937
- },
1938
- "forbiddenComponents": []
1823
+ }
1939
1824
  }
1940
1825
  },
1941
1826
  {
@@ -3668,20 +3553,7 @@
3668
3553
  "Workflow state machine policy enforcement",
3669
3554
  "Cross-service event-bus synchronization semantics"
3670
3555
  ]
3671
- },
3672
- "forbiddenComponents": [
3673
- "./login-block",
3674
- "./reset-password-block",
3675
- "./password-recovery-block",
3676
- "./two-factor-challenge-block",
3677
- "./account-locked-block",
3678
- "./auth-success-block",
3679
- "./hero-block",
3680
- "./pricing-block",
3681
- "./feature-block",
3682
- "./call-to-action-block",
3683
- "./newsletter-block"
3684
- ]
3556
+ }
3685
3557
  }
3686
3558
  },
3687
3559
  {
@@ -3809,19 +3681,7 @@
3809
3681
  "Marketing attribution data collection pipelines",
3810
3682
  "A/B experiment assignment and analytics transport"
3811
3683
  ]
3812
- },
3813
- "forbiddenComponents": [
3814
- "./data-table",
3815
- "./kanban-board",
3816
- "./agent-conversation-block",
3817
- "./form-wizard",
3818
- "./sidebar",
3819
- "./login-block",
3820
- "./reset-password-block",
3821
- "./password-recovery-block",
3822
- "./two-factor-challenge-block",
3823
- "./account-locked-block"
3824
- ]
3684
+ }
3825
3685
  }
3826
3686
  },
3827
3687
  {
@@ -3919,20 +3779,7 @@
3919
3779
  "Session token storage policy",
3920
3780
  "Backend API adapter implementation"
3921
3781
  ]
3922
- },
3923
- "forbiddenComponents": [
3924
- "./metric-card",
3925
- "./chart-card",
3926
- "./data-table",
3927
- "./kanban-board",
3928
- "./sidebar",
3929
- "./agent-conversation-block",
3930
- "./hero-block",
3931
- "./pricing-block",
3932
- "./feature-block",
3933
- "./faq-block",
3934
- "./call-to-action-block"
3935
- ]
3782
+ }
3936
3783
  }
3937
3784
  },
3938
3785
  {
@@ -4084,19 +3931,7 @@
4084
3931
  "Route middleware or auth policy wiring",
4085
3932
  "Backend data orchestration"
4086
3933
  ]
4087
- },
4088
- "forbiddenComponents": [
4089
- "./data-table",
4090
- "./kanban-board",
4091
- "./agent-conversation-block",
4092
- "./form-wizard",
4093
- "./sidebar",
4094
- "./login-block",
4095
- "./reset-password-block",
4096
- "./password-recovery-block",
4097
- "./two-factor-challenge-block",
4098
- "./account-locked-block"
4099
- ]
3934
+ }
4100
3935
  }
4101
3936
  },
4102
3937
  {
@@ -4286,15 +4121,7 @@
4286
4121
  "Authentication provider initialization",
4287
4122
  "Database and API client bootstrapping"
4288
4123
  ]
4289
- },
4290
- "forbiddenComponents": [
4291
- "./login-block",
4292
- "./reset-password-block",
4293
- "./password-recovery-block",
4294
- "./two-factor-challenge-block",
4295
- "./account-locked-block",
4296
- "./auth-success-block"
4297
- ]
4124
+ }
4298
4125
  }
4299
4126
  },
4300
4127
  {
@@ -4386,20 +4213,7 @@
4386
4213
  "Background onboarding task scheduling",
4387
4214
  "Tenant bootstrap transaction guarantees"
4388
4215
  ]
4389
- },
4390
- "forbiddenComponents": [
4391
- "./login-block",
4392
- "./reset-password-block",
4393
- "./password-recovery-block",
4394
- "./two-factor-challenge-block",
4395
- "./account-locked-block",
4396
- "./auth-success-block",
4397
- "./hero-block",
4398
- "./pricing-block",
4399
- "./feature-block",
4400
- "./call-to-action-block",
4401
- "./newsletter-block"
4402
- ]
4216
+ }
4403
4217
  }
4404
4218
  },
4405
4219
  {
@@ -4537,19 +4351,7 @@
4537
4351
  "Billing ledger mutation orchestration",
4538
4352
  "PCI-sensitive token handling"
4539
4353
  ]
4540
- },
4541
- "forbiddenComponents": [
4542
- "./data-table",
4543
- "./kanban-board",
4544
- "./agent-conversation-block",
4545
- "./form-wizard",
4546
- "./sidebar",
4547
- "./login-block",
4548
- "./reset-password-block",
4549
- "./password-recovery-block",
4550
- "./two-factor-challenge-block",
4551
- "./account-locked-block"
4552
- ]
4354
+ }
4553
4355
  }
4554
4356
  },
4555
4357
  {
@@ -4612,20 +4414,7 @@
4612
4414
  "Account merge conflict resolution",
4613
4415
  "Identity-provider synchronization workflows"
4614
4416
  ]
4615
- },
4616
- "forbiddenComponents": [
4617
- "./login-block",
4618
- "./reset-password-block",
4619
- "./password-recovery-block",
4620
- "./two-factor-challenge-block",
4621
- "./account-locked-block",
4622
- "./auth-success-block",
4623
- "./hero-block",
4624
- "./pricing-block",
4625
- "./feature-block",
4626
- "./call-to-action-block",
4627
- "./newsletter-block"
4628
- ]
4417
+ }
4629
4418
  }
4630
4419
  },
4631
4420
  {
@@ -4744,20 +4533,7 @@
4744
4533
  "Auth token issuance implementation",
4745
4534
  "Backend exception mapping"
4746
4535
  ]
4747
- },
4748
- "forbiddenComponents": [
4749
- "./metric-card",
4750
- "./chart-card",
4751
- "./data-table",
4752
- "./kanban-board",
4753
- "./sidebar",
4754
- "./agent-conversation-block",
4755
- "./hero-block",
4756
- "./pricing-block",
4757
- "./feature-block",
4758
- "./faq-block",
4759
- "./call-to-action-block"
4760
- ]
4536
+ }
4761
4537
  }
4762
4538
  },
4763
4539
  {
@@ -4799,20 +4575,7 @@
4799
4575
  "Session invalidation policy",
4800
4576
  "Backend identity provider adapters"
4801
4577
  ]
4802
- },
4803
- "forbiddenComponents": [
4804
- "./metric-card",
4805
- "./chart-card",
4806
- "./data-table",
4807
- "./kanban-board",
4808
- "./sidebar",
4809
- "./agent-conversation-block",
4810
- "./hero-block",
4811
- "./pricing-block",
4812
- "./feature-block",
4813
- "./faq-block",
4814
- "./call-to-action-block"
4815
- ]
4578
+ }
4816
4579
  }
4817
4580
  },
4818
4581
  {
@@ -4950,19 +4713,7 @@
4950
4713
  "Lead scoring and assignment policy engines",
4951
4714
  "Backend service-quote orchestration"
4952
4715
  ]
4953
- },
4954
- "forbiddenComponents": [
4955
- "./data-table",
4956
- "./kanban-board",
4957
- "./agent-conversation-block",
4958
- "./form-wizard",
4959
- "./sidebar",
4960
- "./login-block",
4961
- "./reset-password-block",
4962
- "./password-recovery-block",
4963
- "./two-factor-challenge-block",
4964
- "./account-locked-block"
4965
- ]
4716
+ }
4966
4717
  }
4967
4718
  },
4968
4719
  {
@@ -5032,20 +4783,7 @@
5032
4783
  "Feature-flag rollout orchestration",
5033
4784
  "Authorization policy persistence"
5034
4785
  ]
5035
- },
5036
- "forbiddenComponents": [
5037
- "./login-block",
5038
- "./reset-password-block",
5039
- "./password-recovery-block",
5040
- "./two-factor-challenge-block",
5041
- "./account-locked-block",
5042
- "./auth-success-block",
5043
- "./hero-block",
5044
- "./pricing-block",
5045
- "./feature-block",
5046
- "./call-to-action-block",
5047
- "./newsletter-block"
5048
- ]
4786
+ }
5049
4787
  }
5050
4788
  },
5051
4789
  {
@@ -5143,20 +4881,7 @@
5143
4881
  "User provisioning side-effects",
5144
4882
  "Route middleware policy decisions"
5145
4883
  ]
5146
- },
5147
- "forbiddenComponents": [
5148
- "./metric-card",
5149
- "./chart-card",
5150
- "./data-table",
5151
- "./kanban-board",
5152
- "./sidebar",
5153
- "./agent-conversation-block",
5154
- "./hero-block",
5155
- "./pricing-block",
5156
- "./feature-block",
5157
- "./faq-block",
5158
- "./call-to-action-block"
5159
- ]
4884
+ }
5160
4885
  }
5161
4886
  },
5162
4887
  {
@@ -5417,20 +5142,7 @@
5417
5142
  "Provider-specific callback endpoint logic",
5418
5143
  "Session or credential persistence behavior"
5419
5144
  ]
5420
- },
5421
- "forbiddenComponents": [
5422
- "./metric-card",
5423
- "./chart-card",
5424
- "./data-table",
5425
- "./kanban-board",
5426
- "./sidebar",
5427
- "./agent-conversation-block",
5428
- "./hero-block",
5429
- "./pricing-block",
5430
- "./feature-block",
5431
- "./faq-block",
5432
- "./call-to-action-block"
5433
- ]
5145
+ }
5434
5146
  }
5435
5147
  },
5436
5148
  {
@@ -5549,20 +5261,7 @@
5549
5261
  "Identity-provider invite token issuance",
5550
5262
  "Org-level policy persistence transactions"
5551
5263
  ]
5552
- },
5553
- "forbiddenComponents": [
5554
- "./login-block",
5555
- "./reset-password-block",
5556
- "./password-recovery-block",
5557
- "./two-factor-challenge-block",
5558
- "./account-locked-block",
5559
- "./auth-success-block",
5560
- "./hero-block",
5561
- "./pricing-block",
5562
- "./feature-block",
5563
- "./call-to-action-block",
5564
- "./newsletter-block"
5565
- ]
5264
+ }
5566
5265
  }
5567
5266
  },
5568
5267
  {
@@ -5925,20 +5624,7 @@
5925
5624
  "OTP secret provisioning and storage",
5926
5625
  "Session trust policy decisions"
5927
5626
  ]
5928
- },
5929
- "forbiddenComponents": [
5930
- "./metric-card",
5931
- "./chart-card",
5932
- "./data-table",
5933
- "./kanban-board",
5934
- "./sidebar",
5935
- "./agent-conversation-block",
5936
- "./hero-block",
5937
- "./pricing-block",
5938
- "./feature-block",
5939
- "./faq-block",
5940
- "./call-to-action-block"
5941
- ]
5627
+ }
5942
5628
  }
5943
5629
  },
5944
5630
  {
@@ -6034,20 +5720,7 @@
6034
5720
  "Identity-provider state synchronization",
6035
5721
  "Backend verification API adapters"
6036
5722
  ]
6037
- },
6038
- "forbiddenComponents": [
6039
- "./metric-card",
6040
- "./chart-card",
6041
- "./data-table",
6042
- "./kanban-board",
6043
- "./sidebar",
6044
- "./agent-conversation-block",
6045
- "./hero-block",
6046
- "./pricing-block",
6047
- "./feature-block",
6048
- "./faq-block",
6049
- "./call-to-action-block"
6050
- ]
5723
+ }
6051
5724
  }
6052
5725
  },
6053
5726
  {
@@ -6120,20 +5793,7 @@
6120
5793
  "Audio device permission persistence policy",
6121
5794
  "LLM backend provider routing implementation"
6122
5795
  ]
6123
- },
6124
- "forbiddenComponents": [
6125
- "./login-block",
6126
- "./reset-password-block",
6127
- "./password-recovery-block",
6128
- "./two-factor-challenge-block",
6129
- "./account-locked-block",
6130
- "./auth-success-block",
6131
- "./hero-block",
6132
- "./pricing-block",
6133
- "./feature-block",
6134
- "./call-to-action-block",
6135
- "./newsletter-block"
6136
- ]
5796
+ }
6137
5797
  }
6138
5798
  },
6139
5799
  {
@@ -178,14 +178,6 @@
178
178
  "pattern": "^\\./"
179
179
  }
180
180
  },
181
- "forbiddenComponents": {
182
- "type": "array",
183
- "items": {
184
- "type": "string",
185
- "pattern": "^\\./"
186
- },
187
- "description": "Subpaths that must NEVER be imported alongside this page-kit. Prevents cross-domain contamination."
188
- },
189
181
  "ownershipBoundaries": {
190
182
  "type": "object",
191
183
  "additionalProperties": false,
package/dist/catalog.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": "1.1.0",
3
- "version": "2.0.8",
4
- "generatedAt": "2026-03-26T09:55:14.398Z",
3
+ "version": "2.0.9",
4
+ "generatedAt": "2026-03-26T10:57:10.347Z",
5
5
  "components": {
6
6
  "Accordion": {
7
7
  "file": "src/components/ui/Accordion.tsx",
@@ -22,7 +22,6 @@ export const nadicodeRules = {
22
22
  "nadicode/no-falsy-and-render": "error",
23
23
  "nadicode/no-forbidden-bespoke-chat-primitive": "error",
24
24
  "nadicode/no-forbidden-chat-class-usage": "error",
25
- "nadicode/no-forbidden-page-kit-import": "error",
26
25
  "nadicode/no-forbidden-tokens": "error",
27
26
  "nadicode/no-forward-ref": "error",
28
27
  "nadicode/no-hardcoded-inline-color": "error",
@@ -11,7 +11,6 @@ import noExternalUiLibrary from "./rules/no-external-ui-library.js";
11
11
  import noFalsyAndRender from "./rules/no-falsy-and-render.js";
12
12
  import noForbiddenBespokeChatPrimitive from "./rules/no-forbidden-bespoke-chat-primitive.js";
13
13
  import noForbiddenChatClassUsage from "./rules/no-forbidden-chat-class-usage.js";
14
- import noForbiddenPageKitImport from "./rules/no-forbidden-page-kit-import.js";
15
14
  import noForbiddenTokens from "./rules/no-forbidden-tokens.js";
16
15
  import noForwardRef from "./rules/no-forward-ref.js";
17
16
  import noFramerMotionImport from "./rules/no-framer-motion-import.js";
@@ -88,7 +87,6 @@ export const nadicodePlugin = {
88
87
  "no-falsy-and-render": noFalsyAndRender,
89
88
  "no-forbidden-bespoke-chat-primitive": noForbiddenBespokeChatPrimitive,
90
89
  "no-forbidden-chat-class-usage": noForbiddenChatClassUsage,
91
- "no-forbidden-page-kit-import": noForbiddenPageKitImport,
92
90
  "no-forbidden-tokens": noForbiddenTokens,
93
91
  "no-forward-ref": noForwardRef,
94
92
  "no-framer-motion-import": noFramerMotionImport,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vadimcomanescu/nadicode-design-system",
3
- "version": "2.0.8",
3
+ "version": "2.0.9",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org/"
@@ -1,99 +0,0 @@
1
- import { readFileSync } from "node:fs";
2
- import { resolve, dirname } from "node:path";
3
- import { fileURLToPath } from "node:url";
4
-
5
- const RULES_DIR = dirname(fileURLToPath(import.meta.url));
6
- const REGISTRY_PATH = resolve(RULES_DIR, "../../../contracts/public-surface-registry.json");
7
- const DS_PACKAGE = "@vadimcomanescu/nadicode-design-system";
8
-
9
- let forbiddenByPageKit = null;
10
-
11
- function loadForbiddenMap() {
12
- if (forbiddenByPageKit) {
13
- return forbiddenByPageKit;
14
- }
15
-
16
- forbiddenByPageKit = new Map();
17
-
18
- try {
19
- const registry = JSON.parse(readFileSync(REGISTRY_PATH, "utf8"));
20
- for (const entry of registry.entries ?? []) {
21
- if (
22
- entry.category === "page-kits" &&
23
- entry.pageKitContract?.forbiddenComponents?.length > 0
24
- ) {
25
- const forbidden = new Set(entry.pageKitContract.forbiddenComponents);
26
- forbiddenByPageKit.set(entry.subpath, {
27
- canonicalExport: entry.canonicalExport,
28
- forbidden,
29
- });
30
- }
31
- }
32
- } catch {
33
- // Registry unavailable. Rule becomes a no-op.
34
- }
35
-
36
- return forbiddenByPageKit;
37
- }
38
-
39
- function subpathFromImport(source) {
40
- if (!source.startsWith(DS_PACKAGE + "/")) {
41
- return null;
42
- }
43
- return "./" + source.slice(DS_PACKAGE.length + 1);
44
- }
45
-
46
- const rule = {
47
- meta: {
48
- type: "problem",
49
- docs: {
50
- description:
51
- "Disallow importing components that are forbidden alongside a page-kit from the design system.",
52
- },
53
- schema: [],
54
- },
55
- create(context) {
56
- const dsImports = [];
57
-
58
- return {
59
- ImportDeclaration(node) {
60
- const source = node.source.value;
61
- if (typeof source !== "string" || !source.startsWith(DS_PACKAGE + "/")) {
62
- return;
63
- }
64
- dsImports.push({ node, subpath: subpathFromImport(source) });
65
- },
66
-
67
- "Program:exit"() {
68
- const map = loadForbiddenMap();
69
- if (map.size === 0 || dsImports.length === 0) {
70
- return;
71
- }
72
-
73
- const activePageKits = dsImports.filter((imp) => map.has(imp.subpath));
74
- if (activePageKits.length === 0) {
75
- return;
76
- }
77
-
78
- for (const imp of dsImports) {
79
- for (const pk of activePageKits) {
80
- const pkData = map.get(pk.subpath);
81
- if (pkData.forbidden.has(imp.subpath)) {
82
- context.report({
83
- node: imp.node,
84
- message:
85
- '"{{source}}" is forbidden when using {{pageKit}}. This import violates the page-kit\'s cross-domain contract.',
86
- data: {
87
- source: imp.node.source.value,
88
- pageKit: pkData.canonicalExport,
89
- },
90
- });
91
- }
92
- }
93
- }
94
- },
95
- };
96
- },
97
- };
98
-
99
- export default rule;