@object-ui/mobile 17.2.0 → 17.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,217 @@
1
1
  # @object-ui/mobile
2
2
 
3
+ ## 17.5.0
4
+
5
+ ### Patch Changes
6
+
7
+ - c911544: `SpecResponsiveConfig` is now the spec's responsive config rather than a hand copy that said it was
8
+
9
+ `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.
10
+
11
+ 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`.
12
+
13
+ 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.
14
+
15
+ 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.
16
+
17
+ 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.
18
+
19
+ - Updated dependencies [f650253]
20
+ - Updated dependencies [3d9769a]
21
+ - Updated dependencies [92876f0]
22
+ - Updated dependencies [d9d3463]
23
+ - Updated dependencies [2a40f69]
24
+ - Updated dependencies [bec3e14]
25
+ - Updated dependencies [1f9b905]
26
+ - Updated dependencies [abb0f81]
27
+ - Updated dependencies [38ab505]
28
+ - Updated dependencies [7e4f0e5]
29
+ - Updated dependencies [c1d939f]
30
+ - Updated dependencies [bb68488]
31
+ - Updated dependencies [ab04728]
32
+ - @object-ui/types@17.5.0
33
+
34
+ ## 17.4.0
35
+
36
+ ### Minor Changes
37
+
38
+ - 48132f7: Track the `@objectstack` family at `17.0.0-rc.5` (objectui#3560).
39
+
40
+ The pin moves from `^17.0.0-rc.2` to `^17.0.0-rc.5` across all 37 declarations in
41
+ 30 `package.json` files, and the sibling `@objectstack/*` packages (`client` /
42
+ `formula` / `lint`) move with it — they pin `@objectstack/spec` **exactly**, so
43
+ leaving them behind would keep a second copy of the spec in the tree and have
44
+ `@objectstack/lint` validating against schemas that still accept the keys rc.3–rc.5
45
+ retire. `pnpm-lock.yaml` now resolves one copy of each of the six family packages
46
+ (`spec` / `client` / `core` / `formula` / `lint` / `sdui-parser`), all at rc.5.
47
+
48
+ Bumping the pin and repairing the fallout cannot be split: the pin alone reddens
49
+ CI, and the code alone targets a shape that is not in effect yet.
50
+
51
+ ## A live bug this upgrade fixes
52
+
53
+ **`ObjectStackDataSource.delete()` never emitted its mutation event, and resolved
54
+ `undefined` instead of a boolean.** `@objectstack/client`'s `DeleteDataResult`
55
+ declared a key called `deleted` — a key no schema has ever declared and no server
56
+ path has ever returned on `DELETE /data/:object/:id`. So `result.deleted`
57
+ compiled and read `undefined` at runtime: the guard never fired, a successful
58
+ delete notified no subscriber, and every consumer's cache stayed stale.
59
+ objectstack#5638 corrected the interface to the schema's `success`; following the
60
+ rename is what restores both behaviours. Nothing in this repo had to change shape
61
+ for it — the code was already asking the right question of the wrong key.
62
+
63
+ ## Breaking, in FROM → TO form
64
+
65
+ - **The five `@objectstack/spec/ui` interaction-config modules are gone** —
66
+ touch / dnd / keyboard / animation / offline, 32 defs and 64 exports
67
+ (objectstack#4988, PR objectstack#5321). None of them had an authoring door: no
68
+ metadata document could ever carry one of these blocks, so a stack that parsed
69
+ before the retirement parses byte-for-byte the same after it. `@object-ui/types`
70
+ drops the 32 `export type` re-exports. The vocabulary each one's only real
71
+ consumer needs is now declared by that consumer, which is the remedy the spec's
72
+ own retirement ledger prescribes ("declare that union locally — it is your
73
+ client's policy, not the platform's"):
74
+
75
+ - `@object-ui/react`'s `useOffline` owns `OfflineStrategy`, `ConflictResolution`,
76
+ `PersistStorageType`, `EvictionPolicyType`, `OfflineConfig`,
77
+ `OfflineCacheConfig`, `OfflineSyncConfig`;
78
+ - `@object-ui/core`'s `DndProtocol` / `KeyboardProtocol` own `DndConfig`,
79
+ `DragItem`, `DropZone`, `DragConstraint`, `DragHandle`, `DropEffect`,
80
+ `KeyboardNavigationConfig`, `KeyboardShortcut`, `FocusManagement`,
81
+ `FocusTrapConfig`;
82
+ - `@object-ui/types`' `mobile` module owns `SpecGestureConfig`,
83
+ `SwipeGestureConfig`, `PinchGestureConfig`, `LongPressGestureConfig`,
84
+ `TouchTargetConfig`, `TouchInteraction` (plus a new `SPEC_GESTURE_TYPES`
85
+ runtime tuple), so `@object-ui/mobile`'s import paths are unchanged.
86
+
87
+ Every shape is moved verbatim — same keys, same members, same optionality — so
88
+ no hook or bridge changes behaviour. Consumers importing these names from
89
+ `@object-ui/types` must import them from the owning package instead. Note the
90
+ spec's _surviving_ `ConnectorConflictResolution` (`/integration`, connector sync)
91
+ and `ConflictResolutionStrategy` (`/api`, route merge policy) are **different
92
+ concepts** — do not re-point at them.
93
+
94
+ - **`@object-ui/types` no longer re-exports `NotificationAction` or `EmbedConfig`**
95
+ (objectstack#5015, PR objectstack#5300). Both were published `ui` vocabulary with
96
+ no authoring door; no notification action was ever parsed from metadata and no
97
+ iframe route ever read an embed config. The presentation enums
98
+ (`NotificationType` / `NotificationSeverity` / `NotificationPosition`) and
99
+ `SharingConfig` **survive** and are untouched — public form sharing still gates
100
+ the anonymous endpoints on `allowAnonymous` + `publicLink`.
101
+ `@object-ui/core`'s `SharingProtocol` keeps `resolveEmbedConfig` /
102
+ `generateEmbedCode` against a locally declared `EmbedConfig`, so its surface is
103
+ unchanged.
104
+ - **`ThemeEngine` stops emitting nine retired CSS variable groups**
105
+ (objectstack#5021 option 2, PR objectstack#5289). `theme.animation`,
106
+ `theme.zIndex` and five typography groups (`fontSize` / `fontWeight` /
107
+ `lineHeight` / `letterSpacing`, plus `fontFamily.heading` / `fontFamily.mono`)
108
+ are tombstones the schema now rejects by name, so `--duration-*`, `--timing-*`,
109
+ `--z-*`, `--font-size-*`, `--font-weight-*`, `--line-height-*`,
110
+ `--letter-spacing-*`, `--font-heading` and `--font-mono` had become structurally
111
+ dead code — no author could produce the input that reached them.
112
+ `generateAnimationVars` and `generateZIndexVars` are removed from
113
+ `@object-ui/core`, and `@object-ui/types` drops `Animation` / `ZIndex` /
114
+ `AnimationSchema` / `ZIndexSchema`. **`theme.customVars` is the declared — and
115
+ since #5021 the only — door**: each entry is emitted verbatim as
116
+ `--<key>: <value>`, so a `--z-modal` or a `--duration-fast` goes there now.
117
+ LIVE emission is untouched byte for byte: `colors`, `borderRadius`, `shadows`,
118
+ `typography.fontFamily.base` (→ `--font-sans`) and `customVars`.
119
+ - **`@object-ui/types`' `HttpMethodSchema` now binds the spec's
120
+ `HttpMethodSubsetSchema`, and `HttpMethod` binds `HttpMethodSubset`**
121
+ (objectstack#5832, PR objectstack#5976 — objectui#3499). The spec renamed its
122
+ 5-value UI subset because `schemaNameFromExportKey` strips the `Schema` suffix,
123
+ so the 5-value and 7-value enums both published as `shared/HttpMethod` and the
124
+ later write won — the emitted JSON Schema and reference page described only one
125
+ of them. **The runtime domain is unchanged and this repo's exported names are
126
+ unchanged**; this follows the rename without touching cross-package semantics.
127
+ Deliberately NOT re-pointed at the spec's bare `HttpMethod`: that is the 7-value
128
+ enum, and widening to it would let `method: 'HEAD'` compile and then throw in
129
+ `HttpRequestSchema.parse()`.
130
+ - **`dashboard.widgets[].actionUrl` / `actionType` / `actionIcon` / `aria` are
131
+ refused, not stripped** (objectstack#5010, ADR-0049 enforce-or-remove). A
132
+ dashboard widget has no action button and never had one — every action the
133
+ dashboard dispatches comes from `header.actions[]` — and no renderer ever applied
134
+ the widget `aria`, so it promised accessibility compliance it did not deliver.
135
+ A stale dashboard now gets a named error telling it where the affordance moved,
136
+ instead of silently losing it. Run `os migrate meta --from 16` to rewrite.
137
+
138
+ - e6fdbdc: Reclaim the natural names `GestureType` and `GestureConfig` (objectui#3363).
139
+
140
+ `@objectstack/spec` 17.0.0-rc.3 deleted the whole `ui/touch` module
141
+ (objectstack#4988, PR objectstack#5321), vacating three names objectui had
142
+ renamed **away from** in objectstack#4115 purely to avoid a collision. Two of
143
+ those workarounds have now outlived their reason and are undone.
144
+
145
+ ## Breaking, in FROM → TO form
146
+
147
+ - `TouchGestureType` → **`GestureType`** — objectui's direction-fused recogniser
148
+ vocabulary (`tap`, `swipe-left`, `swipe-up`, …).
149
+ - `TouchGestureConfig` → **`GestureConfig`** — the flat gesture→`action` handler
150
+ binding.
151
+
152
+ Both are exported from `@object-ui/types` and re-exported by `@object-ui/mobile`.
153
+ Nothing about either shape changed: same members, same optionality. Consumers
154
+ import the new name; there is no other edit.
155
+
156
+ **The old names are gone, not deprecated.** This follows the precedent set by the
157
+ objectstack#4115 rename batch that introduced them, whose own migration note reads:
158
+ "an alias would preserve exactly the ambiguity being removed". A deprecated alias
159
+ would be worse here than in the general case, because the ambiguity these renames
160
+ exist to prevent is between two same-named types — leaving `TouchGestureType`
161
+ alive next to `GestureType` restores the two-spellings-one-concept problem while
162
+ claiming to retire it.
163
+
164
+ The retired spec vocabulary that used to hold these names still lives in
165
+ `@object-ui/types`' `mobile` module under its deliberate `Spec…` prefix
166
+ (`SpecGestureType`, `SpecGestureConfig`, `SwipeGestureConfig`, …), and that prefix
167
+ is untouched — it is now the only thing distinguishing the two contracts, so
168
+ `useSpecGesture` still maps one onto the other exactly as before.
169
+
170
+ ## `PWAOfflineConfig` is deliberately NOT reclaimed
171
+
172
+ The spec vacated `OfflineConfig` in the same retirement, but the spec was never
173
+ its only claimant: that rename was a **cross-package arbitration between two
174
+ objectui packages**, and `@object-ui/react` won it. `useOffline`'s config is the
175
+ offline data/sync model key for key, so it holds the bare `OfflineConfig`, while
176
+ this package's service-worker route cache stays `PWAOfflineConfig`
177
+ (objectui#3156 / objectui#3159).
178
+
179
+ Before objectui#3560 that name reached `@object-ui/react` from the spec, so the
180
+ spec-side tripwire covered it by accident. Since the retirement it is declared
181
+ locally in `packages/react/src/hooks/useOffline.ts`, which means the spec's
182
+ vacancy no longer says anything about whether the name is free — it is not.
183
+ Reclaiming it would put two different `OfflineConfig` shapes on the public
184
+ surface of two packages that are routinely imported together, which is the exact
185
+ ambiguity objectstack#4115 renamed it away from.
186
+
187
+ `page-nav-misc-spec-parity.test.ts` now pins that reason directly instead of
188
+ leaving it as prose: it asserts `@object-ui/react` still declares
189
+ `OfflineConfig`, and its failure message tells the next reader that the reclaim
190
+ has become available if it ever stops.
191
+
192
+ ### Patch Changes
193
+
194
+ - Updated dependencies [d229dfa]
195
+ - Updated dependencies [c2fd122]
196
+ - Updated dependencies [48132f7]
197
+ - Updated dependencies [7e5bb5d]
198
+ - Updated dependencies [e6fdbdc]
199
+ - Updated dependencies [7e2b7e9]
200
+ - Updated dependencies [c1e1e6b]
201
+ - @object-ui/types@17.4.0
202
+
203
+ ## 17.3.0
204
+
205
+ ### Patch Changes
206
+
207
+ - Updated dependencies [d915c47]
208
+ - Updated dependencies [9e9e9a9]
209
+ - Updated dependencies [23018cc]
210
+ - Updated dependencies [f44d872]
211
+ - Updated dependencies [f833d3a]
212
+ - Updated dependencies [d22ae31]
213
+ - @object-ui/types@17.3.0
214
+
3
215
  ## 17.2.0
4
216
 
5
217
  ### Minor Changes
@@ -582,24 +794,29 @@
582
794
  - a2d7023: End-user feature batch — forms, designer history, import/export, and PWA offline sync.
583
795
 
584
796
  **Forms (`@object-ui/fields`, `@object-ui/providers`)**
797
+
585
798
  - `FileField`: native `<input capture="environment">` camera capture for mobile devices, plus a uploading-progress indicator driven by `UploadProvider`.
586
799
  - `ImageField`: per-image inline crop/rotate via the lazy-loaded `ImageCropperDialog` (canvas-based, zero new deps).
587
800
  - 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.
588
801
  - `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.
589
802
 
590
803
  **Container-aware widget widths (`@object-ui/components`)**
804
+
591
805
  - New `useResizeObserver(ref)` hook exposing `{ width, height }` of any element. SSR-safe; reads the initial size via `getBoundingClientRect`.
592
806
  - `plugin-gantt` and `plugin-kanban` now react to their container size instead of `window.innerWidth`, so they behave correctly inside split panels and dashboards.
593
807
 
594
808
  **Designer history (`@object-ui/plugin-designer`)**
809
+
595
810
  - `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.
596
811
  - New `<HistoryPanel>` component renders the timeline visually with one-click jump-to-checkpoint via the new `jumpTo(index)` API.
597
812
 
598
813
  **Import wizard (`@object-ui/plugin-grid`)**
814
+
599
815
  - 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`).
600
816
  - 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.
601
817
 
602
818
  **PWA offline sync (`@object-ui/mobile`)**
819
+
603
820
  - New `MemoryOfflineQueue` / `IndexedDbOfflineQueue` (`createOfflineQueue()` picks the best backend) backed by IndexedDB.
604
821
  - `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.
605
822
  - 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)
package/dist/index.d.ts CHANGED
@@ -33,5 +33,5 @@ export { createOfflineDataSource, type OfflineDataSource, type OfflineDataSource
33
33
  export { useOfflineSync, type OfflineSyncState } from './useOfflineSync';
34
34
  export { getServiceWorkerSource, requestBackgroundSync, type ServiceWorkerSourceOptions, } from './serviceWorkerSource';
35
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';
36
+ export type { BreakpointName, ResponsiveValue, MobileResponsiveConfig, MobileOverrides, 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,MAAM,uBAAuB,CAAC;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,KAAK,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAClF,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,YAAY,EACZ,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B,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,MAAM,uBAAuB,CAAC;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,KAAK,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAClF,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,YAAY,EACZ,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,GACzB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,uBAAuB,EACvB,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,GACzB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzE,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACrB,KAAK,0BAA0B,GAChC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAGpE,YAAY,EACV,cAAc,EACd,eAAe,EACf,sBAAsB,EACtB,eAAe,EACf,SAAS,EACT,OAAO,EACP,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,aAAa,EACb,cAAc,EACd,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,EACtB,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,kBAAkB,CAAC"}
@@ -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,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"}
@@ -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,wEAAwE;IACxE,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,yDAAyD;IACzD,SAAS,CAAC,EAAE,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,CA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AAM,EAAE,WAAW,CAQ7D,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,EAChE,OAAO,EAAE,qBAAqB,uCAoE/B"}
@@ -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.2.0",
3
+ "version": "17.5.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,11 +30,11 @@
30
30
  "react": "^18.0.0 || ^19.0.0"
31
31
  },
32
32
  "dependencies": {
33
- "@object-ui/types": "17.2.0"
33
+ "@object-ui/types": "17.5.0"
34
34
  },
35
35
  "devDependencies": {
36
- "@objectstack/spec": "^17.0.0-rc.1",
37
- "@types/react": "19.2.17",
36
+ "@objectstack/spec": "^17.0.0-rc.6",
37
+ "@types/react": "19.2.18",
38
38
  "react": "19.2.8",
39
39
  "typescript": "^6.0.3",
40
40
  "vitest": "^4.1.10"