diff --git a/.gitmodules b/.gitmodules index 37333c6..07c6e43 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "vendor/hotwire-bridge-components"] path = vendor/hotwire-bridge-components - url = https://github.com/zumkorn/hotwire-bridge-components.git + url = https://github.com/inertia-native/bridge-components.git diff --git a/README.md b/README.md index f596206..57900a9 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # inertia-native-docs Documentation site for -[`inertia-hotwire-native`](https://github.com/zumkorn/inertia-hotwire-native) — +[`inertia-native`](https://github.com/inertia-native/inertia-native) — running Inertia.js apps inside Hotwire Native (iOS & Android). Built with [VitePress](https://vitepress.dev). Published to @@ -10,12 +10,12 @@ Built with [VitePress](https://vitepress.dev). Published to ## Component registry submodule Component pages embed their source straight from the -[hotwire-bridge-components](https://github.com/zumkorn/hotwire-bridge-components) +[bridge-components](https://github.com/inertia-native/bridge-components) registry, vendored at `vendor/hotwire-bridge-components`. The build fails without it, so clone with submodules: ```bash -git clone --recurse-submodules https://github.com/zumkorn/inertia-native-docs.git +git clone --recurse-submodules https://github.com/inertia-native/docs.git # already cloned? git submodule update --init diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 7e3d609..fe81bc2 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -14,10 +14,10 @@ export default defineConfig({ { text: 'Links', items: [ - { text: 'npm package', link: 'https://www.npmjs.com/package/inertia-hotwire-native' }, - { text: 'Web demo', link: 'https://github.com/zumkorn/inertia-native-demo' }, - { text: 'iOS demo', link: 'https://github.com/zumkorn/inertia-native-ios-demo' }, - { text: 'Android demo', link: 'https://github.com/zumkorn/inertia-native-android-demo' }, + { text: 'npm package', link: 'https://www.npmjs.com/package/inertia-native' }, + { text: 'Web demo', link: 'https://github.com/inertia-native/demo-rails' }, + { text: 'iOS demo', link: 'https://github.com/inertia-native/demo-ios' }, + { text: 'Android demo', link: 'https://github.com/inertia-native/demo-android' }, ], }, ], @@ -53,11 +53,11 @@ export default defineConfig({ ], socialLinks: [ - { icon: 'github', link: 'https://github.com/zumkorn/inertia-hotwire-native' }, + { icon: 'github', link: 'https://github.com/inertia-native/inertia-native' }, ], editLink: { - pattern: 'https://github.com/zumkorn/inertia-native-docs/edit/main/docs/:path', + pattern: 'https://github.com/inertia-native/docs/edit/main/docs/:path', text: 'Edit this page on GitHub', }, diff --git a/docs/components/alert.md b/docs/components/alert.md index 591b55c..35a7083 100644 --- a/docs/components/alert.md +++ b/docs/components/alert.md @@ -16,7 +16,7 @@ all — the page is left exactly as it was.* There is nothing to install. The files below are the complete component — paste the web one plus whichever platforms you ship into your app, and change them however you like. They are shown straight from the -[hotwire-bridge-components](https://github.com/zumkorn/hotwire-bridge-components/tree/main/registry/alert) +[bridge-components](https://github.com/inertia-native/bridge-components/tree/main/registry/alert) registry, so what you see here is what the registry holds. ::: diff --git a/docs/components/button.md b/docs/components/button.md index 4964d57..9dfe781 100644 --- a/docs/components/button.md +++ b/docs/components/button.md @@ -16,7 +16,7 @@ by the web page below it.* There is nothing to install. The files below are the complete component — paste the web one plus whichever platforms you ship into your app, and change them however you like. They are shown straight from the -[hotwire-bridge-components](https://github.com/zumkorn/hotwire-bridge-components/tree/main/registry/button) +[bridge-components](https://github.com/inertia-native/bridge-components/tree/main/registry/button) registry, so what you see here is what the registry holds. ::: diff --git a/docs/components/overview.md b/docs/components/overview.md index fad3580..bc1be3e 100644 --- a/docs/components/overview.md +++ b/docs/components/overview.md @@ -20,7 +20,7 @@ regular browser. The React entry exposes one generic primitive: ```js -import { useBridgeComponent } from 'inertia-hotwire-native/react' +import { useBridgeComponent } from 'inertia-native/react' ``` It returns whether the connected native app supports a component and a stable @@ -67,7 +67,7 @@ subsequent interaction is reported twice. ## Ready-made components Rather than writing each component from scratch, you can copy one from the -[hotwire-bridge-components](https://github.com/zumkorn/hotwire-bridge-components) +[bridge-components](https://github.com/inertia-native/bridge-components) registry. It ships both halves — the web component and its Swift counterpart — along with a contract describing the messages they exchange. @@ -82,7 +82,7 @@ Inertia form looks like this: ```js // hooks/useBridgeForm.js import { useEffect, useRef } from 'react' -import { useBridgeComponent } from 'inertia-hotwire-native/react' +import { useBridgeComponent } from 'inertia-native/react' export function useBridgeForm({ submitTitle, processing, onSubmit }) { const { supported, send } = useBridgeComponent('form') diff --git a/docs/guide/installation.md b/docs/guide/installation.md index 94acc2f..9df81b4 100644 --- a/docs/guide/installation.md +++ b/docs/guide/installation.md @@ -5,13 +5,13 @@ Published under the `beta` tag while the API stabilizes. Install with `@beta`. ::: ```bash -npm add inertia-hotwire-native@beta +npm add inertia-native@beta ``` ## Requirements - `@inertiajs/core` >= 2.0 (works with the v3 line) -- `react` >= 18 — only for the `inertia-hotwire-native/react` entry +- `react` >= 18 — only for the `inertia-native/react` entry ## Setup @@ -20,7 +20,7 @@ entrypoint: ```js import { createInertiaApp } from '@inertiajs/react' -import { initHotwireNative } from 'inertia-hotwire-native' +import { initHotwireNative } from 'inertia-native' const isHotwireNative = !!window.webkit?.messageHandlers?.turbo initHotwireNative({ debug: import.meta.env.DEV || isHotwireNative }) diff --git a/docs/guide/introduction.md b/docs/guide/introduction.md index f2f0c9a..46de47c 100644 --- a/docs/guide/introduction.md +++ b/docs/guide/introduction.md @@ -1,6 +1,6 @@ # Introduction -[`inertia-hotwire-native`](https://www.npmjs.com/package/inertia-hotwire-native) +[`inertia-native`](https://www.npmjs.com/package/inertia-native) lets an [Inertia.js](https://inertiajs.com) application run inside [Hotwire Native](https://native.hotwired.dev) (iOS & Android) and behave like a native app. @@ -24,18 +24,18 @@ navigates exactly as usual. ## Two entry points -- **Framework-agnostic core** (`inertia-hotwire-native`) — peer-depends on +- **Framework-agnostic core** (`inertia-native`) — peer-depends on `@inertiajs/core`. Handles all navigation. -- **React bindings** (`inertia-hotwire-native/react`) — optional, peer-depends +- **React bindings** (`inertia-native/react`) — optional, peer-depends on `react`. Provides `useBridgeComponent` for bridge components. ## The ecosystem | Repository | What it is | | --- | --- | -| [inertia-hotwire-native](https://github.com/zumkorn/inertia-hotwire-native) | The npm package | -| [inertia-native-demo](https://github.com/zumkorn/inertia-native-demo) | Web / Rails demo app | -| [inertia-native-ios-demo](https://github.com/zumkorn/inertia-native-ios-demo) | iOS Hotwire Native shell | -| [inertia-native-android-demo](https://github.com/zumkorn/inertia-native-android-demo) | Android Hotwire Native shell | +| [inertia-native](https://github.com/inertia-native/inertia-native) | The npm package | +| [demo-rails](https://github.com/inertia-native/demo-rails) | Web / Rails demo app | +| [demo-ios](https://github.com/inertia-native/demo-ios) | iOS Hotwire Native shell | +| [demo-android](https://github.com/inertia-native/demo-android) | Android Hotwire Native shell | Next: [Installation](/guide/installation). diff --git a/docs/index.md b/docs/index.md index 5f6838f..00cf7fe 100644 --- a/docs/index.md +++ b/docs/index.md @@ -14,7 +14,7 @@ hero: link: /guide/installation - theme: alt text: GitHub - link: https://github.com/zumkorn/inertia-hotwire-native + link: https://github.com/inertia-native/inertia-native features: - title: Native navigation diff --git a/docs/native/android.md b/docs/native/android.md index c6859c0..cf91fa0 100644 --- a/docs/native/android.md +++ b/docs/native/android.md @@ -7,7 +7,7 @@ any bridge components. ::: tip Reference app A runnable example lives in -[inertia-native-android-demo](https://github.com/zumkorn/inertia-native-android-demo). +[demo-android](https://github.com/inertia-native/demo-android). Clone it to see a working setup end to end. ::: diff --git a/docs/native/ios.md b/docs/native/ios.md index 95fb883..00e74ad 100644 --- a/docs/native/ios.md +++ b/docs/native/ios.md @@ -7,7 +7,7 @@ bridge components. ::: tip Reference app A runnable example lives in -[inertia-native-ios-demo](https://github.com/zumkorn/inertia-native-ios-demo). +[demo-ios](https://github.com/inertia-native/demo-ios). Clone it to see a working setup end to end. ::: @@ -34,7 +34,7 @@ Hotwire.registerBridgeComponents([ ``` Ready-made components — Swift source plus the matching web half — live in the -[hotwire-bridge-components](https://github.com/zumkorn/hotwire-bridge-components) +[bridge-components](https://github.com/inertia-native/bridge-components) registry. See [Button](/components/button) for a worked example, including the minimum SDK version they require. diff --git a/docs/reference/api.md b/docs/reference/api.md index 6647bd9..315f56b 100644 --- a/docs/reference/api.md +++ b/docs/reference/api.md @@ -3,7 +3,7 @@ ## `initHotwireNative` ```ts -import { initHotwireNative } from 'inertia-hotwire-native' +import { initHotwireNative } from 'inertia-native' initHotwireNative(options?: { debug?: boolean }): void ``` @@ -22,7 +22,7 @@ is a no-op. ## `useBridgeComponent` ```ts -import { useBridgeComponent } from 'inertia-hotwire-native/react' +import { useBridgeComponent } from 'inertia-native/react' useBridgeComponent(component: string): { supported: boolean