Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
decf64e
wip
pascalbaljet Aug 27, 2025
043a045
wip
pascalbaljet Aug 27, 2025
c65170c
wip
pascalbaljet Aug 27, 2025
6878bc8
Update createInertiaApp.ts
pascalbaljet Aug 27, 2025
5cc5e83
wip
pascalbaljet Aug 27, 2025
37eb73e
Update debug.ts
pascalbaljet Aug 27, 2025
24fe01f
Update createInertiaApp.ts
pascalbaljet Aug 27, 2025
ee0682e
wip
pascalbaljet Aug 27, 2025
8f840e1
Merge branch 'master' into ts-cleanup
pascalbaljet Oct 10, 2025
e596f7f
TS improvements
pascalbaljet Oct 10, 2025
8570642
Improve `<Head>` ts
pascalbaljet Oct 10, 2025
455bbf5
wip
pascalbaljet Oct 10, 2025
b5b1bb2
wip
pascalbaljet Oct 10, 2025
198e498
wip
pascalbaljet Oct 10, 2025
42bc3d9
Remove Axios import
pascalbaljet Oct 10, 2025
9356355
Update RememberEdit.svelte
pascalbaljet Oct 10, 2025
cc7867f
Update tsconfig.json
pascalbaljet Oct 10, 2025
65811f4
Update App.ts
pascalbaljet Oct 10, 2025
0798040
Update App.ts
pascalbaljet Oct 10, 2025
b80ac4d
Update App.ts
pascalbaljet Oct 10, 2025
c55f338
Vue fixes
pascalbaljet Oct 10, 2025
c02c4d1
wip
pascalbaljet Oct 10, 2025
1688e61
wip
pascalbaljet Oct 10, 2025
62cd7f8
wip
pascalbaljet Oct 10, 2025
08a4c71
wip
pascalbaljet Oct 10, 2025
838fdd4
Update app.ts
pascalbaljet Oct 10, 2025
fce5154
Svelte
pascalbaljet Oct 10, 2025
4529ead
Update useForm.ts
pascalbaljet Oct 10, 2025
35cd9d6
Shared page props
pascalbaljet Oct 15, 2025
2370310
Svelte test
pascalbaljet Oct 15, 2025
9f653b0
Fix code style
pascalbaljet Oct 15, 2025
49ba95a
Playground fixes
pascalbaljet Oct 15, 2025
14558ce
Add `globals.d.ts` to playgrounds
pascalbaljet Oct 15, 2025
1828742
Bump
pascalbaljet Oct 15, 2025
6c32d8f
Merge branch 'master' into ts-cleanup
pascalbaljet Oct 15, 2025
5c94537
wip
pascalbaljet Oct 15, 2025
392137e
Update createInertiaApp.ts
pascalbaljet Oct 15, 2025
79f27a1
Update createInertiaApp.ts
pascalbaljet Oct 15, 2025
472510d
wip
pascalbaljet Oct 15, 2025
f58f355
wip
pascalbaljet Oct 15, 2025
82a2a28
Merge branch 'master' into ts-cleanup
pascalbaljet Oct 15, 2025
74870e6
Fix code style
pascalbaljet Oct 15, 2025
13dd51a
Fix merge conflicts
pascalbaljet Oct 15, 2025
ce459d3
Merge branch 'ts-cleanup' of https://github.com/inertiajs/inertia int…
pascalbaljet Oct 15, 2025
9cb2008
Update head.ts
pascalbaljet Oct 15, 2025
e0a628a
Merge branch 'master' into ts-cleanup
pascalbaljet Oct 16, 2025
2ec540c
Merge branch 'master' into ts-cleanup
pascalbaljet Oct 16, 2025
ff5460f
Merge branch 'master' into ts-cleanup
pascalbaljet Oct 16, 2025
c96051f
Merge branch 'master' into ts-cleanup
pascalbaljet Oct 16, 2025
5d65f17
Update useForm.ts
pascalbaljet Oct 16, 2025
0b87c3c
Merge branch 'master' into ts-cleanup
pascalbaljet Oct 16, 2025
b926ae1
Fix code style
pascalbaljet Oct 16, 2025
31c7843
revert
pascalbaljet Oct 16, 2025
0e220ae
Merge branch 'ts-cleanup' of https://github.com/inertiajs/inertia int…
pascalbaljet Oct 16, 2025
952addc
Merge branch 'master' into ts-cleanup
pascalbaljet Oct 17, 2025
5399b6b
Revert some minor changes
pascalbaljet Oct 17, 2025
e2b9a3f
Merge branch 'master' into ts-cleanup
pascalbaljet Oct 17, 2025
89c2114
Merge branch 'master' into ts-cleanup
pascalbaljet Oct 17, 2025
dc39e73
Merge branch 'master' into ts-cleanup
pascalbaljet Oct 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
wip
  • Loading branch information
pascalbaljet committed Oct 15, 2025
commit f58f35523f263d6b88f265dbb5551cba52b17603
4 changes: 2 additions & 2 deletions packages/core/src/head.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import debounce from './debounce'
import { HeadManager, HeadManagerOnUpdateCallback, HeadOnUpdateCallback } from './types'
import { HeadManager, HeadManagerOnUpdateCallback, HeadManagerTitleCallback } from './types'

const Renderer = {
buildDOMElement(tag: string): ChildNode {
Expand Down Expand Up @@ -58,7 +58,7 @@ const Renderer = {

export default function createHeadManager(
isServer: boolean,
titleCallback: HeadOnUpdateCallback,
titleCallback: HeadManagerTitleCallback,
onUpdate: HeadManagerOnUpdateCallback,
): HeadManager {
const states: Record<string, Array<string>> = {}
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ export type InternalActiveVisit = ActiveVisit & {
export type VisitId = unknown
export type Component = unknown

export type HeadOnUpdateCallback = (title: string) => string
export type HeadManagerTitleCallback = (title: string) => string
export type HeadManagerOnUpdateCallback = (elements: string[]) => void
export type HeadManager = {
forceUpdate: () => void
Expand Down
8 changes: 4 additions & 4 deletions packages/react/src/createInertiaApp.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
CreateInertiaAppOptions,
HeadManagerOnUpdateCallback,
HeadOnUpdateCallback,
HeadManagerTitleCallback,
InertiaAppResponse,
Page,
PageProps,
Expand All @@ -18,7 +18,7 @@ type SetupProps<SharedProps extends PageProps> = {
initialPage: Page<SharedProps>
initialComponent: ReactNode
resolveComponent: ReactPageResolver
titleCallback?: HeadOnUpdateCallback
titleCallback?: HeadManagerTitleCallback
onHeadUpdate?: HeadManagerOnUpdateCallback
}

Expand All @@ -45,14 +45,14 @@ type SetupOptions<ElementType, SharedProps extends PageProps> = {
}

type InertiaAppOptionsForCSR<SharedProps extends PageProps> = CreateInertiaAppOptions & {
title?: HeadOnUpdateCallback
title?: HeadManagerTitleCallback
page?: Page<SharedProps>
render?: undefined
setup(options: SetupOptions<HTMLElement, SharedProps>): void
}

type InertiaAppOptionsForSSR<SharedProps extends PageProps> = CreateInertiaAppOptions & {
title?: HeadOnUpdateCallback
title?: HeadManagerTitleCallback
page: Page<SharedProps>
render: typeof renderToString
setup(options: SetupOptions<null, SharedProps>): ReactElement
Expand Down
6 changes: 3 additions & 3 deletions packages/vue3/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
createHeadManager,
HeadManager,
HeadManagerOnUpdateCallback,
HeadOnUpdateCallback,
HeadManagerTitleCallback,
Page,
PageHandler,
PageProps,
Expand Down Expand Up @@ -38,7 +38,7 @@ export interface InertiaAppProps<SharedProps extends PageProps = PageProps> {
initialPage: Page<SharedProps>
initialComponent?: object
resolveComponent?: (name: string) => DefineComponent | Promise<DefineComponent>
titleCallback?: HeadOnUpdateCallback
titleCallback?: HeadManagerTitleCallback
onHeadUpdate?: HeadManagerOnUpdateCallback
}

Expand Down Expand Up @@ -66,7 +66,7 @@ const App = defineComponent({
required: false,
},
titleCallback: {
type: Function as PropType<HeadOnUpdateCallback>,
type: Function as PropType<HeadManagerTitleCallback>,
required: false,
default: (title: string) => title,
},
Expand Down
8 changes: 4 additions & 4 deletions packages/vue3/src/createInertiaApp.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
CreateInertiaAppOptions,
HeadManagerOnUpdateCallback,
HeadOnUpdateCallback,
HeadManagerTitleCallback,
InertiaAppResponse,
Page,
PageProps,
Expand All @@ -17,7 +17,7 @@ export type SetupProps<SharedProps extends PageProps = PageProps> = {
initialPage: Page<SharedProps>
initialComponent: DefineComponent
resolveComponent: VuePageResolver
titleCallback?: HeadOnUpdateCallback
titleCallback?: HeadManagerTitleCallback
onHeadUpdate?: HeadManagerOnUpdateCallback
}

Expand All @@ -31,15 +31,15 @@ type SetupOptions<ElementType, SharedProps extends PageProps> = {
type CreateInertiaAppOptionsForCSR<SharedProps extends PageProps = PageProps> = CreateInertiaAppOptions & {
resolve: (name: string) => DefineComponent | Promise<DefineComponent> | { default: DefineComponent }
setup: (options: { el: HTMLElement; App: InertiaApp; props: InertiaAppProps<SharedProps>; plugin: Plugin }) => void
title?: HeadOnUpdateCallback
title?: HeadManagerTitleCallback
page?: Page<SharedProps>
render?: (app: VueApp) => Promise<string>
}

type CreateInertiaAppOptionsForSSR<SharedProps extends PageProps = PageProps> = CreateInertiaAppOptions & {
resolve: (name: string) => DefineComponent | Promise<DefineComponent> | { default: DefineComponent }
setup: (options: { el: null; App: InertiaApp; props: InertiaAppProps<SharedProps>; plugin: Plugin }) => VueApp
title?: HeadOnUpdateCallback
title?: HeadManagerTitleCallback
page?: Page<SharedProps>
render?: (app: VueApp) => Promise<string>
}
Expand Down