Skip to content

Commit

Permalink
Merge pull request #58 from FRC2713/themes
Browse files Browse the repository at this point in the history
Refactor Data Flow
  • Loading branch information
tytremblay authored Dec 20, 2024
2 parents e27536c + 2524eb2 commit 40ad0b4
Show file tree
Hide file tree
Showing 31 changed files with 1,606 additions and 656 deletions.
8 changes: 5 additions & 3 deletions config/2024/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"type": "number",
"required": true,
"code": "matchNumber",
"preserveDataOnReset": true,
"autoIncrementOnReset": true
"autoIncrementOnReset": true,
"defaultValue": 1
},
{
"title": "Robot",
Expand All @@ -46,7 +46,9 @@
"description": "The team number of the robot you're scouting.",
"type": "number",
"required": true,
"code": "teamNumber"
"code": "teamNumber",
"min": 0,
"max": 19999
},
{
"title": "Starting Position",
Expand Down
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@
"@headlessui/react": "^1.7.19",
"@heroicons/react": "^2.2.0",
"@monaco-editor/react": "^4.6.0",
"@radix-ui/react-accordion": "^1.2.2",
"@radix-ui/react-aspect-ratio": "^1.1.1",
"@radix-ui/react-checkbox": "^1.1.3",
"@radix-ui/react-collapsible": "^1.1.2",
"@radix-ui/react-dialog": "^1.1.3",
"@radix-ui/react-dropdown-menu": "^2.1.4",
"@radix-ui/react-select": "^2.1.3",
"@radix-ui/react-slider": "^1.2.2",
"@radix-ui/react-slot": "^1.1.1",
Expand Down
235 changes: 235 additions & 0 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

139 changes: 135 additions & 4 deletions public/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,138 @@
},
"teamNumber": {
"type": "number",
"description": "The team number of the team using this form.",
"default": 2713
"description": "The team number of the team using this form."
},
"theme": {
"type": "object",
"properties": {
"light": {
"type": "object",
"properties": {
"background": {
"type": "string",
"pattern": "\\d+\\s+\\d+%\\s+\\d+%",
"default": "0 0% 100%"
},
"foreground": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 3.9%"
},
"card": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 100%"
},
"card_foreground": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 3.9%"
},
"popover": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 100%"
},
"popover_foreground": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 3.9%"
},
"primary": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "354.44 71.3% 47.9%"
},
"primary_foreground": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 85.7% 97.3%"
},
"secondary": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 96.1%"
},
"secondary_foreground": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 9%"
},
"muted": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 96.1%"
},
"muted_foreground": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 45.1%"
},
"accent": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 96.1%"
},
"accent_foreground": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 9%"
},
"destructive": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 84.2% 60.2%"
},
"destructive_foreground": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 98%"
},
"border": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 89.8%"
},
"input": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 89.8%"
},
"ring": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "354.44 71.3% 47.9%"
},
"chart_1": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "12 76% 61%"
},
"chart_2": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "173 58% 39%"
},
"chart_3": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "197 37% 24%"
},
"chart_4": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "43 74% 66%"
},
"chart_5": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "27 87% 67%"
}
},
"required": [
"foreground",
"card_foreground",
"popover_foreground",
"primary",
"primary_foreground",
"secondary",
"muted",
"muted_foreground",
"accent",
"destructive",
"border",
"input",
"ring"
],
"additionalProperties": false
},
"dark": {
"$ref": "#/properties/theme/properties/light"
}
},
"required": [
"light",
"dark"
],
"additionalProperties": false
},
"sections": {
"type": "array",
Expand Down Expand Up @@ -387,12 +517,12 @@
},
"defaultValue": {
"type": "number",
"default": 0,
"description": "The default value"
},
"value": {
"type": "number",
"description": "The value of the input",
"default": 0
"description": "The value of the input"
}
},
"required": [
Expand Down Expand Up @@ -422,6 +552,7 @@
"title",
"page_title",
"delimiter",
"teamNumber",
"sections"
],
"additionalProperties": false,
Expand Down
139 changes: 135 additions & 4 deletions src/assets/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,138 @@
},
"teamNumber": {
"type": "number",
"description": "The team number of the team using this form.",
"default": 2713
"description": "The team number of the team using this form."
},
"theme": {
"type": "object",
"properties": {
"light": {
"type": "object",
"properties": {
"background": {
"type": "string",
"pattern": "\\d+\\s+\\d+%\\s+\\d+%",
"default": "0 0% 100%"
},
"foreground": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 3.9%"
},
"card": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 100%"
},
"card_foreground": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 3.9%"
},
"popover": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 100%"
},
"popover_foreground": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 3.9%"
},
"primary": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "354.44 71.3% 47.9%"
},
"primary_foreground": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 85.7% 97.3%"
},
"secondary": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 96.1%"
},
"secondary_foreground": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 9%"
},
"muted": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 96.1%"
},
"muted_foreground": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 45.1%"
},
"accent": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 96.1%"
},
"accent_foreground": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 9%"
},
"destructive": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 84.2% 60.2%"
},
"destructive_foreground": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 98%"
},
"border": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 89.8%"
},
"input": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "0 0% 89.8%"
},
"ring": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "354.44 71.3% 47.9%"
},
"chart_1": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "12 76% 61%"
},
"chart_2": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "173 58% 39%"
},
"chart_3": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "197 37% 24%"
},
"chart_4": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "43 74% 66%"
},
"chart_5": {
"$ref": "#/properties/theme/properties/light/properties/background",
"default": "27 87% 67%"
}
},
"required": [
"foreground",
"card_foreground",
"popover_foreground",
"primary",
"primary_foreground",
"secondary",
"muted",
"muted_foreground",
"accent",
"destructive",
"border",
"input",
"ring"
],
"additionalProperties": false
},
"dark": {
"$ref": "#/properties/theme/properties/light"
}
},
"required": [
"light",
"dark"
],
"additionalProperties": false
},
"sections": {
"type": "array",
Expand Down Expand Up @@ -387,12 +517,12 @@
},
"defaultValue": {
"type": "number",
"default": 0,
"description": "The default value"
},
"value": {
"type": "number",
"description": "The value of the input",
"default": 0
"description": "The value of the input"
}
},
"required": [
Expand Down Expand Up @@ -422,6 +552,7 @@
"title",
"page_title",
"delimiter",
"teamNumber",
"sections"
],
"additionalProperties": false,
Expand Down
Loading

0 comments on commit 40ad0b4

Please sign in to comment.