-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #921 from tutors-sdk/development
introduce Domain Driven Design refactor of services
- Loading branch information
Showing
111 changed files
with
1,018 additions
and
824 deletions.
There are no files selected for viewing
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,23 @@ | ||
import type { TutorsId } from "$lib/services/connect"; | ||
import type { Course, Lo } from "./services/base/lo-types"; | ||
|
||
export const rune = <T>(initialValue: T) => { | ||
let _rune = $state(initialValue); | ||
return { | ||
get value() { | ||
return _rune; | ||
}, | ||
set value(v: T) { | ||
_rune = v; | ||
} | ||
}; | ||
}; | ||
|
||
export const currentLabStepIndex = rune(0); | ||
export const adobeLoaded = rune(false); | ||
export const animationDelay = rune(200); | ||
|
||
export const currentLo = rune<Lo | null>(null); | ||
export const currentCourse = rune<Course | null>(null); | ||
|
||
export const tutorsId = rune<TutorsId | null>(null); |
This file was deleted.
Oops, something went wrong.
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,58 @@ | ||
/** | ||
* Re-exports base types, utilities and constants for easier imports | ||
* @module | ||
*/ | ||
|
||
// Type exports from lo-types | ||
export type { | ||
Lo, | ||
Course, | ||
Topic, | ||
Lab, | ||
LabStep, | ||
Talk, | ||
Note, | ||
Web, | ||
Github, | ||
Archive, | ||
PanelNote, | ||
PanelTalk, | ||
PanelVideo, | ||
Panels, | ||
Units, | ||
Composite, | ||
Unit, | ||
Side, | ||
Calendar, | ||
WeekType, | ||
VideoIdentifier, | ||
VideoIdentifiers, | ||
LearningResource, | ||
Properties, | ||
IconType, | ||
LearningRecord, | ||
LoType | ||
} from "./lo-types"; | ||
|
||
// Utility functions from lo-types | ||
export { | ||
imageTypes, | ||
assetTypes, | ||
isCompositeLo | ||
} from "./lo-types"; | ||
|
||
// Supabase client and utilities | ||
export { | ||
supabase, | ||
getNumOfLearningRecordsIncrements, | ||
getCalendarDuration, | ||
getCalendarCount, | ||
getDurationTotal, | ||
insertOrUpdateCalendar, | ||
handleInteractionData, | ||
storeStudentCourseLearningObjectInSupabase, | ||
updateLearningRecordsDuration, | ||
addOrUpdateStudent, | ||
formatDate, | ||
updateCalendarDuration | ||
} from "./utils/supabase-client"; |
Oops, something went wrong.