@htmlbricks/hb-bundle
Version:
Single IIFE loader for all HTML Bricks hb-* web components from the jsDelivr CDN, with optional Subresource Integrity; includes agent/LLM docs and theme CSS variables.
29 lines (25 loc) • 796 B
TypeScript
import type { FormSchema } from "../form/webcomponent.type";
/** One funnel step = one `hb-form` schema (`FormSchema`). */
export type FunnelStepSchemes = FormSchema[];
export type Component = {
id?: string;
style?: string;
/** Total steps when `schemes` is not yet parsed (string from HTML). */
steps?: number | string;
/** JSON string of `FormSchema[]` (one schema per step); after first parse the implementation clears the prop to `[]`. */
schemes?: string | FunnelStepSchemes;
step?: number | string;
submitstep?: "yes" | "no";
};
export type Events = {
update: {
step: number;
scheme: { schema: FormSchema; valid: boolean };
valid: boolean;
};
submit: {
schemes: { schema: FormSchema; valid: boolean }[];
steps: number;
step: number;
};
};