persona-community-5/.pnpm-store/v3/files/8c/291e52cb58916caea80b7b0487866ec04d45c1c437a3c333b94120774f42c997406d9f0d16eae9197adc0653808f86920a911d8ea8f2829098b76137c314d2
rdev-worker a1d0d1bf1c
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
build: /implement-feature community-ui --requirements 'Build the React commu...
2026-02-24 08:22:30 +00:00

85 lines
2.3 KiB
Plaintext

export type CodeWalkthroughStepAttr = {
id: string;
title?: string;
stepKey: number;
};
export type FilesetsMarkdocAttr = WithConditions<{
files?: string[];
downloadAssociatedFiles?: string[];
}>[];
export type InputsMarkdocAttr = {
[id: string]: WithConditions<{
value: string;
}>;
};
export type TogglesMarkdocAttr = {
[id: string]: CodeWalkthroughConditionsObject;
};
export type CodeWalkthroughConditions = {
[key: string]: string | string[] | undefined | boolean;
};
export type CodeWalkthroughFileset = WithConditions<{
files?: CodeWalkthroughFile[];
downloadAssociatedFiles?: CodeWalkthroughFile[];
}>;
export type CodeWalkthroughAttr = {
steps: CodeWalkthroughStepAttr[];
filters: Record<string, CodeWalkthroughFilter>;
filesets: CodeWalkthroughFileset[];
preview: React.ReactNode[];
inputs: InputsMarkdocAttr;
toggles: TogglesMarkdocAttr;
__idx: number;
};
export type CodeWalkthroughFile = {
path: string;
content: CodeWalkthroughNode[];
basename: string;
metadata: CodeWalkthroughFileMetadata;
language: string;
};
export type CodeWalkthroughChunk = {
start: number;
children: CodeWalkthroughNode[];
condition: CodeWalkthroughChunkCondition;
};
export type CodeWalkthroughChunkCondition = WithConditions<{
steps: string[];
}>;
export type CodeWalkthroughNode = CodeWalkthroughChunk | string;
export type CodeWalkthroughFileMetadata = {
steps: string[];
};
export type CodeWalkthroughFilter = WithConditions<{
id: string;
label?: string;
items: CodeWalkthroughFilterItem[];
}>;
export type CodeWalkthroughFilterItem = WithConditions<{
value: string;
}>;
export type CodeWalkthroughConditionsObject = {
when?: CodeWalkthroughConditions;
unless?: CodeWalkthroughConditions;
};
export type WithConditions<T> = T & CodeWalkthroughConditionsObject;
export type CodeWalkthroughControls = {
toggle: boolean;
input: string;
filter: string;
};
export type CodeWalkthroughControlState = WithConditions<{
value: string;
render: boolean;
type: 'input';
} | {
value: string;
render: boolean;
type: 'filter';
} | {
value: boolean;
render: boolean;
type: 'toggle';
}>;
export type CodeWalkthroughControlsState = Record<string, CodeWalkthroughControlState>;