UNPKG

@mod-construction/mod-dlm

Version:

mod-dlm is an open source project designed to create a domain-specific language (DSL) for describing prefab elements in the Architecture, Engineering, and Construction (AEC) industry. This project provides tools for defining entity models and automaticall

2 lines 21.9 kB
var Ae=Object.defineProperty,Ie=Object.defineProperties;var Re=Object.getOwnPropertyDescriptors;var I=Object.getOwnPropertySymbols;var Me=Object.prototype.hasOwnProperty,Te=Object.prototype.propertyIsEnumerable;var R=(e,i,o)=>i in e?Ae(e,i,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[i]=o,M=(e,i)=>{for(var o in i||(i={}))Me.call(i,o)&&R(e,o,i[o]);if(I)for(var o of I(i))Te.call(i,o)&&R(e,o,i[o]);return e},T=(e,i)=>Ie(e,Re(i));import{z as Oe}from"zod";function O(e){if(typeof e.ZodType.prototype.openapi!="undefined")return;e.ZodType.prototype.openapi=function(s){return new this.constructor(T(M({},this._def),{openapi:s}))};let i=e.ZodObject.prototype.extend;e.ZodObject.prototype.extend=function(...s){let n=i.apply(this,s);return n._def.extendMetadata={extends:this},delete n._def.openapi,n};let o=e.ZodObject.prototype.omit;e.ZodObject.prototype.omit=function(...s){let n=o.apply(this,s);return delete n._def.extendMetadata,delete n._def.openapi,n};let Pe=e.ZodObject.prototype.pick;e.ZodObject.prototype.pick=function(...s){let n=Pe.apply(this,s);return delete n._def.extendMetadata,delete n._def.openapi,n}}O(Oe);import{z as E}from"zod";var F=E.object({weightedSoundReductionIndex:E.number().describe("Rw value in dB (ISO 717-1)"),spectrumAdaptationTerm:E.number().optional().describe("Ctr value in dB (optional, ISO 717-1)")});import{z as f}from"zod";var D=f.object({colorOptions:f.string().array().optional(),texture:f.string().optional(),modularAdaptability:f.string().optional()});import{z as b}from"zod";var v=b.object({width:b.number().gt(0,"Width must be greater than 0"),height:b.number().gt(0,"Height must be greater than 0"),depth:b.number().gt(0,"Depth must be greater than 0")}).openapi({description:"The bounding box of an element in millimeters."});import{z as d}from"zod";var L=d.object({certificationTypes:d.array(d.string()),regulatoryApprovals:d.array(d.string())});import{z as Fe}from"zod";import{z as C}from"zod";var y=C.object({min:C.number().gt(0,"Minimum value must be greater than 0"),max:C.number().gt(0,"Maximum value must be greater than 0")}).openapi({description:"A range of dimensions in millimeters",example:{min:10,max:20}});var z=Fe.object({width:y,height:y,length:y});import{z as B}from"zod";var U=B.object({technicalSpecifications:B.string(),certifications:L});import{z as P}from"zod";import{z as t}from"zod";var w=t.enum(["1","2","3","4","5"]).openapi({description:"Quantified ease of disassembly based on ISO 20887:2020: 1 = not disassemblable without destruction, 2 = destructive tools required, 3 = partial with tools, 4 = full with tools, 5 = tool-free or designed-for-disassembly.",example:"3"}),W=t.enum(["single-use","multi-use","recyclable","remanufacturable"]).openapi({description:"Potential for reuse of the product: 'single-use' means one-time use, 'multi-use' indicates multiple uses, 'recyclable' means material can be recycled, and 'remanufacturable' means product can be refurbished and remanufactured.",example:"recyclable"}),j=t.enum(["none","surface-only","partial","full"]).openapi({description:"Scope of refurbishment possible: 'none' means no refurbishment, 'surface-only' indicates minor surface work, 'partial' means moderate refurbishment, and 'full' means complete refurbishment.",example:"partial"}),N=t.enum(["none","C2C_basic","C2C_bronze","C2C_silver","C2C_gold","C2C_platinum"]).openapi({description:"Certification levels for circularity according to Cradle to Cradle (C2C) standards, ranging from 'none' to 'C2C_platinum'.",example:"C2C_gold"}),u=t.enum(["Timber","Steel","Concrete","Hybrid","Other"]).openapi({description:"Primary material of the product element.",example:"Steel"}),_=t.enum(["Wall","Balcony","Pod","Frame","Facade","Floors","Modules","Plants","Roofs","Stairs"]).openapi({description:"Building system category to which the product element belongs.",example:"Facade"}),k=t.enum(["Boarding","Solid Wall Panels","Closed Wall Panels","Twinwall","Open Wall Panels","Structural Insulated Panels (SIPs)","Insulated Concrete Panels","Prefabricated Balcony","Pod","Whole Building System","Structural Frame","Facade System","Hollowcore Floor","Concrete Lattice Floor","Floor Cassettes","Solid Floor Panels","Volumetric module","Prefabricated Plant","Roof Panel","Roof Truss","Prefabricated Stairs"]).openapi({description:"Specific product category within building systems.",example:"Structural Insulated Panels (SIPs)"}),V=t.enum(["SDS \u2264 0.167g","0.167g < SDS \u2264 0.33g","0.33g < SDS \u2264 0.50g","SDS > 0.50g"]).openapi({description:"Seismic Design Spectral Acceleration at short period (SDS), as defined by ASCE 7 or Eurocode 8 hazard maps.",example:"0.167g < SDS \u2264 0.33g"}),q=t.enum(["\u2264 1.0 kPa","1.0\u20132.5 kPa","2.5\u20134.0 kPa","> 4.0 kPa"]).openapi({description:"Wind pressure resistance in kilopascals (kPa), typically calculated per EN 1991-1-4 or ASCE 7-16.",example:"2.5\u20134.0 kPa"}),G=t.enum(["A+","A","B","C","D"]).openapi({description:"Simplified sustainability score, where A+ indicates highest performance. Define based on EPD or lifecycle impact benchmarks.",example:"A"}),H=t.enum(["None (<0.01 mg/m\xB3)","Very Low (<0.1 mg/m\xB3)","Low (0.1\u20130.3 mg/m\xB3)","Moderate (0.3\u20131.0 mg/m\xB3)","High (>1.0 mg/m\xB3)"]).openapi({description:"Qualitative VOC emissions categories with indicative thresholds based on ISO 16000 or GREENGUARD standards.",example:"Low (0.1\u20130.3 mg/m\xB3)"}),ct=t.number().min(0).max(100).describe("Percentage of the element's mass that is recyclable, based on EN 45555 or similar assessment."),Z=t.enum(["R-1","R-2","R-5","Energy Star","LEED Certified","LEED Silver","LEED Gold","LEED Platinum","BREEAM Good","BREEAM Very Good","BREEAM Excellent","BREEAM Outstanding","Passive House","DGNB Gold"]).openapi({description:"Energy performance classification, combining insulation tiers and certifications (LEED, BREEAM, etc.).",example:"LEED Gold"}),Q=t.enum(["Bolt-on","Welded","Clip-on","Adhesive","Mortar","Snap-fit","Plug-and-Play","Dry Joint"]).openapi({description:"Type of connection used for assembly, including mechanical, chemical, and modular methods.",example:"Bolt-on"}),J=t.enum(["EN 1991-1-1","ASTM E72","ISO 4355"]).openapi({description:"Structural load testing standard used to determine maximum load.",example:"ASTM E72"}),Y=t.enum(["Steel Frame","Wood Frame","Concrete Structure","Brickwork","Modular Systems","Glass Facades","Composite Materials","CLT","Light Gauge Steel","Masonry Infill"]).openapi({description:"Structural systems compatible with the prefab element, supporting integration into various construction assemblies.",example:"Concrete Structure"}),$=t.enum(["point","uniform","triangular","trapezoidal","eccentric","custom"]).openapi({description:"The type of load distribution applied to the element.",example:"point"}),K=t.enum(["IfcBeam","IfcChimney","IfcColumn","IfcCovering","IfcCurtainWall","IfcDoor","IfcFooting","IfcMember","IfcPile","IfcPlate","IfcRailing","IfcRamp","IfcRampFlight","IfcRoof","IfcShadingDevice","IfcSlab","IfcStair","IfcStairFlight","IfcWall","IfcWallStandardCase","IfcWindow","IfcBuildingElementProxy"]).openapi({description:"Enumeration of IFC Building Element types based on IFC 4.3.",example:"IfcWall"}),X=t.enum(["EUR","USD","GBP","CHF","JPY","CNY"]).openapi({description:"Currency of the cost estimate, using ISO 4217 codes.",example:"EUR"}),ee=t.enum(["A1","A2","B","C","D","E","F"]).openapi({description:"Fire resistance classification based on Euroclass standards (EN 13501-1).",example:"A1"}),te=t.enum(["30min","60min","90min","120min","180min","240min"]).openapi({description:"Fire resistance duration in minutes (EN 1363-1 / ASTM E119).",example:"30min"});var ie=P.object({costPerUnit:P.number().optional().describe("Estimated cost per unit of the prefab element, in selected currency.").openapi({description:"Estimated cost per unit of the prefab element.",example:180.5}),currency:X.optional().describe("Currency of the cost estimate, using ISO 4217 codes.").openapi({description:"Currency used for the cost estimate (e.g., EUR, USD).",example:"EUR"}),manufacturingLeadTime:P.number().optional().describe("Typical time required to manufacture one unit in days.").openapi({description:"Estimated manufacturing lead time in days.",example:21})});import{z as De}from"zod";var oe=De.object({reactionToFireClassification:ee,fireResistanceDuration:te}).openapi({description:"Fire resistance classification of the material, based on Euroclass standards (EN 13501-1).",example:{reactionToFireClassification:"A1",fireResistanceDuration:"30min"}});import{z as ne}from"zod";var ae=ne.object({connectionType:Q.optional(),installationTime:ne.number().min(0).describe("Estimated installation time in minutes"),compatibility:Y.optional()}).openapi({description:"Describes how the prefab element is installed and what structural systems it is compatible with.",ref:"InstallationAndConnectivity"});import{z as g}from"zod";var re=g.object({expectedLifespan:g.number().optional().describe("Expected lifespan of the prefab element in years.").openapi({description:"Expected lifespan of the prefab element in years.",example:50}),maintenanceRequirements:g.string().optional().describe("Maintenance requirements of the prefab element.").openapi({description:"Maintenance requirements of the prefab element.",example:"Regular cleaning and inspection."}),warranty:g.string().optional().describe("Warranty information of the prefab element.").openapi({description:"Warranty information of the prefab element.",example:"10 years warranty."})});import{z as be}from"zod";import{z as m}from"zod";import ve from"convert-units";import Le from"convert-units/definitions/all";var c=ve(Le),se=c().possibilities("force"),ce=c().possibilities("mass"),me=c().possibilities("length"),le=c().possibilities("area"),pe=c().possibilities("volume"),de=c().possibilities("torque"),ue=c().possibilities("temperature"),r=e=>e;var fe=m.enum(r(se)),Ot=m.enum(r(ce)),Ft=m.enum(r(me)),Dt=m.enum(r(le)),vt=m.enum(r(pe)),Lt=m.enum(r(de)),zt=m.enum(r(ue));var ye=be.object({maximumLoad:be.number().positive("Maximum load must be a positive number").describe("The maximum load the element can bear, expressed as a positive number (e.g., 5.0)"),forceUnit:fe.describe("Unit of force measurement, e.g., 'kN' for kilonewtons or 'N' for newtons"),loadDistribution:$.describe("The type of load distribution applied to the element"),testStandard:J.optional()}).openapi({description:"The maximum load the element can bear, expressed as a positive number (e.g., 5.0)",example:{maximumLoad:5,forceUnit:"kN",loadDistribution:"point",testStandard:"EN 1991-1-1"}});import{z as h}from"zod";var ze=h.object({type:u,grade:h.string()}),kt=h.object({materials:h.array(ze)});import{z as S}from"zod";var ge=S.object({fireResistance:oe,thermalTransmittance:S.number().min(0).max(2).describe("Thermal transmittance (U-value) in W/m\xB2K, typically between 0 and 2"),acousticProperties:F.optional(),airTightness:S.number().min(0).describe("Air permeability (e.g., n50 value in 1/h or q50 in m\xB3/h\xB7m\xB2) - lower values indicate better airtightness"),vaporPermeability:S.number().min(0).describe("Vapor permeability in \xB5 or Sd value in meters (ISO 12572) - measures resistance to water vapor diffusion")});import{z as Be}from"zod";var Ue=Be.object({category:k,buildingSystem:_}),we=[{category:"Boarding",buildingSystem:"Wall"},{category:"Solid Wall Panels",buildingSystem:"Wall"},{category:"Closed Wall Panels",buildingSystem:"Wall"},{category:"Twinwall",buildingSystem:"Wall"},{category:"Open Wall Panels",buildingSystem:"Wall"},{category:"Structural Insulated Panels (SIPs)",buildingSystem:"Wall"},{category:"Insulated Concrete Panels",buildingSystem:"Wall"},{category:"Whole Building System",buildingSystem:"Frame"},{category:"Structural Frame",buildingSystem:"Frame"},{category:"Hollowcore Floor",buildingSystem:"Floors"},{category:"Concrete Lattice Floor",buildingSystem:"Floors"},{category:"Floor Cassettes",buildingSystem:"Floors"},{category:"Solid Floor Panels",buildingSystem:"Floors"},{category:"Roof Panel",buildingSystem:"Roofs"},{category:"Roof Truss",buildingSystem:"Roofs"},{category:"Prefabricated Balcony",buildingSystem:"Balcony"},{category:"Pod",buildingSystem:"Pod"},{category:"Facade System",buildingSystem:"Facade"},{category:"Volumetric module",buildingSystem:"Modules"},{category:"Prefabricated Plant",buildingSystem:"Plants"},{category:"Prefabricated Stairs",buildingSystem:"Stairs"}],he=Ue.refine(e=>we.some(i=>i.category===e.category&&i.buildingSystem===e.buildingSystem),{message:"Invalid product category or building system",path:["productCategory"]}).openapi({description:"Product Category",example:{category:"Solid Wall Panels",buildingSystem:"Wall"},ref:"ProductCategory"});import{z as We}from"zod";var Se=We.object({finishMaterial:u,structuralMaterial:u});import{z as a}from"zod";var xe=a.object({loadBearingCapacity:ye.optional(),seismicResistance:a.union([V,a.string().describe("Custom seismic classification (e.g., Eurocode 8, ASCE 7 zone)")]).optional(),windLoadResistance:a.union([q,a.string().describe("Custom wind classification or rating (e.g., EN 1991-1-4)")]).optional(),deflectionLimit:a.union([a.number().describe("Maximum deflection under load in mm"),a.string().regex(/^L\/\d+$/,"Use format like 'L/250'").describe("Deflection limit as a span ratio (e.g., 'L/250')")]).optional().describe("Deflection control criteria under load: either fixed displacement in mm or span ratio like L/250"),safetyFactor:a.number().min(1).optional().describe("Applied safety factor for structural design, typically 1.0\u20132.0")});import{z as p}from"zod";var Ee=p.object({environmentalImpact:p.object({classification:G.describe("Sustainability classification rating (e.g., A+, A, B...)").openapi({description:"Overall sustainability score based on environmental impact (e.g., A+, A, B).",example:"A+"}),VOCEmissions:H.optional().describe("Volatile Organic Compounds emissions level.").openapi({description:"VOC emissions category: None, Low, Medium, or High.",example:"Low (0.1\u20130.3 mg/m\xB3)"}),recyclability:p.number().min(0).max(100).optional().describe("Percentage of the element that is recyclable.").openapi({description:"Recyclability rate of the product from 0 to 100%.",example:85}),energyEfficiency:Z.describe("Energy performance certification, e.g., LEED or Energy Star.").openapi({description:"Energy certification level or standard.",example:"LEED Certified"})}),circularity:p.object({disassemblyRating:w.describe("Ease of disassembly based on ISO 20887:2020.").openapi({description:"Rating from 1 (not disassemblable) to 5 (tool-free disassembly).",example:"3"}),reusePotential:W.describe("End-of-life reuse potential: single-use, recyclable, etc.").openapi({description:"Primary reuse potential of the element after its service life.",example:"recyclable"}),refurbishmentScope:j.describe("Extent to which the element can be refurbished.").openapi({description:"Refurbishment level: none, surface-only, partial, or full.",example:"partial"}),circularityCertification:N.describe("Cradle to Cradle or similar certification.").openapi({description:"Level of circularity certification (e.g., C2C_gold).",example:"C2C_gold"})}),origin:p.object({countryOfManufacturing:p.string().describe("Country where the element is manufactured.").openapi({description:"Country of production for lifecycle and logistics assessment.",example:"Germany"})})}).openapi({description:"Sustainability attributes of the element.",ref:"Sustainability"});import{z as A}from"zod";var ci=A.object({uValue:A.number(),insulationType:A.string()});import{z as x}from"zod";var Ce=x.object({version:x.string().regex(/^\d+\.\d+\.\d+$/,"Version must follow semantic versioning (e.g., 1.0.0)").describe("Semantic version of the prefab element, e.g., '1.0.0'"),status:x.enum(["draft","published","deprecated"]).describe("Publishing status of the element"),lastUpdated:x.string().datetime().describe("ISO 8601 timestamp of the last update")});import{z as l}from"zod";var je=l.string().uuid().openapi({description:"A unique identifier for an element",example:"4dd643ff-7ec7-4666-9c88-50b7d3da34e4",ref:"ElementId",param:{in:"path",name:"id"}}),Mi=l.object({id:je.describe("Unique identifier for the prefab element (UUID).").openapi({description:"A unique identifier for the prefab element (UUID).",example:"4dd643ff-7ec7-4666-9c88-50b7d3da34e4"}),versionMetadata:Ce.describe("Versioning and publishing status metadata of the element.").openapi({description:"Versioning and publishing status metadata of the element."}),name:l.string().min(1,"Name is required").describe("Name of the prefab element").openapi({description:"Human-readable name of the prefab element.",example:"Cross-Laminated Timber Wall Panel"}),description:l.string().min(1,"Description is required").describe("Detailed description of the element").openapi({description:"Detailed description of the prefab element, including its intended use or application.",example:"This CLT wall panel is suitable for multi-story residential buildings and meets fire resistance standards."}),boundingBox:v.describe("3D bounding dimensions of the prefab element.").openapi({description:"3D bounding dimensions of the prefab element, defining its spatial envelope."}),images:l.array(l.string()).min(1,"At least one image is required").describe("Image URLs of the element").openapi({description:"List of image URLs showing the prefab element from various angles.",example:["https://example.com/images/clt-wall-front.png"]}),productCategory:he.describe("Product category classification used for filtering and recommendation.").openapi({description:"Product category classification (e.g., Wall Panels, Stairs, Facade Elements)."}),material:Se.describe("Material composition and technical attributes.").openapi({description:"Material and physical properties of the prefab element."}),dimensional:z.describe("Dimensional specifications like height, width, thickness, etc.").openapi({description:"Dimensional characteristics of the prefab element."}),structuralProperties:xe.optional().describe("Load-bearing and performance data relevant to structural design.").openapi({description:"Optional structural performance details like capacity, stiffness, or seismic resistance."}),performance:ge.optional().describe("Optional mechanical, thermal, and acoustic performance data.").openapi({description:"Optional performance metrics related to strength, insulation, or soundproofing."}),sustainability:Ee.optional().describe("Optional environmental attributes including embodied carbon or certifications.").openapi({description:"Environmental and sustainability performance such as EPDs or recyclability."}),documentationAndCompliance:U.optional().describe("Optional links to technical documents, certificates, and compliance data.").openapi({description:"Optional metadata linking to certificates, spec sheets, or regulatory documents."}),installationAndConnectivity:ae.optional().describe("Optional installation and interface information for compatibility checks.").openapi({description:"Optional installation guidelines and connectivity interface descriptions."}),lifecycleAndMaintenance:re.optional().describe("Optional data for durability, service intervals, and maintenance needs.").openapi({description:"Optional data describing maintenance schedules or expected lifecycle."}),aestheticAndCustomizationOptions:D.optional().describe("Optional fields related to colors, textures, and customization.").openapi({description:"Optional aesthetic options like finishes or material variations."}),economicFactors:ie.optional().describe("Optional fields describing cost, lead time, and economic implications.").openapi({description:"Optional cost estimation, lead time, and supply constraints."}),ifcType:K.optional().describe("Optional IFC classification type for BIM model integration.").openapi({description:"IFC Building Element types based on IFC 4.3 used in BIM tools for semantic classification. (e.g., IfcWall, IfcSlab).",example:"IfcWallStandardCase"}),bimModelUrl:l.string().url().optional().describe("Optional URL linking to the BIM model (e.g., IFC file or 3D viewer link) for the prefab element.").openapi({description:"Optional URL pointing to a downloadable BIM model or online viewer for the element.",example:"https://example.com/models/clt-wall.ifc"})}).openapi({description:"Prefab Element",ref:"PrefabElement"});export{F as AcousticPropertiesSchema,D as AestheticAndCustomizationOptionsSchema,Dt as AreaUnits,v as BoundingBoxSchema,_ as BuildingSystemEnum,L as CertificationsSchema,N as CircularityCertificationEnum,Y as CompatibilityEnum,Q as ConnectionType,X as CurrencyEnum,z as DimensionalAttributesSchema,w as DisassemblyRatingEnum,U as DocumentationAndComplianceSchema,ie as EconomicFactorsSchema,je as ElementIdSchema,Z as EnergyEfficiency,te as FireResistanceDurationEnum,ee as FireResistanceEnum,oe as FireResistanceSchema,fe as ForceUnitsEnum,K as IfcBuildingElementEnum,ae as InstallationAndConnectivitySchema,Ft as LengthUnits,re as LifecycleAndMaintenanceSchema,ye as LoadBearingCapacitySchema,J as LoadBearingTestStandardEnum,$ as LoadDistributionEnum,Ot as MassUnits,kt as MaterialCompositionSchema,ze as MaterialSchema,ge as PerformanceAttributesSchema,Mi as PrefabElementSchema,k as ProductCategoryEnum,he as ProductCategorySchema,Se as ProductMaterialAttributesSchema,u as ProductMaterialEnum,y as RangeSchema,ct as Recyclability,j as RefurbishmentScopeEnum,W as ReusePotentialEnum,V as SeismicResistance,xe as StructuralPropertiesSchema,G as SustainabilityClassification,Ee as SustainabilitySchema,zt as TempratureUnits,ci as ThermalPropertiesSchema,Lt as TorqueUnits,H as VOCEmissions,Ce as VersionMetadataSchema,vt as VolumeUnits,q as WindLoadResistance,we as productCategoryValues}; //# sourceMappingURL=index.mjs.map