@burdenoff/microfe-devportal 2026.705.3 → 2026.705.4

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.
@@ -612,7 +612,9 @@ var Le = [
612
612
  E === "overview" && /* @__PURE__ */ G(Ye, { app: J }),
613
613
  E === "permissions" && /* @__PURE__ */ G(mt, {
614
614
  app: J,
615
- versionScopes: I?.application?.versions?.edges?.[0]?.node?.requiredScopes ?? []
615
+ versionScopes: I?.application?.versions?.edges?.[0]?.node?.requiredScopes ?? [],
616
+ locked: J.status === "PUBLISHED" || J.status === "APPROVED" || J.status === "ACTIVE",
617
+ onNavigateToVersions: () => D("versions")
616
618
  }),
617
619
  E === "webhooks" && /* @__PURE__ */ G(Ke, {
618
620
  appId: J.id,
@@ -2902,44 +2904,100 @@ var pt = ({ level: e, onChange: t }) => /* @__PURE__ */ G("div", {
2902
2904
  className: `rounded px-2.5 py-1 text-xs font-medium transition-colors whitespace-nowrap ${e === n ? "bg-bg-base text-text-primary shadow-sm" : "text-text-secondary hover:text-text-primary"}`,
2903
2905
  children: n === "read" ? "Read" : "Read & Write"
2904
2906
  }, n))
2905
- }), mt = ({ app: e, versionScopes: t }) => {
2906
- let n = e.manifest ?? {}, [r, i] = N(() => ft(ut(n), dt(t ?? []))), [a, o] = N(!1), [s, c] = N(""), [l, u] = N("read"), [d, f] = N(!1), [p, m] = N(!1), [h] = _(), g = (e, t) => {
2907
- m(!1), i((n) => n.map((n) => n.resource === e ? {
2907
+ }), mt = ({ app: e, versionScopes: t, locked: n = !1, onNavigateToVersions: r }) => {
2908
+ let i = e.manifest ?? {}, [a, o] = N(() => ft(ut(i), dt(t ?? []))), [s, c] = N(!1), [l, u] = N(""), [d, f] = N("read"), [p, m] = N(!1), [h, g] = N(!1), [v] = _(), b = (e, t) => {
2909
+ g(!1), o((n) => n.map((n) => n.resource === e ? {
2908
2910
  ...n,
2909
2911
  level: t
2910
2912
  } : n));
2911
- }, v = (e) => {
2912
- m(!1), i((t) => t.filter((t) => t.resource !== e));
2913
- }, b = () => {
2914
- let e = s.trim().toLowerCase().replace(/\s+/g, "-");
2915
- !e || r.some((t) => t.resource === e) || (i((t) => [...t, {
2913
+ }, x = (e) => {
2914
+ g(!1), o((t) => t.filter((t) => t.resource !== e));
2915
+ }, S = () => {
2916
+ let e = l.trim().toLowerCase().replace(/\s+/g, "-");
2917
+ !e || a.some((t) => t.resource === e) || (o((t) => [...t, {
2916
2918
  resource: e,
2917
- level: l
2918
- }]), c(""), u("read"), o(!1), m(!1));
2919
- }, x = async () => {
2920
- f(!0);
2919
+ level: d
2920
+ }]), u(""), f("read"), c(!1), g(!1));
2921
+ }, C = async () => {
2922
+ m(!0);
2921
2923
  try {
2922
- await h({ variables: {
2924
+ await v({ variables: {
2923
2925
  id: e.id,
2924
2926
  input: { manifest: {
2925
- ...n,
2926
- permissions: r.map(({ resource: e, level: t }) => ({
2927
+ ...i,
2928
+ permissions: a.map(({ resource: e, level: t }) => ({
2927
2929
  resource: e,
2928
2930
  level: t
2929
2931
  }))
2930
2932
  } }
2931
- } }), m(!0);
2933
+ } }), g(!0);
2932
2934
  } finally {
2933
- f(!1);
2935
+ m(!1);
2934
2936
  }
2935
- };
2937
+ }, w = /* @__PURE__ */ G("div", {
2938
+ className: "rounded-lg border border-border-subtle divide-y divide-border-subtle",
2939
+ children: a.map((e) => /* @__PURE__ */ K("div", {
2940
+ className: "flex items-center gap-3 px-4 py-3 hover:bg-bg-sunken/30 transition-colors",
2941
+ children: [/* @__PURE__ */ K("div", {
2942
+ className: "flex-1 min-w-0",
2943
+ children: [
2944
+ /* @__PURE__ */ G("p", {
2945
+ className: "text-sm font-medium text-text-primary",
2946
+ children: ct[e.resource]?.label ?? e.resource
2947
+ }),
2948
+ ct[e.resource]?.description && /* @__PURE__ */ G("p", {
2949
+ className: "text-xs text-text-secondary",
2950
+ children: ct[e.resource].description
2951
+ }),
2952
+ !ct[e.resource] && /* @__PURE__ */ G("p", {
2953
+ className: "text-xs text-text-tertiary font-mono",
2954
+ children: "custom scope"
2955
+ })
2956
+ ]
2957
+ }), n ? /* @__PURE__ */ G("span", {
2958
+ className: `rounded-full px-2.5 py-0.5 text-xs font-medium ${e.level === "write" ? "bg-status-warning-bg text-status-warning-text" : "bg-bg-sunken text-text-secondary"}`,
2959
+ children: e.level === "write" ? "Read & Write" : "Read"
2960
+ }) : /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ G(pt, {
2961
+ level: e.level,
2962
+ onChange: (t) => b(e.resource, t)
2963
+ }), /* @__PURE__ */ G("button", {
2964
+ type: "button",
2965
+ onClick: () => x(e.resource),
2966
+ title: "Remove permission",
2967
+ className: "p-1.5 rounded text-text-tertiary hover:text-status-error-text hover:bg-status-error-bg-subtle transition-colors",
2968
+ children: /* @__PURE__ */ G(U, { size: 14 })
2969
+ })] })]
2970
+ }, e.resource))
2971
+ });
2936
2972
  return /* @__PURE__ */ G(y, {
2937
2973
  title: "Permissions",
2938
2974
  description: "These are the permissions your app requests from users. Users see exactly this list when authorizing your app.",
2939
- children: /* @__PURE__ */ K("div", {
2975
+ children: /* @__PURE__ */ G("div", {
2940
2976
  className: "space-y-4",
2941
- children: [
2942
- r.length === 0 ? /* @__PURE__ */ K("div", {
2977
+ children: n ? /* @__PURE__ */ K(W, { children: [/* @__PURE__ */ K("div", {
2978
+ className: "rounded-lg border border-status-warning-bg bg-status-warning-bg-subtle p-3 flex gap-2 text-sm",
2979
+ children: [/* @__PURE__ */ G(_e, {
2980
+ size: 15,
2981
+ className: "flex-shrink-0 mt-0.5 text-status-warning-text"
2982
+ }), /* @__PURE__ */ K("span", {
2983
+ className: "text-status-warning-text",
2984
+ children: [
2985
+ /* @__PURE__ */ G("strong", { children: "Permission changes require a new version." }),
2986
+ " Your app is live and users have already consented to the permissions below. To request new or fewer permissions, publish a new version — existing users will be shown what changed and asked to re-consent before the new version takes effect.",
2987
+ " ",
2988
+ r && /* @__PURE__ */ G("button", {
2989
+ type: "button",
2990
+ onClick: r,
2991
+ className: "underline font-medium hover:opacity-80 transition-opacity",
2992
+ children: "Go to Versions →"
2993
+ })
2994
+ ]
2995
+ })]
2996
+ }), a.length === 0 ? /* @__PURE__ */ G("div", {
2997
+ className: "rounded-lg border border-border-subtle border-dashed p-6 text-center text-sm text-text-secondary",
2998
+ children: "No permissions configured for this version."
2999
+ }) : w] }) : /* @__PURE__ */ K(W, { children: [
3000
+ a.length === 0 ? /* @__PURE__ */ K("div", {
2943
3001
  className: "rounded-lg border border-border-subtle border-dashed p-8 flex flex-col items-center gap-2 text-center text-text-secondary",
2944
3002
  children: [
2945
3003
  /* @__PURE__ */ G(V, {
@@ -2955,51 +3013,16 @@ var pt = ({ level: e, onChange: t }) => /* @__PURE__ */ G("div", {
2955
3013
  children: "Add the permissions your app needs to request from users."
2956
3014
  })
2957
3015
  ]
2958
- }) : /* @__PURE__ */ G("div", {
2959
- className: "rounded-lg border border-border-subtle divide-y divide-border-subtle",
2960
- children: r.map((e) => /* @__PURE__ */ K("div", {
2961
- className: "flex items-center gap-3 px-4 py-3 hover:bg-bg-sunken/30 transition-colors",
2962
- children: [
2963
- /* @__PURE__ */ K("div", {
2964
- className: "flex-1 min-w-0",
2965
- children: [
2966
- /* @__PURE__ */ G("p", {
2967
- className: "text-sm font-medium text-text-primary",
2968
- children: ct[e.resource]?.label ?? e.resource
2969
- }),
2970
- ct[e.resource]?.description && /* @__PURE__ */ G("p", {
2971
- className: "text-xs text-text-secondary",
2972
- children: ct[e.resource].description
2973
- }),
2974
- !ct[e.resource] && /* @__PURE__ */ G("p", {
2975
- className: "text-xs text-text-tertiary font-mono",
2976
- children: "custom scope"
2977
- })
2978
- ]
2979
- }),
2980
- /* @__PURE__ */ G(pt, {
2981
- level: e.level,
2982
- onChange: (t) => g(e.resource, t)
2983
- }),
2984
- /* @__PURE__ */ G("button", {
2985
- type: "button",
2986
- onClick: () => v(e.resource),
2987
- title: "Remove permission",
2988
- className: "p-1.5 rounded text-text-tertiary hover:text-status-error-text hover:bg-status-error-bg-subtle transition-colors",
2989
- children: /* @__PURE__ */ G(U, { size: 14 })
2990
- })
2991
- ]
2992
- }, e.resource))
2993
- }),
2994
- a ? /* @__PURE__ */ K("div", {
3016
+ }) : w,
3017
+ s ? /* @__PURE__ */ K("div", {
2995
3018
  className: "rounded-lg border border-border-subtle p-3 flex items-center gap-2 flex-wrap",
2996
3019
  children: [
2997
3020
  /* @__PURE__ */ G("input", {
2998
3021
  type: "text",
2999
- value: s,
3000
- onChange: (e) => c(e.target.value),
3022
+ value: l,
3023
+ onChange: (e) => u(e.target.value),
3001
3024
  onKeyDown: (e) => {
3002
- e.key === "Enter" && b(), e.key === "Escape" && o(!1);
3025
+ e.key === "Enter" && S(), e.key === "Escape" && c(!1);
3003
3026
  },
3004
3027
  placeholder: "Resource (e.g. auth, files, widgets)",
3005
3028
  list: "perm-resource-suggestions",
@@ -3008,26 +3031,26 @@ var pt = ({ level: e, onChange: t }) => /* @__PURE__ */ G("div", {
3008
3031
  }),
3009
3032
  /* @__PURE__ */ G("datalist", {
3010
3033
  id: "perm-resource-suggestions",
3011
- children: lt.filter((e) => !r.some((t) => t.resource === e)).map((e) => /* @__PURE__ */ G("option", {
3034
+ children: lt.filter((e) => !a.some((t) => t.resource === e)).map((e) => /* @__PURE__ */ G("option", {
3012
3035
  value: e,
3013
3036
  children: ct[e].label
3014
3037
  }, e))
3015
3038
  }),
3016
3039
  /* @__PURE__ */ G(pt, {
3017
- level: l,
3018
- onChange: u
3040
+ level: d,
3041
+ onChange: f
3019
3042
  }),
3020
3043
  /* @__PURE__ */ G("button", {
3021
3044
  type: "button",
3022
- onClick: b,
3023
- disabled: !s.trim(),
3045
+ onClick: S,
3046
+ disabled: !l.trim(),
3024
3047
  className: "px-3 py-1.5 rounded-md bg-action-primary-bg text-action-primary-text text-xs font-medium hover:bg-action-primary-bg/90 disabled:opacity-50 transition-colors",
3025
3048
  children: "Add"
3026
3049
  }),
3027
3050
  /* @__PURE__ */ G("button", {
3028
3051
  type: "button",
3029
3052
  onClick: () => {
3030
- o(!1), c("");
3053
+ c(!1), u("");
3031
3054
  },
3032
3055
  className: "p-1.5 rounded text-text-secondary hover:text-text-primary transition-colors",
3033
3056
  children: /* @__PURE__ */ G(U, { size: 14 })
@@ -3035,7 +3058,7 @@ var pt = ({ level: e, onChange: t }) => /* @__PURE__ */ G("div", {
3035
3058
  ]
3036
3059
  }) : /* @__PURE__ */ K("button", {
3037
3060
  type: "button",
3038
- onClick: () => o(!0),
3061
+ onClick: () => c(!0),
3039
3062
  className: "flex items-center gap-1.5 text-sm text-text-secondary hover:text-text-primary transition-colors",
3040
3063
  children: [/* @__PURE__ */ G(B, { size: 14 }), "Add permission"]
3041
3064
  }),
@@ -3048,21 +3071,21 @@ var pt = ({ level: e, onChange: t }) => /* @__PURE__ */ G("div", {
3048
3071
  }),
3049
3072
  /* @__PURE__ */ K("div", {
3050
3073
  className: "flex items-center justify-end gap-3",
3051
- children: [p && /* @__PURE__ */ K("span", {
3074
+ children: [h && /* @__PURE__ */ K("span", {
3052
3075
  className: "flex items-center gap-1.5 text-sm text-status-success-text",
3053
3076
  children: [/* @__PURE__ */ G(de, { size: 14 }), "Saved"]
3054
3077
  }), /* @__PURE__ */ K("button", {
3055
3078
  type: "button",
3056
- onClick: () => void x(),
3057
- disabled: d,
3079
+ onClick: () => void C(),
3080
+ disabled: p,
3058
3081
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors disabled:opacity-50",
3059
- children: [d ? /* @__PURE__ */ G(z, {
3082
+ children: [p ? /* @__PURE__ */ G(z, {
3060
3083
  size: 14,
3061
3084
  className: "animate-spin"
3062
3085
  }) : /* @__PURE__ */ G(V, { size: 14 }), "Save Permissions"]
3063
3086
  })]
3064
3087
  })
3065
- ]
3088
+ ] })
3066
3089
  })
3067
3090
  });
3068
3091
  };