// The public entry of the SDK's bundle build system. The backend, CLI, and local renderer import
// from here instead of re-forking a bundler. (Node + Bun safe — no top-level host globals.)

export { bundleProject, bundleProjectWithMap, scanModulesChisel, CLIENT_INJECT, SERVER_INJECT, type MemoryFiles } from "./bundler"
export {
  compileServerBundle,
  scanServerExports,
  scanServerModules,
  stubServerEntries,
  serverStubSource,
  serverEntrySource,
  serverModuleId,
  isServerPath,
  SERVER_ENTRY_PATH,
  type CompileServerOptions,
  type ServerExport,
  type ServerExportKind,
  type ServerManifest,
} from "./serverSplit"
export { deriveEndpointParams, EndpointTypeError, type DeriveResult } from "./serverTypes"
export {
  detectEntry,
  scanModulesFallback,
  ENTRY_CONVENTION,
  type DetectedEntry,
  type DetectEntryInput,
  type ModuleScanner,
  type ScanModule,
} from "./detectEntry"
export { sanitizeAssetName, isCanonicalAssetName } from "./assetName"
export {
  PLATFORM_BUILD,
  LOCAL_PLATFORM_BUILD,
  ALL_PLATFORM_BUILD,
  LOCAL_ONLY_PLATFORMS,
  TARGET_MATRIX_GENERATION,
  externalSamplerReg,
  matcPlatformsFor,
  matcArgs,
  type MatcPlatform,
  type LocalMatcPlatform,
  type AnyMatcPlatform,
  type ShaderPlatform,
  type AnyShaderPlatform,
} from "./shaderTargets"
export {
  buildLiteMaterialArtifact,
  extractMatBlocks,
  parseJsonish,
  type LiteMaterialArtifact,
  type LiteMaterialParam,
  type JsonishValue,
} from "./liteMaterial"
export {
  parseShaderSchema,
  shaderDefaults,
  type ShaderSchema,
  type ShaderParam,
  type ShaderParamEditor,
  type ShaderParamValue,
} from "./shaderSchema"
export { offsetSourceMap, inlineSourceMapComment } from "./sourcemap"
export { buildHeader, detectProjectKind, type HeaderOptions } from "./header"
export {
  compileProject,
  type CompileEntry,
  type CompileOptions,
  type CompileFileType,
} from "./compileProject"
export {
  loadSceneHarness,
  sceneEditorEntries,
  SCENE_ENTRY_PATH,
  SCENE_HARNESS_DIR,
} from "./sceneEditor"
export {
  applyFontMacro,
  buildFontsHeaderValue,
  scanFontCalls,
  type FontCall,
  type FontFaceRef,
  type FontMacroEntry,
  type FontMacroOptions,
} from "./fontMacro"
export {
  applyAssetIconMacro,
  buildIconsHeaderValue,
  collectVendoredIcons,
  scanAssetIconCalls,
  rewriteAssetIcons,
  suggestIconNames,
  iconNotFoundError,
  ICON_ID,
  type IconCall,
  type AssetIconEntry,
  type AssetIconResolver,
  type RegistryReader,
} from "./assetIconMacro"
export { FONT_REGISTRY, DEFAULT_FONT_REGISTRY_BASE, fontRegistryBase, faceFileName, type FontFamilyMeta } from "./fontRegistry"
export { parseSfnt, type SfntInfo } from "./sfnt"
