Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e5da57ef3f | ||
|
|
4e55fd44f1 | ||
|
|
bfea2cca93 | ||
|
|
1bb872d4c6 | ||
|
|
53c9c090a8 | ||
|
|
73373344b8 | ||
|
|
27287d967d | ||
|
|
3b13f3d407 | ||
|
|
9f42816441 | ||
|
|
6fd1dbbb27 | ||
|
|
466b5614d3 | ||
|
|
54c3fce061 | ||
|
|
4615f6d558 | ||
|
|
42965e39cd | ||
|
|
88a81baf27 | ||
|
|
f45362ef1b | ||
|
|
d9b20cc05c | ||
|
|
d468bbd351 | ||
|
|
02a3ed19eb | ||
|
|
ae88371737 | ||
|
|
9d985b69d1 | ||
|
|
2f7802661a | ||
|
|
bd08f39532 | ||
|
|
ab99d83b7a | ||
|
|
ad02c7d1cf | ||
|
|
af64e57a1d | ||
|
|
3efed6e1f4 | ||
|
|
02c8c3793b | ||
|
|
baab6abf7a | ||
|
|
c79a92725e | ||
|
|
7c490d8fdf | ||
|
|
556bdd3552 | ||
|
|
c7ed67e2dc | ||
|
|
f4fac28598 | ||
|
|
125484d157 | ||
|
|
e2b0b260d4 | ||
|
|
08eb898ee3 | ||
|
|
aa36952508 | ||
|
|
028b2db469 | ||
|
|
3c43b92209 | ||
|
|
0a92b02cdf | ||
|
|
ef652f8179 | ||
|
|
09702e144d | ||
|
|
f6e340b2b7 | ||
|
|
b6a7743aca | ||
|
|
1d1eb49946 | ||
|
|
7a81e00d5e | ||
|
|
e83dae0e70 | ||
|
|
c473e276cd | ||
|
|
a18e6bf419 | ||
|
|
7d65025806 | ||
|
|
1eb5fd3de2 | ||
|
|
ccbad38a60 | ||
|
|
4097ce5d79 | ||
|
|
4b77d513a1 | ||
|
|
a733f87cba | ||
|
|
d0993d71ad | ||
|
|
b5f4ebfa16 | ||
|
|
f1dc2a1dff | ||
|
|
7d18f5089d | ||
|
|
900850f1a9 | ||
|
|
d30e918704 | ||
|
|
736882b1bd | ||
|
|
7a6b8207e1 | ||
|
|
1dab289a8f | ||
|
|
11324d6ece | ||
|
|
3818deacec | ||
|
|
2325a89629 | ||
|
|
d23b515003 | ||
|
|
5b43aa3c3d | ||
|
|
0b8aadc911 | ||
|
|
63bd330b81 | ||
|
|
af81a9a23a | ||
|
|
b6f405010e | ||
|
|
7ad56a3d3e | ||
|
|
f11c8b1174 | ||
|
|
860cc9af13 | ||
|
|
11b013134c | ||
|
|
269a277103 | ||
|
|
01522177f3 | ||
|
|
76fdecaccd | ||
|
|
5595bd70df | ||
|
|
7260d62662 | ||
|
|
a6473d2adf | ||
|
|
d631050d0d | ||
|
|
5d4ab56ed8 | ||
|
|
7b9f01b870 | ||
|
|
690c0db1bb | ||
|
|
019de0a0d6 | ||
|
|
3c11971227 | ||
|
|
af43d15d63 | ||
|
|
75e5d449b3 | ||
|
|
e58d9194a5 | ||
|
|
a84907925a | ||
|
|
12380d75ab | ||
|
|
43cd7f3908 | ||
|
|
7389a549cd | ||
|
|
17c9564fbd | ||
|
|
398c87020b | ||
|
|
35577f8fa6 | ||
|
|
4ef4081b52 | ||
|
|
3c08c08edc | ||
|
|
419899fd3b | ||
|
|
d3154ea5a0 | ||
|
|
782ad3d24a | ||
|
|
fdf38893ea | ||
|
|
bfd50cdf62 | ||
|
|
e277757410 | ||
|
|
268888ff95 | ||
|
|
17fbd99469 | ||
|
|
e09048a3b3 | ||
|
|
2d1759f560 | ||
|
|
ed470b98fe | ||
|
|
43ae482eb3 | ||
|
|
1ef26f4d79 | ||
|
|
7b5e324779 | ||
|
|
55db65df1d | ||
|
|
7216521a43 | ||
|
|
841b7e9bfc | ||
|
|
a78d30c778 | ||
|
|
31456658f2 | ||
|
|
81ff4593ae | ||
|
|
4fe2486539 | ||
|
|
278b115944 | ||
|
|
b86a904a0a | ||
|
|
1f8fd4b8d0 | ||
|
|
fbbe884b27 | ||
|
|
7fa42e6785 | ||
|
|
a128a47328 | ||
|
|
09d066216a | ||
|
|
4b6a2def2d | ||
|
|
47952f78e5 | ||
|
|
31b0f8a4bf | ||
|
|
4ebbf0d691 | ||
|
|
163a0e5e88 | ||
|
|
0be7d77a49 | ||
|
|
e6ad9d0991 | ||
|
|
c908342167 | ||
|
|
1f094bf922 | ||
|
|
bed1b70504 | ||
|
|
7bc8c17c0a | ||
|
|
99833a0b8c | ||
|
|
18e79b36fd | ||
|
|
f0529e8234 | ||
|
|
6712e5db0c | ||
|
|
2b3d10148e | ||
|
|
dda2d2e894 | ||
|
|
475476ebfc | ||
|
|
c5482abf97 | ||
|
|
fab864ea17 | ||
|
|
25e703aeda | ||
|
|
7b18c1d8be | ||
|
|
5d090d0e4e | ||
|
|
e77b982aa0 | ||
|
|
ab3919c04b | ||
|
|
45309a5b6c | ||
|
|
7930aa9914 | ||
|
|
6eb166e377 | ||
|
|
7c6d5a128d | ||
|
|
98c2c6ef6f | ||
|
|
6c5da2dee3 | ||
|
|
33874fd8cb | ||
|
|
1f36722f3c | ||
|
|
06b21c4d67 | ||
|
|
06d1c49694 | ||
|
|
bbe4f08d85 | ||
|
|
73deeeaca4 | ||
|
|
1007f934f9 | ||
|
|
a4138169aa | ||
|
|
677be34dbb | ||
|
|
e54c7fdca6 | ||
|
|
6ef450d90d | ||
|
|
edcb5f8302 | ||
|
|
99c819fa88 | ||
|
|
c54c90edcb | ||
|
|
00b27d9804 | ||
|
|
d7b92a5aaf | ||
|
|
890eb99381 | ||
|
|
c4cc79a107 | ||
|
|
dd3895b2a0 | ||
|
|
87ac93168b | ||
|
|
7827f0cda4 | ||
|
|
b45cab3719 | ||
|
|
56354be0f2 | ||
|
|
37f85b8b4f | ||
|
|
6483eeff03 | ||
|
|
f9d2b03579 | ||
|
|
0e724f6484 | ||
|
|
2b05b9e41d | ||
|
|
89d5735e06 | ||
|
|
912109b58c | ||
|
|
d47ea26fed | ||
|
|
0fd81dff0d | ||
|
|
f394a4c6d4 | ||
|
|
5ae1079708 | ||
|
|
5dca47fd0e | ||
|
|
9eac5812be | ||
|
|
dc91713e77 | ||
|
|
2955e44e05 | ||
|
|
8564441d2d | ||
|
|
b44b78c2d4 | ||
|
|
22b4e3e4a3 | ||
|
|
5188d17398 | ||
|
|
16742b4670 | ||
|
|
878b4638e7 | ||
|
|
96a7312a81 | ||
|
|
b05e5314e4 | ||
|
|
576ac323c5 | ||
|
|
d8e0209494 | ||
|
|
5b0482ce08 | ||
|
|
221e3090a4 | ||
|
|
0707f7f530 | ||
|
|
4b6fb732ce | ||
|
|
a2f5802933 | ||
|
|
fbf3e1ed72 | ||
|
|
e27ceb65c8 | ||
|
|
a92f9c8c6b | ||
|
|
7b6028b86c | ||
|
|
90a951c7aa |
No files matched your search
@@ -9,7 +9,11 @@ PLAY_DELETE_EXISTING=1
|
||||
# Short and full descriptions from every locale folder here. 0 skips text.
|
||||
PLAY_METADATA_DIR=fastlane/metadata/android
|
||||
PLAY_LISTING_TEXT=1
|
||||
# Optional public/unlisted, embeddable YouTube video for PLAY_LANGUAGE.
|
||||
# Leave empty to preserve the existing video.
|
||||
PLAY_VIDEO_URL=
|
||||
|
||||
# Default is validate-only and discards the draft edit.
|
||||
# Set to 1 only when you want the uploaded screenshots committed to Play.
|
||||
# Uploads require make screenshot-review, screenshot-export and play-preflight.
|
||||
PLAY_COMMIT=0
|
||||
@@ -1,4 +1,6 @@
|
||||
build-essential
|
||||
ca-certificates
|
||||
libcurl4-openssl-dev
|
||||
ripgrep
|
||||
zlib1g-dev
|
||||
libdrm-dev
|
||||
@@ -12,5 +14,14 @@ python3-numpy
|
||||
python3-pil
|
||||
python3-requests
|
||||
python3-scipy
|
||||
xvfb
|
||||
xauth
|
||||
xdotool
|
||||
x11-apps
|
||||
x11-utils
|
||||
xclip
|
||||
sqlite3
|
||||
imagemagick
|
||||
tesseract-ocr
|
||||
|
||||
python3-cryptography
|
||||
@@ -111,12 +111,44 @@ jobs:
|
||||
- name: Run Tests
|
||||
run: sh scripts/test-shard.sh ${{ matrix.shard }} 3
|
||||
|
||||
- name: Require Visual Tests
|
||||
if: matrix.shard == 1
|
||||
run: make visual-test
|
||||
|
||||
- name: Save Visual Test Evidence
|
||||
if: always() && matrix.shard == 1
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: native-visual-tests
|
||||
path: |
|
||||
build/visual-test/
|
||||
build/native-visual-test/
|
||||
build/native-zoom-test/*.png
|
||||
build/native-zoom-test/app.log
|
||||
build/launcher-ui-test/
|
||||
build/locale-render-ui-test/
|
||||
build/native-screenshot-test/
|
||||
build/native-text-pixels-test/*.png
|
||||
build/native-text-pixels-test/*.log
|
||||
build/settings-sidebar-test/
|
||||
build/startup-quit-test/
|
||||
build/lumi-ui-test/
|
||||
build/lumi-history-ui-test/
|
||||
build/habits-table-ui-test/
|
||||
build/lists-ui-test/
|
||||
build/sync-review-ui-test/
|
||||
build/data-back-ui-test/
|
||||
build/leaderboard-ui-test/
|
||||
build/practice-images-ui-test/
|
||||
retention-days: 7
|
||||
|
||||
- name: Check out sync test server
|
||||
if: matrix.shard == 0
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: kryonlabs/daochi
|
||||
ref: 902230435fba6f64f5067afab551410456fb57d0
|
||||
# Includes the private Lumi collection used for shared account activity.
|
||||
ref: f850456a7e039e9ba39fcf03cb7cb802ff6a3329
|
||||
path: .test-server
|
||||
submodules: recursive
|
||||
|
||||
|
||||
@@ -40,7 +40,9 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./.github/actions/ziran-packages
|
||||
- name: Install signing and test dependencies
|
||||
run: sudo apt-get update && sudo apt-get install -y python3-cryptography python3-fonttools
|
||||
run: |
|
||||
sudo apt-get update && sudo apt-get install -y python3-cryptography python3-fonttools
|
||||
.github/scripts/install-apt-packages.sh .github/apt/test-packages.txt
|
||||
- name: Build independent packages and check signatures
|
||||
run: |
|
||||
make package-version-test
|
||||
@@ -49,6 +51,8 @@ jobs:
|
||||
make package-upload-test
|
||||
make cells build-laws
|
||||
python3 tests/package_release_test.py
|
||||
- name: Run new packages in the last released app
|
||||
run: python3 tests/package_compat_test.py --skip-forward
|
||||
- name: Configure publisher
|
||||
id: publisher
|
||||
env:
|
||||
|
||||
@@ -97,6 +97,39 @@ jobs:
|
||||
- name: Run Tests
|
||||
run: make test
|
||||
|
||||
- name: Require Visual Tests
|
||||
run: make visual-test
|
||||
|
||||
- name: Run Packages Across App Versions
|
||||
run: make package-compat-test
|
||||
|
||||
- name: Save Visual Test Evidence
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: release-visual-tests
|
||||
path: |
|
||||
build/visual-test/
|
||||
build/native-visual-test/
|
||||
build/native-zoom-test/*.png
|
||||
build/native-zoom-test/app.log
|
||||
build/launcher-ui-test/
|
||||
build/locale-render-ui-test/
|
||||
build/native-screenshot-test/
|
||||
build/native-text-pixels-test/*.png
|
||||
build/native-text-pixels-test/*.log
|
||||
build/settings-sidebar-test/
|
||||
build/startup-quit-test/
|
||||
build/lumi-ui-test/
|
||||
build/lumi-history-ui-test/
|
||||
build/habits-table-ui-test/
|
||||
build/lists-ui-test/
|
||||
build/sync-review-ui-test/
|
||||
build/data-back-ui-test/
|
||||
build/leaderboard-ui-test/
|
||||
build/practice-images-ui-test/
|
||||
retention-days: 7
|
||||
|
||||
build-web:
|
||||
name: Build Web
|
||||
runs-on: ubuntu-latest
|
||||
@@ -323,7 +356,7 @@ jobs:
|
||||
- name: Build Linux AppImage
|
||||
env:
|
||||
APPIMAGE_EXTRACT_AND_RUN: "1"
|
||||
RAY_RAYLIB_CONFIG: -DSUPPORT_SCREEN_CAPTURE=0 -DSUPPORT_COMPRESSION_API=0 -DSUPPORT_AUTOMATION_EVENTS=0 -DSUPPORT_CLIPBOARD_IMAGE=0 -DSUPPORT_FILEFORMAT_BMP=0 -DSUPPORT_FILEFORMAT_GIF=0 -DSUPPORT_FILEFORMAT_QOI=0 -DSUPPORT_FILEFORMAT_DDS=0 -DSUPPORT_FILEFORMAT_TTF=0
|
||||
RAY_RAYLIB_CONFIG: -DSUPPORT_SCREEN_CAPTURE=0 -DSUPPORT_COMPRESSION_API=0 -DSUPPORT_AUTOMATION_EVENTS=0 -DSUPPORT_CLIPBOARD_IMAGE=0 -DSUPPORT_FILEFORMAT_BMP=0 -DSUPPORT_FILEFORMAT_GIF=0 -DSUPPORT_FILEFORMAT_QOI=0 -DSUPPORT_FILEFORMAT_DDS=0 -DSUPPORT_FILEFORMAT_TTF=1
|
||||
run: |
|
||||
set -euo pipefail
|
||||
RAY_SDL_INCLUDE_DIR="$(pkg-config --variable=includedir sdl2 | sed 's,/SDL2$,,')"
|
||||
@@ -353,6 +386,13 @@ jobs:
|
||||
app_pid=$!
|
||||
for _ in $(seq 1 30); do
|
||||
if xwininfo -tree -root | grep -q 'Inner Breeze'; then
|
||||
sleep 3
|
||||
# A build without TrueType support draws a pixel font.
|
||||
if grep -q 'Font is not supported' /tmp/inbe-appimage.log; then
|
||||
echo "AppImage could not load its fonts"
|
||||
cat /tmp/inbe-appimage.log || true
|
||||
exit 1
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
if ! kill -0 "$app_pid" >/dev/null 2>&1; then
|
||||
@@ -768,6 +808,14 @@ jobs:
|
||||
--stacktrace
|
||||
make android-copy-release-apks
|
||||
make android-copy-bundle
|
||||
# F-Droid rebuilds the universal APK with -PfDroidBuild and copies
|
||||
# this APK's signature onto it, so the two must match byte for byte.
|
||||
./droid/gradlew -p droid assembleRelease -PfDroidBuild=true \
|
||||
-Pkeystore.path="$HOME/.android/inbe-release.keystore" \
|
||||
-Pkeystore.alias="$KEY_ALIAS" \
|
||||
-Pkeystore.password="$KEYSTORE_PASSWORD" \
|
||||
--stacktrace
|
||||
make android-copy-fdroid-apk
|
||||
|
||||
- name: Preserve Android Native Crash Symbols
|
||||
uses: actions/upload-artifact@v4
|
||||
@@ -786,7 +834,8 @@ jobs:
|
||||
echo "Could not read APP_VERSION_STRING"
|
||||
exit 1
|
||||
fi
|
||||
for apk in "build/android/inbe-$VERSION.apk" "build/android/inbe-$VERSION-gplay.apk"; do
|
||||
for apk in "build/android/inbe-$VERSION.apk" "build/android/inbe-$VERSION-gplay.apk" \
|
||||
"build/android/inbe-$VERSION-fdroid.apk"; do
|
||||
if [ ! -f "$apk" ]; then
|
||||
echo "Missing universal APK: $apk"
|
||||
exit 1
|
||||
@@ -859,6 +908,16 @@ jobs:
|
||||
done < <(scripts/list-expected-release-assets.sh "$VERSION")
|
||||
exit "$missing"
|
||||
|
||||
- name: Require a Passing Phone Check for a New Version
|
||||
run: |
|
||||
set -euo pipefail
|
||||
VERSION=$(python3 scripts/check-version.py --print-version)
|
||||
if git rev-parse "v$VERSION" >/dev/null 2>&1; then
|
||||
echo "v$VERSION is already tagged; no new version to check"
|
||||
exit 0
|
||||
fi
|
||||
python3 scripts/check-phone-check.py "$VERSION"
|
||||
|
||||
- name: Create and Push Tag If Version Is New
|
||||
id: tag_version
|
||||
env:
|
||||
@@ -932,6 +991,17 @@ jobs:
|
||||
arch="${arch%.rpm}"
|
||||
channels+=("--channel" "rpm-$arch=$rpm")
|
||||
done
|
||||
# Directly installed APKs update themselves from these channels;
|
||||
# the Google Play and F-Droid builds update through their stores.
|
||||
while IFS= read -r apk; do
|
||||
abi="$(basename "$apk" .apk)"
|
||||
abi="${abi#inbe-$VERSION}"
|
||||
case "$abi" in
|
||||
-gplay|-fdroid) continue ;;
|
||||
"") channels+=("--channel" "android=$apk") ;;
|
||||
*) channels+=("--channel" "android$abi=$apk") ;;
|
||||
esac
|
||||
done < <(find build/release -maxdepth 2 -name "inbe-$VERSION*.apk" | sort)
|
||||
if [ ${#channels[@]} -eq 0 ]; then
|
||||
echo "no release artifacts found for the appcast"
|
||||
exit 1
|
||||
|
||||
@@ -13,6 +13,25 @@
|
||||
The canonical macros are `APP_VERSION_STRING`, `APP_VERSION_MAJOR`,
|
||||
`APP_VERSION_MINOR`, and `APP_VERSION_PATCH`; do not create aliases.
|
||||
Only the GitHub Actions release workflow creates or pushes release tags.
|
||||
- A new version publishes only with a passing phone check of its exact
|
||||
sources: build the APK from the committed release, run
|
||||
`make phone-check APK=...` with the development Moto connected through the
|
||||
ThinkPad, and commit `releases/phone-checks/VERSION.json`. Changes to app
|
||||
sources after the check require a new one.
|
||||
- Packages declare the oldest host interface they run on (`host_api` per app
|
||||
in `apps/versions.json`); the host runs `oldest_host_api` to `host_api`.
|
||||
Raise `host_api` when the host interface changes and `oldest_host_api` only
|
||||
when it can no longer run older packages. `make package-compat-test` runs
|
||||
the node's packages in this build and new packages in the last release.
|
||||
- Goal (owner, 2026-10-11): every app updates through its own package
|
||||
without a new APK. Work toward it in small steps alongside requested work;
|
||||
discuss larger moves with the owner first. Put app screens, rules and text
|
||||
in `apps/<app>/`, not in the host under `src/`. Habits and Practices still
|
||||
draw compiled host screens (see [docs/cells.md](docs/cells.md)); when work
|
||||
touches one, prefer moving it into its package. Keep the host interface
|
||||
small and generic (storage, network, locale, platform effects), because
|
||||
each new host call needs an APK before a package can use it. Apps share
|
||||
data only through the host interface, never another app's internals.
|
||||
- Translate changed strings in every affected locale; no English placeholders.
|
||||
- `make locale-translated-test` fails on any locale string that still equals
|
||||
its English text. Translate it; add it to `tests/locale_same_as_english.txt`
|
||||
|
||||
@@ -1,4 +1,123 @@
|
||||
# Changelog
|
||||
## [2.1.32] - 2026-10-13
|
||||
### Added
|
||||
- Drag habits to reorder or deactivate them.
|
||||
- Habits get icons, schedules, times and daily questions.
|
||||
- Questions can compare with your average.
|
||||
- Apps asks before downloading app updates.
|
||||
### Changed
|
||||
- Habits is a table of the last seven days.
|
||||
### Fixed
|
||||
- Android: the floating practice window opens from Recents and shows results.
|
||||
- The donation reminder shows on one device only.
|
||||
- Held keys repeat in text fields.
|
||||
- The breathing count is readable; older habit entries edit again.
|
||||
|
||||
## [2.1.31] - 2026-10-11
|
||||
### Fixed
|
||||
- Android: after the floating practice window, the app fits the screen again instead of running under the status bar and navigation and losing its sides.
|
||||
|
||||
## [2.1.30] - 2026-10-11
|
||||
### Fixed
|
||||
- Long menus, such as the colour theme, scroll by touch and open at your choice.
|
||||
- With a menu open, tapping the navigation closes it and switches screens in one tap.
|
||||
- Menus stay above the navigation instead of hiding their last options behind it.
|
||||
- Web: the app is sharp on high-density screens instead of magnified and blurry.
|
||||
### Changed
|
||||
- Icons are sharper on the web.
|
||||
|
||||
## [2.1.29] - 2026-10-11
|
||||
### Fixed
|
||||
- Scrolling Lumi's commands keeps the keyboard open.
|
||||
- New habits show each colour choice in its own colour.
|
||||
- Leaving Wim Hof no longer freezes the app for a few seconds.
|
||||
- The app no longer freezes just after launch while it checks for app updates.
|
||||
### Changed
|
||||
- Scrollbars use your theme's colours and show how much is in view.
|
||||
- Apps rearranges to fill the window's width.
|
||||
|
||||
## [2.1.28] - 2026-10-10
|
||||
### Added
|
||||
- Connect a phone and a computer by QR code in Profile.
|
||||
- Leaderboard is its own app.
|
||||
- Profile > Data shows each sync node's storage.
|
||||
### Changed
|
||||
- Profile holds your account, data and Telegram; Settings holds device preferences.
|
||||
- Diary shows bold text as bold.
|
||||
- On desktop, a minimized practice opens in its own window.
|
||||
### Fixed
|
||||
- Linux: text uses Inner Breeze's fonts again.
|
||||
- Smoother minimized breathing count.
|
||||
- The desktop close prompt shows above Apps.
|
||||
|
||||
## [2.1.27] - 2026-10-10
|
||||
### Added
|
||||
- End a held breath from the minimized practice window with Breath or a double tap.
|
||||
- Lumi feedback includes the app version, device and system.
|
||||
### Fixed
|
||||
- Picture-in-picture opens when you leave Inbe during a practice and returns to it.
|
||||
- Lumi keeps answers that arrive during picture-in-picture.
|
||||
- Lumi says whether feedback reached the developer and keeps it to retry.
|
||||
- Feedback saved by older versions is now sent.
|
||||
- Fix a startup crash on 32-bit Android phones.
|
||||
|
||||
## [2.1.26] - 2026-10-09
|
||||
### Added
|
||||
- Detach a running practice into its own resizable desktop window.
|
||||
- Keep the practice visible over other Android apps with picture-in-picture, which you can turn off in Settings.
|
||||
### Changed
|
||||
- The minimized practice window is taller and shows the breath count, time left or phase.
|
||||
- Diary saves quietly, without a "Waiting to save" note.
|
||||
### Fixed
|
||||
- Show the keyboard in Diary on Android.
|
||||
- Keep the practice window over Apps.
|
||||
- Open Lumi without freezing the practice window.
|
||||
|
||||
## [2.1.25] - 2026-10-09
|
||||
### Changed
|
||||
- Minimized practices show their live circle or figure in a resizable window and return to the page you started them from.
|
||||
### Fixed
|
||||
- Stop syncing from pausing the breathing circle while you practice.
|
||||
- Keep breath sounds playing while a practice is minimized.
|
||||
- Animate the Wim Hof breathing circle smoothly, including its Customize preview.
|
||||
- Keep Wim Hof timing accurate when the frame rate varies.
|
||||
- Skip repeated account checks on unchanged animation frames.
|
||||
|
||||
## [2.1.24] - 2026-10-09
|
||||
### Fixed
|
||||
- Open the breathing animation, background music and other menus reliably again.
|
||||
- Use the In / Out breathing animation you choose in Wim Hof sessions.
|
||||
- Offer Test for your own imported music instead of "Audio not installed".
|
||||
- Keep the breathing circle smooth on phones signed in to an account.
|
||||
|
||||
## [2.1.23] - 2026-10-09
|
||||
### Added
|
||||
- Customize KSS in Appearance with live preview, per-app styles, an inspector, undo, and reset to defaults.
|
||||
- Ask Lumi to read, preview, and save appearance changes while preserving your existing customizations.
|
||||
### Fixed
|
||||
- Keep Telegram as input to Lumi without bot notifications; retain messages, replies and full history in Lumi.
|
||||
|
||||
|
||||
## [2.1.22] - 2026-10-08
|
||||
### Added
|
||||
- Minimize a running practice into a small window and keep using the app.
|
||||
### Fixed
|
||||
- Keep Diary opening with existing entries in the same account.
|
||||
- Keep practices and sound running in the background.
|
||||
- Support swipe typing and corrections from Android keyboards.
|
||||
- Stop repeated Lumi chat uploads.
|
||||
- Keep navigation visible on the practice home screen.
|
||||
- Open Lists, Diary and settings faster.
|
||||
- Lumi in Telegram replies in seconds and shows your tasks and habits.
|
||||
|
||||
## [2.1.21] - 2026-10-08
|
||||
### Changed
|
||||
- Clearly mark the selected app in navigation and Apps, including while hovering or pressing.
|
||||
### Fixed
|
||||
- Keep text sharp and stable throughout the zoom range.
|
||||
- Keep Appearance labels readable at large zoom by wrapping them above their controls.
|
||||
- Keep the selected navigation shortcut visible when changing apps or zooming on narrow screens.
|
||||
|
||||
## [2.1.20] - 2026-10-08
|
||||
### Changed
|
||||
- Keep Apps beside your desktop favorites without a large empty gap.
|
||||
|
||||
@@ -393,14 +393,22 @@ IMAGE_FILES += assets/app/icon-sky-cradle.png assets/app/icon-ink-and-air.png
|
||||
IMAGE_FILES += $(wildcard assets/social/*.png)
|
||||
IMAGE_FILES += $(wildcard assets/profile-pictures/*.png)
|
||||
IMAGE_FILES += $(KRYON_DIR)/icons/ui.png $(KRYON_DIR)/icons/pfp.png
|
||||
CELL_BUNDLES := $(addprefix $(BUILD_DIR)/cells/,lists.zib habits.zib practices.zib diary.zib lumi.zib)
|
||||
CELL_BUNDLES := $(addprefix $(BUILD_DIR)/cells/,lists.zib habits.zib practices.zib diary.zib lumi.zib leaderboard.zib)
|
||||
INBE_BUNDLE := $(BUILD_DIR)/inbe.zib
|
||||
INBE_FULL_BUNDLE := $(BUILD_DIR)/inbe-full.zib
|
||||
CELL_SOURCES := $(shell find apps src/cells -name '*.zi' | LC_ALL=C sort) src/core/types.zi src/core/breath_timing.zi $(wildcard src/practices/patterns/*rules.zi) src/practices/patterns/patterns_clock.zi src/practices/patterns/patterns_types.zi src/practices/sun_salutation/sun_salutation_rules.zi src/practices/meditation/meditation_timing.zi
|
||||
CELL_RESOURCES := $(shell rg --files assets/habits assets/lists assets/diary assets/lumi assets/mcp 2>/dev/null)
|
||||
WIDGET_SCHEMAS := $(addprefix $(KRYON_DIR)/src/ui/,session.zi geometry.zi drawing_props.zi text_props.zi image_props.zi button_props.zi control_props.zi text_input.zi text_input_props.zi scroll.zi scroll_props.zi semantic.zi text_align.zi checkbox_props.zi toggle_props.zi tab_bar_props.zi box_props.zi) $(addprefix src/cells/,diary_ui_types.zi inbe_ui_types.zi lists_ui_types.zi lumi_ui_types.zi lumi_types.zi)
|
||||
src/cells/widget_codec.zi: scripts/generate-widget-codecs.py $(WIDGET_SCHEMAS)
|
||||
python3 scripts/generate-widget-codecs.py
|
||||
# App records cross the bundle boundary with codecs generated by Kryon's
|
||||
# generator on top of Kryon's own widget codec.
|
||||
APP_CODEC_SCHEMAS := $(KRYON_DIR)/scripts/generate-widget-codecs.py $(KRYON_DIR)/src/backend/widget_codec.zi $(addprefix src/cells/,diary_ui_types.zi inbe_ui_types.zi lists_ui_types.zi lumi_ui_types.zi lumi_types.zi leaderboard_ui_types.zi)
|
||||
src/cells/app_codec.zi: scripts/generate-app-codec.py $(APP_CODEC_SCHEMAS)
|
||||
python3 scripts/generate-app-codec.py
|
||||
|
||||
.PHONY: app-codec-check
|
||||
app-codec-check:
|
||||
python3 scripts/generate-app-codec.py --check
|
||||
|
||||
test: app-codec-check
|
||||
|
||||
.PHONY: cells
|
||||
cells: $(CELL_BUNDLES) $(INBE_BUNDLE) $(INBE_FULL_BUNDLE)
|
||||
@@ -418,6 +426,16 @@ lumi-history-ui-test: $(TARGET)
|
||||
env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS \
|
||||
python3 tests/lumi_history_ui_test.py $(abspath $(TARGET))
|
||||
|
||||
.PHONY: session-window-ui-test
|
||||
session-window-ui-test: $(TARGET)
|
||||
env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS \
|
||||
python3 tests/session_window_ui_test.py $(abspath $(TARGET))
|
||||
|
||||
.PHONY: whm-frame-performance-test
|
||||
whm-frame-performance-test: $(TARGET)
|
||||
env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS \
|
||||
python3 tests/whm_frame_performance_test.py $(abspath $(TARGET))
|
||||
|
||||
$(CELL_BUNDLES) $(INBE_BUNDLE) $(INBE_FULL_BUNDLE) &: $(CELL_SOURCES) $(CELL_RESOURCES) ziran.lock apps/versions.json scripts/check-package-versions.py scripts/generate-package-versions.py scripts/prepare-package-assets.py scripts/animation_inventory.py scripts/build-cells.sh src/practices/sun_salutation/sun_salutation_assets.zi src/practices/sun_salutation/sun_salutation_inventory.zi $(IMAGE_FILES) $(SOUND_FILES) $(FONT_FILES) $(STYLE_FILES) $(LOCALE_FILES) $(ZIRAN_BIN)
|
||||
sh scripts/build-cells.sh $(ZIRAN_BIN)
|
||||
|
||||
@@ -496,7 +514,9 @@ KRYON_RAYLIB_AUDIO_PERIODS ?= 2
|
||||
endif
|
||||
KRYON_RAYLIB_AUDIO_PERIOD_CONFIG := $(if $(strip $(KRYON_RAYLIB_AUDIO_PERIOD_FRAMES)),-DAUDIO_DEVICE_PERIOD_SIZE_IN_FRAMES=$(KRYON_RAYLIB_AUDIO_PERIOD_FRAMES),)
|
||||
KRYON_RAYLIB_AUDIO_PERIODS_CONFIG := $(if $(strip $(KRYON_RAYLIB_AUDIO_PERIODS)),-DAUDIO_DEVICE_PERIODS=$(KRYON_RAYLIB_AUDIO_PERIODS),)
|
||||
APP_RAYLIB_CONFIG := $(filter-out -DSUPPORT_MODULE_RAUDIO=0 -DSUPPORT_FILEFORMAT_PNG=0 -DSUPPORT_FILEFORMAT_JPG=0 -DSUPPORT_FILEFORMAT_OGG=0 -DSUPPORT_FILEFORMAT_MP3=%,$(RAY_RAYLIB_CONFIG)) -DSUPPORT_MODULE_RAUDIO=1 -DSUPPORT_FILEFORMAT_JPG=1 -DSUPPORT_FILEFORMAT_OGG=1 -DSUPPORT_FILEFORMAT_MP3=0 $(KRYON_RAYLIB_AUDIO_PERIOD_CONFIG) $(KRYON_RAYLIB_AUDIO_PERIODS_CONFIG)
|
||||
# Inbe's fonts are TrueType and OpenType files, so every host keeps TTF
|
||||
# support; without it raylib draws its fallback pixel font.
|
||||
APP_RAYLIB_CONFIG := $(filter-out -DSUPPORT_MODULE_RAUDIO=0 -DSUPPORT_FILEFORMAT_PNG=0 -DSUPPORT_FILEFORMAT_JPG=0 -DSUPPORT_FILEFORMAT_OGG=0 -DSUPPORT_FILEFORMAT_MP3=% -DSUPPORT_FILEFORMAT_TTF=%,$(RAY_RAYLIB_CONFIG)) -DSUPPORT_MODULE_RAUDIO=1 -DSUPPORT_FILEFORMAT_JPG=1 -DSUPPORT_FILEFORMAT_OGG=1 -DSUPPORT_FILEFORMAT_MP3=0 -DSUPPORT_FILEFORMAT_TTF=1 $(KRYON_RAYLIB_AUDIO_PERIOD_CONFIG) $(KRYON_RAYLIB_AUDIO_PERIODS_CONFIG)
|
||||
COMMON_CFLAGS := -Wall -Wextra -Os -D_DEFAULT_SOURCE -D_GNU_SOURCE -ffunction-sections -fdata-sections -DSUPPORT_FILEFORMAT_JPG=1 -DUI_EMBEDDED_ONLY=1 -DNATIVE_WINDOW_HAVE_SDL -DKRYON_WITH_SYNC=1
|
||||
CFLAGS := $(COMMON_CFLAGS) -std=c99 $(RUNTIME_ASSET_CFLAGS) $(SYSTEM_THEME_CFLAGS) $(KRYON_NOTIFICATION_CPPFLAGS) $(KRYON_NOTIFICATION_CFLAGS)
|
||||
NATIVE_SYSTEM_LDLIBS := $(KRYON_NOTIFICATION_LDLIBS) -lz -lm -lpthread -latomic $(if $(filter linux,$(NATIVE_PLATFORM)),-ldl -lrt,) $(SYSTEM_THEME_LDLIBS)
|
||||
@@ -605,7 +625,7 @@ WEB_TARGET := $(WEB_DIST_DIR)/index.html
|
||||
WEB_APP_SCRIPT := <script>window.__inbeRenderer="canvas";window.__inbeLoadApp("index.js?v=$(WEB_CACHE_BUSTER)")</script>
|
||||
WEB_JS_TARGET := $(WEB_DIST_DIR)/index.js
|
||||
WEB_BOOT_JS := src/web_boot.js
|
||||
WEB_HOST_JS := src/web_host.js scripts/browser_network.js scripts/telegram_host.js
|
||||
WEB_HOST_JS := src/web_host.js scripts/telegram_host.js
|
||||
# Kryon's canvas hosts are Ziran modules on Ziran's web bridge; its runtime is the only JS they need.
|
||||
WEB_CANVAS_HOST_JS := $(ZIRAN_DIR)/web/ziran_web.js
|
||||
WEB_HOST_JS += $(WEB_CANVAS_HOST_JS)
|
||||
@@ -655,10 +675,10 @@ MEDITATION_AUDIO_TRACKS := \
|
||||
|
||||
include mk/package-freebsd.mk
|
||||
|
||||
.PHONY: web-canvas web-canvas-smoke-test web-compare-test web-side-by-side-test all native kryon-host install install-user uninstall stage package-freebsd deb package-deb deb-check rpm package-rpm rpm-check snap package-snap snap-cache-clean flatpak package-flatpak podman-check validate-desktop run tui run-tui run-termi run-termi-direct run-fresh screenshot test ci dist appimage click click-verify vendor-prebuilds vendor-prebuilds-native vendor-prebuilds-web vendor-prebuilds-windows font-subsets font-bundle-check clean clean-linux clean-native clean-vendor-builds windows-setup windows-setup-check android-avd android-audio-e2e android-check-keystore android-copy-assets android-copy-debug-apks android-copy-release-apks android-copy-bundle android-smoke android-local-properties android-debug android-release android-bundle android-install android-install-release android-clean android-rebuild validate-meditation-audio package-unpackaged-assets windows-runtime-assets-check windows windows64 web web-tools-check web-smoke-test web-smoke-test-firefox web-smoke-test-librewolf site site-release-assets-check chrome-web-store chrome-web-store-test firefox-addons firefox-addons-lint firefox-addons-source-zip verify-firefox-addons sync-web-icons social-install social-login social-draft social-x-draft social-post social-x-post social-x-post-dry-run social-post-dry-run
|
||||
.PHONY: web-canvas web-canvas-smoke-test web-compare-test web-side-by-side-test all native kryon-host install install-user uninstall stage package-freebsd deb package-deb deb-check rpm package-rpm rpm-check snap package-snap snap-cache-clean flatpak package-flatpak podman-check validate-desktop run tui run-tui run-termi run-termi-direct run-fresh screenshot test ci dist appimage click click-verify vendor-prebuilds vendor-prebuilds-native vendor-prebuilds-web vendor-prebuilds-windows font-subsets font-bundle-check clean clean-linux clean-native clean-vendor-builds windows-setup windows-setup-check android-avd android-audio-e2e android-check-keystore android-copy-assets android-copy-debug-apks android-copy-release-apks android-copy-fdroid-apk android-copy-bundle android-smoke android-local-properties android-debug android-release android-bundle android-install android-install-release android-clean android-rebuild validate-meditation-audio package-unpackaged-assets windows-runtime-assets-check windows windows64 web web-tools-check web-smoke-test web-smoke-test-firefox web-smoke-test-librewolf site site-release-assets-check chrome-web-store chrome-web-store-test firefox-addons firefox-addons-lint firefox-addons-source-zip verify-firefox-addons sync-web-icons social-install social-login social-draft social-x-draft social-post social-x-post social-x-post-dry-run social-post-dry-run
|
||||
.PHONY: zi-check
|
||||
.PHONY: clean-text-api-check package-check secret-check secret-check-history hooks-install test-tui-screenshot test-termi-screenshot test-termi-screenshot-direct
|
||||
.NOTPARALLEL: all native test ci zi-check dist windows windows64 android-release android-bundle click deb package-deb rpm package-rpm snap package-snap flatpak package-flatpak
|
||||
.NOTPARALLEL: all native test visual-test ci zi-check dist windows windows64 android-release android-bundle click deb package-deb rpm package-rpm snap package-snap flatpak package-flatpak
|
||||
|
||||
all: native
|
||||
|
||||
@@ -688,11 +708,6 @@ $(KRYON_LIBRARY_BUILD_DIR)/libkryon.a: $(KRYON_UI_ZI) $(KRYON_DIR)/src/ui/module
|
||||
ZIRAN_DIR=$(abspath $(ZIRAN_DIR)) ZIRAN_BUILD_DIR=$(ZIRAN_BUILD_DIR) \
|
||||
$(KRYON_LIBRARY_BUILD_DIR)/libkryon.a
|
||||
|
||||
.PHONY: uri-link-test
|
||||
uri-link-test: $(ZI2C_BIN)
|
||||
@env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u GDK_DISPLAY \
|
||||
python3 tests/uri_host_zi_test.py $(ZIRAN_BUILD_DIR)/bin
|
||||
|
||||
.PHONY: frame-activity-test
|
||||
frame-activity-test: $(ZI2C_BIN)
|
||||
@sh tests/frame_activity_zi_test.sh $(ZIRAN_BUILD_DIR)/bin
|
||||
@@ -716,6 +731,12 @@ break-rules-test: $(ZI2C_BIN)
|
||||
sun-salutation-test: $(ZI2C_BIN)
|
||||
@sh tests/sun_salutation_zi_test.sh $(ZIRAN_BUILD_DIR)/bin
|
||||
|
||||
.PHONY: habits-table-layout-test
|
||||
habits-table-layout-test: $(ZI2C_BIN)
|
||||
@sh tests/habits_table_layout_test.sh $(ZIRAN_BUILD_DIR)/bin
|
||||
|
||||
test: habits-table-layout-test
|
||||
|
||||
.PHONY: sun-salutation-assets-test
|
||||
sun-salutation-assets-test:
|
||||
python3 tests/sun_salutation_assets_test.py
|
||||
@@ -785,20 +806,6 @@ sync-retry-zi-test: build-laws $(ZI2C_BIN)
|
||||
|
||||
test: sync-retry-zi-test
|
||||
|
||||
.PHONY: sync-crypto-zi-test
|
||||
sync-crypto-zi-test: $(ZI2C_BIN)
|
||||
@env -u DISPLAY -u WAYLAND_DISPLAY \
|
||||
sh tests/sync_crypto_zi_test.sh $(ZIRAN_BUILD_DIR)/bin
|
||||
|
||||
test: sync-crypto-zi-test
|
||||
|
||||
.PHONY: sync-account-crypto-zi-test
|
||||
sync-account-crypto-zi-test: $(ZI2C_BIN) $(LIBOQS_A)
|
||||
@env -u DISPLAY -u WAYLAND_DISPLAY \
|
||||
sh tests/sync_account_crypto_zi_test.sh $(ZIRAN_BUILD_DIR)/bin $(LIBOQS_A)
|
||||
|
||||
test: sync-account-crypto-zi-test
|
||||
|
||||
# Exercise the packaged Ziran crypto API against the exact archive used by
|
||||
# Inbe, including ML-KEM round trips, tampering and short-buffer rejection.
|
||||
.PHONY: liboqs-crypto-test
|
||||
@@ -896,6 +903,8 @@ launcher-policy-test: $(ZI2C_BIN)
|
||||
launcher-ui-test: $(TARGET)
|
||||
env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS YUE_DESKTOP_RECOVERY=0 \
|
||||
python3 tests/launcher_ui_test.py $(abspath $(TARGET))
|
||||
env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS YUE_DESKTOP_RECOVERY=0 \
|
||||
python3 tests/launcher_ui_test.py $(abspath $(TARGET)) --dock-only
|
||||
|
||||
test: launcher-policy-test
|
||||
|
||||
@@ -907,15 +916,43 @@ native-screenshot-test: $(TARGET)
|
||||
native-navigation-test: $(TARGET)
|
||||
sh tests/native_navigation_test.sh $(abspath $(TARGET))
|
||||
|
||||
.PHONY: tab-switch-performance-test
|
||||
tab-switch-performance-test: $(TARGET)
|
||||
env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS YUE_DESKTOP_RECOVERY=0 \
|
||||
python3 tests/tab_switch_performance_test.py $(abspath $(TARGET)) desktop-rapid --rapid
|
||||
env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS YUE_DESKTOP_RECOVERY=0 \
|
||||
python3 tests/tab_switch_performance_test.py $(abspath $(TARGET)) mobile-rapid --mobile --rapid
|
||||
|
||||
.PHONY: music-navigation-test
|
||||
music-navigation-test: $(TARGET)
|
||||
@python3 tests/music_navigation_test.py '$(CC)' '$(NATIVE_COMPILE_FLAGS)' \
|
||||
'$(KRYON_LIBRARY_BUILD_DIR)/libkryon.a $(KRYON_NATIVE_BACKEND_LIBS) $(LIBOQS_A) $(KRYON_NATIVE_BACKEND_LDLIBS) $(RUNTIME_ASSET_LDLIBS) $(NATIVE_SYSTEM_LDLIBS) $(LDFLAGS)'
|
||||
'$(KRYON_LIBRARY_BUILD_DIR)/libkryon.a $(ZIRAN_BUILD_DIR)/libziran.a $(KRYON_NATIVE_BACKEND_LIBS) $(LIBOQS_A) $(KRYON_NATIVE_BACKEND_LDLIBS) $(RUNTIME_ASSET_LDLIBS) $(NATIVE_SYSTEM_LDLIBS) $(LDFLAGS)' \
|
||||
'$(NATIVE_OBJ_DIR)/objects.rsp'
|
||||
|
||||
.PHONY: native-zoom-test
|
||||
native-zoom-test: $(TARGET)
|
||||
sh tests/native_zoom_test.sh $(abspath $(TARGET))
|
||||
|
||||
.PHONY: native-visual-test visual-test
|
||||
native-visual-test: $(TARGET)
|
||||
env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS YUE_DESKTOP_RECOVERY=0 \
|
||||
python3 tests/native_visual_test.py $(abspath $(TARGET))
|
||||
|
||||
.PHONY: native-text-pixels-test
|
||||
native-text-pixels-test: $(TARGET)
|
||||
env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS YUE_DESKTOP_RECOVERY=0 \
|
||||
ZIRAN_ROOT=$(abspath $(ZIRAN_DIR)) ZIRAN_BIN=$(ZIRAN_BIN) \
|
||||
RAYLIB_A=$(abspath $(RAYLIB_A)) \
|
||||
KRYON_TEXT_TEST_OUTPUT=$(abspath $(BUILD_DIR)/native-text-pixels-test) \
|
||||
sh $(KRYON_DIR)/tests/raylib_text_pixels_test.sh
|
||||
|
||||
# Run every visual suite and retain a receipt even when an earlier suite fails.
|
||||
VISUAL_TEST_TARGETS := practice-images-ui-test leaderboard-ui-test native-screenshot-test native-text-pixels-test native-zoom-test native-visual-test launcher-ui-test settings-sidebar-ui-test startup-quit-ui-test locale-render-ui-test lumi-ui-test lumi-history-ui-test habits-table-ui-test habit-schedule-tool-test habit-tracking-tool-test lists-ui-test sync-review-ui-test data-back-ui-test
|
||||
visual-test: $(TARGET) $(INBE_FULL_BUNDLE)
|
||||
env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u GDK_DISPLAY \
|
||||
-u DBUS_SESSION_BUS_ADDRESS -u SESSION_MANAGER YUE_DESKTOP_RECOVERY=0 \
|
||||
python3 tests/visual_test.py $(abspath $(TARGET)) $(VISUAL_TEST_TARGETS)
|
||||
|
||||
.PHONY: settings-sidebar-ui-test
|
||||
settings-sidebar-ui-test: $(TARGET)
|
||||
env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS YUE_DESKTOP_RECOVERY=0 \
|
||||
@@ -958,6 +995,8 @@ $(KRY_GEN_STAMP): Makefile ziran.lock $(ZI2C_BIN) $(ZI_SRCS) $(KRYON_ZI_MODULES)
|
||||
--module-path $(KSS_DIR)/src --module-path oqs=$(OQS_DIR)/src --module-path kryon=$(KRYON_DIR)/src/ui --module-path kryon=$(KRYON_DIR)/src/backend \
|
||||
--module-path $(KRYON_DIR)/src/backend \
|
||||
--module-path $(GAME2D_DIR)/src \
|
||||
--module-path qrcode=build/packages/qrcode/src \
|
||||
--module-path plot=build/packages/plot/src \
|
||||
--module-path $(ZIRAN_DIR)/std \
|
||||
--module-path build/packages/daochi-client \
|
||||
-o $(KRY_GEN_DIR) $(ZI_SRCS)
|
||||
@@ -972,6 +1011,8 @@ $(WEB_GEN_STAMP): Makefile ziran.lock $(ZI2C_BIN) $(ZI_SRCS) $(KRYON_ZI_MODULES)
|
||||
--module-path $(KSS_DIR)/src --module-path oqs=$(OQS_DIR)/src --module-path kryon=$(KRYON_DIR)/src/ui --module-path kryon=$(KRYON_DIR)/src/backend \
|
||||
--module-path $(KRYON_DIR)/src/backend \
|
||||
--module-path $(GAME2D_DIR)/src \
|
||||
--module-path qrcode=build/packages/qrcode/src \
|
||||
--module-path plot=build/packages/plot/src \
|
||||
--module-path $(ZIRAN_DIR)/std \
|
||||
--module-path build/packages/daochi-client \
|
||||
-o $(WEB_GEN_DIR) $(ZI_SRCS) $(KRYON_DIR)/src/backend/canvas_raster.zi $(KRYON_DIR)/src/backend/canvas_audio.zi $(KRYON_DIR)/src/backend/page_route.zi
|
||||
@@ -991,6 +1032,8 @@ $(WINDOWS_GEN_STAMP): Makefile ziran.lock $(ZI2C_BIN) $(ZI_SRCS) $(KRYON_ZI_MODU
|
||||
--module-path $(KSS_DIR)/src --module-path oqs=$(OQS_DIR)/src --module-path kryon=$(KRYON_DIR)/src/ui --module-path kryon=$(KRYON_DIR)/src/backend \
|
||||
--module-path $(KRYON_DIR)/src/backend \
|
||||
--module-path $(GAME2D_DIR)/src \
|
||||
--module-path qrcode=build/packages/qrcode/src \
|
||||
--module-path plot=build/packages/plot/src \
|
||||
--module-path $(ZIRAN_DIR)/std \
|
||||
--module-path build/packages/daochi-client \
|
||||
-o $(WINDOWS_GEN_DIR) $(ZI_SRCS)
|
||||
@@ -1018,6 +1061,8 @@ zi-c-plan9: $(KRY_GEN_STAMP)
|
||||
--module-path $(KSS_DIR)/src --module-path oqs=$(OQS_DIR)/src --module-path kryon=$(KRYON_DIR)/src/ui --module-path kryon=$(KRYON_DIR)/src/backend \
|
||||
--module-path $(KRYON_DIR)/src/backend \
|
||||
--module-path $(GAME2D_DIR)/src \
|
||||
--module-path qrcode=build/packages/qrcode/src \
|
||||
--module-path plot=build/packages/plot/src \
|
||||
--module-path $(ZIRAN_DIR)/std \
|
||||
--include-dir build/packages/kryon/include --include-dir src \
|
||||
--include-dir $(KRY_GEN_DIR) --include-dir vendor-builds/sqlite \
|
||||
@@ -1143,6 +1188,28 @@ social-post-dry-run:
|
||||
screenshot: $(TARGET)
|
||||
./scripts/generate-screenshots.sh "$(TARGET)"
|
||||
|
||||
.PHONY: screenshot-verify screenshot-review screenshot-export screenshot-source-check play-preflight lumi-promo lumi-narration
|
||||
screenshot-source-check: $(ZI2C_BIN) | build-laws
|
||||
@ZI_CHECK_DEFINES="$(ZI_NATIVE_DEFINES)" python3 scripts/check-zi-sources.py $(ZI2ZIR_BIN) $(KRYON_DIR)/src/ui $(ZIRAN_DIR)/std $(KSS_DIR)/src
|
||||
|
||||
screenshot-verify:
|
||||
python3 scripts/screenshot-harness.py verify
|
||||
|
||||
screenshot-review:
|
||||
python3 scripts/screenshot-harness.py review --reviewer "$(REVIEWER)"
|
||||
|
||||
screenshot-export:
|
||||
python3 scripts/screenshot-harness.py export
|
||||
|
||||
play-preflight:
|
||||
python3 scripts/upload-play-screenshots.py --preflight-only
|
||||
|
||||
lumi-promo:
|
||||
python3 scripts/render-lumi-promo.py
|
||||
|
||||
lumi-narration:
|
||||
python3 scripts/generate-lumi-narration.py
|
||||
|
||||
test-tui-screenshot test-termi-screenshot:
|
||||
@$(MAKE) --no-print-directory KRYON_BACKEND=termi test-termi-screenshot-direct
|
||||
|
||||
@@ -1226,9 +1293,14 @@ hooks-install:
|
||||
embedded-image-assets-check: $(EMBEDDED_ASSETS_C)
|
||||
bash ./tests/embedded_image_assets_test.sh
|
||||
|
||||
.PHONY: habits-cards-ui-test
|
||||
habits-cards-ui-test: $(TARGET)
|
||||
bash tests/habits_cards_ui_test.sh "$(abspath $(TARGET))"
|
||||
# An icon from a Kryon sheet Inbe does not ship shows "Missing image".
|
||||
.PHONY: icon-sheets-check
|
||||
icon-sheets-check: $(PACKAGES_MK)
|
||||
python3 tests/icon_sheets_test.py $(KRYON_DIR)/src/ui/icon.zi
|
||||
|
||||
.PHONY: habits-table-ui-test
|
||||
habits-table-ui-test: $(TARGET)
|
||||
bash tests/habits_table_ui_test.sh "$(abspath $(TARGET))"
|
||||
|
||||
.PHONY: lists-ui-test
|
||||
lists-ui-test: $(TARGET)
|
||||
@@ -1239,7 +1311,7 @@ storage-literals-check:
|
||||
python3 tests/storage_literals_test.py
|
||||
bash ./scripts/check-storage-literals.sh
|
||||
|
||||
test: clean-text-api-check package-check secret-check storage-literals-check font-bundle-check audio-test-fixture-check embedded-image-assets-check
|
||||
test: clean-text-api-check package-check secret-check storage-literals-check font-bundle-check audio-test-fixture-check embedded-image-assets-check icon-sheets-check
|
||||
test: screenshot-scene-test
|
||||
|
||||
.PHONY: screenshot-scene-test
|
||||
@@ -1557,59 +1629,6 @@ android-text-input-zi-test: $(ZI2C_BIN)
|
||||
|
||||
test: android-text-input-zi-test
|
||||
|
||||
.PHONY: window-close-host-test
|
||||
window-close-host-test: $(ZI2C_BIN)
|
||||
@mkdir -p $(BUILD_DIR)/window-close-host-test/c
|
||||
@$(ZI2C_BIN) --define PLATFORM_DESKTOP \
|
||||
--define NATIVE_WINDOW_HAVE_SDL \
|
||||
--entry window_close_behavior:main --root tests \
|
||||
--module-path src -o $(BUILD_DIR)/window-close-host-test/c \
|
||||
tests/window_close_behavior.zi
|
||||
@$(CC) -std=c11 -O2 -I$(ZIRAN_DIR)/include \
|
||||
-iquote $(BUILD_DIR)/window-close-host-test/c \
|
||||
$(BUILD_DIR)/window-close-host-test/c/*.c \
|
||||
$(RAY_SDL_LDLIBS) -o $(BUILD_DIR)/window-close-host-test/test
|
||||
@env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u GDK_DISPLAY \
|
||||
$(BUILD_DIR)/window-close-host-test/test
|
||||
|
||||
test: window-close-host-test
|
||||
|
||||
.PHONY: activity-host-test
|
||||
activity-host-test: $(ZI2C_BIN)
|
||||
@env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u GDK_DISPLAY \
|
||||
DBUS_SESSION_BUS_ADDRESS=invalid: \
|
||||
sh tests/activity_host_zi_test.sh $(ZIRAN_BUILD_DIR)/bin
|
||||
|
||||
test: activity-host-test
|
||||
|
||||
.PHONY: audio-picker-host-test
|
||||
audio-picker-host-test: $(ZI2C_BIN)
|
||||
@mkdir -p $(BUILD_DIR)/audio-picker-host-test/c
|
||||
@cp tests/support/audio_picker_zenity.sh \
|
||||
$(BUILD_DIR)/audio-picker-host-test/zenity
|
||||
@chmod +x $(BUILD_DIR)/audio-picker-host-test/zenity
|
||||
@$(ZI2C_BIN) --no-main --define PLATFORM_DESKTOP --root src \
|
||||
--module-path $(ZIRAN_DIR)/std \
|
||||
-o $(BUILD_DIR)/audio-picker-host-test/c \
|
||||
src/platform/audio_picker_host.zi
|
||||
@$(CC) -std=c11 -D_DEFAULT_SOURCE -Wall -Wextra -Werror \
|
||||
-Wno-unused-function -I$(ZIRAN_DIR)/include \
|
||||
-iquote $(BUILD_DIR)/audio-picker-host-test/c \
|
||||
tests/audio_picker_host_test.c \
|
||||
$(BUILD_DIR)/audio-picker-host-test/c/*.c \
|
||||
$(BUILD_DIR)/audio-picker-host-test/c/platform/audio_picker_host.c \
|
||||
$(BUILD_DIR)/audio-picker-host-test/c/platform/file_picker.c \
|
||||
-o $(BUILD_DIR)/audio-picker-host-test/test
|
||||
@env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u GDK_DISPLAY \
|
||||
PATH="$(abspath $(BUILD_DIR)/audio-picker-host-test)" \
|
||||
$(abspath $(BUILD_DIR)/audio-picker-host-test/test)
|
||||
|
||||
.PHONY: file-picker-zi-test
|
||||
file-picker-zi-test: $(ZI2C_BIN)
|
||||
@sh tests/file_picker_zi_test.sh $(abspath $(dir $(ZI2C_BIN)))
|
||||
|
||||
test: audio-picker-host-test file-picker-zi-test
|
||||
|
||||
.PHONY: main-platform-zi-test
|
||||
main-platform-zi-test: $(ZI2C_BIN) $(RAYLIB_A)
|
||||
@RAY_LDLIBS='$(RAY_LDLIBS)' sh tests/main_platform_zi_test.sh \
|
||||
@@ -1638,17 +1657,12 @@ update-transport-zi-test: $(ZI2C_BIN)
|
||||
|
||||
test: plan9-host-zi-test android-jni-zi-test update-transport-zi-test
|
||||
|
||||
.PHONY: secondary-window-host-test
|
||||
secondary-window-host-test: $(ZI2C_BIN) $(RAYLIB_A)
|
||||
@sh tests/secondary_window_host_zi_test.sh \
|
||||
$(abspath $(dir $(ZI2C_BIN))) $(abspath $(RAYLIB_A))
|
||||
|
||||
.PHONY: raylib-log-host-test
|
||||
raylib-log-host-test: $(ZI2C_BIN) $(RAYLIB_A)
|
||||
@mkdir -p $(BUILD_DIR)/raylib-log-host-test/c
|
||||
@$(ZI2C_BIN) --define PLATFORM_DESKTOP \
|
||||
--entry raylib_log_behavior:main --root tests \
|
||||
--module-path src --module-path $(ZIRAN_DIR)/std \
|
||||
--module-path src --module-path $(KRYON_DIR)/src/backend --module-path $(ZIRAN_DIR)/std \
|
||||
-o $(BUILD_DIR)/raylib-log-host-test/c tests/raylib_log_behavior.zi
|
||||
@$(CC) -std=c11 -O2 -I$(ZIRAN_DIR)/include \
|
||||
-iquote $(BUILD_DIR)/raylib-log-host-test/c \
|
||||
@@ -1722,13 +1736,6 @@ android-import-zi-test: $(ZI2C_BIN)
|
||||
|
||||
test: android-import-zi-test
|
||||
|
||||
.PHONY: android-runtime-assets-zi-test
|
||||
android-runtime-assets-zi-test: $(ZI2C_BIN)
|
||||
@env -u DISPLAY -u WAYLAND_DISPLAY \
|
||||
sh tests/android_runtime_assets_zi_test.sh $(ZIRAN_BUILD_DIR)/bin
|
||||
|
||||
test: android-runtime-assets-zi-test
|
||||
|
||||
.PHONY: android-lifecycle-zi-test
|
||||
android-lifecycle-zi-test: $(ZI2C_BIN)
|
||||
@env -u DISPLAY -u WAYLAND_DISPLAY \
|
||||
@@ -1838,6 +1845,18 @@ style-apply-zi-test: $(ZI2C_BIN)
|
||||
|
||||
test: style-apply-zi-test
|
||||
|
||||
.PHONY: appearance-ui-test
|
||||
appearance-ui-test: $(TARGET) $(INBE_FULL_BUNDLE)
|
||||
sh tests/appearance_ui_test.sh $(abspath $(TARGET))
|
||||
|
||||
.PHONY: habit-schedule-tool-test
|
||||
habit-schedule-tool-test: $(TARGET) $(INBE_FULL_BUNDLE)
|
||||
sh tests/habit_schedule_tool_test.sh $(abspath $(TARGET))
|
||||
|
||||
.PHONY: habit-tracking-tool-test
|
||||
habit-tracking-tool-test: $(TARGET) $(INBE_FULL_BUNDLE)
|
||||
sh tests/habit_tracking_tool_test.sh $(abspath $(TARGET))
|
||||
|
||||
.PHONY: audio-settings-test
|
||||
audio-settings-test: $(ZI2C_BIN)
|
||||
@env -u DISPLAY -u WAYLAND_DISPLAY \
|
||||
@@ -1880,6 +1899,16 @@ sync-safety-test: $(ZI2C_BIN)
|
||||
|
||||
test: sync-safety-test
|
||||
|
||||
.PHONY: account-activity-test
|
||||
account-activity-test: $(ZIRAN_BIN) $(LIBOQS_A)
|
||||
@sh tests/account_activity_zi_test.sh $(ZIRAN_BIN) $(LIBOQS_A)
|
||||
|
||||
test: account-activity-test
|
||||
|
||||
.PHONY: account-activity-ui-test
|
||||
account-activity-ui-test: $(TARGET) $(INBE_FULL_BUNDLE) account-activity-test
|
||||
sh tests/account_activity_ui_test.sh $(abspath $(TARGET))
|
||||
|
||||
.PHONY: sync-status-policy-test
|
||||
sync-status-policy-test: $(ZI2C_BIN)
|
||||
@env -u DISPLAY -u WAYLAND_DISPLAY \
|
||||
@@ -2617,6 +2646,16 @@ android-copy-release-apks: | $(ANDROID_BUILD_DIR)
|
||||
fi; \
|
||||
cp "$$gplay_universal" "$(ANDROID_BUILD_DIR)/$(APP_NAME)-$(APP_VERSION)-gplay.apk"
|
||||
|
||||
# F-Droid rebuilds this universal APK with -PfDroidBuild and copies its
|
||||
# signature, so run after a signed assembleRelease -PfDroidBuild=true.
|
||||
android-copy-fdroid-apk: | $(ANDROID_BUILD_DIR)
|
||||
@fdroid_universal="$$(find droid/app/build/outputs/apk -path '*/release/*' -name "app-universal-release*.apk" | head -n 1)"; \
|
||||
if [ -z "$$fdroid_universal" ] || [ ! -f "$$fdroid_universal" ]; then \
|
||||
echo "No universal F-Droid APK was produced"; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
cp "$$fdroid_universal" "$(ANDROID_BUILD_DIR)/$(APP_NAME)-$(APP_VERSION)-fdroid.apk"
|
||||
|
||||
android-copy-bundle: | $(ANDROID_BUILD_DIR)
|
||||
bash scripts/check-android-optimization.sh droid/app/build/outputs/bundle/gplay/app-gplay.aab
|
||||
@found=0; \
|
||||
@@ -2930,7 +2969,7 @@ test: sync-recovery-test
|
||||
|
||||
# Validate before producing release packages, including direct artifact targets.
|
||||
$(APPIMAGE_TARGET) $(DEB_TARGET) $(RPM_TARGET) $(SNAP_TARGET) $(FLATPAK_TARGET) $(CLICK_TARGET) $(CHROME_WEB_STORE_ZIP) $(FIREFOX_ADDONS_ZIP): | version-check
|
||||
android-release android-bundle android-copy-release-apks android-copy-bundle windows-setup site: version-check
|
||||
android-release android-bundle android-copy-release-apks android-copy-fdroid-apk android-copy-bundle windows-setup site: version-check
|
||||
|
||||
# Actual artifacts are gated too, including direct and incremental builds.
|
||||
$(TARGET) $(KRYON_HOST_TARGET) $(WIN64_TARGET) $(WEB_JS_TARGET) $(WEB_CANVAS_TARGET): $(SYNC_RETRY_SOURCE) | build-laws
|
||||
@@ -2991,12 +3030,40 @@ app-click-block-zi-test: $(ZI2C_BIN)
|
||||
data-back-ui-test: $(TARGET)
|
||||
@sh tests/data_back_ui_test.sh $(abspath $(TARGET))
|
||||
|
||||
.PHONY: leaderboard-ui-test
|
||||
leaderboard-ui-test: $(TARGET)
|
||||
@sh tests/leaderboard_ui_test.sh $(abspath $(TARGET))
|
||||
|
||||
# Missing practice pictures fail the visual gate in CI and releases.
|
||||
.PHONY: practice-images-ui-test
|
||||
practice-images-ui-test: $(TARGET)
|
||||
@sh tests/practice_images_ui_test.sh $(abspath $(TARGET))
|
||||
|
||||
test: app-click-block-zi-test
|
||||
|
||||
.PHONY: package-release-test
|
||||
package-release-test: cells $(ZIRAN_BUILD_DIR)/libziran.a
|
||||
python3 tests/package_release_test.py
|
||||
|
||||
# This build runs the packages the node serves, and the last released app runs
|
||||
# each new package that declares a host interface it has.
|
||||
.PHONY: package-compat-test
|
||||
package-compat-test: $(TARGET) $(CELL_BUNDLES) $(INBE_BUNDLE)
|
||||
python3 tests/package_compat_test.py $(abspath $(TARGET))
|
||||
|
||||
.PHONY: phone-check-gate-test
|
||||
phone-check-gate-test:
|
||||
python3 tests/phone_check_gate_test.py
|
||||
|
||||
test: phone-check-gate-test
|
||||
|
||||
# Check an exact APK on the development Moto and record the release receipt:
|
||||
# make phone-check APK=path/to/inbe.apk
|
||||
.PHONY: phone-check
|
||||
phone-check:
|
||||
@test -n "$(APK)" || { echo "Set APK=path/to/inbe.apk"; exit 1; }
|
||||
python3 scripts/phone-check.py "$(APK)" --record
|
||||
|
||||
test: package-release-test
|
||||
|
||||
.PHONY: app-preferences-sync-test
|
||||
@@ -3016,6 +3083,12 @@ package-version-test:
|
||||
|
||||
test: package-version-test
|
||||
|
||||
.PHONY: play-screenshots-test
|
||||
play-screenshots-test:
|
||||
python3 tests/play_screenshots_test.py
|
||||
|
||||
test: play-screenshots-test
|
||||
|
||||
.PHONY: package-workflow-test
|
||||
package-workflow-test:
|
||||
python3 tests/package_workflow_test.py
|
||||
@@ -3044,7 +3117,7 @@ device-key-wasm-test: $(ZI2C_BIN)
|
||||
test: device-key-test
|
||||
web-smoke-test web-canvas-smoke-test: device-key-wasm-test
|
||||
|
||||
.PHONY: telegram-authorization-test telegram-bridge-test telegram-host-test telegram-entry-protocol-test telegram-account-flow-test telegram-account-ui-test settings-telegram-ui-test lumi-authorization-test delegate-account-test delegate-secret-cleanup-test storage-delegate-test lumi-delegate-scope-test
|
||||
.PHONY: telegram-authorization-test telegram-bridge-test telegram-host-test telegram-entry-protocol-test telegram-account-flow-test telegram-account-ui-test settings-telegram-ui-test lumi-authorization-test delegate-account-test storage-delegate-test lumi-delegate-scope-test
|
||||
|
||||
telegram-bridge-test:
|
||||
@sh tests/telegram_bridge_test.sh
|
||||
@@ -3052,6 +3125,12 @@ telegram-bridge-test:
|
||||
telegram-host-test:
|
||||
@sh tests/telegram_host_test.sh
|
||||
|
||||
.PHONY: lumi-telegram-input-test
|
||||
lumi-telegram-input-test: $(ZIRAN_BIN) $(LIBOQS_A) | build-laws
|
||||
@sh tests/lumi_telegram_input_zi_test.sh $(ZIRAN_BIN) $(LIBOQS_A)
|
||||
|
||||
test: lumi-telegram-input-test
|
||||
|
||||
telegram-entry-protocol-test: $(ZIRAN_BIN) $(LIBOQS_A)
|
||||
@sh tests/telegram_entry_protocol_zi_test.sh $(ZIRAN_BIN) $(LIBOQS_A)
|
||||
|
||||
@@ -3070,15 +3149,43 @@ lumi-authorization-test: $(ZIRAN_BIN) $(LIBOQS_A)
|
||||
delegate-account-test: $(ZIRAN_BIN) $(LIBOQS_A)
|
||||
@sh tests/delegate_account_zi_test.sh $(ZIRAN_BIN) $(LIBOQS_A)
|
||||
|
||||
delegate-secret-cleanup-test: $(ZIRAN_BIN) $(LIBOQS_A)
|
||||
@sh tests/delegate_secret_cleanup_zi_test.sh $(ZIRAN_BIN) $(LIBOQS_A)
|
||||
|
||||
storage-delegate-test: $(ZIRAN_BIN) $(LIBOQS_A)
|
||||
@sh tests/storage_delegate_zi_test.sh $(ZIRAN_BIN) $(LIBOQS_A)
|
||||
|
||||
lumi-delegate-scope-test: $(ZIRAN_BIN) $(LIBOQS_A)
|
||||
@sh tests/lumi_delegate_scope_zi_test.sh $(ZIRAN_BIN) $(LIBOQS_A)
|
||||
|
||||
telegram-authorization-test: telegram-bridge-test telegram-host-test telegram-entry-protocol-test telegram-account-flow-test telegram-account-ui-test settings-telegram-ui-test lumi-authorization-test delegate-account-test delegate-secret-cleanup-test storage-delegate-test lumi-delegate-scope-test
|
||||
telegram-authorization-test: telegram-bridge-test telegram-host-test telegram-entry-protocol-test telegram-account-flow-test telegram-account-ui-test settings-telegram-ui-test lumi-authorization-test delegate-account-test storage-delegate-test lumi-delegate-scope-test
|
||||
|
||||
test: telegram-authorization-test
|
||||
|
||||
.PHONY: android-geometry-probe-test
|
||||
android-geometry-probe-test:
|
||||
@env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY -u DBUS_SESSION_BUS_ADDRESS sh tests/android_geometry_probe_test.sh
|
||||
|
||||
test: android-geometry-probe-test
|
||||
|
||||
.PHONY: lumi-feedback-delivery-test
|
||||
lumi-feedback-delivery-test: $(ZIRAN_BIN) $(LIBOQS_A) | build-laws
|
||||
@sh tests/lumi_feedback_delivery_test.sh $(ZIRAN_BIN) $(LIBOQS_A)
|
||||
|
||||
test: lumi-feedback-delivery-test
|
||||
|
||||
.PHONY: diary-spelling-test diary-history-test
|
||||
diary-spelling-test: $(ZIRAN_BIN) $(LIBOQS_A) | build-laws
|
||||
@sh tests/diary_spelling_test.sh $(ZIRAN_BIN) $(LIBOQS_A)
|
||||
|
||||
diary-history-test: $(ZI2C_BIN)
|
||||
@sh tests/diary_history_zi_test.sh $(ZIRAN_BUILD_DIR)/bin
|
||||
|
||||
test: diary-spelling-test diary-history-test
|
||||
|
||||
# Lumi reports name the device, system and version (no identifiers).
|
||||
.PHONY: device-info-test
|
||||
device-info-test: $(ZIRAN_BIN)
|
||||
@env -u DISPLAY -u WAYLAND_DISPLAY -u XAUTHORITY $(ZIRAN_BIN) build --target=c --define PLATFORM_DESKTOP --root tests \
|
||||
--module-path src --module-path build/packages/ziran/std --entry device_info_behavior:Main --exe \
|
||||
-o build/device-info-test tests/device_info_behavior.zi
|
||||
@build/device-info-test/device_info_behavior
|
||||
|
||||
test: device-info-test
|
||||
@@ -17,6 +17,10 @@ Inner Breeze is a free, open-source practice app for breathing, meditation, and
|
||||
habit tracking. It works offline, stores data locally in SQLite, and can
|
||||
optionally sync user-owned data through a Daochi-compatible sync server.
|
||||
|
||||
[Account activity](docs/ACCOUNT_ACTIVITY.md) explains persistent Telegram linking,
|
||||
reopening an authorized installation, and seeing and controlling the running
|
||||
practice from another device connected to the same account.
|
||||
|
||||
## Features
|
||||
|
||||
- Lumi, a local firefly companion with private chat, habit completion, practice starts, and optional todo tools
|
||||
@@ -35,11 +39,7 @@ separate proof tool is needed. The build host needs Python 3 and the platform's
|
||||
native build dependencies. See [build laws](docs/build-laws-plan.md) for the
|
||||
checked behavior.
|
||||
|
||||
Initialize the submodules once:
|
||||
|
||||
```bash
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
Build commands fetch the dependencies pinned in `ziran.lock`.
|
||||
|
||||
Build and run the desktop app:
|
||||
|
||||
@@ -71,10 +71,81 @@ make site
|
||||
|
||||
Run the test suite:
|
||||
|
||||
[Custom appearance](docs/appearance.md) describes live KSS editing, per-app
|
||||
customizations, reset, and Lumi's appearance tools.
|
||||
|
||||
```bash
|
||||
make test
|
||||
make visual-test
|
||||
```
|
||||
|
||||
CI and releases require the visual gate. It uses disposable profiles and
|
||||
private Xvfb displays to check glyph pixels, every zoom from 50% to 250%,
|
||||
selected navigation and app cards in all 13 palettes and both color modes,
|
||||
enlarged Appearance labels, shipped locales, and page interactions. It keeps
|
||||
screenshots and logs under `build/`; CI uploads them even when a check fails.
|
||||
Every visual suite runs even if an earlier suite fails. The complete result,
|
||||
including hashes of the tested binary and bundles, is in
|
||||
`build/visual-test/results.json`; changing an artifact during the gate fails it.
|
||||
Its system tools are listed in `.github/apt/test-packages.txt`.
|
||||
|
||||
Store captures cover Apps, Lumi, Practices, Habits, Lists, Diary, Appearance,
|
||||
and supporting pages in phone, 7-inch tablet, 10-inch tablet, and Chromebook
|
||||
layouts. Capture runs use disposable profiles on private Xvfb displays and
|
||||
check viewport sizes, nonblank rendering, and expected screen text. They do
|
||||
not copy images into the store listing until visual review is recorded:
|
||||
|
||||
```bash
|
||||
make native cells PACKAGE_FLAGS=--locked
|
||||
make screenshot
|
||||
# Inspect build/screenshots/review-*.jpg and the full-size PNGs.
|
||||
make screenshot-review REVIEWER="your name"
|
||||
make screenshot-export
|
||||
make play-preflight
|
||||
python3 scripts/upload-play-screenshots.py
|
||||
```
|
||||
|
||||
The scene list in `scripts/screenshot-scenes.json` selects eight store images
|
||||
per phone/tablet type while retaining all 64 captures for review. Changing
|
||||
source, scene definitions, Kryon, binaries, bundles, or screenshot bytes
|
||||
invalidates publishing preflight. A historical capture can still be visually
|
||||
reviewed and used for a review video; Play requires a fresh capture of the
|
||||
current locked build. Local Kryon preview builds cannot pass Play preflight.
|
||||
Preflight checks every dependency against its locked commit and runs a fresh
|
||||
source check, so reused incremental preview outputs cannot hide missing imports.
|
||||
Keep credentials in the ignored `.env.play` using `.env.play.example`.
|
||||
The uploader defaults to validating and discarding its remote edit. After
|
||||
review, `PLAY_COMMIT=1 python3 scripts/upload-play-screenshots.py` validates
|
||||
and commits the listing; a failed edit is discarded. This updates listing
|
||||
assets only. App releases follow the numeric changelog, `update_version.sh`,
|
||||
and the existing release workflow, which builds and publishes the signed
|
||||
Google Play AAB and owns release tags. A local build or commit is not a Play
|
||||
deployment.
|
||||
|
||||
`make lumi-promo` renders a narrated portrait review MP4 from the exact
|
||||
reviewed phone captures and the generated artwork in `design/lumi-promo/`.
|
||||
Lumi uses eight generated wing-flapping frames, flies to each screen and settles
|
||||
facing the app while a narrator explains it. Lumi turns with the flight direction
|
||||
and flips inward after arriving on the right. Wings flap continuously using
|
||||
distinct poses; each app screen stays in a fixed position without sliding in.
|
||||
The audio contains speech only, without music or sound effects. Scene timings
|
||||
expand to fit the complete spoken lines.
|
||||
`make lumi-narration` generates the stored narrator clips through OpenRouter
|
||||
using a locally configured `OPENROUTER_API_KEY`; unchanged clips are reused.
|
||||
The voice, script and provider options are in `design/lumi-promo/narration.json`.
|
||||
The chat example runs real local theme actions; the surrounding forest and
|
||||
glow are marketing effects. Inspect `build/lumi-promo/storyboard.jpg` and
|
||||
`build/lumi-promo/inner-breeze-lumi-review.mp4` before using it publicly.
|
||||
Google Play's preview video field takes a YouTube URL, so the MP4 needs an
|
||||
approved public or unlisted YouTube upload with embedding enabled before it can
|
||||
be added to the listing. Pass `--video-url https://www.youtube.com/watch?v=VIDEO_ID`
|
||||
to the listing uploader, or configure `PLAY_VIDEO_URL`. To update only the
|
||||
video, use `PLAY_COMMIT=1 python3 scripts/upload-play-screenshots.py --video-only --video-url URL`.
|
||||
The approved [Lumi preview](https://www.youtube.com/watch?v=XESpbMRaz4o) is
|
||||
available on YouTube and configured in the English Google Play listing.
|
||||
Screenshot publishing still requires the complete current
|
||||
capture, visual review, export and locked build preflight.
|
||||
|
||||
To test sync and recovery against an isolated local server:
|
||||
|
||||
```bash
|
||||
|
||||
@@ -1,5 +1,43 @@
|
||||
# Changelog
|
||||
|
||||
## [1.1.9] - 2026-10-11
|
||||
|
||||
### Changed
|
||||
- Scrollbars use your theme's colours and show how much of the page is in view.
|
||||
|
||||
## [1.1.8] - 2026-10-10
|
||||
|
||||
### Added
|
||||
- Correct the spelling of an entry with one button. Inner Breeze sends the entry to the Waozi node, which returns it with only misspelled words corrected. It uses the same daily online allowance as Lumi.
|
||||
- Undo and redo buttons, so a correction or any other change can be taken back.
|
||||
|
||||
### Changed
|
||||
- A title bar shows the date in the middle, between the previous and next day. Today and the calendar sit together on the left, and the entry's tools are compact buttons on the right, leaving more room for writing.
|
||||
- The entry reaches the bottom of the screen; a notice takes room below it only while it is shown.
|
||||
|
||||
## [1.1.7] - 2026-10-10
|
||||
|
||||
### Changed
|
||||
- When a photo is not on this device, for example because your sync node does not store photos, the entry shows where the photo is instead of an empty space.
|
||||
|
||||
## [1.1.6] - 2026-10-10
|
||||
|
||||
### Changed
|
||||
- Show **bold** text as bold. The ** marks appear only on the line you are editing, so you can still change them.
|
||||
|
||||
## [1.1.5] - 2026-10-10
|
||||
### Changed
|
||||
- Save your writing quietly, without a "Waiting to save…" note below the entry.
|
||||
|
||||
## [1.1.4] - 2026-10-08
|
||||
|
||||
- Keep date limits working when Diary updates on existing Inbe installations.
|
||||
|
||||
## [1.1.3] - 2026-10-08
|
||||
|
||||
- Keep the journal on today or earlier dates and show an empty editor without a writing prompt.
|
||||
- Open the same account-synced Diary from Inner Breeze and Harmony, preserving earlier entries and photos.
|
||||
|
||||
## [1.1.2] - 2026-10-07
|
||||
|
||||
- Keep app labels and content visible after updating Inner Breeze.
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
// File effects belong to the host; this bundle has no OS or database access.
|
||||
#import "json_scan"
|
||||
#import, file "diary_view.zi";
|
||||
#import, file "diary_date.zi";
|
||||
#import "text"
|
||||
#import "vec"
|
||||
#import "byte_text_linux"
|
||||
@@ -16,114 +17,6 @@ ReadDiaryFileHost :: (name: string) -> DiaryFileResult #foreign host_api;
|
||||
SaveDiaryFileHost :: (name: string, data: string) -> bool #foreign host_api;
|
||||
DiaryClockHost :: () -> string #foreign host_api;
|
||||
|
||||
Date :: struct {
|
||||
year: s32;
|
||||
month: s32;
|
||||
day: s32;
|
||||
}
|
||||
|
||||
Leap :: (year: s32) -> bool {
|
||||
return year % 4 == 0 && (year % 100 != 0 || year % 400 == 0)
|
||||
}
|
||||
|
||||
Days :: (year: s32, month: s32) -> s32 {
|
||||
lengths: [12]s32 = .[31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
|
||||
if month < 1 || month > 12 {
|
||||
return 0
|
||||
}
|
||||
if month == 2 && Leap(year) {
|
||||
return 29
|
||||
}
|
||||
return lengths[month - 1]
|
||||
}
|
||||
|
||||
Valid :: (date: Date) -> bool {
|
||||
return date.year >= 1 && date.year <= 9999 && date.month >= 1 &&
|
||||
date.month <= 12 && date.day >= 1 && date.day <= Days(date.year, date.month)
|
||||
}
|
||||
|
||||
Next :: (date: Date, delta: s32) -> Date {
|
||||
value := date
|
||||
if delta > 0 {
|
||||
value.day += 1
|
||||
if value.day > Days(value.year, value.month) {
|
||||
value.day = 1
|
||||
value.month += 1
|
||||
if value.month > 12 {
|
||||
value.month = 1;
|
||||
value.year += 1
|
||||
}
|
||||
}
|
||||
}
|
||||
if delta < 0 {
|
||||
value.day -= 1
|
||||
if value.day < 1 {
|
||||
value.month -= 1
|
||||
if value.month < 1 {
|
||||
value.month = 12;
|
||||
value.year -= 1
|
||||
}
|
||||
value.day = Days(value.year, value.month)
|
||||
}
|
||||
}
|
||||
return ifx Valid(value) then value else date
|
||||
}
|
||||
|
||||
Weekday :: (date: Date) -> s32 {
|
||||
year := date.year
|
||||
if date.month < 3 {
|
||||
year -= 1
|
||||
}
|
||||
offsets: [12]s32 = .[0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4]
|
||||
return (year + year / 4 - year / 100 + year / 400 +
|
||||
offsets[date.month - 1] + date.day + 6) % 7
|
||||
}
|
||||
|
||||
ISO :: (date: Date) -> string {
|
||||
bytes: [10]u8
|
||||
values: [3]s32 = .[date.year, date.month, date.day]
|
||||
starts: [3]s32 = .[0, 5, 8]
|
||||
lengths: [3]s32 = .[4, 2, 2]
|
||||
bytes[4] = cast(u8)45
|
||||
bytes[7] = cast(u8)45
|
||||
for index: cast(s32)0..cast(s32)2 {
|
||||
number := values[index]
|
||||
for digit: cast(s32)0..lengths[index] - 1 {
|
||||
bytes[starts[index] + lengths[index] - digit - 1] = cast(u8)(48 + number % 10)
|
||||
number /= 10
|
||||
}
|
||||
}
|
||||
out: Vec(u8)
|
||||
BuilderPrint(*out, "%", TextFromBytes(bytes[:]))
|
||||
return BuilderFinish(out)
|
||||
}
|
||||
|
||||
ParseDate :: (value: string) -> Date {
|
||||
date: Date
|
||||
if value.count != 10 || value[4] != cast(u8)45 || value[7] != cast(u8)45 {
|
||||
return date
|
||||
}
|
||||
for index: cast(s32)0..cast(s32)9 {
|
||||
if index == 4 || index == 7 {
|
||||
continue
|
||||
}
|
||||
if value[index] < cast(u8)48 || value[index] > cast(u8)57 {
|
||||
return Date.{}
|
||||
}
|
||||
number := cast(s32)value[index] - 48
|
||||
if index < 4 {
|
||||
date.year = date.year * 10 + number
|
||||
}
|
||||
else if index < 7 {
|
||||
date.month = date.month * 10 + number
|
||||
}
|
||||
else {
|
||||
date.day = date.day * 10 + number
|
||||
}
|
||||
}
|
||||
return ifx Valid(date) then date else Date.{}
|
||||
}
|
||||
|
||||
Today :: () -> Date {
|
||||
clock := DiaryClockHost()
|
||||
if clock.count < 10 {
|
||||
@@ -240,7 +133,8 @@ PhotoSelection :: (message: DiaryMessage) -> DiaryMessage {
|
||||
}
|
||||
|
||||
PhotoChange :: (message: DiaryMessage, remove: bool) -> DiaryMessage {
|
||||
if message.load_error || (!remove && !SafePhoto(message.attachment_file)) {
|
||||
if !OnOrBefore(Date.{message.year, message.month, message.day}, Today()) ||
|
||||
message.load_error || (!remove && !SafePhoto(message.attachment_file)) {
|
||||
message.succeeded = false
|
||||
return message
|
||||
}
|
||||
@@ -283,7 +177,7 @@ PhotoChange :: (message: DiaryMessage, remove: bool) -> DiaryMessage {
|
||||
}
|
||||
|
||||
Load :: (message: DiaryMessage, date: Date) -> DiaryMessage {
|
||||
if !Valid(date) {
|
||||
if !OnOrBefore(date, Today()) {
|
||||
message.succeeded = false;
|
||||
return message
|
||||
}
|
||||
@@ -330,7 +224,7 @@ Load :: (message: DiaryMessage, date: Date) -> DiaryMessage {
|
||||
}
|
||||
|
||||
Save :: (message: DiaryMessage) -> DiaryMessage {
|
||||
if message.load_error {
|
||||
if message.load_error || !OnOrBefore(Date.{message.year, message.month, message.day}, Today()) {
|
||||
message.succeeded = false;
|
||||
return message
|
||||
}
|
||||
@@ -364,7 +258,8 @@ Apply :: (message: DiaryMessage) -> DiaryMessage {
|
||||
return PhotoChange(message, false)
|
||||
}
|
||||
if message.action == DIARY_EDIT {
|
||||
if message.load_error || message.edit_start < 0 ||
|
||||
if !OnOrBefore(Date.{message.year, message.month, message.day}, Today()) ||
|
||||
message.load_error || message.edit_start < 0 ||
|
||||
message.edit_end < message.edit_start || message.edit_end > message.text.count {
|
||||
message.succeeded = false
|
||||
return message
|
||||
@@ -426,7 +321,7 @@ Apply :: (message: DiaryMessage) -> DiaryMessage {
|
||||
message.month_number = 1;
|
||||
message.month_year += 1
|
||||
}
|
||||
if message.month_year < 1 || message.month_year > 9999 {
|
||||
if !OnOrBefore(Date.{message.month_year, message.month_number, 1}, Today()) {
|
||||
message.month_year = previous_year
|
||||
message.month_number = previous_month
|
||||
message.succeeded = false;
|
||||
@@ -434,10 +329,6 @@ Apply :: (message: DiaryMessage) -> DiaryMessage {
|
||||
}
|
||||
} else {
|
||||
before := message
|
||||
message = Save(message)
|
||||
if !message.saved && !message.load_error {
|
||||
return message
|
||||
}
|
||||
date := Date.{before.year, before.month, before.day}
|
||||
if message.control == 29001 {
|
||||
date = Next(date, -1)
|
||||
@@ -454,6 +345,14 @@ Apply :: (message: DiaryMessage) -> DiaryMessage {
|
||||
message.succeeded = false;
|
||||
return message
|
||||
}
|
||||
if !OnOrBefore(date, Today()) {
|
||||
message.succeeded = false
|
||||
return message
|
||||
}
|
||||
message = Save(message)
|
||||
if !message.saved && !message.load_error {
|
||||
return message
|
||||
}
|
||||
message = Load(message, date)
|
||||
message.calendar = false
|
||||
}
|
||||
@@ -490,7 +389,7 @@ Main :: () -> s32 {
|
||||
}
|
||||
if message.action == DIARY_FRAME {
|
||||
message.succeeded = true
|
||||
message = DiaryView(message, DiaryObserve())
|
||||
message = DiaryView(message, DiaryObserve(), Today())
|
||||
if message.action != DIARY_FRAME {
|
||||
message = Apply(message)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
#import "text"
|
||||
#import "vec"
|
||||
#import "byte_text_linux"
|
||||
|
||||
Date :: struct {
|
||||
year: s32;
|
||||
month: s32;
|
||||
day: s32;
|
||||
}
|
||||
|
||||
Leap :: (year: s32) -> bool {
|
||||
return year % 4 == 0 && (year % 100 != 0 || year % 400 == 0)
|
||||
}
|
||||
|
||||
Days :: (year: s32, month: s32) -> s32 {
|
||||
lengths: [12]s32 = .[31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
|
||||
if month < 1 || month > 12 {
|
||||
return 0
|
||||
}
|
||||
if month == 2 && Leap(year) {
|
||||
return 29
|
||||
}
|
||||
return lengths[month - 1]
|
||||
}
|
||||
|
||||
Valid :: (date: Date) -> bool {
|
||||
return date.year >= 1 && date.year <= 9999 && date.month >= 1 &&
|
||||
date.month <= 12 && date.day >= 1 && date.day <= Days(date.year, date.month)
|
||||
}
|
||||
|
||||
Next :: (date: Date, delta: s32) -> Date {
|
||||
value := date
|
||||
if delta > 0 {
|
||||
value.day += 1
|
||||
if value.day > Days(value.year, value.month) {
|
||||
value.day = 1
|
||||
value.month += 1
|
||||
if value.month > 12 {
|
||||
value.month = 1;
|
||||
value.year += 1
|
||||
}
|
||||
}
|
||||
}
|
||||
if delta < 0 {
|
||||
value.day -= 1
|
||||
if value.day < 1 {
|
||||
value.month -= 1
|
||||
if value.month < 1 {
|
||||
value.month = 12;
|
||||
value.year -= 1
|
||||
}
|
||||
value.day = Days(value.year, value.month)
|
||||
}
|
||||
}
|
||||
return ifx Valid(value) then value else date
|
||||
}
|
||||
|
||||
Weekday :: (date: Date) -> s32 {
|
||||
year := date.year
|
||||
if date.month < 3 {
|
||||
year -= 1
|
||||
}
|
||||
offsets: [12]s32 = .[0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4]
|
||||
return (year + year / 4 - year / 100 + year / 400 +
|
||||
offsets[date.month - 1] + date.day + 6) % 7
|
||||
}
|
||||
|
||||
ISO :: (date: Date) -> string {
|
||||
bytes: [10]u8
|
||||
values: [3]s32 = .[date.year, date.month, date.day]
|
||||
starts: [3]s32 = .[0, 5, 8]
|
||||
lengths: [3]s32 = .[4, 2, 2]
|
||||
bytes[4] = cast(u8)45
|
||||
bytes[7] = cast(u8)45
|
||||
for index: cast(s32)0..cast(s32)2 {
|
||||
number := values[index]
|
||||
for digit: cast(s32)0..lengths[index] - 1 {
|
||||
bytes[starts[index] + lengths[index] - digit - 1] = cast(u8)(48 + number % 10)
|
||||
number /= 10
|
||||
}
|
||||
}
|
||||
out: Vec(u8)
|
||||
BuilderPrint(*out, "%", TextFromBytes(bytes[:]))
|
||||
return BuilderFinish(out)
|
||||
}
|
||||
|
||||
ParseDate :: (value: string) -> Date {
|
||||
date: Date
|
||||
if value.count != 10 || value[4] != cast(u8)45 || value[7] != cast(u8)45 {
|
||||
return date
|
||||
}
|
||||
for index: cast(s32)0..cast(s32)9 {
|
||||
if index == 4 || index == 7 {
|
||||
continue
|
||||
}
|
||||
if value[index] < cast(u8)48 || value[index] > cast(u8)57 {
|
||||
return Date.{}
|
||||
}
|
||||
number := cast(s32)value[index] - 48
|
||||
if index < 4 {
|
||||
date.year = date.year * 10 + number
|
||||
}
|
||||
else if index < 7 {
|
||||
date.month = date.month * 10 + number
|
||||
}
|
||||
else {
|
||||
date.day = date.day * 10 + number
|
||||
}
|
||||
}
|
||||
return ifx Valid(date) then date else Date.{}
|
||||
}
|
||||
|
||||
OnOrBefore :: (date: Date, limit: Date) -> bool {
|
||||
if !Valid(date) || !Valid(limit) {
|
||||
return false
|
||||
}
|
||||
if date.year != limit.year {
|
||||
return date.year < limit.year
|
||||
}
|
||||
if date.month != limit.month {
|
||||
return date.month < limit.month
|
||||
}
|
||||
return date.day <= limit.day
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
#import "geometry"
|
||||
#import, file "diary_date.zi";
|
||||
#import "image_props"
|
||||
#import "image_widget"
|
||||
#import "layout"
|
||||
@@ -9,6 +10,10 @@
|
||||
#import "button_props"
|
||||
#import "button_widget"
|
||||
#import "control_props"
|
||||
#import "drawing_props"
|
||||
#import "box_props"
|
||||
#import "box_widget"
|
||||
#import "text_align"
|
||||
#import "text"
|
||||
#import "vec"
|
||||
#import "byte_text_linux"
|
||||
@@ -19,6 +24,8 @@
|
||||
#import, file "../../src/cells/diary_ui_types.zi";
|
||||
|
||||
using ImageFit;
|
||||
using TextAlign;
|
||||
using TextWrap;
|
||||
using ButtonTone;
|
||||
using ButtonEmphasis;
|
||||
host_api :: #system_library "host_api";
|
||||
@@ -29,6 +36,15 @@ state: DiaryMessage;
|
||||
frame: DiaryUiFrame;
|
||||
pending: bool;
|
||||
|
||||
DIARY_PREVIOUS_ICON :: "S1.8rr:M15 5L8 12L15 19"
|
||||
DIARY_NEXT_ICON :: "S1.8rr:M9 5L16 12L9 19"
|
||||
DIARY_CALENDAR_ICON :: "S1.6rr:M4 5H20V20H4ZM4 10H20M8 3V7M16 3V7"
|
||||
DIARY_TIME_ICON :: "S1.6rr:M21 12C21 16.97 16.97 21 12 21C7.03 21 3 16.97 3 12C3 7.03 7.03 3 12 3C16.97 3 21 7.03 21 12ZM12 7V12L15.5 14"
|
||||
DIARY_PHOTO_ICON :: "S1.6rr:M3 5H21V19H3ZM3 16L8 11L13 16L16 13L21 18M17.5 8.5C17.5 9.33 16.83 10 16 10C15.17 10 14.5 9.33 14.5 8.5C14.5 7.67 15.17 7 16 7C16.83 7 17.5 7.67 17.5 8.5Z"
|
||||
DIARY_UNDO_ICON :: "S1.8rr:M9 14L4 9L9 4M4 9H14C17.31 9 20 11.69 20 15C20 18.31 17.31 21 14 21H11"
|
||||
DIARY_REDO_ICON :: "S1.8rr:M15 14L20 9L15 4M20 9H10C6.69 9 4 11.69 4 15C4 18.31 6.69 21 10 21H13"
|
||||
DIARY_SPELLING_ICON :: "S2rr:M3 14L7.5 3L12 14M4.8 10H10.2M12 17L15.5 20.5L21.5 13"
|
||||
|
||||
DiaryObserve :: () -> DiaryUiFrame {
|
||||
return ReadDiaryUiHost()
|
||||
}
|
||||
@@ -37,25 +53,89 @@ DiarySaveDue :: () -> bool {
|
||||
return frame.now >= frame.save_at
|
||||
}
|
||||
|
||||
// Markdown bold reads as bold text. Its ** markers stay in the entry but are
|
||||
// hidden, except on the lines holding the caret or a selection, where they
|
||||
// can be edited directly.
|
||||
DIARY_EMPHASIS_MAX :: 256
|
||||
emphasis_hidden: [DIARY_EMPHASIS_MAX * 2]TextRange;
|
||||
emphasis_strong: [DIARY_EMPHASIS_MAX]TextRange;
|
||||
emphasis_hidden_count: s32;
|
||||
emphasis_strong_count: s32;
|
||||
|
||||
DiaryEmphasis :: (value: string, cursor: s32, anchor: s32, editing: bool) {
|
||||
emphasis_hidden_count = 0
|
||||
emphasis_strong_count = 0
|
||||
first := ifx cursor < anchor then cursor else anchor
|
||||
last := ifx cursor < anchor then anchor else cursor
|
||||
line: s32 = 0
|
||||
while line <= cast(s32)value.count && emphasis_strong_count < DIARY_EMPHASIS_MAX {
|
||||
end := line
|
||||
while end < cast(s32)value.count && value[end] != cast(u8)10 { end += 1 }
|
||||
active := editing && last >= line && first <= end
|
||||
at := line
|
||||
while at + 1 < end && emphasis_strong_count < DIARY_EMPHASIS_MAX {
|
||||
if value[at] != cast(u8)42 || value[at + 1] != cast(u8)42 {
|
||||
at += 1
|
||||
continue
|
||||
}
|
||||
close := at + 2
|
||||
while close + 1 < end && (value[close] != cast(u8)42 || value[close + 1] != cast(u8)42) {
|
||||
close += 1
|
||||
}
|
||||
if close + 1 >= end {
|
||||
break
|
||||
}
|
||||
if close > at + 2 {
|
||||
emphasis_strong[emphasis_strong_count] = TextRange.{.start = at + 2, .end = close}
|
||||
emphasis_strong_count += 1
|
||||
if !active {
|
||||
emphasis_hidden[emphasis_hidden_count] = TextRange.{.start = at, .end = at + 2}
|
||||
emphasis_hidden[emphasis_hidden_count + 1] = TextRange.{.start = close, .end = close + 2}
|
||||
emphasis_hidden_count += 2
|
||||
}
|
||||
}
|
||||
at = close + 2
|
||||
}
|
||||
line = end + 1
|
||||
}
|
||||
}
|
||||
|
||||
DateTitle :: (year: s32, month: s32, day: s32) -> string {
|
||||
bytes: [10]u8
|
||||
numbers: [3]s32 = .[year, month, day]
|
||||
positions: [3]s32 = .[0, 5, 8]
|
||||
lengths: [3]s32 = .[4, 2, 2]
|
||||
bytes[4] = cast(u8)45
|
||||
bytes[7] = cast(u8)45
|
||||
for index: cast(s32)0..cast(s32)2 {
|
||||
number := numbers[index]
|
||||
for digit: cast(s32)0..lengths[index] - 1 {
|
||||
bytes[positions[index] + lengths[index] - digit - 1] = cast(u8)(48 + number % 10)
|
||||
number /= 10
|
||||
if month < 1 || month > 12 { return "" }
|
||||
keys: [12]string = .["habit_month_1", "habit_month_2", "habit_month_3",
|
||||
"habit_month_4", "habit_month_5", "habit_month_6", "habit_month_7",
|
||||
"habit_month_8", "habit_month_9", "habit_month_10", "habit_month_11", "habit_month_12"]
|
||||
month_text := DiaryLocaleHost(keys[month - 1])
|
||||
title: Vec(u8)
|
||||
eastern := month_text.count >= 2 && month_text[:2] == "%d"
|
||||
if day > 0 && !eastern { BuilderPrint(*title, "% ", day) }
|
||||
index: s64 = 0
|
||||
while index < month_text.count {
|
||||
if index + 1 < month_text.count && month_text[index:index + 2] == "%d" {
|
||||
BuilderPrint(*title, "%", year)
|
||||
index += 2
|
||||
} else {
|
||||
BuilderPrint(*title, "%", month_text[index:index + 1])
|
||||
index += 1
|
||||
}
|
||||
}
|
||||
title: Vec(u8)
|
||||
BuilderPrint(*title, "%", TextFromBytes(bytes[:ifx day == 0 then 7 else 10]))
|
||||
if day > 0 && eastern {
|
||||
BuilderPrint(*title, "%", day)
|
||||
suffix := ifx month_text[month_text.count - 3:] == "월" then "일" else "日"
|
||||
BuilderPrint(*title, "%", suffix)
|
||||
}
|
||||
return BuilderFinish(title)
|
||||
}
|
||||
|
||||
HasWords :: (text: string) -> bool {
|
||||
for byte: text {
|
||||
if byte != cast(u8)32 && byte != cast(u8)10 && byte != cast(u8)13 && byte != cast(u8)9 {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Scale :: (value: s32) -> s32 {
|
||||
return cast(s32)(cast(float32)value * frame.scale)
|
||||
}
|
||||
@@ -65,45 +145,110 @@ FinishView :: () -> DiaryMessage {
|
||||
return state
|
||||
}
|
||||
|
||||
DiaryAction :: ( id: s32, label: string, bounds: Rectangle) {
|
||||
// A button with an icon shows only the icon; its label names it for
|
||||
// accessibility.
|
||||
DiaryAction :: ( id: s32, label: string, bounds: Rectangle, enabled: bool = true,
|
||||
icon: string = "", selected: bool = false, loading: bool = false) {
|
||||
if Button(frame.session, ButtonProps.{.id = id, .bounds = bounds,
|
||||
.label = label, .tone = cast(ButtonTone)ButtonToneNeutral,
|
||||
.emphasis = cast(ButtonEmphasis)ButtonEmphasisSoft}) != 0 {
|
||||
.label = label, .disabled = !enabled, .selected = selected, .loading = loading,
|
||||
.icon_shape = icon, .icon_only = icon != "", .fit_content = true,
|
||||
.tone = cast(ButtonTone)ButtonToneNeutral,
|
||||
.emphasis = cast(ButtonEmphasis)(ifx icon != "" then ButtonEmphasisGhost else ButtonEmphasisSoft)}) != 0 {
|
||||
// Photos, undo, redo and spelling are host effects.
|
||||
frame.focused = false
|
||||
if id == 29005 {
|
||||
frame.photo_requested = true
|
||||
frame.focused = false
|
||||
return
|
||||
}
|
||||
if id == 29014 {
|
||||
frame.undo_requested = true
|
||||
return
|
||||
}
|
||||
if id == 29015 {
|
||||
frame.redo_requested = true
|
||||
return
|
||||
}
|
||||
if id == 29016 {
|
||||
frame.spelling_requested = true
|
||||
return
|
||||
}
|
||||
state.action = DIARY_CONTROL
|
||||
state.control = id
|
||||
pending = true
|
||||
frame.scroll = 0
|
||||
frame.focused = false
|
||||
}
|
||||
}
|
||||
|
||||
DiaryView :: (message: DiaryMessage, observed: DiaryUiFrame) -> DiaryMessage {
|
||||
DiaryView :: (message: DiaryMessage, observed: DiaryUiFrame, today: Date) -> DiaryMessage {
|
||||
state = message
|
||||
frame = observed
|
||||
column := CenteredColumnFor(frame.width, Scale(640), Scale(16))
|
||||
left := cast(float32)column.x
|
||||
width := cast(float32)column.width
|
||||
Text(frame.session, TextProps.{.bounds = Rectangle.{left, cast(float32)Scale(24),
|
||||
width, cast(float32)Scale(40)}, .text = DateTitle(state.year, state.month, state.day), .font = frame.font})
|
||||
part := (width - cast(float32)Scale(12)) / 3.0
|
||||
compact := frame.height < Scale(480)
|
||||
top := cast(float32)(ifx compact then Scale(44) else Scale(76))
|
||||
DiaryAction(29001, "‹", Rectangle.{left, top, part, cast(float32)Scale(44)})
|
||||
DiaryAction(29004, DiaryLocaleHost("diary_today"), Rectangle.{left + part + cast(float32)Scale(6),
|
||||
top, part, cast(float32)Scale(44)})
|
||||
DiaryAction(29002, "›", Rectangle.{left + 2.0 * (part + cast(float32)Scale(6)),
|
||||
top, part, cast(float32)Scale(44)})
|
||||
top := cast(float32)(ifx compact then Scale(4) else Scale(12))
|
||||
control := cast(float32)Scale(44)
|
||||
gap := cast(float32)Scale(8)
|
||||
|
||||
// Title bar: the selected date, centered between the previous and next day.
|
||||
DiaryAction(29001, "‹", Rectangle.{left, top, control, control}, true, DIARY_PREVIOUS_ICON)
|
||||
DiaryAction(29002, "›", Rectangle.{left + width - control, top, control, control},
|
||||
OnOrBefore(Next(Date.{state.year, state.month, state.day}, 1), today) &&
|
||||
!OnOrBefore(today, Date.{state.year, state.month, state.day}),
|
||||
DIARY_NEXT_ICON)
|
||||
title := DateTitle(state.year, state.month, state.day)
|
||||
title_strong: [1]TextRange = .[TextRange.{.start = 0, .end = cast(s32)title.count}]
|
||||
Text(frame.session, TextProps.{.bounds = Rectangle.{left + control + gap, top,
|
||||
width - 2.0 * (control + gap), control}, .text = title,
|
||||
.font = frame.font + Scale(4), .strong = title_strong[:],
|
||||
.align = cast(TextAlign)TextAlignCenter, .vertical_align = cast(TextAlign)TextAlignCenter,
|
||||
.wrap = cast(TextWrap)TextWrapNone})
|
||||
|
||||
// Tools: Today and the calendar move between days; undo, redo, spelling,
|
||||
// the time and photos change the entry. Today narrows on phones so every
|
||||
// icon keeps its target.
|
||||
tools := top + control + gap
|
||||
tool_gap := cast(float32)Scale(4)
|
||||
tool := control
|
||||
today_width := width - 6.0 * tool - 5.0 * tool_gap - gap
|
||||
if today_width < cast(float32)Scale(64) {
|
||||
// The narrowest phones keep Today readable with smaller icon targets.
|
||||
today_width = cast(float32)Scale(64)
|
||||
tool = (width - today_width - gap - 5.0 * tool_gap) / 6.0
|
||||
}
|
||||
if today_width > cast(float32)Scale(128) {
|
||||
today_width = cast(float32)Scale(128)
|
||||
}
|
||||
DiaryAction(29004, DiaryLocaleHost("diary_today"), Rectangle.{left, tools, today_width, control})
|
||||
DiaryAction(29003, DiaryLocaleHost("tab_diary_calendar"),
|
||||
Rectangle.{left, top + cast(float32)Scale(52), width, cast(float32)Scale(44)})
|
||||
Rectangle.{left + today_width + gap, tools, tool, control},
|
||||
true, DIARY_CALENDAR_ICON, state.calendar)
|
||||
editable := !state.load_error && state.year > 0
|
||||
if !state.calendar {
|
||||
idle := editable && !frame.spelling_busy
|
||||
DiaryAction(29014, DiaryLocaleHost("diary_undo"),
|
||||
Rectangle.{left + width - 5.0 * tool - 4.0 * tool_gap, tools, tool, control},
|
||||
idle && frame.can_undo, DIARY_UNDO_ICON)
|
||||
DiaryAction(29015, DiaryLocaleHost("diary_redo"),
|
||||
Rectangle.{left + width - 4.0 * tool - 3.0 * tool_gap, tools, tool, control},
|
||||
idle && frame.can_redo, DIARY_REDO_ICON)
|
||||
DiaryAction(29016, DiaryLocaleHost("diary_check_spelling"),
|
||||
Rectangle.{left + width - 3.0 * tool - 2.0 * tool_gap, tools, tool, control},
|
||||
idle && HasWords(state.text), DIARY_SPELLING_ICON, false, frame.spelling_busy)
|
||||
DiaryAction(29013, DiaryLocaleHost("diary_insert_time"),
|
||||
Rectangle.{left + width - 2.0 * tool - tool_gap, tools, tool, control},
|
||||
!frame.spelling_busy, DIARY_TIME_ICON)
|
||||
DiaryAction(29005, DiaryLocaleHost("diary_attach_photo"),
|
||||
Rectangle.{left + width - tool, tools, tool, control},
|
||||
true, DIARY_PHOTO_ICON)
|
||||
}
|
||||
content := tools + control + cast(float32)Scale(12)
|
||||
content_height := cast(float32)(frame.height - frame.bottom) - content - cast(float32)Scale(16)
|
||||
|
||||
if state.calendar {
|
||||
scroll := Scroll(frame.session, ScrollProps.{.key = cast(u64)290300,
|
||||
.bounds = Rectangle.{left, top + cast(float32)Scale(104), width,
|
||||
cast(float32)(frame.height - frame.bottom - Scale(200))},
|
||||
.bounds = Rectangle.{left, content, width, content_height},
|
||||
.content_height = Scale(344), .scroll_offset = frame.calendar_scroll})
|
||||
frame.calendar_scroll = scroll.scroll_offset
|
||||
if !scroll.opened {
|
||||
@@ -112,7 +257,9 @@ DiaryView :: (message: DiaryMessage, observed: DiaryUiFrame) -> DiaryMessage {
|
||||
origin := scroll.content.y
|
||||
DiaryAction(29011, "‹", Rectangle.{left, origin, part, cast(float32)Scale(44)})
|
||||
DiaryAction(29012, "›", Rectangle.{left + 2.0 * (part + cast(float32)Scale(6)),
|
||||
origin, part, cast(float32)Scale(44)})
|
||||
origin, part, cast(float32)Scale(44)},
|
||||
state.month_year < today.year ||
|
||||
(state.month_year == today.year && state.month_number < today.month))
|
||||
Text(frame.session, TextProps.{.bounds = Rectangle.{left + part,
|
||||
origin + cast(float32)Scale(8), part, cast(float32)Scale(32)},
|
||||
.text = DateTitle(state.month_year, state.month_number, 0), .font = frame.font})
|
||||
@@ -133,36 +280,33 @@ DiaryView :: (message: DiaryMessage, observed: DiaryUiFrame) -> DiaryMessage {
|
||||
DiaryAction(29100 + day, day_title,
|
||||
Rectangle.{left + cast(float32)(position % 7) * cell,
|
||||
origin + cast(float32)Scale(80 + (position / 7) * 44), cell - 2.0,
|
||||
cast(float32)Scale(42)})
|
||||
cast(float32)Scale(42)},
|
||||
OnOrBefore(Date.{state.month_year, state.month_number, day}, today))
|
||||
}
|
||||
End(frame.session)
|
||||
return FinishView()
|
||||
}
|
||||
editor_height := frame.height - frame.bottom - cast(s32)top - Scale(236)
|
||||
// The editor reaches the bottom; a notice takes room below it only while
|
||||
// it is shown.
|
||||
notice := frame.photo_error || state.load_error || frame.spelling_notice != ""
|
||||
notice_room := ifx notice then Scale(60) else 0
|
||||
editor_height := cast(s32)content_height - notice_room
|
||||
if editor_height < Scale(120) {
|
||||
editor_height = Scale(120)
|
||||
}
|
||||
page := Scroll(frame.session, ScrollProps.{.key = cast(u64)290301,
|
||||
.bounds = Rectangle.{left, top + cast(float32)Scale(104), width,
|
||||
cast(float32)(frame.height - frame.bottom - cast(s32)top - Scale(120))},
|
||||
.content_height = editor_height + Scale(104) +
|
||||
(ifx state.photo_count > 0 then Scale(380) else 0), .scroll_offset = frame.page_scroll})
|
||||
.bounds = Rectangle.{left, content, width, content_height},
|
||||
.content_height = editor_height + notice_room +
|
||||
(ifx state.photo_count > 0 then Scale(392) else 0), .scroll_offset = frame.page_scroll})
|
||||
frame.page_scroll = page.scroll_offset
|
||||
if !page.opened {
|
||||
return FinishView()
|
||||
}
|
||||
DiaryAction(29013, DiaryLocaleHost("diary_insert_time"),
|
||||
Rectangle.{left, page.content.y, (width - cast(float32)Scale(8)) / 2.0, cast(float32)Scale(44)})
|
||||
DiaryAction(29005, DiaryLocaleHost("diary_attach_photo"),
|
||||
Rectangle.{left + (width + cast(float32)Scale(8)) / 2.0, page.content.y,
|
||||
(width - cast(float32)Scale(8)) / 2.0, cast(float32)Scale(44)})
|
||||
area: TextAreaProps
|
||||
area.key = cast(u64)290200
|
||||
area.focus_id = 29020
|
||||
area.bounds = Rectangle.{left, page.content.y + cast(float32)Scale(56), width,
|
||||
cast(float32)editor_height}
|
||||
area.bounds = Rectangle.{left, page.content.y, width, cast(float32)editor_height}
|
||||
area.value = state.text
|
||||
area.placeholder = DiaryLocaleHost("diary_placeholder")
|
||||
area.label = DiaryLocaleHost("tab_diary")
|
||||
area.wrap = true
|
||||
area.cursor = state.cursor
|
||||
@@ -170,10 +314,15 @@ DiaryView :: (message: DiaryMessage, observed: DiaryUiFrame) -> DiaryMessage {
|
||||
area.scroll_y = frame.scroll
|
||||
area.focused = frame.focused
|
||||
area.selecting = frame.selecting
|
||||
area.read_only = state.load_error || state.year < 1
|
||||
// The entry waits while its spelling is checked, so the correction
|
||||
// always applies to the text that was sent.
|
||||
area.read_only = !editable || frame.spelling_busy
|
||||
area.max_bytes = 2147483646
|
||||
area.max_codepoints = 2147483646
|
||||
area.input = frame.input
|
||||
DiaryEmphasis(state.text, state.cursor, state.anchor, frame.focused && !area.read_only)
|
||||
area.hidden = emphasis_hidden[:emphasis_hidden_count]
|
||||
area.strong = emphasis_strong[:emphasis_strong_count]
|
||||
edited := TextArea(frame.session, area)
|
||||
state.cursor = edited.cursor
|
||||
state.anchor = edited.anchor
|
||||
@@ -193,19 +342,41 @@ DiaryView :: (message: DiaryMessage, observed: DiaryUiFrame) -> DiaryMessage {
|
||||
frame.clipboard_text = edited.clipboard_text
|
||||
}
|
||||
|
||||
status := ifx frame.photo_error then "diary_photo_error" else ifx state.load_error then "diary_read_error" else ifx state.saved then "diary_saved" else "diary_save_pending"
|
||||
Text(frame.session, TextProps.{.bounds = Rectangle.{left,
|
||||
area.bounds.y + area.bounds.height + cast(float32)Scale(12), width, cast(float32)Scale(40)},
|
||||
.text = DiaryLocaleHost(status), .font = frame.font})
|
||||
if notice {
|
||||
status := frame.spelling_notice
|
||||
if state.load_error {
|
||||
status = "diary_read_error"
|
||||
}
|
||||
if frame.photo_error {
|
||||
status = "diary_photo_error"
|
||||
}
|
||||
Text(frame.session, TextProps.{.bounds = Rectangle.{left,
|
||||
area.bounds.y + area.bounds.height + cast(float32)Scale(12), width, cast(float32)Scale(40)},
|
||||
.text = DiaryLocaleHost(status), .font = frame.font})
|
||||
}
|
||||
if state.photo_count > 0 {
|
||||
photo_top := area.bounds.y + area.bounds.height + cast(float32)Scale(60)
|
||||
path: Vec(u8)
|
||||
BuilderPrint(*path, "diary/photos/%.%", state.photo_file, frame.photo_format)
|
||||
image := BuilderFinish(path)
|
||||
Image(frame.session, ImageProps.{.asset_path = image,
|
||||
.alt_text = state.photo_name,
|
||||
.bounds = Rectangle.{left, photo_top, width, cast(float32)Scale(240)},
|
||||
.fit = cast(ImageFit)ImageFitContain})
|
||||
photo_top := area.bounds.y + area.bounds.height + cast(float32)(notice_room + Scale(12))
|
||||
photo_bounds := Rectangle.{left, photo_top, width, cast(float32)Scale(240)}
|
||||
if frame.photo_format.count > 0 {
|
||||
path: Vec(u8)
|
||||
BuilderPrint(*path, "diary/photos/%.%", state.photo_file, frame.photo_format)
|
||||
image := BuilderFinish(path)
|
||||
Image(frame.session, ImageProps.{.asset_path = image,
|
||||
.alt_text = state.photo_name,
|
||||
.bounds = photo_bounds,
|
||||
.fit = cast(ImageFit)ImageFitContain})
|
||||
} else {
|
||||
// The entry names a photo whose bytes are not on this device, for
|
||||
// example when a sync node keeps photos off. The entry still works.
|
||||
Box(frame.session, BoxProps.{.key = cast(u64)29011, .bounds = photo_bounds,
|
||||
.fill = Color.{156, 156, 156, 36}, .radius = cast(float32)Scale(12)})
|
||||
Text(frame.session, TextProps.{.key = cast(u64)29012,
|
||||
.text = DiaryLocaleHost("diary_photo_unavailable"),
|
||||
.bounds = Rectangle.{left + cast(float32)Scale(16), photo_top,
|
||||
width - cast(float32)Scale(32), cast(float32)Scale(240)},
|
||||
.font = frame.font, .align = cast(TextAlign)TextAlignCenter,
|
||||
.vertical_align = cast(TextAlign)TextAlignCenter})
|
||||
}
|
||||
Text(frame.session, TextProps.{.text = state.photo_name,
|
||||
.bounds = Rectangle.{left, photo_top + cast(float32)Scale(248), width,
|
||||
cast(float32)Scale(32)}, .font = frame.font})
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
## [1.0.4] - 2026-10-10
|
||||
|
||||
- Requires Inner Breeze 2.1.28 or later.
|
||||
|
||||
## [1.0.3] - 2026-10-07
|
||||
|
||||
- Keep app labels and content visible after updating Inner Breeze.
|
||||
|
||||
@@ -31,14 +31,22 @@ HabitsApply :: (message: HabitsMessage) -> HabitsMessage {
|
||||
return message
|
||||
}
|
||||
if message.action == HABITS_DAY_ACTION {
|
||||
if message.modal_active || message.index < 0 || message.index >= message.count ||
|
||||
(!message.scheduled && !message.completed) {
|
||||
// Days off the habit's schedule open and count like planned days.
|
||||
if message.modal_active || message.index < 0 || message.index >= message.count {
|
||||
return message
|
||||
}
|
||||
if message.counter_enabled != 0 {
|
||||
message.day_action = ifx message.decrement then HABITS_DAY_DECREMENT else HABITS_DAY_COUNT
|
||||
} else if message.linked_count > 0 {
|
||||
message.day_action = HABITS_DAY_LINKED
|
||||
} else if message.span {
|
||||
// A tap starts the habit's span, the next ends it; a day with
|
||||
// spans opens their data.
|
||||
message.day_action = HABITS_DAY_SPAN
|
||||
} else if message.question_count > 0 {
|
||||
// The day opens its questions, or the data of a done day,
|
||||
// instead of being marked or cleared.
|
||||
message.day_action = HABITS_DAY_QUESTIONS
|
||||
} else {
|
||||
message.day_action = HABITS_DAY_TOGGLE
|
||||
}
|
||||
|
||||
@@ -1,5 +1,60 @@
|
||||
# Changelog
|
||||
|
||||
## [2.1.29] - 2026-10-11
|
||||
|
||||
- Bring Lumi 1.3.9, Diary 1.1.9, Lists 1.0.5 and Leaderboard 1.0.1.
|
||||
- Requires Inner Breeze 2.1.29 or later.
|
||||
|
||||
## [2.1.28] - 2026-10-11
|
||||
|
||||
- Bring Lumi's message selection with copy and delete.
|
||||
- Requires Inner Breeze 2.1.29 or later.
|
||||
|
||||
## [2.1.27] - 2026-10-11
|
||||
|
||||
- Bring Lumi's chat that loads older messages as you scroll up.
|
||||
- Requires Inner Breeze 2.1.29 or later.
|
||||
|
||||
## [2.1.26] - 2026-10-10
|
||||
|
||||
- Bring Diary's title bar, undo and redo, and spelling correction, and Lumi's typing dots.
|
||||
- Requires Inner Breeze 2.1.29 or later.
|
||||
|
||||
## [2.1.25] - 2026-10-10
|
||||
|
||||
- Open Leaderboard as its own app.
|
||||
- Requires Inner Breeze 2.1.28 or later.
|
||||
|
||||
## [2.1.24] - 2026-10-10
|
||||
|
||||
- Remove the text of practice window buttons that are no longer shown.
|
||||
|
||||
## [2.1.23] - 2026-10-10
|
||||
|
||||
- Translate the descriptions in Lumi's command list.
|
||||
|
||||
## [2.1.22] - 2026-10-10
|
||||
|
||||
- Say which app, device and system details Lumi feedback includes before you send it.
|
||||
|
||||
## [2.1.21] - 2026-10-10
|
||||
|
||||
- Explain when approved Lumi feedback is still waiting to send and when the developer inbox has received it.
|
||||
|
||||
## [2.1.20] - 2026-10-09
|
||||
|
||||
- Customize each app in Appearance using live KSS editing, inspection, undo, and reset to defaults.
|
||||
- Ask Lumi to preview and save your appearance changes.
|
||||
|
||||
## [2.1.19] - 2026-10-08
|
||||
|
||||
- Deliver the updated Diary to existing Inbe installations with today as its latest date.
|
||||
|
||||
## [2.1.18] - 2026-10-08
|
||||
|
||||
- Keep Diary in the same account as Habits, including existing entries and photos.
|
||||
- Limit Diary to today and earlier dates and open a blank editor without a writing prompt.
|
||||
|
||||
## [2.1.17] - 2026-10-07
|
||||
|
||||
- Find every app in a searchable library and keep up to two favorites in the compact dock.
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// The portable root owns app selection and unified navigation policy.
|
||||
// Its assets contain Lumi, Habits and Practices as recommended cells.
|
||||
// Its assets contain Lumi, Habits and Practices as recommended cells, and
|
||||
// Lists, Diary and Leaderboard as optional ones.
|
||||
#import, file "../../src/cells/inbe_types.zi";
|
||||
#import, file "inbe_view.zi";
|
||||
#import, file "../../src/cells/module_types.zi";
|
||||
@@ -16,6 +17,9 @@ InbeAppForScreen :: (screen: s32) -> s32 {
|
||||
if screen == ScreenDiary {
|
||||
return APP_DIARY
|
||||
}
|
||||
if screen == ScreenLeaderboard {
|
||||
return APP_LEADERBOARD
|
||||
}
|
||||
if screen == ScreenEList {
|
||||
return APP_LISTS
|
||||
}
|
||||
@@ -62,7 +66,8 @@ InbeApply :: (message: InbeMessage) -> InbeMessage {
|
||||
}
|
||||
if message.action == INBE_TOGGLE_APP {
|
||||
if message.app != APP_LISTS && message.app != APP_HABITS &&
|
||||
message.app != APP_PRACTICE && message.app != APP_DIARY && message.app != APP_LUMI {
|
||||
message.app != APP_PRACTICE && message.app != APP_DIARY && message.app != APP_LUMI &&
|
||||
message.app != APP_LEADERBOARD {
|
||||
message.succeeded = false
|
||||
return message
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# Changelog
|
||||
|
||||
## [1.0.1] - 2026-10-11
|
||||
|
||||
- Scrollbars use your theme's colours and show how much of the list is in view.
|
||||
|
||||
## [1.0.0] - 2026-10-10
|
||||
|
||||
- Rank yourself with your friends for Wim Hof, breathing patterns, meditation and Sun Salutation.
|
||||
- Sort by current streak, or by average hold in Wim Hof and average time in meditation.
|
||||
- Requires Inner Breeze 2.1.28 or later.
|
||||
@@ -0,0 +1,34 @@
|
||||
// Leaderboard ranks you with your friends for each practice. The unified
|
||||
// host fetches friend results, keeps them for offline use and ranks rows.
|
||||
#import, file "../../src/cells/leaderboard_types.zi";
|
||||
#import, file "../../src/cells/module_types.zi";
|
||||
#import, file "../../src/core/types.zi";
|
||||
#import, file "leaderboard_view.zi";
|
||||
host_api :: #system_library "host_api";
|
||||
ReadLeaderboardHost :: () -> LeaderboardMessage #foreign host_api;
|
||||
WriteLeaderboardHost :: (message: LeaderboardMessage) #foreign host_api;
|
||||
|
||||
LeaderboardApply :: (message: LeaderboardMessage) -> LeaderboardMessage {
|
||||
message.succeeded = true
|
||||
if message.action == LEADERBOARD_ROUTE {
|
||||
message.succeeded = message.screen == ScreenLeaderboard
|
||||
} else if message.action == LEADERBOARD_FRAME {
|
||||
message = LeaderboardView(message)
|
||||
} else {
|
||||
message.succeeded = false
|
||||
}
|
||||
return message
|
||||
}
|
||||
|
||||
#program_export "LeaderboardMain"
|
||||
Main :: () -> s32 {
|
||||
message := ReadLeaderboardHost()
|
||||
if message.abi != MODULE_ABI {
|
||||
return -1
|
||||
}
|
||||
if message.action == MODULE_IDENTIFY {
|
||||
return MODULE_LEADERBOARD
|
||||
}
|
||||
WriteLeaderboardHost(LeaderboardApply(message))
|
||||
return 0
|
||||
}
|
||||
@@ -0,0 +1,168 @@
|
||||
// Leaderboard owns its screen composition; the host supplies ranked rows,
|
||||
// prepared once when results arrive, and ordinary Kryon widget effects.
|
||||
#import "session"
|
||||
#import "geometry"
|
||||
#import "text"
|
||||
#import "vec"
|
||||
#import "drawing_props"
|
||||
#import "text_props"
|
||||
#import "text_align"
|
||||
#import "text_widget"
|
||||
#import "button_props"
|
||||
#import "button_widget"
|
||||
#import "control_props"
|
||||
#import "scroll_props"
|
||||
#import "scroll_widget"
|
||||
#import "box_props"
|
||||
#import "box_widget"
|
||||
#import "tree"
|
||||
#import, file "../../src/cells/leaderboard_ui_types.zi";
|
||||
#import, file "../../src/cells/leaderboard_types.zi";
|
||||
|
||||
using ButtonTone;
|
||||
using ButtonEmphasis;
|
||||
using TextAlign;
|
||||
using TextWrap;
|
||||
host_api :: #system_library "host_api";
|
||||
ReadLeaderboardUiHost :: () -> LeaderboardUiFrame #foreign host_api;
|
||||
WriteLeaderboardUiHost :: (frame: LeaderboardUiFrame) #foreign host_api;
|
||||
ReadLeaderboardRowHost :: (index: s32) -> LeaderboardUiRow #foreign host_api;
|
||||
LeaderboardLocaleHost :: (key: string) -> string #foreign host_api;
|
||||
frame: LeaderboardUiFrame;
|
||||
state: LeaderboardMessage;
|
||||
|
||||
// Wim Hof, breathing patterns, meditation and Sun Salutation, as in Practice.
|
||||
PRACTICE_COUNT :: 4
|
||||
PracticeAt :: (index: s32) -> s32 {
|
||||
ids: [PRACTICE_COUNT]s32 = .[0, 3, 1, 2]
|
||||
return ids[index]
|
||||
}
|
||||
|
||||
PracticeLabel :: (practice: s32) -> string {
|
||||
if practice == 1 { return LeaderboardLocaleHost("exercise_meditation") }
|
||||
if practice == 2 { return LeaderboardLocaleHost("exercise_sun_salutation") }
|
||||
if practice == 3 { return LeaderboardLocaleHost("exercise_patterns") }
|
||||
return LeaderboardLocaleHost("exercise_wim_hof")
|
||||
}
|
||||
|
||||
Scale :: (pixels: s32) -> s32 {
|
||||
return cast(s32)(cast(float32)pixels * frame.scale)
|
||||
}
|
||||
|
||||
Bounds :: (x: s32, y: s32, width: s32, height: s32) -> Rectangle {
|
||||
return Rectangle.{cast(float32)x, cast(float32)y,
|
||||
cast(float32)width, cast(float32)height}
|
||||
}
|
||||
|
||||
Finish :: () -> LeaderboardMessage {
|
||||
WriteLeaderboardUiHost(frame)
|
||||
state.succeeded = true
|
||||
return state
|
||||
}
|
||||
|
||||
Cell :: (key: u64, x: s32, y: s32, width: s32, height: s32, text: string) {
|
||||
Text(frame.session, TextProps.{.key = key, .bounds = Bounds(x, y, width, height),
|
||||
.text = text, .font = frame.font, .wrap = cast(TextWrap)TextWrapNone,
|
||||
.vertical_align = cast(TextAlign)TextAlignCenter})
|
||||
}
|
||||
|
||||
LeaderboardView :: (message: LeaderboardMessage) -> LeaderboardMessage {
|
||||
frame = ReadLeaderboardUiHost()
|
||||
state = message
|
||||
x := Scale(16)
|
||||
width := frame.width - x * 2
|
||||
y := Scale(12)
|
||||
|
||||
// Every practice stays visible: two per row on phones, four when wide.
|
||||
per_row: s32 = ifx width >= Scale(600) then PRACTICE_COUNT else 2
|
||||
gap := Scale(8)
|
||||
choice_width := (width - gap * (per_row - 1)) / per_row
|
||||
for index: cast(s32)0..PRACTICE_COUNT - 1 {
|
||||
practice := PracticeAt(index)
|
||||
chosen := practice == state.practice
|
||||
choice_x := x + (index % per_row) * (choice_width + gap)
|
||||
choice_y := y + (index / per_row) * (Scale(40) + gap)
|
||||
if Button(frame.session, ButtonProps.{.id = 7100 + index,
|
||||
.bounds = Bounds(choice_x, choice_y, choice_width, Scale(40)),
|
||||
.label = PracticeLabel(practice), .selected = chosen, .fit_content = true,
|
||||
.tone = cast(ButtonTone)(ifx chosen then ButtonToneAccent else ButtonToneNeutral),
|
||||
.emphasis = cast(ButtonEmphasis)ButtonEmphasisSoft}) != 0 && !chosen {
|
||||
state.practice = practice
|
||||
state.metric = LEADERBOARD_STREAK
|
||||
state.refresh = true
|
||||
frame.scroll = 0
|
||||
return Finish()
|
||||
}
|
||||
}
|
||||
y += (PRACTICE_COUNT / per_row) * (Scale(40) + gap) + Scale(8)
|
||||
|
||||
// The name column is wider when only the streak is ranked.
|
||||
columns: s32 = ifx state.has_average then 3 else 2
|
||||
name_width := ifx state.has_average then width / 2 else (width * 2) / 3
|
||||
value_width := ifx state.has_average then (width - name_width) / 2 else width - name_width
|
||||
average_label := ifx state.practice == 1 then "profile_metric_avg_time" else "profile_metric_avg_hold"
|
||||
labels: [3]string = .[LeaderboardLocaleHost("profile_friends_title"),
|
||||
LeaderboardLocaleHost("profile_metric_streak"), LeaderboardLocaleHost(average_label)]
|
||||
header_x := x
|
||||
for column: cast(s32)0..columns - 1 {
|
||||
column_width := ifx column == 0 then name_width else ifx column == columns - 1 then x + width - header_x else value_width
|
||||
metric := column - 1
|
||||
active := column > 0 && state.metric == metric
|
||||
if Button(frame.session, ButtonProps.{.id = 7110 + column,
|
||||
.bounds = Bounds(header_x, y, column_width, Scale(36)),
|
||||
.label = labels[column], .disabled = column == 0, .selected = active,
|
||||
.fit_content = true,
|
||||
.tone = cast(ButtonTone)(ifx active then ButtonToneAccent else ButtonToneNeutral),
|
||||
.emphasis = cast(ButtonEmphasis)ButtonEmphasisSoft}) != 0 &&
|
||||
column > 0 && !active {
|
||||
state.metric = metric
|
||||
return Finish()
|
||||
}
|
||||
header_x += column_width
|
||||
}
|
||||
y += Scale(44)
|
||||
|
||||
if state.row_count == 0 {
|
||||
key := ifx state.loading then "profile_updating_status" else "profile_no_leaderboard_data"
|
||||
Text(frame.session, TextProps.{.key = cast(u64)7120,
|
||||
.bounds = Bounds(x, y, width, Scale(32)), .text = LeaderboardLocaleHost(key),
|
||||
.font = frame.font, .wrap = cast(TextWrap)TextWrapAuto})
|
||||
return Finish()
|
||||
}
|
||||
|
||||
row_height := Scale(40)
|
||||
scroll := Scroll(frame.session, ScrollProps.{.key = cast(u64)7130,
|
||||
.bounds = Bounds(x, y, width, frame.height - frame.bottom - y - Scale(8)),
|
||||
.content_height = state.row_count * row_height, .scroll_offset = frame.scroll})
|
||||
frame.scroll = scroll.scroll_offset
|
||||
if !scroll.opened {
|
||||
return Finish()
|
||||
}
|
||||
row_y := cast(s32)scroll.content.y
|
||||
left := cast(s32)scroll.content.x
|
||||
for index: cast(s32)0..state.row_count - 1 {
|
||||
// Rows outside the viewport are not read from the host.
|
||||
if row_y + row_height > cast(s32)scroll.viewport.y &&
|
||||
row_y < cast(s32)(scroll.viewport.y + scroll.viewport.height) {
|
||||
row := ReadLeaderboardRowHost(index)
|
||||
key := cast(u64)(7200 + index * 4)
|
||||
if row.own || index % 2 == 1 {
|
||||
Box(frame.session, BoxProps.{.key = key, .bounds = Bounds(left, row_y, width, row_height),
|
||||
.fill = ifx row.own then Color.{156, 188, 143, 64} else Color.{156, 156, 156, 24},
|
||||
.radius = cast(float32)Scale(8)})
|
||||
}
|
||||
name: Vec(u8)
|
||||
BuilderPrint(*name, "%. %", row.rank, row.name)
|
||||
pad := Scale(8)
|
||||
Cell(key + 1, left + pad, row_y, name_width - pad * 2, row_height, BuilderFinish(name))
|
||||
Cell(key + 2, left + name_width + pad, row_y, value_width - pad, row_height, row.streak)
|
||||
if state.has_average {
|
||||
Cell(key + 3, left + name_width + value_width + pad, row_y,
|
||||
width - name_width - value_width - pad, row_height, row.average)
|
||||
}
|
||||
}
|
||||
row_y += row_height
|
||||
}
|
||||
End(frame.session)
|
||||
return Finish()
|
||||
}
|
||||
@@ -1,5 +1,14 @@
|
||||
# Changelog
|
||||
|
||||
## [1.0.5] - 2026-10-11
|
||||
|
||||
- Scrollbars use your theme's colours and show how much of the list is in view.
|
||||
- Scrolling while you type a new item keeps the keyboard open.
|
||||
|
||||
## [1.0.4] - 2026-10-10
|
||||
|
||||
- Requires Inner Breeze 2.1.28 or later.
|
||||
|
||||
## [1.0.3] - 2026-10-07
|
||||
|
||||
- Keep app labels and content visible after updating Inner Breeze.
|
||||
|
||||
@@ -1,5 +1,40 @@
|
||||
# Changelog
|
||||
|
||||
## [1.3.9] - 2026-10-11
|
||||
### Fixed
|
||||
- Scrolling the command list keeps the keyboard open.
|
||||
### Changed
|
||||
- Scrollbars use your theme's colours and show how much of the chat is in view.
|
||||
|
||||
## [1.3.8] - 2026-10-11
|
||||
### Added
|
||||
- Select messages like in Telegram: hold a message to select it, then tap or drag across others; dragging to the top or bottom of the chat scrolls it, through older messages too. Checkmarks show what is selected, and a bar over the top of the chat shows how many, with copy and delete.
|
||||
### Changed
|
||||
- Lumi's typing dots appear after a short pause, as a person reads before typing.
|
||||
- Feedback shows only its card with Yes and No, without a second copy of the question.
|
||||
|
||||
## [1.3.7] - 2026-10-11
|
||||
### Changed
|
||||
- Like Telegram, the chat shows your newest messages and loads older ones as you scroll up, right away while the newest do not fill the screen.
|
||||
|
||||
## [1.3.6] - 2026-10-10
|
||||
### Added
|
||||
- While Lumi is answering, three dots show in its bubble where the answer will appear.
|
||||
|
||||
## [1.3.5] - 2026-10-10
|
||||
|
||||
- Requires Inner Breeze 2.1.28 or later.
|
||||
|
||||
## [1.3.4] - 2026-10-10
|
||||
### Added
|
||||
- Tap the / button or type / to see Lumi's commands, as in Telegram. The list narrows as you type; tap a command or press Enter to use it, and commands that need text wait for it in the message box.
|
||||
### Changed
|
||||
- Send with an arrow button.
|
||||
|
||||
## [1.3.3] - 2026-10-10
|
||||
### Fixed
|
||||
- Open the chat without a pause by preparing command suggestions only while you type.
|
||||
|
||||
## [1.3.2] - 2026-10-07
|
||||
### Changed
|
||||
- Load earlier chat messages automatically as you scroll up, preserving your reading position.
|
||||
|
||||
@@ -146,14 +146,14 @@ LumiIntent :: (input: string, commands: LumiCommands) -> LumiAction {
|
||||
}
|
||||
diary_prefixes: [7]string = .[commands.write_diary, "write this to my diary",
|
||||
"write to my diary", "add to my diary", "save to my diary", "/journal", "/diary"]
|
||||
boundary: s32 = 0
|
||||
while boundary < input.count && input[boundary] != cast(u8)58 && input[boundary] != cast(u8)10 {
|
||||
boundary += 1
|
||||
}
|
||||
for prefix: diary_prefixes {
|
||||
if prefix.count == 0 || (prefix == "/diary" && LumiEqual(input, prefix)) {
|
||||
continue
|
||||
}
|
||||
boundary: s32 = 0
|
||||
while boundary < input.count && input[boundary] != cast(u8)58 && input[boundary] != cast(u8)10 {
|
||||
boundary += 1
|
||||
}
|
||||
if boundary < input.count && CommandPhrase(LumiTrim(input[:boundary]), prefix) {
|
||||
return LumiAction.{.kind = LUMI_WRITE_DIARY, .title = LumiTrim(input[boundary + 1:])}
|
||||
}
|
||||
@@ -196,15 +196,23 @@ LumiIntent :: (input: string, commands: LumiCommands) -> LumiAction {
|
||||
return LumiAction.{.kind = LUMI_START_PRACTICE, .practice = index}
|
||||
}
|
||||
}
|
||||
normalized := CommandNormalize(input)
|
||||
practice_patterns: [7]string = .["^start\\s+whm[.!?]*$", "^start\\s+wim\\s+hof$",
|
||||
"^start\\s+wim\\s+hof\\s+method$", "^start\\s+meditation[.!?]*$",
|
||||
"^start\\s+sun\\s+salutations?[.!?]*$", "^start\\s+breathing\\s+patterns[.!?]*$",
|
||||
"^start\\s+patterns[.!?]*$"]
|
||||
ids: [7]s32 = .[0, 0, 0, 1, 2, 3, 3]
|
||||
for index: cast(s32)0..cast(s32)6 {
|
||||
if RegexMatch(practice_patterns[index], normalized) {
|
||||
return LumiAction.{.kind = LUMI_START_PRACTICE, .practice = ids[index]}
|
||||
first_word_end: s32 = 0
|
||||
while first_word_end < input.count && !CommandSpace(input[first_word_end]) {
|
||||
first_word_end += 1
|
||||
}
|
||||
// All practice expressions start with the corrected word "start". Free
|
||||
// text needs neither a normalized copy nor seven regex evaluations.
|
||||
if CommandTypo(input[:first_word_end], "start") {
|
||||
normalized := CommandNormalize(input)
|
||||
practice_patterns: [7]string = .["^start\\s+whm[.!?]*$", "^start\\s+wim\\s+hof$",
|
||||
"^start\\s+wim\\s+hof\\s+method$", "^start\\s+meditation[.!?]*$",
|
||||
"^start\\s+sun\\s+salutations?[.!?]*$", "^start\\s+breathing\\s+patterns[.!?]*$",
|
||||
"^start\\s+patterns[.!?]*$"]
|
||||
ids: [7]s32 = .[0, 0, 0, 1, 2, 3, 3]
|
||||
for index: cast(s32)0..cast(s32)6 {
|
||||
if RegexMatch(practice_patterns[index], normalized) {
|
||||
return LumiAction.{.kind = LUMI_START_PRACTICE, .practice = ids[index]}
|
||||
}
|
||||
}
|
||||
}
|
||||
practice_aliases: [10]string = .["start whm", "start wim hof", "start wim hof method",
|
||||
|
||||
@@ -17,6 +17,9 @@ LumiTaskCountHost :: () -> s32 #foreign host_api;
|
||||
PerformLumiActionHost :: (action: LumiAction) -> bool #foreign host_api;
|
||||
AppendLumiChatHost :: (text: string, user: bool) #foreign host_api;
|
||||
LumiLocaleHost :: (key: string) -> string #foreign host_api;
|
||||
LumiLocaleRevisionHost :: () -> s64 #foreign host_api;
|
||||
command_revision: s64 = -1;
|
||||
command_cache: LumiCommands;
|
||||
ReadLumiToolsHost :: () -> LumiTools #foreign host_api;
|
||||
SetLumiHabitChoiceHost :: (choosing: bool) #foreign host_api;
|
||||
SetLumiDiaryChoiceHost :: (choosing: bool) #foreign host_api;
|
||||
@@ -43,7 +46,10 @@ LumiAskHabit :: (tools: LumiTools) {
|
||||
}
|
||||
|
||||
LumiCommandSet :: () -> LumiCommands {
|
||||
return LumiCommands.{.add = LumiLocaleHost("lumi_add"),
|
||||
revision := LumiLocaleRevisionHost()
|
||||
if revision == command_revision { return command_cache }
|
||||
command_revision = revision
|
||||
command_cache = LumiCommands.{.add = LumiLocaleHost("lumi_add"),
|
||||
.complete = LumiLocaleHost("lumi_complete"), .reopen = LumiLocaleHost("lumi_reopen"),
|
||||
.complete_habit = LumiLocaleHost("lumi_complete_habit"),
|
||||
.start_whm = LumiLocaleHost("lumi_start_whm"),
|
||||
@@ -56,6 +62,7 @@ LumiCommandSet :: () -> LumiCommands {
|
||||
.theme = LumiLocaleHost("lumi_theme"), .dark = LumiLocaleHost("lumi_dark"),
|
||||
.light = LumiLocaleHost("lumi_light"), .system = LumiLocaleHost("lumi_system"),
|
||||
.progress = LumiLocaleHost("lumi_show_progress"), .donations = LumiLocaleHost("lumi_show_donations")}
|
||||
return command_cache
|
||||
}
|
||||
|
||||
LumiRespond :: (input: string) {
|
||||
@@ -130,8 +137,10 @@ LumiRespond :: (input: string) {
|
||||
if PerformLumiActionHost(action) {
|
||||
SetLumiHabitChoiceHost(false)
|
||||
SetLumiDiaryChoiceHost(false)
|
||||
if action.kind == LUMI_SHOW_PROGRESS || action.kind == LUMI_SHOW_DONATIONS {
|
||||
// These tools already appended their typed card to the chat.
|
||||
if action.kind == LUMI_SHOW_PROGRESS || action.kind == LUMI_SHOW_DONATIONS ||
|
||||
action.kind == LUMI_REPORT_FEEDBACK {
|
||||
// These tools already appended their typed card to the chat;
|
||||
// the feedback card with Yes and No is the whole answer.
|
||||
return
|
||||
}
|
||||
reply = "lumi_opened"
|
||||
@@ -149,8 +158,6 @@ LumiRespond :: (input: string) {
|
||||
reply = "lumi_practice_started"
|
||||
} else if action.kind == LUMI_WRITE_DIARY {
|
||||
reply = "lumi_diary_saved"
|
||||
} else if action.kind == LUMI_REPORT_FEEDBACK {
|
||||
reply = "lumi_feedback_confirm"
|
||||
}
|
||||
} else {
|
||||
reply = "lumi_unavailable"
|
||||
@@ -201,7 +208,8 @@ Main :: () -> s32 {
|
||||
if message.action == LUMI_ROUTE {
|
||||
message.succeeded = message.screen == ScreenLumi
|
||||
} else if message.action == LUMI_FRAME {
|
||||
message = LumiView(message, LumiCommandSet())
|
||||
commands := LumiCommandSet()
|
||||
message = LumiView(message, commands, command_revision)
|
||||
if message.action == LUMI_SEND {
|
||||
LumiRespond(message.input)
|
||||
}
|
||||
|
||||
@@ -13,20 +13,27 @@
|
||||
#import "control_props"
|
||||
#import "box_props"
|
||||
#import "box_widget"
|
||||
#import "checkbox_props"
|
||||
#import "checkbox_widget"
|
||||
#import "press_props"
|
||||
#import "press_widget"
|
||||
#import "scroll_props"
|
||||
#import "scroll_widget"
|
||||
#import "tree"
|
||||
#import "text"
|
||||
#import "byte_text_linux"
|
||||
#import "c_string"
|
||||
#import "vec"
|
||||
#import, file "../../src/cells/lumi_types.zi";
|
||||
#import, file "../../src/cells/lumi_ui_types.zi";
|
||||
#import, file "../../src/cells/lumi_chart.zi";
|
||||
#import, file "command_text.zi";
|
||||
#import, file "engine.zi";
|
||||
#import, file "message_text.zi";
|
||||
|
||||
using ImageFit;
|
||||
using TextWrap;
|
||||
using TextAlign;
|
||||
using ButtonTone;
|
||||
using ButtonEmphasis;
|
||||
host_api :: #system_library "host_api";
|
||||
@@ -38,6 +45,7 @@ ReadLumiSuggestionHabitHost :: (index: s32) -> LumiTask #foreign host_api;
|
||||
LumiViewLocaleHost :: (key: string) -> string #foreign host_api;
|
||||
LumiFeedbackChoiceHost :: (id: string, action: s32) -> bool #foreign host_api;
|
||||
LumiLoadOlderHost :: () -> bool #foreign host_api;
|
||||
LumiDeleteRowHost :: (index: s32) -> bool #foreign host_api;
|
||||
LumiFirstVisibleRowHost :: (scroll: s32) -> s32 #foreign host_api;
|
||||
LumiRowOffsetHost :: (index: s32) -> s32 #foreign host_api;
|
||||
ReadLumiDonationHost :: (coin: s32) -> LumiDonation #foreign host_api;
|
||||
@@ -48,6 +56,350 @@ chart_selected_point: s32;
|
||||
donation_notice: string;
|
||||
donation_notice_row: s32 = -1;
|
||||
|
||||
// Visible replies are unchanged between frames. Keep a bounded copy so
|
||||
// scrolling, account changes and edited rows cannot reuse borrowed host text.
|
||||
LumiReplyText :: struct {
|
||||
source: [LUMI_INPUT_MAX]u8
|
||||
count: s32
|
||||
formatted: LumiMessageText
|
||||
}
|
||||
|
||||
reply_text: [8]LumiReplyText;
|
||||
draft_intent_source: [LUMI_INPUT_MAX]u8;
|
||||
draft_intent_count: s32;
|
||||
draft_intent_revision: s64 = -1;
|
||||
draft_intent: LumiAction;
|
||||
draft_intent_title_count: s32;
|
||||
candidate_revision: s64 = -1;
|
||||
candidate_actions: [20]LumiAction;
|
||||
// Suggestion commands read for the current command set, in order.
|
||||
candidate_ready: s32;
|
||||
// Reading a command takes many text matches, so typing reads one per frame.
|
||||
LUMI_CANDIDATES_PER_FRAME :: 1
|
||||
|
||||
// Typing "/" lists Lumi's commands as in Telegram. The list matches the
|
||||
// command menu of Lumi's Telegram bot, without its Telegram-only commands.
|
||||
LumiMenuCommand :: struct {
|
||||
name: string
|
||||
description: string
|
||||
// These commands insert "/name " for the text instead of sending.
|
||||
needs_text: bool
|
||||
requirement: s32
|
||||
// Shown only while Lumi waits for a Diary text or a habit name.
|
||||
choice_only: bool
|
||||
}
|
||||
|
||||
LUMI_MENU_COMMANDS :: 16
|
||||
menu_revision: s64 = -1;
|
||||
menu_commands: [LUMI_MENU_COMMANDS]LumiMenuCommand;
|
||||
menu_scroll: s32;
|
||||
focus_request: s32;
|
||||
// Telegram-style selection: hold a message to select it, then tap messages
|
||||
// or drag across them; dragging near the chat's top or bottom scrolls it.
|
||||
// Rows are counted from the newest message, which older messages loading
|
||||
// above do not change, so a sweep can keep going up through the history.
|
||||
// The greeting above every message is kept apart.
|
||||
LUMI_SELECT_MAX :: 4096
|
||||
selecting: bool;
|
||||
selected: [LUMI_SELECT_MAX]bool;
|
||||
greeting_selected: bool;
|
||||
selected_count: s32;
|
||||
sweeping: bool;
|
||||
// The row the sweep began on, counted from the newest message; -1 is the
|
||||
// greeting.
|
||||
sweep_anchor: s32;
|
||||
sweep_value: bool;
|
||||
// Where the pointer is during a sweep, for scrolling at the chat's edges.
|
||||
sweep_pointer_y: float32;
|
||||
sweep_seen: bool;
|
||||
confirm_delete: bool;
|
||||
// Copied text waits until the composer has written its own clipboard state.
|
||||
pending_copy: string;
|
||||
copy_pending: bool;
|
||||
LUMI_CLOSE_ICON :: "S1.8rr:M6 6L18 18M18 6L6 18"
|
||||
LUMI_COPY_ICON :: "S1.6rr:M9 9H20V20H9ZM15 5V4H4V15H5"
|
||||
LUMI_DELETE_ICON :: "S1.6rr:M3 6H21M9 6V3H15V6M5 6L6 21H18L19 6M10 10V17M14 10V17"
|
||||
|
||||
// A row's place counted from the newest message; the greeting is -1.
|
||||
RowSlot :: (index: s32) -> s32 {
|
||||
if index <= 0 {
|
||||
return -1
|
||||
}
|
||||
return frame.chat_count - 1 - index
|
||||
}
|
||||
|
||||
SlotRow :: (slot: s32) -> s32 {
|
||||
if slot < 0 {
|
||||
return 0
|
||||
}
|
||||
return frame.chat_count - 1 - slot
|
||||
}
|
||||
|
||||
IsSelected :: (index: s32) -> bool {
|
||||
slot := RowSlot(index)
|
||||
if slot < 0 {
|
||||
return greeting_selected
|
||||
}
|
||||
return slot < LUMI_SELECT_MAX && selected[slot]
|
||||
}
|
||||
|
||||
SelectionClear :: () {
|
||||
for index: cast(s32)0..LUMI_SELECT_MAX - 1 {
|
||||
selected[index] = false
|
||||
}
|
||||
greeting_selected = false
|
||||
selected_count = 0
|
||||
selecting = false
|
||||
sweeping = false
|
||||
confirm_delete = false
|
||||
}
|
||||
|
||||
SelectionSet :: (index: s32, value: bool) {
|
||||
if index < 0 || index >= frame.chat_count || IsSelected(index) == value {
|
||||
return
|
||||
}
|
||||
slot := RowSlot(index)
|
||||
if slot < 0 {
|
||||
greeting_selected = value
|
||||
} else if slot < LUMI_SELECT_MAX {
|
||||
selected[slot] = value
|
||||
} else {
|
||||
return
|
||||
}
|
||||
selected_count += ifx value then 1 else -1
|
||||
}
|
||||
|
||||
// A press began on a row: it selects or clears that row, and dragging then
|
||||
// gives every row it sweeps over the same state.
|
||||
SweepStart :: (index: s32, value: bool) {
|
||||
sweeping = true
|
||||
sweep_anchor = RowSlot(index)
|
||||
sweep_value = value
|
||||
SelectionSet(index, value)
|
||||
}
|
||||
|
||||
SweepTo :: (index: s32) {
|
||||
if index < 0 {
|
||||
index = 0
|
||||
}
|
||||
if index >= frame.chat_count {
|
||||
index = frame.chat_count - 1
|
||||
}
|
||||
anchor := SlotRow(sweep_anchor)
|
||||
first := ifx index < anchor then index else anchor
|
||||
last := ifx index < anchor then anchor else index
|
||||
for row: first..last {
|
||||
SelectionSet(row, sweep_value)
|
||||
}
|
||||
}
|
||||
|
||||
// The template with its %d replaced by the count.
|
||||
CountText :: (template: string, count: s32) -> string {
|
||||
out: Vec(u8)
|
||||
at: s64 = 0
|
||||
while at < template.count {
|
||||
if at + 1 < template.count && template[at] == cast(u8)37 && template[at + 1] == cast(u8)100 {
|
||||
BuilderPrint(*out, "%", count)
|
||||
at += 2
|
||||
} else {
|
||||
BuilderPrint(*out, "%", template[at:at + 1])
|
||||
at += 1
|
||||
}
|
||||
}
|
||||
return BuilderFinish(out)
|
||||
}
|
||||
|
||||
SelectedText :: () -> string {
|
||||
out: Vec(u8)
|
||||
written: s32 = 0
|
||||
for index: cast(s32)0..frame.chat_count - 1 {
|
||||
if !IsSelected(index) {
|
||||
continue
|
||||
}
|
||||
if written > 0 {
|
||||
BuilderPrint(*out, "\n\n")
|
||||
}
|
||||
BuilderPrint(*out, "%", ReadLumiChatRowHost(index).text)
|
||||
written += 1
|
||||
}
|
||||
return BuilderFinish(out)
|
||||
}
|
||||
|
||||
// The bar replacing the top of the chat while messages are selected: close,
|
||||
// the count, then copy and delete, with delete asking first.
|
||||
SelectionBar :: (x: s32, top: s32, width: s32) {
|
||||
control := Scale(44)
|
||||
Box(frame.session, BoxProps.{.key = cast(u64)300369,
|
||||
.bounds = Bounds(x - Scale(16), 0, width + Scale(32), top + control + Scale(8)),
|
||||
.fill = frame.background})
|
||||
if confirm_delete {
|
||||
Text(frame.session, TextProps.{.key = cast(u64)300370,
|
||||
.bounds = Bounds(x, top, width - Scale(216), control),
|
||||
.text = LumiViewLocaleHost("lumi_delete_confirm"), .font = frame.font,
|
||||
.wrap = cast(TextWrap)TextWrapAuto, .vertical_align = cast(TextAlign)TextAlignCenter})
|
||||
if Button(frame.session, ButtonProps.{.id = 30020,
|
||||
.bounds = Bounds(x + width - Scale(208), top, Scale(100), control),
|
||||
.label = LumiViewLocaleHost("cancel_button"), .fit_content = true,
|
||||
.tone = cast(ButtonTone)ButtonToneNeutral, .emphasis = cast(ButtonEmphasis)ButtonEmphasisSoft}) != 0 {
|
||||
confirm_delete = false
|
||||
}
|
||||
if Button(frame.session, ButtonProps.{.id = 30021,
|
||||
.bounds = Bounds(x + width - Scale(100), top, Scale(100), control),
|
||||
.label = LumiViewLocaleHost("delete_button"), .fit_content = true,
|
||||
.tone = cast(ButtonTone)ButtonToneDanger, .emphasis = cast(ButtonEmphasis)ButtonEmphasisFilled}) != 0 {
|
||||
// From the last row back, so earlier rows keep their indices.
|
||||
index := frame.chat_count - 1
|
||||
while index >= 0 {
|
||||
if IsSelected(index) {
|
||||
unused LumiDeleteRowHost(index)
|
||||
}
|
||||
index -= 1
|
||||
}
|
||||
SelectionClear()
|
||||
}
|
||||
return
|
||||
}
|
||||
if Button(frame.session, ButtonProps.{.id = 30022, .bounds = Bounds(x, top, control, control),
|
||||
.label = LumiViewLocaleHost("lumi_cancel_selection"), .icon_shape = LUMI_CLOSE_ICON, .icon_only = true,
|
||||
.tone = cast(ButtonTone)ButtonToneNeutral, .emphasis = cast(ButtonEmphasis)ButtonEmphasisGhost}) != 0 {
|
||||
SelectionClear()
|
||||
return
|
||||
}
|
||||
Box(frame.session, BoxProps.{.key = cast(u64)300371,
|
||||
.bounds = Bounds(x + control + Scale(8), top + Scale(6), Scale(150), control - Scale(12)),
|
||||
.fill = Color.{156, 188, 143, 48}, .radius = cast(float32)(control - Scale(12)) / 2.0})
|
||||
Text(frame.session, TextProps.{.key = cast(u64)300372,
|
||||
.bounds = Bounds(x + control + Scale(8), top, Scale(150), control),
|
||||
.text = CountText(LumiViewLocaleHost("lumi_selected_count"), selected_count), .font = frame.font,
|
||||
.wrap = cast(TextWrap)TextWrapNone, .align = cast(TextAlign)TextAlignCenter,
|
||||
.vertical_align = cast(TextAlign)TextAlignCenter})
|
||||
if Button(frame.session, ButtonProps.{.id = 30023,
|
||||
.bounds = Bounds(x + width - 2 * control - Scale(4), top, control, control),
|
||||
.label = LumiViewLocaleHost("lumi_copy"), .icon_shape = LUMI_COPY_ICON, .icon_only = true,
|
||||
.tone = cast(ButtonTone)ButtonToneNeutral, .emphasis = cast(ButtonEmphasis)ButtonEmphasisGhost}) != 0 {
|
||||
pending_copy = SelectedText()
|
||||
copy_pending = true
|
||||
SelectionClear()
|
||||
return
|
||||
}
|
||||
if Button(frame.session, ButtonProps.{.id = 30024,
|
||||
.bounds = Bounds(x + width - control, top, control, control),
|
||||
.label = LumiViewLocaleHost("delete_button"), .icon_shape = LUMI_DELETE_ICON, .icon_only = true,
|
||||
.tone = cast(ButtonTone)ButtonToneDanger, .emphasis = cast(ButtonEmphasis)ButtonEmphasisGhost}) != 0 {
|
||||
confirm_delete = true
|
||||
}
|
||||
}
|
||||
// A rounded square with a slash, and a paper plane, in Kryon's 24 x 24 icon
|
||||
// shape format.
|
||||
LUMI_COMMANDS_ICON :: "S1.8rr:M7 3H17C19.2091 3 21 4.79086 21 7V17C21 19.2091 19.2091 21 17 21H7C4.79086 21 3 19.2091 3 17V7C3 4.79086 4.79086 3 7 3Z|S1.8rr:M14.5 7.5L9.5 16.5"
|
||||
LUMI_SEND_ICON :: "F:M3.4 20.6L21.2 12.9C21.94 12.58 21.94 11.42 21.2 11.1L3.4 3.4C2.66 3.08 1.9 3.8 2.14 4.57L4.2 11L13 12L4.2 13L2.14 19.43C1.9 20.2 2.66 20.92 3.4 20.6Z"
|
||||
|
||||
MenuCommands :: (revision: s64) -> []LumiMenuCommand {
|
||||
if revision != menu_revision {
|
||||
menu_revision = revision
|
||||
table: [LUMI_MENU_COMMANDS]LumiMenuCommand = .[
|
||||
LumiMenuCommand.{.name = "/help", .description = LumiViewLocaleHost("lumi_command_help")},
|
||||
LumiMenuCommand.{.name = "/todo", .description = LumiViewLocaleHost("lumi_add"),
|
||||
.needs_text = true, .requirement = LUMI_LISTS},
|
||||
LumiMenuCommand.{.name = "/done", .description = LumiViewLocaleHost("lumi_complete"),
|
||||
.needs_text = true, .requirement = LUMI_LISTS},
|
||||
LumiMenuCommand.{.name = "/reopen", .description = LumiViewLocaleHost("lumi_reopen"),
|
||||
.needs_text = true, .requirement = LUMI_LISTS},
|
||||
LumiMenuCommand.{.name = "/lists", .description = LumiViewLocaleHost("lumi_open_lists"),
|
||||
.requirement = LUMI_LISTS},
|
||||
LumiMenuCommand.{.name = "/habit", .description = LumiViewLocaleHost("lumi_complete_habit"),
|
||||
.requirement = LUMI_HABITS},
|
||||
LumiMenuCommand.{.name = "/habits", .description = LumiViewLocaleHost("lumi_open_habits"),
|
||||
.requirement = LUMI_HABITS},
|
||||
LumiMenuCommand.{.name = "/journal", .description = LumiViewLocaleHost("lumi_write_diary"),
|
||||
.requirement = LUMI_DIARY},
|
||||
LumiMenuCommand.{.name = "/diary", .description = LumiViewLocaleHost("lumi_open_diary"),
|
||||
.requirement = LUMI_DIARY},
|
||||
LumiMenuCommand.{.name = "/meditate", .description = LumiViewLocaleHost("lumi_start_meditation"),
|
||||
.requirement = LUMI_PRACTICES},
|
||||
LumiMenuCommand.{.name = "/whm", .description = LumiViewLocaleHost("lumi_start_whm"),
|
||||
.requirement = LUMI_PRACTICES},
|
||||
LumiMenuCommand.{.name = "/practices", .description = LumiViewLocaleHost("lumi_open_practices"),
|
||||
.requirement = LUMI_PRACTICES},
|
||||
LumiMenuCommand.{.name = "/progress", .description = LumiViewLocaleHost("lumi_show_progress"),
|
||||
.requirement = LUMI_PRACTICES},
|
||||
LumiMenuCommand.{.name = "/feedback", .description = LumiViewLocaleHost("lumi_command_feedback"),
|
||||
.needs_text = true},
|
||||
LumiMenuCommand.{.name = "/donate", .description = LumiViewLocaleHost("lumi_show_donations")},
|
||||
LumiMenuCommand.{.name = "/cancel", .description = LumiViewLocaleHost("cancel_button"),
|
||||
.choice_only = true}]
|
||||
menu_commands = table
|
||||
}
|
||||
return menu_commands[:]
|
||||
}
|
||||
|
||||
// A draft of "/" and a command name opens the list; a space closes it,
|
||||
// since the command then takes its text.
|
||||
MenuOpen :: (value: string) -> bool {
|
||||
if value.count == 0 || value[0] != cast(u8)47 {
|
||||
return false
|
||||
}
|
||||
for byte: value {
|
||||
if CommandSpace(byte) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
CommandText :: (command: LumiMenuCommand) -> string {
|
||||
if !command.needs_text {
|
||||
return command.name
|
||||
}
|
||||
out: Vec(u8)
|
||||
BuilderPrint(*out, "% ", command.name)
|
||||
return BuilderFinish(out)
|
||||
}
|
||||
|
||||
FillDraft :: (text: string) {
|
||||
frame.value = text
|
||||
frame.cursor = cast(s32)text.count
|
||||
frame.anchor = frame.cursor
|
||||
frame.input_scroll = 0
|
||||
frame.selecting = false
|
||||
frame.preferred_x_valid = false
|
||||
frame.focused = true
|
||||
}
|
||||
|
||||
// Interpretation depends on the draft and translated command set. Cursor
|
||||
// blinking, scrolling and unchanged frames reuse the result, while sending
|
||||
// still validates the request against the current tools in LumiRespond.
|
||||
DraftIntent :: (value: string, commands: LumiCommands, revision: s64) -> LumiAction {
|
||||
if revision != draft_intent_revision ||
|
||||
value != TextFromBytes(draft_intent_source[:draft_intent_count]) {
|
||||
draft_intent_count = 0
|
||||
if CopyCString(value, draft_intent_source[:]) {
|
||||
draft_intent_count = cast(s32)value.count
|
||||
}
|
||||
draft_intent_revision = revision
|
||||
action := LumiIntent(value, commands)
|
||||
draft_intent = LumiAction.{.kind = action.kind, .route = action.route, .practice = action.practice}
|
||||
draft_intent_title_count = cast(s32)action.title.count
|
||||
}
|
||||
action := draft_intent
|
||||
// Intent titles are suffixes of the trimmed request. Retain their length,
|
||||
// then return a view of this frame's value rather than a cached text view.
|
||||
action.title = value[value.count - draft_intent_title_count:]
|
||||
return action
|
||||
}
|
||||
|
||||
ReplyText :: (index: s32, value: string) -> *LumiMessageText {
|
||||
slot := *reply_text[index % cast(s32)reply_text.count]
|
||||
if value != TextFromBytes(slot.source[:slot.count]) {
|
||||
slot.formatted = LumiFormatMessage(value, true)
|
||||
slot.count = 0
|
||||
if CopyCString(value, slot.source[:]) {
|
||||
slot.count = cast(s32)value.count
|
||||
}
|
||||
}
|
||||
return *slot.formatted
|
||||
}
|
||||
|
||||
Scale :: (value: s32) -> s32 {
|
||||
return cast(s32)(cast(float32)value * frame.scale)
|
||||
}
|
||||
@@ -60,13 +412,7 @@ Suggestion :: (id: s32, text: string, bounds: Rectangle, label: string = "") ->
|
||||
if Button(frame.session, ButtonProps.{.id = id, .bounds = bounds,
|
||||
.label = ifx label.count > 0 then label else text, .pill = true, .tone = cast(ButtonTone)ButtonToneNeutral,
|
||||
.emphasis = cast(ButtonEmphasis)ButtonEmphasisSoft}) != 0 {
|
||||
frame.value = text
|
||||
frame.cursor = cast(s32)text.count
|
||||
frame.anchor = frame.cursor
|
||||
frame.input_scroll = 0
|
||||
frame.selecting = false
|
||||
frame.preferred_x_valid = false
|
||||
frame.focused = true
|
||||
FillDraft(text)
|
||||
return true
|
||||
}
|
||||
return false
|
||||
@@ -182,7 +528,61 @@ DonationCard :: (index: s32, x: s32, y: s32, width: s32) {
|
||||
}
|
||||
}
|
||||
|
||||
LumiView :: (message: LumiMessage, commands: LumiCommands) -> LumiMessage {
|
||||
// Lumi's bubble with three dots that brighten and rise in turn, where its
|
||||
// answer will appear.
|
||||
TypingDots :: (x: s32, top: s32) {
|
||||
left := x + Scale(48)
|
||||
Image(frame.session, ImageProps.{.key = cast(u64)300380,
|
||||
.asset_path = "assets/lumi/mascot.png", .alt_text = "Lumi",
|
||||
.bounds = Bounds(x, top + Scale(16), Scale(40), Scale(40)),
|
||||
.source = Rectangle.{0.0, 0.0, -1254.0, 1254.0},
|
||||
.fit = cast(ImageFit)ImageFitContain})
|
||||
Box(frame.session, BoxProps.{.key = cast(u64)300381,
|
||||
.bounds = Bounds(left, top, Scale(96), Scale(60)),
|
||||
.fill = Color.{156, 156, 156, 24}, .radius = cast(float32)Scale(16)})
|
||||
Text(frame.session, TextProps.{.key = cast(u64)300382,
|
||||
.bounds = Bounds(left + Scale(14), top + Scale(8), Scale(68), Scale(20)),
|
||||
.text = "Lumi", .font = Scale(12)})
|
||||
for dot: cast(s32)0..2 {
|
||||
phase := frame.now * 1.4 - cast(float64)dot * 0.2
|
||||
phase = phase - cast(float64)cast(s64)phase
|
||||
if phase < 0.0 {
|
||||
phase += 1.0
|
||||
}
|
||||
level := ifx phase < 0.5 then phase * 2.0 else (1.0 - phase) * 2.0
|
||||
size := Scale(8)
|
||||
Box(frame.session, BoxProps.{.key = cast(u64)(300383 + dot),
|
||||
.bounds = Bounds(left + Scale(16) + dot * Scale(14),
|
||||
top + Scale(38) - cast(s32)(level * cast(float64)Scale(4)), size, size),
|
||||
.fill = Color.{170, 170, 170, cast(u8)(90.0 + 165.0 * level)},
|
||||
.radius = cast(float32)size / 2.0})
|
||||
}
|
||||
}
|
||||
|
||||
// A row's press: a hold starts selecting, and while selecting a press starts
|
||||
// a sweep that follows the pointer, even off the row and past the chat.
|
||||
RowPress :: (index: s32, bounds: Rectangle, content_y: float32) {
|
||||
key := ifx index == 0 then 0 else RowSlot(index) + 1
|
||||
press := Press(frame.session, PressProps.{.key = cast(u64)(410000 + key), .bounds = bounds,
|
||||
.label = LumiViewLocaleHost("lumi_message"), .now = frame.now, .capture = selecting})
|
||||
if !selecting && press.held {
|
||||
selecting = true
|
||||
confirm_delete = false
|
||||
SweepStart(index, true)
|
||||
} else if selecting && press.down && !sweeping {
|
||||
SweepStart(index, !IsSelected(index))
|
||||
}
|
||||
if sweeping && press.down {
|
||||
sweep_seen = true
|
||||
sweep_pointer_y = press.y
|
||||
SweepTo(LumiFirstVisibleRowHost(cast(s32)(press.y - content_y)))
|
||||
}
|
||||
if press.released {
|
||||
sweeping = false
|
||||
}
|
||||
}
|
||||
|
||||
LumiView :: (message: LumiMessage, commands: LumiCommands, revision: s64) -> LumiMessage {
|
||||
frame = ReadLumiUiHost()
|
||||
column := CenteredColumnFor(frame.width, Scale(720), Scale(16))
|
||||
x := column.x
|
||||
@@ -198,15 +598,65 @@ LumiView :: (message: LumiMessage, commands: LumiCommands) -> LumiMessage {
|
||||
footer := frame.height - frame.bottom - Scale(16) - input_height
|
||||
suggestions_top := footer - Scale(ifx LumiTrim(frame.value).count > 0 then 46 else 0)
|
||||
history_top := Scale(12)
|
||||
menu := MenuCommands(revision)
|
||||
menu_matches: [LUMI_MENU_COMMANDS]s32
|
||||
menu_count: s32 = 0
|
||||
// Enter chooses the exact command, otherwise the first one listed.
|
||||
menu_target: s32 = -1
|
||||
if MenuOpen(frame.value) {
|
||||
for index: cast(s32)0..LUMI_MENU_COMMANDS - 1 {
|
||||
command := menu[index]
|
||||
if (command.requirement != 0 && (frame.available_apps & command.requirement) == 0) ||
|
||||
(command.choice_only && !frame.choosing_habit && !frame.choosing_diary) ||
|
||||
!LumiStarts(command.name, frame.value) {
|
||||
continue
|
||||
}
|
||||
if menu_target < 0 || LumiEqual(command.name, frame.value) {
|
||||
menu_target = menu_count
|
||||
}
|
||||
menu_matches[menu_count] = index
|
||||
menu_count += 1
|
||||
}
|
||||
}
|
||||
menu_row := Scale(44)
|
||||
menu_height := menu_count * menu_row
|
||||
// Four and a half rows show that a longer list scrolls.
|
||||
if menu_height > menu_row * 9 / 2 {
|
||||
menu_height = menu_row * 9 / 2
|
||||
}
|
||||
if menu_count > 0 && footer - Scale(8) - menu_height - history_top < Scale(68) {
|
||||
menu_height = footer - Scale(8) - history_top - Scale(68)
|
||||
if menu_height < menu_row {
|
||||
menu_height = menu_row
|
||||
}
|
||||
}
|
||||
menu_top := footer - Scale(8) - menu_height
|
||||
if menu_count > 0 {
|
||||
suggestions_top = menu_top
|
||||
} else {
|
||||
menu_scroll = 0
|
||||
}
|
||||
chat_height := suggestions_top - history_top - Scale(8)
|
||||
if chat_height < Scale(60) {
|
||||
chat_height = Scale(60)
|
||||
}
|
||||
if frame.follow_end {
|
||||
frame.scroll = 1000000
|
||||
}
|
||||
// While Lumi answers, its typing dots follow the last message after a
|
||||
// short pause.
|
||||
typing := frame.waiting && !frame.typing_pause
|
||||
typing_height := ifx typing then Scale(70) else 0
|
||||
history := Scroll(frame.session, ScrollProps.{.key = cast(u64)300100,
|
||||
.bounds = Bounds(x, history_top, width, chat_height),
|
||||
.content_height = frame.history_height, .scroll_offset = frame.scroll, .scale = frame.scale})
|
||||
.content_height = frame.history_height + typing_height, .scroll_offset = frame.scroll, .scale = frame.scale})
|
||||
frame.scroll = history.scroll_offset
|
||||
frame.follow_end = history.scroll_offset == history.max_scroll
|
||||
// Older messages load when the chat reaches its top, and at once while
|
||||
// the loaded ones do not fill the chat, which then cannot scroll.
|
||||
load_older := frame.has_older &&
|
||||
(history.max_scroll <= 0 || (!frame.follow_end && frame.scroll <= Scale(96)))
|
||||
anchor_drawn := false
|
||||
if history.opened {
|
||||
first := LumiFirstVisibleRowHost(history.scroll_offset)
|
||||
top := cast(s32)history.content.y + LumiRowOffsetHost(first)
|
||||
@@ -218,7 +668,20 @@ LumiView :: (message: LumiMessage, commands: LumiCommands) -> LumiMessage {
|
||||
row_height := row.height
|
||||
bubble_width := width - Scale(ifx row.user then 60 else 80)
|
||||
left := x + Scale(48)
|
||||
if !row.user {
|
||||
// The whole row takes holds and sweeps; its buttons sit above it.
|
||||
RowPress(index, Bounds(x, top, width, row_height - Scale(10)), history.content.y)
|
||||
if RowSlot(index) == sweep_anchor {
|
||||
anchor_drawn = true
|
||||
}
|
||||
if selecting {
|
||||
checked := IsSelected(index)
|
||||
toggled := Checkbox(frame.session, CheckboxProps.{.key = cast(u64)(420000 + RowSlot(index) + 1),
|
||||
.bounds = Bounds(x + Scale(8), top + (row_height - Scale(10)) / 2 - Scale(12), Scale(24), Scale(24)),
|
||||
.label = LumiViewLocaleHost("lumi_message"), .checked = checked})
|
||||
if toggled.changed {
|
||||
SelectionSet(index, toggled.checked)
|
||||
}
|
||||
} else if !row.user {
|
||||
Image(frame.session, ImageProps.{.key = cast(u64)(300400 + index * 4),
|
||||
.asset_path = "assets/lumi/mascot.png", .alt_text = "Lumi",
|
||||
.bounds = Bounds(x, top + row_height - Scale(54), Scale(40), Scale(40)),
|
||||
@@ -238,13 +701,17 @@ LumiView :: (message: LumiMessage, commands: LumiCommands) -> LumiMessage {
|
||||
card_height := Scale(ifx row.kind == LUMI_CHAT_PROGRESS then 242 else
|
||||
ifx row.kind == LUMI_CHAT_DONATIONS then 500 else ifx row.kind == LUMI_CHAT_FEEDBACK then 54 else 0)
|
||||
text_height := row_height - text_top - Scale(16) - card_height
|
||||
formatted := LumiFormatMessage(row.text, !row.user)
|
||||
Text(frame.session, TextProps.{.key = cast(u64)(300403 + index * 4),
|
||||
.bounds = Bounds(left + Scale(14), top + text_top,
|
||||
props := TextProps.{.key = cast(u64)(300403 + index * 4),
|
||||
.bounds = Bounds(left + Scale(14), top + text_top,
|
||||
bubble_width - Scale(28), text_height),
|
||||
.text = TextFromBytes(formatted.bytes[:formatted.count]),
|
||||
.strong = formatted.strong[:formatted.strong_count],
|
||||
.font = frame.font, .selectable = true, .wrap = cast(TextWrap)TextWrapAuto})
|
||||
.text = row.text, .font = frame.font,
|
||||
.wrap = cast(TextWrap)TextWrapAuto}
|
||||
if !row.user {
|
||||
formatted := ReplyText(index, row.text)
|
||||
props.text = TextFromBytes(formatted.bytes[:formatted.count])
|
||||
props.strong = formatted.strong[:formatted.strong_count]
|
||||
}
|
||||
Text(frame.session, props)
|
||||
card_top := top + text_top + text_height + Scale(8)
|
||||
if row.kind == LUMI_CHAT_PROGRESS {
|
||||
ProgressCard(row, index, left + Scale(14), card_top, bubble_width - Scale(28))
|
||||
@@ -265,8 +732,52 @@ LumiView :: (message: LumiMessage, commands: LumiCommands) -> LumiMessage {
|
||||
}
|
||||
top += row_height
|
||||
}
|
||||
if typing {
|
||||
TypingDots(x, cast(s32)history.content.y + frame.history_height)
|
||||
}
|
||||
// Scrolling can carry the row the sweep began on out of view; its
|
||||
// press stays registered so the sweep goes on.
|
||||
if sweeping && !anchor_drawn {
|
||||
anchor := SlotRow(sweep_anchor)
|
||||
if anchor >= 0 && anchor < frame.chat_count {
|
||||
anchor_top := cast(s32)history.content.y + LumiRowOffsetHost(anchor)
|
||||
RowPress(anchor, Bounds(x, anchor_top, width,
|
||||
ReadLumiChatRowHost(anchor).height - Scale(10)), history.content.y)
|
||||
}
|
||||
}
|
||||
End(frame.session)
|
||||
}
|
||||
// Dragging near the chat's top or bottom scrolls it, faster nearer the
|
||||
// edge, so a sweep can reach every message.
|
||||
if sweeping && sweep_seen {
|
||||
edge := cast(float32)Scale(56)
|
||||
top_edge := cast(float32)Scale(60) + edge
|
||||
bottom_edge := cast(float32)(history_top + chat_height) - edge
|
||||
if sweep_pointer_y < top_edge {
|
||||
step := cast(s32)((top_edge - sweep_pointer_y) / 3.0) + Scale(4)
|
||||
if step > Scale(40) {
|
||||
step = Scale(40)
|
||||
}
|
||||
frame.scroll -= step
|
||||
if frame.scroll < 0 {
|
||||
frame.scroll = 0
|
||||
}
|
||||
frame.follow_end = false
|
||||
} else if sweep_pointer_y > bottom_edge {
|
||||
step := cast(s32)((sweep_pointer_y - bottom_edge) / 3.0) + Scale(4)
|
||||
if step > Scale(40) {
|
||||
step = Scale(40)
|
||||
}
|
||||
frame.scroll += step
|
||||
}
|
||||
}
|
||||
sweep_seen = false
|
||||
if selecting && selected_count <= 0 && !sweeping {
|
||||
SelectionClear()
|
||||
}
|
||||
if selecting {
|
||||
SelectionBar(x, Scale(12), width)
|
||||
}
|
||||
typed := LumiTrim(frame.value)
|
||||
candidates: [20]string = .[commands.start_whm, commands.complete_habit,
|
||||
commands.start_meditation, commands.start_sun, commands.start_patterns,
|
||||
@@ -279,9 +790,10 @@ LumiView :: (message: LumiMessage, commands: LumiCommands) -> LumiMessage {
|
||||
LUMI_LISTS, LUMI_HABITS, LUMI_PRACTICES, LUMI_DIARY, 0, 0, 0, 0, 0, LUMI_DIARY, LUMI_PRACTICES, 0]
|
||||
suggestion_count: s32 = 0
|
||||
selected: bool
|
||||
limit: s32 = 2
|
||||
chip_width := (width - Scale(8)) / limit
|
||||
action := LumiIntent(typed, commands)
|
||||
// The command list replaces the suggestion chips while it is open.
|
||||
limit: s32 = ifx menu_count > 0 then 0 else 2
|
||||
chip_width := (width - Scale(8)) / 2
|
||||
action := DraftIntent(typed, commands, revision)
|
||||
if action.kind == 0 && frame.choosing_habit {
|
||||
action = LumiAction.{.kind = LUMI_COMPLETE_HABIT, .title = typed}
|
||||
}
|
||||
@@ -312,11 +824,26 @@ LumiView :: (message: LumiMessage, commands: LumiCommands) -> LumiMessage {
|
||||
suggestion_count += 1
|
||||
}
|
||||
}
|
||||
// Suggestions are offered only for typed text, so their commands are read
|
||||
// once typing starts and opening Lumi never waits for them.
|
||||
if revision != candidate_revision {
|
||||
candidate_revision = revision
|
||||
candidate_ready = 0
|
||||
}
|
||||
if typed.count > 0 {
|
||||
prepared: s32 = 0
|
||||
while candidate_ready < 20 && prepared < LUMI_CANDIDATES_PER_FRAME {
|
||||
candidate_actions[candidate_ready] = LumiIntent(candidates[candidate_ready], commands)
|
||||
candidate_ready += 1
|
||||
prepared += 1
|
||||
}
|
||||
}
|
||||
for index: cast(s32)0..cast(s32)19 {
|
||||
if typed.count == 0 || frame.choosing_diary || action.kind == LUMI_COMPLETE_HABIT || suggestion_count >= limit {
|
||||
if typed.count == 0 || frame.choosing_diary || action.kind == LUMI_COMPLETE_HABIT || suggestion_count >= limit ||
|
||||
index >= candidate_ready {
|
||||
break
|
||||
}
|
||||
candidate_action := LumiIntent(candidates[index], commands)
|
||||
candidate_action := candidate_actions[index]
|
||||
practice_match := action.kind == LUMI_START_PRACTICE && candidate_action.kind == LUMI_START_PRACTICE &&
|
||||
action.practice == candidate_action.practice
|
||||
if (requirements[index] != 0 && (frame.available_apps & requirements[index]) == 0) || suggestion_count >= limit ||
|
||||
@@ -333,13 +860,79 @@ LumiView :: (message: LumiMessage, commands: LumiCommands) -> LumiMessage {
|
||||
Bounds(x + suggestion_count * (chip_width + Scale(8)), suggestions_top, chip_width, Scale(36))) || selected
|
||||
suggestion_count += 1
|
||||
}
|
||||
chosen: s32 = -1
|
||||
if menu_count > 0 {
|
||||
Box(frame.session, BoxProps.{.key = cast(u64)360000,
|
||||
.bounds = Bounds(x, menu_top, width, menu_height),
|
||||
.fill = Color.{156, 156, 156, 24}, .radius = cast(float32)Scale(12)})
|
||||
menu_list := Scroll(frame.session, ScrollProps.{.key = cast(u64)360001,
|
||||
.bounds = Bounds(x, menu_top, width, menu_height),
|
||||
.content_height = menu_count * menu_row, .scroll_offset = menu_scroll, .scale = frame.scale})
|
||||
menu_scroll = menu_list.scroll_offset
|
||||
if menu_list.opened {
|
||||
name_width := Scale(104)
|
||||
for row: cast(s32)0..menu_count - 1 {
|
||||
top := cast(s32)menu_list.content.y + row * menu_row
|
||||
if top + menu_row < menu_top || top > menu_top + menu_height {
|
||||
continue
|
||||
}
|
||||
index := menu_matches[row]
|
||||
command := menu[index]
|
||||
key := 360100 + index * 4
|
||||
if row == menu_target {
|
||||
Box(frame.session, BoxProps.{.key = cast(u64)key,
|
||||
.bounds = Bounds(x, top, width, menu_row),
|
||||
.fill = Color.{156, 188, 143, 48}, .radius = cast(float32)Scale(12)})
|
||||
}
|
||||
if Button(frame.session, ButtonProps.{.id = 360200 + index,
|
||||
.bounds = Bounds(x, top, width, menu_row), .invisible = true,
|
||||
.label = command.description}) != 0 {
|
||||
chosen = index
|
||||
}
|
||||
strong: [1]TextRange = .[TextRange.{.start = 0, .end = cast(s32)command.name.count}]
|
||||
Text(frame.session, TextProps.{.key = cast(u64)(key + 1),
|
||||
.bounds = Bounds(x + Scale(16), top, name_width, menu_row),
|
||||
.text = command.name, .font = frame.font, .strong = strong[:],
|
||||
.wrap = cast(TextWrap)TextWrapNone, .vertical_align = cast(TextAlign)TextAlignCenter})
|
||||
// Long translations wrap to a second line on narrow phones.
|
||||
Text(frame.session, TextProps.{.key = cast(u64)(key + 2),
|
||||
.bounds = Bounds(x + Scale(16) + name_width, top,
|
||||
width - Scale(32) - name_width, menu_row),
|
||||
.text = command.description, .font = Scale(14),
|
||||
.wrap = cast(TextWrap)TextWrapAuto, .vertical_align = cast(TextAlign)TextAlignCenter})
|
||||
}
|
||||
End(frame.session)
|
||||
}
|
||||
}
|
||||
// As in Telegram, an empty draft offers the command button and a draft
|
||||
// offers Send. A pending answer keeps Send visible as its progress.
|
||||
show_commands := LumiTrim(frame.value).count == 0 && !frame.waiting
|
||||
if show_commands && Button(frame.session, ButtonProps.{.id = 30012,
|
||||
.bounds = Bounds(x + width - Scale(48), footer, Scale(48), Scale(48)),
|
||||
.label = LumiViewLocaleHost("lumi_commands"), .icon_shape = LUMI_COMMANDS_ICON, .icon_only = true,
|
||||
.tone = cast(ButtonTone)ButtonToneNeutral, .emphasis = cast(ButtonEmphasis)ButtonEmphasisGhost}) != 0 {
|
||||
FillDraft("/")
|
||||
selected = true
|
||||
}
|
||||
// The command button and the list keep typing in the draft, as Telegram
|
||||
// does, rather than leaving the focus on the pressed button. Apps built
|
||||
// before Kryon's focus fix give the focus back to that button on the
|
||||
// next frame, so the request lasts two frames.
|
||||
if selected || chosen >= 0 {
|
||||
focus_request = 2
|
||||
}
|
||||
field_input := frame.input
|
||||
if focus_request > 0 {
|
||||
field_input.focus = true
|
||||
focus_request -= 1
|
||||
}
|
||||
field := TextArea(frame.session, TextAreaProps.{.key = cast(u64)300200, .focus_id = 30010,
|
||||
.bounds = Bounds(x, footer, width - Scale(80), input_height),
|
||||
.bounds = Bounds(x, footer, width - Scale(56), input_height),
|
||||
.value = frame.value, .placeholder = LumiViewLocaleHost("lumi_placeholder"), .label = "Lumi",
|
||||
.cursor = frame.cursor, .anchor = frame.anchor, .scroll_y = frame.input_scroll,
|
||||
.selecting = frame.selecting, .preferred_x = frame.preferred_x,
|
||||
.preferred_x_valid = frame.preferred_x_valid, .wrap = true,
|
||||
.focused = frame.focused, .input = frame.input, .max_bytes = LUMI_INPUT_MAX - 1,
|
||||
.focused = frame.focused, .input = field_input, .max_bytes = LUMI_INPUT_MAX - 1,
|
||||
.max_codepoints = LUMI_INPUT_MAX - 1})
|
||||
if !selected {
|
||||
if field.edit.changed && field.edit.start >= 0 && field.edit.end >= field.edit.start &&
|
||||
@@ -363,17 +956,38 @@ LumiView :: (message: LumiMessage, commands: LumiCommands) -> LumiMessage {
|
||||
}
|
||||
frame.clipboard_write = field.clipboard_write
|
||||
frame.clipboard_text = field.clipboard_text
|
||||
send := Button(frame.session, ButtonProps.{.id = 30011,
|
||||
.bounds = Bounds(x + width - Scale(72), footer, Scale(72), Scale(48)),
|
||||
.label = LumiViewLocaleHost("lumi_send"), .disabled = frame.waiting,
|
||||
.loading = frame.waiting, .tone = cast(ButtonTone)ButtonToneNeutral,
|
||||
.emphasis = cast(ButtonEmphasis)ButtonEmphasisSoft}) != 0
|
||||
if !frame.waiting && (send || field.committed) && LumiTrim(frame.value).count > 0 && !selected {
|
||||
if copy_pending {
|
||||
frame.clipboard_write = true
|
||||
frame.clipboard_text = pending_copy
|
||||
copy_pending = false
|
||||
}
|
||||
send := !show_commands && Button(frame.session, ButtonProps.{.id = 30011,
|
||||
.bounds = Bounds(x + width - Scale(48), footer, Scale(48), Scale(48)),
|
||||
.label = LumiViewLocaleHost("lumi_send"), .icon_shape = LUMI_SEND_ICON, .icon_only = true,
|
||||
.disabled = frame.waiting, .loading = frame.waiting, .tone = cast(ButtonTone)ButtonToneNeutral,
|
||||
.emphasis = cast(ButtonEmphasis)ButtonEmphasisGhost}) != 0
|
||||
if chosen < 0 && field.committed && !send && menu_target >= 0 && !frame.waiting && !selected {
|
||||
chosen = menu_matches[menu_target]
|
||||
}
|
||||
submit := ""
|
||||
if chosen >= 0 {
|
||||
// A command that needs text, or one chosen while Lumi is answering,
|
||||
// waits in the draft.
|
||||
text := CommandText(menu[chosen])
|
||||
if menu[chosen].needs_text || frame.waiting {
|
||||
FillDraft(text)
|
||||
} else {
|
||||
submit = text
|
||||
}
|
||||
} else if !frame.waiting && (send || field.committed) && LumiTrim(frame.value).count > 0 && !selected {
|
||||
submit = frame.value
|
||||
}
|
||||
if submit.count > 0 {
|
||||
message.action = LUMI_SEND
|
||||
// The host owns the draft buffer. Keep the submitted text before
|
||||
// WriteLumiUiHost clears that buffer for the next message.
|
||||
submitted: Vec(u8)
|
||||
BuilderPrint(*submitted, "%", frame.value)
|
||||
BuilderPrint(*submitted, "%", submit)
|
||||
message.input = BuilderFinish(submitted)
|
||||
frame.value = ""
|
||||
frame.cursor = 0
|
||||
@@ -385,7 +999,7 @@ LumiView :: (message: LumiMessage, commands: LumiCommands) -> LumiMessage {
|
||||
frame.follow_end = true
|
||||
}
|
||||
WriteLumiUiHost(frame)
|
||||
if message.action != LUMI_SEND && frame.has_older && !frame.follow_end && frame.scroll <= Scale(96) {
|
||||
if message.action != LUMI_SEND && load_older {
|
||||
unused LumiLoadOlderHost()
|
||||
}
|
||||
return message
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
## [1.1.4] - 2026-10-10
|
||||
|
||||
- Requires Inner Breeze 2.1.28 or later.
|
||||
|
||||
## [1.1.3] - 2026-10-07
|
||||
|
||||
- Keep app labels and content visible after updating Inner Breeze.
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
"inbe.practices",
|
||||
"inbe.lists",
|
||||
"inbe.diary",
|
||||
"inbe.lumi"
|
||||
"inbe.lumi",
|
||||
"inbe.leaderboard"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -1,42 +1,56 @@
|
||||
{
|
||||
"host_api": 4,
|
||||
"host_api": 7,
|
||||
"oldest_host_api": 5,
|
||||
"module_api": 2,
|
||||
"apps": {
|
||||
"inbe": {
|
||||
"id": "inbe",
|
||||
"version": "2.1.17",
|
||||
"sequence": 14,
|
||||
"bundled": true
|
||||
"version": "2.1.29",
|
||||
"sequence": 26,
|
||||
"bundled": true,
|
||||
"host_api": 7
|
||||
},
|
||||
"habits": {
|
||||
"id": "inbe.habits",
|
||||
"version": "1.0.3",
|
||||
"sequence": 4,
|
||||
"bundled": true
|
||||
"version": "1.0.4",
|
||||
"sequence": 5,
|
||||
"bundled": true,
|
||||
"host_api": 5
|
||||
},
|
||||
"practices": {
|
||||
"id": "inbe.practices",
|
||||
"version": "1.1.3",
|
||||
"sequence": 5,
|
||||
"bundled": true
|
||||
"version": "1.1.4",
|
||||
"sequence": 6,
|
||||
"bundled": true,
|
||||
"host_api": 5
|
||||
},
|
||||
"lists": {
|
||||
"id": "inbe.lists",
|
||||
"version": "1.0.3",
|
||||
"sequence": 4,
|
||||
"bundled": true
|
||||
"version": "1.0.5",
|
||||
"sequence": 6,
|
||||
"bundled": true,
|
||||
"host_api": 5
|
||||
},
|
||||
"diary": {
|
||||
"id": "inbe.diary",
|
||||
"version": "1.1.2",
|
||||
"sequence": 4,
|
||||
"bundled": true
|
||||
"version": "1.1.9",
|
||||
"sequence": 11,
|
||||
"bundled": true,
|
||||
"host_api": 7
|
||||
},
|
||||
"lumi": {
|
||||
"id": "inbe.lumi",
|
||||
"version": "1.3.2",
|
||||
"sequence": 9,
|
||||
"bundled": true
|
||||
"version": "1.3.9",
|
||||
"sequence": 16,
|
||||
"bundled": true,
|
||||
"host_api": 7
|
||||
},
|
||||
"leaderboard": {
|
||||
"id": "inbe.leaderboard",
|
||||
"version": "1.0.1",
|
||||
"sequence": 2,
|
||||
"bundled": true,
|
||||
"host_api": 5
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -218,6 +218,209 @@
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "set_habit_schedule",
|
||||
"description": "Set which days a habit is planned, from today on, using its exact ID, and whether it sends a notification on those days. Earlier days keep the schedule they had, and nothing recorded is removed. repeat daily, weekly, monthly or yearly repeats every N (every) days, weeks, months or years from start. weekly plans weekdays. monthly plans month_days (31 also means a shorter month's last day) and last_day_of_month, or with week_of_month the weekdays in that week, such as the last fri. yearly repeats on start's month and day. formula plans each day where formula is not 0; its numbers are days, weeks, months and years since start, weekday (mon 1 to sun 7), day, month, year, yearday, daysleft (in the month) and nth (which such weekday of the month), with + - * / %, = != < > <= >=, and, or, not and parentheses, for example days % 3 = 0. none plans no days.",
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"repeat": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"daily",
|
||||
"weekly",
|
||||
"monthly",
|
||||
"yearly",
|
||||
"formula",
|
||||
"none"
|
||||
]
|
||||
},
|
||||
"every": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 999
|
||||
},
|
||||
"weekdays": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"mon",
|
||||
"tue",
|
||||
"wed",
|
||||
"thu",
|
||||
"fri",
|
||||
"sat",
|
||||
"sun"
|
||||
]
|
||||
}
|
||||
},
|
||||
"month_days": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 31
|
||||
}
|
||||
},
|
||||
"last_day_of_month": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"week_of_month": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"first",
|
||||
"second",
|
||||
"third",
|
||||
"fourth",
|
||||
"fifth",
|
||||
"last"
|
||||
]
|
||||
},
|
||||
"start": {
|
||||
"type": "string",
|
||||
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
|
||||
},
|
||||
"formula": {
|
||||
"type": "string",
|
||||
"maxLength": 119
|
||||
},
|
||||
"notification": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"notification_hour": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 23
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"repeat"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "set_habit_questions",
|
||||
"description": "Set the questions a habit asks when a day is done, using its exact ID. They replace its questions; a question with the same words as one it has keeps that question's past answers. Each question is answered as text, number (a whole number), time (H:MM) or yes_no. good says which answers are good: above_average or below_average for numbers and times judges each answer against the average of the answers before it (higher or lower is better; for times below means earlier), at_least, at_most or between low and high for numbers (whole numbers) and times (H:MM, where at_least means after and at_most before, and between a later and an earlier time spans midnight), yes or no for yes_no questions, or none. Without good, numbers are good above their average and times below it. With an empty list the habit asks nothing.",
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"questions": {
|
||||
"type": "array",
|
||||
"maxItems": 8,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"text": {
|
||||
"type": "string",
|
||||
"minLength": 1,
|
||||
"maxLength": 95
|
||||
},
|
||||
"answer": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"text",
|
||||
"number",
|
||||
"time",
|
||||
"yes_no"
|
||||
]
|
||||
},
|
||||
"good": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"none",
|
||||
"above_average",
|
||||
"below_average",
|
||||
"at_least",
|
||||
"at_most",
|
||||
"between",
|
||||
"yes",
|
||||
"no"
|
||||
]
|
||||
},
|
||||
"low": {
|
||||
"type": [
|
||||
"integer",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
"high": {
|
||||
"type": [
|
||||
"integer",
|
||||
"string"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"text",
|
||||
"answer"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"questions"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "set_habit_tracking",
|
||||
"description": "Set how a habit tracks a day, using its exact ID: check marks the day done, count counts up to target a day, and span measures from a start to an end, where a tap starts it and the next ends it, for example a fasting window. A habit counts or measures spans, not both. For spans, good says which are good by their length: at_least, at_most or between low and high, written as hours and minutes H:MM (for example at_most 8:00 for an 8 hour eating window, at_least 16:00 for a fast), below_average for shorter than the average of the spans before (the default), above_average for longer, or none.",
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"mode": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"check",
|
||||
"count",
|
||||
"span"
|
||||
]
|
||||
},
|
||||
"target": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 9999
|
||||
},
|
||||
"good": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"none",
|
||||
"above_average",
|
||||
"below_average",
|
||||
"at_least",
|
||||
"at_most",
|
||||
"between"
|
||||
]
|
||||
},
|
||||
"low": {
|
||||
"type": "string"
|
||||
},
|
||||
"high": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"id",
|
||||
"mode"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "write_diary",
|
||||
"description": "Append the requested text to today's diary with the current time. Preserve the user's wording.",
|
||||
@@ -320,5 +523,302 @@
|
||||
"annotations": {
|
||||
"readOnlyHint": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "read_style",
|
||||
"description": "Read editable KSS, saved and live preview sources, shipped app/style-pack defaults, precedence and current revision for a scope. Always read before editing; preserve existing edits. Use supported KSS properties and existing component classes.",
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"scope": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"all",
|
||||
"lists",
|
||||
"habits",
|
||||
"practices",
|
||||
"diary",
|
||||
"lumi"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"scope"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"annotations": {
|
||||
"readOnlyHint": true,
|
||||
"destructiveHint": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "inspect_style",
|
||||
"description": "Inspect effective values and matching source rules for a widget/class/state in the selected scope. This reads the last valid preview without changing it.",
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"scope": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"all",
|
||||
"lists",
|
||||
"habits",
|
||||
"practices",
|
||||
"diary",
|
||||
"lumi"
|
||||
]
|
||||
},
|
||||
"widget": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"App",
|
||||
"Button",
|
||||
"Text",
|
||||
"Card",
|
||||
"TextArea",
|
||||
"TextField",
|
||||
"NavigationBar",
|
||||
"NavigationBarItem",
|
||||
"Image",
|
||||
"Surface"
|
||||
]
|
||||
},
|
||||
"class": {
|
||||
"type": "string",
|
||||
"maxLength": 63
|
||||
},
|
||||
"state": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"normal",
|
||||
"hover",
|
||||
"pressed",
|
||||
"focus",
|
||||
"selected",
|
||||
"disabled"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"scope",
|
||||
"widget",
|
||||
"state"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"annotations": {
|
||||
"readOnlyHint": true,
|
||||
"destructiveHint": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "preview_style",
|
||||
"description": "Replace the selected custom KSS draft and preview validated changes immediately. Invalid code remains editable and leaves the last working appearance intact. This does not save. Read the current revision first; send the complete custom sheet, preserving unrelated rules.",
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"scope": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"all",
|
||||
"lists",
|
||||
"habits",
|
||||
"practices",
|
||||
"diary",
|
||||
"lumi"
|
||||
]
|
||||
},
|
||||
"revision": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"description": "The latest revision returned by read_style or the last successful style operation. Read again if another edit changed it."
|
||||
},
|
||||
"source": {
|
||||
"type": "string",
|
||||
"maxLength": 8191
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"scope",
|
||||
"revision",
|
||||
"source"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"annotations": {
|
||||
"readOnlyHint": false,
|
||||
"destructiveHint": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "save_style",
|
||||
"description": "Validate and save the selected custom KSS draft for this account. Use after the user requests applying or keeping the preview.",
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"scope": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"all",
|
||||
"lists",
|
||||
"habits",
|
||||
"practices",
|
||||
"diary",
|
||||
"lumi"
|
||||
]
|
||||
},
|
||||
"revision": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"description": "The latest revision returned by read_style or the last successful style operation. Read again if another edit changed it."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"scope",
|
||||
"revision"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"annotations": {
|
||||
"readOnlyHint": false,
|
||||
"destructiveHint": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "reset_style",
|
||||
"description": "Reset the selected customization to its shipped default by saving an empty override. Other scopes and app data remain intact.",
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"scope": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"all",
|
||||
"lists",
|
||||
"habits",
|
||||
"practices",
|
||||
"diary",
|
||||
"lumi"
|
||||
]
|
||||
},
|
||||
"revision": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"description": "The latest revision returned by read_style or the last successful style operation. Read again if another edit changed it."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"scope",
|
||||
"revision"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"annotations": {
|
||||
"readOnlyHint": false,
|
||||
"destructiveHint": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "undo_style",
|
||||
"description": "Undo the latest edit in this scope and preview the restored draft. It is not saved until save_style.",
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"scope": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"all",
|
||||
"lists",
|
||||
"habits",
|
||||
"practices",
|
||||
"diary",
|
||||
"lumi"
|
||||
]
|
||||
},
|
||||
"revision": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"description": "The latest revision returned by read_style or the last successful style operation. Read again if another edit changed it."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"scope",
|
||||
"revision"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"annotations": {
|
||||
"readOnlyHint": false,
|
||||
"destructiveHint": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "discard_style",
|
||||
"description": "Discard unsaved changes in this scope and restore its saved appearance.",
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"scope": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"all",
|
||||
"lists",
|
||||
"habits",
|
||||
"practices",
|
||||
"diary",
|
||||
"lumi"
|
||||
]
|
||||
},
|
||||
"revision": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"description": "The latest revision returned by read_style or the last successful style operation. Read again if another edit changed it."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"scope",
|
||||
"revision"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"annotations": {
|
||||
"readOnlyHint": false,
|
||||
"destructiveHint": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "format_style",
|
||||
"description": "Format the current KSS draft without changing its meaning, then preview it. Saving is separate.",
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"scope": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"all",
|
||||
"lists",
|
||||
"habits",
|
||||
"practices",
|
||||
"diary",
|
||||
"lumi"
|
||||
]
|
||||
},
|
||||
"revision": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"description": "The latest revision returned by read_style or the last successful style operation. Read again if another edit changed it."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"scope",
|
||||
"revision"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"annotations": {
|
||||
"readOnlyHint": false,
|
||||
"destructiveHint": false
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -9,6 +9,8 @@ tokens {
|
||||
review-added: #17663a;
|
||||
review-removed: #b3261e;
|
||||
review-changed: #805000;
|
||||
storage-warning: #a36200;
|
||||
storage-full: #b3261e;
|
||||
launcher-canvas: #14202b;
|
||||
launcher-panel: #1d2c39;
|
||||
launcher-hover: #293d4c;
|
||||
@@ -16,6 +18,8 @@ tokens {
|
||||
launcher-muted: #adc1cd;
|
||||
launcher-selection: #99deb8;
|
||||
launcher-ink: #18352a;
|
||||
launcher-selected-hover: #8fd0ad;
|
||||
launcher-selected-pressed: #84c2a2;
|
||||
launcher-border: #344957;
|
||||
}
|
||||
}
|
||||
@@ -32,9 +36,21 @@ Text.review-changed {
|
||||
Text.review-detail {
|
||||
foreground: muted;
|
||||
}
|
||||
Text.muted-detail {
|
||||
foreground: muted;
|
||||
}
|
||||
Text.review-heading {
|
||||
foreground: text;
|
||||
}
|
||||
Text.storage-detail {
|
||||
foreground: muted;
|
||||
}
|
||||
Text.storage-warning {
|
||||
foreground: storage-warning;
|
||||
}
|
||||
Text.storage-full {
|
||||
foreground: storage-full;
|
||||
}
|
||||
|
||||
Text.practice-heading {
|
||||
foreground: text;
|
||||
@@ -42,8 +58,9 @@ Text.practice-heading {
|
||||
Text.selected-navigation {
|
||||
foreground: text;
|
||||
}
|
||||
// Counts and times drawn on the accent circle use the accent's own ink.
|
||||
Text.circle-ink {
|
||||
foreground: #171022;
|
||||
foreground: accent-ink;
|
||||
}
|
||||
|
||||
// Style packs pair their own accent-soft with accent text. Inbe replaces
|
||||
@@ -125,11 +142,33 @@ Button.launcher-tile:pressed {
|
||||
background-end: launcher-hover;
|
||||
border: launcher-selection;
|
||||
}
|
||||
Button.launcher-tile:selected {
|
||||
background: launcher-panel;
|
||||
background-end: launcher-panel;
|
||||
foreground: launcher-selection;
|
||||
border: launcher-selection;
|
||||
Button.launcher-tile[tone=Accent][emphasis=Filled] {
|
||||
background: launcher-selection;
|
||||
background-end: launcher-selection;
|
||||
foreground: launcher-ink;
|
||||
border: launcher-text;
|
||||
border-width: 2;
|
||||
}
|
||||
Button.launcher-tile[tone=Accent][emphasis=Filled]:hover {
|
||||
background: launcher-selected-hover;
|
||||
background-end: launcher-selected-hover;
|
||||
}
|
||||
Button.launcher-tile[tone=Accent][emphasis=Filled]:pressed {
|
||||
background: launcher-selected-pressed;
|
||||
background-end: launcher-selected-pressed;
|
||||
}
|
||||
// The install or remove symbol inside an app card uses its card's ink.
|
||||
// Rules stay few: every style pack plus this sheet must fit the KSS rule
|
||||
// table (style-apply-zi-test), so hover uses the style pack default.
|
||||
Button.launcher-action {
|
||||
background: #00000000;
|
||||
background-end: #00000000;
|
||||
foreground: launcher-text;
|
||||
border: #00000000;
|
||||
radius: 10;
|
||||
}
|
||||
Button.launcher-action[tone=Accent] {
|
||||
foreground: launcher-ink;
|
||||
}
|
||||
NavigationBar.launcher-dock { background: launcher-canvas; }
|
||||
NavigationBarItem.launcher-dock {
|
||||
@@ -141,7 +180,7 @@ NavigationBarItem.launcher-dock {
|
||||
radius: 14;
|
||||
font-size: 12;
|
||||
icon-size: 24;
|
||||
gap: 8;
|
||||
gap: 2;
|
||||
padding-x: 3;
|
||||
padding-y: 6;
|
||||
offset-x: 0;
|
||||
@@ -149,13 +188,24 @@ NavigationBarItem.launcher-dock {
|
||||
}
|
||||
NavigationBarItem.launcher-dock:hover { background: launcher-hover; background-end: launcher-hover; padding-x: 3; padding-y: 6; }
|
||||
NavigationBarItem.launcher-dock:pressed { background: launcher-panel; background-end: launcher-panel; }
|
||||
NavigationBarItem.launcher-dock:selected {
|
||||
// Filled accent identifies the active route even during hover and press.
|
||||
NavigationBarItem.launcher-dock[tone=Accent][emphasis=Filled] {
|
||||
background: launcher-selection;
|
||||
background-end: launcher-selection;
|
||||
foreground: launcher-ink;
|
||||
border: launcher-text;
|
||||
border-width: 2;
|
||||
padding-x: 3;
|
||||
padding-y: 6;
|
||||
}
|
||||
NavigationBarItem.launcher-dock[tone=Accent][emphasis=Filled]:hover {
|
||||
background: launcher-selected-hover;
|
||||
background-end: launcher-selected-hover;
|
||||
}
|
||||
NavigationBarItem.launcher-dock[tone=Accent][emphasis=Filled]:pressed {
|
||||
background: launcher-selected-pressed;
|
||||
background-end: launcher-selected-pressed;
|
||||
}
|
||||
Button.launcher-pin {
|
||||
background: #00000000;
|
||||
background-end: #00000000;
|
||||
|
||||
|
Before Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 67 KiB |
|
Before Width: | Height: | Size: 3.2 MiB |
|
Before Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 68 KiB |
|
Before Width: | Height: | Size: 71 KiB |
|
Before Width: | Height: | Size: 3.3 MiB |
|
Before Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 3.4 MiB After Width: | Height: | Size: 3.4 MiB |
|
Before Width: | Height: | Size: 3.7 MiB After Width: | Height: | Size: 3.7 MiB |
|
Before Width: | Height: | Size: 3.9 MiB After Width: | Height: | Size: 3.9 MiB |
|
Before Width: | Height: | Size: 2.7 MiB After Width: | Height: | Size: 2.7 MiB |
|
Before Width: | Height: | Size: 3.5 MiB After Width: | Height: | Size: 3.5 MiB |
|
Before Width: | Height: | Size: 3.7 MiB After Width: | Height: | Size: 3.7 MiB |
|
After Width: | Height: | Size: 2.3 MiB |
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"model": "google/gemini-3.1-flash-image",
|
||||
"elapsed_seconds": 22.35,
|
||||
"dimensions": [
|
||||
2048,
|
||||
2048
|
||||
],
|
||||
"usage": {
|
||||
"prompt_tokens": 5181,
|
||||
"completion_tokens": 1680,
|
||||
"total_tokens": 6861,
|
||||
"cost": 0.1033905,
|
||||
"is_byok": false,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 0,
|
||||
"cache_write_tokens": 0,
|
||||
"audio_tokens": 0,
|
||||
"video_tokens": 0
|
||||
},
|
||||
"cost_details": {
|
||||
"upstream_inference_cost": 0.1033905,
|
||||
"upstream_inference_prompt_cost": 0.0025905,
|
||||
"upstream_inference_completions_cost": 0.1008
|
||||
},
|
||||
"completion_tokens_details": {
|
||||
"reasoning_tokens": 0,
|
||||
"image_tokens": 1680
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"model": "google/gemini-3.1-flash-image",
|
||||
"prompt": "Use case: precise-object-edit\nAsset type: detached torso-only garment for a paper-doll animation rig.\nInput images: Image 1 is the new character's painted parts and defines the EXACT palette and matte illustration style. Image 2 is the exact torso-only shape/orientation guide; image 3 is the Inner Breeze banner style reference.\nPrimary request: Paint ONLY the separate TORSO clothing piece for this character: The adult MALE counterpart of the sunrise ponytail woman: a grown man with the same warm light peach skin, dark honey-brown hair in a very short tied-back low ponytail (the entire tail fits inside the head tile, hair fully off the face and neck), slightly thicker straight brows, small soft brown eyes and a calm quiet expression. Natural adult male proportions with slightly broader shoulders, flatter chest and a hint of an adult jaw. A plain muted lake-teal long-sleeve exercise top with a round neckline, olive-sage leggings, bare feet. No hood, no ribbon, no beard.\nComposition: Right-facing profile garment, centered on pure white with ample margin. Match the torso outline and geometry in image 2: shoulder joint is at the upper LEFT, chest at upper RIGHT, waist and hem below. This is the vest-shaped body panel of the exercise shirt, NOT a complete shirt with hanging arms. The arm is supplied by a different animation asset. Keep the softly outlined round shoulder attachment area on the upper left, but NO sleeve extending downward. Keep the bottom hem covering the hips.\nStyle: Match image 1's clothing paint exactly, muted color with soft gouache texture and quiet warm contour lines.\nConstraints: Only torso garment fabric may be visible. ZERO SKIN, ZERO NECK, ZERO HEAD, ZERO ARMS, ZERO SLEEVES EXTENDING FROM THE BODY, ZERO HANDS, ZERO PANTS, ZERO LEGS. No hood, no ribbon, no red bow. Do not include the head or any other pieces from image 1. Stop at the neckline and shirt hem. Use a plain small round neck opening. Preserve the shirt color from image 1. No labels, text, grid or ground shadow. One isolated torso clothing panel only, flat side profile as in image 2.\n",
|
||||
"usage": {
|
||||
"prompt_tokens": 3825,
|
||||
"completion_tokens": 1680,
|
||||
"total_tokens": 5505,
|
||||
"cost": 0.1027125,
|
||||
"is_byok": false,
|
||||
"prompt_tokens_details": {
|
||||
"cached_tokens": 0,
|
||||
"cache_write_tokens": 0,
|
||||
"audio_tokens": 0,
|
||||
"video_tokens": 0
|
||||
},
|
||||
"cost_details": {
|
||||
"upstream_inference_cost": 0.1027125,
|
||||
"upstream_inference_prompt_cost": 0.0019125,
|
||||
"upstream_inference_completions_cost": 0.1008
|
||||
},
|
||||
"completion_tokens_details": {
|
||||
"reasoning_tokens": 0,
|
||||
"image_tokens": 1680
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 3.6 MiB |
@@ -0,0 +1,570 @@
|
||||
{
|
||||
"about": "Pose timeline, rig, camera and painted-part key points for scripts/render-sun-salutation-girl.py. Positions are rig units (x right, y down, the floor at y = ground); angles are degrees, 0 = right, 90 = down. Part key points are fractions of each part image's trimmed box.",
|
||||
"output": {
|
||||
"width": 1536,
|
||||
"height": 1024,
|
||||
"fps": 30,
|
||||
"detail": 1.6
|
||||
},
|
||||
"camera": {
|
||||
"designWidth": 1536,
|
||||
"designHeight": 1024,
|
||||
"centerX": 780,
|
||||
"groundY": 925,
|
||||
"scale": 1.75,
|
||||
"rigX": 630
|
||||
},
|
||||
"ground": 435,
|
||||
"bones": {
|
||||
"torso": 110,
|
||||
"upperArm": 64,
|
||||
"forearm": 64,
|
||||
"thigh": 96,
|
||||
"shin": 96,
|
||||
"farOffset": [
|
||||
-5,
|
||||
-1
|
||||
]
|
||||
},
|
||||
"timing": {
|
||||
"hold": 1.5,
|
||||
"transition": 2.0,
|
||||
"breath": 0.15
|
||||
},
|
||||
"reach": {
|
||||
"leg": 191.5,
|
||||
"arm": 127.5
|
||||
},
|
||||
"names": [
|
||||
"Mountain / prayer pose",
|
||||
"Upward salute",
|
||||
"Standing forward fold",
|
||||
"Half lift",
|
||||
"High plank",
|
||||
"Low plank",
|
||||
"Upward-facing dog",
|
||||
"Downward-facing dog",
|
||||
"Half lift",
|
||||
"Standing forward fold",
|
||||
"Upward salute",
|
||||
"Mountain / prayer pose"
|
||||
],
|
||||
"sequence": [
|
||||
"mountain",
|
||||
"salute",
|
||||
"fold",
|
||||
"lift",
|
||||
"plank",
|
||||
"low",
|
||||
"upDog",
|
||||
"downDog",
|
||||
"lift",
|
||||
"fold",
|
||||
"salute",
|
||||
"mountain"
|
||||
],
|
||||
"poses": {
|
||||
"mountain": {
|
||||
"hip": [
|
||||
626,
|
||||
226
|
||||
],
|
||||
"spine": -90,
|
||||
"gaze": -90,
|
||||
"ankles": [
|
||||
630,
|
||||
417
|
||||
],
|
||||
"wrists": [
|
||||
691,
|
||||
128
|
||||
],
|
||||
"upright": 1
|
||||
},
|
||||
"salute": {
|
||||
"hip": [
|
||||
626,
|
||||
226
|
||||
],
|
||||
"spine": -90,
|
||||
"gaze": -98,
|
||||
"ankles": [
|
||||
630,
|
||||
417
|
||||
],
|
||||
"wrists": [
|
||||
626,
|
||||
-11
|
||||
],
|
||||
"upright": 1
|
||||
},
|
||||
"fold": {
|
||||
"hip": [
|
||||
626,
|
||||
226
|
||||
],
|
||||
"spine": 60,
|
||||
"gaze": 30,
|
||||
"ankles": [
|
||||
630,
|
||||
417
|
||||
],
|
||||
"wrists": [
|
||||
662,
|
||||
425
|
||||
],
|
||||
"palm": 1
|
||||
},
|
||||
"lift": {
|
||||
"hip": [
|
||||
626,
|
||||
226
|
||||
],
|
||||
"spine": 1,
|
||||
"gaze": -75,
|
||||
"ankles": [
|
||||
630,
|
||||
417
|
||||
],
|
||||
"wrists": [
|
||||
643,
|
||||
332
|
||||
]
|
||||
},
|
||||
"plank": {
|
||||
"hip": [
|
||||
622,
|
||||
329
|
||||
],
|
||||
"spine": -19,
|
||||
"gaze": -80,
|
||||
"ankles": [
|
||||
441,
|
||||
391
|
||||
],
|
||||
"wrists": [
|
||||
727,
|
||||
421
|
||||
],
|
||||
"foot": 0.8,
|
||||
"palm": 1
|
||||
},
|
||||
"low": {
|
||||
"hip": [
|
||||
631,
|
||||
374
|
||||
],
|
||||
"spine": -5,
|
||||
"gaze": -80,
|
||||
"ankles": [
|
||||
441,
|
||||
391
|
||||
],
|
||||
"wrists": [
|
||||
727,
|
||||
421
|
||||
],
|
||||
"foot": 0.8,
|
||||
"palm": 1
|
||||
},
|
||||
"upDog": {
|
||||
"hip": [
|
||||
644,
|
||||
369
|
||||
],
|
||||
"spine": -44,
|
||||
"gaze": -100,
|
||||
"ankles": [
|
||||
460,
|
||||
413
|
||||
],
|
||||
"wrists": [
|
||||
727,
|
||||
421
|
||||
],
|
||||
"palm": 1,
|
||||
"instep": 1
|
||||
},
|
||||
"downDog": {
|
||||
"hip": [
|
||||
550,
|
||||
262
|
||||
],
|
||||
"spine": 42,
|
||||
"gaze": 20,
|
||||
"ankles": [
|
||||
420,
|
||||
404
|
||||
],
|
||||
"wrists": [
|
||||
727,
|
||||
421
|
||||
],
|
||||
"foot": 0.3,
|
||||
"palm": 1
|
||||
},
|
||||
"plant": {
|
||||
"hip": [
|
||||
629,
|
||||
277
|
||||
],
|
||||
"spine": 44,
|
||||
"gaze": -65,
|
||||
"ankles": [
|
||||
630,
|
||||
417
|
||||
],
|
||||
"wrists": [
|
||||
727,
|
||||
421
|
||||
],
|
||||
"palm": 1
|
||||
},
|
||||
"stepBack": {
|
||||
"about": "Low (runner's) lunge: front knee stacked over the front ankle, back foot already in plank.",
|
||||
"hip": [
|
||||
537.5,
|
||||
304
|
||||
],
|
||||
"spine": 15,
|
||||
"gaze": -65,
|
||||
"ankles": [
|
||||
630,
|
||||
417
|
||||
],
|
||||
"farAnkle": [
|
||||
441,
|
||||
391
|
||||
],
|
||||
"wrists": [
|
||||
727,
|
||||
421
|
||||
],
|
||||
"palm": 1
|
||||
},
|
||||
"stepForward": {
|
||||
"about": "Low lunge out of down dog: front knee over the front ankle, back foot still where down dog left it.",
|
||||
"hip": [
|
||||
537.5,
|
||||
304
|
||||
],
|
||||
"spine": 15,
|
||||
"gaze": -65,
|
||||
"ankles": [
|
||||
630,
|
||||
417
|
||||
],
|
||||
"farAnkle": [
|
||||
420,
|
||||
404
|
||||
],
|
||||
"wrists": [
|
||||
727,
|
||||
421
|
||||
],
|
||||
"palm": 1
|
||||
},
|
||||
"returnCrouch": {
|
||||
"hip": [
|
||||
629,
|
||||
285
|
||||
],
|
||||
"spine": 36,
|
||||
"gaze": -65,
|
||||
"ankles": [
|
||||
630,
|
||||
417
|
||||
],
|
||||
"wrists": [
|
||||
727,
|
||||
421
|
||||
],
|
||||
"palm": 1
|
||||
}
|
||||
},
|
||||
"stepping": {
|
||||
"about": "Transitions that step one foot at a time, as stops through which the move passes; step indices count from 0.",
|
||||
"3": [
|
||||
"lift",
|
||||
"plant",
|
||||
"stepBack",
|
||||
"plank"
|
||||
],
|
||||
"7": [
|
||||
"downDog",
|
||||
"stepForward",
|
||||
"returnCrouch",
|
||||
"lift"
|
||||
],
|
||||
"lift": 34
|
||||
},
|
||||
"swanDive": {
|
||||
"about": "Upward salute to forward fold (step 1) and back up (step 9): straight arms stay in line with the spine, then sweep down to the floor.",
|
||||
"steps": [
|
||||
1,
|
||||
9
|
||||
],
|
||||
"lowerFrom": 0.45,
|
||||
"straightReach": 127,
|
||||
"palmFrom": 0.8
|
||||
},
|
||||
"feet": {
|
||||
"pointToes": 0.5,
|
||||
"restingRadius": 12
|
||||
},
|
||||
"head": {
|
||||
"lift": 0.6,
|
||||
"liftMin": -42,
|
||||
"liftMax": 10
|
||||
},
|
||||
"hair": {
|
||||
"about": "Roots are fractions of the head's reference box, under the lower edge of the back hair.",
|
||||
"roots": [
|
||||
[
|
||||
0.25,
|
||||
0.75
|
||||
],
|
||||
[
|
||||
0.23,
|
||||
0.89
|
||||
]
|
||||
],
|
||||
"width": 1.0,
|
||||
"segment": 13,
|
||||
"count": 11,
|
||||
"damping": 0.86,
|
||||
"gravity": 5000,
|
||||
"substeps": 8
|
||||
},
|
||||
"parts": {
|
||||
"leg": {
|
||||
"about": "Above the hip the painting (the seat) follows the pelvis and bends into the thigh over rootBand units; the hip turns within half a circle of rootTurn degrees, so it folds forward.",
|
||||
"file": "leg.png",
|
||||
"root": [
|
||||
0.52,
|
||||
0.07
|
||||
],
|
||||
"tip": [
|
||||
0.55,
|
||||
0.93
|
||||
],
|
||||
"width": 0.86,
|
||||
"fade": 0.955,
|
||||
"top": [
|
||||
0.03,
|
||||
0.012
|
||||
],
|
||||
"band": 14,
|
||||
"rootBand": 10,
|
||||
"rootTurn": -90,
|
||||
"seat": {
|
||||
"depth": 0.2,
|
||||
"center": 8,
|
||||
"span": 32
|
||||
}
|
||||
},
|
||||
"arm": {
|
||||
"file": "arm.png",
|
||||
"root": [
|
||||
0.5,
|
||||
0.08
|
||||
],
|
||||
"tip": [
|
||||
0.62,
|
||||
0.955
|
||||
],
|
||||
"width": 0.78,
|
||||
"fade": 0.975,
|
||||
"band": 10
|
||||
},
|
||||
"torso": {
|
||||
"about": "hem: its back and front corners; above the line through them the leggings are hidden behind her back, out to cover units. flare: the top widens from from[0] to from[1] units up the spine, more at the back as sin(spine) goes through hangFrom (upside down).",
|
||||
"file": "torso.png",
|
||||
"hip": [
|
||||
0.44,
|
||||
0.97
|
||||
],
|
||||
"shoulder": [
|
||||
0.23,
|
||||
0.23
|
||||
],
|
||||
"width": 0.8,
|
||||
"neck": [
|
||||
0.62,
|
||||
0.05
|
||||
],
|
||||
"hem": [
|
||||
[
|
||||
0.335,
|
||||
0.935
|
||||
],
|
||||
[
|
||||
0.905,
|
||||
0.958
|
||||
]
|
||||
],
|
||||
"cover": 150,
|
||||
"mesh": [
|
||||
8,
|
||||
32
|
||||
],
|
||||
"flare": {
|
||||
"from": [
|
||||
45,
|
||||
5
|
||||
],
|
||||
"back": 0.12,
|
||||
"front": 0.04,
|
||||
"hang": 0.18,
|
||||
"hangFrom": [
|
||||
0.1,
|
||||
0.9
|
||||
]
|
||||
}
|
||||
},
|
||||
"head": {
|
||||
"file": "head.png",
|
||||
"pivot": [
|
||||
0.66,
|
||||
0.985
|
||||
],
|
||||
"height": 71.43
|
||||
},
|
||||
"longHair": {
|
||||
"file": "long-hair.png"
|
||||
},
|
||||
"handUpright": {
|
||||
"file": "hand-upright.png",
|
||||
"pivot": [
|
||||
0.52,
|
||||
0.985
|
||||
],
|
||||
"height": 38
|
||||
},
|
||||
"handFlat": {
|
||||
"file": "hand-flat.png",
|
||||
"pivot": [
|
||||
0.05,
|
||||
0.32
|
||||
],
|
||||
"width": 46
|
||||
},
|
||||
"footFlat": {
|
||||
"file": "foot-flat.png",
|
||||
"pivot": [
|
||||
0.21,
|
||||
0.35
|
||||
],
|
||||
"toe": [
|
||||
0.99,
|
||||
0.8
|
||||
],
|
||||
"heel": [
|
||||
0.03,
|
||||
0.84
|
||||
],
|
||||
"width": 50,
|
||||
"cut": [
|
||||
"top",
|
||||
0.27
|
||||
]
|
||||
},
|
||||
"footTucked": {
|
||||
"file": "foot-tucked.png",
|
||||
"pivot": [
|
||||
0.37,
|
||||
0.12
|
||||
],
|
||||
"height": 50,
|
||||
"cut": [
|
||||
"top",
|
||||
0.07
|
||||
]
|
||||
},
|
||||
"footInstep": {
|
||||
"file": "foot-instep.png",
|
||||
"pivot": [
|
||||
0.9,
|
||||
0.45
|
||||
],
|
||||
"toe": [
|
||||
0.012,
|
||||
0.95
|
||||
],
|
||||
"heel": [
|
||||
0.72,
|
||||
0.04
|
||||
],
|
||||
"width": 54,
|
||||
"turn": -11.46,
|
||||
"cut": [
|
||||
"right",
|
||||
0.93
|
||||
]
|
||||
}
|
||||
},
|
||||
"sprites": {
|
||||
"about": "The app's frames (--sprites): each step's transition at fps, then settle seconds of its hold, rendered on theme at scale of the design size, trimmed, and quantized to colors.",
|
||||
"theme": "clear",
|
||||
"scale": 0.55,
|
||||
"fps": 30,
|
||||
"settle": 0.5,
|
||||
"colors": 256,
|
||||
"directory": "assets/practices/sunsalutation/girl",
|
||||
"table": "src/practices/sun_salutation/sun_salutation_frames.zi"
|
||||
},
|
||||
"themes": {
|
||||
"light": {
|
||||
"background": [
|
||||
244,
|
||||
239,
|
||||
222
|
||||
],
|
||||
"shadow": [
|
||||
76,
|
||||
82,
|
||||
55,
|
||||
0.2
|
||||
],
|
||||
"far": [
|
||||
50,
|
||||
65,
|
||||
49,
|
||||
0.13
|
||||
]
|
||||
},
|
||||
"dark": {
|
||||
"background": [
|
||||
22,
|
||||
24,
|
||||
40
|
||||
],
|
||||
"shadow": [
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0.4
|
||||
],
|
||||
"far": [
|
||||
0,
|
||||
0,
|
||||
20,
|
||||
0.35
|
||||
]
|
||||
},
|
||||
"clear": {
|
||||
"shadow": [
|
||||
20,
|
||||
16,
|
||||
40,
|
||||
0.28
|
||||
],
|
||||
"far": [
|
||||
30,
|
||||
20,
|
||||
50,
|
||||
0.2
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"tool": "built-in image_gen",
|
||||
"lumi-flight.png": {
|
||||
"reference": "assets/lumi/mascot.png",
|
||||
"transparent": true,
|
||||
"prompt": "Use case: ads-marketing. Asset type: transparent flying character cutout for an animated Inner Breeze promo video. Input image: identity and style reference for Lumi, the app's friendly glowing firefly. Keep Lumi recognizably identical: rounded olive-green head/body, cream golden glowing tummy, two curved antennae ending in golden lights, huge warm brown eyes, gentle smile, tiny translucent cream wings and feet. Create a full-body three-quarter view of Lumi in joyful flight, floating horizontally slightly facing right, one small hand gesturing as a guide. Magical premium storybook painted 3D feeling, soft tactile watercolor texture matching the reference. Make both delicate wings visible and luminous, no hard cartoon outlines. Entire character including glow and antennae inside image with generous transparent margins. True transparent alpha background. No text, no phone, no scenery, no additional character, no logos."
|
||||
},
|
||||
"forest.png": {
|
||||
"transparent": false,
|
||||
"prompt": "Use case: ads-marketing. Asset type: portrait background plate for an Inner Breeze wellness app promo guided by Lumi, a glowing golden firefly. Create an enchanting cinematic forest glade at twilight in a premium soft storybook painted 3D style with delicate watercolor texture. Deep sage, teal, moss and midnight green foliage framing only the extreme bottom and side edges, many tiny warm gold firefly lights at different depths, soft volumetric moonlight and gentle golden light trails like breath rising toward the center. Calm spacious central area with an uncluttered deep teal-to-sage atmospheric gradient, where readable app screens will be composited later. Magical intimate and inviting, lush organic detail, exquisite soft glowing bokeh, subtle painterly paper texture. Portrait 9:16 composition. No characters, no letters or typography, no phones, no UI, no logos or watermark."
|
||||
},
|
||||
"lumi-flight-cycle.png": {
|
||||
"reference": "lumi-flight.png",
|
||||
"transparent": true,
|
||||
"columns": 4,
|
||||
"rows": 2,
|
||||
"frames": 8,
|
||||
"prompt": "Use case: ads-marketing. Asset type: transparent 8-frame wing-flapping sprite sheet for an animated video. Input image 1 is the Lumi identity reference; input image 2 is the existing animation sheet to fix. Recreate image 2 as an evenly spaced 4-column by 2-row grid of exactly 8 full-body frames, same warm olive green firefly Lumi and same soft painted 3D texture. Critical correction: shrink EVERY character so its complete antenna glow, wings and feet occupy ONLY the central 60 percent of its cell, leaving an empty transparent margin of at least 18 percent along EVERY side. No character part or glow can touch a cell edge. Keep precisely the same head center and body size in all 8 cells. Body stable; wings do real full up/down strokes. Sequential wing positions left-to-right then second row: frame 1 wings up, frame 2 middle downward, frame 3 wings fully down, frame 4 middle upward, frame 5 wings up, frame 6 middle downward, frame 7 wings fully down, frame 8 middle upward. Clearly distinct full strokes, not duplicate wings. Both delicate wings attached at the back, correct anatomy. No whole-body rotation or sliding. Preserve face and hands identically so playback doesn't flicker. Tiny feet gently flex with the strokes. Big friendly brown eyes and inviting smile. Golden glows localized close to antenna bulbs and belly, no large halo clouds. True transparent alpha everywhere outside the character. No scenery, no grid lines, no text or labels. Wide canvas 2:1 aspect ratio, high resolution. Character always fully contained within its allotted cell with very generous empty alpha padding."
|
||||
},
|
||||
"status": "Review artwork for a promo; does not change the in-app mascot or claim new customization capabilities."
|
||||
}
|
||||
|
After Width: | Height: | Size: 2.2 MiB |
|
After Width: | Height: | Size: 1.2 MiB |
|
After Width: | Height: | Size: 1.2 MiB |
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"model": "microsoft/mai-voice-2.1",
|
||||
"voice": "en-US-Harper:MAI-Voice-2.1",
|
||||
"response_format": "mp3",
|
||||
"speed": 1.0,
|
||||
"provider": {"options": {"azure": {"style": "narrator", "styledegree": 1.0}}},
|
||||
"clips": [
|
||||
"Meet Lumi. Your little guide to Inner Breeze.",
|
||||
"A space for your apps, and your daily rhythm.",
|
||||
"Take a breath. Find your calm. Make time to move.",
|
||||
"Build little habits that make every day brighter.",
|
||||
"Keep your plans in Lists, and your thoughts in Diary.",
|
||||
"Make it yours. Ask Lumi for a forest theme, then switch to dark mode.",
|
||||
"Inner Breeze. A little space, made for you."
|
||||
],
|
||||
"documentation": "https://openrouter.ai/docs/guides/overview/multimodal/tts"
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
{
|
||||
"config_sha256": "a3f0fbaea5ab604d86f9117572956e0597f18d314660c16c836e38ed431e1c83",
|
||||
"provider": "OpenRouter",
|
||||
"model": "microsoft/mai-voice-2.1",
|
||||
"voice": "en-US-Harper:MAI-Voice-2.1",
|
||||
"clips": [
|
||||
{
|
||||
"file": "clip-00.mp3",
|
||||
"text": "Meet Lumi. Your little guide to Inner Breeze.",
|
||||
"seconds": 3.648,
|
||||
"sha256": "31777f316cb9f786ea69a051be06fd82ad4a8e7508a1f739a9b6faa8a3dd4734",
|
||||
"generation_id": "gen-tts-1791514279-Tg7LWgrcfvxt2OIWjuDj"
|
||||
},
|
||||
{
|
||||
"file": "clip-01.mp3",
|
||||
"text": "A space for your apps, and your daily rhythm.",
|
||||
"seconds": 2.952,
|
||||
"sha256": "766bdb7e9ca8c44b6690170ab20ac61ddfcca4934947d4f369d150ea2a6e7224",
|
||||
"generation_id": "gen-tts-1791514280-LacvzXxRZsGdXgjW1xmY"
|
||||
},
|
||||
{
|
||||
"file": "clip-02.mp3",
|
||||
"text": "Take a breath. Find your calm. Make time to move.",
|
||||
"seconds": 4.752,
|
||||
"sha256": "f2ed561fa0b3c77775b4cc3b3a4fb19fa1ea6cb23cc0bbc4c7216305edd12f4f",
|
||||
"generation_id": "gen-tts-1791514282-FVKXyQSwJ0oGJecZ9MPL"
|
||||
},
|
||||
{
|
||||
"file": "clip-03.mp3",
|
||||
"text": "Build little habits that make every day brighter.",
|
||||
"seconds": 2.784,
|
||||
"sha256": "3685d1e6ec34bd1c2bbd98db10b0fd3e0cc3313bb14dfd1ccae596289eea849b",
|
||||
"generation_id": "gen-tts-1791514283-tIeLAmKNQfvB5vqNpjLR"
|
||||
},
|
||||
{
|
||||
"file": "clip-04.mp3",
|
||||
"text": "Keep your plans in Lists, and your thoughts in Diary.",
|
||||
"seconds": 3.48,
|
||||
"sha256": "34db8fdb37793e22425867fc5123d0abdac4cf8fa515f373b1553e7c4d31bef0",
|
||||
"generation_id": "gen-tts-1791514286-Be2DMWRxLmqQHWnLy2WK"
|
||||
},
|
||||
{
|
||||
"file": "clip-05.mp3",
|
||||
"text": "Make it yours. Ask Lumi for a forest theme, then switch to dark mode.",
|
||||
"seconds": 5.088,
|
||||
"sha256": "3a9816c6484ee089bdfd36bc15b8efd8d925b79ad4477c8b3680a3918706e4c5",
|
||||
"generation_id": "gen-tts-1791514288-kfGqTRkfR6gYKGQzSzTH"
|
||||
},
|
||||
{
|
||||
"file": "clip-06.mp3",
|
||||
"text": "Inner Breeze. A little space, made for you.",
|
||||
"seconds": 4.056,
|
||||
"sha256": "55e9a0c3b19a8c5b6f9eaf23bb81b1b3cc67a0a6b864f3aa57ad3103ef0c3eaa",
|
||||
"generation_id": "gen-tts-1791514290-ttQk1lQ5H3modKGaq95J"
|
||||
}
|
||||
],
|
||||
"music": false,
|
||||
"documentation": "https://openrouter.ai/docs/guides/overview/multimodal/tts"
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
# Tai Chi course animation
|
||||
|
||||
A complete Yang-style 24-form course for Inner Breeze, built as data first:
|
||||
a 3D rig, a pose solver, choreography written as code, a Three.js review
|
||||
studio, automatic motion checks and headless review renders. Inbe's own
|
||||
code does not use any of this yet; how the app plays the course is decided
|
||||
later (see "App playback" below).
|
||||
|
||||
## Course
|
||||
|
||||
- **Foundations**: posture and breathing, warm-up, standing meditation,
|
||||
stances, stepping and hand shapes, each as short drills.
|
||||
- **Lessons 1–8**: the 24 movements in the usual eight groups. Every
|
||||
movement has three versions: a *demo* at normal speed, a *breakdown* that
|
||||
plays slower and pauses on every step with its cue, and a *follow-along*
|
||||
that does the movement, steps into the mirrored start, does it on the
|
||||
other side and returns.
|
||||
- **Full form**: normal tempo (front view, mirrored, so it moves like your
|
||||
reflection) and a slow learning tempo (from behind).
|
||||
|
||||
## Run
|
||||
|
||||
```sh
|
||||
cd design/tai-chi
|
||||
npm install # Three.js, pinned in package.json
|
||||
node tools/serve.mjs # studio at http://127.0.0.1:8771/ (opens on the full form)
|
||||
node tools/check.mjs # motion checks for every item and figure
|
||||
node tools/render.mjs --item lesson-2/brush-knee/demo --stills 3,6,9 --label
|
||||
node tools/render.mjs --lessons --full --label # an MP4 per lesson and the full form
|
||||
node tools/export.mjs [--bake] # writes docs/tai-chi-24.json
|
||||
```
|
||||
|
||||
Renders run headless Chromium with SwiftShader and no display; the
|
||||
inherited display and session variables are removed from its environment.
|
||||
Output goes to `build/tai-chi/` (ignored).
|
||||
|
||||
Studio keys: Space plays, ←/→ step a frame (Shift: a second), `[`/`]`
|
||||
jump between cued steps, 1–6 switch views. Dragging the view switches to
|
||||
the free orbit camera.
|
||||
|
||||
## Painted characters
|
||||
|
||||
The studio opens on the full form with the painted Tibetan monk: a 2D
|
||||
cut-out puppet in the hand-painted style of Sun Salutation, drawn over the
|
||||
same solved body as the 3D figures, so every lesson, version and the full
|
||||
form play with it. The second painted character is a Tibetan woman (braids
|
||||
wound round her head, teal wrap vest, pangden-striped sash). Pick them in the
|
||||
figure buttons (`?figure=monk`, `?figure=tibetanWoman`); the 3D figures are
|
||||
still there.
|
||||
|
||||
- `characters/<id>/source/` keeps the generated turnaround and part sheets
|
||||
with their prompts (Codex built-in image generation, the turnaround and
|
||||
the approved Sun Salutation characters as references).
|
||||
- `tools/cut-parts.py characters/<id>` cuts the sheets listed in
|
||||
`sheets.json` into transparent `parts/`, recovering edges from the white
|
||||
background and fading the cut edges that another part covers (hand into
|
||||
forearm, ankle into trouser cuff).
|
||||
- `characters/<id>/character.json` names each part's points as fractions of
|
||||
its image: the neck and hips of the five torso views, the armholes, the
|
||||
neck of the five head views, wrist and fingertips of the hands, heel and
|
||||
toe of the shoes.
|
||||
- `src/painted/figure.js` projects the solved joints flat along the view
|
||||
and places the paintings as textured meshes in an orthographic scene:
|
||||
arms and legs bend along their projected bones, the torso follows the
|
||||
projected spine, and the head, torso, hands and shoes switch between
|
||||
front, three-quarter, side, three-quarter back and back drawings as they
|
||||
turn (mirrored for the other side, with a little hysteresis so a part on
|
||||
a boundary does not flicker). Hands pick palm, back, edge, fist or hook
|
||||
drawings from the hand's shape and which way the palm faces. Back arms,
|
||||
legs, head, torso and front arms are drawn in that order.
|
||||
|
||||
## How it works
|
||||
|
||||
- `src/rig.js`: proportions as fractions of height, per figure.
|
||||
- `src/pose.js`: the pose description (feet, weight, sinking, waist,
|
||||
hands in chest axes, gaze) and mirroring.
|
||||
- `src/form.js`: the choreography builder. Each key edits a copy of the
|
||||
previous pose with side-relative calls (`place`, `pivot`, `load`, `waist`,
|
||||
`hand`, `look`…), so the same code runs mirrored. Weight leaves a foot
|
||||
before it steps, and a loaded foot waits for the weight to go before it
|
||||
turns.
|
||||
- `src/timeline.js`: monotone curves for the body (no overshoot), smooth
|
||||
arcs for the hands, and feet that pivot exactly about the heel or ball or
|
||||
lift off to step: planted feet never slide.
|
||||
- `src/solve.js`: inverse kinematics for legs (knees track the toes) and
|
||||
arms, spine twist, gaze that follows a hand, heels that rise when a light
|
||||
back foot cannot reach, and a centre of mass placed over the weighted
|
||||
contact between the feet.
|
||||
- `src/checks.js`: foot sliding and floating, knee tracking, knee past the
|
||||
toes, knee and wrist limits, arms locked out, hands in the body, feet and
|
||||
knees colliding, balance over the feet, speed and jumps, facing at the end
|
||||
of each movement, and the full form's duration.
|
||||
- `form/`: the choreography. `lessonN.js` exports the lesson's movements;
|
||||
`boundaries.js` holds the poses where lessons hand over.
|
||||
- `src/view/`: the stage, camera views, the mannequin and the two 3D
|
||||
characters (Sage Bun and Sage Male); `src/painted/` the painted 2D
|
||||
figures (see above).
|
||||
|
||||
## App playback
|
||||
|
||||
Pre-rendered frames do not fit: Sun Salutation's 991 frames per character
|
||||
are about 10 MB, and the app package budget is 38 MB in total, while the
|
||||
24-form at the same frame rate would be about 100 MB per character. The
|
||||
exported keyed poses for the whole course are about 350 KB (21 KB
|
||||
gzipped); the full form baked to joint rotations at 30 fps is about 1.8 MB
|
||||
per figure (1.2 MB gzipped). Either needs a player in
|
||||
the app, which means a reusable 3D or projected-skeleton primitive in Kryon
|
||||
first. That is a separate decision.
|
||||
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"id": "monk",
|
||||
"name": "Tibetan Monk",
|
||||
"figure": "monk",
|
||||
"note": "Points are fractions of each part image: [x from the left, y from the top]. Views are painted facing the image's right; the renderer mirrors them for the other side.",
|
||||
"head": {
|
||||
"neck": "the middle of the cut at the bottom of the neck",
|
||||
"views": {
|
||||
"front": { "file": "parts/head-front.png", "neck": [0.5, 0.97] },
|
||||
"threeQuarter": { "file": "parts/head-three-quarter.png", "neck": [0.42, 0.97] },
|
||||
"side": { "file": "parts/head-side.png", "neck": [0.36, 0.97] },
|
||||
"threeQuarterBack": { "file": "parts/head-three-quarter-back.png", "neck": [0.38, 0.97] },
|
||||
"back": { "file": "parts/head-back.png", "neck": [0.49, 0.97] }
|
||||
}
|
||||
},
|
||||
"torso": {
|
||||
"views": {
|
||||
"front": { "file": "parts/torso-front.png", "neck": [0.5, 0.1], "hip": [0.5, 0.93], "shoulders": [[0.1, 0.15], [0.9, 0.15]] },
|
||||
"threeQuarter": { "file": "parts/torso-three-quarter.png", "neck": [0.53, 0.1], "hip": [0.5, 0.93], "shoulders": [[0.14, 0.17], [0.88, 0.15]] },
|
||||
"side": { "file": "parts/torso-side.png", "neck": [0.52, 0.07], "hip": [0.5, 0.93], "shoulders": [[0.38, 0.17], [0.46, 0.15]] },
|
||||
"threeQuarterBack": { "file": "parts/torso-three-quarter-back.png", "neck": [0.5, 0.08], "hip": [0.5, 0.93], "shoulders": [[0.08, 0.16], [0.86, 0.17]] },
|
||||
"back": { "file": "parts/torso-back.png", "neck": [0.5, 0.07], "hip": [0.5, 0.93], "shoulders": [[0.08, 0.15], [0.92, 0.15]] }
|
||||
}
|
||||
},
|
||||
"arm": { "file": "parts/arm.png", "root": [0.5, 0.09], "end": [0.5, 0.96], "anterior": 1, "thickness": 0.62 },
|
||||
"leg": { "file": "parts/leg.png", "root": [0.5, 0.05], "end": [0.5, 0.94], "anterior": 1, "thickness": 0.66 },
|
||||
"hands": {
|
||||
"scale": "the palm's wrist-to-fingertip length is the rig's hand length; every hand drawing shares its scale",
|
||||
"palm": { "file": "parts/hand-palm.png", "wrist": [0.5, 0.97], "tip": [0.55, 0.01], "across": "thumb", "sign": 1 },
|
||||
"back": { "file": "parts/hand-back.png", "wrist": [0.5, 0.97], "tip": [0.48, 0.01], "across": "thumb", "sign": -1 },
|
||||
"edge": { "file": "parts/hand-edge.png", "wrist": [0.5, 0.98], "tip": [0.45, 0.01], "across": "palm", "sign": 1 },
|
||||
"fistFront": { "file": "parts/fist-front.png", "wrist": [0.5, 0.97], "tip": [0.5, 0.02], "across": "thumb", "sign": 1 },
|
||||
"fistSide": { "file": "parts/fist-side.png", "wrist": [0.42, 0.97], "tip": [0.5, 0.02], "across": "palm", "sign": 1 },
|
||||
"hook": { "file": "parts/hook.png", "wrist": [0.2, 0.97], "tip": [0.76, 0.86], "across": "palm", "sign": 1 }
|
||||
},
|
||||
"shoes": {
|
||||
"scale": "the outer profile's heel-to-toe length is the rig's foot length; every shoe drawing shares its scale",
|
||||
"outer": { "file": "parts/shoe-outer.png", "heel": [0.03, 0.955], "toe": [0.985, 0.955] },
|
||||
"inner": { "file": "parts/shoe-inner.png", "heel": [0.03, 0.955], "toe": [0.985, 0.955] },
|
||||
"front": { "file": "parts/shoe-front.png", "ankle": [0.5, 0.55] },
|
||||
"back": { "file": "parts/shoe-back.png", "ankle": [0.5, 0.56] },
|
||||
"threeQuarter": { "file": "parts/shoe-three-quarter.png", "ankle": [0.3, 0.52] },
|
||||
"threeQuarterBack": { "file": "parts/shoe-three-quarter-back.png", "ankle": [0.3, 0.5] }
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 70 KiB |
|
After Width: | Height: | Size: 61 KiB |
|
After Width: | Height: | Size: 56 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 46 KiB |
|
After Width: | Height: | Size: 73 KiB |
|
After Width: | Height: | Size: 72 KiB |
|
After Width: | Height: | Size: 69 KiB |
|
After Width: | Height: | Size: 79 KiB |
|
After Width: | Height: | Size: 73 KiB |
|
After Width: | Height: | Size: 75 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 100 KiB |
@@ -0,0 +1,266 @@
|
||||
{
|
||||
"head-front": {
|
||||
"size": [
|
||||
195,
|
||||
272
|
||||
],
|
||||
"sheet": "source/atlas-body.png",
|
||||
"at": [
|
||||
65,
|
||||
125
|
||||
]
|
||||
},
|
||||
"head-three-quarter": {
|
||||
"size": [
|
||||
195,
|
||||
275
|
||||
],
|
||||
"sheet": "source/atlas-body.png",
|
||||
"at": [
|
||||
372,
|
||||
122
|
||||
]
|
||||
},
|
||||
"head-side": {
|
||||
"size": [
|
||||
218,
|
||||
273
|
||||
],
|
||||
"sheet": "source/atlas-body.png",
|
||||
"at": [
|
||||
666,
|
||||
124
|
||||
]
|
||||
},
|
||||
"head-three-quarter-back": {
|
||||
"size": [
|
||||
202,
|
||||
270
|
||||
],
|
||||
"sheet": "source/atlas-body.png",
|
||||
"at": [
|
||||
965,
|
||||
121
|
||||
]
|
||||
},
|
||||
"head-back": {
|
||||
"size": [
|
||||
204,
|
||||
272
|
||||
],
|
||||
"sheet": "source/atlas-body.png",
|
||||
"at": [
|
||||
1270,
|
||||
121
|
||||
]
|
||||
},
|
||||
"torso-front": {
|
||||
"size": [
|
||||
278,
|
||||
455
|
||||
],
|
||||
"sheet": "source/atlas-body.png",
|
||||
"at": [
|
||||
23,
|
||||
464
|
||||
]
|
||||
},
|
||||
"torso-three-quarter": {
|
||||
"size": [
|
||||
272,
|
||||
458
|
||||
],
|
||||
"sheet": "source/atlas-body.png",
|
||||
"at": [
|
||||
342,
|
||||
461
|
||||
]
|
||||
},
|
||||
"torso-side": {
|
||||
"size": [
|
||||
218,
|
||||
453
|
||||
],
|
||||
"sheet": "source/atlas-body.png",
|
||||
"at": [
|
||||
660,
|
||||
460
|
||||
]
|
||||
},
|
||||
"torso-three-quarter-back": {
|
||||
"size": [
|
||||
256,
|
||||
455
|
||||
],
|
||||
"sheet": "source/atlas-body.png",
|
||||
"at": [
|
||||
922,
|
||||
463
|
||||
]
|
||||
},
|
||||
"torso-back": {
|
||||
"size": [
|
||||
285,
|
||||
459
|
||||
],
|
||||
"sheet": "source/atlas-body.png",
|
||||
"at": [
|
||||
1229,
|
||||
460
|
||||
]
|
||||
},
|
||||
"arm": {
|
||||
"size": [
|
||||
129,
|
||||
480
|
||||
],
|
||||
"sheet": "source/atlas-limbs.png",
|
||||
"at": [
|
||||
150,
|
||||
27
|
||||
]
|
||||
},
|
||||
"leg": {
|
||||
"size": [
|
||||
165,
|
||||
491
|
||||
],
|
||||
"sheet": "source/atlas-limbs.png",
|
||||
"at": [
|
||||
504,
|
||||
18
|
||||
]
|
||||
},
|
||||
"hand-palm": {
|
||||
"size": [
|
||||
178,
|
||||
348
|
||||
],
|
||||
"sheet": "source/atlas-limbs.png",
|
||||
"at": [
|
||||
881,
|
||||
116
|
||||
]
|
||||
},
|
||||
"hand-back": {
|
||||
"size": [
|
||||
182,
|
||||
348
|
||||
],
|
||||
"sheet": "source/atlas-limbs.png",
|
||||
"at": [
|
||||
1231,
|
||||
116
|
||||
]
|
||||
},
|
||||
"hand-edge": {
|
||||
"size": [
|
||||
104,
|
||||
373
|
||||
],
|
||||
"sheet": "source/atlas-limbs.png",
|
||||
"at": [
|
||||
168,
|
||||
562
|
||||
]
|
||||
},
|
||||
"fist-front": {
|
||||
"size": [
|
||||
194,
|
||||
253
|
||||
],
|
||||
"sheet": "source/atlas-limbs.png",
|
||||
"at": [
|
||||
473,
|
||||
650
|
||||
]
|
||||
},
|
||||
"fist-side": {
|
||||
"size": [
|
||||
169,
|
||||
271
|
||||
],
|
||||
"sheet": "source/atlas-limbs.png",
|
||||
"at": [
|
||||
866,
|
||||
643
|
||||
]
|
||||
},
|
||||
"hook": {
|
||||
"size": [
|
||||
227,
|
||||
286
|
||||
],
|
||||
"sheet": "source/atlas-limbs.png",
|
||||
"at": [
|
||||
1232,
|
||||
606
|
||||
]
|
||||
},
|
||||
"shoe-outer": {
|
||||
"size": [
|
||||
414,
|
||||
266
|
||||
],
|
||||
"sheet": "source/atlas-shoes.png",
|
||||
"at": [
|
||||
68,
|
||||
139
|
||||
]
|
||||
},
|
||||
"shoe-inner": {
|
||||
"size": [
|
||||
434,
|
||||
266
|
||||
],
|
||||
"sheet": "source/atlas-shoes.png",
|
||||
"at": [
|
||||
582,
|
||||
137
|
||||
]
|
||||
},
|
||||
"shoe-front": {
|
||||
"size": [
|
||||
215,
|
||||
298
|
||||
],
|
||||
"sheet": "source/atlas-shoes.png",
|
||||
"at": [
|
||||
1172,
|
||||
132
|
||||
]
|
||||
},
|
||||
"shoe-back": {
|
||||
"size": [
|
||||
211,
|
||||
309
|
||||
],
|
||||
"sheet": "source/atlas-shoes.png",
|
||||
"at": [
|
||||
145,
|
||||
567
|
||||
]
|
||||
},
|
||||
"shoe-three-quarter": {
|
||||
"size": [
|
||||
387,
|
||||
319
|
||||
],
|
||||
"sheet": "source/atlas-shoes.png",
|
||||
"at": [
|
||||
598,
|
||||
567
|
||||
]
|
||||
},
|
||||
"shoe-three-quarter-back": {
|
||||
"size": [
|
||||
339,
|
||||
305
|
||||
],
|
||||
"sheet": "source/atlas-shoes.png",
|
||||
"at": [
|
||||
1122,
|
||||
567
|
||||
]
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 80 KiB |
|
After Width: | Height: | Size: 74 KiB |
|
After Width: | Height: | Size: 107 KiB |
|
After Width: | Height: | Size: 105 KiB |
|
After Width: | Height: | Size: 111 KiB |
|
After Width: | Height: | Size: 121 KiB |
|
After Width: | Height: | Size: 179 KiB |
|
After Width: | Height: | Size: 181 KiB |
|
After Width: | Height: | Size: 141 KiB |
|
After Width: | Height: | Size: 169 KiB |