@flytedan/flytebot-design-system 0.12.7 → 0.12.8

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.cts CHANGED
@@ -2416,8 +2416,16 @@ interface FeatureGateProps {
2416
2416
  variant?: "block" | "inline";
2417
2417
  /** When false, an incomplete-in-live-mode feature renders `fallback` instead of the ComingSoon banner. Default true. */
2418
2418
  preview?: boolean;
2419
- /** Permission that lets the viewer bypass the ComingSoon veil and use the feature early. Default "flags.manage". */
2420
- bypassPerm?: string;
2419
+ /**
2420
+ * Permission that lets the viewer bypass the ComingSoon veil and use the feature early.
2421
+ * Default `"flags.manage"`. Pass `null` to declare the gate NOT bypassable by anyone,
2422
+ * regardless of permissions — the veil still renders, but no "View and use it anyway"
2423
+ * control appears, and a bypass stored from before this call site turned `null` is
2424
+ * ignored rather than honored. Use this for a gate whose content is itself the problem
2425
+ * (e.g. fixture/demo data standing in for another record), where letting even an
2426
+ * administrator click through would show something untrue, not just something unfinished.
2427
+ */
2428
+ bypassPerm?: string | null;
2421
2429
  }
2422
2430
  /** Feature gate. ALWAYS silent when off — an unreleased feature should leave no trace. */
2423
2431
  declare function FeatureGate({ flag, fallback, children, onRoadmap, blur, minHeight, label, variant, preview, bypassPerm }: FeatureGateProps): React.ReactNode;
package/dist/index.d.ts CHANGED
@@ -2416,8 +2416,16 @@ interface FeatureGateProps {
2416
2416
  variant?: "block" | "inline";
2417
2417
  /** When false, an incomplete-in-live-mode feature renders `fallback` instead of the ComingSoon banner. Default true. */
2418
2418
  preview?: boolean;
2419
- /** Permission that lets the viewer bypass the ComingSoon veil and use the feature early. Default "flags.manage". */
2420
- bypassPerm?: string;
2419
+ /**
2420
+ * Permission that lets the viewer bypass the ComingSoon veil and use the feature early.
2421
+ * Default `"flags.manage"`. Pass `null` to declare the gate NOT bypassable by anyone,
2422
+ * regardless of permissions — the veil still renders, but no "View and use it anyway"
2423
+ * control appears, and a bypass stored from before this call site turned `null` is
2424
+ * ignored rather than honored. Use this for a gate whose content is itself the problem
2425
+ * (e.g. fixture/demo data standing in for another record), where letting even an
2426
+ * administrator click through would show something untrue, not just something unfinished.
2427
+ */
2428
+ bypassPerm?: string | null;
2421
2429
  }
2422
2430
  /** Feature gate. ALWAYS silent when off — an unreleased feature should leave no trace. */
2423
2431
  declare function FeatureGate({ flag, fallback, children, onRoadmap, blur, minHeight, label, variant, preview, bypassPerm }: FeatureGateProps): React.ReactNode;
package/dist/index.js CHANGED
@@ -7910,6 +7910,7 @@ function FeatureGate({
7910
7910
  if (!preview) return fallback;
7911
7911
  const f = SessionKit.findFlag(flag) || {};
7912
7912
  const missing = rt.missing || [];
7913
+ const canBypass = bypassPerm === null ? false : !bypassPerm || SessionKit.can(bypassPerm);
7913
7914
  return /* @__PURE__ */ jsx62(
7914
7915
  ComingSoon,
7915
7916
  {
@@ -7923,7 +7924,7 @@ function FeatureGate({
7923
7924
  minHeight,
7924
7925
  onRoadmap,
7925
7926
  bypassKey: flag,
7926
- canBypass: !bypassPerm || SessionKit.can(bypassPerm),
7927
+ canBypass,
7927
7928
  children
7928
7929
  }
7929
7930
  );