-
Notifications
You must be signed in to change notification settings - Fork 395
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(singletons): fix build issues and move CalendarContext interface …
…back
- Loading branch information
Showing
6 changed files
with
29 additions
and
14 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
packages/sanity/src/_singletons/form/inputs/PortableText/PortableTextMemberItemsContext.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
import {createContext} from 'react' | ||
import type {PortableTextMemberItem} from 'sanity' | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export const PortableTextMemberItemsContext = createContext<PortableTextMemberItem[]>([]) |
3 changes: 3 additions & 0 deletions
3
packages/sanity/src/_singletons/form/studio/PresenceContext.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
import {createContext} from 'react' | ||
import type {FormNodePresence} from 'sanity' | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export const PresenceContext = createContext<FormNodePresence[]>([]) |
17 changes: 4 additions & 13 deletions
17
...avbar/search/components/filters/filter/inputs/date/datePicker/calendar/CalendarContext.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,8 @@ | ||
import {createContext} from 'react' | ||
|
||
export interface CalendarContextValue { | ||
date?: Date | ||
endDate?: Date | ||
focusedDate: Date | ||
selectRange?: boolean | ||
selectTime?: boolean | ||
|
||
/** | ||
* An integer indicating the first day of the week. | ||
* Can be either 1 (Monday) or 7 (Sunday). | ||
*/ | ||
firstWeekDay: 1 | 7 | ||
} | ||
import type {CalendarContextValue} from '../../../../../../../../../../../../core/studio/components/navbar/search/components/filters/filter/inputs/date/datePicker/calendar/contexts/CalendarContext' | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export const CalendarContext = createContext<CalendarContextValue | undefined>(undefined) |
3 changes: 3 additions & 0 deletions
3
packages/sanity/src/_singletons/user-color/UserColorManagerContext.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
import {createContext} from 'react' | ||
import type {UserColorManager} from 'sanity' | ||
|
||
/** | ||
* @internal | ||
*/ | ||
export const UserColorManagerContext = createContext<UserColorManager | null>(null) |
13 changes: 13 additions & 0 deletions
13
...rch/components/filters/filter/inputs/date/datePicker/calendar/contexts/CalendarContext.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
export interface CalendarContextValue { | ||
date?: Date | ||
endDate?: Date | ||
focusedDate: Date | ||
selectRange?: boolean | ||
selectTime?: boolean | ||
|
||
/** | ||
* An integer indicating the first day of the week. | ||
* Can be either 1 (Monday) or 7 (Sunday). | ||
*/ | ||
firstWeekDay: 1 | 7 | ||
} |
4 changes: 3 additions & 1 deletion
4
...earch/components/filters/filter/inputs/date/datePicker/calendar/contexts/useDatePicker.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters