@absolutejs/absolute 0.20.0-beta.6 → 0.20.0-beta.60
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/README.md +205 -0
- package/dist/angular/browser.js +392 -405
- package/dist/angular/browser.js.map +3 -3
- package/dist/angular/components/core/streamingSlotRegistrar.js +7 -7
- package/dist/angular/components/core/streamingSlotRegistry.js +4 -4
- package/dist/angular/index.js +379 -321
- package/dist/angular/index.js.map +8 -7
- package/dist/angular/server.js +133 -61
- package/dist/angular/server.js.map +8 -7
- package/dist/build.js +2336 -1347
- package/dist/build.js.map +22 -17
- package/dist/cli/config/client.js +12 -12
- package/dist/cli/config/server.js +1140 -1091
- package/dist/cli/index.js +9621 -2093
- package/dist/client/chunks/angularPatch-arh4sr68.js +157 -0
- package/dist/client/chunks/angularPatch-arh4sr68.js.map +10 -0
- package/dist/client/chunks/index-5py90ctf.js +87 -0
- package/dist/client/chunks/index-5py90ctf.js.map +10 -0
- package/dist/client/chunks/index-m35nbkdp.js +374 -0
- package/dist/client/chunks/index-m35nbkdp.js.map +12 -0
- package/dist/client/chunks/index-qxjc7kc5.js +12 -0
- package/dist/client/chunks/index-qxjc7kc5.js.map +9 -0
- package/dist/client/chunks/islands-xj2n8nwf.js +281 -0
- package/dist/client/chunks/islands-xj2n8nwf.js.map +14 -0
- package/dist/client/chunks/react-pdg4325x.js +65 -0
- package/dist/client/chunks/react-pdg4325x.js.map +10 -0
- package/dist/client/chunks/svelte-s0c964kb.js +19 -0
- package/dist/client/chunks/svelte-s0c964kb.js.map +10 -0
- package/dist/client/chunks/vue-rdskrnyg.js +24 -0
- package/dist/client/chunks/vue-rdskrnyg.js.map +10 -0
- package/dist/client/index.js +73 -841
- package/dist/client/index.js.map +7 -20
- package/dist/core/streamingSlotRegistrar.js +15 -13
- package/dist/core/streamingSlotRegistrar.js.map +2 -2
- package/dist/core/streamingSlotRegistry.js +11 -9
- package/dist/core/streamingSlotRegistry.js.map +2 -2
- package/dist/dev/client/hmrClient.ts +35 -3
- package/dist/dev/client/hmrTiming.ts +6 -0
- package/dist/dev/client/syncDevtools.ts +237 -0
- package/dist/dev/serverBootstrap.js +28 -0
- package/dist/image-client/imageClient.js +7 -7
- package/dist/index.js +3748 -2361
- package/dist/index.js.map +38 -30
- package/dist/islands/browser.js +11 -25
- package/dist/islands/browser.js.map +2 -2
- package/dist/islands/index.js +55 -52
- package/dist/islands/index.js.map +5 -4
- package/dist/mobile/browser.js +429 -20
- package/dist/mobile/browser.js.map +8 -5
- package/dist/mobile/index.js +10626 -3132
- package/dist/mobile/index.js.map +47 -18
- package/dist/mobile/remoteMacAgentEntry.js +1374 -14
- package/dist/mobile/shellAuth.js +36 -0
- package/dist/mobile/shellBootstrap.js +1800 -0
- package/dist/mobile/shellExpoAuth.js +163 -0
- package/dist/mobile/shellExpoDevices.js +77 -0
- package/dist/mobile/shellExpoSync.js +104 -0
- package/dist/mobile/shellSync.js +184 -0
- package/dist/mobile/shellUpdate.js +456 -0
- package/dist/mobile/uiPrimitives.js +264 -0
- package/dist/react/browser.js +17 -59
- package/dist/react/browser.js.map +2 -2
- package/dist/react/components/browser/index.js +107 -107
- package/dist/react/components/index.js +118 -116
- package/dist/react/components/index.js.map +2 -2
- package/dist/react/hooks/index.js +11 -25
- package/dist/react/hooks/index.js.map +2 -2
- package/dist/react/index.js +110 -67
- package/dist/react/index.js.map +8 -7
- package/dist/react/jsxDevRuntimeCompat.js +11 -9
- package/dist/react/jsxDevRuntimeCompat.js.map +2 -2
- package/dist/react/jsxRuntimeCompat.js +11 -9
- package/dist/react/jsxRuntimeCompat.js.map +2 -2
- package/dist/react/router/browser.js +9 -7
- package/dist/react/router/browser.js.map +2 -2
- package/dist/react/router/index.js +9 -7
- package/dist/react/router/index.js.map +2 -2
- package/dist/react/server.js +67 -11
- package/dist/react/server.js.map +7 -6
- package/dist/src/build/pwa.d.ts +16 -0
- package/dist/src/cli/config/server.d.ts +1 -1
- package/dist/src/cli/instanceStatus.d.ts +1 -0
- package/dist/src/cli/scripts/dev.d.ts +2 -0
- package/dist/src/client/browserTranslation.d.ts +19 -0
- package/dist/src/client/index.d.ts +1 -0
- package/dist/src/core/browserTranslation.d.ts +6 -0
- package/dist/src/core/devBuild.d.ts +1 -0
- package/dist/src/core/prepare.d.ts +376 -0
- package/dist/src/dev/clientManager.d.ts +1 -0
- package/dist/src/dev/devCert.d.ts +6 -4
- package/dist/src/dev/serverEntryCopies.d.ts +3 -0
- package/dist/src/ember/browser.d.ts +0 -16
- package/dist/src/mobile/adaptiveShell.d.ts +27 -0
- package/dist/src/mobile/androidEmulatorController.d.ts +8 -1
- package/dist/src/mobile/androidRelease.d.ts +9 -2
- package/dist/src/mobile/androidTestReport.d.ts +14 -0
- package/dist/src/mobile/androidUpgradeConformance.d.ts +47 -0
- package/dist/src/mobile/androidWebView.d.ts +1 -0
- package/dist/src/mobile/browser.d.ts +2 -0
- package/dist/src/mobile/capacitorBundle.d.ts +18 -0
- package/dist/src/mobile/ciWorkflow.d.ts +26 -0
- package/dist/src/mobile/config.d.ts +9 -1
- package/dist/src/mobile/devDeviceAdapter.d.ts +3 -0
- package/dist/src/mobile/deviceCapabilities.d.ts +49 -0
- package/dist/src/mobile/expoBridge.d.ts +91 -0
- package/dist/src/mobile/expoDevController.d.ts +56 -0
- package/dist/src/mobile/expoProject.d.ts +16 -0
- package/dist/src/mobile/index.d.ts +23 -0
- package/dist/src/mobile/iosDeviceAcceptance.d.ts +32 -0
- package/dist/src/mobile/iosPhysicalDeviceTransport.d.ts +16 -0
- package/dist/src/mobile/iosRelease.d.ts +63 -3
- package/dist/src/mobile/iosSimulatorController.d.ts +20 -2
- package/dist/src/mobile/iosTestReport.d.ts +24 -0
- package/dist/src/mobile/mobileBundleInspection.d.ts +63 -0
- package/dist/src/mobile/mobileInspect.d.ts +142 -0
- package/dist/src/mobile/mobilePreview.d.ts +174 -0
- package/dist/src/mobile/mobilePreviewClient.d.ts +1 -0
- package/dist/src/mobile/nativeAuth.d.ts +6 -0
- package/dist/src/mobile/nativeBackgroundSync.d.ts +4 -0
- package/dist/src/mobile/nativeDeviceCapabilities.d.ts +6 -0
- package/dist/src/mobile/nativeRoute.d.ts +13 -0
- package/dist/src/mobile/nativeTestReport.d.ts +91 -0
- package/dist/src/mobile/nativeUpdates.d.ts +4 -0
- package/dist/src/mobile/navigationLifecycle.d.ts +36 -0
- package/dist/src/mobile/navigationState.d.ts +53 -0
- package/dist/src/mobile/pageProtocol.d.ts +2 -0
- package/dist/src/mobile/releaseDoctor.d.ts +23 -1
- package/dist/src/mobile/remoteMacProtocol.d.ts +134 -1
- package/dist/src/mobile/remoteMacWire.d.ts +1 -1
- package/dist/src/mobile/shellAuth.d.ts +8 -1
- package/dist/src/mobile/shellBootstrap.d.ts +15 -2
- package/dist/src/mobile/shellExpoAuth.d.ts +12 -0
- package/dist/src/mobile/shellExpoDevices.d.ts +3 -0
- package/dist/src/mobile/shellExpoSync.d.ts +18 -0
- package/dist/src/mobile/shellHttp.d.ts +2 -0
- package/dist/src/mobile/shellPush.d.ts +11 -0
- package/dist/src/mobile/shellSync.d.ts +46 -1
- package/dist/src/mobile/shellUpdate.d.ts +2 -0
- package/dist/src/mobile/syncRemediation.d.ts +10 -0
- package/dist/src/mobile/syncSchema.d.ts +9 -0
- package/dist/src/mobile/transport.d.ts +14 -0
- package/dist/src/mobile/uiPrimitives.d.ts +37 -0
- package/dist/src/mobile/updateClient.d.ts +40 -0
- package/dist/src/mobile/updateProtocol.d.ts +51 -0
- package/dist/src/mobile/updatePublisher.d.ts +66 -0
- package/dist/src/mobile/updateRollout.d.ts +16 -0
- package/dist/src/mobile/updateRuntime.d.ts +27 -0
- package/dist/src/mobile/updateSigning.d.ts +20 -0
- package/dist/src/plugins/hmr.d.ts +3 -0
- package/dist/src/plugins/imageOptimizer.d.ts +1 -1
- package/dist/src/react/hooks/useMediaQuery.d.ts +1 -1
- package/dist/src/utils/imageProcessing.d.ts +3 -0
- package/dist/src/utils/loadConfig.d.ts +1 -0
- package/dist/src/utils/logger.d.ts +1 -0
- package/dist/src/utils/startupBanner.d.ts +1 -0
- package/dist/src/utils/userAgentFunctions.d.ts +1 -1
- package/dist/src/vue/browser.d.ts +1 -0
- package/dist/src/vue/browserTranslation.d.ts +5 -0
- package/dist/src/vue/index.d.ts +1 -0
- package/dist/svelte/browser.js +12 -26
- package/dist/svelte/browser.js.map +2 -2
- package/dist/svelte/index.js +104 -61
- package/dist/svelte/index.js.map +8 -7
- package/dist/svelte/server.js +84 -28
- package/dist/svelte/server.js.map +7 -6
- package/dist/types/build.d.ts +62 -3
- package/dist/types/cli.d.ts +1 -0
- package/dist/types/messages.d.ts +1 -1
- package/dist/vue/browser.js +116 -56
- package/dist/vue/browser.js.map +5 -3
- package/dist/vue/components/Image.js +9 -7
- package/dist/vue/components/Image.js.map +2 -2
- package/dist/vue/components/index.js +11 -9
- package/dist/vue/components/index.js.map +2 -2
- package/dist/vue/index.js +211 -94
- package/dist/vue/index.js.map +10 -7
- package/dist/vue/server.js +69 -13
- package/dist/vue/server.js.map +7 -6
- package/package.json +40 -14
package/README.md
CHANGED
|
@@ -105,6 +105,211 @@ export const server = new Elysia()
|
|
|
105
105
|
2. Route handlers (`handleReactPageRequest`, `handleSveltePageRequest`, …) stream HTML and inject scripts/assets based on that manifest.
|
|
106
106
|
3. The static plugin serves all compiled files from `/build`.
|
|
107
107
|
|
|
108
|
+
### Installable PWA and offline Sync
|
|
109
|
+
|
|
110
|
+
Enable the web-app shell once in `absolutejs.config.ts`. AbsoluteJS generates a
|
|
111
|
+
single shared browser bootstrap, service worker, and optional manifest, then
|
|
112
|
+
wires them into React, Vue, Svelte, Angular, HTML, HTMX, and island client
|
|
113
|
+
entries. Route and page code does not change.
|
|
114
|
+
|
|
115
|
+
```ts
|
|
116
|
+
import { defineConfig } from '@absolutejs/absolute';
|
|
117
|
+
|
|
118
|
+
export default defineConfig({
|
|
119
|
+
// Existing framework directories and build settings...
|
|
120
|
+
pwa: {
|
|
121
|
+
manifest: {
|
|
122
|
+
name: 'Acme',
|
|
123
|
+
shortName: 'Acme',
|
|
124
|
+
themeColor: '#111827',
|
|
125
|
+
icons: [
|
|
126
|
+
{
|
|
127
|
+
src: '/icons/app-512.png',
|
|
128
|
+
sizes: '512x512',
|
|
129
|
+
type: 'image/png'
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
serviceWorker: {
|
|
134
|
+
offline: {
|
|
135
|
+
fallback: '/offline.html',
|
|
136
|
+
assetPrefix: '/assets/'
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
// With @absolutejs/auth + syncSocket(), this provisions the existing
|
|
140
|
+
// HTTP-only web session and durable IndexedDB transport automatically.
|
|
141
|
+
sync: true,
|
|
142
|
+
// Optional: importing pushNotifications enables this automatically.
|
|
143
|
+
// The public key defaults to VAPID_PUBLIC_KEY at build time.
|
|
144
|
+
push: true
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
The default outputs are `/sw.js`, `/manifest.webmanifest`, and the internal
|
|
150
|
+
shared bootstrap at `/__absolute/pwa/bootstrap.js`. Put referenced icons and the
|
|
151
|
+
offline fallback in `publicDirectory`. The worker uses Background Sync when the
|
|
152
|
+
browser offers it, while online/focus/visibility resume remains the correctness
|
|
153
|
+
path. Native Capacitor clients continue to use their Bearer and SQLite
|
|
154
|
+
transport; no web cookie or token is copied into the worker.
|
|
155
|
+
|
|
156
|
+
Portable push uses the same `pushNotifications` API in the browser and a
|
|
157
|
+
Capacitor shell. AbsoluteJS generates Web Push registration and subscription
|
|
158
|
+
rotation against the same-origin `/auth/push` route. Configure the trusted
|
|
159
|
+
server once with `auth({ push: { registrar, tenant, topics } })`; Auth derives
|
|
160
|
+
identity, tenant, and authorized topics, while page code never receives APNs,
|
|
161
|
+
FCM, or Web Push credentials. Only the public VAPID key enters browser output;
|
|
162
|
+
keep `VAPID_PRIVATE_KEY` in the server-side Dispatch sender.
|
|
163
|
+
|
|
164
|
+
`@absolutejs/pwa/client` also exposes `onPwaSyncResult()` and
|
|
165
|
+
`getLastPwaSyncResult()` (plus the `absolute:pwa-sync-result` DOM event) for
|
|
166
|
+
application-owned diagnostics. Results contain only success, duration, trigger,
|
|
167
|
+
and aggregate counts—never credentials, namespaces, endpoints, arguments, or
|
|
168
|
+
rows. Account changes are re-resolved before focus/online/visible Sync and the
|
|
169
|
+
old worker run is aborted and cleared before the new namespace can run.
|
|
170
|
+
|
|
171
|
+
AbsoluteJS also generates one local-storage migration bundle for web and native
|
|
172
|
+
from the app plus installed Sync packs. Routes stay unchanged. A package that
|
|
173
|
+
owns persisted data declares its JSON-safe evolution in `package.json`:
|
|
174
|
+
|
|
175
|
+
```json
|
|
176
|
+
{
|
|
177
|
+
"absolutejs": {
|
|
178
|
+
"sync": {
|
|
179
|
+
"localSchema": {
|
|
180
|
+
"version": 2,
|
|
181
|
+
"migrations": [
|
|
182
|
+
{
|
|
183
|
+
"toVersion": 2,
|
|
184
|
+
"operations": [
|
|
185
|
+
{
|
|
186
|
+
"type": "set-default",
|
|
187
|
+
"collection": "tasks",
|
|
188
|
+
"field": "completed",
|
|
189
|
+
"value": false
|
|
190
|
+
}
|
|
191
|
+
]
|
|
192
|
+
}
|
|
193
|
+
]
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Absolute derives stable component IDs from package names, keeps independent
|
|
201
|
+
version ledgers, validates migration gaps during build/doctor, and applies the
|
|
202
|
+
same transaction atomically in IndexedDB or Capacitor SQLite before Sync starts.
|
|
203
|
+
The same `localSchema` object can declare `localData` rules for sensitivity,
|
|
204
|
+
encryption, memory-only fallback, whole-cache retention, eviction priority, and
|
|
205
|
+
per-principal quota. Absolute mobile stores record payloads as AES-256-GCM
|
|
206
|
+
ciphertext using a random key held by Keychain/Keystore; native background Sync
|
|
207
|
+
uses the identical authenticated format. Browsers without an audited key
|
|
208
|
+
provider either keep a declared fallback in memory only or fail closed. Pending
|
|
209
|
+
mutations are never evicted to satisfy quota.
|
|
210
|
+
|
|
211
|
+
App updates are consent-driven: `onUpdateAvailable()` latches a waiting worker
|
|
212
|
+
for late UI subscribers, `checkForUpdate()` performs a passive check, and
|
|
213
|
+
`applyUpdate()` activates and reloads only after the user accepts. AbsoluteJS
|
|
214
|
+
does not silently replace a running application session.
|
|
215
|
+
|
|
216
|
+
### Native device capabilities
|
|
217
|
+
|
|
218
|
+
Application code uses one provider-neutral API in web pages and Capacitor apps:
|
|
219
|
+
|
|
220
|
+
```ts
|
|
221
|
+
import {
|
|
222
|
+
camera,
|
|
223
|
+
clipboard,
|
|
224
|
+
haptics,
|
|
225
|
+
keyboard,
|
|
226
|
+
photos,
|
|
227
|
+
share,
|
|
228
|
+
systemBars
|
|
229
|
+
} from '@absolutejs/devices';
|
|
230
|
+
|
|
231
|
+
await clipboard.writeText('Copied everywhere');
|
|
232
|
+
await share.share({ text: 'Shared everywhere', url: 'https://absolutejs.com' });
|
|
233
|
+
await haptics.impact('light');
|
|
234
|
+
const removeKeyboard = await keyboard.onChange(({ visible, heightPx }) => {
|
|
235
|
+
document.documentElement.style.setProperty(
|
|
236
|
+
'--keyboard-height',
|
|
237
|
+
visible ? `${heightPx}px` : '0px'
|
|
238
|
+
);
|
|
239
|
+
});
|
|
240
|
+
await systemBars.setAppearance('light', 'status');
|
|
241
|
+
const permission = await camera.requestPermission();
|
|
242
|
+
if (permission.state === 'granted') {
|
|
243
|
+
const capture = await camera.takePhoto();
|
|
244
|
+
image.src = capture.webPath;
|
|
245
|
+
}
|
|
246
|
+
const chosen = await photos.pick({ limit: 1 });
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
`absolute mobile init` and `absolute mobile sync` discover these named value
|
|
250
|
+
imports, read the tested mappings published by `@absolutejs/devices-capacitor`,
|
|
251
|
+
and offer to install only the exact Capacitor plugins in use. The generated
|
|
252
|
+
shell wires them into the shared device facade; users do not import Capacitor,
|
|
253
|
+
edit Swift/Kotlin, or maintain native bootstrap code. Type-only imports and test
|
|
254
|
+
sources do not provision plugins. `absolute mobile doctor release` rejects a
|
|
255
|
+
missing or mismatched plugin before release.
|
|
256
|
+
|
|
257
|
+
Run `absolute mobile inspect` from an application root for a read-only summary
|
|
258
|
+
of the effective mobile config, runtime package versions, discovered
|
|
259
|
+
capabilities/plugins, native-project state, embedded routes/frameworks, bundle
|
|
260
|
+
validation, and release projection. Add `--json` for a redacted CI or support
|
|
261
|
+
artifact; it omits credentials, device/account identifiers, absolute paths, and
|
|
262
|
+
detailed doctor messages. See [mobile project inspection](docs/MOBILE_INSPECT.md).
|
|
263
|
+
|
|
264
|
+
Before signing, run `absolute mobile doctor release`. It validates pinned and
|
|
265
|
+
aligned Capacitor packages, dependency locking, HTTPS and signed-link identity,
|
|
266
|
+
packaged app identity, SHA-256 page/style integrity, runtime compatibility, CSP,
|
|
267
|
+
native deep-link projections, privacy/permission projections, debug residue,
|
|
268
|
+
and Sync/device policy. Its `--json` output is a redacted format-versioned CI
|
|
269
|
+
artifact containing public app facts, check IDs/statuses, totals, and explicit
|
|
270
|
+
manual-review categories—never local paths or detailed failure text. See the
|
|
271
|
+
[Capacitor mobile threat model](docs/MOBILE_SECURITY_THREAT_MODEL.md).
|
|
272
|
+
|
|
273
|
+
Generate protected GitHub Actions for cryptographic pull-request validation,
|
|
274
|
+
signed AAB/IPA builds, and optional Google Play/TestFlight publication:
|
|
275
|
+
|
|
276
|
+
```sh
|
|
277
|
+
bunx absolute mobile ci github server.ts --publish
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
The generated workflow keeps signing and provider credentials behind the
|
|
281
|
+
`absolute-mobile-release` GitHub environment. See
|
|
282
|
+
[mobile CI and store releases](docs/MOBILE_CI.md).
|
|
283
|
+
|
|
284
|
+
An experimental Expo Router hybrid is also available behind
|
|
285
|
+
`mobile.engine: 'expo'`. Explicit React Native routes use native UI while every
|
|
286
|
+
unclaimed AbsoluteJS route remains an embedded, signed web route regardless of
|
|
287
|
+
framework. Capacitor is still the default; Expo Android now supports audited,
|
|
288
|
+
signed production AABs, generated CI, and Google Play publishing while Expo iOS
|
|
289
|
+
release automation remains experimental. See the
|
|
290
|
+
[Expo hybrid experiment](docs/MOBILE_EXPO_EXPERIMENT.md).
|
|
291
|
+
For Expo development, `bun dev` now owns the Bun server, Metro development
|
|
292
|
+
client, configured emulator/simulator builds, categorized logs, and both native
|
|
293
|
+
Fast Refresh and framework-aware AbsoluteJS HMR from the application root.
|
|
294
|
+
|
|
295
|
+
`keyboard` provides portable visibility, CSS-pixel height, dismissal, and
|
|
296
|
+
cleanup-safe change events. `systemBars` controls modern edge-to-edge status and
|
|
297
|
+
navigation bar foreground appearance/visibility through Capacitor 8 core. Its
|
|
298
|
+
`light` and `dark` values name the icon/text foreground. Web appearance uses
|
|
299
|
+
best-effort `color-scheme`; browser chrome visibility reports unsupported.
|
|
300
|
+
|
|
301
|
+
Camera capture requires an explicit `camera.requestPermission()` call from an
|
|
302
|
+
intentional user action. `photos.pick()` uses the item-scoped system picker
|
|
303
|
+
without requesting broad library access. AbsoluteJS generates the required iOS
|
|
304
|
+
usage descriptions from the same audited capability metadata; this first slice
|
|
305
|
+
does not expose EXIF metadata or save captures into the gallery, and Android does
|
|
306
|
+
not receive unnecessary camera/storage permissions.
|
|
307
|
+
|
|
308
|
+
Clipboard and Share use browser standards on the web and fail with normalized
|
|
309
|
+
errors when unavailable. Haptics uses vibration where supported and otherwise
|
|
310
|
+
safely becomes a no-op, because tactile feedback must never be required to
|
|
311
|
+
complete an action.
|
|
312
|
+
|
|
108
313
|
### Immutable production images
|
|
109
314
|
|
|
110
315
|
Build production assets and the server bundle while constructing the image,
|