@tristan2828/ui-foundation 4.80.0 → 4.82.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -14,11 +14,13 @@ export { type RowGroup } from './components/app/table-groups.js';
14
14
  export { byDay, type ByDayOptions } from './lib/group-by-day.js';
15
15
  export { EntityForm, type EntityFormProps } from './components/app/entity-form.js';
16
16
  export { KeyStats, type KeyStat, type KeyStatsProps } from './components/app/key-stats.js';
17
- export { EntityView, type EntityViewField, type EntityViewLayout, type EntityViewMobileOrder, type EntityViewPlacement, type EntityViewProps, type EntityViewRailFields, type EntityViewSection, } from './components/app/entity-view.js';
17
+ export { IconAction, type IconActionProps } from './components/app/icon-action.js';
18
+ export { EntityView, type EntityViewEmptyFields, type EntityViewField, type EntityViewLayout, type EntityViewMobileOrder, type EntityViewPlacement, type EntityViewProps, type EntityViewRailFields, type EntityViewSection, } from './components/app/entity-view.js';
18
19
  export { entityViewTabSlug } from './lib/entity-view-tab.js';
19
20
  export { usePrinting } from './components/app/print-context.js';
20
21
  export { RecordDialogRoute, RecordLink, type RecordDialogRouteProps, type RecordLinkProps, } from './components/app/record-dialog.js';
21
- export { recordDialogState, useOpenRecord, useRecordDialog, type RecordDialogBackground, type RecordDialogContextValue, type RecordDialogState, } from './components/app/record-dialog-context.js';
22
+ export { recordDialogState, useNewRecordDialog, useOpenRecord, useRecordDialog, type NewRecordDialogContextValue, type RecordDialogBackground, type RecordDialogContextValue, type RecordDialogState, } from './components/app/record-dialog-context.js';
23
+ export { FormDialog, type FormDialogProps } from './components/app/form-dialog.js';
22
24
  export { editInPlace, type EditControlProps, type EditInPlace, type EditInPlaceList, type EditInPlaceListOptions, type EditInPlaceOptions, type EditKind, type EditListAddProps, type EditListItemProps, } from './components/app/edit-in-place.js';
23
25
  export { inPlace, type InPlaceDateConfig, type InPlaceFieldsOptions, type InPlaceLinkConfig, type InPlaceLinkValue, type InPlaceMoneyConfig, type InPlaceMonthDayConfig, type InPlaceNumberConfig, type InPlaceOption, type InPlacePart, type InPlaceRecord, type InPlaceReferenceConfig, type InPlaceSaved, type InPlaceSelectConfig, type InPlaceTextConfig, } from './components/app/edit-in-place-presets.js';
24
26
  export { linkHost, linkHref, linkRule } from './lib/link-href.js';
package/dist/index.js CHANGED
@@ -18,11 +18,13 @@ export {} from './components/app/table-groups.js';
18
18
  export { byDay } from './lib/group-by-day.js';
19
19
  export { EntityForm } from './components/app/entity-form.js';
20
20
  export { KeyStats } from './components/app/key-stats.js';
21
+ export { IconAction } from './components/app/icon-action.js';
21
22
  export { EntityView, } from './components/app/entity-view.js';
22
23
  export { entityViewTabSlug } from './lib/entity-view-tab.js';
23
24
  export { usePrinting } from './components/app/print-context.js';
24
25
  export { RecordDialogRoute, RecordLink, } from './components/app/record-dialog.js';
25
- export { recordDialogState, useOpenRecord, useRecordDialog, } from './components/app/record-dialog-context.js';
26
+ export { recordDialogState, useNewRecordDialog, useOpenRecord, useRecordDialog, } from './components/app/record-dialog-context.js';
27
+ export { FormDialog } from './components/app/form-dialog.js';
26
28
  export { editInPlace, } from './components/app/edit-in-place.js';
27
29
  export { inPlace, } from './components/app/edit-in-place-presets.js';
28
30
  export { linkHost, linkHref, linkRule } from './lib/link-href.js';
@@ -0,0 +1,8 @@
1
+ import type { ReactNode } from 'react';
2
+ /** The default empty text: an em dash, spoken as "Not set". */
3
+ export declare const EMPTY_DASH = "\u2014";
4
+ /**
5
+ * Whether a value counts as empty: `null`, `undefined`, `false`, `''` and
6
+ * an empty array, so `{tags.map(...)}` or `{email}` can be passed as is.
7
+ */
8
+ export declare function isEmptyValue(value: ReactNode): boolean;
@@ -0,0 +1,13 @@
1
+ /** The default empty text: an em dash, spoken as "Not set". */
2
+ export const EMPTY_DASH = '—';
3
+ /**
4
+ * Whether a value counts as empty: `null`, `undefined`, `false`, `''` and
5
+ * an empty array, so `{tags.map(...)}` or `{email}` can be passed as is.
6
+ */
7
+ export function isEmptyValue(value) {
8
+ return (value === null ||
9
+ value === undefined ||
10
+ value === false ||
11
+ value === '' ||
12
+ (Array.isArray(value) && value.length === 0));
13
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tristan2828/ui-foundation",
3
- "version": "4.80.0",
3
+ "version": "4.82.0",
4
4
  "description": "Shared UI foundation for contract-first, database-backed React apps: shadcn primitives, DataTable/EntityForm composites, auth, the gateway error seam, design tokens, lint rules and the AI playbook.",
5
5
  "license": "MIT",
6
6
  "repository": {