Files
editor/supabase/migrations/meta/20260227204328_snapshot.json
T
98c1d5247e feat: filter empty projects from public gallery (#125)
* feat(community): filter empty projects from public gallery

Add is_empty column to projects table so the public gallery only shows
projects with actual content. Scene graph emptiness is computed on save
and on creation, and a backfill migration marks existing non-empty
projects. Also cleans up import ordering, fixes README migration path,
and removes stale feedback table migration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Use ESNext modules and bundler resolution

Update packages/db tsconfig to emit ESNext modules and use 'bundler' moduleResolution. This enables modern ESM output and bundler-style resolution for the db package (keeps outDir and rootDir unchanged).

* feat(editor): add dark mode theme and grid visibility toggle

Add theme state to viewer store with light/dark modes, dark-aware
lighting and background colors, grid show/hide toggle in settings,
and theme toggle buttons in the sidebar.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Add ground occluder, animated lighting & UI tweaks

Introduce a ground occluder and smoother animated lighting while adjusting editor UI and icons. Viewer: add GroundOccluder (uses polygon-clipping to union slab/zone polygons) and AnimatedBackground, integrate both into the Canvas; improve Lights to interpolate intensities/colors/ambient for smooth theme transitions. Editor: refactor sidebar header to support inline project title editing and move the theme toggle; replace some lucide icons with image assets and add a settings icon (apps/editor/public/icons/settings.png). Also add polygon-clipping to the viewer package dependencies.

* Update dark mode background color and clean up imports

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 23:49:48 -05:00

1135 lines
28 KiB
JSON

{
"id": "b7bcfd85-59f4-4979-aa8c-69dcb20c4b32",
"prevId": "1e54bffc-eb81-4d5f-b2f7-0f006e46e939",
"version": "7",
"dialect": "postgresql",
"tables": {
"public.auth_accounts": {
"name": "auth_accounts",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true
},
"user_id": {
"name": "user_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"provider_id": {
"name": "provider_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"account_id": {
"name": "account_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"password": {
"name": "password",
"type": "text",
"primaryKey": false,
"notNull": false
},
"access_token": {
"name": "access_token",
"type": "text",
"primaryKey": false,
"notNull": false
},
"refresh_token": {
"name": "refresh_token",
"type": "text",
"primaryKey": false,
"notNull": false
},
"id_token": {
"name": "id_token",
"type": "text",
"primaryKey": false,
"notNull": false
},
"access_token_expires_at": {
"name": "access_token_expires_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"refresh_token_expires_at": {
"name": "refresh_token_expires_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"scope": {
"name": "scope",
"type": "text",
"primaryKey": false,
"notNull": false
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"updated_at": {
"name": "updated_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"auth_accounts_user_id_auth_users_id_fk": {
"name": "auth_accounts_user_id_auth_users_id_fk",
"tableFrom": "auth_accounts",
"columnsFrom": [
"user_id"
],
"tableTo": "auth_users",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.auth_jwks": {
"name": "auth_jwks",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true
},
"public_key": {
"name": "public_key",
"type": "text",
"primaryKey": false,
"notNull": true
},
"private_key": {
"name": "private_key",
"type": "text",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.auth_sessions": {
"name": "auth_sessions",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true
},
"user_id": {
"name": "user_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"expires_at": {
"name": "expires_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"token": {
"name": "token",
"type": "text",
"primaryKey": false,
"notNull": true
},
"ip_address": {
"name": "ip_address",
"type": "text",
"primaryKey": false,
"notNull": false
},
"user_agent": {
"name": "user_agent",
"type": "text",
"primaryKey": false,
"notNull": false
},
"active_project_id": {
"name": "active_project_id",
"type": "text",
"primaryKey": false,
"notNull": false
},
"impersonated_by": {
"name": "impersonated_by",
"type": "text",
"primaryKey": false,
"notNull": false
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"updated_at": {
"name": "updated_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"auth_sessions_user_id_auth_users_id_fk": {
"name": "auth_sessions_user_id_auth_users_id_fk",
"tableFrom": "auth_sessions",
"columnsFrom": [
"user_id"
],
"tableTo": "auth_users",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
},
"auth_sessions_impersonated_by_auth_users_id_fk": {
"name": "auth_sessions_impersonated_by_auth_users_id_fk",
"tableFrom": "auth_sessions",
"columnsFrom": [
"impersonated_by"
],
"tableTo": "auth_users",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "set null"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.auth_users": {
"name": "auth_users",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true
},
"email": {
"name": "email",
"type": "text",
"primaryKey": false,
"notNull": true
},
"email_verified": {
"name": "email_verified",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true
},
"image": {
"name": "image",
"type": "text",
"primaryKey": false,
"notNull": false
},
"username": {
"name": "username",
"type": "text",
"primaryKey": false,
"notNull": false
},
"github_url": {
"name": "github_url",
"type": "text",
"primaryKey": false,
"notNull": false
},
"x_url": {
"name": "x_url",
"type": "text",
"primaryKey": false,
"notNull": false
},
"youtube_url": {
"name": "youtube_url",
"type": "text",
"primaryKey": false,
"notNull": false
},
"email_notifications": {
"name": "email_notifications",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": true
},
"role": {
"name": "role",
"type": "auth_user_roles",
"typeSchema": "public",
"primaryKey": false,
"notNull": true,
"default": "'user'"
},
"banned": {
"name": "banned",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": false
},
"ban_reason": {
"name": "ban_reason",
"type": "text",
"primaryKey": false,
"notNull": false
},
"ban_expires": {
"name": "ban_expires",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"updated_at": {
"name": "updated_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {
"email_unique_index": {
"name": "email_unique_index",
"columns": [
{
"expression": "lower(\"email\")",
"isExpression": true,
"asc": true,
"nulls": "last"
}
],
"isUnique": true,
"with": {},
"method": "btree",
"concurrently": false
},
"username_unique_index": {
"name": "username_unique_index",
"columns": [
{
"expression": "lower(\"username\")",
"isExpression": true,
"asc": true,
"nulls": "last"
}
],
"isUnique": true,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.auth_verifications": {
"name": "auth_verifications",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true
},
"value": {
"name": "value",
"type": "text",
"primaryKey": false,
"notNull": true
},
"identifier": {
"name": "identifier",
"type": "text",
"primaryKey": false,
"notNull": true
},
"expires_at": {
"name": "expires_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"updated_at": {
"name": "updated_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {
"verification_identifier_index": {
"name": "verification_identifier_index",
"columns": [
{
"expression": "identifier",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.feedback": {
"name": "feedback",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true
},
"user_id": {
"name": "user_id",
"type": "text",
"primaryKey": false,
"notNull": false
},
"project_id": {
"name": "project_id",
"type": "text",
"primaryKey": false,
"notNull": false
},
"message": {
"name": "message",
"type": "text",
"primaryKey": false,
"notNull": true
},
"images": {
"name": "images",
"type": "jsonb",
"primaryKey": false,
"notNull": false
},
"scene_graph": {
"name": "scene_graph",
"type": "jsonb",
"primaryKey": false,
"notNull": false
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.projects_addresses": {
"name": "projects_addresses",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true
},
"street_number": {
"name": "street_number",
"type": "text",
"primaryKey": false,
"notNull": false
},
"route": {
"name": "route",
"type": "text",
"primaryKey": false,
"notNull": false
},
"route_short": {
"name": "route_short",
"type": "text",
"primaryKey": false,
"notNull": false
},
"neighborhood": {
"name": "neighborhood",
"type": "text",
"primaryKey": false,
"notNull": false
},
"city": {
"name": "city",
"type": "text",
"primaryKey": false,
"notNull": false
},
"county": {
"name": "county",
"type": "text",
"primaryKey": false,
"notNull": false
},
"state": {
"name": "state",
"type": "text",
"primaryKey": false,
"notNull": false
},
"state_long": {
"name": "state_long",
"type": "text",
"primaryKey": false,
"notNull": false
},
"postal_code": {
"name": "postal_code",
"type": "text",
"primaryKey": false,
"notNull": false
},
"postal_code_suffix": {
"name": "postal_code_suffix",
"type": "text",
"primaryKey": false,
"notNull": false
},
"country": {
"name": "country",
"type": "text",
"primaryKey": false,
"notNull": false
},
"country_long": {
"name": "country_long",
"type": "text",
"primaryKey": false,
"notNull": false
},
"latitude": {
"name": "latitude",
"type": "numeric",
"primaryKey": false,
"notNull": false
},
"longitude": {
"name": "longitude",
"type": "numeric",
"primaryKey": false,
"notNull": false
},
"raw_json": {
"name": "raw_json",
"type": "jsonb",
"primaryKey": false,
"notNull": false
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"updated_at": {
"name": "updated_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"address_components_unique": {
"name": "address_components_unique",
"columns": [
"street_number",
"route",
"city",
"state",
"postal_code"
],
"nullsNotDistinct": false
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.project_assets": {
"name": "project_assets",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true
},
"project_id": {
"name": "project_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"storage_key": {
"name": "storage_key",
"type": "text",
"primaryKey": false,
"notNull": true
},
"url": {
"name": "url",
"type": "text",
"primaryKey": false,
"notNull": true
},
"type": {
"name": "type",
"type": "text",
"primaryKey": false,
"notNull": true
},
"original_name": {
"name": "original_name",
"type": "text",
"primaryKey": false,
"notNull": false
},
"mime_type": {
"name": "mime_type",
"type": "text",
"primaryKey": false,
"notNull": false
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"updated_at": {
"name": "updated_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"project_assets_project_id_projects_id_fk": {
"name": "project_assets_project_id_projects_id_fk",
"tableFrom": "project_assets",
"columnsFrom": [
"project_id"
],
"tableTo": "projects",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.projects_likes": {
"name": "projects_likes",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true
},
"project_id": {
"name": "project_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"user_id": {
"name": "user_id",
"type": "text",
"primaryKey": false,
"notNull": true
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {},
"foreignKeys": {
"projects_likes_project_id_projects_id_fk": {
"name": "projects_likes_project_id_projects_id_fk",
"tableFrom": "projects_likes",
"columnsFrom": [
"project_id"
],
"tableTo": "projects",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "cascade"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {
"projects_likes_project_user_unique": {
"name": "projects_likes_project_user_unique",
"columns": [
"project_id",
"user_id"
],
"nullsNotDistinct": false
}
},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.projects_models": {
"name": "projects_models",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": false
},
"version": {
"name": "version",
"type": "integer",
"primaryKey": false,
"notNull": false,
"default": 1
},
"description": {
"name": "description",
"type": "text",
"primaryKey": false,
"notNull": false
},
"draft": {
"name": "draft",
"type": "boolean",
"primaryKey": false,
"notNull": false,
"default": true
},
"project_id": {
"name": "project_id",
"type": "text",
"primaryKey": false,
"notNull": false
},
"scene_graph": {
"name": "scene_graph",
"type": "jsonb",
"primaryKey": false,
"notNull": false
},
"metadata": {
"name": "metadata",
"type": "jsonb",
"primaryKey": false,
"notNull": false
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"updated_at": {
"name": "updated_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"deleted_at": {
"name": "deleted_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": false
}
},
"indexes": {},
"foreignKeys": {
"projects_models_project_id_projects_id_fk": {
"name": "projects_models_project_id_projects_id_fk",
"tableFrom": "projects_models",
"columnsFrom": [
"project_id"
],
"tableTo": "projects",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "set null"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": true
},
"public.projects": {
"name": "projects",
"schema": "",
"columns": {
"id": {
"name": "id",
"type": "text",
"primaryKey": true,
"notNull": true
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": false
},
"address_id": {
"name": "address_id",
"type": "text",
"primaryKey": false,
"notNull": false
},
"owner_id": {
"name": "owner_id",
"type": "text",
"primaryKey": false,
"notNull": false
},
"details_json": {
"name": "details_json",
"type": "jsonb",
"primaryKey": false,
"notNull": false
},
"metadata": {
"name": "metadata",
"type": "jsonb",
"primaryKey": false,
"notNull": false
},
"is_private": {
"name": "is_private",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": true
},
"is_empty": {
"name": "is_empty",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": true
},
"show_scans_public": {
"name": "show_scans_public",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": true
},
"show_guides_public": {
"name": "show_guides_public",
"type": "boolean",
"primaryKey": false,
"notNull": true,
"default": true
},
"views": {
"name": "views",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"likes": {
"name": "likes",
"type": "integer",
"primaryKey": false,
"notNull": true,
"default": 0
},
"thumbnail_url": {
"name": "thumbnail_url",
"type": "text",
"primaryKey": false,
"notNull": false
},
"created_at": {
"name": "created_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
},
"updated_at": {
"name": "updated_at",
"type": "timestamp with time zone",
"primaryKey": false,
"notNull": true,
"default": "now()"
}
},
"indexes": {
"project_address_idx": {
"name": "project_address_idx",
"columns": [
{
"expression": "address_id",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"project_owner_idx": {
"name": "project_owner_idx",
"columns": [
{
"expression": "owner_id",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"project_is_private_idx": {
"name": "project_is_private_idx",
"columns": [
{
"expression": "is_private",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"project_views_idx": {
"name": "project_views_idx",
"columns": [
{
"expression": "views",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
},
"project_likes_idx": {
"name": "project_likes_idx",
"columns": [
{
"expression": "likes",
"isExpression": false,
"asc": true,
"nulls": "last"
}
],
"isUnique": false,
"with": {},
"method": "btree",
"concurrently": false
}
},
"foreignKeys": {
"projects_address_id_projects_addresses_id_fk": {
"name": "projects_address_id_projects_addresses_id_fk",
"tableFrom": "projects",
"columnsFrom": [
"address_id"
],
"tableTo": "projects_addresses",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "set null"
},
"projects_owner_id_auth_users_id_fk": {
"name": "projects_owner_id_auth_users_id_fk",
"tableFrom": "projects",
"columnsFrom": [
"owner_id"
],
"tableTo": "auth_users",
"columnsTo": [
"id"
],
"onUpdate": "no action",
"onDelete": "set null"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {},
"policies": {},
"checkConstraints": {},
"isRLSEnabled": true
}
},
"enums": {
"public.auth_user_roles": {
"name": "auth_user_roles",
"schema": "public",
"values": [
"user",
"admin"
]
}
},
"schemas": {},
"views": {},
"sequences": {},
"roles": {},
"policies": {},
"_meta": {
"columns": {},
"schemas": {},
"tables": {}
}
}