openuispec 0.2.10 → 0.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/check/index.ts +17 -0
- package/cli/index.ts +21 -3
- package/cli/init.ts +224 -10
- package/docs/cli.md +13 -8
- package/docs/file-formats.md +36 -0
- package/docs/implementation-notes.md +7 -0
- package/drift/index.ts +281 -40
- package/mcp-server/index.ts +179 -119
- package/mcp-server/screenshot.ts +19 -4
- package/package.json +5 -2
- package/prepare/index.ts +155 -18
- package/schema/openuispec.schema.json +59 -0
- package/schema/semantic-lint.ts +25 -1
- package/scripts/take-all-screenshots.ts +507 -0
- package/spec/openuispec-v0.1.md +13 -0
- package/status/index.ts +72 -2
- package/examples/social-app/.mcp.json +0 -10
- package/examples/social-app/AGENTS.md +0 -124
- package/examples/social-app/CLAUDE.md +0 -124
- package/examples/social-app/backend/.gitkeep +0 -1
- package/examples/social-app/generated/android/social-app/app/.paparazzi-hashes.json +0 -3
- package/examples/social-app/generated/android/social-app/app/build.gradle.kts +0 -94
- package/examples/social-app/generated/android/social-app/app/src/main/AndroidManifest.xml +0 -26
- package/examples/social-app/generated/android/social-app/app/src/main/java/com/social/app/AppContainer.kt +0 -20
- package/examples/social-app/generated/android/social-app/app/src/main/java/com/social/app/MainActivity.kt +0 -35
- package/examples/social-app/generated/android/social-app/app/src/main/java/com/social/app/SocialAppApplication.kt +0 -13
- package/examples/social-app/generated/android/social-app/app/src/main/java/com/social/app/data/MockData.kt +0 -98
- package/examples/social-app/generated/android/social-app/app/src/main/java/com/social/app/data/preferences/AppPreferences.kt +0 -19
- package/examples/social-app/generated/android/social-app/app/src/main/java/com/social/app/data/preferences/DataStorePreferencesRepository.kt +0 -68
- package/examples/social-app/generated/android/social-app/app/src/main/java/com/social/app/data/preferences/PreferencesRepository.kt +0 -15
- package/examples/social-app/generated/android/social-app/app/src/main/java/com/social/app/model/Models.kt +0 -34
- package/examples/social-app/generated/android/social-app/app/src/main/java/com/social/app/ui/MainShell.kt +0 -390
- package/examples/social-app/generated/android/social-app/app/src/main/java/com/social/app/ui/components/Components.kt +0 -234
- package/examples/social-app/generated/android/social-app/app/src/main/java/com/social/app/ui/components/ContractPrimitives.kt +0 -641
- package/examples/social-app/generated/android/social-app/app/src/main/java/com/social/app/ui/navigation/RootComponent.kt +0 -113
- package/examples/social-app/generated/android/social-app/app/src/main/java/com/social/app/ui/screens/ChatDetailScreen.kt +0 -212
- package/examples/social-app/generated/android/social-app/app/src/main/java/com/social/app/ui/screens/CreatePostScreen.kt +0 -113
- package/examples/social-app/generated/android/social-app/app/src/main/java/com/social/app/ui/screens/DiscoverScreen.kt +0 -137
- package/examples/social-app/generated/android/social-app/app/src/main/java/com/social/app/ui/screens/EditProfileScreen.kt +0 -180
- package/examples/social-app/generated/android/social-app/app/src/main/java/com/social/app/ui/screens/HomeFeedScreen.kt +0 -169
- package/examples/social-app/generated/android/social-app/app/src/main/java/com/social/app/ui/screens/MessagesInboxScreen.kt +0 -85
- package/examples/social-app/generated/android/social-app/app/src/main/java/com/social/app/ui/screens/NotificationsScreen.kt +0 -74
- package/examples/social-app/generated/android/social-app/app/src/main/java/com/social/app/ui/screens/PostDetailScreen.kt +0 -293
- package/examples/social-app/generated/android/social-app/app/src/main/java/com/social/app/ui/screens/ProfileSelfScreen.kt +0 -116
- package/examples/social-app/generated/android/social-app/app/src/main/java/com/social/app/ui/screens/SearchResultsScreen.kt +0 -161
- package/examples/social-app/generated/android/social-app/app/src/main/java/com/social/app/ui/screens/SettingsScreen.kt +0 -164
- package/examples/social-app/generated/android/social-app/app/src/main/java/com/social/app/ui/screens/SettingsStore.kt +0 -95
- package/examples/social-app/generated/android/social-app/app/src/main/java/com/social/app/ui/screens/UserProfileScreen.kt +0 -123
- package/examples/social-app/generated/android/social-app/app/src/main/java/com/social/app/ui/theme/Color.kt +0 -33
- package/examples/social-app/generated/android/social-app/app/src/main/java/com/social/app/ui/theme/Shape.kt +0 -41
- package/examples/social-app/generated/android/social-app/app/src/main/java/com/social/app/ui/theme/Spacing.kt +0 -20
- package/examples/social-app/generated/android/social-app/app/src/main/java/com/social/app/ui/theme/Theme.kt +0 -82
- package/examples/social-app/generated/android/social-app/app/src/main/java/com/social/app/ui/theme/Type.kt +0 -60
- package/examples/social-app/generated/android/social-app/app/src/main/res/drawable/ic_launcher_foreground.xml +0 -9
- package/examples/social-app/generated/android/social-app/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml +0 -5
- package/examples/social-app/generated/android/social-app/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml +0 -5
- package/examples/social-app/generated/android/social-app/app/src/main/res/values/strings.xml +0 -91
- package/examples/social-app/generated/android/social-app/app/src/main/res/values/themes.xml +0 -10
- package/examples/social-app/generated/android/social-app/app/src/main/res/values-ru/strings.xml +0 -79
- package/examples/social-app/generated/android/social-app/app/src/main/res/values-uz/strings.xml +0 -79
- package/examples/social-app/generated/android/social-app/app/src/main/xml/AndroidManifest.xml +0 -23
- package/examples/social-app/generated/android/social-app/app/src/test/kotlin/com/social/app/screenshots/HomeFeedScreenshotTest.kt +0 -34
- package/examples/social-app/generated/android/social-app/build.gradle.kts +0 -7
- package/examples/social-app/generated/android/social-app/gradle/libs.versions.toml +0 -50
- package/examples/social-app/generated/android/social-app/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/examples/social-app/generated/android/social-app/gradle/wrapper/gradle-wrapper.properties +0 -8
- package/examples/social-app/generated/android/social-app/gradle.properties +0 -11
- package/examples/social-app/generated/android/social-app/gradlew +0 -248
- package/examples/social-app/generated/android/social-app/settings.gradle.kts +0 -27
- package/examples/social-app/generated/web/social-app/index.html +0 -12
- package/examples/social-app/generated/web/social-app/package-lock.json +0 -2517
- package/examples/social-app/generated/web/social-app/package.json +0 -27
- package/examples/social-app/generated/web/social-app/src/app/App.tsx +0 -58
- package/examples/social-app/generated/web/social-app/src/components/Shell.tsx +0 -259
- package/examples/social-app/generated/web/social-app/src/components/cards.tsx +0 -317
- package/examples/social-app/generated/web/social-app/src/components/ui.tsx +0 -340
- package/examples/social-app/generated/web/social-app/src/flows/CreatePostFlow.tsx +0 -86
- package/examples/social-app/generated/web/social-app/src/i18n.tsx +0 -59
- package/examples/social-app/generated/web/social-app/src/lib/icons.tsx +0 -85
- package/examples/social-app/generated/web/social-app/src/lib/tokens.ts +0 -70
- package/examples/social-app/generated/web/social-app/src/lib/utils.ts +0 -97
- package/examples/social-app/generated/web/social-app/src/locales/en.json +0 -67
- package/examples/social-app/generated/web/social-app/src/locales/ru.json +0 -67
- package/examples/social-app/generated/web/social-app/src/locales/uz.json +0 -67
- package/examples/social-app/generated/web/social-app/src/main.tsx +0 -16
- package/examples/social-app/generated/web/social-app/src/screens/ChatDetailScreen.tsx +0 -90
- package/examples/social-app/generated/web/social-app/src/screens/DiscoverScreen.tsx +0 -86
- package/examples/social-app/generated/web/social-app/src/screens/EditProfileScreen.tsx +0 -57
- package/examples/social-app/generated/web/social-app/src/screens/HomeFeedScreen.tsx +0 -103
- package/examples/social-app/generated/web/social-app/src/screens/MessagesInboxScreen.tsx +0 -52
- package/examples/social-app/generated/web/social-app/src/screens/NotificationsScreen.tsx +0 -41
- package/examples/social-app/generated/web/social-app/src/screens/PostDetailScreen.tsx +0 -115
- package/examples/social-app/generated/web/social-app/src/screens/ProfileSelfScreen.tsx +0 -57
- package/examples/social-app/generated/web/social-app/src/screens/ProfileUserScreen.tsx +0 -76
- package/examples/social-app/generated/web/social-app/src/screens/SearchResultsScreen.tsx +0 -96
- package/examples/social-app/generated/web/social-app/src/screens/SettingsScreen.tsx +0 -79
- package/examples/social-app/generated/web/social-app/src/state/store.ts +0 -592
- package/examples/social-app/generated/web/social-app/src/styles.css +0 -125
- package/examples/social-app/generated/web/social-app/src/vite-env.d.ts +0 -1
- package/examples/social-app/generated/web/social-app/tsconfig.json +0 -22
- package/examples/social-app/generated/web/social-app/tsconfig.node.json +0 -13
- package/examples/social-app/generated/web/social-app/tsconfig.node.tsbuildinfo +0 -1
- package/examples/social-app/generated/web/social-app/tsconfig.tsbuildinfo +0 -1
- package/examples/social-app/generated/web/social-app/vite.config.d.ts +0 -2
- package/examples/social-app/generated/web/social-app/vite.config.js +0 -6
- package/examples/social-app/generated/web/social-app/vite.config.ts +0 -7
- package/examples/social-app/package.json +0 -13
- package/examples/social-app/take-web-screenshots.ts +0 -97
- package/examples/taskflow/.codex/config.toml +0 -4
- package/examples/taskflow/.mcp.json +0 -10
- package/examples/taskflow/AGENTS.md +0 -124
- package/examples/taskflow/CLAUDE.md +0 -124
- package/examples/taskflow/backend/.gitkeep +0 -1
- package/examples/taskflow/generated/android/TaskFlow/README.md +0 -43
- package/examples/taskflow/generated/android/TaskFlow/app/build.gradle.kts +0 -76
- package/examples/taskflow/generated/android/TaskFlow/app/proguard-rules.pro +0 -1
- package/examples/taskflow/generated/android/TaskFlow/app/src/main/AndroidManifest.xml +0 -21
- package/examples/taskflow/generated/android/TaskFlow/app/src/main/java/uz/rsteam/taskflow/MainActivity.kt +0 -19
- package/examples/taskflow/generated/android/TaskFlow/app/src/main/java/uz/rsteam/taskflow/TaskFlowApp.kt +0 -283
- package/examples/taskflow/generated/android/TaskFlow/app/src/main/java/uz/rsteam/taskflow/model/DomainModels.kt +0 -106
- package/examples/taskflow/generated/android/TaskFlow/app/src/main/java/uz/rsteam/taskflow/model/SampleData.kt +0 -57
- package/examples/taskflow/generated/android/TaskFlow/app/src/main/java/uz/rsteam/taskflow/ui/components/Common.kt +0 -109
- package/examples/taskflow/generated/android/TaskFlow/app/src/main/java/uz/rsteam/taskflow/ui/screens/HomeScreen.kt +0 -112
- package/examples/taskflow/generated/android/TaskFlow/app/src/main/java/uz/rsteam/taskflow/ui/screens/ProjectsScreen.kt +0 -61
- package/examples/taskflow/generated/android/TaskFlow/app/src/main/java/uz/rsteam/taskflow/ui/screens/SettingsScreen.kt +0 -82
- package/examples/taskflow/generated/android/TaskFlow/app/src/main/java/uz/rsteam/taskflow/ui/screens/TaskDetailScreen.kt +0 -111
- package/examples/taskflow/generated/android/TaskFlow/app/src/main/java/uz/rsteam/taskflow/ui/sheets/Sheets.kt +0 -77
- package/examples/taskflow/generated/android/TaskFlow/app/src/main/java/uz/rsteam/taskflow/ui/theme/Color.kt +0 -30
- package/examples/taskflow/generated/android/TaskFlow/app/src/main/java/uz/rsteam/taskflow/ui/theme/Theme.kt +0 -86
- package/examples/taskflow/generated/android/TaskFlow/app/src/main/java/uz/rsteam/taskflow/ui/theme/Type.kt +0 -57
- package/examples/taskflow/generated/android/TaskFlow/app/src/main/res/values/strings.xml +0 -155
- package/examples/taskflow/generated/android/TaskFlow/app/src/main/res/values/themes.xml +0 -4
- package/examples/taskflow/generated/android/TaskFlow/build.gradle.kts +0 -5
- package/examples/taskflow/generated/android/TaskFlow/gradle/gradle-daemon-jvm.properties +0 -12
- package/examples/taskflow/generated/android/TaskFlow/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/examples/taskflow/generated/android/TaskFlow/gradle/wrapper/gradle-wrapper.properties +0 -7
- package/examples/taskflow/generated/android/TaskFlow/gradle.properties +0 -4
- package/examples/taskflow/generated/android/TaskFlow/gradlew +0 -18
- package/examples/taskflow/generated/android/TaskFlow/gradlew.bat +0 -12
- package/examples/taskflow/generated/android/TaskFlow/settings.gradle.kts +0 -18
- package/examples/taskflow/generated/ios/TaskFlow/README.md +0 -21
- package/examples/taskflow/generated/ios/TaskFlow/Resources/en.lproj/Localizable.strings +0 -115
- package/examples/taskflow/generated/ios/TaskFlow/Sources/TaskFlow/App/TaskFlowApp.swift +0 -24
- package/examples/taskflow/generated/ios/TaskFlow/Sources/TaskFlow/Components/AppChrome.swift +0 -150
- package/examples/taskflow/generated/ios/TaskFlow/Sources/TaskFlow/Flows/TaskEditorSheet.swift +0 -220
- package/examples/taskflow/generated/ios/TaskFlow/Sources/TaskFlow/Models/DomainModels.swift +0 -122
- package/examples/taskflow/generated/ios/TaskFlow/Sources/TaskFlow/Screens/CalendarView.swift +0 -21
- package/examples/taskflow/generated/ios/TaskFlow/Sources/TaskFlow/Screens/HomeView.swift +0 -201
- package/examples/taskflow/generated/ios/TaskFlow/Sources/TaskFlow/Screens/ProfileEditView.swift +0 -48
- package/examples/taskflow/generated/ios/TaskFlow/Sources/TaskFlow/Screens/ProjectDetailView.swift +0 -59
- package/examples/taskflow/generated/ios/TaskFlow/Sources/TaskFlow/Screens/ProjectsView.swift +0 -63
- package/examples/taskflow/generated/ios/TaskFlow/Sources/TaskFlow/Screens/SettingsView.swift +0 -85
- package/examples/taskflow/generated/ios/TaskFlow/Sources/TaskFlow/Screens/TaskDetailView.swift +0 -219
- package/examples/taskflow/generated/ios/TaskFlow/Sources/TaskFlow/Support/AppModel.swift +0 -320
- package/examples/taskflow/generated/ios/TaskFlow/Sources/TaskFlow/Support/AppSupport.swift +0 -41
- package/examples/taskflow/generated/ios/TaskFlow/project.yml +0 -31
- package/examples/taskflow/generated/web/TaskFlow/README.md +0 -19
- package/examples/taskflow/generated/web/TaskFlow/index.html +0 -12
- package/examples/taskflow/generated/web/TaskFlow/package-lock.json +0 -1908
- package/examples/taskflow/generated/web/TaskFlow/package.json +0 -24
- package/examples/taskflow/generated/web/TaskFlow/src/App.tsx +0 -58
- package/examples/taskflow/generated/web/TaskFlow/src/AppShell.tsx +0 -55
- package/examples/taskflow/generated/web/TaskFlow/src/components/Common.tsx +0 -82
- package/examples/taskflow/generated/web/TaskFlow/src/components/Modals.tsx +0 -191
- package/examples/taskflow/generated/web/TaskFlow/src/components/Nav.tsx +0 -41
- package/examples/taskflow/generated/web/TaskFlow/src/generated/messages.ts +0 -131
- package/examples/taskflow/generated/web/TaskFlow/src/hooks.ts +0 -25
- package/examples/taskflow/generated/web/TaskFlow/src/i18n.ts +0 -39
- package/examples/taskflow/generated/web/TaskFlow/src/locales.en.json +0 -111
- package/examples/taskflow/generated/web/TaskFlow/src/main.tsx +0 -13
- package/examples/taskflow/generated/web/TaskFlow/src/screens/HomeScreen.tsx +0 -111
- package/examples/taskflow/generated/web/TaskFlow/src/screens/ProjectsScreen.tsx +0 -82
- package/examples/taskflow/generated/web/TaskFlow/src/screens/SettingsScreens.tsx +0 -132
- package/examples/taskflow/generated/web/TaskFlow/src/screens/TaskDetail.tsx +0 -105
- package/examples/taskflow/generated/web/TaskFlow/src/store.ts +0 -216
- package/examples/taskflow/generated/web/TaskFlow/src/styles.css +0 -617
- package/examples/taskflow/generated/web/TaskFlow/src/types.ts +0 -64
- package/examples/taskflow/generated/web/TaskFlow/src/utils.ts +0 -78
- package/examples/taskflow/generated/web/TaskFlow/tsconfig.json +0 -21
- package/examples/taskflow/generated/web/TaskFlow/vite.config.ts +0 -6
- package/examples/todo-orbit/.codex/config.toml +0 -4
- package/examples/todo-orbit/.mcp.json +0 -10
- package/examples/todo-orbit/AGENTS.md +0 -124
- package/examples/todo-orbit/CLAUDE.md +0 -124
- package/examples/todo-orbit/backend/.gitkeep +0 -1
- package/examples/todo-orbit/generated/android/Todo Orbit/README.md +0 -14
- package/examples/todo-orbit/generated/android/Todo Orbit/app/build.gradle.kts +0 -58
- package/examples/todo-orbit/generated/android/Todo Orbit/app/proguard-rules.pro +0 -1
- package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/AndroidManifest.xml +0 -20
- package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/MainActivity.kt +0 -14
- package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/TodoOrbitApp.kt +0 -345
- package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/support/AppLogic.kt +0 -231
- package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/support/Models.kt +0 -169
- package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/support/Strings.kt +0 -8
- package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/ui/components/CommonComponents.kt +0 -236
- package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/ui/screens/AnalyticsScreen.kt +0 -193
- package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/ui/screens/SettingsScreen.kt +0 -102
- package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/ui/screens/TasksScreen.kt +0 -347
- package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/ui/sheets/EditorSheets.kt +0 -347
- package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/java/uz/rsteam/todoorbit/ui/theme/TodoOrbitTheme.kt +0 -59
- package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/res/values/strings.xml +0 -149
- package/examples/todo-orbit/generated/android/Todo Orbit/app/src/main/res/values-ru/strings.xml +0 -155
- package/examples/todo-orbit/generated/android/Todo Orbit/build.gradle.kts +0 -4
- package/examples/todo-orbit/generated/android/Todo Orbit/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/examples/todo-orbit/generated/android/Todo Orbit/gradle/wrapper/gradle-wrapper.properties +0 -7
- package/examples/todo-orbit/generated/android/Todo Orbit/gradle.properties +0 -4
- package/examples/todo-orbit/generated/android/Todo Orbit/gradlew +0 -248
- package/examples/todo-orbit/generated/android/Todo Orbit/gradlew.bat +0 -93
- package/examples/todo-orbit/generated/android/Todo Orbit/settings.gradle.kts +0 -18
- package/examples/todo-orbit/generated/ios/Todo Orbit/.screenshot-uitest/Sources/ScreenshotUITest.swift +0 -36
- package/examples/todo-orbit/generated/ios/Todo Orbit/README.md +0 -29
- package/examples/todo-orbit/generated/ios/Todo Orbit/Resources/en.lproj/Localizable.strings +0 -119
- package/examples/todo-orbit/generated/ios/Todo Orbit/Resources/ru.lproj/Localizable.strings +0 -119
- package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/App/TodoOrbitApp.swift +0 -50
- package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Components/OrbitChrome.swift +0 -204
- package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Components/SchedulePreviewView.swift +0 -126
- package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Components/TrendChartView.swift +0 -70
- package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Flows/RecurringRuleSheet.swift +0 -126
- package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Flows/TaskEditorSheet.swift +0 -61
- package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Models/DomainModels.swift +0 -238
- package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Screens/AnalyticsView.swift +0 -94
- package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Screens/SettingsView.swift +0 -76
- package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Screens/TasksHomeView.swift +0 -364
- package/examples/todo-orbit/generated/ios/Todo Orbit/Sources/TodoOrbit/Support/AppModel.swift +0 -324
- package/examples/todo-orbit/generated/ios/Todo Orbit/TodoOrbit.xcodeproj/project.pbxproj +0 -439
- package/examples/todo-orbit/generated/ios/Todo Orbit/TodoOrbit.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
- package/examples/todo-orbit/generated/ios/Todo Orbit/TodoOrbit.xcodeproj/xcshareddata/xcschemes/TodoOrbit.xcscheme +0 -89
- package/examples/todo-orbit/generated/ios/Todo Orbit/project.yml +0 -32
- package/examples/todo-orbit/generated/web/Todo Orbit/index.html +0 -16
- package/examples/todo-orbit/generated/web/Todo Orbit/package-lock.json +0 -1087
- package/examples/todo-orbit/generated/web/Todo Orbit/package.json +0 -24
- package/examples/todo-orbit/generated/web/Todo Orbit/src/App.tsx +0 -2167
- package/examples/todo-orbit/generated/web/Todo Orbit/src/main.tsx +0 -13
- package/examples/todo-orbit/generated/web/Todo Orbit/src/styles.css +0 -926
- package/examples/todo-orbit/generated/web/Todo Orbit/tsconfig.json +0 -19
- package/examples/todo-orbit/generated/web/Todo Orbit/vite.config.ts +0 -6
package/examples/taskflow/generated/ios/TaskFlow/Sources/TaskFlow/Flows/TaskEditorSheet.swift
DELETED
|
@@ -1,220 +0,0 @@
|
|
|
1
|
-
import SwiftUI
|
|
2
|
-
|
|
3
|
-
enum TaskEditorMode {
|
|
4
|
-
case create
|
|
5
|
-
case edit(UUID)
|
|
6
|
-
|
|
7
|
-
var titleKey: String {
|
|
8
|
-
switch self {
|
|
9
|
-
case .create: "create_task.title"
|
|
10
|
-
case .edit: "edit_task.title"
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
var saveKey: String {
|
|
15
|
-
switch self {
|
|
16
|
-
case .create: "create_task.save"
|
|
17
|
-
case .edit: "edit_task.save"
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
struct TaskEditorSheet: View {
|
|
23
|
-
@Bindable var model: AppModel
|
|
24
|
-
let mode: TaskEditorMode
|
|
25
|
-
@Environment(\.dismiss) private var dismiss
|
|
26
|
-
@State private var draft = TaskDraft()
|
|
27
|
-
|
|
28
|
-
var body: some View {
|
|
29
|
-
NavigationStack {
|
|
30
|
-
Form {
|
|
31
|
-
Section {
|
|
32
|
-
TextField(model.localized("create_task.field_title_placeholder"), text: $draft.title)
|
|
33
|
-
TextField(model.localized("create_task.field_description_placeholder"), text: $draft.description, axis: .vertical)
|
|
34
|
-
.lineLimit(4, reservesSpace: true)
|
|
35
|
-
} header: {
|
|
36
|
-
Text(model.localized("create_task.field_title"))
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
Section {
|
|
40
|
-
Picker(model.localized("create_task.field_project"), selection: $draft.projectID) {
|
|
41
|
-
Text(model.localized("create_task.field_project_placeholder")).tag(UUID?.none)
|
|
42
|
-
ForEach(model.projects) { project in
|
|
43
|
-
Text(project.name).tag(UUID?.some(project.id))
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
Picker(model.localized("create_task.field_priority"), selection: $draft.priority) {
|
|
47
|
-
Text(model.localized("priority.low")).tag(TaskPriority.low)
|
|
48
|
-
Text(model.localized("priority.medium")).tag(TaskPriority.medium)
|
|
49
|
-
Text(model.localized("priority.high")).tag(TaskPriority.high)
|
|
50
|
-
Text(model.localized("priority.urgent")).tag(TaskPriority.urgent)
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
Section {
|
|
55
|
-
Toggle("Include due date", isOn: $draft.dueDateEnabled)
|
|
56
|
-
if draft.dueDateEnabled {
|
|
57
|
-
DatePicker(model.localized("create_task.field_due_date"), selection: $draft.dueDate, displayedComponents: [.date, .hourAndMinute])
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
Section {
|
|
62
|
-
TextField(model.localized("create_task.field_tags_placeholder"), text: $draft.tagsText)
|
|
63
|
-
Toggle(model.localized("create_task.field_assign_to_me"), isOn: $draft.assignToSelf)
|
|
64
|
-
} footer: {
|
|
65
|
-
Text(model.localized("create_task.field_tags_helper"))
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
.navigationTitle(model.localized(mode.titleKey))
|
|
69
|
-
.navigationBarTitleDisplayMode(.inline)
|
|
70
|
-
.toolbar {
|
|
71
|
-
ToolbarItem(placement: .topBarLeading) {
|
|
72
|
-
Button(model.localized("common.cancel")) {
|
|
73
|
-
dismiss()
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
ToolbarItem(placement: .topBarTrailing) {
|
|
77
|
-
Button(model.localized(mode.saveKey)) {
|
|
78
|
-
save()
|
|
79
|
-
}
|
|
80
|
-
.disabled(draft.title.trimmingCharacters(in: .whitespacesAndNewlines).count < 3)
|
|
81
|
-
.fontWeight(.semibold)
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
.onAppear {
|
|
85
|
-
switch mode {
|
|
86
|
-
case .create:
|
|
87
|
-
draft = TaskDraft(priority: model.preferences.defaultPriority)
|
|
88
|
-
case let .edit(taskID):
|
|
89
|
-
let task = model.tasks.first(where: { $0.id == taskID })
|
|
90
|
-
draft = model.makeDraft(task: task)
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
.presentationDetents([.medium, .large])
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
private func save() {
|
|
98
|
-
let normalizedTitle = draft.title.trimmingCharacters(in: .whitespacesAndNewlines)
|
|
99
|
-
guard normalizedTitle.count >= 3 else { return }
|
|
100
|
-
draft.title = normalizedTitle
|
|
101
|
-
switch mode {
|
|
102
|
-
case .create:
|
|
103
|
-
model.saveTask(draft, editing: nil)
|
|
104
|
-
case let .edit(taskID):
|
|
105
|
-
model.saveTask(draft, editing: taskID)
|
|
106
|
-
}
|
|
107
|
-
dismiss()
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
struct NewProjectSheet: View {
|
|
112
|
-
@Bindable var model: AppModel
|
|
113
|
-
@Environment(\.dismiss) private var dismiss
|
|
114
|
-
@State private var draft = ProjectDraft()
|
|
115
|
-
|
|
116
|
-
private let colors = ["#5B4FE8", "#E8634F", "#2D9D5E", "#D4920E", "#3B82D4"]
|
|
117
|
-
|
|
118
|
-
var body: some View {
|
|
119
|
-
NavigationStack {
|
|
120
|
-
Form {
|
|
121
|
-
Section {
|
|
122
|
-
TextField(model.localized("projects.field_name_placeholder"), text: $draft.name)
|
|
123
|
-
} header: {
|
|
124
|
-
Text(model.localized("projects.field_name"))
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
Section(header: Text(model.localized("projects.field_color"))) {
|
|
128
|
-
LazyVGrid(columns: [GridItem(.adaptive(minimum: 44))], spacing: 12) {
|
|
129
|
-
ForEach(colors, id: \.self) { hex in
|
|
130
|
-
Circle()
|
|
131
|
-
.fill(Color(hex: hex))
|
|
132
|
-
.frame(width: 36, height: 36)
|
|
133
|
-
.overlay {
|
|
134
|
-
if draft.colorHex == hex {
|
|
135
|
-
Circle().stroke(.white, lineWidth: 3)
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
.onTapGesture {
|
|
139
|
-
draft.colorHex = hex
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
.padding(.vertical, 8)
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
.navigationTitle(model.localized("projects.dialog_title"))
|
|
147
|
-
.navigationBarTitleDisplayMode(.inline)
|
|
148
|
-
.toolbar {
|
|
149
|
-
ToolbarItem(placement: .topBarLeading) {
|
|
150
|
-
Button(model.localized("common.cancel")) {
|
|
151
|
-
dismiss()
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
ToolbarItem(placement: .topBarTrailing) {
|
|
155
|
-
Button(model.localized("common.create")) {
|
|
156
|
-
model.createProject(draft)
|
|
157
|
-
dismiss()
|
|
158
|
-
}
|
|
159
|
-
.disabled(draft.name.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty)
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
struct AssignTaskSheet: View {
|
|
167
|
-
@Bindable var model: AppModel
|
|
168
|
-
let taskID: UUID
|
|
169
|
-
@Environment(\.dismiss) private var dismiss
|
|
170
|
-
@State private var query = ""
|
|
171
|
-
|
|
172
|
-
private var filteredUsers: [UserProfile] {
|
|
173
|
-
if query.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty {
|
|
174
|
-
return model.team
|
|
175
|
-
}
|
|
176
|
-
return model.team.filter {
|
|
177
|
-
$0.name.localizedCaseInsensitiveContains(query) ||
|
|
178
|
-
$0.email.localizedCaseInsensitiveContains(query)
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
var body: some View {
|
|
183
|
-
NavigationStack {
|
|
184
|
-
List {
|
|
185
|
-
Section {
|
|
186
|
-
TextField(model.localized("task_detail.search_people_placeholder"), text: $query)
|
|
187
|
-
.textInputAutocapitalization(.never)
|
|
188
|
-
} header: {
|
|
189
|
-
Text(model.localized("task_detail.search_people"))
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
Section {
|
|
193
|
-
ForEach(filteredUsers) { user in
|
|
194
|
-
Button {
|
|
195
|
-
model.assignTask(taskID: taskID, userID: user.id)
|
|
196
|
-
dismiss()
|
|
197
|
-
} label: {
|
|
198
|
-
VStack(alignment: .leading, spacing: 4) {
|
|
199
|
-
Text(user.name)
|
|
200
|
-
Text(user.email)
|
|
201
|
-
.font(.caption)
|
|
202
|
-
.foregroundStyle(AppPalette.textSecondary)
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
.navigationTitle(model.localized("task_detail.assign_to"))
|
|
209
|
-
.navigationBarTitleDisplayMode(.inline)
|
|
210
|
-
.toolbar {
|
|
211
|
-
ToolbarItem(placement: .topBarTrailing) {
|
|
212
|
-
Button(model.localized("common.cancel")) {
|
|
213
|
-
dismiss()
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
.presentationDetents([.medium, .large])
|
|
219
|
-
}
|
|
220
|
-
}
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import Foundation
|
|
2
|
-
|
|
3
|
-
enum AppSection: String, CaseIterable, Identifiable {
|
|
4
|
-
case home
|
|
5
|
-
case projects
|
|
6
|
-
case calendar
|
|
7
|
-
case settings
|
|
8
|
-
|
|
9
|
-
var id: String { rawValue }
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
enum TaskStatus: String, CaseIterable, Codable {
|
|
13
|
-
case todo
|
|
14
|
-
case inProgress = "in_progress"
|
|
15
|
-
case done
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
enum TaskPriority: String, CaseIterable, Codable {
|
|
19
|
-
case low
|
|
20
|
-
case medium
|
|
21
|
-
case high
|
|
22
|
-
case urgent
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
enum HomeFilter: String, CaseIterable, Codable {
|
|
26
|
-
case all
|
|
27
|
-
case today
|
|
28
|
-
case upcoming
|
|
29
|
-
case done
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
enum SortOrder: String, CaseIterable, Codable {
|
|
33
|
-
case dueDate = "due_date"
|
|
34
|
-
case priority = "priority"
|
|
35
|
-
case createdAt = "created_at"
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
enum ThemePreference: String, CaseIterable, Codable {
|
|
39
|
-
case system
|
|
40
|
-
case light
|
|
41
|
-
case dark
|
|
42
|
-
case warm
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
struct Project: Identifiable, Hashable, Codable {
|
|
46
|
-
let id: UUID
|
|
47
|
-
var name: String
|
|
48
|
-
var colorHex: String
|
|
49
|
-
var icon: String
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
struct UserProfile: Identifiable, Hashable, Codable {
|
|
53
|
-
let id: UUID
|
|
54
|
-
var name: String
|
|
55
|
-
var firstName: String
|
|
56
|
-
var email: String
|
|
57
|
-
var avatarSymbol: String?
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
struct TaskAttachment: Hashable, Codable {
|
|
61
|
-
var mediaType: String
|
|
62
|
-
var title: String
|
|
63
|
-
var url: URL?
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
struct Task: Identifiable, Hashable, Codable {
|
|
67
|
-
let id: UUID
|
|
68
|
-
var title: String
|
|
69
|
-
var description: String?
|
|
70
|
-
var status: TaskStatus
|
|
71
|
-
var priority: TaskPriority
|
|
72
|
-
var dueDate: Date?
|
|
73
|
-
var projectID: UUID?
|
|
74
|
-
var assigneeID: UUID?
|
|
75
|
-
var tags: [String]
|
|
76
|
-
var createdAt: Date
|
|
77
|
-
var updatedAt: Date
|
|
78
|
-
var attachment: TaskAttachment?
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
struct Preferences: Codable {
|
|
82
|
-
var theme: ThemePreference
|
|
83
|
-
var defaultPriority: TaskPriority
|
|
84
|
-
var notificationsEnabled: Bool
|
|
85
|
-
var remindersEnabled: Bool
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
struct TaskDraft {
|
|
89
|
-
var title = ""
|
|
90
|
-
var description = ""
|
|
91
|
-
var projectID: UUID?
|
|
92
|
-
var priority: TaskPriority = .medium
|
|
93
|
-
var dueDateEnabled = false
|
|
94
|
-
var dueDate = Date()
|
|
95
|
-
var tagsText = ""
|
|
96
|
-
var assignToSelf = true
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
struct ProjectDraft {
|
|
100
|
-
var name = ""
|
|
101
|
-
var colorHex = "#5B4FE8"
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
enum PresentedSheet: Identifiable {
|
|
105
|
-
case createTask
|
|
106
|
-
case editTask(UUID)
|
|
107
|
-
case newProject
|
|
108
|
-
case assignTask(UUID)
|
|
109
|
-
|
|
110
|
-
var id: String {
|
|
111
|
-
switch self {
|
|
112
|
-
case .createTask:
|
|
113
|
-
return "createTask"
|
|
114
|
-
case let .editTask(id):
|
|
115
|
-
return "editTask-\(id.uuidString)"
|
|
116
|
-
case .newProject:
|
|
117
|
-
return "newProject"
|
|
118
|
-
case let .assignTask(id):
|
|
119
|
-
return "assignTask-\(id.uuidString)"
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
}
|
package/examples/taskflow/generated/ios/TaskFlow/Sources/TaskFlow/Screens/CalendarView.swift
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import SwiftUI
|
|
2
|
-
|
|
3
|
-
struct CalendarView: View {
|
|
4
|
-
@Bindable var model: AppModel
|
|
5
|
-
|
|
6
|
-
var body: some View {
|
|
7
|
-
VStack(spacing: 18) {
|
|
8
|
-
Image(systemName: "calendar.badge.clock")
|
|
9
|
-
.font(.system(size: 52))
|
|
10
|
-
.foregroundStyle(AppPalette.brandPrimary)
|
|
11
|
-
Text(model.localized("calendar.title"))
|
|
12
|
-
.font(.largeTitle.weight(.bold))
|
|
13
|
-
Text(model.localized("calendar.coming_soon"))
|
|
14
|
-
.foregroundStyle(AppPalette.textSecondary)
|
|
15
|
-
}
|
|
16
|
-
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
|
17
|
-
.padding()
|
|
18
|
-
.background(Color(.systemGroupedBackground))
|
|
19
|
-
.navigationTitle(model.localized("calendar.title"))
|
|
20
|
-
}
|
|
21
|
-
}
|
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
import SwiftUI
|
|
2
|
-
|
|
3
|
-
struct HomeView: View {
|
|
4
|
-
@Bindable var model: AppModel
|
|
5
|
-
|
|
6
|
-
var body: some View {
|
|
7
|
-
GeometryReader { geometry in
|
|
8
|
-
let expanded = geometry.size.width >= 900
|
|
9
|
-
ScrollView {
|
|
10
|
-
VStack(alignment: .leading, spacing: 24) {
|
|
11
|
-
header
|
|
12
|
-
searchField
|
|
13
|
-
filterRow
|
|
14
|
-
if expanded {
|
|
15
|
-
HStack(alignment: .top, spacing: 24) {
|
|
16
|
-
taskList(expanded: true)
|
|
17
|
-
.frame(maxWidth: .infinity)
|
|
18
|
-
detailPanel
|
|
19
|
-
.frame(maxWidth: 420)
|
|
20
|
-
}
|
|
21
|
-
} else {
|
|
22
|
-
taskList(expanded: false)
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
.padding(24)
|
|
26
|
-
}
|
|
27
|
-
.background(Color(.systemGroupedBackground))
|
|
28
|
-
.navigationTitle(model.localized("nav.tasks"))
|
|
29
|
-
.toolbar {
|
|
30
|
-
ToolbarItem(placement: .topBarTrailing) {
|
|
31
|
-
Button {
|
|
32
|
-
model.presentedSheet = .createTask
|
|
33
|
-
} label: {
|
|
34
|
-
Label(model.localized("home.new_task"), systemImage: "plus")
|
|
35
|
-
}
|
|
36
|
-
.buttonStyle(.borderedProminent)
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
private var header: some View {
|
|
43
|
-
VStack(alignment: .leading, spacing: 6) {
|
|
44
|
-
Text(model.greeting())
|
|
45
|
-
.font(.system(size: 30, weight: .bold, design: .rounded))
|
|
46
|
-
Text(model.todayCountText())
|
|
47
|
-
.font(.body)
|
|
48
|
-
.foregroundStyle(AppPalette.textSecondary)
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
private var searchField: some View {
|
|
53
|
-
VStack(alignment: .leading, spacing: 8) {
|
|
54
|
-
Text(model.localized("home.search_label"))
|
|
55
|
-
.font(.caption.weight(.semibold))
|
|
56
|
-
.foregroundStyle(AppPalette.textSecondary)
|
|
57
|
-
TextField(model.localized("home.search_placeholder"), text: $model.searchQuery)
|
|
58
|
-
.textFieldStyle(.roundedBorder)
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
private var filterRow: some View {
|
|
63
|
-
ScrollView(.horizontal, showsIndicators: false) {
|
|
64
|
-
HStack(spacing: 10) {
|
|
65
|
-
filterChip(.all)
|
|
66
|
-
filterChip(.today)
|
|
67
|
-
filterChip(.upcoming)
|
|
68
|
-
filterChip(.done)
|
|
69
|
-
Picker("Sort", selection: $model.sortOrder) {
|
|
70
|
-
Text("Due").tag(SortOrder.dueDate)
|
|
71
|
-
Text("Priority").tag(SortOrder.priority)
|
|
72
|
-
Text("Created").tag(SortOrder.createdAt)
|
|
73
|
-
}
|
|
74
|
-
.pickerStyle(.menu)
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
private func filterChip(_ filter: HomeFilter) -> some View {
|
|
80
|
-
let selected = model.homeFilter == filter
|
|
81
|
-
let title: String
|
|
82
|
-
switch filter {
|
|
83
|
-
case .all: title = model.localized("home.filter.all")
|
|
84
|
-
case .today: title = model.localized("home.filter.today")
|
|
85
|
-
case .upcoming: title = model.localized("home.filter.upcoming")
|
|
86
|
-
case .done: title = model.localized("home.filter.done")
|
|
87
|
-
}
|
|
88
|
-
return Button {
|
|
89
|
-
model.homeFilter = filter
|
|
90
|
-
} label: {
|
|
91
|
-
Text("\(title) (\(model.count(for: filter)))")
|
|
92
|
-
.font(.subheadline.weight(.semibold))
|
|
93
|
-
.padding(.horizontal, 12)
|
|
94
|
-
.padding(.vertical, 8)
|
|
95
|
-
.background(selected ? AppPalette.brandPrimary : AppPalette.surfaceSecondary)
|
|
96
|
-
.foregroundStyle(selected ? .white : .primary)
|
|
97
|
-
.clipShape(Capsule())
|
|
98
|
-
}
|
|
99
|
-
.buttonStyle(.plain)
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
private func taskList(expanded: Bool) -> some View {
|
|
103
|
-
VStack(alignment: .leading, spacing: 14) {
|
|
104
|
-
if model.filteredTasks.isEmpty {
|
|
105
|
-
ContentUnavailableView(
|
|
106
|
-
model.localized("home.empty_title"),
|
|
107
|
-
systemImage: "checkmark.circle.fill",
|
|
108
|
-
description: Text(model.localized("home.empty_body"))
|
|
109
|
-
)
|
|
110
|
-
.frame(maxWidth: .infinity)
|
|
111
|
-
.padding(.top, 40)
|
|
112
|
-
} else {
|
|
113
|
-
ForEach(model.filteredTasks) { task in
|
|
114
|
-
if expanded {
|
|
115
|
-
taskRow(task)
|
|
116
|
-
} else {
|
|
117
|
-
NavigationLink {
|
|
118
|
-
TaskDetailView(model: model, taskID: task.id)
|
|
119
|
-
} label: {
|
|
120
|
-
taskCard(task)
|
|
121
|
-
}
|
|
122
|
-
.buttonStyle(.plain)
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
private func taskRow(_ task: Task) -> some View {
|
|
130
|
-
Button {
|
|
131
|
-
model.selectedTaskID = task.id
|
|
132
|
-
} label: {
|
|
133
|
-
taskCard(task)
|
|
134
|
-
.overlay {
|
|
135
|
-
RoundedRectangle(cornerRadius: 24)
|
|
136
|
-
.stroke(model.selectedTaskID == task.id ? AppPalette.brandPrimary : .clear, lineWidth: 2)
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
.buttonStyle(.plain)
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
private func taskCard(_ task: Task) -> some View {
|
|
143
|
-
HStack(alignment: .top, spacing: 14) {
|
|
144
|
-
Image(systemName: task.status == .done ? "checkmark.circle.fill" : "circle")
|
|
145
|
-
.font(.title3)
|
|
146
|
-
.foregroundStyle(task.status == .done ? AppPalette.success : AppPalette.textTertiary)
|
|
147
|
-
|
|
148
|
-
VStack(alignment: .leading, spacing: 6) {
|
|
149
|
-
Text(task.title)
|
|
150
|
-
.font(.headline)
|
|
151
|
-
Text([model.project(for: task)?.name, relativeDate(task.dueDate)].compactMap { $0 }.joined(separator: " · "))
|
|
152
|
-
.font(.subheadline)
|
|
153
|
-
.foregroundStyle(AppPalette.textSecondary)
|
|
154
|
-
if !task.tags.isEmpty {
|
|
155
|
-
HStack(spacing: 6) {
|
|
156
|
-
ForEach(task.tags, id: \.self) { tag in
|
|
157
|
-
Text(tag)
|
|
158
|
-
.font(.caption.weight(.medium))
|
|
159
|
-
.padding(.horizontal, 8)
|
|
160
|
-
.padding(.vertical, 4)
|
|
161
|
-
.background(AppPalette.surfaceSecondary)
|
|
162
|
-
.clipShape(Capsule())
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
Spacer()
|
|
168
|
-
Circle()
|
|
169
|
-
.fill(priorityColor(task.priority))
|
|
170
|
-
.frame(width: 10, height: 10)
|
|
171
|
-
}
|
|
172
|
-
.padding(18)
|
|
173
|
-
.background(.background)
|
|
174
|
-
.clipShape(RoundedRectangle(cornerRadius: 24))
|
|
175
|
-
.shadow(color: .black.opacity(0.05), radius: 12, y: 4)
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
private var detailPanel: some View {
|
|
179
|
-
Group {
|
|
180
|
-
if let selectedTask = model.selectedTask {
|
|
181
|
-
TaskDetailPanel(model: model, taskID: selectedTask.id)
|
|
182
|
-
} else {
|
|
183
|
-
ContentUnavailableView("Select a task", systemImage: "sidebar.right", description: Text("Choose a task to inspect its details."))
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
private func relativeDate(_ date: Date?) -> String? {
|
|
189
|
-
guard let date else { return nil }
|
|
190
|
-
return date.formatted(.relative(presentation: .named))
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
private func priorityColor(_ priority: TaskPriority) -> Color {
|
|
194
|
-
switch priority {
|
|
195
|
-
case .low: Color(hex: "#9CA3AF")
|
|
196
|
-
case .medium: AppPalette.info
|
|
197
|
-
case .high: AppPalette.warning
|
|
198
|
-
case .urgent: AppPalette.danger
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
}
|
package/examples/taskflow/generated/ios/TaskFlow/Sources/TaskFlow/Screens/ProfileEditView.swift
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import SwiftUI
|
|
2
|
-
|
|
3
|
-
struct ProfileEditView: View {
|
|
4
|
-
@Bindable var model: AppModel
|
|
5
|
-
@Environment(\.dismiss) private var dismiss
|
|
6
|
-
@State private var name = ""
|
|
7
|
-
@State private var email = ""
|
|
8
|
-
|
|
9
|
-
var body: some View {
|
|
10
|
-
Form {
|
|
11
|
-
Section {
|
|
12
|
-
VStack(spacing: 12) {
|
|
13
|
-
Image(systemName: model.currentUser.avatarSymbol ?? "person.crop.circle.fill")
|
|
14
|
-
.font(.system(size: 54))
|
|
15
|
-
.foregroundStyle(AppPalette.brandPrimary)
|
|
16
|
-
Text(model.currentUser.name)
|
|
17
|
-
.font(.headline)
|
|
18
|
-
Text(model.currentUser.email)
|
|
19
|
-
.foregroundStyle(AppPalette.textSecondary)
|
|
20
|
-
Button(model.localized("profile.change_photo")) {}
|
|
21
|
-
}
|
|
22
|
-
.frame(maxWidth: .infinity)
|
|
23
|
-
.padding(.vertical, 12)
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
Section {
|
|
27
|
-
TextField(model.localized("profile.field_name"), text: $name)
|
|
28
|
-
TextField(model.localized("profile.field_email"), text: $email)
|
|
29
|
-
.textInputAutocapitalization(.never)
|
|
30
|
-
.keyboardType(.emailAddress)
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
Section {
|
|
34
|
-
Button(model.localized("profile.save")) {
|
|
35
|
-
model.updateProfile(name: name, email: email)
|
|
36
|
-
dismiss()
|
|
37
|
-
}
|
|
38
|
-
.buttonStyle(.borderedProminent)
|
|
39
|
-
.frame(maxWidth: .infinity, alignment: .center)
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
.navigationTitle(model.localized("profile.save"))
|
|
43
|
-
.onAppear {
|
|
44
|
-
name = model.currentUser.name
|
|
45
|
-
email = model.currentUser.email
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
package/examples/taskflow/generated/ios/TaskFlow/Sources/TaskFlow/Screens/ProjectDetailView.swift
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import SwiftUI
|
|
2
|
-
|
|
3
|
-
struct ProjectDetailView: View {
|
|
4
|
-
@Bindable var model: AppModel
|
|
5
|
-
let projectID: UUID
|
|
6
|
-
|
|
7
|
-
private var project: Project? {
|
|
8
|
-
model.projects.first(where: { $0.id == projectID })
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
var body: some View {
|
|
12
|
-
Group {
|
|
13
|
-
if let project {
|
|
14
|
-
List {
|
|
15
|
-
Section {
|
|
16
|
-
VStack(alignment: .leading, spacing: 12) {
|
|
17
|
-
HStack {
|
|
18
|
-
Image(systemName: project.icon)
|
|
19
|
-
.foregroundStyle(Color(hex: project.colorHex))
|
|
20
|
-
Text(project.name)
|
|
21
|
-
.font(.largeTitle.weight(.bold))
|
|
22
|
-
}
|
|
23
|
-
Text("\(model.tasks(for: project).count) tasks")
|
|
24
|
-
.foregroundStyle(AppPalette.textSecondary)
|
|
25
|
-
}
|
|
26
|
-
.padding(.vertical, 8)
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
Section {
|
|
30
|
-
if model.tasks(for: project).isEmpty {
|
|
31
|
-
ContentUnavailableView(
|
|
32
|
-
model.localized("project_detail.empty_title"),
|
|
33
|
-
systemImage: "checkmark.circle.fill",
|
|
34
|
-
description: Text(model.localized("project_detail.empty_body"))
|
|
35
|
-
)
|
|
36
|
-
.padding(.vertical, 24)
|
|
37
|
-
} else {
|
|
38
|
-
ForEach(model.tasks(for: project)) { task in
|
|
39
|
-
NavigationLink {
|
|
40
|
-
TaskDetailView(model: model, taskID: task.id)
|
|
41
|
-
} label: {
|
|
42
|
-
VStack(alignment: .leading, spacing: 4) {
|
|
43
|
-
Text(task.title)
|
|
44
|
-
Text(task.dueDate?.formatted(.relative(presentation: .named)) ?? "No due date")
|
|
45
|
-
.font(.subheadline)
|
|
46
|
-
.foregroundStyle(AppPalette.textSecondary)
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
.navigationTitle(project.name)
|
|
54
|
-
} else {
|
|
55
|
-
ContentUnavailableView("Project missing", systemImage: "folder.badge.questionmark")
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|