TypeScript · @chbrdk/dic-app
UI framework package for DIC product shells. No federation protocol, no secrets.
| Package | @chbrdk/dic-app@0.1.0 |
| Entry | import { … } from '@chbrdk/dic-app' |
| Guide | App Framework overview |
Install
npm install @chbrdk/dic-app@0.1.0
Public exports
App definition and shell
| Export | Kind | Notes |
|---|---|---|
defineDicApp | fn | Builds a DicAppDefinition from input |
DicAppDefinition / DicAppDefinitionInput / DicAppNavItem | types | Nav + product metadata |
DicAppLayout | component | Primary product frame |
DicAppShell | component | Lower-level shell / presentation |
DicAppPresentation | type | Presentation mode union |
Providers and confirm
| Export | Kind | Notes |
|---|---|---|
DicAppProviders | component | Toast + confirm host |
DicConfirmProvider / useDicConfirm | context | Imperative confirm dialogs |
DicConfirmOptions | type | Title, body, confirm label, … |
Networking helper (same-origin)
| Export | Kind | Notes |
|---|---|---|
appJson | fn | JSON fetch helper for your BFF |
AppRequestError | class | Typed non-OK responses |
AppJsonInit | type | Init options |
Jobs
| Export | Kind | Notes |
|---|---|---|
DicJobList / DicJobStatus | components | Render job rows / status |
isDicJobActive | fn | Phase helper |
DicJobView and related types | types | You supply the data |
Notices
| Export | Kind | Notes |
|---|---|---|
DicBanner | component | System banner |
DicNotificationIndicator | component | Attention / count chrome |
formatDicCount / isDicBannerActive | fns | Small helpers |
DicBannerView / DicNotificationIndicatorView | types | Host-owned payloads |
Uploads
| Export | Kind | Notes |
|---|---|---|
DicFileUploadControl | component | Upload list UI |
dicFileUploadItemKey / isDicFileUploadBusy | fns | Keys + busy check |
DicFileUploadItemView / DicFileUploadResult | types | Adapter contract |
Minimal confirm example
'use client'
import { useDicConfirm } from '@chbrdk/dic-app'
export function DeleteButton({ onConfirm }: { onConfirm: () => Promise<void> }) {
const confirm = useDicConfirm()
return (
<button
type="button"
onClick={() =>
confirm({
title: 'Delete item?',
body: 'This cannot be undone.',
confirmLabel: 'Delete',
onConfirm,
})
}
>
Delete
</button>
)
}
Remember: the tree above this button must include DicAppProviders.
Stability
Only exports listed from the package entry are supported. If you need a new primitive, prefer extending @msqdx/ui / dic-app properly over copying chrome into the product repo.