@object-ui/providers 17.5.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 CHANGED
@@ -1,5 +1,33 @@
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
+
3
31
  ## 17.5.0
4
32
 
5
33
  ### Patch Changes
@@ -1,4 +1,4 @@
1
- import type { DataSourceProviderProps } from './types';
1
+ import type { DataSourceProviderProps } from './types.js';
2
2
  /**
3
3
  * DataSourceProvider - Generic data source context
4
4
  *
@@ -1,4 +1,4 @@
1
- import type { MetadataProviderProps } from './types';
1
+ import type { MetadataProviderProps } from './types.js';
2
2
  interface MetadataContextValue {
3
3
  metadata: any;
4
4
  loading: boolean;
@@ -1,4 +1,4 @@
1
- import type { ThemePreference, ThemeProviderProps } from './types';
1
+ import type { ThemePreference, ThemeProviderProps } from './types.js';
2
2
  interface ThemeContextValue {
3
3
  theme: ThemePreference;
4
4
  setTheme: (theme: ThemePreference) => void;
@@ -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 { ThemeModeSchema } from '@objectstack/spec/ui';
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 spec's `ThemeMode`
13
- * vocabulary (`auto | light | dark`) plus the one legacy spelling this package
14
- * still accepts.
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). `@objectstack/spec/ui` owns `Theme` for a whole theme DOCUMENT —
18
- * `{ name, label, mode, colors: { primary, background, … }, typography, … }` —
19
- * so the local declaration was not a drifted copy of the spec's `Theme` at all;
20
- * it was the spec's `Theme['mode']` under the spec's `Theme` name, which is the
21
- * more misleading of the two failures: a session reading `Theme` here would
22
- * conclude an ObjectStack theme is a string. The spec's own name for this
23
- * concept, `ThemeMode`, is exported too, so THAT name could not be taken either
24
- * (the "run the new name past the guard first" rule from objectui#3169 — it
25
- * would have traded one collision for another); and it would be wrong anyway,
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
- * The three real modes are now the spec enum rather than a hand copy of it, so
29
- * a mode the spec adds arrives here and `ThemeProvider`'s branch must handle
30
- * it. `'system'` stays as an explicit local union member: it is the pre-spec
31
- * spelling of `auto`, still sitting in users' `localStorage`, and the provider
32
- * treats the two identically (#2942, pinned in `theme-mode-spec-parity`).
33
- * Reached through the schema's `_zod` carrier so this package takes no zod
34
- * dependency — same technique as `packages/react/src/spec-input.ts`.
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 = (typeof ThemeModeSchema)['_zod']['input'] | 'system';
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.5.0",
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-rc.6",
28
- "@object-ui/types": "17.5.0"
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",