@object-ui/components 11.4.0 → 11.5.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/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # @object-ui/components
2
2
 
3
+ ## 11.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 6fffd3d: Client-side data-invalidation bus — refresh data, don't rebuild UI (objectui#2269 P1).
8
+
9
+ - `@object-ui/react` gains the bus: `notifyDataChanged({objectName, recordId?})`, `useDataInvalidation(objectName, recordId?)` (reader nonce), `subscribeDataChanges`, and `useMutationInvalidationBridge(dataSource)` which fans every dataSource write (`MutationEvent`) onto the bus. The bus also dispatches the legacy `objectui:related-changed` window event, so pre-bus listeners keep working.
10
+ - The `key={refreshKey}` remount of `RecordDetailView` (AppContent) and the `key={actionRefreshKey}` remount of `DetailView` (RecordDetailView) are GONE: record data now refetches in place via the bus — scroll, collapsed sections, tabs and in-progress inline edits survive every save/action/undo. All nine action-success bumps became precisely-scoped `notifyDataChanged` calls; undo/redo use the operation's own `objectName`/`recordId`.
11
+ - `RelatedCountStore` is wired to the bus (tab count badges refetch after any change to their object) and its `useSyncExternalStore` snapshot is now a monotonic version — previously it returned the same `Map` reference, so `emit()` never re-rendered subscribers and invalidations left badges stale; `useRelatedCountVersion()` is exported and drives the probe effect's re-fetch.
12
+ - app-shell also gains the reserved URL-param registry (`urlParams.ts` — `form`/`formObject`/`formLink`/`tab`/`recordId`/`palette`/`shortcuts` constants replace scattered string literals) and AGENTS.md Commandment #8 (UI-state classification: state that must survive a data refresh may never live only in an uncontrolled component).
13
+
14
+ - 9255686: Record detail tabs are URL-addressable (`?tab=`) and survive subtree remounts (objectui#2257, ADR-0054 C3).
15
+
16
+ - `buildDefaultTabs` emits STABLE semantic tab values (`details` / `related:<child>` / `related` / `activity` / `history`) instead of leaving the renderer to synthesize index-derived ones.
17
+ - `PageTabsRenderer` honors `item.value`, a host-provided `schema.defaultTab` (validated against actual tabs) and `schema.onTabChange`; index fallback kept for authored schemas without values.
18
+ - app-shell `RecordDetailView` restores the active tab from `?tab=` and writes it back with `replace` (tab switches never stack history), via the pure `withPageTabsUrlSync` page-tree injector (never mutates authored/memoized page schemas). Legacy `DetailView.autoTabs` wired to the same contract (`defaultTab`/`onTabChange`).
19
+ - Fixes the tab strip resetting to Details after save-refresh remounts (`refreshKey`-style) and dev-StrictMode URL churn; enables `?tab=` deep links; invalid values fall back to Details.
20
+
21
+ ### Patch Changes
22
+
23
+ - Updated dependencies [544d8eb]
24
+ - Updated dependencies [6fffd3d]
25
+ - Updated dependencies [9255686]
26
+ - Updated dependencies [fae75e2]
27
+ - Updated dependencies [1072701]
28
+ - @object-ui/i18n@11.5.0
29
+ - @object-ui/react@11.5.0
30
+ - @object-ui/types@11.5.0
31
+ - @object-ui/core@11.5.0
32
+ - @object-ui/react-runtime@11.5.0
33
+ - @object-ui/sdui-parser@11.5.0
34
+
3
35
  ## 11.4.0
4
36
 
5
37
  ### Patch Changes
@@ -56,6 +56,14 @@ declare function invalidateAll(): void;
56
56
  * probe is in flight or before the first request.
57
57
  */
58
58
  export declare function useRelatedCount(objectName: string | undefined, relField: string | undefined, parentId: string | undefined): number | undefined;
59
+ /**
60
+ * Subscribe to the store's monotonic version. Put it in an effect dependency
61
+ * array to RE-RUN count probes after an invalidation (#2269) — invalidate
62
+ * deletes the cached numbers, and this version bump is what makes the probe
63
+ * effect fetch them again (fetchCount returns cached values without emitting,
64
+ * so the loop settles once every probed key is warm again).
65
+ */
66
+ export declare function useRelatedCountVersion(): number;
59
67
  /**
60
68
  * Imperative store API for non-React callers (mutation handlers, tests).
61
69
  * Prefer `useRelatedCount` in components.
package/dist/index.d.ts CHANGED
@@ -13,7 +13,7 @@ export { useResizeObserver } from './hooks/use-resize-observer';
13
13
  export type { ElementSize } from './hooks/use-resize-observer';
14
14
  export { useExportJob } from './hooks/use-export-job';
15
15
  export type { UseExportJobOptions, UseExportJobReturn } from './hooks/use-export-job';
16
- export { useRelatedCount, RelatedCountStore } from './hooks/related-count-store';
16
+ export { useRelatedCount, useRelatedCountVersion, RelatedCountStore } from './hooks/related-count-store';
17
17
  export type { ControlType, ConfigField, ConfigSection, ConfigPanelSchema, } from './types/config-panel';
18
18
  export declare function initializeComponents(): boolean;
19
19
  export * from './debug';