2024-09-30 20:08:38 -04:00
|
|
|
@go.Package { name = "github.com/onsonr/sonr/pkg/nebula/models" }
|
|
|
|
|
|
|
|
module models
|
|
|
|
|
|
|
|
import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl"
|
|
|
|
|
2024-09-30 21:51:16 -04:00
|
|
|
// ╭───────────────────────────────────────────────────────────╮
|
2024-10-02 20:23:28 -04:00
|
|
|
// │ General State │
|
2024-09-30 21:51:16 -04:00
|
|
|
// ╰───────────────────────────────────────────────────────────╯
|
|
|
|
|
2024-10-03 01:01:49 -04:00
|
|
|
typealias InputType = "text" | "password" | "email" | "credential" | "file"
|
2024-09-30 21:27:02 -04:00
|
|
|
|
2024-10-03 01:01:49 -04:00
|
|
|
class Button {
|
2024-09-30 20:08:38 -04:00
|
|
|
text: String
|
|
|
|
href: String
|
|
|
|
}
|
|
|
|
|
2024-10-03 01:01:49 -04:00
|
|
|
abstract class Form {
|
|
|
|
title: String
|
|
|
|
description: String
|
|
|
|
inputs: List<Input>
|
2024-09-30 20:08:38 -04:00
|
|
|
}
|
|
|
|
|
2024-10-03 01:01:49 -04:00
|
|
|
class Image {
|
|
|
|
src: String
|
|
|
|
width: String
|
|
|
|
height: String
|
2024-09-30 20:08:38 -04:00
|
|
|
}
|
|
|
|
|
2024-09-30 21:51:16 -04:00
|
|
|
class Input {
|
|
|
|
label: String
|
2024-10-03 01:01:49 -04:00
|
|
|
type: InputType
|
2024-09-30 21:51:16 -04:00
|
|
|
placeholder: String
|
|
|
|
value: String?
|
|
|
|
error: String?
|
|
|
|
help: String?
|
2024-10-03 01:01:49 -04:00
|
|
|
required: Boolean?
|
|
|
|
}
|
|
|
|
|
|
|
|
class Link {
|
|
|
|
text: String
|
|
|
|
href: String
|
|
|
|
}
|
|
|
|
|
|
|
|
class SocialLink {
|
|
|
|
link: Link
|
|
|
|
icon: String
|
2024-09-30 21:51:16 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
// ╭───────────────────────────────────────────────────────────╮
|
2024-10-02 20:23:28 -04:00
|
|
|
// │ Data Models │
|
2024-09-30 21:51:16 -04:00
|
|
|
// ╰───────────────────────────────────────────────────────────╯
|
|
|
|
|
2024-10-03 01:01:49 -04:00
|
|
|
class Feature {
|
|
|
|
title: String
|
|
|
|
description: String
|
2024-10-05 12:41:47 -04:00
|
|
|
icon: String?
|
|
|
|
image: Image?
|
2024-10-02 20:23:28 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
class Stat {
|
|
|
|
value: String
|
|
|
|
label: String
|
2024-09-30 20:08:38 -04:00
|
|
|
}
|
|
|
|
|
2024-10-02 20:23:28 -04:00
|
|
|
// ╭───────────────────────────────────────────────────────────╮
|
|
|
|
// │ Homepage View Model │
|
|
|
|
// ╰───────────────────────────────────────────────────────────╯
|
|
|
|
|
2024-09-30 20:08:38 -04:00
|
|
|
class Hero {
|
|
|
|
titleFirst: String
|
|
|
|
titleEmphasis: String
|
|
|
|
titleSecond: String
|
|
|
|
subtitle: String
|
|
|
|
primaryButton: Button
|
|
|
|
secondaryButton: Button
|
|
|
|
image: Image
|
2024-10-02 20:23:28 -04:00
|
|
|
stats: Listing<Stat>
|
|
|
|
}
|
|
|
|
|
|
|
|
class Highlights {
|
2024-10-03 01:01:49 -04:00
|
|
|
heading: String
|
|
|
|
subheading: String
|
2024-10-05 12:41:47 -04:00
|
|
|
highlights: Listing<Feature>
|
2024-09-30 20:08:38 -04:00
|
|
|
}
|
2024-10-02 18:01:30 -04:00
|
|
|
class Home {
|
|
|
|
hero: Hero
|
|
|
|
}
|
|
|
|
|
2024-10-02 20:23:28 -04:00
|
|
|
home : Home
|
2024-10-03 01:01:49 -04:00
|
|
|
|