elit 3.4.8 → 3.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/README.md CHANGED
@@ -76,6 +76,8 @@ Elit now includes a practical native-generation foundation that keeps the existi
76
76
 
77
77
  That same foundation also feeds native desktop mode: Elit resolves one shared native tree and style/layout model, then emits IR, Compose, SwiftUI, or native desktop output from it. Public `elit/native` APIs stay the same while parity fixes and native CSS-subset improvements can land across outputs together.
78
78
 
79
+ On the desktop-native backend, renderer responsibilities are now split internally by concern too: widget rendering, content and media surfaces, form controls, container layout, vector drawing, interaction dispatch, runtime support, and app orchestration no longer live in one monolithic renderer file. That does not change the public API, but it makes parity fixes for buttons, inputs, media surfaces, layout, and vector output safer to land across desktop native, IR, Compose, and SwiftUI outputs without forking the shared native tree contract.
80
+
79
81
  ```ts
80
82
  import { a, button, div, h1, img, input } from 'elit/el';
81
83
  import { renderNativeTree } from 'elit/native';
@@ -253,12 +255,14 @@ Useful flags:
253
255
  - `elit native generate android ./src/native-screen.ts --name HomeScreen --package com.example.app`
254
256
  - `elit native generate ios ./src/native-screen.ts --out ./ios/HomeScreen.swift --no-preview`
255
257
  - `elit native generate ir ./src/native-screen.ts --platform android --export screen`
258
+ - `elit wapk pack . --password-env WAPK_PASSWORD`
256
259
  - `elit wapk ./app.wapk --runtime node|bun|deno`
257
- - `elit wapk run ./app.wapk --sync-interval 100 --watcher`
260
+ - `elit wapk run ./app.wapk --password-env WAPK_PASSWORD --sync-interval 100 --watcher`
258
261
  - `elit wapk pack . --include-deps`
259
- - `elit wapk inspect ./app.wapk`
262
+ - `elit wapk inspect ./app.wapk --password-env WAPK_PASSWORD`
260
263
  - `elit wapk extract ./app.wapk`
261
264
  - `elit desktop wapk ./app.wapk --runtime node|bun|deno --watcher`
265
+ - `elit desktop wapk run ./app.wapk --runtime bun --password-env WAPK_PASSWORD`
262
266
 
263
267
  Desktop mode notes:
264
268
 
@@ -304,8 +308,12 @@ WAPK mode notes:
304
308
  - `elit desktop wapk <file.wapk>` and `elit desktop wapk run <file.wapk>` run packaged apps in desktop mode.
305
309
  - During run, the archive is expanded into a temporary work directory and changes are synced back to the same `.wapk` file.
306
310
  - Use `--sync-interval <ms>` for polling mode, or `--watcher` / `--use-watcher` for event-driven sync.
307
- - Configure package metadata in `elit.config.*` under `wapk`.
308
- - See the full example app at `examples/wapk-example`.
311
+ - Use `--password` or, preferably, `--password-env` when packing, inspecting, extracting, or running a locked archive.
312
+ - `inspect` without credentials still reports whether the archive is locked, but it does not print the archive contents.
313
+ - Locked archives stay encrypted when live sync writes changes back into the same `.wapk` file.
314
+ - Configure package metadata in `elit.config.*` under `wapk`, and use `wapk.lock` when you want password-protected archives by default.
315
+ - WAPK stays unlocked by default unless `wapk.lock.password`, `wapk.lock.passwordEnv`, `--password`, or `--password-env` is provided.
316
+ - See [docs/wapk.md](docs/wapk.md) for the full archive guide and `examples/wapk-example` for an end-to-end sample.
309
317
 
310
318
  ## Config File
311
319
 
@@ -378,6 +386,10 @@ The config shape is:
378
386
  port?: number;
379
387
  env?: Record<string, string | number | boolean>;
380
388
  desktop?: Record<string, unknown>;
389
+ lock?: {
390
+ password?: string;
391
+ passwordEnv?: string;
392
+ };
381
393
  };
382
394
  }
383
395
  ```
@@ -458,6 +470,9 @@ export default {
458
470
  env: {
459
471
  NODE_ENV: 'production',
460
472
  },
473
+ lock: {
474
+ passwordEnv: 'WAPK_PASSWORD',
475
+ },
461
476
  },
462
477
  };
463
478
  ```
@@ -471,6 +486,7 @@ Important details:
471
486
  - `desktop` config provides defaults for `elit desktop`, `elit desktop run`, `elit desktop build`, and `elit desktop wapk`. Use `desktop.entry` for hybrid defaults, `desktop.native.entry` for native defaults, and `desktop.mode` to choose which one runs by default.
472
487
  - `mobile` config provides defaults for `elit mobile init|sync|open|run|build`.
473
488
  - `wapk` config is loaded from `elit.config.*`, then package metadata is used as fallback.
489
+ - `wapk.lock.passwordEnv` is the safest reusable way to protect archives without putting the password directly into shell history or committed config.
474
490
  - `wapk run` and `desktop wapk run` sync runtime file changes back into the same `.wapk` archive.
475
491
 
476
492
  ## Browser Patterns