@prismicio/editor-fields 0.4.49-alpha.feat-onboarding-guide.1 → 0.4.49-alpha.feat-onboarding-guide.2

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.es.js CHANGED
@@ -30259,10 +30259,7 @@ function KOe(e) {
30259
30259
  track: o,
30260
30260
  fetchState: a,
30261
30261
  toggleStep: s
30262
- } = e, [u, c] = Z({
30263
- completedSteps: [],
30264
- isResolved: !1
30265
- });
30262
+ } = e, [u, c] = Z();
30266
30263
  cn(() => {
30267
30264
  (async () => {
30268
30265
  try {
@@ -30275,12 +30272,12 @@ function KOe(e) {
30275
30272
  });
30276
30273
  const l = n === "default" ? UOe : WOe, f = l.map(({ id: _ }) => _), p = l.filter(
30277
30274
  (_) => _.defaultCompleted
30278
- ).length, A = (u.completedSteps.filter((_) => f.includes(_)).length ?? 0) + p, h = n !== "default" && POe[r] || void 0;
30275
+ ).length, A = ((u == null ? void 0 : u.completedSteps.filter((_) => f.includes(_)).length) ?? 0) + p, h = n !== "default" && POe[r] || void 0;
30279
30276
  async function g(_) {
30280
30277
  try {
30281
30278
  const I = await s(_.id);
30282
30279
  c({
30283
- ...u,
30280
+ isResolved: !!(u != null && u.isResolved),
30284
30281
  completedSteps: I
30285
30282
  }), I.includes(_.id) && o({
30286
30283
  event: "onboarding:step-completed",
@@ -30292,7 +30289,7 @@ function KOe(e) {
30292
30289
  }
30293
30290
  }
30294
30291
  function S(_) {
30295
- return !!(u.completedSteps.includes(_.id) || _.defaultCompleted);
30292
+ return !!(u != null && u.completedSteps.includes(_.id) || _.defaultCompleted);
30296
30293
  }
30297
30294
  function C(_) {
30298
30295
  return l.findIndex(({ id: I }) => I === _);
@@ -30305,7 +30302,7 @@ function KOe(e) {
30305
30302
  variant: n,
30306
30303
  tutorialLink: h,
30307
30304
  completedStepsCount: A,
30308
- isResolved: u.isResolved,
30305
+ isResolved: u == null ? void 0 : u.isResolved,
30309
30306
  isStepComplete: S,
30310
30307
  getStepIndex: C,
30311
30308
  toggleStepComplete: g,
package/package.json CHANGED
@@ -33,7 +33,7 @@
33
33
  "zod": "3.21.4"
34
34
  },
35
35
  "devDependencies": {
36
- "@prismicio/editor-ui": "^0.4.49-alpha.feat-onboarding-guide.1",
36
+ "@prismicio/editor-ui": "^0.4.49-alpha.feat-onboarding-guide.2",
37
37
  "@testing-library/react": "15.0.7",
38
38
  "@types/react": "18.0.18",
39
39
  "@types/react-dom": "18.3.0",
@@ -69,7 +69,7 @@
69
69
  "module": "./dist/index.es.js",
70
70
  "name": "@prismicio/editor-fields",
71
71
  "peerDependencies": {
72
- "@prismicio/editor-ui": "^0.4.49-alpha.feat-onboarding-guide.1",
72
+ "@prismicio/editor-ui": "^0.4.49-alpha.feat-onboarding-guide.2",
73
73
  "react": "18",
74
74
  "react-dom": "18"
75
75
  },
@@ -86,5 +86,5 @@
86
86
  "sideEffects": false,
87
87
  "stableVersion": "0.0.0",
88
88
  "types": "./dist/index.d.ts",
89
- "version": "0.4.49-alpha.feat-onboarding-guide.1"
89
+ "version": "0.4.49-alpha.feat-onboarding-guide.2"
90
90
  }