@vadimcomanescu/nadicode-design-system 2.0.8 → 4.0.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/.agents/skills/seed/SKILL.md +19 -10
- package/.agents/skills/seed/contract.md +9 -2
- package/.agents/skills/seed/references/blocks.md +5 -5
- package/.agents/skills/seed/references/components.md +2 -2
- package/.agents/skills/seed/references/nextjs.md +2 -2
- package/README.md +3 -3
- package/contracts/consumer-intent-map.json +1 -2
- package/contracts/release-governance-baseline.json +3 -37
- package/dist/catalog/catalog.d.ts +2220 -0
- package/dist/catalog/catalog.js +1913 -0
- package/dist/catalog/components.d.ts +201 -0
- package/dist/catalog/components.js +407 -0
- package/dist/catalog/types.d.ts +4 -0
- package/dist/catalog/types.js +1 -0
- package/dist/chunk-224KPIOG.js +60 -0
- package/dist/chunk-25BOZMXA.js +169 -0
- package/dist/chunk-32OLQ7FC.js +130 -0
- package/dist/chunk-3JJBJ4VR.js +47 -0
- package/dist/chunk-3U56FXYC.js +30 -0
- package/dist/chunk-4MWKE6F5.js +86 -0
- package/dist/chunk-6HGSU24S.js +94 -0
- package/dist/chunk-7IADIXDV.js +168 -0
- package/dist/chunk-7NS3VFD7.js +86 -0
- package/dist/chunk-7XLZCXUL.js +175 -0
- package/dist/chunk-ALA6OM7K.js +134 -0
- package/dist/chunk-AN5TW4AL.js +50 -0
- package/dist/chunk-AWZFQQGN.js +167 -0
- package/dist/chunk-BRCBJ3S4.js +42 -0
- package/dist/chunk-BRICSLHJ.js +30 -0
- package/dist/chunk-BYEHHZZN.js +115 -0
- package/dist/chunk-C33GUEDY.js +149 -0
- package/dist/chunk-CUDMDYKE.js +150 -0
- package/dist/chunk-CVTMWSNS.js +145 -0
- package/dist/chunk-DEZXWNYF.js +165 -0
- package/dist/chunk-DNJEVMDY.js +40 -0
- package/dist/chunk-DNJOBML6.js +66 -0
- package/dist/chunk-FTGFOK6T.js +69 -0
- package/dist/chunk-HFBJ6L6O.js +104 -0
- package/dist/chunk-HPTHS7SX.js +52 -0
- package/dist/chunk-KNR3WB5C.js +147 -0
- package/dist/chunk-KQ7ZC6EM.js +66 -0
- package/dist/chunk-LGW7FVG5.js +83 -0
- package/dist/chunk-LP6ZZYOQ.js +36 -0
- package/dist/chunk-LV4P7WVM.js +54 -0
- package/dist/chunk-MGSGCARB.js +164 -0
- package/dist/chunk-N3YFYMNZ.js +73 -0
- package/dist/chunk-Q5IYBNA7.js +56 -0
- package/dist/chunk-QJCE7NZF.js +85 -0
- package/dist/chunk-QW5II6YK.js +96 -0
- package/dist/chunk-RMGDDOCD.js +138 -0
- package/dist/chunk-RNCX4JIE.js +70 -0
- package/dist/chunk-RWCL5OPX.js +112 -0
- package/dist/chunk-S5OY2B63.js +28 -0
- package/dist/chunk-SIQNG72C.js +257 -0
- package/dist/chunk-SP7NIZFP.js +117 -0
- package/dist/chunk-SWRJWMGG.js +30 -0
- package/dist/chunk-TCQIJ3DO.js +85 -0
- package/dist/chunk-TPJ6JJ2F.js +290 -0
- package/dist/chunk-TUJZMJXW.js +72 -0
- package/dist/chunk-UR43ANYS.js +159 -0
- package/dist/chunk-VRGPG2YN.js +79 -0
- package/dist/chunk-WSBLCWY7.js +126 -0
- package/dist/chunk-XKKFSFYO.js +93 -0
- package/dist/chunk-XO7TBM47.js +32 -0
- package/dist/chunk-YDYDGG5K.js +132 -0
- package/dist/chunk-YMJOUYMT.js +171 -0
- package/dist/chunk-Z2WION42.js +32 -0
- package/dist/chunk-ZFKSVEYW.js +35 -0
- package/dist/components/blocks/AgentProfileGridBlock.js +8 -86
- package/dist/components/blocks/AgentRunOverviewBlock.js +8 -147
- package/dist/components/blocks/AgentWorkbenchBlock.js +15 -257
- package/dist/components/blocks/AudioVisualizerBlock.js +2 -50
- package/dist/components/blocks/AuthLayout.js +9 -73
- package/dist/components/blocks/BannerBlock.js +8 -66
- package/dist/components/blocks/BarChartBlock.js +5 -47
- package/dist/components/blocks/ChartBlock.js +7 -54
- package/dist/components/blocks/ChartCollectionBlock.js +11 -171
- package/dist/components/blocks/ChatLayout.js +12 -126
- package/dist/components/blocks/CreateBlock.js +9 -104
- package/dist/components/blocks/DataGridBlock.js +9 -117
- package/dist/components/blocks/DirectoryBlock.js +12 -85
- package/dist/components/blocks/FeatureGridBlock.js +6 -56
- package/dist/components/blocks/GalleryBlock.js +6 -69
- package/dist/components/blocks/HeroSectionBlock.js +10 -134
- package/dist/components/blocks/IntegrationsBlock.js +13 -94
- package/dist/components/blocks/InteractiveAreaChartBlock.js +5 -290
- package/dist/components/blocks/KanbanDemoBlock.js +8 -145
- package/dist/components/blocks/LogoCloud.js +4 -35
- package/dist/components/blocks/NavUser.js +5 -85
- package/dist/components/blocks/NotFoundBlock.js +8 -32
- package/dist/components/blocks/OnboardingBlock.js +7 -66
- package/dist/components/blocks/SettingsLayout.js +13 -86
- package/dist/components/blocks/SignUpBlock.js +8 -168
- package/dist/components/blocks/SolutionShowcaseBlock.js +11 -112
- package/dist/components/blocks/StatsBlock.js +6 -60
- package/dist/components/blocks/UsageDonutBlock.js +5 -79
- package/dist/components/blocks/WizardBlock.js +12 -93
- package/dist/components/blocks/user/InviteUserModal.js +10 -132
- package/dist/components/page-kits/AccountLockedPageKit.js +3 -40
- package/dist/components/page-kits/AgentsChatPageKit.js +11 -159
- package/dist/components/page-kits/AnalyticsPageKit.js +12 -150
- package/dist/components/page-kits/BlogContentPageKit.js +12 -167
- package/dist/components/page-kits/CheckoutPageKit.js +9 -83
- package/dist/components/page-kits/CompanySuitePageKit.js +9 -96
- package/dist/components/page-kits/DashboardPageKit.js +11 -149
- package/dist/components/page-kits/ErrorPageKit.js +5 -52
- package/dist/components/page-kits/KanbanBoardPageKit.js +7 -169
- package/dist/components/page-kits/LandingPageKit.js +11 -72
- package/dist/components/page-kits/LoginPageKit.js +3 -32
- package/dist/components/page-kits/OnboardingPageKit.js +6 -115
- package/dist/components/page-kits/PricingPageKit.js +12 -138
- package/dist/components/page-kits/ProfileSettingsPageKit.js +10 -164
- package/dist/components/page-kits/RecoveryPageKit.js +3 -42
- package/dist/components/page-kits/ResetPageKit.js +3 -36
- package/dist/components/page-kits/ServiceSuitePageKit.js +10 -175
- package/dist/components/page-kits/SignupPageKit.js +3 -30
- package/dist/components/page-kits/SuccessPageKit.js +4 -30
- package/dist/components/page-kits/TeamSettingsPageKit.js +9 -165
- package/dist/components/page-kits/TwoFactorPageKit.js +4 -28
- package/dist/components/page-kits/VerifyEmailPageKit.js +4 -30
- package/dist/components/page-kits/VoiceAgentsPageKit.js +13 -130
- package/dist/components/ui/CheckoutForm.js +5 -70
- package/eslint-rules/nadicode/config.js +1 -1
- package/eslint-rules/nadicode/data/catalog-names.json +93 -0
- package/eslint-rules/nadicode/index.js +2 -2
- package/eslint-rules/nadicode/rules/__tests__/require-catalog-component.test.js +77 -0
- package/eslint-rules/nadicode/rules/require-catalog-component.js +79 -0
- package/package.json +18 -25
- package/contracts/block-props-schemas.json +0 -2186
- package/contracts/component-props-schemas.json +0 -8322
- package/contracts/consumer-contract.json +0 -178
- package/contracts/page-kit-props-schemas.json +0 -1894
- package/contracts/public-surface-registry.json +0 -6162
- package/contracts/public-surface-registry.schema.json +0 -227
- package/contracts/spec-manifest.json +0 -46
- package/dist/catalog.json +0 -5221
- package/eslint-rules/nadicode/rules/no-forbidden-page-kit-import.js +0 -99
|
@@ -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;
|