Skip to content

Commit

Permalink
Merge pull request #23 from cmgriffing/feat/editor-component
Browse files Browse the repository at this point in the history
feat: extract editor to component
  • Loading branch information
cmgriffing authored Oct 23, 2024
2 parents a61d912 + 251fc79 commit 3a59d46
Show file tree
Hide file tree
Showing 11 changed files with 1,233 additions and 724 deletions.
12 changes: 12 additions & 0 deletions playgrounds/app/migrations/0001_burly_alice.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ALTER TABLE `snippets_table` ADD `snippetWidth` integer DEFAULT 450 NOT NULL;--> statement-breakpoint
ALTER TABLE `snippets_table` ADD `yPadding` integer DEFAULT 42 NOT NULL;--> statement-breakpoint
ALTER TABLE `snippets_table` ADD `xPadding` integer DEFAULT 42 NOT NULL;--> statement-breakpoint
ALTER TABLE `snippets_table` ADD `shadowEnabled` integer DEFAULT 1 NOT NULL;--> statement-breakpoint
ALTER TABLE `snippets_table` ADD `shadowOffsetY` integer DEFAULT 10 NOT NULL;--> statement-breakpoint
ALTER TABLE `snippets_table` ADD `shadowBlur` integer DEFAULT 10 NOT NULL;--> statement-breakpoint
ALTER TABLE `snippets_table` ADD `shadowColor` text DEFAULT '#000000' NOT NULL;--> statement-breakpoint
ALTER TABLE `snippets_table` ADD `shadowOpacity` real DEFAULT 0.6 NOT NULL;--> statement-breakpoint
ALTER TABLE `snippets_table` ADD `bgColor` text DEFAULT '#a3d0ff' NOT NULL;--> statement-breakpoint
ALTER TABLE `snippets_table` ADD `language` text DEFAULT 'tsx' NOT NULL;--> statement-breakpoint
ALTER TABLE `snippets_table` ADD `theme` text DEFAULT 'nord' NOT NULL;--> statement-breakpoint
ALTER TABLE `snippets_table` ALTER COLUMN "userId" TO "userId" text NOT NULL REFERENCES users_table(id) ON DELETE no action ON UPDATE no action;
271 changes: 271 additions & 0 deletions playgrounds/app/migrations/meta/0001_snapshot.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,271 @@
{
"version": "6",
"dialect": "sqlite",
"id": "a25d9e7c-46fc-4f89-b78f-a5382632f50d",
"prevId": "05492c90-59bd-45e4-99e5-29a29eb2d4ef",
"tables": {
"snippets_table": {
"name": "snippets_table",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"userId": {
"name": "userId",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"title": {
"name": "title",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"codeLeft": {
"name": "codeLeft",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"codeRight": {
"name": "codeRight",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"createdAt": {
"name": "createdAt",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 0
},
"updatedAt": {
"name": "updatedAt",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 0
},
"snippetWidth": {
"name": "snippetWidth",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 450
},
"yPadding": {
"name": "yPadding",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 42
},
"xPadding": {
"name": "xPadding",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 42
},
"shadowEnabled": {
"name": "shadowEnabled",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 1
},
"shadowOffsetY": {
"name": "shadowOffsetY",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 10
},
"shadowBlur": {
"name": "shadowBlur",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 10
},
"shadowColor": {
"name": "shadowColor",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'#000000'"
},
"shadowOpacity": {
"name": "shadowOpacity",
"type": "real",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 0.6
},
"bgColor": {
"name": "bgColor",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'#ffffff'"
},
"language": {
"name": "language",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'tsx'"
},
"theme": {
"name": "theme",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": "'nord'"
}
},
"indexes": {},
"foreignKeys": {
"snippets_table_userId_users_table_id_fk": {
"name": "snippets_table_userId_users_table_id_fk",
"tableFrom": "snippets_table",
"tableTo": "users_table",
"columnsFrom": [
"userId"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
},
"users_table": {
"name": "users_table",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true,
"autoincrement": false
},
"email": {
"name": "email",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"githubId": {
"name": "githubId",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"githubUsername": {
"name": "githubUsername",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"githubAvatarUrl": {
"name": "githubAvatarUrl",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"createdAt": {
"name": "createdAt",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 0
},
"updatedAt": {
"name": "updatedAt",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false,
"default": 0
}
},
"indexes": {
"users_table_email_unique": {
"name": "users_table_email_unique",
"columns": [
"email"
],
"isUnique": true
},
"users_table_githubId_unique": {
"name": "users_table_githubId_unique",
"columns": [
"githubId"
],
"isUnique": true
},
"users_table_githubUsername_unique": {
"name": "users_table_githubUsername_unique",
"columns": [
"githubUsername"
],
"isUnique": true
},
"users_table_githubAvatarUrl_unique": {
"name": "users_table_githubAvatarUrl_unique",
"columns": [
"githubAvatarUrl"
],
"isUnique": true
}
},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"checkConstraints": {}
}
},
"views": {},
"enums": {},
"_meta": {
"schemas": {},
"tables": {},
"columns": {}
},
"internal": {
"indexes": {}
}
}
7 changes: 7 additions & 0 deletions playgrounds/app/migrations/meta/_journal.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
"when": 1729551859421,
"tag": "0000_last_patch",
"breakpoints": true
},
{
"idx": 1,
"version": "6",
"when": 1729646676735,
"tag": "0001_burly_alice",
"breakpoints": true
}
]
}
Loading

0 comments on commit 3a59d46

Please sign in to comment.