@object-ui/mobile 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 CHANGED
@@ -1,5 +1,233 @@
1
1
  # @object-ui/mobile
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
+ - c911544: `SpecResponsiveConfig` is now the spec's responsive config rather than a hand copy that said it was
36
+
37
+ `useResponsiveConfig.ts` declared its own interface over the four responsive keys — `breakpoint`, `hiddenOn`, `columns`, `order` — renamed off the schema's own symbol (`ResponsiveConfig` → `SpecResponsiveConfig`) and introduced by a comment that said it mirrored `ResponsiveConfigSchema`. There was no import, no `z.infer`, and no other compile-time tie: the sentence was the entire connection.
38
+
39
+ It agreed with the schema key-for-key on the day it was measured, and that is the reason this is worth a line rather than the reason it is not. The agreement was maintained by nobody and checked by nothing, while the comment told every later reader the copy was canonical — so a key added or retired upstream would have moved the two apart in silence, with the comment still vouching for the copy. `ViewNavigationConfig` read exactly like this until it had drifted on `mode`.
40
+
41
+ The type is now re-exported from `@object-ui/types`, which publishes it imported straight from `@objectstack/spec/ui`. That package is already this one's only runtime dependency, so the binding costs no new dependency edge, and `@object-ui/core`'s `ResponsiveProtocol` already reaches the same type the same way.
42
+
43
+ Nothing consumers see changes: the published name is the same, and the type it resolves to is invariant-equal to the interface that was there before — the entry `.d.ts` is byte-identical. What changes is where the four keys come from. They are now whatever the schema declares, so the next schema release reaches this package's authors as a type error instead of as silent disagreement.
44
+
45
+ A new parity test pins the chain to `@objectstack/spec/ui` directly, because the one link the re-export cannot see is `@object-ui/types` re-growing a hand copy of its own.
46
+
47
+ - Updated dependencies [f650253]
48
+ - Updated dependencies [3d9769a]
49
+ - Updated dependencies [92876f0]
50
+ - Updated dependencies [d9d3463]
51
+ - Updated dependencies [2a40f69]
52
+ - Updated dependencies [bec3e14]
53
+ - Updated dependencies [1f9b905]
54
+ - Updated dependencies [abb0f81]
55
+ - Updated dependencies [38ab505]
56
+ - Updated dependencies [7e4f0e5]
57
+ - Updated dependencies [c1d939f]
58
+ - Updated dependencies [bb68488]
59
+ - Updated dependencies [ab04728]
60
+ - @object-ui/types@17.5.0
61
+
62
+ ## 17.4.0
63
+
64
+ ### Minor Changes
65
+
66
+ - 48132f7: Track the `@objectstack` family at `17.0.0-rc.5` (objectui#3560).
67
+
68
+ The pin moves from `^17.0.0-rc.2` to `^17.0.0-rc.5` across all 37 declarations in
69
+ 30 `package.json` files, and the sibling `@objectstack/*` packages (`client` /
70
+ `formula` / `lint`) move with it — they pin `@objectstack/spec` **exactly**, so
71
+ leaving them behind would keep a second copy of the spec in the tree and have
72
+ `@objectstack/lint` validating against schemas that still accept the keys rc.3–rc.5
73
+ retire. `pnpm-lock.yaml` now resolves one copy of each of the six family packages
74
+ (`spec` / `client` / `core` / `formula` / `lint` / `sdui-parser`), all at rc.5.
75
+
76
+ Bumping the pin and repairing the fallout cannot be split: the pin alone reddens
77
+ CI, and the code alone targets a shape that is not in effect yet.
78
+
79
+ ## A live bug this upgrade fixes
80
+
81
+ **`ObjectStackDataSource.delete()` never emitted its mutation event, and resolved
82
+ `undefined` instead of a boolean.** `@objectstack/client`'s `DeleteDataResult`
83
+ declared a key called `deleted` — a key no schema has ever declared and no server
84
+ path has ever returned on `DELETE /data/:object/:id`. So `result.deleted`
85
+ compiled and read `undefined` at runtime: the guard never fired, a successful
86
+ delete notified no subscriber, and every consumer's cache stayed stale.
87
+ objectstack#5638 corrected the interface to the schema's `success`; following the
88
+ rename is what restores both behaviours. Nothing in this repo had to change shape
89
+ for it — the code was already asking the right question of the wrong key.
90
+
91
+ ## Breaking, in FROM → TO form
92
+
93
+ - **The five `@objectstack/spec/ui` interaction-config modules are gone** —
94
+ touch / dnd / keyboard / animation / offline, 32 defs and 64 exports
95
+ (objectstack#4988, PR objectstack#5321). None of them had an authoring door: no
96
+ metadata document could ever carry one of these blocks, so a stack that parsed
97
+ before the retirement parses byte-for-byte the same after it. `@object-ui/types`
98
+ drops the 32 `export type` re-exports. The vocabulary each one's only real
99
+ consumer needs is now declared by that consumer, which is the remedy the spec's
100
+ own retirement ledger prescribes ("declare that union locally — it is your
101
+ client's policy, not the platform's"):
102
+
103
+ - `@object-ui/react`'s `useOffline` owns `OfflineStrategy`, `ConflictResolution`,
104
+ `PersistStorageType`, `EvictionPolicyType`, `OfflineConfig`,
105
+ `OfflineCacheConfig`, `OfflineSyncConfig`;
106
+ - `@object-ui/core`'s `DndProtocol` / `KeyboardProtocol` own `DndConfig`,
107
+ `DragItem`, `DropZone`, `DragConstraint`, `DragHandle`, `DropEffect`,
108
+ `KeyboardNavigationConfig`, `KeyboardShortcut`, `FocusManagement`,
109
+ `FocusTrapConfig`;
110
+ - `@object-ui/types`' `mobile` module owns `SpecGestureConfig`,
111
+ `SwipeGestureConfig`, `PinchGestureConfig`, `LongPressGestureConfig`,
112
+ `TouchTargetConfig`, `TouchInteraction` (plus a new `SPEC_GESTURE_TYPES`
113
+ runtime tuple), so `@object-ui/mobile`'s import paths are unchanged.
114
+
115
+ Every shape is moved verbatim — same keys, same members, same optionality — so
116
+ no hook or bridge changes behaviour. Consumers importing these names from
117
+ `@object-ui/types` must import them from the owning package instead. Note the
118
+ spec's _surviving_ `ConnectorConflictResolution` (`/integration`, connector sync)
119
+ and `ConflictResolutionStrategy` (`/api`, route merge policy) are **different
120
+ concepts** — do not re-point at them.
121
+
122
+ - **`@object-ui/types` no longer re-exports `NotificationAction` or `EmbedConfig`**
123
+ (objectstack#5015, PR objectstack#5300). Both were published `ui` vocabulary with
124
+ no authoring door; no notification action was ever parsed from metadata and no
125
+ iframe route ever read an embed config. The presentation enums
126
+ (`NotificationType` / `NotificationSeverity` / `NotificationPosition`) and
127
+ `SharingConfig` **survive** and are untouched — public form sharing still gates
128
+ the anonymous endpoints on `allowAnonymous` + `publicLink`.
129
+ `@object-ui/core`'s `SharingProtocol` keeps `resolveEmbedConfig` /
130
+ `generateEmbedCode` against a locally declared `EmbedConfig`, so its surface is
131
+ unchanged.
132
+ - **`ThemeEngine` stops emitting nine retired CSS variable groups**
133
+ (objectstack#5021 option 2, PR objectstack#5289). `theme.animation`,
134
+ `theme.zIndex` and five typography groups (`fontSize` / `fontWeight` /
135
+ `lineHeight` / `letterSpacing`, plus `fontFamily.heading` / `fontFamily.mono`)
136
+ are tombstones the schema now rejects by name, so `--duration-*`, `--timing-*`,
137
+ `--z-*`, `--font-size-*`, `--font-weight-*`, `--line-height-*`,
138
+ `--letter-spacing-*`, `--font-heading` and `--font-mono` had become structurally
139
+ dead code — no author could produce the input that reached them.
140
+ `generateAnimationVars` and `generateZIndexVars` are removed from
141
+ `@object-ui/core`, and `@object-ui/types` drops `Animation` / `ZIndex` /
142
+ `AnimationSchema` / `ZIndexSchema`. **`theme.customVars` is the declared — and
143
+ since #5021 the only — door**: each entry is emitted verbatim as
144
+ `--<key>: <value>`, so a `--z-modal` or a `--duration-fast` goes there now.
145
+ LIVE emission is untouched byte for byte: `colors`, `borderRadius`, `shadows`,
146
+ `typography.fontFamily.base` (→ `--font-sans`) and `customVars`.
147
+ - **`@object-ui/types`' `HttpMethodSchema` now binds the spec's
148
+ `HttpMethodSubsetSchema`, and `HttpMethod` binds `HttpMethodSubset`**
149
+ (objectstack#5832, PR objectstack#5976 — objectui#3499). The spec renamed its
150
+ 5-value UI subset because `schemaNameFromExportKey` strips the `Schema` suffix,
151
+ so the 5-value and 7-value enums both published as `shared/HttpMethod` and the
152
+ later write won — the emitted JSON Schema and reference page described only one
153
+ of them. **The runtime domain is unchanged and this repo's exported names are
154
+ unchanged**; this follows the rename without touching cross-package semantics.
155
+ Deliberately NOT re-pointed at the spec's bare `HttpMethod`: that is the 7-value
156
+ enum, and widening to it would let `method: 'HEAD'` compile and then throw in
157
+ `HttpRequestSchema.parse()`.
158
+ - **`dashboard.widgets[].actionUrl` / `actionType` / `actionIcon` / `aria` are
159
+ refused, not stripped** (objectstack#5010, ADR-0049 enforce-or-remove). A
160
+ dashboard widget has no action button and never had one — every action the
161
+ dashboard dispatches comes from `header.actions[]` — and no renderer ever applied
162
+ the widget `aria`, so it promised accessibility compliance it did not deliver.
163
+ A stale dashboard now gets a named error telling it where the affordance moved,
164
+ instead of silently losing it. Run `os migrate meta --from 16` to rewrite.
165
+
166
+ - e6fdbdc: Reclaim the natural names `GestureType` and `GestureConfig` (objectui#3363).
167
+
168
+ `@objectstack/spec` 17.0.0-rc.3 deleted the whole `ui/touch` module
169
+ (objectstack#4988, PR objectstack#5321), vacating three names objectui had
170
+ renamed **away from** in objectstack#4115 purely to avoid a collision. Two of
171
+ those workarounds have now outlived their reason and are undone.
172
+
173
+ ## Breaking, in FROM → TO form
174
+
175
+ - `TouchGestureType` → **`GestureType`** — objectui's direction-fused recogniser
176
+ vocabulary (`tap`, `swipe-left`, `swipe-up`, …).
177
+ - `TouchGestureConfig` → **`GestureConfig`** — the flat gesture→`action` handler
178
+ binding.
179
+
180
+ Both are exported from `@object-ui/types` and re-exported by `@object-ui/mobile`.
181
+ Nothing about either shape changed: same members, same optionality. Consumers
182
+ import the new name; there is no other edit.
183
+
184
+ **The old names are gone, not deprecated.** This follows the precedent set by the
185
+ objectstack#4115 rename batch that introduced them, whose own migration note reads:
186
+ "an alias would preserve exactly the ambiguity being removed". A deprecated alias
187
+ would be worse here than in the general case, because the ambiguity these renames
188
+ exist to prevent is between two same-named types — leaving `TouchGestureType`
189
+ alive next to `GestureType` restores the two-spellings-one-concept problem while
190
+ claiming to retire it.
191
+
192
+ The retired spec vocabulary that used to hold these names still lives in
193
+ `@object-ui/types`' `mobile` module under its deliberate `Spec…` prefix
194
+ (`SpecGestureType`, `SpecGestureConfig`, `SwipeGestureConfig`, …), and that prefix
195
+ is untouched — it is now the only thing distinguishing the two contracts, so
196
+ `useSpecGesture` still maps one onto the other exactly as before.
197
+
198
+ ## `PWAOfflineConfig` is deliberately NOT reclaimed
199
+
200
+ The spec vacated `OfflineConfig` in the same retirement, but the spec was never
201
+ its only claimant: that rename was a **cross-package arbitration between two
202
+ objectui packages**, and `@object-ui/react` won it. `useOffline`'s config is the
203
+ offline data/sync model key for key, so it holds the bare `OfflineConfig`, while
204
+ this package's service-worker route cache stays `PWAOfflineConfig`
205
+ (objectui#3156 / objectui#3159).
206
+
207
+ Before objectui#3560 that name reached `@object-ui/react` from the spec, so the
208
+ spec-side tripwire covered it by accident. Since the retirement it is declared
209
+ locally in `packages/react/src/hooks/useOffline.ts`, which means the spec's
210
+ vacancy no longer says anything about whether the name is free — it is not.
211
+ Reclaiming it would put two different `OfflineConfig` shapes on the public
212
+ surface of two packages that are routinely imported together, which is the exact
213
+ ambiguity objectstack#4115 renamed it away from.
214
+
215
+ `page-nav-misc-spec-parity.test.ts` now pins that reason directly instead of
216
+ leaving it as prose: it asserts `@object-ui/react` still declares
217
+ `OfflineConfig`, and its failure message tells the next reader that the reclaim
218
+ has become available if it ever stops.
219
+
220
+ ### Patch Changes
221
+
222
+ - Updated dependencies [d229dfa]
223
+ - Updated dependencies [c2fd122]
224
+ - Updated dependencies [48132f7]
225
+ - Updated dependencies [7e5bb5d]
226
+ - Updated dependencies [e6fdbdc]
227
+ - Updated dependencies [7e2b7e9]
228
+ - Updated dependencies [c1e1e6b]
229
+ - @object-ui/types@17.4.0
230
+
3
231
  ## 17.3.0
4
232
 
5
233
  ### Patch Changes
@@ -594,24 +822,29 @@
594
822
  - a2d7023: End-user feature batch — forms, designer history, import/export, and PWA offline sync.
595
823
 
596
824
  **Forms (`@object-ui/fields`, `@object-ui/providers`)**
825
+
597
826
  - `FileField`: native `<input capture="environment">` camera capture for mobile devices, plus a uploading-progress indicator driven by `UploadProvider`.
598
827
  - `ImageField`: per-image inline crop/rotate via the lazy-loaded `ImageCropperDialog` (canvas-based, zero new deps).
599
828
  - 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.
600
829
  - `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.
601
830
 
602
831
  **Container-aware widget widths (`@object-ui/components`)**
832
+
603
833
  - New `useResizeObserver(ref)` hook exposing `{ width, height }` of any element. SSR-safe; reads the initial size via `getBoundingClientRect`.
604
834
  - `plugin-gantt` and `plugin-kanban` now react to their container size instead of `window.innerWidth`, so they behave correctly inside split panels and dashboards.
605
835
 
606
836
  **Designer history (`@object-ui/plugin-designer`)**
837
+
607
838
  - `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.
608
839
  - New `<HistoryPanel>` component renders the timeline visually with one-click jump-to-checkpoint via the new `jumpTo(index)` API.
609
840
 
610
841
  **Import wizard (`@object-ui/plugin-grid`)**
842
+
611
843
  - 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`).
612
844
  - 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.
613
845
 
614
846
  **PWA offline sync (`@object-ui/mobile`)**
847
+
615
848
  - New `MemoryOfflineQueue` / `IndexedDbOfflineQueue` (`createOfflineQueue()` picks the best backend) backed by IndexedDB.
616
849
  - `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.
617
850
  - New `useOfflineSync(source)` hook exposes `{ isOnline, pending, isReplaying, replay, drop, clear }` and auto-replays on the browser's `online` event.
package/README.md CHANGED
@@ -21,7 +21,6 @@ npm install @object-ui/mobile
21
21
 
22
22
  **Peer Dependencies:**
23
23
  - `react` ^18.0.0 || ^19.0.0
24
- - `react-dom` ^18.0.0 || ^19.0.0
25
24
 
26
25
  ## Quick Start
27
26
 
@@ -127,20 +126,8 @@ const manifest = generatePWAManifest({ name: 'My App', themeColor: '#000' });
127
126
  registerServiceWorker({ cacheStrategy: 'network-first' });
128
127
  ```
129
128
 
130
- <!-- release-metadata:v3.3.0 -->
131
-
132
- ## Compatibility
133
-
134
- - **React:** 18.x or 19.x
135
- - **Node.js:** ≥ 18
136
- - **TypeScript:** ≥ 5.0 (strict mode)
137
- - **`@objectstack/spec`:** ^3.3.0
138
- - **`@objectstack/client`:** ^3.3.0
139
- - **Tailwind CSS:** ≥ 3.4 (for packages with UI)
140
-
141
129
  ## Links
142
130
 
143
- - 📚 [Documentation](https://www.objectui.org/docs/packages/mobile)
144
131
  - 📦 [npm package](https://www.npmjs.com/package/@object-ui/mobile)
145
132
  - 📝 [Changelog](./CHANGELOG.md)
146
133
  - 🐛 [Report an issue](https://github.com/objectstack-ai/objectui/issues)
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import React from 'react';
9
9
  import type { PWAConfig, PWAOfflineConfig } from '@object-ui/types';
10
- import { type BreakpointState } from './useBreakpoint';
10
+ import { type BreakpointState } from './useBreakpoint.js';
11
11
  export interface MobileContextValue extends BreakpointState {
12
12
  /** PWA configuration */
13
13
  pwa?: PWAConfig;
@@ -1 +1 @@
1
- {"version":3,"file":"MobileProvider.d.ts","sourceRoot":"","sources":["../src/MobileProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAA6C,MAAM,OAAO,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAiB,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAEtE,MAAM,WAAW,kBAAmB,SAAQ,eAAe;IACzD,wBAAwB;IACxB,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,4BAA4B;IAC5B,OAAO,CAAC,EAAE,gBAAgB,CAAC;CAC5B;AAKD,MAAM,WAAW,mBAAmB;IAClC,wBAAwB;IACxB,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,4BAA4B;IAC5B,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,eAAe;IACf,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,mBAAmB,qBAa7E;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,kBAAkB,GAAG,IAAI,CAE5D"}
1
+ {"version":3,"file":"MobileProvider.d.ts","sourceRoot":"","sources":["../src/MobileProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAA6C,MAAM,OAAO,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAiB,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAEzE,MAAM,WAAW,kBAAmB,SAAQ,eAAe;IACzD,wBAAwB;IACxB,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,4BAA4B;IAC5B,OAAO,CAAC,EAAE,gBAAgB,CAAC;CAC5B;AAKD,MAAM,WAAW,mBAAmB;IAClC,wBAAwB;IACxB,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,4BAA4B;IAC5B,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,eAAe;IACf,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,mBAAmB,qBAa7E;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,kBAAkB,GAAG,IAAI,CAE5D"}
@@ -7,7 +7,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
7
7
  * LICENSE file in the root directory of this source tree.
8
8
  */
9
9
  import { createContext, useContext, useMemo } from 'react';
10
- import { useBreakpoint } from './useBreakpoint';
10
+ import { useBreakpoint } from './useBreakpoint.js';
11
11
  const MobileCtx = createContext(null);
12
12
  MobileCtx.displayName = 'MobileContext';
13
13
  /**
@@ -1,5 +1,5 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
2
- import { useBreakpoint } from './useBreakpoint';
2
+ import { useBreakpoint } from './useBreakpoint.js';
3
3
  /**
4
4
  * Container that conditionally renders children based on the current breakpoint.
5
5
  */
@@ -10,7 +10,7 @@
10
10
  * Reads (`find` / `findOne`) are pass-through; the optional `cache` hook
11
11
  * lets callers opt into local caching but is not built in here.
12
12
  */
13
- import { type OfflineQueueBackend, type OfflineOperation } from './offlineQueue';
13
+ import { type OfflineQueueBackend, type OfflineOperation } from './offlineQueue.js';
14
14
  /** Minimal DataSource shape we care about. */
15
15
  export interface QueueableDataSource {
16
16
  find?: (object: string, query?: any) => Promise<any>;
@@ -1 +1 @@
1
- {"version":3,"file":"createOfflineDataSource.d.ts","sourceRoot":"","sources":["../src/createOfflineDataSource.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,gBAAgB,EAAgB,MAAM,gBAAgB,CAAC;AAE/F,8CAA8C;AAC9C,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IACrD,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,CAAC,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IAC7E,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IACxD,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IAC7E,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IAC/D,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;CAClB;AAED,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,mBAAmB,CAAC;IAC3B,0FAA0F;IAC1F,cAAc,CAAC,EAAE,CAAC,GAAG,EA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7F,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAChC,uDAAuD;IACvD,MAAM,IAAI,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC5E,kDAAkD;IAClD,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClC,0DAA0D;IAC1D,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,8BAA8B;IAC9B,OAAO,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;CACxC;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,mBAAmB,EAC1B,OAAO,EAAE,wBAAwB,GAChC,iBAAiB,CA6GnB"}
@@ -10,7 +10,7 @@
10
10
  * Reads (`find` / `findOne`) are pass-through; the optional `cache` hook
11
11
  * lets callers opt into local caching but is not built in here.
12
12
  */
13
- import { generateOpId } from './offlineQueue';
13
+ import { generateOpId } from './offlineQueue.js';
14
14
  const defaultIsNetworkError = (err) => {
15
15
  if (!err)
16
16
  return false;
package/dist/index.d.ts CHANGED
@@ -17,21 +17,21 @@
17
17
  *
18
18
  * @packageDocumentation
19
19
  */
20
- export { useBreakpoint, type BreakpointState } from './useBreakpoint';
21
- export { useResponsive } from './useResponsive';
22
- export { useResponsiveConfig, type SpecResponsiveConfig, type ResolvedResponsiveState } from './useResponsiveConfig';
23
- export { useGesture, type UseGestureOptions } from './useGesture';
24
- export { useSpecGesture, type UseSpecGestureOptions } from './useSpecGesture';
25
- export { useTouchTarget, type UseTouchTargetOptions, type TouchTargetResult } from './useTouchTarget';
26
- export { usePullToRefresh, type PullToRefreshOptions } from './usePullToRefresh';
27
- export { MobileProvider, type MobileProviderProps } from './MobileProvider';
28
- export { ResponsiveContainer, type ResponsiveContainerProps } from './ResponsiveContainer';
29
- export { generatePWAManifest } from './pwa';
30
- export { registerServiceWorker, type ServiceWorkerConfig } from './serviceWorker';
31
- export { createOfflineQueue, IndexedDbOfflineQueue, MemoryOfflineQueue, generateOpId, type OfflineOperation, type OfflineQueueBackend, } from './offlineQueue';
32
- export { createOfflineDataSource, type OfflineDataSource, type OfflineDataSourceOptions, type QueueableDataSource, } from './createOfflineDataSource';
33
- export { useOfflineSync, type OfflineSyncState } from './useOfflineSync';
34
- export { getServiceWorkerSource, requestBackgroundSync, type ServiceWorkerSourceOptions, } from './serviceWorkerSource';
35
- export { BREAKPOINTS, resolveResponsiveValue } from './breakpoints';
36
- export type { BreakpointName, ResponsiveValue, MobileResponsiveConfig, MobileOverrides, PWAConfig, PWAIcon, FetchCacheStrategy, PWAOfflineConfig, OfflineRoute, TouchGestureType, TouchGestureConfig, GestureContext, MobileComponentConfig, SpecGestureConfig, SwipeGestureConfig, PinchGestureConfig, LongPressGestureConfig, TouchInteraction, TouchTargetConfig, } from '@object-ui/types';
20
+ export { useBreakpoint, type BreakpointState } from './useBreakpoint.js';
21
+ export { useResponsive } from './useResponsive.js';
22
+ export { useResponsiveConfig, type SpecResponsiveConfig, type ResolvedResponsiveState } from './useResponsiveConfig.js';
23
+ export { useGesture, type UseGestureOptions } from './useGesture.js';
24
+ export { useSpecGesture, type UseSpecGestureOptions } from './useSpecGesture.js';
25
+ export { useTouchTarget, type UseTouchTargetOptions, type TouchTargetResult } from './useTouchTarget.js';
26
+ export { usePullToRefresh, type PullToRefreshOptions } from './usePullToRefresh.js';
27
+ export { MobileProvider, type MobileProviderProps } from './MobileProvider.js';
28
+ export { ResponsiveContainer, type ResponsiveContainerProps } from './ResponsiveContainer.js';
29
+ export { generatePWAManifest } from './pwa.js';
30
+ export { registerServiceWorker, type ServiceWorkerConfig } from './serviceWorker.js';
31
+ export { createOfflineQueue, IndexedDbOfflineQueue, MemoryOfflineQueue, generateOpId, type OfflineOperation, type OfflineQueueBackend, } from './offlineQueue.js';
32
+ export { createOfflineDataSource, type OfflineDataSource, type OfflineDataSourceOptions, type QueueableDataSource, } from './createOfflineDataSource.js';
33
+ export { useOfflineSync, type OfflineSyncState } from './useOfflineSync.js';
34
+ export { getServiceWorkerSource, requestBackgroundSync, type ServiceWorkerSourceOptions, } from './serviceWorkerSource.js';
35
+ export { BREAKPOINTS, resolveResponsiveValue } from './breakpoints.js';
36
+ export type { BreakpointName, ResponsiveValue, MobileResponsiveConfig, PWAConfig, PWAIcon, FetchCacheStrategy, PWAOfflineConfig, OfflineRoute, GestureType, GestureConfig, GestureContext, MobileComponentConfig, SpecGestureConfig, SwipeGestureConfig, PinchGestureConfig, LongPressGestureConfig, TouchInteraction, TouchTargetConfig, } from '@object-ui/types';
37
37
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,aAAa,EAAE,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,KAAK,oBAAoB,EAAE,KAAK,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AACrH,OAAO,EAAE,UAAU,EAAE,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,KAAK,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,KAAK,qBAAqB,EAAE,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACtG,OAAO,EAAE,gBAAgB,EAAE,KAAK,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,KAAK,wBAAwB,EAAE,MA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AClB,kBAAkB,EAClB,sBAAsB,EACtB,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,kBAAkB,CAAC"}
package/dist/index.js CHANGED
@@ -17,19 +17,19 @@
17
17
  *
18
18
  * @packageDocumentation
19
19
  */
20
- export { useBreakpoint } from './useBreakpoint';
21
- export { useResponsive } from './useResponsive';
22
- export { useResponsiveConfig } from './useResponsiveConfig';
23
- export { useGesture } from './useGesture';
24
- export { useSpecGesture } from './useSpecGesture';
25
- export { useTouchTarget } from './useTouchTarget';
26
- export { usePullToRefresh } from './usePullToRefresh';
27
- export { MobileProvider } from './MobileProvider';
28
- export { ResponsiveContainer } from './ResponsiveContainer';
29
- export { generatePWAManifest } from './pwa';
30
- export { registerServiceWorker } from './serviceWorker';
31
- export { createOfflineQueue, IndexedDbOfflineQueue, MemoryOfflineQueue, generateOpId, } from './offlineQueue';
32
- export { createOfflineDataSource, } from './createOfflineDataSource';
33
- export { useOfflineSync } from './useOfflineSync';
34
- export { getServiceWorkerSource, requestBackgroundSync, } from './serviceWorkerSource';
35
- export { BREAKPOINTS, resolveResponsiveValue } from './breakpoints';
20
+ export { useBreakpoint } from './useBreakpoint.js';
21
+ export { useResponsive } from './useResponsive.js';
22
+ export { useResponsiveConfig } from './useResponsiveConfig.js';
23
+ export { useGesture } from './useGesture.js';
24
+ export { useSpecGesture } from './useSpecGesture.js';
25
+ export { useTouchTarget } from './useTouchTarget.js';
26
+ export { usePullToRefresh } from './usePullToRefresh.js';
27
+ export { MobileProvider } from './MobileProvider.js';
28
+ export { ResponsiveContainer } from './ResponsiveContainer.js';
29
+ export { generatePWAManifest } from './pwa.js';
30
+ export { registerServiceWorker } from './serviceWorker.js';
31
+ export { createOfflineQueue, IndexedDbOfflineQueue, MemoryOfflineQueue, generateOpId, } from './offlineQueue.js';
32
+ export { createOfflineDataSource, } from './createOfflineDataSource.js';
33
+ export { useOfflineSync } from './useOfflineSync.js';
34
+ export { getServiceWorkerSource, requestBackgroundSync, } from './serviceWorkerSource.js';
35
+ export { BREAKPOINTS, resolveResponsiveValue } from './breakpoints.js';
@@ -6,7 +6,7 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
8
  import { useState, useEffect } from 'react';
9
- import { BREAKPOINTS, BREAKPOINT_ORDER, getCurrentBreakpoint } from './breakpoints';
9
+ import { BREAKPOINTS, BREAKPOINT_ORDER, getCurrentBreakpoint } from './breakpoints.js';
10
10
  /**
11
11
  * Hook that tracks the current responsive breakpoint.
12
12
  * Updates on window resize with debouncing.
@@ -5,10 +5,10 @@
5
5
  * This source code is licensed under the MIT license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
- import type { TouchGestureType, GestureContext } from '@object-ui/types';
8
+ import type { GestureType, GestureContext } from '@object-ui/types';
9
9
  export interface UseGestureOptions {
10
10
  /** Gesture type to detect */
11
- type: TouchGestureType;
11
+ type: GestureType;
12
12
  /** Callback when gesture is detected */
13
13
  onGesture: (context: GestureContext) => void;
14
14
  /** Minimum distance for swipe detection (pixels) */
@@ -1 +1 @@
1
- {"version":3,"file":"useGesture.d.ts","sourceRoot":"","sources":["../src/useGesture.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEzE,MAAM,WAAW,iBAAiB;IAChC,6BAA6B;IAC7B,IAAI,EAAE,gBAAgB,CAAC;IACvB,wCAAwC;IACxC,SAAS,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;IAC7C,oDAAoD;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uDAAuD;IACvD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,2CAA2C;IAC3C,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,EAC5D,OAAO,EAAE,iBAAiB,uCAqK3B"}
1
+ {"version":3,"file":"useGesture.d.ts","sourceRoot":"","sources":["../src/useGesture.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEpE,MAAM,WAAW,iBAAiB;IAChC,6BAA6B;IAC7B,IAAI,EAAE,WAAW,CAAC;IAClB,wCAAwC;IACxC,SAAS,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;IAC7C,oDAAoD;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uDAAuD;IACvD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,2CAA2C;IAC3C,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,EAC5D,OAAO,EAAE,iBAAiB,uCAqK3B"}
@@ -5,8 +5,8 @@
5
5
  * React hook that subscribes to an `OfflineDataSource`, exposing the current
6
6
  * online/offline status and the pending queue for status-bar / banner UIs.
7
7
  */
8
- import type { OfflineDataSource } from './createOfflineDataSource';
9
- import type { OfflineOperation } from './offlineQueue';
8
+ import type { OfflineDataSource } from './createOfflineDataSource.js';
9
+ import type { OfflineOperation } from './offlineQueue.js';
10
10
  export interface OfflineSyncState {
11
11
  /** True if the browser reports `navigator.onLine`. */
12
12
  isOnline: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"useOfflineSync.d.ts","sourceRoot":"","sources":["../src/useOfflineSync.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAEvD,MAAM,WAAW,gBAAgB;IAC/B,sDAAsD;IACtD,QAAQ,EAAE,OAAO,CAAC;IAClB,iCAAiC;IACjC,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,wCAAwC;IACxC,WAAW,EAAE,OAAO,CAAC;IACrB,iCAAiC;IACjC,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B,6CAA6C;IAC7C,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,uBAAuB;IACvB,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,iBAAiB,GAAG,gBAAgB,CA+C1E"}
1
+ {"version":3,"file":"useOfflineSync.d.ts","sourceRoot":"","sources":["../src/useOfflineSync.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE1D,MAAM,WAAW,gBAAgB;IAC/B,sDAAsD;IACtD,QAAQ,EAAE,OAAO,CAAC;IAClB,iCAAiC;IACjC,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,wCAAwC;IACxC,WAAW,EAAE,OAAO,CAAC;IACrB,iCAAiC;IACjC,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B,6CAA6C;IAC7C,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,uBAAuB;IACvB,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,iBAAiB,GAAG,gBAAgB,CA+C1E"}
@@ -6,8 +6,8 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
8
  import { useMemo } from 'react';
9
- import { useBreakpoint } from './useBreakpoint';
10
- import { resolveResponsiveValue } from './breakpoints';
9
+ import { useBreakpoint } from './useBreakpoint.js';
10
+ import { resolveResponsiveValue } from './breakpoints.js';
11
11
  /**
12
12
  * Hook that resolves a responsive value based on the current breakpoint.
13
13
  *
@@ -5,9 +5,29 @@
5
5
  * This source code is licensed under the MIT license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
- import type { BreakpointName } from '@object-ui/types';
8
+ import type { BreakpointName, SpecResponsiveConfig } from '@object-ui/types';
9
9
  /**
10
- * Spec-aligned ResponsiveConfig (mirrors @objectstack/spec ResponsiveConfigSchema).
10
+ * The responsive layout config this hook consumes — re-exported, not re-declared
11
+ * (objectui#4598).
12
+ *
13
+ * This used to be a hand-written interface over the same four keys, under a
14
+ * comment asserting it mirrored the schema. The assertion was true on the day it
15
+ * was written and maintained by nobody after that: the interface named the
16
+ * schema without ever referring to it, so a key added or retired upstream would
17
+ * have moved the two apart in silence. `ViewNavigationConfig` (objectui#4588)
18
+ * read the same way until it had drifted on `mode`.
19
+ *
20
+ * `@object-ui/types` — already this package's only runtime dependency — publishes
21
+ * the schema's own type at `index.ts` under this exact name, imported from
22
+ * `@objectstack/spec/ui` rather than copied. Re-exporting it costs no new
23
+ * dependency edge and leaves the published name unchanged, so the four keys are
24
+ * now whatever the schema says they are rather than whatever this file last
25
+ * remembered. `@object-ui/core`'s `ResponsiveProtocol` already binds through the
26
+ * same re-export.
27
+ *
28
+ * `responsive-config-spec-parity.test.ts` pins the chain to the schema itself,
29
+ * because the one link this file cannot see is `@object-ui/types` re-growing a
30
+ * hand copy of its own.
11
31
  *
12
32
  * @example
13
33
  * ```ts
@@ -18,16 +38,7 @@ import type { BreakpointName } from '@object-ui/types';
18
38
  * };
19
39
  * ```
20
40
  */
21
- export interface SpecResponsiveConfig {
22
- /** The target breakpoint for this config */
23
- breakpoint?: BreakpointName;
24
- /** Breakpoints on which the component is hidden */
25
- hiddenOn?: BreakpointName[];
26
- /** Grid column counts per breakpoint (1-12) */
27
- columns?: Partial<Record<BreakpointName, number>>;
28
- /** Display order per breakpoint */
29
- order?: Partial<Record<BreakpointName, number>>;
30
- }
41
+ export type { SpecResponsiveConfig };
31
42
  /**
32
43
  * Resolved responsive state from a SpecResponsiveConfig.
33
44
  */
@@ -1 +1 @@
1
- {"version":3,"file":"useResponsiveConfig.d.ts","sourceRoot":"","sources":["../src/useResponsiveConfig.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,oBAAoB;IACnC,4CAA4C;IAC5C,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,mDAAmD;IACnD,QAAQ,CAAC,EAAE,cAAc,EAAE,CAAC;IAC5B,+CAA+C;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC,CAAC;IAClD,mCAAmC;IACnC,KAAK,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC,CAAC;CACjD;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,gEAAgE;IAChE,MAAM,EAAE,OAAO,CAAC;IAChB,uDAAuD;IACvD,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,wDAAwD;IACxD,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,qCAAqC;IACrC,UAAU,EAAE,cAAc,CAAC;CAC5B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,CAAC,EAAE,oBAAoB,GAAG,uBAAuB,CAoB1F"}
1
+ {"version":3,"file":"useResponsiveConfig.d.ts","sourceRoot":"","sources":["../src/useResponsiveConfig.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAE7E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,YAAY,EAAE,oBAAoB,EAAE,CAAC;AAErC;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,gEAAgE;IAChE,MAAM,EAAE,OAAO,CAAC;IAChB,uDAAuD;IACvD,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,wDAAwD;IACxD,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,qCAAqC;IACrC,UAAU,EAAE,cAAc,CAAC;CAC5B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,CAAC,EAAE,oBAAoB,GAAG,uBAAuB,CAoB1F"}
@@ -6,8 +6,8 @@
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
8
  import { useMemo } from 'react';
9
- import { useBreakpoint } from './useBreakpoint';
10
- import { resolveResponsiveValue } from './breakpoints';
9
+ import { useBreakpoint } from './useBreakpoint.js';
10
+ import { resolveResponsiveValue } from './breakpoints.js';
11
11
  /**
12
12
  * Hook that consumes @objectstack/spec ResponsiveConfigSchema and
13
13
  * resolves breakpoint-aware layout state.
@@ -5,7 +5,7 @@
5
5
  * This source code is licensed under the MIT license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
- import type { TouchGestureType, SpecGestureConfig } from '@object-ui/types';
8
+ import type { GestureType, SpecGestureConfig } from '@object-ui/types';
9
9
  export interface UseSpecGestureOptions {
10
10
  /** Spec gesture configuration */
11
11
  config: SpecGestureConfig;
@@ -30,8 +30,11 @@ export interface UseSpecGestureOptions {
30
30
  }) => void;
31
31
  }
32
32
  /**
33
- * Spec `GestureTypeSchema` (`ui/touch.zod.ts`) → the recognizer type
34
- * `useGesture` implements. The spec's `drag` and `pan` are one recognizer
33
+ * `SPEC_GESTURE_TYPES` (the retired `ui/touch` vocabulary, owned by
34
+ * `@object-ui/types` since objectstack#4988) → the recognizer
35
+ * {@link GestureType} `useGesture` implements. Note the two sides are
36
+ * different vocabularies, which is why this map exists at all: the retired
37
+ * spec's `drag` and `pan` are one recognizer
35
38
  * (any-direction move past the threshold); `swipe` resolves per configured
36
39
  * direction, so it maps through {@link SWIPE_DIRECTION_MAP} instead.
37
40
  * Exported for the spec-parity test.
@@ -41,10 +44,11 @@ export interface UseSpecGestureOptions {
41
44
  * `pan` / `drag` / `rotate` / `double_tap` (types with no sub-object) all
42
45
  * fell through to the `'tap'` initializer and fired on a tap.
43
46
  */
44
- export declare const SPEC_GESTURE_TYPE_MAP: Record<string, TouchGestureType>;
47
+ export declare const SPEC_GESTURE_TYPE_MAP: Record<string, GestureType>;
45
48
  /**
46
- * Spec-aware gesture hook that maps an @objectstack/spec GestureConfig
47
- * to the existing useGesture hook.
49
+ * Spec-aware gesture hook that maps a {@link SpecGestureConfig} — the retired
50
+ * `@objectstack/spec` `ui/touch` shape, not this package's own
51
+ * `GestureConfig` — onto the existing useGesture hook.
48
52
  *
49
53
  * @example
50
54
  * ```tsx
@@ -1 +1 @@
1
- {"version":3,"file":"useSpecGesture.d.ts","sourceRoot":"","sources":["../src/useSpecGesture.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE5E,MAAM,WAAW,qBAAqB;IACpC,iCAAiC;IACjC,MAAM,EAAE,iBAAiB,CAAC;IAC1B,gDAAgD;IAChD,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,gDAAgD;IAChD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,qDAAqD;IACrD,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,qDAAqD;IACrD,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,wEAAwE;IACxE,KAAK,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,wEAAw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AAE,CAAC,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CACxG;AASD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAQ7D,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,EAChE,OAAO,EAAE,qBAAqB,uCAoE/B"}
@@ -5,7 +5,7 @@
5
5
  * This source code is licensed under the MIT license found in the
6
6
  * LICENSE file in the root directory of this source tree.
7
7
  */
8
- import { useGesture } from './useGesture';
8
+ import { useGesture } from './useGesture.js';
9
9
  const SWIPE_DIRECTION_MAP = {
10
10
  left: 'swipe-left',
11
11
  right: 'swipe-right',
@@ -13,8 +13,11 @@ const SWIPE_DIRECTION_MAP = {
13
13
  down: 'swipe-down',
14
14
  };
15
15
  /**
16
- * Spec `GestureTypeSchema` (`ui/touch.zod.ts`) → the recognizer type
17
- * `useGesture` implements. The spec's `drag` and `pan` are one recognizer
16
+ * `SPEC_GESTURE_TYPES` (the retired `ui/touch` vocabulary, owned by
17
+ * `@object-ui/types` since objectstack#4988) → the recognizer
18
+ * {@link GestureType} `useGesture` implements. Note the two sides are
19
+ * different vocabularies, which is why this map exists at all: the retired
20
+ * spec's `drag` and `pan` are one recognizer
18
21
  * (any-direction move past the threshold); `swipe` resolves per configured
19
22
  * direction, so it maps through {@link SWIPE_DIRECTION_MAP} instead.
20
23
  * Exported for the spec-parity test.
@@ -34,8 +37,9 @@ export const SPEC_GESTURE_TYPE_MAP = {
34
37
  rotate: 'rotate',
35
38
  };
36
39
  /**
37
- * Spec-aware gesture hook that maps an @objectstack/spec GestureConfig
38
- * to the existing useGesture hook.
40
+ * Spec-aware gesture hook that maps a {@link SpecGestureConfig} — the retired
41
+ * `@objectstack/spec` `ui/touch` shape, not this package's own
42
+ * `GestureConfig` — onto the existing useGesture hook.
39
43
  *
40
44
  * @example
41
45
  * ```tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@object-ui/mobile",
3
- "version": "17.3.0",
3
+ "version": "17.6.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Mobile optimization for Object UI with responsive components, PWA support, and touch gesture handling.",
@@ -30,10 +30,10 @@
30
30
  "react": "^18.0.0 || ^19.0.0"
31
31
  },
32
32
  "dependencies": {
33
- "@object-ui/types": "17.3.0"
33
+ "@object-ui/types": "17.6.0"
34
34
  },
35
35
  "devDependencies": {
36
- "@objectstack/spec": "^17.0.0-rc.2",
36
+ "@objectstack/spec": "^17.0.0",
37
37
  "@types/react": "19.2.18",
38
38
  "react": "19.2.8",
39
39
  "typescript": "^6.0.3",