@object-ui/providers 17.3.0 → 17.6.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 +65 -0
- package/README.md +0 -12
- package/dist/DataSourceProvider.d.ts +1 -1
- package/dist/MetadataProvider.d.ts +1 -1
- package/dist/ThemeProvider.d.ts +1 -1
- package/dist/UploadProvider.js +0 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.js +4 -4
- package/dist/types.d.ts +24 -22
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,65 @@
|
|
|
1
1
|
# @object-ui/providers — Changelog
|
|
2
2
|
|
|
3
|
+
## 17.6.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 5458414: Publish relative import specifiers with explicit `.js` extensions so these six packages load under plain Node ESM.
|
|
8
|
+
|
|
9
|
+
Node's ESM resolver does not extension-search relative specifiers and `tsc` never rewrites them, so an extensionless `./Foo` in the source shipped as an extensionless `./Foo` in `dist` and importing the package entry outside a bundler failed with `ERR_MODULE_NOT_FOUND`. Bundled consumers were unaffected. Unbundled consumers — plain Node ESM, an SSR host importing the package directly, anyone running the published tarball without a build step — can now import these entries, and so can the downstream `@object-ui/plugin-*` packages that evaluate through `mobile`, `permissions` and `providers`.
|
|
10
|
+
- Updated dependencies [88085e3]
|
|
11
|
+
- Updated dependencies [279fb13]
|
|
12
|
+
- Updated dependencies [1184192]
|
|
13
|
+
- Updated dependencies [a2a9747]
|
|
14
|
+
- Updated dependencies [af5e292]
|
|
15
|
+
- Updated dependencies [7f96b10]
|
|
16
|
+
- Updated dependencies [f1d4748]
|
|
17
|
+
- Updated dependencies [578e025]
|
|
18
|
+
- Updated dependencies [598c89a]
|
|
19
|
+
- Updated dependencies [b8b9af4]
|
|
20
|
+
- Updated dependencies [97abb24]
|
|
21
|
+
- Updated dependencies [deb157a]
|
|
22
|
+
- Updated dependencies [d2ce342]
|
|
23
|
+
- Updated dependencies [9695da7]
|
|
24
|
+
- Updated dependencies [58b8346]
|
|
25
|
+
- Updated dependencies [3cf4de0]
|
|
26
|
+
- Updated dependencies [c9dc811]
|
|
27
|
+
- Updated dependencies [a0b9e91]
|
|
28
|
+
- Updated dependencies [99bd015]
|
|
29
|
+
- @object-ui/types@17.6.0
|
|
30
|
+
|
|
31
|
+
## 17.5.0
|
|
32
|
+
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- Updated dependencies [f650253]
|
|
36
|
+
- Updated dependencies [3d9769a]
|
|
37
|
+
- Updated dependencies [92876f0]
|
|
38
|
+
- Updated dependencies [d9d3463]
|
|
39
|
+
- Updated dependencies [2a40f69]
|
|
40
|
+
- Updated dependencies [bec3e14]
|
|
41
|
+
- Updated dependencies [1f9b905]
|
|
42
|
+
- Updated dependencies [abb0f81]
|
|
43
|
+
- Updated dependencies [38ab505]
|
|
44
|
+
- Updated dependencies [7e4f0e5]
|
|
45
|
+
- Updated dependencies [c1d939f]
|
|
46
|
+
- Updated dependencies [bb68488]
|
|
47
|
+
- Updated dependencies [ab04728]
|
|
48
|
+
- @object-ui/types@17.5.0
|
|
49
|
+
|
|
50
|
+
## 17.4.0
|
|
51
|
+
|
|
52
|
+
### Patch Changes
|
|
53
|
+
|
|
54
|
+
- Updated dependencies [d229dfa]
|
|
55
|
+
- Updated dependencies [c2fd122]
|
|
56
|
+
- Updated dependencies [48132f7]
|
|
57
|
+
- Updated dependencies [7e5bb5d]
|
|
58
|
+
- Updated dependencies [e6fdbdc]
|
|
59
|
+
- Updated dependencies [7e2b7e9]
|
|
60
|
+
- Updated dependencies [c1e1e6b]
|
|
61
|
+
- @object-ui/types@17.4.0
|
|
62
|
+
|
|
3
63
|
## 17.3.0
|
|
4
64
|
|
|
5
65
|
### Patch Changes
|
|
@@ -598,24 +658,29 @@
|
|
|
598
658
|
- a2d7023: End-user feature batch — forms, designer history, import/export, and PWA offline sync.
|
|
599
659
|
|
|
600
660
|
**Forms (`@object-ui/fields`, `@object-ui/providers`)**
|
|
661
|
+
|
|
601
662
|
- `FileField`: native `<input capture="environment">` camera capture for mobile devices, plus a uploading-progress indicator driven by `UploadProvider`.
|
|
602
663
|
- `ImageField`: per-image inline crop/rotate via the lazy-loaded `ImageCropperDialog` (canvas-based, zero new deps).
|
|
603
664
|
- New `UploadProvider` in `@object-ui/providers` with pluggable adapters for S3 and Azure Blob (plus the default object-URL adapter for local previews). XHR-based with progress, abort, and retry.
|
|
604
665
|
- `LookupField`: `lookup.dependsOn: string | string[]` to chain dependent lookups (e.g. State depends on Country); the trigger is gated until parent values are present and the OData `$filter` is built automatically.
|
|
605
666
|
|
|
606
667
|
**Container-aware widget widths (`@object-ui/components`)**
|
|
668
|
+
|
|
607
669
|
- New `useResizeObserver(ref)` hook exposing `{ width, height }` of any element. SSR-safe; reads the initial size via `getBoundingClientRect`.
|
|
608
670
|
- `plugin-gantt` and `plugin-kanban` now react to their container size instead of `window.innerWidth`, so they behave correctly inside split panels and dashboards.
|
|
609
671
|
|
|
610
672
|
**Designer history (`@object-ui/plugin-designer`)**
|
|
673
|
+
|
|
611
674
|
- `useUndoRedo` (and therefore `useDesignerHistory`) gains `persistKey` + `storage` options to round-trip the undo/redo stack through `sessionStorage`, plus a `clearPersisted()` cleanup helper. Drafts now survive accidental tab refreshes.
|
|
612
675
|
- New `<HistoryPanel>` component renders the timeline visually with one-click jump-to-checkpoint via the new `jumpTo(index)` API.
|
|
613
676
|
|
|
614
677
|
**Import wizard (`@object-ui/plugin-grid`)**
|
|
678
|
+
|
|
615
679
|
- Saved column-mapping templates: name, save, re-apply, and delete via a new template bar in the mapping step. Persisted under `objectui:import-templates:${objectName}` (override via `templateStorageKey` / `templateStorage`).
|
|
616
680
|
- Inline validation correction: cells with errors in the preview step are now editable; corrections feed straight into the import without requiring a re-upload, with green-bar status indicators for fixed rows.
|
|
617
681
|
|
|
618
682
|
**PWA offline sync (`@object-ui/mobile`)**
|
|
683
|
+
|
|
619
684
|
- New `MemoryOfflineQueue` / `IndexedDbOfflineQueue` (`createOfflineQueue()` picks the best backend) backed by IndexedDB.
|
|
620
685
|
- `createOfflineDataSource(inner, { queue })` wraps any DataSource so mutations issued while offline (or that fail with a network-style error) are queued and replayed in order on reconnect. Includes `replay()`, `drop()`, `clear()`, `pending()`, an `onChange` notifier, and an opt-in `resolveConflict` hook for stale-write conflicts.
|
|
621
686
|
- New `useOfflineSync(source)` hook exposes `{ isOnline, pending, isReplaying, replay, drop, clear }` and auto-replays on the browser's `online` event.
|
package/README.md
CHANGED
|
@@ -66,20 +66,8 @@ function App() {
|
|
|
66
66
|
}
|
|
67
67
|
```
|
|
68
68
|
|
|
69
|
-
<!-- release-metadata:v3.3.0 -->
|
|
70
|
-
|
|
71
|
-
## Compatibility
|
|
72
|
-
|
|
73
|
-
- **React:** 18.x or 19.x
|
|
74
|
-
- **Node.js:** ≥ 18
|
|
75
|
-
- **TypeScript:** ≥ 5.0 (strict mode)
|
|
76
|
-
- **`@objectstack/spec`:** ^3.3.0
|
|
77
|
-
- **`@objectstack/client`:** ^3.3.0
|
|
78
|
-
- **Tailwind CSS:** ≥ 3.4 (for packages with UI)
|
|
79
|
-
|
|
80
69
|
## Links
|
|
81
70
|
|
|
82
|
-
- 📚 [Documentation](https://www.objectui.org/docs/packages/providers)
|
|
83
71
|
- 📦 [npm package](https://www.npmjs.com/package/@object-ui/providers)
|
|
84
72
|
- 📝 [Changelog](./CHANGELOG.md)
|
|
85
73
|
- 🐛 [Report an issue](https://github.com/objectstack-ai/objectui/issues)
|
package/dist/ThemeProvider.d.ts
CHANGED
package/dist/UploadProvider.js
CHANGED
|
@@ -199,7 +199,6 @@ async function uploadWithProgress(fetchFn, url, body, options) {
|
|
|
199
199
|
const maxRetries = options.maxRetries ?? 3;
|
|
200
200
|
const baseDelay = options.retryDelayMs ?? 500;
|
|
201
201
|
let attempt = 0;
|
|
202
|
-
// eslint-disable-next-line no-constant-condition
|
|
203
202
|
while (true) {
|
|
204
203
|
if (options.signal?.aborted)
|
|
205
204
|
throw new DOMException('aborted', 'AbortError');
|
package/dist/index.d.ts
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Reusable context providers for ObjectUI applications
|
|
5
5
|
*/
|
|
6
|
-
export { DataSourceProvider, useDataSource } from './DataSourceProvider';
|
|
7
|
-
export { MetadataProvider, useMetadata } from './MetadataProvider';
|
|
8
|
-
export { ThemeProvider, useTheme } from './ThemeProvider';
|
|
9
|
-
export { UploadProvider, useUpload, createObjectUrlAdapter, createS3Adapter, createAzureBlobAdapter, createObjectStackUploadAdapter, } from './UploadProvider';
|
|
10
|
-
export type { DataSourceProviderProps, MetadataProviderProps, ThemeProviderProps, ThemePreference, } from './types';
|
|
11
|
-
export type { UploadAdapter, UploadOptions, UploadResult, UploadProviderProps, S3AdapterOptions, AzureBlobAdapterOptions, ObjectStackUploadAdapterOptions, } from './UploadProvider';
|
|
6
|
+
export { DataSourceProvider, useDataSource } from './DataSourceProvider.js';
|
|
7
|
+
export { MetadataProvider, useMetadata } from './MetadataProvider.js';
|
|
8
|
+
export { ThemeProvider, useTheme } from './ThemeProvider.js';
|
|
9
|
+
export { UploadProvider, useUpload, createObjectUrlAdapter, createS3Adapter, createAzureBlobAdapter, createObjectStackUploadAdapter, } from './UploadProvider.js';
|
|
10
|
+
export type { DataSourceProviderProps, MetadataProviderProps, ThemeProviderProps, ThemePreference, } from './types.js';
|
|
11
|
+
export type { UploadAdapter, UploadOptions, UploadResult, UploadProviderProps, S3AdapterOptions, AzureBlobAdapterOptions, ObjectStackUploadAdapterOptions, } from './UploadProvider.js';
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Reusable context providers for ObjectUI applications
|
|
5
5
|
*/
|
|
6
|
-
export { DataSourceProvider, useDataSource } from './DataSourceProvider';
|
|
7
|
-
export { MetadataProvider, useMetadata } from './MetadataProvider';
|
|
8
|
-
export { ThemeProvider, useTheme } from './ThemeProvider';
|
|
9
|
-
export { UploadProvider, useUpload, createObjectUrlAdapter, createS3Adapter, createAzureBlobAdapter, createObjectStackUploadAdapter, } from './UploadProvider';
|
|
6
|
+
export { DataSourceProvider, useDataSource } from './DataSourceProvider.js';
|
|
7
|
+
export { MetadataProvider, useMetadata } from './MetadataProvider.js';
|
|
8
|
+
export { ThemeProvider, useTheme } from './ThemeProvider.js';
|
|
9
|
+
export { UploadProvider, useUpload, createObjectUrlAdapter, createS3Adapter, createAzureBlobAdapter, createObjectStackUploadAdapter, } from './UploadProvider.js';
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ThemeMode } from '@object-ui/types';
|
|
3
3
|
export interface DataSourceProviderProps {
|
|
4
4
|
dataSource: any;
|
|
5
5
|
children: ReactNode;
|
|
@@ -9,31 +9,33 @@ export interface MetadataProviderProps {
|
|
|
9
9
|
children: ReactNode;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
-
* The theme MODE this provider stores and applies: the
|
|
13
|
-
*
|
|
14
|
-
*
|
|
12
|
+
* The theme MODE this provider stores and applies: the `ThemeMode` vocabulary
|
|
13
|
+
* (`auto | light | dark`) plus the one legacy spelling this package still
|
|
14
|
+
* accepts.
|
|
15
15
|
*
|
|
16
16
|
* Named `ThemePreference`, not `Theme` (objectui#3161, objectstack#4115 ledger
|
|
17
|
-
* batch 7).
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* because of `'system'`.
|
|
17
|
+
* batch 7). `Theme` names a whole theme DOCUMENT — `{ name, label, mode,
|
|
18
|
+
* colors: { primary, background, … }, typography, … }` — so the old local
|
|
19
|
+
* declaration was not a drifted copy of that document type at all; it was
|
|
20
|
+
* `Theme['mode']` under `Theme`'s name, which is the more misleading of the
|
|
21
|
+
* two failures: a session reading `Theme` here would conclude an ObjectStack
|
|
22
|
+
* theme is a string. `ThemeMode`, the vocabulary's own name for what this
|
|
23
|
+
* really is, could not be taken either (the "run the new name past the guard
|
|
24
|
+
* first" rule from objectui#3169 — it would have traded one collision for
|
|
25
|
+
* another); and it would be wrong anyway, because of `'system'`.
|
|
27
26
|
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
27
|
+
* Derivation history (objectui#5716): this union was born reading the spec's
|
|
28
|
+
* `ThemeModeSchema` through its `_zod` input carrier. The spec then retired
|
|
29
|
+
* its whole theme module (objectstack#10485), objectui assumed ownership of
|
|
30
|
+
* the theme document types, and the mode vocabulary's owner is now
|
|
31
|
+
* `@object-ui/types` (`ThemeMode`, with the `THEME_MODES` runtime witness) —
|
|
32
|
+
* so the derivation reads from there. A mode the owner adds still arrives
|
|
33
|
+
* here and `ThemeProvider`'s branch must handle it. `'system'` stays as an
|
|
34
|
+
* explicit local union member: it is the pre-spec spelling of `auto`, still
|
|
35
|
+
* sitting in users' `localStorage`, and the provider treats the two
|
|
36
|
+
* identically (#2942, pinned in `theme-mode-spec-parity`).
|
|
35
37
|
*/
|
|
36
|
-
export type ThemePreference =
|
|
38
|
+
export type ThemePreference = ThemeMode | 'system';
|
|
37
39
|
export interface ThemeProviderProps {
|
|
38
40
|
defaultTheme?: ThemePreference;
|
|
39
41
|
storageKey?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@object-ui/providers",
|
|
3
|
-
"version": "17.
|
|
3
|
+
"version": "17.6.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Reusable context providers for ObjectUI applications",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@objectstack/spec": "^17.0.0
|
|
28
|
-
"@object-ui/types": "17.
|
|
27
|
+
"@objectstack/spec": "^17.0.0",
|
|
28
|
+
"@object-ui/types": "17.6.0"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"react": "^18.0.0 || ^19.0.0",
|