@contentful/experience-design-system-types 2.37.1-dev-build-c1d02862.0 → 2.37.1-dev-build-e5882940.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-types",
3
- "version": "2.37.1-dev-build-c1d02862.0",
3
+ "version": "2.37.1-dev-build-e5882940.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "./dist/src/index.js",
@@ -34,9 +34,22 @@ declare const ImportHandoffSchema: z.ZodMiniObject<{
34
34
  "cache-hit": "cache-hit";
35
35
  }>;
36
36
  }, z.core.$strip>>;
37
+ /** Present once the user has confirmed the scope gate; the wizard then saves the decisions and starts generating. */
38
+ scope: z.ZodMiniOptional<z.ZodMiniObject<{
39
+ /** The components the user kept at the scope gate. The wizard saves these, then generates them. */
40
+ accepted: z.ZodMiniArray<z.ZodMiniString<string>>;
41
+ /** Everything else at the gate, which counts as rejected. */
42
+ rejected: z.ZodMiniArray<z.ZodMiniString<string>>;
43
+ /**
44
+ * Components the generation cache already holds, found by the check that ran while the gate was open and which has
45
+ * finished (and restored them) before the wizard starts. Empty when the cache is off or the check failed.
46
+ */
47
+ cachedNames: z.ZodMiniArray<z.ZodMiniString<string>>;
48
+ }, z.core.$strip>>;
37
49
  }, z.core.$strip>;
38
50
  export type ImportHandoff = z.infer<typeof ImportHandoffSchema>;
39
51
  export type ExtractionHandoff = NonNullable<ImportHandoff['extraction']>;
52
+ export type ScopeHandoff = NonNullable<ImportHandoff['scope']>;
40
53
  export type ParsedHandoff = {
41
54
  ok: true;
42
55
  handoff: ImportHandoff;
@@ -25,12 +25,25 @@ const ExtractionSchema = z.object({
25
25
  /** The only phases the scope gate can start from. */
26
26
  compositionPhase: z.enum(['done', 'cache-hit']),
27
27
  });
28
+ const ScopeSchema = z.object({
29
+ /** The components the user kept at the scope gate. The wizard saves these, then generates them. */
30
+ accepted: z.array(z.string()),
31
+ /** Everything else at the gate, which counts as rejected. */
32
+ rejected: z.array(z.string()),
33
+ /**
34
+ * Components the generation cache already holds, found by the check that ran while the gate was open and which has
35
+ * finished (and restored them) before the wizard starts. Empty when the cache is off or the check failed.
36
+ */
37
+ cachedNames: z.array(z.string()),
38
+ });
28
39
  const ImportHandoffSchema = z.object({
29
40
  /** The user skipped the credentials screen, so nothing is fetched from or pushed to Contentful. */
30
41
  credentialsSkipped: z.boolean(),
31
42
  tokens: TokensSchema,
32
43
  /** Present once the CLI has run the extraction stage; the wizard then starts at the scope gate. */
33
44
  extraction: z.optional(ExtractionSchema),
45
+ /** Present once the user has confirmed the scope gate; the wizard then saves the decisions and starts generating. */
46
+ scope: z.optional(ScopeSchema),
34
47
  });
35
48
  export function serializeHandoff(handoff) {
36
49
  return JSON.stringify(handoff);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-types",
3
- "version": "2.37.1-dev-build-c1d02862.0",
3
+ "version": "2.37.1-dev-build-e5882940.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "./dist/src/index.js",