Add experiments folder. Add usage.md and SKILL.md. Fix Sheet interactions and add dynamic sheet mode.

This commit is contained in:
2026-07-22 07:04:39 +00:00
parent bfe364c57d
commit 6aed7606ad
48 changed files with 5454 additions and 84 deletions

View File

@@ -0,0 +1,44 @@
import { reactive, type InjectionKey, type Ref } from "vue";
export interface CompatibilityLabEvent {
id: number;
timestamp: string;
source: string;
hook: string;
detail?: string;
}
export interface CompatibilityLabContext {
source: string;
routeLabel: Readonly<Ref<string>>;
}
export const demoAppValueKey: InjectionKey<string> = Symbol("demo-app-value");
export const compatibilityLabContextKey: InjectionKey<CompatibilityLabContext> =
Symbol("compatibility-lab-context");
let eventSequence = 0;
const startedAt = performance.now();
export const compatibilityLab = reactive({
events: [] as CompatibilityLabEvent[],
});
export function recordCompatibilityEvent(
source: string,
hook: string,
detail?: string,
) {
compatibilityLab.events.unshift({
id: ++eventSequence,
timestamp: `${(performance.now() - startedAt).toFixed(0)} ms`,
source,
hook,
detail,
});
if (compatibilityLab.events.length > 120) compatibilityLab.events.splice(120);
}
export function clearCompatibilityEvents() {
compatibilityLab.events.splice(0);
}