[{"data":1,"prerenderedAt":151},["ShallowReactive",2],{"bml-reference-library-client-types":3},{"data":4,"body":5},{},{"type":6,"children":7},"root",[8,17,39,51,63,68,101],{"type":9,"tag":10,"props":11,"children":13},"element","h1",{"id":12},"client-event-types-in-compiled-libraries",[14],{"type":15,"value":16},"text","Client event types in compiled libraries",{"type":9,"tag":18,"props":19,"children":20},"p",{},[21,23,30,32,37],{"type":15,"value":22},"An authored ",{"type":9,"tag":24,"props":25,"children":27},"code",{"className":26},"",[28],{"type":15,"value":29},".d.ts",{"type":15,"value":31}," file under ",{"type":9,"tag":24,"props":33,"children":34},{"className":26},[35],{"type":15,"value":36},"src\u002Fmain\u002Fclient",{"type":15,"value":38}," is included in both the library's binary JAR and\nits source attachment. Declare a module with a producer-owned name for stable type-only imports:",{"type":9,"tag":40,"props":41,"children":46},"pre",{"className":42,"code":44,"filename":-1,"highlights":-1,"language":45,"meta":26},[43],"language-ts","declare module \"@example\u002Fdesign\u002Fselect\" {\n  export interface Selection {\n    value: string;\n    label: string;\n  }\n}\n","ts",[47],{"type":9,"tag":24,"props":48,"children":49},{"__ignoreMap":26},[50],{"type":15,"value":44},{"type":9,"tag":18,"props":52,"children":53},{},[54,56,61],{"type":15,"value":55},"The file is the authoritative contract. Library helpers and consuming client scripts both use\n",{"type":9,"tag":24,"props":57,"children":58},{"className":26},[59],{"type":15,"value":60},"import type { Selection } from \"@example\u002Fdesign\u002Fselect\"",{"type":15,"value":62},". Use distinct module names for distinct\nlibraries. These are TypeScript ambient modules; normal TypeScript declaration rules apply.\nKeep their referenced types in the shipped declarations or in dependencies the consumer explicitly\nprovides. Declarations do not publish executable imports or install npm dependencies.",{"type":9,"tag":18,"props":64,"children":65},{},[66],{"type":15,"value":67},"The existing client manifest inventories each declaration and its digest. When a component from\nthe library is selected, the linker verifies its archive bytes and extracts declarations beside\nthe existing ESM inputs under the generated client tree. No producer checkout or source attachment\nis needed. Removing that library from the selected components removes its linked declarations.\nDeclarations are excluded from browser entries and served application resources.",{"type":9,"tag":18,"props":69,"children":70},{},[71,73,78,80,85,87,92,94,99],{"type":15,"value":72},"Run ",{"type":9,"tag":24,"props":74,"children":75},{"className":26},[76],{"type":15,"value":77},"bmlPrepareClient",{"type":15,"value":79}," before type checking and include ",{"type":9,"tag":24,"props":81,"children":82},{"className":26},[83],{"type":15,"value":84},"build\u002Fgenerated\u002Fbml\u002Fts\u002F**\u002F*.ts",{"type":15,"value":86}," in the\nconsumer's ",{"type":9,"tag":24,"props":88,"children":89},{"className":26},[90],{"type":15,"value":91},"tsconfig.json",{"type":15,"value":93},", alongside its other client sources. No paths mapping to the library's\nsource or generated hash directory is required. Use ",{"type":9,"tag":24,"props":95,"children":96},{"className":26},[97],{"type":15,"value":98},"import type",{"type":15,"value":100}," so the TypeScript import is\nerased during browser bundling. The regular Gradle dependency and BML import select the library;\nthere is no separate type artifact.",{"type":9,"tag":18,"props":102,"children":103},{},[104,106,113,115,120,122,127,129,134,136,141,143,149],{"type":15,"value":105},"The ",{"type":9,"tag":107,"props":108,"children":110},"a",{"href":109},"\u002Fbml-reference\u002Fdesign-library",[111],{"type":15,"value":112},"design library",{"type":15,"value":114}," supplies ",{"type":9,"tag":24,"props":116,"children":117},{"className":26},[118],{"type":15,"value":119},"SelectOption",{"type":15,"value":121},", ",{"type":9,"tag":24,"props":123,"children":124},{"className":26},[125],{"type":15,"value":126},"SelectPage",{"type":15,"value":128}," and ",{"type":9,"tag":24,"props":130,"children":131},{"className":26},[132],{"type":15,"value":133},"SelectSearch",{"type":15,"value":135},"\nthrough ",{"type":9,"tag":24,"props":137,"children":138},{"className":26},[139],{"type":15,"value":140},"@bosca\u002Fbml-design\u002Fselect",{"type":15,"value":142},". The ",{"type":9,"tag":107,"props":144,"children":146},{"href":145},"\u002Fbml-reference\u002Fdesign-library#catalog-and-example-consumer",[147],{"type":15,"value":148},"independent consumer",{"type":15,"value":150},"\nchecks its actual generated adapter and invalid event payloads. The Gradle publication fixture also\ntype checks and bundles an application after deleting its producer and source JAR.",1793227349725]