mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-01 19:42:03 +00:00
feat(studio): add flat-inspector tokens and STUDIO_FLAT_INSPECTOR_ENABLED flag
This commit is contained in:
@@ -325,6 +325,12 @@
|
||||
"file": "packages/core/src/figma/manifest.ts",
|
||||
"exports": ["mediaDir", "typeDirPath", "isFigmaManifestRecord"],
|
||||
},
|
||||
// STUDIO_FLAT_INSPECTOR_ENABLED: exported for use by downstream studio
|
||||
// inspector redesign tasks; consumed by components in later PRs.
|
||||
{
|
||||
"file": "packages/studio/src/components/editor/manualEditingAvailability.ts",
|
||||
"exports": ["STUDIO_FLAT_INSPECTOR_ENABLED"],
|
||||
},
|
||||
],
|
||||
"ignoreDependencies": [
|
||||
// Runtime/dynamic deps not visible to static analysis: tsup `external`,
|
||||
|
||||
@@ -105,4 +105,14 @@ describe("manual editing availability", () => {
|
||||
expect(resolveStudioBooleanEnvFlag({ EMPTY: "" }, ["EMPTY"], true)).toBe(true);
|
||||
expect(resolveStudioBooleanEnvFlag({ UNKNOWN: "maybe" }, ["UNKNOWN"], false)).toBe(false);
|
||||
});
|
||||
|
||||
it("defaults the flat inspector flag to false and honors an explicit override", async () => {
|
||||
const off = await loadAvailabilityWithEnv({});
|
||||
expect(off.STUDIO_FLAT_INSPECTOR_ENABLED).toBe(false);
|
||||
|
||||
const on = await loadAvailabilityWithEnv({
|
||||
VITE_STUDIO_FLAT_INSPECTOR_ENABLED: "true",
|
||||
});
|
||||
expect(on.STUDIO_FLAT_INSPECTOR_ENABLED).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -97,4 +97,13 @@ export const STUDIO_SDK_RESOLVER_SHADOW_ENABLED = resolveStudioBooleanEnvFlag(
|
||||
true,
|
||||
);
|
||||
|
||||
// Studio inspector redesign ("Ledger, flat" — design_handoff_studio_inspector):
|
||||
// flat identity header/footer/groups behind a flag for incremental review.
|
||||
// Default false; enable via VITE_STUDIO_FLAT_INSPECTOR_ENABLED=true.
|
||||
export const STUDIO_FLAT_INSPECTOR_ENABLED = resolveStudioBooleanEnvFlag(
|
||||
env,
|
||||
["VITE_STUDIO_ENABLE_FLAT_INSPECTOR", "VITE_STUDIO_FLAT_INSPECTOR_ENABLED"],
|
||||
false,
|
||||
);
|
||||
|
||||
export const STUDIO_MANUAL_EDITING_DISABLED_TITLE = "Manual editing is temporarily disabled";
|
||||
|
||||
@@ -17,6 +17,8 @@ const studioPreset = {
|
||||
hover: "#27272A",
|
||||
border: "#1E1E1E",
|
||||
"border-input": "#27272A",
|
||||
hairline: "#1A1A1C",
|
||||
"text-0": "#FAFAFA",
|
||||
"text-1": "#E4E4E7",
|
||||
"text-2": "#A1A1AA",
|
||||
"text-3": "#71717A",
|
||||
@@ -24,6 +26,8 @@ const studioPreset = {
|
||||
"text-5": "#3F3F46",
|
||||
accent: "#3CE6AC",
|
||||
danger: "#EF4444",
|
||||
media: "#00E3FF",
|
||||
container: "#F5A623",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user