# shibu-narayanan/openg2p-registry-ui-widgets architecture

> Architecture diagram of the GitHub repository shibu-narayanan/openg2p-registry-ui-widgets, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-04-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/shibu-narayanan/openg2p-registry-ui-widgets
- Repository: https://github.com/shibu-narayanan/openg2p-registry-ui-widgets

## Overview

1. **What this repo is**
This is a TypeScript/React component library, not a standalone app. Its primary purpose is to render configurable form widgets from JSON-like UI schema, with a second major subsystem for building/editing those schemas visually.

2. **Public surface and package boundaries**
The main library entry point is `src/index.ts`, which exposes the provider, renderer, store helpers, registry, and widget components. A separate entry for the schema editor exists under `src/components/SectionBuilder/index.ts`. The repo also contains `examples/` for demo apps and `dist-examples/` for built static example output.

3. **Runtime rendering pipeline**
The core runtime flow is: schema/config in → widget lookup → React widget render → state updates back to store. `WidgetRenderer` is the main dynamic entry, while `SectionRenderer`, `PanelRenderer`, and `SectionsContainer` support higher-level hierarchical layouts such as sections and panels.

4. **Widget registry as the extensibility boundary**
`src/registry/WidgetRegistry.ts` and `defaultWidgets.ts` define the plugin-like registry that maps widget names to React components. This is the key boundary for customization: consumers can register new widgets without changing the core renderer. The concrete widget implementations live in `src/widgets/`.

5. **Widget implementations**
The `src/widgets/` folder contains the built-in field and layout widgets: text, select, radio, checkbox, boolean, number/currency/date/datetime/phone/file inputs, display/profile widgets, and table/array layout widgets. These components are intentionally thin and rely on shared hooks and store state rather than owning business logic themselves.

6. **Shared widget logic lives in hooks**
`useBaseWidget` is the central orchestration hook for value access, change handling, validation, visibility/enabled state, formatting, and data-source hydration. Supporting hooks add specialized behavior: widget cascades, geo cascades, translation, and event-bus integration. This keeps widget components mostly presentational.

7. **Centralized state management**
`src/store/widgetSlice.ts` and `src/store/index.ts` provide the Redux-based state layer. The store tracks widget values, errors, touched state, loading state, and option lists, giving the library a single source of truth for all widgets. `WidgetProvider` wraps this store and also injects shared runtime context like API adapters and schema data.

8. **Cross-cutting utilities**
Most non-UI behavior is in `src/utils/`: validation, conditional logic, path resolution, formatting, data-source loading, file serialization/preview helpers, date/number/text input helpers, schema translation, and section validation. These utilities are pure-ish boundaries that isolate domain rules from React components.

9. **Internationalization and schema translation**
i18n is wired through `src/i18n/` with an i18next config and locale files, while `useWidgetTranslation` and schema translation utilities adapt labels/messages from schema-driven configs. This makes the rendering layer language-aware without hard-coding strings into widgets.

10. **Section Builder subsystem**
`src/components/SectionBuilder/` is a distinct authoring tool for building UI schemas. It is split into `JSONEditorPanel`, `VisualBuilderPanel`, `SectionTree`, and `PropertyEditor`, which suggests a dual-mode editor: direct JSON editing plus a visual tree/property workflow. `schemas.ts` and the design docs indicate it manages schema structure, editing rules, and host integration.

11. **Data dependencies and external integration**
The library depends materially on React, Redux Toolkit/react-redux, Zod, and i18next. `WidgetProvider` accepts an `apiAdapter` and `schemaData`, so widgets can pull dynamic options from external APIs or schema references rather than only static config. Validation and conditional visibility therefore depend on both local state and external data sources.

12. **Build, examples, and distribution**
`rollup.config.js` is used for library packaging, while `vite.config.ts` supports the example apps. The `examples/` directory demonstrates different integration modes: standalone widget rendering, section rendering, i18n, comparison views, intake forms, and builder usage. `docs/`, `QUICKSTART.md`, and `TUTORIAL.md` are documentation/support layers rather than runtime dependencies.

Main entry points: [`src/hooks/useBaseWidget.ts`](https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/hooks/useBaseWidget.ts) (useBaseWidget), [`src/index.ts`](https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/index.ts) (Library entry), [`src/components/SectionBuilder/SectionBuilder.tsx`](https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/components/SectionBuilder/SectionBuilder.tsx) (SectionBuilder), [`src/components/WidgetRenderer.tsx`](https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/components/WidgetRenderer.tsx) (WidgetRenderer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public API"]
  node_src_index["Library entry<br/>entrypoint<br/>[index.ts]"]
  node_section_builder_index["Builder entry<br/>entrypoint<br/>[index.ts]"]
end

subgraph group_runtime["Rendering Runtime"]
  node_widget_provider["WidgetProvider<br/>runtime host<br/>[WidgetProvider.tsx]"]
  node_widget_renderer["WidgetRenderer<br/>runtime renderer<br/>[WidgetRenderer.tsx]"]
  node_section_renderer["SectionRenderer<br/>layout renderer"]
  node_panel_renderer["PanelRenderer<br/>layout renderer<br/>[PanelRenderer.tsx]"]
  node_sections_container["SectionsContainer<br/>layout container"]
end

subgraph group_widgets["Built-in Widgets"]
  node_widget_text["Text input<br/>field widget"]
  node_widget_select["Select widget<br/>field widget<br/>[SelectWidget.tsx]"]
  node_widget_array["Array widget<br/>layout widget<br/>[ArrayWidget.tsx]"]
  node_widget_table["Table widget<br/>layout widget<br/>[TableWidget.tsx]"]
end

subgraph group_editor["Section Builder"]
  node_section_builder["SectionBuilder<br/>authoring app<br/>[SectionBuilder.tsx]"]
  node_json_editor["JSON editor<br/>builder panel"]
  node_visual_builder["Visual builder<br/>builder panel"]
  node_section_tree["Section tree<br/>builder tree<br/>[SectionTree.tsx]"]
  node_property_editor["Property editor<br/>builder form<br/>[PropertyEditor.tsx]"]
  node_builder_schemas["Builder schemas<br/>schema defs<br/>[schemas.ts]"]
end

subgraph group_shared["Shared Logic"]
  node_widget_registry[("WidgetRegistry<br/>[WidgetRegistry.ts]")]
  node_default_widgets[("Default widgets<br/>registry map<br/>[defaultWidgets.ts]")]
  node_widget_slice["widgetSlice<br/>redux slice<br/>[widgetSlice.ts]"]
  node_store_index["Store setup<br/>redux store<br/>[index.ts]"]
  node_use_base_widget["useBaseWidget<br/>orchestration hook<br/>[useBaseWidget.ts]"]
  node_use_widget_cascade["useWidgetCascade<br/>widget hook"]
  node_use_geo_cascade["useGeoWidgetCascade<br/>widget hook"]
  node_use_translation["useWidgetTranslation<br/>i18n hook"]
  node_widget_event_bus["WidgetEventBus<br/>event bus<br/>[WidgetEventBus.ts]"]
  node_widget_types["Widget types<br/>shared types<br/>[index.ts]"]
  node_validation_utils["Validation utils<br/>rules/utilities<br/>[validation.ts]"]
  node_schema_translation["Schema translation<br/>schema/i18n util"]
  node_data_source["Data source<br/>integration util<br/>[dataSource.ts]"]
end

node_src_index -->|"exports"| node_widget_provider
node_src_index -->|"exports"| node_widget_renderer
node_src_index -->|"exports"| node_widget_registry
node_src_index -->|"exports"| node_store_index
node_src_index -->|"exports"| node_widget_types
node_section_builder_index -->|"exports"| node_section_builder
node_widget_provider -->|"creates"| node_store_index
node_widget_provider -->|"hosts"| node_widget_renderer
node_widget_renderer -->|"looks up"| node_widget_registry
node_widget_registry -->|"loads"| node_default_widgets
node_widget_renderer -->|"delegates"| node_section_renderer
node_section_renderer -->|"nests"| node_panel_renderer
node_panel_renderer -->|"contains"| node_sections_container
node_widget_renderer -->|"reads/writes"| node_widget_slice
node_widget_slice -->|"configured by"| node_store_index
node_widget_text -->|"uses"| node_use_base_widget
node_widget_select -->|"uses"| node_use_base_widget
node_widget_array -->|"uses"| node_use_base_widget
node_widget_table -->|"uses"| node_use_base_widget
node_use_base_widget -->|"applies"| node_validation_utils
node_use_base_widget -->|"hydrates"| node_data_source
node_use_base_widget -->|"translates"| node_schema_translation
node_use_base_widget -->|"subscribes"| node_widget_event_bus
node_use_base_widget -->|"composes"| node_use_widget_cascade
node_use_base_widget -->|"composes"| node_use_geo_cascade
node_use_base_widget -->|"uses state"| node_widget_slice
node_section_builder -->|"contains"| node_json_editor
node_section_builder -->|"contains"| node_visual_builder
node_visual_builder -->|"uses"| node_section_tree
node_visual_builder -->|"uses"| node_property_editor
node_section_builder -->|"driven by"| node_builder_schemas
node_section_builder -->|"depends on"| node_widget_types
node_schema_translation -->|"depends on"| node_widget_types

click node_src_index "https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/index.ts"
click node_section_builder_index "https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/components/SectionBuilder/index.ts"
click node_widget_provider "https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/components/WidgetProvider.tsx"
click node_widget_renderer "https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/components/WidgetRenderer.tsx"
click node_section_renderer "https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/components/SectionRenderer.tsx"
click node_panel_renderer "https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/components/PanelRenderer.tsx"
click node_sections_container "https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/components/SectionsContainer.tsx"
click node_widget_registry "https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/registry/WidgetRegistry.ts"
click node_default_widgets "https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/registry/defaultWidgets.ts"
click node_widget_slice "https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/store/widgetSlice.ts"
click node_store_index "https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/store/index.ts"
click node_use_base_widget "https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/hooks/useBaseWidget.ts"
click node_use_widget_cascade "https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/hooks/useWidgetCascade.ts"
click node_use_geo_cascade "https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/hooks/useGeoWidgetCascade.ts"
click node_use_translation "https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/hooks/useWidgetTranslation.ts"
click node_widget_event_bus "https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/events/WidgetEventBus.ts"
click node_widget_text "https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/widgets/TextInputWidget.tsx"
click node_widget_select "https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/widgets/SelectWidget.tsx"
click node_widget_array "https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/widgets/ArrayWidget.tsx"
click node_widget_table "https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/widgets/TableWidget.tsx"
click node_section_builder "https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/components/SectionBuilder/SectionBuilder.tsx"
click node_json_editor "https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/components/SectionBuilder/JSONEditorPanel.tsx"
click node_visual_builder "https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/components/SectionBuilder/VisualBuilderPanel.tsx"
click node_section_tree "https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/components/SectionBuilder/SectionTree.tsx"
click node_property_editor "https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/components/SectionBuilder/PropertyEditor.tsx"
click node_builder_schemas "https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/components/SectionBuilder/schemas.ts"
click node_widget_types "https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/types/index.ts"
click node_validation_utils "https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/utils/validation.ts"
click node_schema_translation "https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/utils/schemaTranslation.ts"
click node_data_source "https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/utils/dataSource.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_src_index,node_section_builder_index toneBlue
class node_widget_provider,node_widget_renderer,node_section_renderer,node_panel_renderer,node_sections_container toneAmber
class node_widget_text,node_widget_select,node_widget_array,node_widget_table toneMint
class node_section_builder,node_json_editor,node_visual_builder,node_section_tree,node_property_editor,node_builder_schemas toneRose
class node_widget_registry,node_default_widgets,node_widget_slice,node_store_index,node_use_base_widget,node_use_widget_cascade,node_use_geo_cascade,node_use_translation,node_widget_event_bus,node_widget_types,node_validation_utils,node_schema_translation,node_data_source toneIndigo
```

## Components

### Public API

Library entry points exposed to consumers.

- [Library entry](https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/index.ts): entrypoint · Main package export surface for provider, renderer, registry, store, and widgets. · `src/index.ts`
- [Builder entry](https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/components/SectionBuilder/index.ts): entrypoint · Dedicated entry for the schema editor subsystem. · `src/components/SectionBuilder/index.ts`

### Rendering Runtime

Schema-to-widget rendering pipeline and shared runtime state.

- [WidgetProvider](https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/components/WidgetProvider.tsx): runtime host · Wraps the Redux store and injects API adapter and schema context. · `src/components/WidgetProvider.tsx`
- [WidgetRenderer](https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/components/WidgetRenderer.tsx): runtime renderer · Main dynamic widget lookup and render entry point. · `src/components/WidgetRenderer.tsx`
- [SectionRenderer](https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/components/SectionRenderer.tsx): layout renderer · Renders section-level structures above individual widgets. · `src/components/SectionRenderer.tsx`
- [PanelRenderer](https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/components/PanelRenderer.tsx): layout renderer · Renders panel-level containers within hierarchical layouts. · `src/components/PanelRenderer.tsx`
- [SectionsContainer](https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/components/SectionsContainer.tsx): layout container · Top-level container for sectioned UI schema composition. · `src/components/SectionsContainer.tsx`

### Built-in Widgets

Default field and layout widgets used by the runtime.

- [Text input](https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/widgets/TextInputWidget.tsx): field widget · Representative built-in text entry widget implementation. · `src/widgets/TextInputWidget.tsx`
- [Select widget](https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/widgets/SelectWidget.tsx): field widget · Representative built-in choice widget implementation. · `src/widgets/SelectWidget.tsx`
- [Array widget](https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/widgets/ArrayWidget.tsx): layout widget · Representative built-in repeated-item and collection widget implementation. · `src/widgets/ArrayWidget.tsx`
- [Table widget](https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/widgets/TableWidget.tsx): layout widget · Representative built-in tabular collection widget implementation. · `src/widgets/TableWidget.tsx`

### Section Builder

Schema authoring subsystem for JSON and visual editing.

- [SectionBuilder](https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/components/SectionBuilder/SectionBuilder.tsx): authoring app · Main schema authoring component that combines JSON and visual editing. · `src/components/SectionBuilder/SectionBuilder.tsx`
- [JSON editor](https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/components/SectionBuilder/JSONEditorPanel.tsx): builder panel · Direct schema editing panel for raw JSON input. · `src/components/SectionBuilder/JSONEditorPanel.tsx`
- [Visual builder](https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/components/SectionBuilder/VisualBuilderPanel.tsx): builder panel · Graphical schema editing panel for section and field structure. · `src/components/SectionBuilder/VisualBuilderPanel.tsx`
- [Section tree](https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/components/SectionBuilder/SectionTree.tsx): builder tree · Navigation and structural outline for editable sections. · `src/components/SectionBuilder/SectionTree.tsx`
- [Property editor](https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/components/SectionBuilder/PropertyEditor.tsx): builder form · Edits selected node properties and schema attributes. · `src/components/SectionBuilder/PropertyEditor.tsx`
- [Builder schemas](https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/components/SectionBuilder/schemas.ts): schema defs · Schema definitions and editing constraints for the builder UI. · `src/components/SectionBuilder/schemas.ts`

### Shared Logic

Hooks, utilities, registry, store, events, and i18n.

- [WidgetRegistry](https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/registry/WidgetRegistry.ts): registry · Maps widget names to React components and serves as the extensibility boundary. · `src/registry/WidgetRegistry.ts`
- [Default widgets](https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/registry/defaultWidgets.ts): registry map · Built-in widget registrations used by default by the renderer. · `src/registry/defaultWidgets.ts`
- [widgetSlice](https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/store/widgetSlice.ts): redux slice · Central state for values, errors, touched state, loading, and options. · `src/store/widgetSlice.ts`
- [Store setup](https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/store/index.ts): redux store · Configures and exposes the Redux-based widget store. · `src/store/index.ts`
- [useBaseWidget](https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/hooks/useBaseWidget.ts): orchestration hook · Central hook for value access, validation, visibility, formatting, and data hydration. · `src/hooks/useBaseWidget.ts`
- [useWidgetCascade](https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/hooks/useWidgetCascade.ts): widget hook · Supports dependent value cascades between widgets. · `src/hooks/useWidgetCascade.ts`
- [useGeoWidgetCascade](https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/hooks/useGeoWidgetCascade.ts): widget hook · Specialized cascade behavior for geo/hierarchy-driven widgets. · `src/hooks/useGeoWidgetCascade.ts`
- [useWidgetTranslation](https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/hooks/useWidgetTranslation.ts): i18n hook · Adapts widget labels and messages to locale-aware schema text. · `src/hooks/useWidgetTranslation.ts`
- [WidgetEventBus](https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/events/WidgetEventBus.ts): event bus · Shared event channel for widget-level cross-cutting interactions. · `src/events/WidgetEventBus.ts`
- [Widget types](https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/types/index.ts): shared types · Shared TypeScript type definitions for widgets, schema, and runtime contracts. · `src/types/index.ts`
- [Validation utils](https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/utils/validation.ts): rules/utilities · Cross-cutting validation and conditional logic helpers. · `src/utils/validation.ts`
- [Schema translation](https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/utils/schemaTranslation.ts): schema/i18n util · Transforms schema-driven labels and messages for localization. · `src/utils/schemaTranslation.ts`
- [Data source](https://github.com/shibu-narayanan/openg2p-registry-ui-widgets/blob/develop/src/utils/dataSource.ts): integration util · Loads and adapts external option and schema data sources. · `src/utils/dataSource.ts`

## Connections

- Library entry → WidgetProvider: exports · Public package surface exposes the provider.
- Library entry → WidgetRenderer: exports · Public package surface exposes the main renderer.
- Library entry → WidgetRegistry: exports · Consumers can access registry customization.
- Library entry → Store setup: exports · Store helpers are part of the public API.
- Library entry → Widget types: exports · Shared types are exported for consumer integration.
- Builder entry → SectionBuilder: exports · Dedicated builder entry exposes the editor subsystem.
- WidgetProvider → Store setup: creates · Provider wraps and initializes the central store.
- WidgetProvider → WidgetRenderer: hosts · Provides runtime context to widget rendering.
- WidgetRenderer → WidgetRegistry: looks up · Resolves widget names to component implementations.
- WidgetRegistry → Default widgets: loads · Default registration set seeds the registry.
- WidgetRenderer → SectionRenderer: delegates · Higher-level section structures are rendered by section components.
- SectionRenderer → PanelRenderer: nests · Section rendering composes panel-level containers.
- PanelRenderer → SectionsContainer: contains · Panels are organized within the top-level sections container.
- WidgetRenderer → widgetSlice: reads/writes · Renderer interacts with central widget state.
- widgetSlice → Store setup: configured by · Slice becomes part of the Redux store.
- Text input → useBaseWidget: uses · Built-in widgets rely on shared orchestration logic.
- Select widget → useBaseWidget: uses · Built-in widgets rely on shared orchestration logic.
- Array widget → useBaseWidget: uses · Collection widgets rely on shared orchestration logic.
- Table widget → useBaseWidget: uses · Tabular widgets rely on shared orchestration logic.
- useBaseWidget → Validation utils: applies · Validation and conditional behavior are centralized.
- useBaseWidget → Data source: hydrates · Option and schema data can be pulled from external sources.
- useBaseWidget → Schema translation: translates · Widget labels and messages are localized from schema.
- useBaseWidget → WidgetEventBus: subscribes · Widgets can coordinate via shared events.
- useBaseWidget → useWidgetCascade: composes · Dependent field behavior is factored into cascade hooks.
- useBaseWidget → useGeoWidgetCascade: composes · Geo-specific dependent behavior is isolated in a specialized hook.
- useBaseWidget → widgetSlice: uses state · Reads and updates widget values and meta state.
- SectionBuilder → JSON editor: contains · Builder includes a direct JSON editing mode.
- SectionBuilder → Visual builder: contains · Builder includes a visual schema editing mode.
- Visual builder → Section tree: uses · Visual editing is organized around the section tree.
- Visual builder → Property editor: uses · Node properties are edited through the property panel.
- SectionBuilder → Builder schemas: driven by · Editing rules and schema definitions shape the builder.
- SectionBuilder → Widget types: depends on · Builder and runtime share schema contracts and types.
- Schema translation → Widget types: depends on · Translation helpers use shared type contracts.
