Component system
Browser UI is built from Web Components under environment_modules/{standard,custom}/{module}/WebComponent/, with additional package namespaces under environment_modules/. Each component's package metadata and source class participate in a compile step. scripts/compile-components.js and core_engines/componentCompiler.js produce browser-ready files under compiled/components/; the /component route serves component files and descriptions.
Authoring model
A component author edits its source class and lets the compiler create the browser wrapper. The source class extends WEngineElement or, for modal behavior, WEngineModal. The generated wrapper is the registered custom element. The class name must match its JavaScript filename; source modules do not call customElements.define themselves.
The browser tag follows the class name. For example, WeButton.js becomes <we-button>. Current custom and package namespace tags retain the colon: OpportunityPath.js in the custom namespace becomes <c:opportunity-path>. The source template and /component/c:... URL use the same namespace form. core_engines/componentNames.js and public/js/component-names.js handle this mapping.
Public contract
Use @apiAttribute for an observed attribute and public property. The default type is String; options can specify Number, Boolean, Object, Array, or Any, and can provide a custom attribute name. Object and array attribute values use JSON. Use @apiFunction to expose a method through the wrapper. Browser lifecycle and attribute callbacks are forwarded to the private developer instance.
import { WEngineElement, apiAttribute, apiFunction } from 'WEngineElement';
class WeExample extends WEngineElement {
@apiAttribute({ type: Boolean }) enabled = false;
@apiAttribute caption = '';
@apiFunction
refresh() { /* update the component */ }
}
For exact template bindings such as field-value="{selectedId}", null or undefined removes the attribute. In mixed text, a nullish value becomes an empty string. The wrapper copies public object and array values across its boundary. This is instance encapsulation within one JavaScript realm; it is not a sandbox for arbitrary scripts.
The source has a more detailed reference at working/docs/component-wrapper.md. The component compiler and its tests (tests/component-wrapper.test.js, tests/component-parser.test.js) are the verification points when this contract changes.
For an authoring walkthrough, see the developer component guide. For shipped controls and their public properties, see the standard component reference.