Skip to content

docs(mobile/v4): Device/Dialog/File/System core built-ins + SuperNative feature docs#419

Merged
shanerbaner82 merged 8 commits into
mainfrom
docs/mobile-v4-core-apis
Jul 9, 2026
Merged

docs(mobile/v4): Device/Dialog/File/System core built-ins + SuperNative feature docs#419
shanerbaner82 merged 8 commits into
mainfrom
docs/mobile-v4-core-apis

Conversation

@shanerbaner82

Copy link
Copy Markdown
Contributor

Documents the v4 changes where Device, Dialog, File, and System move from standalone plugins into nativephp/mobile core, plus several SuperNative feature docs and the Vite opt-in behavior change.

What's in here

1. Device/Dialog/File/System are now core built-ins

  • New SuperNative reference pages for each — written from the actual core src/ source (the old plugin READMEs were stale: e.g. Device::flashlight() not toggleFlashlight(), File::move() returns bool not an array, Dialog::remember() flashes the alert id rather than persisting closures).
  • Removed the empty plugins/core/{device,dialog,file,system}.md sidebar stubs.
  • 301-redirects from the old plugins/core/* URLs to the new super-native/* pages (routes/web.php).

2. SuperNative feature docs

  • Theming — "Appearance in PHP": System::appearance()/isDarkMode(), the isDark()/isLight()/theme() helpers, and the AppearanceChanged event.
  • Text — inline <text> runs and select-text/select-none selection.
  • LayoutsNavBar::titleView()/->logo() and keyboard-aware <native:bottom-bar>.
  • Text Input — cross-link to the keyboard-aware bottom bar.

3. Release notes

  • Upgrade Guide — new "Upgrading To 4.0 From 3.x": remove the four plugins before upgrading; Vite dev server is now opt-in.
  • Changelog — Breaking Changes for both.
  • Commands / Development — document the --vite flag (Vite no longer auto-starts).

Notes for reviewers

  • These .md files are Blade-compiled before markdown, so directive examples use @verbatim and inline directive mentions use @@.
  • scroll-anchor="bottom" was intentionally not documented — the PHP prop exists but no renderer reads it yet (no-op).

🤖 Generated with Claude Code

shanerbaner82 and others added 6 commits July 8, 2026 21:53
These four APIs moved from standalone plugins into nativephp/mobile core.
Add SuperNative reference pages for each — documented from the actual core
source (the old plugin READMEs were stale) — remove the empty plugins/core
stubs from the sidebar, and 301-redirect their old URLs to the new pages.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… bottom-bar

- Theming: "Appearance in PHP" — System::appearance()/isDarkMode(), the
  isDark()/isLight()/theme() helpers, and the AppearanceChanged event.
- Text: inline <text> runs and select-text/select-none selection.
- Layouts: NavBar::titleView()/logo() and keyboard-aware <native:bottom-bar>.
- Text Input: cross-link to the keyboard-aware bottom bar.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Upgrade Guide: new "Upgrading To 4.0 From 3.x" — remove the mobile-device/
  dialog/file/system plugins before upgrading; Vite dev server is now opt-in.
- Changelog: Breaking Changes for both.
- Commands/Development: document the --vite flag (Vite no longer auto-starts;
  pass --vite for JS/CSS HMR).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…e Composer conflict guard

- Add the text-selection classes to the "Supported Tailwind classes" table.
- Upgrade Guide: v4 declares a Composer conflict with the four ex-plugins, so
  the update hard-blocks until they're removed (clearer than "registers twice").

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Frame the strategic shift: the web view tied the UI to upstream stacks we
didn't own (Inertia 3 dropping axios, Livewire 4 emoji filenames breaking iOS
builds). SuperNative is a stack we own end to end — PHP to SwiftUI/Compose.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The breakage was our bundled PHP binaries initially failing to read the emoji
(🔥) filenames, not the iOS packager rejecting them.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@shanerbaner82 shanerbaner82 requested a review from simonhamp July 9, 2026 02:26
shanerbaner82 and others added 2 commits July 9, 2026 08:30
Swap raw palette classes (text-slate-*/text-blue-*) for theme tokens
(text-theme-on-surface/-primary/-on-surface-variant) in the inline-runs and
text-selection examples.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…mples

Replace incidental palette classes with semantic theme tokens across the
edge-component examples: muted text (text-slate-400/500) -> text-theme-on-
surface-variant, divider lines (bg-zinc-200) -> bg-theme-outline.

Deliberately left alone: decorative/status colors with no token equivalent
(badge dots, over-image white text, gold stars, green "active"), the
color=/bg= hex prop demonstrations, layout.md's class-reference and
Tailwind-teaching sections, web-view CSS, and dark-mode `dark:` examples.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@shanerbaner82 shanerbaner82 merged commit 6cf5f02 into main Jul 9, 2026
1 of 2 checks passed
@shanerbaner82 shanerbaner82 deleted the docs/mobile-v4-core-apis branch July 9, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant