@jackdbd/eleventy-plugin-text-to-speech
Version:
Eleventy plugin that uses text-to-speech to generate audio assets for your website, then injects audio players in your HTML.
79 lines • 2.36 kB
TypeScript
import { JSDOM } from 'jsdom';
import { z } from 'zod';
export declare const match_object: z.ZodObject<{
/**
* The text that matched one or more CSS selector or one or more XPath expression.
*/
text: z.ZodString;
/**
* All the CSS selectors that matched the text.
*/
cssSelectors: z.ZodArray<z.ZodString, "many">;
/**
* All the XPath expressions that matched the text.
*/
xPathExpressions: z.ZodArray<z.ZodString, "many">;
}, "strip", z.ZodTypeAny, {
cssSelectors: string[];
xPathExpressions: string[];
text: string;
}, {
cssSelectors: string[];
xPathExpressions: string[];
text: string;
}>;
export declare const rule_match_record: z.ZodRecord<z.ZodString, z.ZodObject<{
/**
* The text that matched one or more CSS selector or one or more XPath expression.
*/
text: z.ZodString;
/**
* All the CSS selectors that matched the text.
*/
cssSelectors: z.ZodArray<z.ZodString, "many">;
/**
* All the XPath expressions that matched the text.
*/
xPathExpressions: z.ZodArray<z.ZodString, "many">;
}, "strip", z.ZodTypeAny, {
cssSelectors: string[];
xPathExpressions: string[];
text: string;
}, {
cssSelectors: string[];
xPathExpressions: string[];
text: string;
}>>;
export type RuleMatchRecord = z.infer<typeof rule_match_record>;
export declare const config_schema: z.ZodObject<{
dom: z.ZodType<JSDOM, z.ZodTypeDef, JSDOM>;
cssSelectors: z.ZodArray<z.ZodString, "many">;
xPathExpressions: z.ZodArray<z.ZodString, "many">;
}, "strip", z.ZodTypeAny, {
cssSelectors: string[];
xPathExpressions: string[];
dom: JSDOM;
}, {
cssSelectors: string[];
xPathExpressions: string[];
dom: JSDOM;
}>;
type Config = z.infer<typeof config_schema>;
/**
* Creates a rule match record, namely a hash map where all the keys are content
* hashes of the matched texts, and the values are those texts that match one or
* more CSS selectors, or one or more XPath expressions.
*/
export declare const ruleMatchRecord: (config: Config) => {
error: Error;
value?: undefined;
} | {
value: Record<string, {
cssSelectors: string[];
xPathExpressions: string[];
text: string;
}>;
error?: undefined;
};
export {};
//# sourceMappingURL=rule-match-record.d.ts.map