11import z from "zod" ;
2- import { EleventyConfig , EleventyScope , EleventySuppliedData } from "11ty.ts" ;
2+ import { EleventyScope , EleventySuppliedData } from "11ty.ts" ;
33
4+ //#region rolldown:runtime
5+ //#endregion
6+ //#region src/core/const.d.ts
7+ declare const THEMES : readonly [ "Traditional" , "Modernist" , "Midnight" , "Chocolate" , "Oldstyle" , "Steely" , "Swiss" , "Ultramarine" ] ;
8+ //#endregion
49//#region src/core/options.d.ts
510declare const PluginOptionsSchema : z . ZodObject < {
6- launchPath : z . ZodPipe < z . ZodPrefault < z . ZodOptional < z . ZodNullable < z . ZodUnion < readonly [ z . ZodLiteral < "auto" > , z . ZodLiteral < "nightly" > , z . ZodString ] > > > > , z . ZodTransform < string , string | null > > ;
11+ launchPath : z . ZodPipe < z . ZodTransform < { } | null | undefined , unknown > , z . ZodOptional < z . ZodString > > ;
712 layout : z . ZodOptional < z . ZodNullable < z . ZodString > > ;
8- theme : z . ZodDefault < z . ZodOptional < z . ZodEnum < {
13+ theme : z . ZodDefault < z . ZodPrefault < z . ZodOptional < z . ZodEnum < {
914 Traditional : "Traditional" ;
1015 Modernist : "Modernist" ;
1116 Midnight : "Midnight" ;
@@ -14,18 +19,47 @@ declare const PluginOptionsSchema: z.ZodObject<{
1419 Steely : "Steely" ;
1520 Swiss : "Swiss" ;
1621 Ultramarine : "Ultramarine" ;
17- } > > > ;
18- collectionPage : z . ZodDefault < z . ZodOptional < z . ZodBoolean > > ;
19- verbose : z . ZodDefault < z . ZodOptional < z . ZodBoolean > > ;
20- silent : z . ZodDefault < z . ZodOptional < z . ZodBoolean > > ;
21- noSTL : z . ZodDefault < z . ZodOptional < z . ZodBoolean > > ;
22- checkLaunchPath : z . ZodDefault < z . ZodUnion < readonly [ z . ZodBoolean , z . ZodPrefault < z . ZodCodec < z . ZodString , z . ZodBoolean > > ] > > ;
22+ } > > > > ;
23+ collectionPage : z . ZodDefault < z . ZodPipe < z . ZodTransform < { } | undefined , unknown > , z . ZodUnion < readonly [ z . ZodBoolean , z . ZodCodec < z . ZodString , z . ZodBoolean > ] > > > ;
24+ verbose : z . ZodDefault < z . ZodPipe < z . ZodTransform < { } | undefined , unknown > , z . ZodUnion < readonly [ z . ZodBoolean , z . ZodCodec < z . ZodString , z . ZodBoolean > ] > > > ;
25+ silent : z . ZodDefault < z . ZodPipe < z . ZodTransform < { } | undefined , unknown > , z . ZodUnion < readonly [ z . ZodBoolean , z . ZodCodec < z . ZodString , z . ZodBoolean > ] > > > ;
26+ noSTL : z . ZodDefault < z . ZodPipe < z . ZodTransform < { } | undefined , unknown > , z . ZodUnion < readonly [ z . ZodBoolean , z . ZodCodec < z . ZodString , z . ZodBoolean > ] > > > ;
27+ checkLaunchPath : z . ZodDefault < z . ZodPipe < z . ZodTransform < { } | undefined , unknown > , z . ZodUnion < readonly [ z . ZodBoolean , z . ZodCodec < z . ZodString , z . ZodBoolean > ] > > > ;
2328} , z . core . $strip > ;
2429//#endregion
25- //#region src/lib/types.d.ts
26- type MaybePluginOptions = z . input < typeof PluginOptionsSchema > ;
30+ //#region src/core/scad-bin.d.ts
31+ /**
32+ * Alias mappings to use when installing the plugin into an eleventy project.
33+ *
34+ * @example ```
35+ * import Eleventy from "@11ty/eleventy";
36+ * import { EleventyPluginOpenSCAD, SCAD_BINS } from "eleventy-plugin-scad";
37+ *
38+ * const launchPath = SCAD_BINS.MACOS;
39+ *```
40+ */
41+ declare const SCAD_BINS : {
42+ readonly LINUX : string ;
43+ readonly LINUX_NIGHTLY : string ;
44+ readonly MACOS : string ;
45+ readonly MACOS_NIGHTLY : string ;
46+ readonly WINDOWS : string ;
47+ readonly WINDOWS_NIGHTLY : string ;
48+ } ;
49+ /**
50+ * Returns the OpenSCAD binary path for the current platform.
51+ */
52+ declare namespace types_d_exports {
53+ export { EleventyDirs , FullPageData , MainPlatforms , ModelViewerTheme , ParsedPluginOptions , PlatformMap , PluginOptions , PluginOptionsInput , ScadTemplateData } ;
54+ }
55+ import * as import__11ty_ts from "11ty.ts" ;
56+ __reExport ( types_d_exports , import__11ty_ts ) ;
57+ type ModelViewerTheme = ( typeof THEMES ) [ number ] ;
2758type PluginOptions = z . infer < typeof PluginOptionsSchema > ;
28- type StlViewerThemes = PluginOptions [ "theme" ] ;
59+ type ParsedPluginOptions = z . output < typeof PluginOptionsSchema > ;
60+ type PluginOptionsInput = Omit < z . input < typeof PluginOptionsSchema > , "launchPath" > & {
61+ launchPath : "auto" | "nightly" | ( string & { } ) ;
62+ } ;
2963type ScadTemplateData = {
3064 layout : string ;
3165 title : string ;
@@ -50,41 +84,24 @@ type EleventyDirs = {
5084 layouts ?: string ;
5185 output : string ;
5286} ;
87+ type MainPlatforms = Extract < "linux" | "darwin" | "win32" , NodeJS . Platform > ;
88+ type PlatformMap = Record < MainPlatforms , string > ;
5389//#endregion
5490//#region src/plugin.d.ts
5591/**
5692 * Eleventy Plugin for OpenSCAD
5793 *
5894 * @param {EleventyConfig } eleventyConfig
59- * @param {MaybePluginOptions } options
60- */
61- declare function export_default ( eleventyConfig : EleventyConfig , options : MaybePluginOptions ) : void ;
62- //#endregion
63- //#region src/core/scad-bin.d.ts
64- /**
65- * Alias mappings to use when installing the plugin into an eleventy project.
66- *
67- * @example ```
68- * import Eleventy from "@11ty/eleventy";
69- * import { EleventyPluginOpenSCAD, SCAD_BINS } from "eleventy-plugin-scad";
70- *
71- * const launchPath = SCAD_BINS.MACOS;
72- *```
73- */
74- declare const SCAD_BINS : {
75- readonly LINUX : string ;
76- readonly LINUX_NIGHTLY : string ;
77- readonly MACOS : string ;
78- readonly MACOS_NIGHTLY : string ;
79- readonly WINDOWS : string ;
80- readonly WINDOWS_NIGHTLY : string ;
81- } ;
82- /**
83- * Helper: Returns the OpenSCAD binary path for the current platform.
84- * @param nightly - Whether to use the nightly build
95+ * @param {PluginOptionsInput } options
8596 */
97+ declare function EleventyPluginOpenSCAD ( eleventyConfig : types_d_exports . EleventyConfig , options : PluginOptionsInput ) : void ;
8698//#endregion
8799//#region src/lib/register.d.ts
88- declare function addOpenSCADPlugin ( eleventyConfig : EleventyConfig , options : MaybePluginOptions ) : void ;
100+ declare function addOpenSCADPlugin ( eleventyConfig : types_d_exports . EleventyConfig , options : PluginOptionsInput ) : void ;
101+ declare namespace index_d_exports {
102+ export { EleventyDirs , EleventyPluginOpenSCAD , FullPageData , MainPlatforms , ModelViewerTheme , ParsedPluginOptions , PlatformMap , PluginOptions , PluginOptionsInput , SCAD_BINS , ScadTemplateData , addOpenSCADPlugin , EleventyPluginOpenSCAD as default } ;
103+ }
104+ __reExport ( index_d_exports , types_d_exports ) ;
105+
89106//#endregion
90- export { type EleventyConfig , EleventyDirs , export_default as EleventyPluginOpenSCAD , FullPageData , MaybePluginOptions , PluginOptions , SCAD_BINS , ScadTemplateData , StlViewerThemes , addOpenSCADPlugin , export_default as default } ;
107+ export { EleventyDirs , EleventyPluginOpenSCAD , FullPageData , MainPlatforms , ModelViewerTheme , ParsedPluginOptions , PlatformMap , PluginOptions , PluginOptionsInput , SCAD_BINS , ScadTemplateData , addOpenSCADPlugin , EleventyPluginOpenSCAD as default } ;
0 commit comments