@usefragments/core 1.7.0 → 1.7.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.d.ts CHANGED
@@ -10898,6 +10898,11 @@ interface CompiledContractOutput {
10898
10898
  category: string;
10899
10899
  tags?: string[];
10900
10900
  status?: 'stable' | 'beta' | 'deprecated' | 'experimental';
10901
+ dependencies?: Array<{
10902
+ name: string;
10903
+ version: string;
10904
+ reason?: string;
10905
+ }>;
10901
10906
  figma?: string;
10902
10907
  figmaProps?: Record<string, unknown>;
10903
10908
  };
@@ -10993,6 +10998,12 @@ interface ComponentContract {
10993
10998
  status?: 'stable' | 'beta' | 'deprecated' | 'experimental';
10994
10999
  /** Framework hint (for extraction and documentation) */
10995
11000
  framework?: 'react' | 'vue' | 'svelte' | 'web-components' | 'angular';
11001
+ /** External npm packages required by this component (displayed in docs Setup section) */
11002
+ dependencies?: Array<{
11003
+ name: string;
11004
+ version: string;
11005
+ reason?: string;
11006
+ }>;
10996
11007
  /** Path to the component source file, relative to fragments.config.ts root */
10997
11008
  sourcePath: string;
10998
11009
  /** Named export from the source file */
@@ -11091,6 +11102,19 @@ declare const componentContractSchema: z.ZodObject<{
11091
11102
  tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
11092
11103
  status: z.ZodOptional<z.ZodEnum<["stable", "beta", "deprecated", "experimental"]>>;
11093
11104
  framework: z.ZodOptional<z.ZodEnum<["react", "vue", "svelte", "web-components", "angular"]>>;
11105
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodObject<{
11106
+ name: z.ZodString;
11107
+ version: z.ZodString;
11108
+ reason: z.ZodOptional<z.ZodString>;
11109
+ }, "strip", z.ZodTypeAny, {
11110
+ name: string;
11111
+ version: string;
11112
+ reason?: string | undefined;
11113
+ }, {
11114
+ name: string;
11115
+ version: string;
11116
+ reason?: string | undefined;
11117
+ }>, "many">>;
11094
11118
  sourcePath: z.ZodString;
11095
11119
  exportName: z.ZodString;
11096
11120
  propsSummary: z.ZodArray<z.ZodString, "many">;
@@ -11378,6 +11402,11 @@ declare const componentContractSchema: z.ZodObject<{
11378
11402
  name: string;
11379
11403
  args?: Record<string, unknown> | undefined;
11380
11404
  }[] | undefined;
11405
+ dependencies?: {
11406
+ name: string;
11407
+ version: string;
11408
+ reason?: string | undefined;
11409
+ }[] | undefined;
11381
11410
  tags?: string[] | undefined;
11382
11411
  figma?: {
11383
11412
  nodeUrl?: string | undefined;
@@ -11459,6 +11488,11 @@ declare const componentContractSchema: z.ZodObject<{
11459
11488
  name: string;
11460
11489
  args?: Record<string, unknown> | undefined;
11461
11490
  }[] | undefined;
11491
+ dependencies?: {
11492
+ name: string;
11493
+ version: string;
11494
+ reason?: string | undefined;
11495
+ }[] | undefined;
11462
11496
  tags?: string[] | undefined;
11463
11497
  figma?: {
11464
11498
  nodeUrl?: string | undefined;
package/dist/index.js CHANGED
@@ -4098,6 +4098,11 @@ var componentContractSchema = z6.object({
4098
4098
  tags: z6.array(z6.string()).optional(),
4099
4099
  status: z6.enum(["stable", "beta", "deprecated", "experimental"]).optional(),
4100
4100
  framework: z6.enum(["react", "vue", "svelte", "web-components", "angular"]).optional(),
4101
+ dependencies: z6.array(z6.object({
4102
+ name: z6.string(),
4103
+ version: z6.string(),
4104
+ reason: z6.string().optional()
4105
+ })).optional(),
4101
4106
  sourcePath: z6.string(),
4102
4107
  exportName: z6.string(),
4103
4108
  propsSummary: z6.array(z6.string()),
@@ -4128,6 +4133,7 @@ function parseComponentContract(content, filePath) {
4128
4133
  category: validated.category,
4129
4134
  tags: validated.tags,
4130
4135
  status: validated.status,
4136
+ dependencies: validated.dependencies,
4131
4137
  figma: validated.figma?.nodeUrl,
4132
4138
  figmaProps: validated.figma?.propMappings
4133
4139
  },