/* auto-generated by NAPI-RS */ /* eslint-disable */ export interface ImportSourceInput { as: string from: string } export declare const enum PropertyValidationMode { Throw = 'throw', Warn = 'warn', Silent = 'silent' } export declare const enum SourceMaps { True = 'True', False = 'False', Inline = 'Inline' } export interface StyleXMetadata { stylex: ([string, { ltr: string; rtl?: null | string }, number])[] } export interface StyleXModuleResolution { type: string rootDir?: string themeFileExtension?: string } export interface StyleXOptions { styleResolution?: 'application-order' | 'property-specificity' | 'legacy-expand-shorthands' enableFontSizePxToRem?: boolean runtimeInjection?: boolean | string classNamePrefix?: string definedStylexCssVariables?: Record importSources?: (string | { as: string, from: string })[] treeshakeCompensation?: boolean enableInlinedConditionalMerge?: boolean enableMediaQueryOrder?: boolean enableLogicalStylesPolyfill?: boolean enableLegacyValueFlipping?: boolean enableLTRRTLComments?: boolean legacyDisableLayers?: boolean dev?: boolean test?: boolean debug?: boolean enableDebugClassNames?: boolean enableDebugDataProp?: boolean enableDevClassNames?: boolean enableMinifiedKeys?: boolean injectStylexSideEffects?: boolean useRealFileForSource?: boolean aliases?: Record unstable_moduleResolution?: StyleXModuleResolution sourceMap?: SourceMaps /** * Embed the original source text in the emitted map's `sourcesContent`. * Defaults to `true` so tooling that reads the map (Chrome DevTools via * Next.js' `eval-source-map`, in particular) can render the authored file * without re-fetching `sources[0]`. Set to `false` for production maps * where size matters, or where the source shouldn't ship with the map. */ inlineSourcesContent?: boolean /** * Emit column positions in the source map's `mappings`. Defaults to `true`, * which maps individual expressions rather than whole lines. Set to `false` * for smaller, line-granularity maps (the `cheap-*` webpack devtools). */ emitSourceMapColumns?: boolean /** * JSON source map for the incoming `code`, produced by earlier tooling * (e.g. a macro loader). When provided, debug source-map annotations are * mapped back to the original authored file and the emitted source map is * chained onto it. */ inputSourceMap?: string propertyValidationMode?: 'throw' | 'warn' | 'silent' /** Compile-time constants and functions accessible via `stylex.env`. */ env?: Record /** * Optional function or string to transform file paths used in debug class * names / source maps. */ debugFilePath?: ((filePath: string) => string) | string | undefined /** * The prop name to use as the `sx` shorthand (default: `"sx"`). Set to * `false` to disable. */ sxPropName?: string | false } export interface StyleXTransformResult { code: string metadata: StyleXMetadata map?: string } export declare function transform(filename: string, code: string, options: StyleXOptions): StyleXTransformResult export interface TransformOutput { code: string map?: string output?: string extractedComments?: Array diagnostics: Array }