Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5bf55fc488 |
@@ -178,15 +178,6 @@ jobs:
|
|||||||
- name: Design token check
|
- name: Design token check
|
||||||
run: python3 scripts/check_design_tokens.py --report-literals
|
run: python3 scripts/check_design_tokens.py --report-literals
|
||||||
|
|
||||||
# Dangling styles: an element whose classes have only modifier rules and
|
|
||||||
# no base — a deleted CSS rule that left its `:hover` behind. Two shipped
|
|
||||||
# this way (a link rendering as raw browser blue, a flex row whose parent
|
|
||||||
# was gone so every child stacked). Neither is visible to vue-tsc; a dead
|
|
||||||
# style typechecks perfectly. Reported, not gated — a bare wrapper is
|
|
||||||
# legitimate, so the signal is the count growing.
|
|
||||||
- name: Dangling style check
|
|
||||||
run: python3 scripts/check_dangling_styles.py
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
name: Python tests
|
name: Python tests
|
||||||
if: github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
|
if: github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
|
||||||
@@ -225,16 +216,6 @@ jobs:
|
|||||||
UV_PROJECT_ENVIRONMENT: /opt/venv
|
UV_PROJECT_ENVIRONMENT: /opt/venv
|
||||||
run: uv sync --locked --extra dev
|
run: uv sync --locked --extra dev
|
||||||
|
|
||||||
# The hook-EXECUTION tests (test_write_path_trigger's nudge pair) run the
|
|
||||||
# real bash hook, which exits silently without jq — and those tests skip
|
|
||||||
# rather than fail when it's absent, so without this step they would
|
|
||||||
# quietly never be verified anywhere (ci-python ships without jq; same
|
|
||||||
# install the Plugin hooks job does).
|
|
||||||
- name: Install jq for hook execution tests
|
|
||||||
run: |
|
|
||||||
apt-get update -qq
|
|
||||||
apt-get install -y -qq --no-install-recommends jq
|
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
# Integration tests (real Postgres) run in the `integration` job below.
|
# Integration tests (real Postgres) run in the `integration` job below.
|
||||||
run: /opt/venv/bin/python -m pytest tests/ -q -m "not integration"
|
run: /opt/venv/bin/python -m pytest tests/ -q -m "not integration"
|
||||||
|
|||||||
@@ -1,47 +0,0 @@
|
|||||||
"""retire the two settings that designated a design source for the app itself
|
|
||||||
|
|
||||||
Revision ID: 0075
|
|
||||||
Revises: 0074
|
|
||||||
Create Date: 2026-08-03
|
|
||||||
|
|
||||||
Two keys, retired for the same reason a week apart, so they go in one change
|
|
||||||
rather than one migration each:
|
|
||||||
|
|
||||||
design_rulebook_id which rulebook described how this app should look
|
|
||||||
ui_design_system_id which design system this app's own UI was built from
|
|
||||||
|
|
||||||
Both named a design source for THE RUNNING INSTALL. The design surface is for
|
|
||||||
the projects an install tracks, and a project already carries its own pointer
|
|
||||||
(`projects.design_system_id`) — so an install-wide designation had nothing left
|
|
||||||
to mean. `ui_design_system_id` was introduced by this same migration's first
|
|
||||||
draft and never reached a deployed database; it is listed here rather than
|
|
||||||
undone by an 0076 that would reverse a change nobody ran.
|
|
||||||
|
|
||||||
Deleting settings rows by key is safe in a way dropping a column is not — the
|
|
||||||
table is free-form key/value, so an install that never designated one simply has
|
|
||||||
no row to delete.
|
|
||||||
|
|
||||||
Downgrade cannot restore what it never recorded, so it is a no-op rather than a
|
|
||||||
lie: the pointer lives on the project now, and always did for anyone who set it
|
|
||||||
there.
|
|
||||||
"""
|
|
||||||
from alembic import op
|
|
||||||
import sqlalchemy as sa
|
|
||||||
|
|
||||||
|
|
||||||
revision = "0075"
|
|
||||||
down_revision = "0074"
|
|
||||||
branch_labels = None
|
|
||||||
depends_on = None
|
|
||||||
|
|
||||||
def upgrade() -> None:
|
|
||||||
op.execute(
|
|
||||||
sa.text(
|
|
||||||
"DELETE FROM settings "
|
|
||||||
"WHERE key IN ('design_rulebook_id', 'ui_design_system_id')"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def downgrade() -> None:
|
|
||||||
pass
|
|
||||||
@@ -1,115 +0,0 @@
|
|||||||
"""note_supersessions; drop the never-written notes.consolidated_at
|
|
||||||
|
|
||||||
Revision ID: 0076
|
|
||||||
Revises: 0075
|
|
||||||
Create Date: 2026-08-07
|
|
||||||
|
|
||||||
Step 1 of milestone #278. Structure only — nothing reads or writes the new
|
|
||||||
table yet, and nothing behaves differently after this runs.
|
|
||||||
|
|
||||||
## What the table is for
|
|
||||||
|
|
||||||
Old records outrank newer ones on the same subject, because a similarity score
|
|
||||||
cannot tell time. A note that accurately described how something worked in June
|
|
||||||
is still accurate ABOUT June; it is just no longer the answer. Nothing recorded
|
|
||||||
that, so nothing could act on it.
|
|
||||||
|
|
||||||
The claim points FORWARD — the newer record names what it overtakes — because
|
|
||||||
the older one cannot know it has been overtaken. Many-to-many and partial: a
|
|
||||||
note may supersede parts of several others and be overtaken piecemeal by
|
|
||||||
several later ones, which is why this is a table rather than a column. Both
|
|
||||||
directions are queried: `superseded_id` answers "has this been overtaken?" at
|
|
||||||
ranking time, `superseder_id` answers "what does this replace?" in a record
|
|
||||||
view. An array column could serve one and not the other.
|
|
||||||
|
|
||||||
CASCADE on both sides is safe because trashing is not a delete: `trash_svc`
|
|
||||||
stamps `deleted_at`, so a trashed note keeps its claims and `restore` brings
|
|
||||||
them back. The cascade fires only on `purge_trash`, where the row genuinely
|
|
||||||
goes — and a claim about a row that no longer exists is not actionable.
|
|
||||||
|
|
||||||
## What is being dropped, and why now
|
|
||||||
|
|
||||||
`notes.consolidated_at` was written by NOTHING — no service, no route, no tool
|
|
||||||
— while being serialised into every note and task payload as `null`. It cost a
|
|
||||||
column, a line in every response, and worse: it IMPLIED a capability. A reader
|
|
||||||
reasonably concludes notes can be consolidated and this records when.
|
|
||||||
|
|
||||||
That reading was reasonable precisely because merge/unmerge exists for snippets
|
|
||||||
and not for notes, so the column looked like the notes-side half of that
|
|
||||||
feature, modelled and abandoned.
|
|
||||||
|
|
||||||
It is dropped rather than repurposed for supersession, and the distinction is
|
|
||||||
the point (#2483): consolidation folds several records into one survivor and
|
|
||||||
destroys the originals. Merging two snippets is lossless — one helper, several
|
|
||||||
call sites. Folding two dev-logs means writing a summary and losing what each
|
|
||||||
actually said. Supersession is the opposite act: both records survive, and the
|
|
||||||
older one is merely ranked behind. Smuggling one in under a column named for
|
|
||||||
the other would have buried that difference in schema.
|
|
||||||
|
|
||||||
## Downgrade
|
|
||||||
|
|
||||||
Re-adds `consolidated_at` nullable, which is how it lived — so downgrade
|
|
||||||
restores the shape, not the (nonexistent) data. Drops the table; any recorded
|
|
||||||
supersession claims are lost, which costs ranking its input and nothing else,
|
|
||||||
since no note's own content depends on them.
|
|
||||||
"""
|
|
||||||
import sqlalchemy as sa
|
|
||||||
from alembic import op
|
|
||||||
|
|
||||||
revision = "0076"
|
|
||||||
down_revision = "0075"
|
|
||||||
branch_labels = None
|
|
||||||
depends_on = None
|
|
||||||
|
|
||||||
|
|
||||||
def upgrade() -> None:
|
|
||||||
op.create_table(
|
|
||||||
"note_supersessions",
|
|
||||||
sa.Column("id", sa.Integer, primary_key=True),
|
|
||||||
sa.Column(
|
|
||||||
"superseder_id",
|
|
||||||
sa.Integer,
|
|
||||||
sa.ForeignKey("notes.id", ondelete="CASCADE"),
|
|
||||||
nullable=False,
|
|
||||||
),
|
|
||||||
sa.Column(
|
|
||||||
"superseded_id",
|
|
||||||
sa.Integer,
|
|
||||||
sa.ForeignKey("notes.id", ondelete="CASCADE"),
|
|
||||||
nullable=False,
|
|
||||||
),
|
|
||||||
sa.Column(
|
|
||||||
"created_at",
|
|
||||||
sa.DateTime(timezone=True),
|
|
||||||
server_default=sa.text("now()"),
|
|
||||||
nullable=False,
|
|
||||||
),
|
|
||||||
sa.UniqueConstraint(
|
|
||||||
"superseder_id", "superseded_id", name="uq_note_supersessions_pair"
|
|
||||||
),
|
|
||||||
# Declaring that a note supersedes ITSELF is meaningless, and under flat
|
|
||||||
# demotion it would demote a record on its own authority. Refused in the
|
|
||||||
# service too, with a message — this is the backstop that holds when
|
|
||||||
# something writes rows directly.
|
|
||||||
sa.CheckConstraint(
|
|
||||||
"superseder_id <> superseded_id", name="ck_note_supersessions_not_self"
|
|
||||||
),
|
|
||||||
)
|
|
||||||
op.create_index(
|
|
||||||
"ix_note_supersessions_superseder", "note_supersessions", ["superseder_id"]
|
|
||||||
)
|
|
||||||
op.create_index(
|
|
||||||
"ix_note_supersessions_superseded", "note_supersessions", ["superseded_id"]
|
|
||||||
)
|
|
||||||
|
|
||||||
op.drop_column("notes", "consolidated_at")
|
|
||||||
|
|
||||||
|
|
||||||
def downgrade() -> None:
|
|
||||||
op.add_column(
|
|
||||||
"notes",
|
|
||||||
sa.Column("consolidated_at", sa.DateTime(timezone=True), nullable=True),
|
|
||||||
)
|
|
||||||
op.drop_index("ix_note_supersessions_superseded", table_name="note_supersessions")
|
|
||||||
op.drop_index("ix_note_supersessions_superseder", table_name="note_supersessions")
|
|
||||||
op.drop_table("note_supersessions")
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
"""Chunked embeddings: one note_embeddings row per chunk (#280)
|
|
||||||
|
|
||||||
Revision ID: 0077
|
|
||||||
Revises: 0076
|
|
||||||
Create Date: 2026-08-09
|
|
||||||
|
|
||||||
The embedding model reads at most 512 tokens and fastembed truncates the rest
|
|
||||||
silently, so the old one-row-per-note shape permanently lost everything past
|
|
||||||
~400 words of a record. A note now stores one row per chunk of
|
|
||||||
`embeddings.chunk_document`: PK (note_id, chunk_index), plus the chunk's text
|
|
||||||
(inspectability + future "matched section" surfacing) and the chunker version
|
|
||||||
that produced it (so later shape changes re-embed by version comparison
|
|
||||||
instead of repeating this wipe).
|
|
||||||
|
|
||||||
Embeddings are DERIVED data (0067 precedent): rows are cleared here and the
|
|
||||||
startup backfill regenerates the whole corpus at the new shape on next boot.
|
|
||||||
The HNSW index is untouched — it indexes chunk rows exactly as it indexed
|
|
||||||
note rows.
|
|
||||||
"""
|
|
||||||
from alembic import op
|
|
||||||
|
|
||||||
|
|
||||||
revision = "0077"
|
|
||||||
down_revision = "0076"
|
|
||||||
branch_labels = None
|
|
||||||
depends_on = None
|
|
||||||
|
|
||||||
|
|
||||||
def upgrade() -> None:
|
|
||||||
# Derived data — the version-aware startup backfill re-embeds everything
|
|
||||||
# at the chunked shape. Old whole-document rows would be indistinguishable
|
|
||||||
# from properly-chunked single-chunk notes, so they cannot be carried over.
|
|
||||||
op.execute("DELETE FROM note_embeddings")
|
|
||||||
|
|
||||||
# Empty table, so NOT NULL columns need no defaults and the PK swap is
|
|
||||||
# instant.
|
|
||||||
op.execute("ALTER TABLE note_embeddings ADD COLUMN chunk_index integer NOT NULL")
|
|
||||||
op.execute("ALTER TABLE note_embeddings ADD COLUMN chunk_text text NOT NULL")
|
|
||||||
op.execute("ALTER TABLE note_embeddings ADD COLUMN chunker_version integer NOT NULL")
|
|
||||||
op.execute("ALTER TABLE note_embeddings DROP CONSTRAINT note_embeddings_pkey")
|
|
||||||
op.execute(
|
|
||||||
"ALTER TABLE note_embeddings ADD PRIMARY KEY (note_id, chunk_index)"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def downgrade() -> None:
|
|
||||||
# Same reasoning in reverse: chunk rows make no sense to a whole-document
|
|
||||||
# reader, so clear and let the old backfill regenerate.
|
|
||||||
op.execute("DELETE FROM note_embeddings")
|
|
||||||
op.execute("ALTER TABLE note_embeddings DROP CONSTRAINT note_embeddings_pkey")
|
|
||||||
op.execute("ALTER TABLE note_embeddings DROP COLUMN chunk_index")
|
|
||||||
op.execute("ALTER TABLE note_embeddings DROP COLUMN chunk_text")
|
|
||||||
op.execute("ALTER TABLE note_embeddings DROP COLUMN chunker_version")
|
|
||||||
op.execute("ALTER TABLE note_embeddings ADD PRIMARY KEY (note_id)")
|
|
||||||
@@ -1,130 +0,0 @@
|
|||||||
"""Forge connections move to the user level (#2778)
|
|
||||||
|
|
||||||
Revision ID: 0078
|
|
||||||
Revises: 0077
|
|
||||||
Create Date: 2026-08-19
|
|
||||||
|
|
||||||
A forge token is a user's credential, not an instance's: the single
|
|
||||||
admin-settings config meant every user's snippet-freshness and coverage reads
|
|
||||||
ran under the operator's token. Each user now owns a keyring of connections —
|
|
||||||
one per forge host — and projects resolve forge reads on their OWNER's
|
|
||||||
keyring, with an optional per-project pin (projects.forge_connection_id).
|
|
||||||
|
|
||||||
The data move carries the existing admin config into a connection row for the
|
|
||||||
first admin user (host parsed from the base URL), then deletes the old
|
|
||||||
setting keys outright — no legacy dual-read (rule #22). The env-var channel
|
|
||||||
(FORGE_KIND/FORGE_BASE_URL/FORGE_TOKEN) is untouched by this migration; it
|
|
||||||
survives as an implicit keyring entry for admin users only.
|
|
||||||
"""
|
|
||||||
from urllib.parse import urlsplit
|
|
||||||
|
|
||||||
import sqlalchemy as sa
|
|
||||||
from alembic import op
|
|
||||||
|
|
||||||
revision = "0078"
|
|
||||||
down_revision = "0077"
|
|
||||||
branch_labels = None
|
|
||||||
depends_on = None
|
|
||||||
|
|
||||||
_SETTING_KEYS = ("forge_kind", "forge_base_url", "forge_token")
|
|
||||||
|
|
||||||
|
|
||||||
def upgrade() -> None:
|
|
||||||
op.create_table(
|
|
||||||
"forge_connections",
|
|
||||||
sa.Column("id", sa.Integer(), primary_key=True),
|
|
||||||
sa.Column(
|
|
||||||
"user_id",
|
|
||||||
sa.Integer(),
|
|
||||||
sa.ForeignKey("users.id", ondelete="CASCADE"),
|
|
||||||
nullable=False,
|
|
||||||
),
|
|
||||||
sa.Column("kind", sa.Text(), nullable=False),
|
|
||||||
sa.Column("base_url", sa.Text(), nullable=False),
|
|
||||||
sa.Column("host", sa.Text(), nullable=False),
|
|
||||||
sa.Column("token", sa.Text(), nullable=False),
|
|
||||||
sa.Column("created_at", sa.DateTime(timezone=True), nullable=False),
|
|
||||||
sa.Column("updated_at", sa.DateTime(timezone=True), nullable=False),
|
|
||||||
sa.UniqueConstraint("user_id", "host", name="uq_forge_connections_user_host"),
|
|
||||||
)
|
|
||||||
op.add_column(
|
|
||||||
"projects",
|
|
||||||
sa.Column(
|
|
||||||
"forge_connection_id",
|
|
||||||
sa.BigInteger(),
|
|
||||||
sa.ForeignKey(
|
|
||||||
"forge_connections.id",
|
|
||||||
ondelete="SET NULL",
|
|
||||||
name="fk_projects_forge_connection_id",
|
|
||||||
),
|
|
||||||
nullable=True,
|
|
||||||
),
|
|
||||||
)
|
|
||||||
|
|
||||||
# Data move: the admin-settings config becomes the first admin's keyring
|
|
||||||
# row. All three values must be present — a partial config never produced
|
|
||||||
# an adapter, so carrying it over would invent a connection that never
|
|
||||||
# worked.
|
|
||||||
conn = op.get_bind()
|
|
||||||
row = conn.execute(
|
|
||||||
sa.text(
|
|
||||||
"SELECT s.key, s.value FROM settings s"
|
|
||||||
" JOIN users u ON u.id = s.user_id"
|
|
||||||
" WHERE u.role = 'admin' AND s.key IN :keys"
|
|
||||||
" AND s.user_id = ("
|
|
||||||
" SELECT MIN(id) FROM users WHERE role = 'admin'"
|
|
||||||
" )"
|
|
||||||
).bindparams(sa.bindparam("keys", expanding=True)),
|
|
||||||
{"keys": list(_SETTING_KEYS)},
|
|
||||||
).fetchall()
|
|
||||||
values = {key: (value or "").strip() for key, value in row}
|
|
||||||
kind = values.get("forge_kind", "").lower()
|
|
||||||
base_url = values.get("forge_base_url", "").rstrip("/")
|
|
||||||
token = values.get("forge_token", "")
|
|
||||||
host = (urlsplit(base_url).hostname or "").lower()
|
|
||||||
if kind and base_url and token and host:
|
|
||||||
conn.execute(
|
|
||||||
sa.text(
|
|
||||||
"INSERT INTO forge_connections"
|
|
||||||
" (user_id, kind, base_url, host, token, created_at, updated_at)"
|
|
||||||
" SELECT MIN(id), :kind, :base_url, :host, :token, NOW(), NOW()"
|
|
||||||
" FROM users WHERE role = 'admin'"
|
|
||||||
),
|
|
||||||
{"kind": kind, "base_url": base_url, "host": host, "token": token},
|
|
||||||
)
|
|
||||||
conn.execute(
|
|
||||||
sa.text(
|
|
||||||
"DELETE FROM settings WHERE key IN :keys"
|
|
||||||
).bindparams(sa.bindparam("keys", expanding=True)),
|
|
||||||
{"keys": list(_SETTING_KEYS)},
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def downgrade() -> None:
|
|
||||||
# Reverse data move: the first admin's row (if any) becomes the admin
|
|
||||||
# settings again. Other users' rows have no pre-0078 representation and
|
|
||||||
# are dropped with the table.
|
|
||||||
conn = op.get_bind()
|
|
||||||
row = conn.execute(
|
|
||||||
sa.text(
|
|
||||||
"SELECT user_id, kind, base_url, token FROM forge_connections"
|
|
||||||
" WHERE user_id = (SELECT MIN(id) FROM users WHERE role = 'admin')"
|
|
||||||
" ORDER BY id LIMIT 1"
|
|
||||||
)
|
|
||||||
).fetchone()
|
|
||||||
if row is not None:
|
|
||||||
for key, value in (
|
|
||||||
("forge_kind", row.kind),
|
|
||||||
("forge_base_url", row.base_url),
|
|
||||||
("forge_token", row.token),
|
|
||||||
):
|
|
||||||
conn.execute(
|
|
||||||
sa.text(
|
|
||||||
"INSERT INTO settings (user_id, key, value)"
|
|
||||||
" VALUES (:uid, :key, :value)"
|
|
||||||
" ON CONFLICT (user_id, key) DO UPDATE SET value = :value"
|
|
||||||
),
|
|
||||||
{"uid": row.user_id, "key": key, "value": value},
|
|
||||||
)
|
|
||||||
op.drop_column("projects", "forge_connection_id")
|
|
||||||
op.drop_table("forge_connections")
|
|
||||||
@@ -1,66 +0,0 @@
|
|||||||
"""The shape ledger: code_shapes (#2787, milestone 294)
|
|
||||||
|
|
||||||
Revision ID: 0079
|
|
||||||
Revises: 0078
|
|
||||||
Create Date: 2026-08-19
|
|
||||||
|
|
||||||
The accounting half of the pattern system (governing note 2786): the snippet
|
|
||||||
library records canon (small); this table accounts for EVERY shape the
|
|
||||||
coverage extractor finds in a bound repo (total). Rows arrive `unclassified`
|
|
||||||
from the coverage sync (step 2) and gain judgments — canonical / instance /
|
|
||||||
variant / exempt — from audits, hooks, and the mechanical proposer.
|
|
||||||
Unclassified IS the todo list.
|
|
||||||
"""
|
|
||||||
import sqlalchemy as sa
|
|
||||||
from alembic import op
|
|
||||||
|
|
||||||
revision = "0079"
|
|
||||||
down_revision = "0078"
|
|
||||||
branch_labels = None
|
|
||||||
depends_on = None
|
|
||||||
|
|
||||||
|
|
||||||
def upgrade() -> None:
|
|
||||||
op.create_table(
|
|
||||||
"code_shapes",
|
|
||||||
sa.Column("id", sa.Integer(), primary_key=True),
|
|
||||||
sa.Column(
|
|
||||||
"project_id",
|
|
||||||
sa.Integer(),
|
|
||||||
sa.ForeignKey("projects.id", ondelete="CASCADE"),
|
|
||||||
nullable=False,
|
|
||||||
),
|
|
||||||
sa.Column("repo_key", sa.Text(), nullable=False),
|
|
||||||
sa.Column("path", sa.Text(), nullable=False),
|
|
||||||
sa.Column("symbol", sa.Text(), nullable=False),
|
|
||||||
sa.Column("kind", sa.Text(), nullable=False),
|
|
||||||
sa.Column("status", sa.Text(), nullable=False, server_default="unclassified"),
|
|
||||||
sa.Column(
|
|
||||||
"snippet_id",
|
|
||||||
sa.BigInteger(),
|
|
||||||
sa.ForeignKey("notes.id", ondelete="SET NULL"),
|
|
||||||
nullable=True,
|
|
||||||
),
|
|
||||||
sa.Column("reason", sa.Text(), nullable=True),
|
|
||||||
sa.Column("classified_by", sa.Text(), nullable=True),
|
|
||||||
sa.Column("classified_at", sa.DateTime(timezone=True), nullable=True),
|
|
||||||
sa.Column("first_seen_commit", sa.Text(), nullable=False, server_default=""),
|
|
||||||
sa.Column("last_seen_commit", sa.Text(), nullable=False, server_default=""),
|
|
||||||
sa.Column("vanished_at", sa.DateTime(timezone=True), nullable=True),
|
|
||||||
sa.Column("created_at", sa.DateTime(timezone=True), nullable=False),
|
|
||||||
sa.Column("updated_at", sa.DateTime(timezone=True), nullable=False),
|
|
||||||
sa.UniqueConstraint(
|
|
||||||
"project_id", "repo_key", "path", "symbol", "kind",
|
|
||||||
name="uq_code_shapes_identity",
|
|
||||||
),
|
|
||||||
)
|
|
||||||
op.create_index(
|
|
||||||
"ix_code_shapes_project_status", "code_shapes", ["project_id", "status"]
|
|
||||||
)
|
|
||||||
op.create_index("ix_code_shapes_snippet", "code_shapes", ["snippet_id"])
|
|
||||||
|
|
||||||
|
|
||||||
def downgrade() -> None:
|
|
||||||
op.drop_index("ix_code_shapes_snippet", table_name="code_shapes")
|
|
||||||
op.drop_index("ix_code_shapes_project_status", table_name="code_shapes")
|
|
||||||
op.drop_table("code_shapes")
|
|
||||||
+17
-17
@@ -254,7 +254,7 @@ onUnmounted(() => {
|
|||||||
left: 0.5rem;
|
left: 0.5rem;
|
||||||
z-index: 9999;
|
z-index: 9999;
|
||||||
padding: 0.4rem 0.75rem;
|
padding: 0.4rem 0.75rem;
|
||||||
background: var(--fs-accent);
|
background: var(--color-primary);
|
||||||
color: var(--fs-text-on-action);
|
color: var(--fs-text-on-action);
|
||||||
border-radius: 0 0 4px 4px;
|
border-radius: 0 0 4px 4px;
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
@@ -290,7 +290,7 @@ onUnmounted(() => {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 0.2rem 0;
|
padding: 0.2rem 0;
|
||||||
font-size: 0.68rem;
|
font-size: 0.68rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
opacity: 0.45;
|
opacity: 0.45;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
letter-spacing: 0.03em;
|
letter-spacing: 0.03em;
|
||||||
@@ -300,17 +300,17 @@ onUnmounted(() => {
|
|||||||
.shortcuts-overlay {
|
.shortcuts-overlay {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
background: var(--fs-overlay);
|
background: var(--color-overlay, rgba(0, 0, 0, 0.45));
|
||||||
z-index: 9000;
|
z-index: 9000;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
.shortcuts-panel {
|
.shortcuts-panel {
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-lg);
|
border-radius: var(--radius-md, 8px);
|
||||||
box-shadow: 0 8px 32px var(--color-shadow);
|
box-shadow: 0 8px 32px var(--color-shadow, rgba(0,0,0,0.2));
|
||||||
width: min(420px, 92vw);
|
width: min(420px, 92vw);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
@@ -319,25 +319,25 @@ onUnmounted(() => {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 0.85rem 1rem 0.75rem;
|
padding: 0.85rem 1rem 0.75rem;
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border);
|
||||||
}
|
}
|
||||||
.shortcuts-header h3 {
|
.shortcuts-header h3 {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
}
|
}
|
||||||
.shortcuts-close {
|
.shortcuts-close {
|
||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
font-size: 1.4rem;
|
font-size: 1.4rem;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: 0 0.25rem;
|
padding: 0 0.25rem;
|
||||||
}
|
}
|
||||||
.shortcuts-close:hover {
|
.shortcuts-close:hover {
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
}
|
}
|
||||||
.shortcuts-body {
|
.shortcuts-body {
|
||||||
padding: 0.75rem 1rem 1rem;
|
padding: 0.75rem 1rem 1rem;
|
||||||
@@ -350,7 +350,7 @@ onUnmounted(() => {
|
|||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.06em;
|
letter-spacing: 0.06em;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
margin-bottom: 0.4rem;
|
margin-bottom: 0.4rem;
|
||||||
}
|
}
|
||||||
.shortcut-row {
|
.shortcut-row {
|
||||||
@@ -365,23 +365,23 @@ onUnmounted(() => {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
min-width: 1.8rem;
|
min-width: 1.8rem;
|
||||||
padding: 0.15rem 0.4rem;
|
padding: 0.15rem 0.4rem;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-bottom-width: 2px;
|
border-bottom-width: 2px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
font-size: 0.78rem;
|
font-size: 0.78rem;
|
||||||
font-family: ui-monospace, monospace;
|
font-family: ui-monospace, monospace;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
.shortcut-key-sep {
|
.shortcut-key-sep {
|
||||||
font-size: 0.78rem;
|
font-size: 0.78rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
.shortcut-desc {
|
.shortcut-desc {
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
margin-left: 0.25rem;
|
margin-left: 0.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
import { apiGet } from "@/api/client";
|
||||||
|
import type { ExpectationResponse } from "@/utils/designDrift";
|
||||||
|
|
||||||
|
/** Checkable claims from the rulebook this install designated as its design system.
|
||||||
|
*
|
||||||
|
* `rulebook_id: null` means none has been designated — the normal state for a
|
||||||
|
* fresh install, not an error. The caller shows an explanatory empty state. */
|
||||||
|
export const fetchDesignExpectations = () =>
|
||||||
|
apiGet<ExpectationResponse>("/api/design/expectations");
|
||||||
@@ -74,28 +74,11 @@ export const fetchDesignSystems = () =>
|
|||||||
export const fetchDesignSystem = (id: number) =>
|
export const fetchDesignSystem = (id: number) =>
|
||||||
apiGet<DesignSystem>(`/api/design-systems/${id}`);
|
apiGet<DesignSystem>(`/api/design-systems/${id}`);
|
||||||
|
|
||||||
export interface StarterRoleGroup {
|
|
||||||
group: string;
|
|
||||||
description: string;
|
|
||||||
token_count: number;
|
|
||||||
names: string[];
|
|
||||||
}
|
|
||||||
|
|
||||||
/** The starter token ROLES offered at creation — names and purposes, never
|
|
||||||
* values. A default palette would be one install's taste shipped as product
|
|
||||||
* (rule #115), so the values are always the operator's to fill. */
|
|
||||||
export const listStarterRoleGroups = () =>
|
|
||||||
apiGet<{ groups: StarterRoleGroup[]; default_prefix: string }>(
|
|
||||||
"/api/design-systems/starter-roles",
|
|
||||||
);
|
|
||||||
|
|
||||||
export const createDesignSystem = (body: {
|
export const createDesignSystem = (body: {
|
||||||
title: string;
|
title: string;
|
||||||
description?: string;
|
description?: string;
|
||||||
guidance?: string;
|
guidance?: string;
|
||||||
parent_id?: number | null;
|
parent_id?: number | null;
|
||||||
starter_role_groups?: string[];
|
|
||||||
token_prefix?: string;
|
|
||||||
}) => apiPost<DesignSystem>("/api/design-systems", body);
|
}) => apiPost<DesignSystem>("/api/design-systems", body);
|
||||||
|
|
||||||
/** Omit `parent_id` to leave it alone; send `null` to make the system a family. */
|
/** Omit `parent_id` to leave it alone; send `null` to make the system a family. */
|
||||||
@@ -200,14 +183,6 @@ export interface SnippetCheck {
|
|||||||
findings: SnippetFinding[];
|
findings: SnippetFinding[];
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Which recorded snippets disagree with this design system's sheet.
|
/** Which recorded snippets disagree with this design system's sheet. */
|
||||||
*
|
export const checkSnippets = (id: number) =>
|
||||||
* `projectId` narrows to the snippets one project owns — which is how a
|
apiGet<SnippetCheck>(`/api/design-systems/${id}/snippet-check`);
|
||||||
* project asks about its OWN code. Omit it to check every project, which is
|
|
||||||
* the right default from the system's side: a component recorded elsewhere
|
|
||||||
* still has to use the same tags. */
|
|
||||||
export const checkSnippets = (id: number, projectId?: number) =>
|
|
||||||
apiGet<SnippetCheck>(
|
|
||||||
`/api/design-systems/${id}/snippet-check`
|
|
||||||
+ (projectId ? `?project_id=${projectId}` : ""),
|
|
||||||
);
|
|
||||||
|
|||||||
@@ -36,8 +36,7 @@
|
|||||||
.btn-secondary,
|
.btn-secondary,
|
||||||
.btn-ghost,
|
.btn-ghost,
|
||||||
.btn-danger,
|
.btn-danger,
|
||||||
.btn-danger-outline,
|
.btn-danger-outline {
|
||||||
.btn-cta {
|
|
||||||
padding: var(--fs-space-2) var(--fs-space-4); /* 8px 16px */
|
padding: var(--fs-space-2) var(--fs-space-4); /* 8px 16px */
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: var(--fs-radius-md); /* 8px — the system's button radius */
|
border-radius: var(--fs-radius-md); /* 8px — the system's button radius */
|
||||||
@@ -47,14 +46,6 @@
|
|||||||
line-height: var(--fs-leading-body);
|
line-height: var(--fs-leading-body);
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
/* So a button carrying an icon centres it against the label without each
|
|
||||||
caller re-inventing the flex row — the shape they all reached for
|
|
||||||
separately, and the reason icon buttons sat a pixel or two off. */
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
gap: var(--fs-space-2);
|
|
||||||
text-decoration: none;
|
|
||||||
transition: background var(--fs-dur-fast) var(--fs-ease),
|
transition: background var(--fs-dur-fast) var(--fs-ease),
|
||||||
border-color var(--fs-dur-fast) var(--fs-ease),
|
border-color var(--fs-dur-fast) var(--fs-ease),
|
||||||
color var(--fs-dur-fast) var(--fs-ease);
|
color var(--fs-dur-fast) var(--fs-ease);
|
||||||
@@ -67,8 +58,7 @@
|
|||||||
.btn-secondary:disabled,
|
.btn-secondary:disabled,
|
||||||
.btn-ghost:disabled,
|
.btn-ghost:disabled,
|
||||||
.btn-danger:disabled,
|
.btn-danger:disabled,
|
||||||
.btn-danger-outline:disabled,
|
.btn-danger-outline:disabled {
|
||||||
.btn-cta:disabled {
|
|
||||||
opacity: var(--fs-disabled-opacity);
|
opacity: var(--fs-disabled-opacity);
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
}
|
}
|
||||||
@@ -77,8 +67,7 @@
|
|||||||
.btn-secondary:focus-visible,
|
.btn-secondary:focus-visible,
|
||||||
.btn-ghost:focus-visible,
|
.btn-ghost:focus-visible,
|
||||||
.btn-danger:focus-visible,
|
.btn-danger:focus-visible,
|
||||||
.btn-danger-outline:focus-visible,
|
.btn-danger-outline:focus-visible {
|
||||||
.btn-cta:focus-visible {
|
|
||||||
outline: none;
|
outline: none;
|
||||||
box-shadow: var(--fs-focus-ring);
|
box-shadow: var(--fs-focus-ring);
|
||||||
}
|
}
|
||||||
@@ -89,19 +78,19 @@
|
|||||||
* are universal across the family so a Save button looks identical in every
|
* are universal across the family so a Save button looks identical in every
|
||||||
* app — the accent is identity, not action. */
|
* app — the accent is identity, not action. */
|
||||||
.btn-primary {
|
.btn-primary {
|
||||||
background: var(--fs-action-primary);
|
background: var(--color-action-primary);
|
||||||
color: var(--fs-text-on-action);
|
color: var(--fs-text-on-action);
|
||||||
}
|
}
|
||||||
.btn-primary:not(:disabled):hover {
|
.btn-primary:not(:disabled):hover {
|
||||||
background: var(--fs-action-primary-hover);
|
background: var(--color-action-primary-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-secondary {
|
.btn-secondary {
|
||||||
background: var(--fs-action-secondary);
|
background: var(--color-action-secondary);
|
||||||
color: var(--fs-text-on-action);
|
color: var(--fs-text-on-action);
|
||||||
}
|
}
|
||||||
.btn-secondary:not(:disabled):hover {
|
.btn-secondary:not(:disabled):hover {
|
||||||
background: var(--fs-action-secondary-hover);
|
background: var(--color-action-secondary-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Ghost is an OUTLINE, which is why its border and the tertiary action colour
|
/* Ghost is an OUTLINE, which is why its border and the tertiary action colour
|
||||||
@@ -112,21 +101,21 @@
|
|||||||
.btn-ghost {
|
.btn-ghost {
|
||||||
background: none;
|
background: none;
|
||||||
border: var(--fs-border);
|
border: var(--fs-border);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
}
|
}
|
||||||
.btn-ghost:not(:disabled):hover {
|
.btn-ghost:not(:disabled):hover {
|
||||||
border: var(--fs-border-hover);
|
border: var(--fs-border-hover);
|
||||||
background: var(--fs-surface-hover);
|
background: var(--color-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Destructive is NOT the error colour: an error is a failure that happened, a
|
/* Destructive is NOT the error colour: an error is a failure that happened, a
|
||||||
* destructive action is one about to happen. Pair with an icon. */
|
* destructive action is one about to happen. Pair with an icon. */
|
||||||
.btn-danger {
|
.btn-danger {
|
||||||
background: var(--fs-action-destructive);
|
background: var(--color-action-destructive);
|
||||||
color: var(--fs-text-on-action);
|
color: var(--fs-text-on-action);
|
||||||
}
|
}
|
||||||
.btn-danger:not(:disabled):hover {
|
.btn-danger:not(:disabled):hover {
|
||||||
background: var(--fs-action-destructive-hover);
|
background: var(--color-action-destructive-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* A bare text button: no fill, no border. The most common shape in the dense
|
/* A bare text button: no fill, no border. The most common shape in the dense
|
||||||
@@ -136,7 +125,7 @@
|
|||||||
.btn-text {
|
.btn-text {
|
||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
padding: var(--fs-space-1) var(--fs-space-2);
|
padding: var(--fs-space-1) var(--fs-space-2);
|
||||||
font-family: var(--fs-font-body);
|
font-family: var(--fs-font-body);
|
||||||
font-size: var(--fs-size-tiny);
|
font-size: var(--fs-size-tiny);
|
||||||
@@ -144,7 +133,7 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: color var(--fs-dur-fast) var(--fs-ease);
|
transition: color var(--fs-dur-fast) var(--fs-ease);
|
||||||
}
|
}
|
||||||
.btn-text:not(:disabled):hover { color: var(--fs-text-primary); }
|
.btn-text:not(:disabled):hover { color: var(--color-text); }
|
||||||
.btn-text:disabled { opacity: var(--fs-disabled-opacity); cursor: not-allowed; }
|
.btn-text:disabled { opacity: var(--fs-disabled-opacity); cursor: not-allowed; }
|
||||||
.btn-text:focus-visible { outline: none; box-shadow: var(--fs-focus-ring); }
|
.btn-text:focus-visible { outline: none; box-shadow: var(--fs-focus-ring); }
|
||||||
|
|
||||||
@@ -153,33 +142,14 @@
|
|||||||
* a one-off: it is what a delete looks like when it must not shout. */
|
* a one-off: it is what a delete looks like when it must not shout. */
|
||||||
.btn-danger-outline {
|
.btn-danger-outline {
|
||||||
background: none;
|
background: none;
|
||||||
border: 1px solid var(--fs-action-destructive);
|
border: 1px solid var(--color-action-destructive);
|
||||||
color: var(--fs-action-destructive);
|
color: var(--color-action-destructive);
|
||||||
}
|
}
|
||||||
.btn-danger-outline:not(:disabled):hover {
|
.btn-danger-outline:not(:disabled):hover {
|
||||||
background: var(--fs-action-destructive);
|
background: var(--color-action-destructive);
|
||||||
color: var(--fs-text-on-action);
|
color: var(--fs-text-on-action);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The one place the accent is allowed on a button: a deliberate brand moment,
|
|
||||||
* never an ordinary action. The system carries `--fs-gradient-cta` and
|
|
||||||
* `--fs-glow-cta` for exactly this and nothing else was using them.
|
|
||||||
*
|
|
||||||
* It exists because ProjectView's Workspace link WAS this button, defined in a
|
|
||||||
* scoped block that the migration deleted — leaving a `:hover` rule with no
|
|
||||||
* base and a link that rendered as raw browser blue. A variant living in one
|
|
||||||
* view is a variant waiting to be deleted by someone tidying another; this is
|
|
||||||
* the shared home so the next sweep can't strand it. */
|
|
||||||
.btn-cta {
|
|
||||||
background: var(--fs-gradient-cta);
|
|
||||||
color: var(--fs-text-on-action);
|
|
||||||
box-shadow: var(--fs-glow-cta);
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
.btn-cta:not(:disabled):hover {
|
|
||||||
box-shadow: var(--fs-glow-cta-hover);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* --- size modifiers ------------------------------------------------------
|
/* --- size modifiers ------------------------------------------------------
|
||||||
*
|
*
|
||||||
* THREE sizes, because the app genuinely has three. Measured across the ~100
|
* THREE sizes, because the app genuinely has three. Measured across the ~100
|
||||||
@@ -214,7 +184,7 @@
|
|||||||
/* Full width, for a form's single submitting action — the auth screens. Width
|
/* Full width, for a form's single submitting action — the auth screens. Width
|
||||||
* is orthogonal to size, so it composes: `btn-primary btn-block`. */
|
* is orthogonal to size, so it composes: `btn-primary btn-block`. */
|
||||||
.btn-block {
|
.btn-block {
|
||||||
display: flex; /* not `block` — the shared shape centres with flex */
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: var(--fs-space-3) var(--fs-space-4); /* 12px 16px — a touch taller,
|
padding: var(--fs-space-3) var(--fs-space-4); /* 12px 16px — a touch taller,
|
||||||
because a full-width button
|
because a full-width button
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 0.75rem;
|
gap: 0.75rem;
|
||||||
padding: 1rem 1.5rem 0.5rem;
|
padding: 1rem 1.5rem 0.5rem;
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border);
|
||||||
}
|
}
|
||||||
.editor-body {
|
.editor-body {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
@@ -41,36 +41,36 @@
|
|||||||
with a Trash icon at the call site to reinforce intent. */
|
with a Trash icon at the call site to reinforce intent. */
|
||||||
.title-input:focus {
|
.title-input:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
border-bottom-color: var(--fs-accent);
|
border-bottom-color: var(--color-primary);
|
||||||
}
|
}
|
||||||
.title-input::placeholder {
|
.title-input::placeholder {
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
.editor-tabs {
|
.editor-tabs {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 0;
|
gap: 0;
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border);
|
||||||
}
|
}
|
||||||
.tab {
|
.tab {
|
||||||
padding: 0.45rem 1rem;
|
padding: 0.45rem 1rem;
|
||||||
border: none;
|
border: none;
|
||||||
background: none;
|
background: none;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
border-bottom: 2px solid transparent;
|
border-bottom: 2px solid transparent;
|
||||||
}
|
}
|
||||||
.tab.active {
|
.tab.active {
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
border-bottom-color: var(--fs-accent);
|
border-bottom-color: var(--color-primary);
|
||||||
}
|
}
|
||||||
.preview-pane {
|
.preview-pane {
|
||||||
padding: 0.75rem;
|
padding: 0.75rem;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-input-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
min-height: 200px;
|
min-height: 200px;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ── Tag suggestions ── */
|
/* ── Tag suggestions ── */
|
||||||
@@ -85,21 +85,21 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.2rem;
|
gap: 0.2rem;
|
||||||
padding: 0.2rem 0.55rem;
|
padding: 0.2rem 0.55rem;
|
||||||
border: 1px solid var(--fs-accent);
|
border: 1px solid var(--color-primary);
|
||||||
border-radius: 999px;
|
border-radius: 999px;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: background 0.15s, color 0.15s;
|
transition: background 0.15s, color 0.15s;
|
||||||
}
|
}
|
||||||
.tag-pill:hover:not(:disabled) {
|
.tag-pill:hover:not(:disabled) {
|
||||||
background: var(--fs-accent);
|
background: var(--color-primary);
|
||||||
color: var(--fs-text-on-action);
|
color: var(--fs-text-on-action);
|
||||||
}
|
}
|
||||||
.tag-pill.applied {
|
.tag-pill.applied {
|
||||||
background: var(--fs-success);
|
background: var(--color-success, #2ecc71);
|
||||||
border-color: var(--fs-success);
|
border-color: var(--color-success, #2ecc71);
|
||||||
color: var(--fs-text-on-action);
|
color: var(--fs-text-on-action);
|
||||||
cursor: default;
|
cursor: default;
|
||||||
}
|
}
|
||||||
@@ -111,8 +111,8 @@
|
|||||||
.assist-panel {
|
.assist-panel {
|
||||||
width: 320px;
|
width: 320px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
border-left: 1px solid var(--fs-border-color);
|
border-left: 1px solid var(--color-border);
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@@ -123,13 +123,13 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
padding: 0.65rem 0.9rem;
|
padding: 0.65rem 0.9rem;
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border);
|
||||||
}
|
}
|
||||||
.assist-panel-title {
|
.assist-panel-title {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.05em;
|
letter-spacing: 0.05em;
|
||||||
}
|
}
|
||||||
@@ -149,13 +149,13 @@
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.04em;
|
letter-spacing: 0.04em;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
margin-bottom: 0.2rem;
|
margin-bottom: 0.2rem;
|
||||||
}
|
}
|
||||||
.assist-sections {
|
.assist-sections {
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-input-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-bg);
|
||||||
max-height: 200px;
|
max-height: 200px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
@@ -165,46 +165,46 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 0.82rem;
|
font-size: 0.82rem;
|
||||||
border-left: 3px solid transparent;
|
border-left: 3px solid transparent;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
.assist-section-item:hover {
|
.assist-section-item:hover {
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
}
|
}
|
||||||
.assist-section-item.selected {
|
.assist-section-item.selected {
|
||||||
border-left-color: var(--fs-accent);
|
border-left-color: var(--color-primary);
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
.assist-empty,
|
.assist-empty,
|
||||||
.assist-hint {
|
.assist-hint {
|
||||||
padding: 0.6rem 0.7rem;
|
padding: 0.6rem 0.7rem;
|
||||||
font-size: 0.82rem;
|
font-size: 0.82rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
.assist-target-preview {
|
.assist-target-preview {
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.assist-target-preview em {
|
.assist-target-preview em {
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
}
|
}
|
||||||
.assist-instruction {
|
.assist-instruction {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0.5rem 0.65rem;
|
padding: 0.5rem 0.65rem;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-input-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
font-size: 0.88rem;
|
font-size: 0.88rem;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
resize: vertical;
|
resize: vertical;
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-bg);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
min-height: 3.5rem;
|
min-height: 3.5rem;
|
||||||
}
|
}
|
||||||
@@ -216,22 +216,22 @@
|
|||||||
/* Streaming */
|
/* Streaming */
|
||||||
.assist-streaming-label {
|
.assist-streaming-label {
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.assist-preview-box {
|
.assist-preview-box {
|
||||||
padding: 0.65rem;
|
padding: 0.65rem;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-input-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-bg);
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
max-height: 300px;
|
max-height: 300px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
.typing-indicator {
|
.typing-indicator {
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
font-size: 0.75rem;
|
font-size: 0.75rem;
|
||||||
letter-spacing: 0.15em;
|
letter-spacing: 0.15em;
|
||||||
animation: blink 1s step-end infinite;
|
animation: blink 1s step-end infinite;
|
||||||
@@ -244,18 +244,18 @@
|
|||||||
.assist-active-hint {
|
.assist-active-hint {
|
||||||
padding: 0.5rem 0.75rem;
|
padding: 0.5rem 0.75rem;
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Error */
|
/* Error */
|
||||||
.assist-error {
|
.assist-error {
|
||||||
padding: 0.5rem 0.75rem;
|
padding: 0.5rem 0.75rem;
|
||||||
background: color-mix(in srgb, var(--fs-error) 10%, transparent);
|
background: color-mix(in srgb, var(--color-danger) 10%, transparent);
|
||||||
border: 1px solid var(--fs-error);
|
border: 1px solid var(--color-danger);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
color: var(--fs-error);
|
color: var(--color-danger);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Review / diff */
|
/* Review / diff */
|
||||||
@@ -265,12 +265,12 @@
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
}
|
}
|
||||||
.diff-view {
|
.diff-view {
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-input-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-bg);
|
||||||
font-size: 0.82rem;
|
font-size: 0.82rem;
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
max-height: 340px;
|
max-height: 340px;
|
||||||
@@ -284,15 +284,15 @@
|
|||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
.diff-delete {
|
.diff-delete {
|
||||||
background: color-mix(in srgb, var(--fs-error) 12%, transparent);
|
background: color-mix(in srgb, var(--color-danger) 12%, transparent);
|
||||||
color: var(--fs-error);
|
color: var(--color-danger);
|
||||||
}
|
}
|
||||||
.diff-insert {
|
.diff-insert {
|
||||||
background: color-mix(in srgb, var(--fs-success) 12%, transparent);
|
background: color-mix(in srgb, var(--color-success) 12%, transparent);
|
||||||
color: var(--fs-success);
|
color: var(--color-success);
|
||||||
}
|
}
|
||||||
.diff-equal {
|
.diff-equal {
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
.diff-marker {
|
.diff-marker {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
@@ -308,7 +308,7 @@
|
|||||||
}
|
}
|
||||||
.diff-empty {
|
.diff-empty {
|
||||||
padding: 0.5rem;
|
padding: 0.5rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
font-size: 0.82rem;
|
font-size: 0.82rem;
|
||||||
}
|
}
|
||||||
.assist-actions {
|
.assist-actions {
|
||||||
@@ -320,15 +320,15 @@
|
|||||||
.modal-overlay {
|
.modal-overlay {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
background: var(--fs-overlay);
|
background: var(--color-overlay);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
z-index: 200;
|
z-index: 200;
|
||||||
}
|
}
|
||||||
.modal-card {
|
.modal-card {
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
border-radius: var(--fs-radius-lg);
|
border-radius: var(--radius-md);
|
||||||
padding: 1.5rem;
|
padding: 1.5rem;
|
||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
width: 90%;
|
width: 90%;
|
||||||
@@ -340,7 +340,7 @@
|
|||||||
}
|
}
|
||||||
.modal-message {
|
.modal-message {
|
||||||
margin: 0 0 1.25rem;
|
margin: 0 0 1.25rem;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
font-size: 0.95rem;
|
font-size: 0.95rem;
|
||||||
}
|
}
|
||||||
.modal-actions {
|
.modal-actions {
|
||||||
@@ -350,17 +350,17 @@
|
|||||||
}
|
}
|
||||||
.modal-btn {
|
.modal-btn {
|
||||||
padding: 0.45rem 1rem;
|
padding: 0.45rem 1rem;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
}
|
}
|
||||||
.modal-btn-danger {
|
.modal-btn-danger {
|
||||||
background: var(--fs-error);
|
background: var(--color-danger);
|
||||||
color: var(--fs-text-on-action);
|
color: var(--fs-text-on-action);
|
||||||
border-color: var(--fs-error);
|
border-color: var(--color-danger);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ── Floating inline assist button (teleported to body) ── */
|
/* ── Floating inline assist button (teleported to body) ── */
|
||||||
@@ -369,10 +369,10 @@
|
|||||||
z-index: 100;
|
z-index: 100;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
padding: 0.3rem 0.75rem;
|
padding: 0.3rem 0.75rem;
|
||||||
background: var(--fs-action-primary);
|
background: var(--color-action-primary);
|
||||||
color: var(--fs-text-on-action);
|
color: var(--fs-text-on-action);
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
box-shadow: 0 2px 8px var(--color-shadow);
|
box-shadow: 0 2px 8px var(--color-shadow);
|
||||||
@@ -384,12 +384,12 @@
|
|||||||
display: none;
|
display: none;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0.6rem 1rem;
|
padding: 0.6rem 1rem;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
border: none;
|
border: none;
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border);
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
@@ -408,7 +408,7 @@
|
|||||||
.sb-label {
|
.sb-label {
|
||||||
font-size: 0.78rem;
|
font-size: 0.78rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.04em;
|
letter-spacing: 0.04em;
|
||||||
}
|
}
|
||||||
@@ -416,10 +416,10 @@
|
|||||||
.sb-input {
|
.sb-input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0.35rem 0.5rem;
|
padding: 0.35rem 0.5rem;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-input-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
@@ -427,11 +427,11 @@
|
|||||||
.sb-select:focus,
|
.sb-select:focus,
|
||||||
.sb-input:focus {
|
.sb-input:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary);
|
||||||
}
|
}
|
||||||
.sb-divider {
|
.sb-divider {
|
||||||
height: 1px;
|
height: 1px;
|
||||||
background: var(--fs-border-color);
|
background: var(--color-border);
|
||||||
margin: 0.15rem 0;
|
margin: 0.15rem 0;
|
||||||
}
|
}
|
||||||
@media (max-width: 720px) {
|
@media (max-width: 720px) {
|
||||||
@@ -452,8 +452,8 @@
|
|||||||
width: auto;
|
width: auto;
|
||||||
flex: 0 0 45%;
|
flex: 0 0 45%;
|
||||||
border-left: none;
|
border-left: none;
|
||||||
border-top: 1px solid var(--fs-border-color);
|
border-top: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-lg) var(--fs-radius-lg) 0 0;
|
border-radius: var(--radius-md) var(--radius-md) 0 0;
|
||||||
}
|
}
|
||||||
.editor-header {
|
.editor-header {
|
||||||
padding: 0.75rem 1rem 0.5rem;
|
padding: 0.75rem 1rem 0.5rem;
|
||||||
@@ -480,14 +480,14 @@
|
|||||||
.btn-accept,
|
.btn-accept,
|
||||||
.btn-generate,
|
.btn-generate,
|
||||||
.btn-save {
|
.btn-save {
|
||||||
background: var(--fs-action-primary);
|
background: var(--color-action-primary);
|
||||||
color: var(--fs-text-on-action);
|
color: var(--fs-text-on-action);
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
.btn-accept:not(:disabled):hover,
|
.btn-accept:not(:disabled):hover,
|
||||||
.btn-generate:not(:disabled):hover,
|
.btn-generate:not(:disabled):hover,
|
||||||
.btn-save:not(:disabled):hover {
|
.btn-save:not(:disabled):hover {
|
||||||
background: var(--fs-action-primary-hover);
|
background: var(--color-action-primary-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-back,
|
.btn-back,
|
||||||
@@ -497,7 +497,7 @@
|
|||||||
.btn-suggest-tags {
|
.btn-suggest-tags {
|
||||||
background: none;
|
background: none;
|
||||||
border: var(--fs-border);
|
border: var(--fs-border);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
}
|
}
|
||||||
.btn-back:not(:disabled):hover,
|
.btn-back:not(:disabled):hover,
|
||||||
.btn-clear:not(:disabled):hover,
|
.btn-clear:not(:disabled):hover,
|
||||||
@@ -505,16 +505,16 @@
|
|||||||
.btn-proofread:not(:disabled):hover,
|
.btn-proofread:not(:disabled):hover,
|
||||||
.btn-suggest-tags:not(:disabled):hover {
|
.btn-suggest-tags:not(:disabled):hover {
|
||||||
border: var(--fs-border-hover);
|
border: var(--fs-border-hover);
|
||||||
background: var(--fs-surface-hover);
|
background: var(--color-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-delete {
|
.btn-delete {
|
||||||
background: var(--fs-action-destructive);
|
background: var(--color-action-destructive);
|
||||||
color: var(--fs-text-on-action);
|
color: var(--fs-text-on-action);
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
.btn-delete:not(:disabled):hover {
|
.btn-delete:not(:disabled):hover {
|
||||||
background: var(--fs-action-destructive-hover);
|
background: var(--color-action-destructive-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Shared geometry for every alias above. */
|
/* Shared geometry for every alias above. */
|
||||||
@@ -541,12 +541,12 @@
|
|||||||
.btn-dismiss-tags {
|
.btn-dismiss-tags {
|
||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
padding: 2px var(--fs-space-1);
|
padding: 2px var(--fs-space-1);
|
||||||
font-size: var(--fs-size-tiny);
|
font-size: var(--fs-size-tiny);
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
.btn-dismiss-tags:hover { color: var(--fs-text-primary); }
|
.btn-dismiss-tags:hover { color: var(--color-text); }
|
||||||
|
|
||||||
.btn-accept:disabled, .btn-generate:disabled, .btn-save:disabled,
|
.btn-accept:disabled, .btn-generate:disabled, .btn-save:disabled,
|
||||||
.btn-back:disabled, .btn-clear:disabled, .btn-reject:disabled,
|
.btn-back:disabled, .btn-clear:disabled, .btn-reject:disabled,
|
||||||
|
|||||||
@@ -41,8 +41,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.prose pre {
|
.prose pre {
|
||||||
background: var(--fs-surface-code);
|
background: var(--color-code-bg);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
padding: 0.75rem;
|
padding: 0.75rem;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.prose code {
|
.prose code {
|
||||||
background: var(--fs-surface-code-inline);
|
background: var(--color-code-inline-bg);
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
padding: 0.15rem 0.35rem;
|
padding: 0.15rem 0.35rem;
|
||||||
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
|
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
|
||||||
@@ -73,25 +73,25 @@
|
|||||||
|
|
||||||
.prose th,
|
.prose th,
|
||||||
.prose td {
|
.prose td {
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
padding: 0.4rem 0.6rem;
|
padding: 0.4rem 0.6rem;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.prose thead th {
|
.prose thead th {
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
.prose tbody tr:nth-child(even) {
|
.prose tbody tr:nth-child(even) {
|
||||||
background: var(--fs-table-stripe);
|
background: var(--color-table-stripe);
|
||||||
}
|
}
|
||||||
|
|
||||||
.prose blockquote {
|
.prose blockquote {
|
||||||
border-left: 3px solid var(--fs-border-color);
|
border-left: 3px solid var(--color-border);
|
||||||
margin: 0 0 0.6rem;
|
margin: 0 0 0.6rem;
|
||||||
padding: 0.25rem 0 0.25rem 0.75rem;
|
padding: 0.25rem 0 0.25rem 0.75rem;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.prose blockquote p:last-child {
|
.prose blockquote p:last-child {
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
|
|
||||||
.prose hr {
|
.prose hr {
|
||||||
border: none;
|
border: none;
|
||||||
border-top: 1px solid var(--fs-border-color);
|
border-top: 1px solid var(--color-border);
|
||||||
margin: 1rem 0;
|
margin: 1rem 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -110,7 +110,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.prose a {
|
.prose a {
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -119,8 +119,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.prose .inline-tag {
|
.prose .inline-tag {
|
||||||
color: var(--fs-accent);
|
color: var(--color-tag-text);
|
||||||
background: var(--fs-accent-soft);
|
background: var(--color-tag-bg);
|
||||||
padding: 0.1rem 0.35rem;
|
padding: 0.1rem 0.35rem;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@@ -133,8 +133,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.prose .wikilink {
|
.prose .wikilink {
|
||||||
color: var(--fs-wikilink);
|
color: var(--color-wikilink);
|
||||||
background: var(--fs-accent-soft);
|
background: var(--color-wikilink-bg);
|
||||||
padding: 0.1rem 0.35rem;
|
padding: 0.1rem 0.35rem;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
@@ -168,7 +168,7 @@
|
|||||||
|
|
||||||
.prose ul[data-type="taskList"] li > label input[type="checkbox"] {
|
.prose ul[data-type="taskList"] li > label input[type="checkbox"] {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
accent-color: var(--fs-accent);
|
accent-color: var(--color-primary);
|
||||||
width: 0.95em;
|
width: 0.95em;
|
||||||
height: 0.95em;
|
height: 0.95em;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@@ -180,7 +180,7 @@
|
|||||||
|
|
||||||
.prose ul[data-type="taskList"] li[data-checked="true"] > div {
|
.prose ul[data-type="taskList"] li[data-checked="true"] > div {
|
||||||
text-decoration: line-through;
|
text-decoration: line-through;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Interactive checkboxes — marked output in the list-note viewer */
|
/* Interactive checkboxes — marked output in the list-note viewer */
|
||||||
@@ -196,7 +196,7 @@
|
|||||||
}
|
}
|
||||||
.prose--checklist li input[type="checkbox"] {
|
.prose--checklist li input[type="checkbox"] {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
accent-color: var(--fs-accent);
|
accent-color: var(--color-primary);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
width: 0.95em;
|
width: 0.95em;
|
||||||
height: 0.95em;
|
height: 0.95em;
|
||||||
@@ -205,7 +205,7 @@
|
|||||||
.prose--checklist li:has(input[type="checkbox"]:checked) > p,
|
.prose--checklist li:has(input[type="checkbox"]:checked) > p,
|
||||||
.prose--checklist li:has(input[type="checkbox"]:checked) {
|
.prose--checklist li:has(input[type="checkbox"]:checked) {
|
||||||
text-decoration: line-through;
|
text-decoration: line-through;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
.prose--checklist li:has(input[type="checkbox"]:checked) input[type="checkbox"] {
|
.prose--checklist li:has(input[type="checkbox"]:checked) input[type="checkbox"] {
|
||||||
text-decoration: none; /* don't strike through the checkbox itself */
|
text-decoration: none; /* don't strike through the checkbox itself */
|
||||||
@@ -219,7 +219,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.tiptap-editor .ProseMirror p.is-editor-empty:first-child::before {
|
.tiptap-editor .ProseMirror p.is-editor-empty:first-child::before {
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted, var(--color-text-secondary));
|
||||||
content: attr(data-placeholder);
|
content: attr(data-placeholder);
|
||||||
float: left;
|
float: left;
|
||||||
height: 0;
|
height: 0;
|
||||||
@@ -227,12 +227,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.tiptap-wrapper {
|
.tiptap-wrapper {
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-input-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
}
|
}
|
||||||
|
|
||||||
.tiptap-wrapper:focus-within {
|
.tiptap-wrapper:focus-within {
|
||||||
box-shadow: var(--fs-focus-ring);
|
box-shadow: var(--focus-ring, 0 0 0 2px var(--color-primary));
|
||||||
}
|
}
|
||||||
|
|||||||
+116
-11
@@ -188,21 +188,126 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* ==========================================================================
|
/* ==========================================================================
|
||||||
The compatibility-alias block that lived here is GONE (#2533). It let ~55
|
COMPATIBILITY ALIASES — the app's historical names, pointing at the system.
|
||||||
components keep their historical --color-* names while theme.css was
|
|
||||||
repointed at the design system; the rename sweep it promised ran on
|
These exist so ~55 components keep working while they migrate to --fs-*
|
||||||
2026-08-08 and every component now references --fs-* directly. Do not
|
one at a time. Every one is a plain var() reference, which is what lets this
|
||||||
reintroduce app-local alias names — the design system's tokens are the
|
block be declared ONCE: when [data-theme="light"] moves --fs-surface-page,
|
||||||
vocabulary, and check_snippets_against_design_system can only see through
|
--color-bg follows, because the alias resolves at use time.
|
||||||
names the system actually declares.
|
|
||||||
|
That is why this file lost 48 of its 60 dark-mode overrides — they were all
|
||||||
|
restating relationships the aliases now express directly.
|
||||||
|
|
||||||
|
Removing this block is a rename sweep across the components, tracked
|
||||||
|
separately. Nothing new should reference a --color-* name.
|
||||||
========================================================================== */
|
========================================================================== */
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
/* A VALUE, not an alias — the one survivor of the alias block. The design
|
/* surfaces */
|
||||||
system has no shadow-colour token yet, so this is a recorded gap: when a
|
--color-bg: var(--fs-surface-page);
|
||||||
second app needs it, promote it to an --fs-* token in the system and
|
--color-bg-secondary: var(--fs-surface-raised);
|
||||||
regenerate, rather than copying this line. */
|
--color-bg-card: var(--fs-surface-raised);
|
||||||
|
--color-surface: var(--fs-surface-hover);
|
||||||
|
--color-code-bg: var(--fs-surface-code);
|
||||||
|
--color-code-inline-bg: var(--fs-surface-code-inline);
|
||||||
|
--color-table-stripe: var(--fs-table-stripe);
|
||||||
|
--color-overlay: var(--fs-overlay);
|
||||||
|
|
||||||
|
/* text */
|
||||||
|
--color-text: var(--fs-text-primary);
|
||||||
|
--color-text-secondary: var(--fs-text-secondary);
|
||||||
|
--color-text-muted: var(--fs-text-tertiary);
|
||||||
|
|
||||||
|
/* lines */
|
||||||
|
--color-border: var(--fs-border-color);
|
||||||
|
--color-input-border: var(--fs-border-color);
|
||||||
|
--focus-ring: var(--fs-focus-ring);
|
||||||
|
|
||||||
|
/* brand */
|
||||||
|
--color-primary: var(--fs-accent);
|
||||||
|
--color-primary-solid: var(--fs-accent);
|
||||||
|
--color-primary-deep: var(--fs-accent-deep);
|
||||||
|
--color-primary-faint: var(--fs-accent-faint);
|
||||||
|
--color-primary-tint: var(--fs-accent-soft);
|
||||||
|
--color-primary-wash: var(--fs-accent-wash);
|
||||||
|
--color-tag-bg: var(--fs-accent-soft);
|
||||||
|
--color-tag-text: var(--fs-accent);
|
||||||
|
--color-wikilink: var(--fs-wikilink);
|
||||||
|
--color-wikilink-bg: var(--fs-accent-soft);
|
||||||
|
--gradient-cta: var(--fs-gradient-cta);
|
||||||
|
--glow-cta: var(--fs-glow-cta);
|
||||||
|
--glow-cta-hover: var(--fs-glow-cta-hover);
|
||||||
|
|
||||||
|
/* actions */
|
||||||
|
--color-action-primary: var(--fs-action-primary);
|
||||||
|
--color-action-primary-hover: var(--fs-action-primary-hover);
|
||||||
|
--color-action-secondary: var(--fs-action-secondary);
|
||||||
|
--color-action-secondary-hover: var(--fs-action-secondary-hover);
|
||||||
|
--color-action-destructive: var(--fs-action-destructive);
|
||||||
|
--color-action-destructive-hover: var(--fs-action-destructive-hover);
|
||||||
|
|
||||||
|
/* semantic */
|
||||||
|
--color-success: var(--fs-success);
|
||||||
|
--color-warning: var(--fs-warning);
|
||||||
|
--color-danger: var(--fs-error);
|
||||||
|
--color-overdue: var(--fs-overdue);
|
||||||
|
--color-toast-success: var(--fs-success);
|
||||||
|
--color-toast-error: var(--fs-error);
|
||||||
--color-shadow: rgba(0, 0, 0, 0.4);
|
--color-shadow: rgba(0, 0, 0, 0.4);
|
||||||
|
|
||||||
|
/* task status + priority */
|
||||||
|
--color-status-todo: var(--fs-status-todo);
|
||||||
|
--color-status-todo-bg: var(--fs-status-todo-bg);
|
||||||
|
--color-status-in-progress: var(--fs-status-in-progress);
|
||||||
|
--color-status-in-progress-bg: var(--fs-status-in-progress-bg);
|
||||||
|
--color-status-done: var(--fs-status-done);
|
||||||
|
--color-status-done-bg: var(--fs-status-done-bg);
|
||||||
|
--color-priority-low: var(--fs-priority-low);
|
||||||
|
--color-priority-low-bg: var(--fs-priority-low-bg);
|
||||||
|
--color-priority-medium: var(--fs-priority-medium);
|
||||||
|
--color-priority-medium-bg: var(--fs-priority-medium-bg);
|
||||||
|
--color-priority-high: var(--fs-priority-high);
|
||||||
|
--color-priority-high-bg: var(--fs-priority-high-bg);
|
||||||
|
|
||||||
|
/* geometry */
|
||||||
|
--radius-sm: var(--fs-radius-sm);
|
||||||
|
--radius-md: var(--fs-radius-lg); /* NB: the app's "md" is the system's LARGE */
|
||||||
|
--radius-lg: var(--fs-radius-xl); /* and the app's "lg" is the system's XL */
|
||||||
|
--page-max-width: var(--fs-layout-page-max);
|
||||||
|
--page-padding-x: var(--fs-layout-page-pad);
|
||||||
|
--sidebar-width: var(--fs-layout-sidebar);
|
||||||
|
--header-height: var(--fs-layout-header);
|
||||||
|
|
||||||
|
/* ------------------------------------------------------------------
|
||||||
|
Names components reference that were NEVER declared anywhere.
|
||||||
|
|
||||||
|
Each of these was reached for with a hardcoded fallback, so the page
|
||||||
|
rendered — but the fallback was what rendered, always, and several were
|
||||||
|
off-palette: --color-primary-bg fell back to an indigo, --color-destructive
|
||||||
|
to a brick that is not the oxblood, --color-status-cancelled to a grey from
|
||||||
|
no palette in this system.
|
||||||
|
|
||||||
|
Wiring them to real tokens is the whole point of the exercise. Expect small
|
||||||
|
visual shifts exactly where a fallback had drifted; that shift IS the fix.
|
||||||
|
------------------------------------------------------------------ */
|
||||||
|
--color-accent: var(--fs-accent);
|
||||||
|
/* Foreground ON the accent, so it follows the accent's mode-independence,
|
||||||
|
not the page text's. Pointing this at --fs-text-primary made it invert to
|
||||||
|
obsidian on light — over a mid-tone accent, well under the AA floor. */
|
||||||
|
--color-accent-fg: var(--fs-text-on-action);
|
||||||
|
--color-hover: var(--fs-surface-hover);
|
||||||
|
--color-bg-hover: var(--fs-surface-hover);
|
||||||
|
--color-bg-tertiary: var(--fs-surface-hover);
|
||||||
|
--color-surface-2: var(--fs-surface-hover);
|
||||||
|
--color-surface-alt: var(--fs-surface-hover);
|
||||||
|
--color-surface-raised: var(--fs-surface-raised);
|
||||||
|
--color-input-bg: var(--fs-surface-page);
|
||||||
|
--color-muted: var(--fs-text-tertiary);
|
||||||
|
--color-destructive: var(--fs-destructive);
|
||||||
|
--color-primary-bg: var(--fs-accent-soft);
|
||||||
|
--color-status-cancelled: var(--fs-status-cancelled);
|
||||||
|
--font-display: var(--fs-font-display);
|
||||||
|
--font-mono: var(--fs-font-mono);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ==========================================================================
|
/* ==========================================================================
|
||||||
|
|||||||
@@ -15,27 +15,27 @@
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.ctx-crumb-parent {
|
.ctx-crumb-parent {
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
.ctx-crumb-parent:hover {
|
.ctx-crumb-parent:hover {
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary);
|
||||||
}
|
}
|
||||||
.ctx-crumb-project {
|
.ctx-crumb-project {
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
background: color-mix(in srgb, var(--fs-accent) 10%, transparent);
|
background: color-mix(in srgb, var(--color-primary) 10%, transparent);
|
||||||
border: 1px solid color-mix(in srgb, var(--fs-accent) 30%, transparent);
|
border: 1px solid color-mix(in srgb, var(--color-primary) 30%, transparent);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
.ctx-crumb-project:hover {
|
.ctx-crumb-project:hover {
|
||||||
background: color-mix(in srgb, var(--fs-accent) 18%, transparent);
|
background: color-mix(in srgb, var(--color-primary) 18%, transparent);
|
||||||
}
|
}
|
||||||
.ctx-crumb-milestone {
|
.ctx-crumb-milestone {
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { useShortcuts } from "@/composables/useShortcuts";
|
|||||||
import { useAuthStore } from "@/stores/auth";
|
import { useAuthStore } from "@/stores/auth";
|
||||||
import AppLogo from "@/components/AppLogo.vue";
|
import AppLogo from "@/components/AppLogo.vue";
|
||||||
import NotificationBell from "@/components/NotificationBell.vue";
|
import NotificationBell from "@/components/NotificationBell.vue";
|
||||||
import { Sun, Moon, Settings, Trash2 } from "lucide-vue-next";
|
import { Sun, Moon, Palette, Settings, Trash2 } from "lucide-vue-next";
|
||||||
|
|
||||||
const { theme, toggleTheme } = useTheme();
|
const { theme, toggleTheme } = useTheme();
|
||||||
const { toggleShortcuts } = useShortcuts();
|
const { toggleShortcuts } = useShortcuts();
|
||||||
@@ -50,12 +50,6 @@ router.afterEach(() => {
|
|||||||
<router-link to="/projects" class="nav-link">Projects</router-link>
|
<router-link to="/projects" class="nav-link">Projects</router-link>
|
||||||
<router-link to="/snippets" class="nav-link">Snippets</router-link>
|
<router-link to="/snippets" class="nav-link">Snippets</router-link>
|
||||||
<router-link to="/rules" class="nav-link">Rulebooks</router-link>
|
<router-link to="/rules" class="nav-link">Rulebooks</router-link>
|
||||||
<!-- A design system is a RECORD you author, not a setting. It sat in
|
|
||||||
the utility cluster with Trash and Settings while /design was a
|
|
||||||
read-only gallery, and stayed there after it became a record type
|
|
||||||
with its own table, sharing and MCP tools. Content, by the same
|
|
||||||
rule that puts Snippets and Rulebooks here. -->
|
|
||||||
<router-link to="/design-systems" class="nav-link">Design</router-link>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -70,6 +64,16 @@ router.afterEach(() => {
|
|||||||
<Moon v-else :size="16" />
|
<Moon v-else :size="16" />
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
<!-- Design. An icon rather than a sixth primary nav link: it's a
|
||||||
|
meta-surface like Trash and Settings, but hiding it entirely would
|
||||||
|
defeat the point of having somewhere the design system is visible.
|
||||||
|
Points at the RECORD, not the live-token view — the record is what
|
||||||
|
you work with; the live view is the check on it, and it's a tab
|
||||||
|
away. -->
|
||||||
|
<router-link to="/design-systems" class="btn-icon" aria-label="Design" title="Design">
|
||||||
|
<Palette :size="16" />
|
||||||
|
</router-link>
|
||||||
|
|
||||||
<!-- Trash link -->
|
<!-- Trash link -->
|
||||||
<router-link to="/trash" class="btn-icon" aria-label="Trash" title="Trash">
|
<router-link to="/trash" class="btn-icon" aria-label="Trash" title="Trash">
|
||||||
<Trash2 :size="16" />
|
<Trash2 :size="16" />
|
||||||
@@ -102,9 +106,9 @@ router.afterEach(() => {
|
|||||||
<router-link to="/projects" class="nav-link">Projects</router-link>
|
<router-link to="/projects" class="nav-link">Projects</router-link>
|
||||||
<router-link to="/snippets" class="nav-link">Snippets</router-link>
|
<router-link to="/snippets" class="nav-link">Snippets</router-link>
|
||||||
<router-link to="/rules" class="nav-link">Rulebooks</router-link>
|
<router-link to="/rules" class="nav-link">Rulebooks</router-link>
|
||||||
<router-link to="/design-systems" class="nav-link">Design</router-link>
|
|
||||||
<router-link to="/shared" class="nav-link">Shared</router-link>
|
<router-link to="/shared" class="nav-link">Shared</router-link>
|
||||||
<div class="mobile-divider"></div>
|
<div class="mobile-divider"></div>
|
||||||
|
<router-link to="/design-systems" class="nav-link">Design</router-link>
|
||||||
<router-link to="/trash" class="nav-link">Trash</router-link>
|
<router-link to="/trash" class="nav-link">Trash</router-link>
|
||||||
<router-link to="/settings" class="nav-link">Settings</router-link>
|
<router-link to="/settings" class="nav-link">Settings</router-link>
|
||||||
<div class="mobile-divider"></div>
|
<div class="mobile-divider"></div>
|
||||||
@@ -124,35 +128,20 @@ router.afterEach(() => {
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.app-header {
|
.app-header {
|
||||||
background: linear-gradient(180deg, var(--fs-surface-hover), var(--fs-surface-page));
|
background: linear-gradient(180deg, var(--color-surface), var(--color-bg));
|
||||||
border-bottom: 1px solid color-mix(in srgb, var(--fs-accent) 18%, transparent);
|
border-bottom: 1px solid rgba(91, 74, 138, 0.18);
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
/* Three tracks, not a flex row with an absolutely-centred overlay.
|
|
||||||
*
|
|
||||||
* The pill bar used to be `position: absolute; left: 50%`, which meant it did
|
|
||||||
* not participate in layout: when the header ran out of room it OVERLAPPED the
|
|
||||||
* brand and the utility cluster rather than pushing them, and nothing wrapped
|
|
||||||
* or scrolled to signal it. A sixth link reached that point at ~1270px, which
|
|
||||||
* is an ordinary window on any monitor.
|
|
||||||
*
|
|
||||||
* `1fr auto 1fr` fixes it structurally. A `1fr` track has an AUTO minimum, so
|
|
||||||
* neither side can be squeezed below its content, and the two side tracks stay
|
|
||||||
* equal to each other — which is what keeps the bar centred in the viewport
|
|
||||||
* rather than merely centred in the leftover space. Overflow becomes the
|
|
||||||
* header growing, not two things sharing pixels. */
|
|
||||||
.nav {
|
.nav {
|
||||||
padding: 0.6rem 1.5rem;
|
padding: 0.6rem 1.5rem;
|
||||||
display: grid;
|
display: flex;
|
||||||
grid-template-columns: 1fr auto 1fr;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.75rem;
|
justify-content: space-between;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Left — brand */
|
/* Left — brand */
|
||||||
.nav-brand {
|
.nav-brand {
|
||||||
justify-self: start;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.45rem;
|
gap: 0.45rem;
|
||||||
@@ -170,7 +159,9 @@ router.afterEach(() => {
|
|||||||
|
|
||||||
/* Center — pill bar */
|
/* Center — pill bar */
|
||||||
.nav-center {
|
.nav-center {
|
||||||
justify-self: center;
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
@@ -178,23 +169,21 @@ router.afterEach(() => {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 2px;
|
gap: 2px;
|
||||||
background: var(--fs-accent-faint);
|
background: var(--color-primary-faint);
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Right */
|
/* Right */
|
||||||
.nav-right {
|
.nav-right {
|
||||||
justify-self: end;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.25rem;
|
gap: 0.25rem;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
min-width: 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-link {
|
.nav-link {
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
font-size: 0.82rem;
|
font-size: 0.82rem;
|
||||||
padding: 0.3rem 0.75rem;
|
padding: 0.3rem 0.75rem;
|
||||||
@@ -202,14 +191,14 @@ router.afterEach(() => {
|
|||||||
transition: background 0.15s, color 0.15s;
|
transition: background 0.15s, color 0.15s;
|
||||||
}
|
}
|
||||||
.nav-link:hover {
|
.nav-link:hover {
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
background: var(--fs-accent-soft);
|
background: var(--color-primary-tint);
|
||||||
}
|
}
|
||||||
.nav-link.router-link-active {
|
.nav-link.router-link-active {
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary-solid);
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
background: color-mix(in srgb, var(--fs-accent) 25%, transparent);
|
background: rgba(91, 74, 138, 0.25);
|
||||||
box-shadow: 0 0 16px color-mix(in srgb, var(--fs-accent) 30%, transparent);
|
box-shadow: 0 0 16px rgba(91, 74, 138, 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Status indicator */
|
/* Status indicator */
|
||||||
@@ -229,7 +218,7 @@ router.afterEach(() => {
|
|||||||
.status-text {
|
.status-text {
|
||||||
font-size: 0.75rem;
|
font-size: 0.75rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
/* Status dots are indicator lights, not semantic-palette buttons —
|
/* Status dots are indicator lights, not semantic-palette buttons —
|
||||||
they want to read as vital (Moss/Warning/Error are too muted for
|
they want to read as vital (Moss/Warning/Error are too muted for
|
||||||
@@ -239,7 +228,7 @@ router.afterEach(() => {
|
|||||||
.status-yellow .status-dot { background: #facc15; animation: pulse-dot 2s infinite; }
|
.status-yellow .status-dot { background: #facc15; animation: pulse-dot 2s infinite; }
|
||||||
.status-orange .status-dot { background: #f97316; }
|
.status-orange .status-dot { background: #f97316; }
|
||||||
.status-red .status-dot { background: #ef4444; }
|
.status-red .status-dot { background: #ef4444; }
|
||||||
.status-gray .status-dot { background: var(--fs-text-tertiary); animation: pulse-dot 2s infinite; }
|
.status-gray .status-dot { background: var(--color-text-muted); animation: pulse-dot 2s infinite; }
|
||||||
@keyframes pulse-dot {
|
@keyframes pulse-dot {
|
||||||
0%, 100% { opacity: 1; }
|
0%, 100% { opacity: 1; }
|
||||||
50% { opacity: 0.3; }
|
50% { opacity: 0.3; }
|
||||||
@@ -252,12 +241,12 @@ router.afterEach(() => {
|
|||||||
/* Icon buttons (?, theme, gear) */
|
/* Icon buttons (?, theme, gear) */
|
||||||
.btn-icon {
|
.btn-icon {
|
||||||
background: none;
|
background: none;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
padding: 0.25rem 0.45rem;
|
padding: 0.25rem 0.45rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 0.95rem;
|
font-size: 0.95rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -265,9 +254,9 @@ router.afterEach(() => {
|
|||||||
}
|
}
|
||||||
.btn-icon:hover,
|
.btn-icon:hover,
|
||||||
.btn-icon.active {
|
.btn-icon.active {
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* User info */
|
/* User info */
|
||||||
@@ -277,42 +266,36 @@ router.afterEach(() => {
|
|||||||
gap: 0.4rem;
|
gap: 0.4rem;
|
||||||
margin-left: 0.25rem;
|
margin-left: 0.25rem;
|
||||||
padding-left: 0.5rem;
|
padding-left: 0.5rem;
|
||||||
border-left: 1px solid var(--fs-border-color);
|
border-left: 1px solid var(--color-border);
|
||||||
}
|
}
|
||||||
.username {
|
.username {
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
/* The widest thing on the right and the only one that can give: a long
|
|
||||||
username shouldn't be what decides where the nav bar sits. */
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: nowrap;
|
|
||||||
max-width: 12ch;
|
|
||||||
}
|
}
|
||||||
.admin-badge {
|
.admin-badge {
|
||||||
font-size: 0.65rem;
|
font-size: 0.65rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.05em;
|
letter-spacing: 0.05em;
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
background: color-mix(in srgb, var(--fs-accent) 15%, transparent);
|
background: color-mix(in srgb, var(--color-primary) 15%, transparent);
|
||||||
padding: 0.1rem 0.35rem;
|
padding: 0.1rem 0.35rem;
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
}
|
}
|
||||||
.btn-logout {
|
.btn-logout {
|
||||||
background: none;
|
background: none;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
padding: 0.2rem 0.5rem;
|
padding: 0.2rem 0.5rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
}
|
}
|
||||||
.btn-logout:hover {
|
.btn-logout:hover {
|
||||||
color: var(--fs-error);
|
color: var(--color-danger);
|
||||||
border-color: var(--fs-error);
|
border-color: var(--color-danger);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Hamburger — mobile only */
|
/* Hamburger — mobile only */
|
||||||
@@ -330,7 +313,7 @@ router.afterEach(() => {
|
|||||||
display: block;
|
display: block;
|
||||||
width: 20px;
|
width: 20px;
|
||||||
height: 2px;
|
height: 2px;
|
||||||
background: var(--fs-text-primary);
|
background: var(--color-text);
|
||||||
border-radius: 1px;
|
border-radius: 1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -339,13 +322,13 @@ router.afterEach(() => {
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: 0.5rem 1rem 0.75rem;
|
padding: 0.5rem 1rem 0.75rem;
|
||||||
border-top: 1px solid var(--fs-border-color);
|
border-top: 1px solid var(--color-border);
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
gap: 0.1rem;
|
gap: 0.1rem;
|
||||||
}
|
}
|
||||||
.mobile-divider {
|
.mobile-divider {
|
||||||
height: 1px;
|
height: 1px;
|
||||||
background: var(--fs-border-color);
|
background: var(--color-border);
|
||||||
margin: 0.4rem 0;
|
margin: 0.4rem 0;
|
||||||
}
|
}
|
||||||
.mobile-actions {
|
.mobile-actions {
|
||||||
@@ -359,25 +342,10 @@ router.afterEach(() => {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
padding-top: 0.4rem;
|
padding-top: 0.4rem;
|
||||||
border-top: 1px solid var(--fs-border-color);
|
border-top: 1px solid var(--color-border);
|
||||||
margin-top: 0.25rem;
|
margin-top: 0.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The grid above means running out of room can no longer cause a collision —
|
|
||||||
but it can still make the header wider than the window, and a horizontally
|
|
||||||
scrolling header is its own defect. So shed width before that happens. The
|
|
||||||
wordmark goes first: the logo beside it says the same thing and is still the
|
|
||||||
link home. */
|
|
||||||
@media (max-width: 1280px) {
|
|
||||||
.brand-text {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
.nav-link {
|
|
||||||
padding: 0.3rem 0.5rem;
|
|
||||||
font-size: 0.78rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.nav-center {
|
.nav-center {
|
||||||
display: none;
|
display: none;
|
||||||
@@ -398,7 +366,7 @@ router.afterEach(() => {
|
|||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
.mobile-menu .nav-link.router-link-active {
|
.mobile-menu .nav-link.router-link-active {
|
||||||
background: var(--fs-accent-wash);
|
background: var(--color-primary-wash);
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
.mobile-user .btn-logout {
|
.mobile-user .btn-logout {
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ defineProps<{ size?: number }>();
|
|||||||
>
|
>
|
||||||
<defs>
|
<defs>
|
||||||
<linearGradient id="logo-gradient" x1="0" y1="0" x2="1" y2="1">
|
<linearGradient id="logo-gradient" x1="0" y1="0" x2="1" y2="1">
|
||||||
<stop offset="0%" stop-color="var(--fs-accent)" />
|
<stop offset="0%" stop-color="var(--color-primary-solid)" />
|
||||||
<stop offset="100%" stop-color="var(--fs-accent-deep)" />
|
<stop offset="100%" stop-color="var(--color-primary-deep)" />
|
||||||
</linearGradient>
|
</linearGradient>
|
||||||
</defs>
|
</defs>
|
||||||
<!-- Book body -->
|
<!-- Book body -->
|
||||||
@@ -44,12 +44,12 @@ defineProps<{ size?: number }>();
|
|||||||
<style scoped>
|
<style scoped>
|
||||||
.logo-book {
|
.logo-book {
|
||||||
fill: url(#logo-gradient);
|
fill: url(#logo-gradient);
|
||||||
stroke: color-mix(in srgb, var(--fs-accent) 70%, transparent);
|
stroke: color-mix(in srgb, var(--color-primary) 70%, transparent);
|
||||||
}
|
}
|
||||||
.logo-spine {
|
.logo-spine {
|
||||||
stroke: var(--fs-text-secondary);
|
stroke: var(--color-text-secondary);
|
||||||
}
|
}
|
||||||
.logo-lines {
|
.logo-lines {
|
||||||
stroke: var(--fs-text-tertiary);
|
stroke: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -0,0 +1,51 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
/**
|
||||||
|
* Sub-navigation for the Design surface.
|
||||||
|
*
|
||||||
|
* There are two pages here and they are halves of ONE thing: the record that
|
||||||
|
* decides the styling, and what the browser is actually rendering from it. They
|
||||||
|
* were briefly two top-level nav entries, which put the read-only diagnostic
|
||||||
|
* first and buried the editable record under it — backwards, since the record
|
||||||
|
* is the thing you work with and the live view is the check on it.
|
||||||
|
*
|
||||||
|
* A component rather than the same markup pasted into both views: two copies of
|
||||||
|
* a tab bar diverge the moment a third tab appears, and that is the exact shape
|
||||||
|
* of duplication this whole surface exists to make visible.
|
||||||
|
*/
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<nav class="design-tabs" aria-label="Design views">
|
||||||
|
<router-link to="/design-systems" class="design-tab">Design system</router-link>
|
||||||
|
<router-link to="/design" class="design-tab">Live tokens</router-link>
|
||||||
|
</nav>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.design-tabs {
|
||||||
|
display: flex;
|
||||||
|
gap: 0.25rem;
|
||||||
|
margin-bottom: 1.25rem;
|
||||||
|
border-bottom: 1px solid var(--color-border);
|
||||||
|
}
|
||||||
|
|
||||||
|
.design-tab {
|
||||||
|
padding: 0.5rem 0.9rem;
|
||||||
|
font-size: 0.9rem;
|
||||||
|
color: var(--color-text-secondary);
|
||||||
|
text-decoration: none;
|
||||||
|
border-bottom: 2px solid transparent;
|
||||||
|
margin-bottom: -1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.design-tab:hover {
|
||||||
|
color: var(--color-text);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* `router-link-active` rather than `-exact-active`: both routes are leaves, and
|
||||||
|
exact matching would drop the highlight on any future child route. */
|
||||||
|
.design-tab.router-link-active {
|
||||||
|
color: var(--color-primary);
|
||||||
|
border-bottom-color: var(--color-primary);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -90,9 +90,9 @@ function markerFor(type: DiffLine['type']): string {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-input-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-bg);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,15 +103,15 @@ function markerFor(type: DiffLine['type']): string {
|
|||||||
display: flex;
|
display: flex;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
padding: 0.4rem 0.75rem;
|
padding: 0.4rem 0.75rem;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border);
|
||||||
font-size: 0.78rem;
|
font-size: 0.78rem;
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
.diff-summary-ins { color: var(--fs-success); }
|
.diff-summary-ins { color: var(--color-success, #2ecc71); }
|
||||||
.diff-summary-del { color: var(--fs-error); }
|
.diff-summary-del { color: var(--color-danger, #e74c3c); }
|
||||||
|
|
||||||
.diff-scroll {
|
.diff-scroll {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
@@ -123,7 +123,7 @@ function markerFor(type: DiffLine['type']): string {
|
|||||||
.diff-empty {
|
.diff-empty {
|
||||||
padding: 0.75rem;
|
padding: 0.75rem;
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
.diff-line {
|
.diff-line {
|
||||||
@@ -136,24 +136,24 @@ function markerFor(type: DiffLine['type']): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.diff-delete {
|
.diff-delete {
|
||||||
background: color-mix(in srgb, var(--fs-error) 12%, transparent);
|
background: color-mix(in srgb, var(--color-danger, #e74c3c) 12%, transparent);
|
||||||
color: var(--fs-error);
|
color: var(--color-danger, #e74c3c);
|
||||||
}
|
}
|
||||||
|
|
||||||
.diff-insert {
|
.diff-insert {
|
||||||
background: color-mix(in srgb, var(--fs-success) 12%, transparent);
|
background: color-mix(in srgb, var(--color-success, #2ecc71) 12%, transparent);
|
||||||
color: var(--fs-success);
|
color: var(--color-success, #2ecc71);
|
||||||
}
|
}
|
||||||
|
|
||||||
.diff-equal {
|
.diff-equal {
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
.diff-collapse {
|
.diff-collapse {
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
border-top: 1px dashed var(--fs-border-color);
|
border-top: 1px dashed var(--color-border);
|
||||||
border-bottom: 1px dashed var(--fs-border-color);
|
border-bottom: 1px dashed var(--color-border);
|
||||||
padding-top: 0.2rem;
|
padding-top: 0.2rem;
|
||||||
padding-bottom: 0.2rem;
|
padding-bottom: 0.2rem;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -309,7 +309,7 @@ onMounted(loadVersions);
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 0.9rem 1.25rem;
|
padding: 0.9rem 1.25rem;
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.history-title {
|
.history-title {
|
||||||
@@ -322,11 +322,11 @@ onMounted(loadVersions);
|
|||||||
border: none;
|
border: none;
|
||||||
font-size: 1.25rem;
|
font-size: 1.25rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
padding: 0.1rem 0.3rem;
|
padding: 0.1rem 0.3rem;
|
||||||
}
|
}
|
||||||
.history-close:hover { color: var(--fs-text-primary); }
|
.history-close:hover { color: var(--color-text); }
|
||||||
|
|
||||||
.history-body {
|
.history-body {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
@@ -338,7 +338,7 @@ onMounted(loadVersions);
|
|||||||
.history-list {
|
.history-list {
|
||||||
width: 220px;
|
width: 220px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
border-right: 1px solid var(--fs-border-color);
|
border-right: 1px solid var(--color-border);
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -346,18 +346,18 @@ onMounted(loadVersions);
|
|||||||
padding: 0.6rem 0.9rem;
|
padding: 0.6rem 0.9rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border-left: 3px solid transparent;
|
border-left: 3px solid transparent;
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border);
|
||||||
}
|
}
|
||||||
.history-item:hover { background: var(--fs-surface-raised); }
|
.history-item:hover { background: var(--color-bg-secondary); }
|
||||||
.history-item.selected {
|
.history-item.selected {
|
||||||
border-left-color: var(--fs-accent);
|
border-left-color: var(--color-primary);
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.history-item-title {
|
.history-item-title {
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
@@ -365,7 +365,7 @@ onMounted(loadVersions);
|
|||||||
|
|
||||||
.history-item-date {
|
.history-item-date {
|
||||||
font-size: 0.75rem;
|
font-size: 0.75rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
margin-top: 0.15rem;
|
margin-top: 0.15rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -381,7 +381,7 @@ onMounted(loadVersions);
|
|||||||
.history-empty {
|
.history-empty {
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
.history-footer {
|
.history-footer {
|
||||||
@@ -390,7 +390,7 @@ onMounted(loadVersions);
|
|||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
padding: 0.75rem 1.25rem;
|
padding: 0.75rem 1.25rem;
|
||||||
border-top: 1px solid var(--fs-border-color);
|
border-top: 1px solid var(--color-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -403,12 +403,12 @@ onMounted(loadVersions);
|
|||||||
font-size: 0.85em;
|
font-size: 0.85em;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
.pin-badge-manual { color: var(--fs-accent); }
|
.pin-badge-manual { color: var(--color-primary, #6366f1); }
|
||||||
.pin-badge-auto { color: var(--fs-text-tertiary); }
|
.pin-badge-auto { color: var(--color-text-muted, rgba(255, 255, 255, 0.5)); }
|
||||||
|
|
||||||
.history-item-label {
|
.history-item-label {
|
||||||
font-size: 0.72rem;
|
font-size: 0.72rem;
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary, #6366f1);
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
margin-top: 0.15rem;
|
margin-top: 0.15rem;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@@ -419,7 +419,7 @@ onMounted(loadVersions);
|
|||||||
/* ── Pin controls above the diff ────────────────────────────────────────── */
|
/* ── Pin controls above the diff ────────────────────────────────────────── */
|
||||||
.version-pin-controls {
|
.version-pin-controls {
|
||||||
padding: 0.4rem 0.5rem 0.5rem;
|
padding: 0.4rem 0.5rem 0.5rem;
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border);
|
||||||
font-size: 0.82rem;
|
font-size: 0.82rem;
|
||||||
}
|
}
|
||||||
.pin-actions {
|
.pin-actions {
|
||||||
@@ -430,7 +430,7 @@ onMounted(loadVersions);
|
|||||||
}
|
}
|
||||||
.pin-state {
|
.pin-state {
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted, rgba(255, 255, 255, 0.6));
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@@ -442,13 +442,13 @@ onMounted(loadVersions);
|
|||||||
font-size: 0.78rem;
|
font-size: 0.78rem;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border, rgba(255, 255, 255, 0.12));
|
||||||
border-radius: 999px;
|
border-radius: 999px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.btn-pin:hover:not(:disabled), .btn-pin-edit:hover:not(:disabled) {
|
.btn-pin:hover:not(:disabled), .btn-pin-edit:hover:not(:disabled) {
|
||||||
background: rgba(99, 102, 241, 0.12);
|
background: rgba(99, 102, 241, 0.12);
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary, #6366f1);
|
||||||
}
|
}
|
||||||
.btn-unpin:hover:not(:disabled) {
|
.btn-unpin:hover:not(:disabled) {
|
||||||
background: rgba(239, 68, 68, 0.10);
|
background: rgba(239, 68, 68, 0.10);
|
||||||
@@ -463,27 +463,27 @@ onMounted(loadVersions);
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
padding: 0.3rem 0.5rem;
|
padding: 0.3rem 0.5rem;
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-input-bg, rgba(255, 255, 255, 0.03));
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border, rgba(255, 255, 255, 0.12));
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm, 4px);
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
.pin-label-input:focus {
|
.pin-label-input:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary, #6366f1);
|
||||||
}
|
}
|
||||||
.btn-pin-save, .btn-pin-cancel {
|
.btn-pin-save, .btn-pin-cancel {
|
||||||
padding: 0.3rem 0.7rem;
|
padding: 0.3rem 0.7rem;
|
||||||
font-size: 0.78rem;
|
font-size: 0.78rem;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border, rgba(255, 255, 255, 0.12));
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm, 4px);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.btn-pin-save:hover:not(:disabled) {
|
.btn-pin-save:hover:not(:disabled) {
|
||||||
background: rgba(99, 102, 241, 0.12);
|
background: rgba(99, 102, 241, 0.12);
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary, #6366f1);
|
||||||
}
|
}
|
||||||
.btn-pin-save:disabled, .btn-pin-cancel:disabled,
|
.btn-pin-save:disabled, .btn-pin-cancel:disabled,
|
||||||
.btn-pin:disabled, .btn-pin-edit:disabled, .btn-unpin:disabled {
|
.btn-pin:disabled, .btn-pin-edit:disabled, .btn-unpin:disabled {
|
||||||
|
|||||||
@@ -74,11 +74,11 @@ const markers: Record<DiffLine["type"], string> = {
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.iap {
|
.iap {
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
margin-bottom: 0.75rem;
|
margin-bottom: 0.75rem;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-bg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ── Header ── */
|
/* ── Header ── */
|
||||||
@@ -88,16 +88,16 @@ const markers: Record<DiffLine["type"], string> = {
|
|||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
padding: 0.45rem 0.75rem;
|
padding: 0.45rem 0.75rem;
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border);
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ── Streaming ── */
|
/* ── Streaming ── */
|
||||||
.iap-streaming {
|
.iap-streaming {
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary);
|
||||||
}
|
}
|
||||||
.iap-streaming .iap-header {
|
.iap-streaming .iap-header {
|
||||||
background: color-mix(in srgb, var(--fs-accent) 8%, var(--fs-surface-raised));
|
background: color-mix(in srgb, var(--color-primary) 8%, var(--color-bg-secondary));
|
||||||
}
|
}
|
||||||
|
|
||||||
.iap-pulse {
|
.iap-pulse {
|
||||||
@@ -105,7 +105,7 @@ const markers: Record<DiffLine["type"], string> = {
|
|||||||
width: 8px;
|
width: 8px;
|
||||||
height: 8px;
|
height: 8px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background: var(--fs-accent);
|
background: var(--color-primary);
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
animation: iap-pulse 1.2s ease-in-out infinite;
|
animation: iap-pulse 1.2s ease-in-out infinite;
|
||||||
}
|
}
|
||||||
@@ -117,7 +117,7 @@ const markers: Record<DiffLine["type"], string> = {
|
|||||||
.iap-label {
|
.iap-label {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
@@ -125,9 +125,9 @@ const markers: Record<DiffLine["type"], string> = {
|
|||||||
|
|
||||||
.iap-btn-cancel {
|
.iap-btn-cancel {
|
||||||
background: none;
|
background: none;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
padding: 0.15rem 0.5rem;
|
padding: 0.15rem 0.5rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
@@ -135,8 +135,8 @@ const markers: Record<DiffLine["type"], string> = {
|
|||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
.iap-btn-cancel:hover {
|
.iap-btn-cancel:hover {
|
||||||
border-color: var(--fs-error);
|
border-color: var(--color-danger, #e74c3c);
|
||||||
color: var(--fs-error);
|
color: var(--color-danger, #e74c3c);
|
||||||
}
|
}
|
||||||
|
|
||||||
.iap-stream-preview {
|
.iap-stream-preview {
|
||||||
@@ -150,29 +150,29 @@ const markers: Record<DiffLine["type"], string> = {
|
|||||||
.iap-waiting {
|
.iap-waiting {
|
||||||
padding: 0.75rem;
|
padding: 0.75rem;
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ── Review ── */
|
/* ── Review ── */
|
||||||
.iap-review-title {
|
.iap-review-title {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
}
|
}
|
||||||
|
|
||||||
.iap-btn-toggle {
|
.iap-btn-toggle {
|
||||||
background: none;
|
background: none;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
padding: 0.15rem 0.5rem;
|
padding: 0.15rem 0.5rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 0.78rem;
|
font-size: 0.78rem;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
}
|
}
|
||||||
.iap-btn-toggle:hover {
|
.iap-btn-toggle:hover {
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary);
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.iap-actions {
|
.iap-actions {
|
||||||
@@ -183,7 +183,7 @@ const markers: Record<DiffLine["type"], string> = {
|
|||||||
.iap-btn-accept,
|
.iap-btn-accept,
|
||||||
.iap-btn-reject {
|
.iap-btn-reject {
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
padding: 0.2rem 0.65rem;
|
padding: 0.2rem 0.65rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
@@ -191,19 +191,19 @@ const markers: Record<DiffLine["type"], string> = {
|
|||||||
font-weight: var(--fs-weight-medium);
|
font-weight: var(--fs-weight-medium);
|
||||||
}
|
}
|
||||||
.iap-btn-accept {
|
.iap-btn-accept {
|
||||||
background: var(--fs-success);
|
background: var(--color-success, #22c55e);
|
||||||
color: var(--fs-text-on-action);
|
color: var(--fs-text-on-action);
|
||||||
}
|
}
|
||||||
.iap-btn-accept:hover { opacity: 0.85; }
|
.iap-btn-accept:hover { opacity: 0.85; }
|
||||||
|
|
||||||
.iap-btn-reject {
|
.iap-btn-reject {
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card, var(--color-bg));
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
}
|
}
|
||||||
.iap-btn-reject:hover {
|
.iap-btn-reject:hover {
|
||||||
border-color: var(--fs-error);
|
border-color: var(--color-danger, #e74c3c);
|
||||||
color: var(--fs-error);
|
color: var(--color-danger, #e74c3c);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ── Diff ── */
|
/* ── Diff ── */
|
||||||
@@ -224,14 +224,14 @@ const markers: Record<DiffLine["type"], string> = {
|
|||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
.iap-diff-equal { color: var(--fs-text-tertiary); }
|
.iap-diff-equal { color: var(--color-text-muted); }
|
||||||
.iap-diff-delete {
|
.iap-diff-delete {
|
||||||
background: color-mix(in srgb, var(--fs-error) 10%, transparent);
|
background: color-mix(in srgb, var(--color-danger, #e74c3c) 10%, transparent);
|
||||||
color: var(--fs-error);
|
color: var(--color-danger, #e74c3c);
|
||||||
}
|
}
|
||||||
.iap-diff-insert {
|
.iap-diff-insert {
|
||||||
background: color-mix(in srgb, var(--fs-success) 10%, transparent);
|
background: color-mix(in srgb, var(--color-success, #22c55e) 10%, transparent);
|
||||||
color: var(--fs-success);
|
color: var(--color-success, #22c55e);
|
||||||
}
|
}
|
||||||
|
|
||||||
.iap-diff-marker {
|
.iap-diff-marker {
|
||||||
@@ -243,7 +243,7 @@ const markers: Record<DiffLine["type"], string> = {
|
|||||||
|
|
||||||
.iap-diff-empty {
|
.iap-diff-empty {
|
||||||
padding: 0.75rem;
|
padding: 0.75rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -111,9 +111,9 @@ const groups = [
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 2px;
|
gap: 2px;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-lg);
|
border-radius: var(--radius-md);
|
||||||
padding: 3px 4px;
|
padding: 3px 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -127,7 +127,7 @@ const groups = [
|
|||||||
display: block;
|
display: block;
|
||||||
width: 1px;
|
width: 1px;
|
||||||
height: 18px;
|
height: 18px;
|
||||||
background: var(--fs-border-color);
|
background: var(--color-border);
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
margin: 0 3px;
|
margin: 0 3px;
|
||||||
}
|
}
|
||||||
@@ -141,7 +141,7 @@ const groups = [
|
|||||||
border: none;
|
border: none;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
transition: background 0.12s, color 0.12s, box-shadow 0.12s;
|
transition: background 0.12s, color 0.12s, box-shadow 0.12s;
|
||||||
@@ -149,19 +149,19 @@ const groups = [
|
|||||||
}
|
}
|
||||||
|
|
||||||
.md-btn:hover {
|
.md-btn:hover {
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.md-btn.active {
|
.md-btn.active {
|
||||||
background: color-mix(in srgb, var(--fs-accent) 14%, transparent);
|
background: color-mix(in srgb, var(--color-primary) 14%, transparent);
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
box-shadow: 0 0 0 1px color-mix(in srgb, var(--fs-accent) 35%, transparent);
|
box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-primary) 35%, transparent);
|
||||||
}
|
}
|
||||||
|
|
||||||
.md-btn.active:hover {
|
.md-btn.active:hover {
|
||||||
background: color-mix(in srgb, var(--fs-accent) 22%, transparent);
|
background: color-mix(in srgb, var(--color-primary) 22%, transparent);
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-icon {
|
.btn-icon {
|
||||||
|
|||||||
@@ -66,10 +66,10 @@ function onChange(e: Event) {
|
|||||||
<style scoped>
|
<style scoped>
|
||||||
.milestone-select {
|
.milestone-select {
|
||||||
padding: 0.4rem 0.6rem;
|
padding: 0.4rem 0.6rem;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-bg);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
@@ -77,7 +77,7 @@ function onChange(e: Event) {
|
|||||||
}
|
}
|
||||||
.milestone-select:focus {
|
.milestone-select:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary);
|
||||||
}
|
}
|
||||||
.milestone-select:disabled {
|
.milestone-select:disabled {
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
|
|||||||
@@ -60,15 +60,15 @@ function goEdit() {
|
|||||||
.note-card {
|
.note-card {
|
||||||
display: block;
|
display: block;
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
border-radius: var(--fs-radius-lg);
|
border-radius: var(--radius-md);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 0 0 1px color-mix(in srgb, var(--fs-accent) 6%, transparent);
|
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(91, 74, 138, 0.06);
|
||||||
transition: box-shadow 0.2s, transform 0.18s ease;
|
transition: box-shadow 0.2s, transform 0.18s ease;
|
||||||
}
|
}
|
||||||
.note-card:hover {
|
.note-card:hover {
|
||||||
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10), 0 0 0 1px color-mix(in srgb, var(--fs-accent) 14.0%, transparent);
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10), 0 0 0 1px rgba(91, 74, 138, 0.14);
|
||||||
transform: translateY(-2px);
|
transform: translateY(-2px);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,18 +78,18 @@ function goEdit() {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.6rem;
|
gap: 0.6rem;
|
||||||
padding: 0.45rem 0.75rem;
|
padding: 0.45rem 0.75rem;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border);
|
||||||
transform: none !important;
|
transform: none !important;
|
||||||
}
|
}
|
||||||
.note-card.compact:first-child {
|
.note-card.compact:first-child {
|
||||||
border-top: 1px solid var(--fs-border-color);
|
border-top: 1px solid var(--color-border);
|
||||||
}
|
}
|
||||||
.note-card.compact:hover {
|
.note-card.compact:hover {
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
background: color-mix(in srgb, var(--fs-accent) 4%, transparent);
|
background: rgba(91, 74, 138, 0.04);
|
||||||
transform: none;
|
transform: none;
|
||||||
}
|
}
|
||||||
.note-title-compact {
|
.note-title-compact {
|
||||||
@@ -108,7 +108,7 @@ function goEdit() {
|
|||||||
}
|
}
|
||||||
.timestamp-compact {
|
.timestamp-compact {
|
||||||
font-size: 0.72rem;
|
font-size: 0.72rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
@@ -133,20 +133,20 @@ function goEdit() {
|
|||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
padding: 0.25rem 0.6rem;
|
padding: 0.25rem 0.6rem;
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: color 0.15s, border-color 0.15s;
|
transition: color 0.15s, border-color 0.15s;
|
||||||
}
|
}
|
||||||
.btn-edit:hover {
|
.btn-edit:hover {
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary);
|
||||||
}
|
}
|
||||||
.note-preview {
|
.note-preview {
|
||||||
margin: 0 0 0.5rem;
|
margin: 0 0 0.5rem;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
max-height: 7.5em;
|
max-height: 7.5em;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@@ -163,6 +163,6 @@ function goEdit() {
|
|||||||
.timestamp {
|
.timestamp {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
font-size: 0.75rem;
|
font-size: 0.75rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -60,11 +60,11 @@ onUnmounted(() => {
|
|||||||
|
|
||||||
.btn-bell {
|
.btn-bell {
|
||||||
background: none;
|
background: none;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
padding: 0.25rem 0.45rem;
|
padding: 0.25rem 0.45rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@@ -72,16 +72,16 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
.btn-bell:hover,
|
.btn-bell:hover,
|
||||||
.btn-bell.active {
|
.btn-bell.active {
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.bell-badge {
|
.bell-badge {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -5px;
|
top: -5px;
|
||||||
right: -5px;
|
right: -5px;
|
||||||
background: var(--fs-error);
|
background: var(--color-danger, #ef4444);
|
||||||
color: var(--fs-text-on-action);
|
color: var(--fs-text-on-action);
|
||||||
font-size: 0.6rem;
|
font-size: 0.6rem;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
|
|||||||
@@ -85,9 +85,9 @@ onMounted(() => store.fetchAll())
|
|||||||
width: 340px;
|
width: 340px;
|
||||||
max-height: 400px;
|
max-height: 400px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
background: var(--fs-surface-hover);
|
background: var(--color-surface);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-xl);
|
border-radius: var(--radius-lg);
|
||||||
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
|
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
|
||||||
z-index: 500;
|
z-index: 500;
|
||||||
}
|
}
|
||||||
@@ -97,10 +97,10 @@ onMounted(() => store.fetchAll())
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 0.75rem 1rem;
|
padding: 0.75rem 1rem;
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border);
|
||||||
position: sticky;
|
position: sticky;
|
||||||
top: 0;
|
top: 0;
|
||||||
background: var(--fs-surface-hover);
|
background: var(--color-surface);
|
||||||
}
|
}
|
||||||
|
|
||||||
.notif-panel-title {
|
.notif-panel-title {
|
||||||
@@ -114,12 +114,12 @@ onMounted(() => store.fetchAll())
|
|||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
gap: 0.6rem;
|
gap: 0.6rem;
|
||||||
padding: 0.75rem 1rem;
|
padding: 0.75rem 1rem;
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: background 0.1s;
|
transition: background 0.1s;
|
||||||
}
|
}
|
||||||
.notif-item:last-child { border-bottom: none; }
|
.notif-item:last-child { border-bottom: none; }
|
||||||
.notif-item:hover { background: var(--fs-surface-hover); }
|
.notif-item:hover { background: var(--color-hover); }
|
||||||
|
|
||||||
.notif-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 0.1rem; }
|
.notif-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 0.1rem; }
|
||||||
|
|
||||||
@@ -127,10 +127,10 @@ onMounted(() => store.fetchAll())
|
|||||||
.notif-msg {
|
.notif-msg {
|
||||||
margin: 0 0 0.2rem;
|
margin: 0 0 0.2rem;
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
}
|
}
|
||||||
.notif-time { font-size: 0.75rem; color: var(--fs-text-tertiary); }
|
.notif-time { font-size: 0.75rem; color: var(--color-muted); }
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -74,27 +74,27 @@ function goToPage(page: number) {
|
|||||||
}
|
}
|
||||||
.page-btn {
|
.page-btn {
|
||||||
padding: 0.35rem 0.7rem;
|
padding: 0.35rem 0.7rem;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
}
|
}
|
||||||
.page-btn:hover:not(:disabled) {
|
.page-btn:hover:not(:disabled) {
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
}
|
}
|
||||||
.page-btn:disabled {
|
.page-btn:disabled {
|
||||||
opacity: 0.4;
|
opacity: 0.4;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
}
|
}
|
||||||
.page-btn.active {
|
.page-btn.active {
|
||||||
background: var(--fs-accent);
|
background: var(--color-primary);
|
||||||
color: var(--fs-text-on-action);
|
color: var(--fs-text-on-action);
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary);
|
||||||
}
|
}
|
||||||
.ellipsis {
|
.ellipsis {
|
||||||
padding: 0 0.25rem;
|
padding: 0 0.25rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -33,15 +33,15 @@ const labels: Record<TaskPriority, string> = {
|
|||||||
letter-spacing: 0.025em;
|
letter-spacing: 0.025em;
|
||||||
}
|
}
|
||||||
.priority-low {
|
.priority-low {
|
||||||
background: var(--fs-priority-low-bg);
|
background: var(--color-priority-low-bg);
|
||||||
color: var(--fs-priority-low);
|
color: var(--color-priority-low);
|
||||||
}
|
}
|
||||||
.priority-medium {
|
.priority-medium {
|
||||||
background: var(--fs-priority-medium-bg);
|
background: var(--color-priority-medium-bg);
|
||||||
color: var(--fs-priority-medium);
|
color: var(--color-priority-medium);
|
||||||
}
|
}
|
||||||
.priority-high {
|
.priority-high {
|
||||||
background: var(--fs-priority-high-bg);
|
background: var(--color-priority-high-bg);
|
||||||
color: var(--fs-priority-high);
|
color: var(--color-priority-high);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,234 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
/**
|
|
||||||
* A project's own code, checked against the design system it is bound to (#2432).
|
|
||||||
*
|
|
||||||
* This is what the design surface is FOR: a project's recorded components
|
|
||||||
* measured against the sheet they are supposed to use. The check itself is not
|
|
||||||
* new — `check_snippets_against_system` has taken a project id since it was
|
|
||||||
* written, and the route has always read `?project_id=`. Nothing on this side
|
|
||||||
* ever passed one, so the capability shipped and stayed unreachable.
|
|
||||||
*
|
|
||||||
* The finding that matters most is the quiet one. `local_definitions` is a
|
|
||||||
* snippet minting its own custom property instead of reaching for the shared
|
|
||||||
* one — the codebase re-solving a solved problem, one component at a time.
|
|
||||||
* Nothing breaks, no test fails, and the duplication only becomes visible when
|
|
||||||
* someone changes the shared value and half the components don't move.
|
|
||||||
*
|
|
||||||
* SCOPE, and it is a limit rather than an omission: this reads RECORDED code —
|
|
||||||
* snippets — because that is the code Scribe holds. A repository's own sources
|
|
||||||
* are checked where they live, by that project's CI.
|
|
||||||
*/
|
|
||||||
import { onMounted, ref, watch } from "vue";
|
|
||||||
|
|
||||||
import { checkSnippets, type SnippetCheck } from "@/api/designSystems";
|
|
||||||
|
|
||||||
const props = defineProps<{ projectId: number; designSystemId: number | null }>();
|
|
||||||
|
|
||||||
const check = ref<SnippetCheck | null>(null);
|
|
||||||
const loading = ref(false);
|
|
||||||
const failed = ref(false);
|
|
||||||
|
|
||||||
async function run() {
|
|
||||||
check.value = null;
|
|
||||||
failed.value = false;
|
|
||||||
if (props.designSystemId === null) return;
|
|
||||||
loading.value = true;
|
|
||||||
try {
|
|
||||||
check.value = await checkSnippets(props.designSystemId, props.projectId);
|
|
||||||
} catch {
|
|
||||||
// Said out loud rather than rendered as an empty result. "Couldn't check"
|
|
||||||
// and "nothing to report" look identical if you let them, and that is how
|
|
||||||
// a check comes to sit dead without anyone noticing (#2419).
|
|
||||||
failed.value = true;
|
|
||||||
} finally {
|
|
||||||
loading.value = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(run);
|
|
||||||
watch(() => [props.projectId, props.designSystemId], run);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<div class="pdt">
|
|
||||||
<div v-if="designSystemId === null" class="pdt-note">
|
|
||||||
<strong>No design system for this project.</strong>
|
|
||||||
<p>
|
|
||||||
Bind one in the sidebar and this tab reports where the project's recorded
|
|
||||||
components disagree with it — references to tokens the system doesn't
|
|
||||||
have, literals it says to stop writing, and properties a component mints
|
|
||||||
for itself instead of reusing.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<p v-else-if="loading" class="pdt-muted">Checking this project's snippets…</p>
|
|
||||||
|
|
||||||
<div v-else-if="failed" class="pdt-note">
|
|
||||||
<strong>The check couldn't run.</strong>
|
|
||||||
<p>Nothing was compared — this is a failure, not a clean result.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<template v-else-if="check">
|
|
||||||
<p v-if="!check.checked" class="pdt-muted">
|
|
||||||
This project has no recorded snippets, so nothing was checked. Record the
|
|
||||||
components you reuse and they get measured against the sheet.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<p v-else-if="!check.findings.length" class="pdt-clean">
|
|
||||||
{{ check.checked }} snippet{{ check.checked === 1 ? "" : "s" }} checked —
|
|
||||||
every reference resolves, and none mints a property of its own.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<template v-else>
|
|
||||||
<p class="pdt-summary">
|
|
||||||
<strong>{{ check.findings.length }}</strong> of {{ check.checked }}
|
|
||||||
snippet{{ check.checked === 1 ? "" : "s" }} disagree with the sheet.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<ul class="pdt-list">
|
|
||||||
<li v-for="f in check.findings" :key="f.snippet_id" class="pdt-finding">
|
|
||||||
<router-link :to="`/snippets/${f.snippet_id}`" class="pdt-title">
|
|
||||||
{{ f.title || "Untitled snippet" }}
|
|
||||||
</router-link>
|
|
||||||
|
|
||||||
<!-- Renders as nothing at all: no error, no failing test, just an
|
|
||||||
element that quietly isn't styled. Leads for that reason. -->
|
|
||||||
<div v-if="f.unknown.length" class="pdt-row">
|
|
||||||
<span class="pdt-tag unknown">no such token</span>
|
|
||||||
<span class="pdt-detail">
|
|
||||||
<code v-for="name in f.unknown" :key="name">{{ name }}</code>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-if="f.local_definitions.length" class="pdt-row">
|
|
||||||
<span class="pdt-tag local">defines its own</span>
|
|
||||||
<span class="pdt-detail">
|
|
||||||
<code v-for="name in f.local_definitions" :key="name">{{ name }}</code>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-if="f.superseded_literals.length" class="pdt-row">
|
|
||||||
<span class="pdt-tag superseded">write the token</span>
|
|
||||||
<span class="pdt-detail">
|
|
||||||
<span v-for="s in f.superseded_literals" :key="s.literal" class="pdt-swap">
|
|
||||||
<code>{{ s.literal }}</code> → <code>{{ s.use_instead }}</code>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.pdt {
|
|
||||||
padding: var(--fs-space-2) 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pdt-note {
|
|
||||||
background: var(--fs-surface-hover);
|
|
||||||
border: 1px solid var(--fs-border-color);
|
|
||||||
border-left: 3px solid var(--fs-warning);
|
|
||||||
border-radius: var(--fs-radius-sm);
|
|
||||||
padding: var(--fs-space-3) var(--fs-space-4);
|
|
||||||
}
|
|
||||||
|
|
||||||
.pdt-note p {
|
|
||||||
margin: var(--fs-space-2) 0 0;
|
|
||||||
color: var(--fs-text-secondary);
|
|
||||||
font-size: var(--fs-size-body-sm);
|
|
||||||
line-height: var(--fs-leading-body);
|
|
||||||
max-width: 70ch;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pdt-muted,
|
|
||||||
.pdt-clean,
|
|
||||||
.pdt-summary {
|
|
||||||
color: var(--fs-text-tertiary);
|
|
||||||
font-size: var(--fs-size-body-sm);
|
|
||||||
margin: 0 0 var(--fs-space-3);
|
|
||||||
max-width: 70ch;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pdt-clean {
|
|
||||||
color: var(--fs-status-done);
|
|
||||||
}
|
|
||||||
|
|
||||||
.pdt-summary {
|
|
||||||
color: var(--fs-text-secondary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.pdt-list {
|
|
||||||
list-style: none;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: var(--fs-space-3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.pdt-finding {
|
|
||||||
border: 1px solid var(--fs-border-color);
|
|
||||||
border-radius: var(--fs-radius-md);
|
|
||||||
padding: var(--fs-space-3);
|
|
||||||
min-width: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pdt-title {
|
|
||||||
display: block;
|
|
||||||
font-weight: var(--fs-weight-medium);
|
|
||||||
color: var(--fs-text-primary);
|
|
||||||
text-decoration: none;
|
|
||||||
margin-bottom: var(--fs-space-2);
|
|
||||||
}
|
|
||||||
.pdt-title:hover { color: var(--fs-accent); }
|
|
||||||
|
|
||||||
.pdt-row {
|
|
||||||
display: flex;
|
|
||||||
align-items: baseline;
|
|
||||||
gap: var(--fs-space-2);
|
|
||||||
flex-wrap: wrap;
|
|
||||||
padding: 0.15rem 0;
|
|
||||||
min-width: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pdt-tag {
|
|
||||||
font-size: var(--fs-size-tiny);
|
|
||||||
text-transform: uppercase;
|
|
||||||
letter-spacing: var(--fs-tracking-tiny);
|
|
||||||
padding: 0.1rem 0.45rem;
|
|
||||||
border-radius: var(--fs-radius-sm);
|
|
||||||
white-space: nowrap;
|
|
||||||
flex: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pdt-tag.unknown {
|
|
||||||
background: var(--fs-priority-high-bg);
|
|
||||||
color: var(--fs-priority-high);
|
|
||||||
}
|
|
||||||
|
|
||||||
.pdt-tag.local {
|
|
||||||
background: var(--fs-priority-medium-bg);
|
|
||||||
color: var(--fs-priority-medium);
|
|
||||||
}
|
|
||||||
|
|
||||||
.pdt-tag.superseded {
|
|
||||||
background: var(--fs-surface-hover);
|
|
||||||
color: var(--fs-text-tertiary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.pdt-detail {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
gap: var(--fs-space-2);
|
|
||||||
font-size: var(--fs-size-code);
|
|
||||||
color: var(--fs-text-secondary);
|
|
||||||
min-width: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pdt-swap {
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -51,10 +51,10 @@ function onChange(e: Event) {
|
|||||||
<style scoped>
|
<style scoped>
|
||||||
.project-selector {
|
.project-selector {
|
||||||
padding: 0.4rem 0.5rem;
|
padding: 0.4rem 0.5rem;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-input-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -62,6 +62,6 @@ function onChange(e: Event) {
|
|||||||
}
|
}
|
||||||
.project-selector:focus {
|
.project-selector:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -153,19 +153,19 @@ const calendarDayMax = computed(() =>
|
|||||||
}
|
}
|
||||||
.rec-label {
|
.rec-label {
|
||||||
font-size: 0.78rem;
|
font-size: 0.78rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
min-width: 2.5rem;
|
min-width: 2.5rem;
|
||||||
}
|
}
|
||||||
.rec-num-input {
|
.rec-num-input {
|
||||||
width: 4rem;
|
width: 4rem;
|
||||||
padding: 0.25rem 0.4rem;
|
padding: 0.25rem 0.4rem;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-input-border, var(--color-border));
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-bg);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
}
|
}
|
||||||
.rec-num-input:focus { outline: none; border-color: var(--fs-accent); }
|
.rec-num-input:focus { outline: none; border-color: var(--color-primary); }
|
||||||
.rec-unit { min-width: 6rem; }
|
.rec-unit { min-width: 6rem; }
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -28,14 +28,14 @@ defineExpose({ focus: () => inputRef.value?.focus() });
|
|||||||
.search-input {
|
.search-input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0.5rem 0.75rem;
|
padding: 0.5rem 0.75rem;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-input-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
}
|
}
|
||||||
.search-input::placeholder {
|
.search-input::placeholder {
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -206,9 +206,9 @@ onMounted(async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.share-dialog {
|
.share-dialog {
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-xl);
|
border-radius: var(--radius-lg);
|
||||||
width: 480px;
|
width: 480px;
|
||||||
max-width: 95vw;
|
max-width: 95vw;
|
||||||
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
|
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
|
||||||
@@ -220,7 +220,7 @@ onMounted(async () => {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 1.25rem 1.5rem;
|
padding: 1.25rem 1.5rem;
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.share-title {
|
.share-title {
|
||||||
@@ -228,7 +228,7 @@ onMounted(async () => {
|
|||||||
font-size: 1.1rem;
|
font-size: 1.1rem;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -240,17 +240,17 @@ onMounted(async () => {
|
|||||||
|
|
||||||
.share-tab {
|
.share-tab {
|
||||||
background: none;
|
background: none;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
padding: 0.3rem 0.8rem;
|
padding: 0.3rem 0.8rem;
|
||||||
font-size: 0.82rem;
|
font-size: 0.82rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
transition: all 0.15s;
|
transition: all 0.15s;
|
||||||
}
|
}
|
||||||
.share-tab.active {
|
.share-tab.active {
|
||||||
background: var(--fs-accent);
|
background: var(--color-primary);
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary);
|
||||||
color: var(--fs-text-on-action);
|
color: var(--fs-text-on-action);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -269,23 +269,23 @@ onMounted(async () => {
|
|||||||
.share-input {
|
.share-input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0.45rem 0.7rem;
|
padding: 0.45rem 0.7rem;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
outline: none;
|
outline: none;
|
||||||
transition: border-color 0.15s;
|
transition: border-color 0.15s;
|
||||||
}
|
}
|
||||||
.share-input:focus { border-color: var(--fs-accent); }
|
.share-input:focus { border-color: var(--color-primary); }
|
||||||
|
|
||||||
.user-results {
|
.user-results {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 100%;
|
top: 100%;
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
@@ -304,24 +304,24 @@ onMounted(async () => {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: background 0.1s;
|
transition: background 0.1s;
|
||||||
}
|
}
|
||||||
.user-result-item:hover { background: var(--fs-surface-raised); }
|
.user-result-item:hover { background: var(--color-bg-secondary); }
|
||||||
|
|
||||||
.user-result-name { font-weight: 600; font-size: 0.88rem; }
|
.user-result-name { font-weight: 600; font-size: 0.88rem; }
|
||||||
.user-result-email { color: var(--fs-text-tertiary); font-size: 0.8rem; }
|
.user-result-email { color: var(--color-text-muted); font-size: 0.8rem; }
|
||||||
|
|
||||||
.perm-select {
|
.perm-select {
|
||||||
padding: 0.45rem 0.5rem;
|
padding: 0.45rem 0.5rem;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-add-share {
|
.btn-add-share {
|
||||||
padding: 0.45rem 1rem;
|
padding: 0.45rem 1rem;
|
||||||
background: var(--fs-gradient-cta);
|
background: var(--gradient-cta);
|
||||||
color: var(--fs-text-on-action);
|
color: var(--fs-text-on-action);
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
@@ -342,7 +342,7 @@ onMounted(async () => {
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.06em;
|
letter-spacing: 0.06em;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
margin: 0 0 0.5rem;
|
margin: 0 0 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -361,7 +361,7 @@ onMounted(async () => {
|
|||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
padding: 0.5rem 0.75rem;
|
padding: 0.5rem 0.75rem;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.share-target-icon { font-size: 1rem; flex-shrink: 0; }
|
.share-target-icon { font-size: 1rem; flex-shrink: 0; }
|
||||||
@@ -369,10 +369,10 @@ onMounted(async () => {
|
|||||||
|
|
||||||
.perm-select-inline {
|
.perm-select-inline {
|
||||||
padding: 0.25rem 0.4rem;
|
padding: 0.25rem 0.4rem;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,212 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
/**
|
|
||||||
* The starter token ROLES offered when a design system is created (#2349).
|
|
||||||
*
|
|
||||||
* WHY THIS IS A COMPONENT
|
|
||||||
* DesignSystemsView has two creation forms — the empty state and the one inside
|
|
||||||
* the body — because the empty state is a sibling branch, not a parent. Putting
|
|
||||||
* the checklist inline would make it the third thing in this codebase defined
|
|
||||||
* twice and free to drift, which is what the whole button migration was about.
|
|
||||||
*
|
|
||||||
* WHAT IT OFFERS
|
|
||||||
* Names and purposes, never values. A role is a question the operator answers
|
|
||||||
* with their own palette; a default palette would be one install's taste
|
|
||||||
* shipped as product (rule #115). Every group is individually skippable —
|
|
||||||
* an operator who wants three tokens should get three.
|
|
||||||
*
|
|
||||||
* All groups are checked by default. That default lives HERE rather than in the
|
|
||||||
* service, because the service must never seed rows into a system whose caller
|
|
||||||
* did not ask; a UI default is visible and reversible before the click.
|
|
||||||
*/
|
|
||||||
import { onMounted, ref } from "vue";
|
|
||||||
import { listStarterRoleGroups, type StarterRoleGroup } from "@/api/designSystems";
|
|
||||||
|
|
||||||
// props + emit rather than defineModel, matching TagInput and the rest of
|
|
||||||
// components/ — being the only file using a different binding idiom costs more
|
|
||||||
// than the few lines it saves.
|
|
||||||
const props = defineProps<{ selected: string[]; prefix: string }>();
|
|
||||||
const emit = defineEmits<{
|
|
||||||
"update:selected": [value: string[]];
|
|
||||||
"update:prefix": [value: string];
|
|
||||||
}>();
|
|
||||||
|
|
||||||
const groups = ref<StarterRoleGroup[]>([]);
|
|
||||||
const defaultPrefix = ref("--ds-");
|
|
||||||
const loading = ref(false);
|
|
||||||
const failed = ref(false);
|
|
||||||
|
|
||||||
onMounted(async () => {
|
|
||||||
loading.value = true;
|
|
||||||
try {
|
|
||||||
const data = await listStarterRoleGroups();
|
|
||||||
groups.value = data.groups;
|
|
||||||
defaultPrefix.value = data.default_prefix;
|
|
||||||
if (!props.prefix) emit("update:prefix", data.default_prefix);
|
|
||||||
// Everything on by default — see the note above.
|
|
||||||
if (!props.selected.length) {
|
|
||||||
emit("update:selected", data.groups.map((g) => g.group));
|
|
||||||
}
|
|
||||||
} catch {
|
|
||||||
// A creation form must still work when this fails. Roles are an
|
|
||||||
// accelerator, not a prerequisite: the operator can add tokens by hand.
|
|
||||||
failed.value = true;
|
|
||||||
} finally {
|
|
||||||
loading.value = false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
function toggle(group: string) {
|
|
||||||
emit(
|
|
||||||
"update:selected",
|
|
||||||
props.selected.includes(group)
|
|
||||||
? props.selected.filter((g) => g !== group)
|
|
||||||
: [...props.selected, group],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const totalTokens = () =>
|
|
||||||
groups.value
|
|
||||||
.filter((g) => props.selected.includes(g.group))
|
|
||||||
.reduce((n, g) => n + g.token_count, 0);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<div v-if="loading" class="srp-note">Loading starter roles…</div>
|
|
||||||
|
|
||||||
<!-- Failure is not fatal and should not read as one. -->
|
|
||||||
<div v-else-if="failed" class="srp-note">
|
|
||||||
Starter roles unavailable — you can add tokens by hand after creating.
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<fieldset v-else-if="groups.length" class="srp">
|
|
||||||
<legend class="srp-legend">Start with these token roles</legend>
|
|
||||||
<p class="srp-intro">
|
|
||||||
Named now, valued later. A role you haven't filled in shows as
|
|
||||||
<em>to be decided</em>; a role that doesn't exist is what gets written as a
|
|
||||||
literal instead. Uncheck anything this system won't have.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div class="srp-grid">
|
|
||||||
<label v-for="g in groups" :key="g.group" class="srp-item">
|
|
||||||
<input
|
|
||||||
type="checkbox"
|
|
||||||
:checked="props.selected.includes(g.group)"
|
|
||||||
@change="toggle(g.group)"
|
|
||||||
/>
|
|
||||||
<span class="srp-name">{{ g.group }}</span>
|
|
||||||
<span class="srp-count">{{ g.token_count }}</span>
|
|
||||||
<span class="srp-desc">{{ g.description }}</span>
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="srp-footer">
|
|
||||||
<label class="srp-prefix">
|
|
||||||
<span>Prefix</span>
|
|
||||||
<input
|
|
||||||
:value="props.prefix" class="input srp-prefix-input" type="text"
|
|
||||||
:placeholder="defaultPrefix"
|
|
||||||
@input="emit('update:prefix', ($event.target as HTMLInputElement).value)"
|
|
||||||
/>
|
|
||||||
</label>
|
|
||||||
<span class="srp-total">
|
|
||||||
{{ totalTokens() }} {{ totalTokens() === 1 ? "role" : "roles" }}, no values
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.srp {
|
|
||||||
border: var(--fs-border);
|
|
||||||
border-radius: var(--fs-radius-md);
|
|
||||||
padding: var(--fs-space-4);
|
|
||||||
margin: 0 0 var(--fs-space-4);
|
|
||||||
min-width: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.srp-legend {
|
|
||||||
font-size: var(--fs-size-label);
|
|
||||||
font-weight: var(--fs-weight-medium);
|
|
||||||
color: var(--fs-text-primary);
|
|
||||||
padding: 0 var(--fs-space-2);
|
|
||||||
}
|
|
||||||
|
|
||||||
.srp-intro,
|
|
||||||
.srp-note {
|
|
||||||
margin: 0 0 var(--fs-space-3);
|
|
||||||
font-size: var(--fs-size-body-sm);
|
|
||||||
color: var(--fs-text-secondary);
|
|
||||||
line-height: var(--fs-leading-body);
|
|
||||||
max-width: 62ch;
|
|
||||||
}
|
|
||||||
|
|
||||||
.srp-note {
|
|
||||||
margin-bottom: var(--fs-space-4);
|
|
||||||
}
|
|
||||||
|
|
||||||
.srp-grid {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
|
|
||||||
gap: var(--fs-space-2);
|
|
||||||
}
|
|
||||||
|
|
||||||
.srp-item {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: auto auto 1fr;
|
|
||||||
align-items: baseline;
|
|
||||||
gap: var(--fs-space-2);
|
|
||||||
padding: var(--fs-space-1) var(--fs-space-2);
|
|
||||||
border-radius: var(--fs-radius-sm);
|
|
||||||
cursor: pointer;
|
|
||||||
min-width: 0;
|
|
||||||
}
|
|
||||||
.srp-item:hover { background: var(--fs-surface-hover); }
|
|
||||||
|
|
||||||
.srp-name {
|
|
||||||
font-size: var(--fs-size-body-sm);
|
|
||||||
color: var(--fs-text-primary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.srp-count {
|
|
||||||
font-size: var(--fs-size-tiny);
|
|
||||||
color: var(--fs-text-tertiary);
|
|
||||||
font-variant-numeric: tabular-nums;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* The description is the useful part on a wide card and the first thing worth
|
|
||||||
dropping on a narrow one — the group name alone still identifies the row. */
|
|
||||||
.srp-desc {
|
|
||||||
grid-column: 1 / -1;
|
|
||||||
font-size: var(--fs-size-tiny);
|
|
||||||
color: var(--fs-text-tertiary);
|
|
||||||
line-height: var(--fs-leading-body);
|
|
||||||
}
|
|
||||||
|
|
||||||
.srp-footer {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
gap: var(--fs-space-3);
|
|
||||||
margin-top: var(--fs-space-4);
|
|
||||||
}
|
|
||||||
|
|
||||||
.srp-prefix {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: var(--fs-space-2);
|
|
||||||
font-size: var(--fs-size-body-sm);
|
|
||||||
color: var(--fs-text-secondary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.srp-prefix-input {
|
|
||||||
width: 8rem;
|
|
||||||
font-family: var(--fs-font-mono);
|
|
||||||
font-size: var(--fs-size-code);
|
|
||||||
}
|
|
||||||
|
|
||||||
.srp-total {
|
|
||||||
font-size: var(--fs-size-tiny);
|
|
||||||
color: var(--fs-text-tertiary);
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -38,20 +38,20 @@ const labels: Record<TaskStatus, string> = {
|
|||||||
letter-spacing: 0.025em;
|
letter-spacing: 0.025em;
|
||||||
}
|
}
|
||||||
.status-todo {
|
.status-todo {
|
||||||
background: color-mix(in srgb, var(--fs-status-todo-bg) 78%, var(--fs-status-todo) 22%);
|
background: color-mix(in srgb, var(--color-status-todo-bg) 78%, var(--color-status-todo) 22%);
|
||||||
color: color-mix(in srgb, var(--fs-status-todo) 85%, #000 15%);
|
color: color-mix(in srgb, var(--color-status-todo) 85%, #000 15%);
|
||||||
}
|
}
|
||||||
.status-in_progress {
|
.status-in_progress {
|
||||||
background: color-mix(in srgb, var(--fs-status-in-progress-bg) 78%, var(--fs-status-in-progress) 22%);
|
background: color-mix(in srgb, var(--color-status-in-progress-bg) 78%, var(--color-status-in-progress) 22%);
|
||||||
color: color-mix(in srgb, var(--fs-status-in-progress) 85%, #000 15%);
|
color: color-mix(in srgb, var(--color-status-in-progress) 85%, #000 15%);
|
||||||
}
|
}
|
||||||
.status-done {
|
.status-done {
|
||||||
background: color-mix(in srgb, var(--fs-status-done-bg) 78%, var(--fs-status-done) 22%);
|
background: color-mix(in srgb, var(--color-status-done-bg) 78%, var(--color-status-done) 22%);
|
||||||
color: color-mix(in srgb, var(--fs-status-done) 85%, #000 15%);
|
color: color-mix(in srgb, var(--color-status-done) 85%, #000 15%);
|
||||||
}
|
}
|
||||||
.status-cancelled {
|
.status-cancelled {
|
||||||
background: color-mix(in srgb, var(--fs-surface-raised) 78%, var(--fs-text-tertiary) 22%);
|
background: color-mix(in srgb, var(--color-bg-secondary) 78%, var(--color-text-muted) 22%);
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
.clickable {
|
.clickable {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|||||||
@@ -70,9 +70,9 @@ defineExpose({ onKeyDown });
|
|||||||
list-style: none;
|
list-style: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
box-shadow: 0 4px 12px var(--color-shadow);
|
box-shadow: 0 4px 12px var(--color-shadow);
|
||||||
max-height: 200px;
|
max-height: 200px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
@@ -85,6 +85,6 @@ defineExpose({ onKeyDown });
|
|||||||
}
|
}
|
||||||
.ac-item:hover,
|
.ac-item:hover,
|
||||||
.ac-item.active {
|
.ac-item.active {
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -253,7 +253,7 @@ async function confirmDelete() {
|
|||||||
<template v-else>
|
<template v-else>
|
||||||
<span
|
<span
|
||||||
class="system-swatch"
|
class="system-swatch"
|
||||||
:style="{ background: system.color || 'var(--fs-text-tertiary)' }"
|
:style="{ background: system.color || 'var(--color-text-muted)' }"
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
></span>
|
></span>
|
||||||
<div class="system-body">
|
<div class="system-body">
|
||||||
@@ -325,41 +325,41 @@ async function confirmDelete() {
|
|||||||
|
|
||||||
/* ── Open issues ──────────────────────────────────────────────── */
|
/* ── Open issues ──────────────────────────────────────────────── */
|
||||||
.open-issues { display: flex; flex-direction: column; gap: 0.35rem; }
|
.open-issues { display: flex; flex-direction: column; gap: 0.35rem; }
|
||||||
.open-issues-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--fs-text-tertiary); }
|
.open-issues-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-muted); }
|
||||||
.issue-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.2rem; }
|
.issue-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.2rem; }
|
||||||
.issue-link { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.5rem; border-radius: var(--fs-radius-sm); text-decoration: none; color: var(--fs-text-primary); font-size: 0.85rem; }
|
.issue-link { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.5rem; border-radius: var(--radius-sm); text-decoration: none; color: var(--color-text); font-size: 0.85rem; }
|
||||||
.issue-link:hover { background: var(--fs-surface-raised); }
|
.issue-link:hover { background: var(--color-bg-secondary); }
|
||||||
.issue-mark { color: var(--fs-text-tertiary); flex-shrink: 0; }
|
.issue-mark { color: var(--color-text-muted); flex-shrink: 0; }
|
||||||
.issue-mark.imk-in_progress { color: var(--fs-accent); }
|
.issue-mark.imk-in_progress { color: var(--color-primary); }
|
||||||
.issue-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
.issue-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||||
.issue-systems { display: flex; gap: 0.25rem; flex-shrink: 0; flex-wrap: wrap; }
|
.issue-systems { display: flex; gap: 0.25rem; flex-shrink: 0; flex-wrap: wrap; }
|
||||||
.issue-sys-chip { font-size: 0.66rem; color: var(--fs-text-secondary); background: var(--fs-surface-raised); border-radius: 999px; padding: 0.05rem 0.4rem; }
|
.issue-sys-chip { font-size: 0.66rem; color: var(--color-text-secondary); background: var(--color-bg-secondary); border-radius: 999px; padding: 0.05rem 0.4rem; }
|
||||||
|
|
||||||
/* ── Toolbar ──────────────────────────────────────────────────── */
|
/* ── Toolbar ──────────────────────────────────────────────────── */
|
||||||
.systems-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
|
.systems-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
|
||||||
.btn-add-system {
|
.btn-add-system {
|
||||||
background: none;
|
background: none;
|
||||||
border: 1px dashed var(--fs-border-color);
|
border: 1px dashed var(--color-border);
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
padding: 0.28rem 0.65rem;
|
padding: 0.28rem 0.65rem;
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 0.78rem;
|
font-size: 0.78rem;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
}
|
}
|
||||||
.btn-add-system:hover { border-color: var(--fs-accent); color: var(--fs-accent); }
|
.btn-add-system:hover { border-color: var(--color-primary); color: var(--color-primary); }
|
||||||
.btn-add-system:focus-visible { outline: none; border-color: var(--fs-accent); color: var(--fs-accent); }
|
.btn-add-system:focus-visible { outline: none; border-color: var(--color-primary); color: var(--color-primary); }
|
||||||
|
|
||||||
.archived-toggle {
|
.archived-toggle {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.4rem;
|
gap: 0.4rem;
|
||||||
font-size: 0.78rem;
|
font-size: 0.78rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
.archived-checkbox { accent-color: var(--fs-accent); cursor: pointer; }
|
.archived-checkbox { accent-color: var(--color-primary); cursor: pointer; }
|
||||||
|
|
||||||
/* ── Create / edit form ───────────────────────────────────────── */
|
/* ── Create / edit form ───────────────────────────────────────── */
|
||||||
.system-form {
|
.system-form {
|
||||||
@@ -367,61 +367,26 @@ async function confirmDelete() {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
padding: 0.75rem;
|
padding: 0.75rem;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-lg);
|
border-radius: var(--radius-md);
|
||||||
}
|
}
|
||||||
.system-form--inline { padding: 0; background: none; border: none; flex: 1; }
|
.system-form--inline { padding: 0; background: none; border: none; flex: 1; }
|
||||||
.system-input, .system-textarea {
|
.system-input, .system-textarea {
|
||||||
padding: 0.4rem 0.6rem;
|
padding: 0.4rem 0.6rem;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-bg);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
.system-input:focus, .system-textarea:focus { outline: none; border-color: var(--fs-accent); }
|
.system-input:focus, .system-textarea:focus { outline: none; border-color: var(--color-primary); }
|
||||||
.system-textarea { resize: vertical; }
|
.system-textarea { resize: vertical; }
|
||||||
|
|
||||||
.system-form-actions { display: flex; gap: 0.4rem; }
|
.system-form-actions { display: flex; gap: 0.4rem; }
|
||||||
|
|
||||||
/* RESTORED (#2444). Both lost their base rule to a CSS sweep; only the
|
|
||||||
`--archived` modifier and the `:hover .system-actions` reveal survived.
|
|
||||||
The card WAS a flex row and every child still says so — `.system-swatch`
|
|
||||||
and `.system-actions` are `flex-shrink: 0`, `.system-body` is `flex: 1`,
|
|
||||||
and `.system-form--inline` is `flex: 1`. `align-items: flex-start` is why
|
|
||||||
the swatch carries `margin-top: 0.3rem`: it is nudged onto the first line
|
|
||||||
of text rather than centred against the whole card.
|
|
||||||
|
|
||||||
The list had no rule at all, so it rendered with browser bullets and
|
|
||||||
indent — invisible to the dangling-style check, which can only see a class
|
|
||||||
that is PARTLY styled. A class with no rules anywhere looks exactly like a
|
|
||||||
semantic-only hook.
|
|
||||||
|
|
||||||
Surface values match `.system-form` above, which is the same card shape in
|
|
||||||
this file and the reason they can be recovered rather than guessed. */
|
|
||||||
.systems-list {
|
|
||||||
list-style: none;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 0.4rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.system-card {
|
|
||||||
display: flex;
|
|
||||||
align-items: flex-start;
|
|
||||||
gap: 0.6rem;
|
|
||||||
padding: 0.6rem 0.75rem;
|
|
||||||
background: var(--fs-surface-raised);
|
|
||||||
border: 1px solid var(--fs-border-color);
|
|
||||||
border-radius: var(--fs-radius-lg);
|
|
||||||
}
|
|
||||||
|
|
||||||
.system-card--archived { opacity: 0.6; }
|
.system-card--archived { opacity: 0.6; }
|
||||||
|
|
||||||
.system-swatch {
|
.system-swatch {
|
||||||
@@ -433,13 +398,13 @@ async function confirmDelete() {
|
|||||||
}
|
}
|
||||||
.system-body { flex: 1; min-width: 0; }
|
.system-body { flex: 1; min-width: 0; }
|
||||||
.system-name-row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
|
.system-name-row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
|
||||||
.system-name { font-weight: 500; color: var(--fs-text-primary); word-break: break-word; }
|
.system-name { font-weight: 500; color: var(--color-text); word-break: break-word; }
|
||||||
.issue-badge {
|
.issue-badge {
|
||||||
font-size: 0.7rem;
|
font-size: 0.7rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
background: color-mix(in srgb, var(--fs-accent) 12%, transparent);
|
background: color-mix(in srgb, var(--color-primary) 12%, transparent);
|
||||||
border: 1px solid color-mix(in srgb, var(--fs-accent) 30%, transparent);
|
border: 1px solid color-mix(in srgb, var(--color-primary) 30%, transparent);
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
border-radius: 999px;
|
border-radius: 999px;
|
||||||
padding: 0.05rem 0.45rem;
|
padding: 0.05rem 0.45rem;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
@@ -449,15 +414,15 @@ async function confirmDelete() {
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.04em;
|
letter-spacing: 0.04em;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
background: color-mix(in srgb, var(--fs-text-tertiary) 12%, transparent);
|
background: color-mix(in srgb, var(--color-text-muted) 12%, transparent);
|
||||||
border-radius: 999px;
|
border-radius: 999px;
|
||||||
padding: 0.05rem 0.45rem;
|
padding: 0.05rem 0.45rem;
|
||||||
}
|
}
|
||||||
.system-description {
|
.system-description {
|
||||||
margin: 0.25rem 0 0;
|
margin: 0.25rem 0 0;
|
||||||
font-size: 0.82rem;
|
font-size: 0.82rem;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
}
|
}
|
||||||
@@ -472,15 +437,15 @@ async function confirmDelete() {
|
|||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
width: 26px;
|
width: 26px;
|
||||||
height: 26px;
|
height: 26px;
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
transition: background 0.12s, color 0.12s;
|
transition: background 0.12s, color 0.12s;
|
||||||
}
|
}
|
||||||
.action-btn:hover { background: var(--fs-surface-raised); color: var(--fs-text-primary); }
|
.action-btn:hover { background: var(--color-bg-secondary); color: var(--color-text); }
|
||||||
.action-btn:focus-visible { outline: 2px solid var(--fs-accent); outline-offset: 1px; opacity: 1; }
|
.action-btn:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 1px; opacity: 1; }
|
||||||
.action-delete:hover { color: var(--fs-error); }
|
.action-delete:hover { color: var(--color-danger, #e74c3c); }
|
||||||
|
|
||||||
/* ── Empty ────────────────────────────────────────────────────── */
|
/* ── Empty ────────────────────────────────────────────────────── */
|
||||||
.systems-empty {
|
.systems-empty {
|
||||||
@@ -490,25 +455,25 @@ async function confirmDelete() {
|
|||||||
gap: 0.4rem;
|
gap: 0.4rem;
|
||||||
padding: 2rem 1rem;
|
padding: 2rem 1rem;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
border: 1px dashed var(--fs-border-color);
|
border: 1px dashed var(--color-border);
|
||||||
border-radius: var(--fs-radius-lg);
|
border-radius: var(--radius-md);
|
||||||
}
|
}
|
||||||
.empty-title { margin: 0; font-weight: 500; color: var(--fs-text-primary); }
|
.empty-title { margin: 0; font-weight: 500; color: var(--color-text); }
|
||||||
.empty-sub { margin: 0 0 0.5rem; font-size: 0.82rem; color: var(--fs-text-tertiary); max-width: 32ch; }
|
.empty-sub { margin: 0 0 0.5rem; font-size: 0.82rem; color: var(--color-text-muted); max-width: 32ch; }
|
||||||
|
|
||||||
.error-msg { color: var(--fs-error); font-size: 0.9rem; }
|
.error-msg { color: var(--color-danger); font-size: 0.9rem; }
|
||||||
|
|
||||||
/* ── Skeleton ─────────────────────────────────────────────────── */
|
/* ── Skeleton ─────────────────────────────────────────────────── */
|
||||||
@keyframes skel-shine { to { background-position: 200% center; } }
|
@keyframes skel-shine { to { background-position: 200% center; } }
|
||||||
.systems-skeleton { display: flex; flex-direction: column; gap: 0.4rem; }
|
.systems-skeleton { display: flex; flex-direction: column; gap: 0.4rem; }
|
||||||
.skel-row {
|
.skel-row {
|
||||||
height: 3rem;
|
height: 3rem;
|
||||||
border-radius: var(--fs-radius-lg);
|
border-radius: var(--radius-md);
|
||||||
background: linear-gradient(
|
background: linear-gradient(
|
||||||
90deg,
|
90deg,
|
||||||
var(--fs-surface-raised) 25%,
|
var(--color-bg-secondary) 25%,
|
||||||
color-mix(in srgb, var(--fs-text-tertiary) 16%, var(--fs-surface-raised)) 50%,
|
color-mix(in srgb, var(--color-text-muted) 16%, var(--color-bg-secondary)) 50%,
|
||||||
var(--fs-surface-raised) 75%
|
var(--color-bg-secondary) 75%
|
||||||
);
|
);
|
||||||
background-size: 200% 100%;
|
background-size: 200% 100%;
|
||||||
animation: skel-shine 1.5s ease infinite;
|
animation: skel-shine 1.5s ease infinite;
|
||||||
@@ -518,33 +483,33 @@ async function confirmDelete() {
|
|||||||
/* ── Modal ────────────────────────────────────────────────────── */
|
/* ── Modal ────────────────────────────────────────────────────── */
|
||||||
.modal-overlay {
|
.modal-overlay {
|
||||||
position: fixed; inset: 0;
|
position: fixed; inset: 0;
|
||||||
background: var(--fs-overlay);
|
background: var(--color-overlay, rgba(0,0,0,0.45));
|
||||||
display: flex; align-items: center; justify-content: center;
|
display: flex; align-items: center; justify-content: center;
|
||||||
z-index: 200;
|
z-index: 200;
|
||||||
}
|
}
|
||||||
.modal-card {
|
.modal-card {
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-lg);
|
border-radius: var(--radius-md);
|
||||||
padding: 1.5rem;
|
padding: 1.5rem;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
box-shadow: 0 8px 32px var(--color-shadow);
|
box-shadow: 0 8px 32px var(--color-shadow);
|
||||||
}
|
}
|
||||||
.modal-title { margin: 0 0 0.75rem; font-size: 1.05rem; }
|
.modal-title { margin: 0 0 0.75rem; font-size: 1.05rem; }
|
||||||
.modal-message { font-size: 0.9rem; color: var(--fs-text-secondary); margin: 0 0 1.25rem; line-height: 1.5; }
|
.modal-message { font-size: 0.9rem; color: var(--color-text-secondary); margin: 0 0 1.25rem; line-height: 1.5; }
|
||||||
.modal-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }
|
.modal-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }
|
||||||
.modal-btn {
|
.modal-btn {
|
||||||
padding: 0.4rem 0.9rem;
|
padding: 0.4rem 0.9rem;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
}
|
}
|
||||||
.modal-btn:hover { background: var(--fs-surface-page); }
|
.modal-btn:hover { background: var(--color-bg); }
|
||||||
.modal-btn-danger { background: var(--fs-action-destructive); border-color: var(--fs-action-destructive); color: var(--fs-text-on-action); }
|
.modal-btn-danger { background: var(--color-action-destructive); border-color: var(--color-action-destructive); color: var(--fs-text-on-action); }
|
||||||
.modal-btn-danger:hover { background: var(--fs-action-destructive-hover); border-color: var(--fs-action-destructive-hover); }
|
.modal-btn-danger:hover { background: var(--color-action-destructive-hover); border-color: var(--color-action-destructive-hover); }
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ function scrollTo(id: string) {
|
|||||||
.toc-title {
|
.toc-title {
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
margin: 0 0 0.5rem;
|
margin: 0 0 0.5rem;
|
||||||
letter-spacing: 0.05em;
|
letter-spacing: 0.05em;
|
||||||
}
|
}
|
||||||
@@ -73,11 +73,11 @@ function scrollTo(id: string) {
|
|||||||
margin-bottom: 0.25rem;
|
margin-bottom: 0.25rem;
|
||||||
}
|
}
|
||||||
.toc-link {
|
.toc-link {
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.toc-link:hover {
|
.toc-link:hover {
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -154,9 +154,9 @@ function focusInput() {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.35rem;
|
gap: 0.35rem;
|
||||||
padding: 0.35rem 0.6rem;
|
padding: 0.35rem 0.6rem;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-input-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
cursor: text;
|
cursor: text;
|
||||||
min-height: 2.25rem;
|
min-height: 2.25rem;
|
||||||
}
|
}
|
||||||
@@ -166,9 +166,9 @@ function focusInput() {
|
|||||||
gap: 0.2rem;
|
gap: 0.2rem;
|
||||||
padding: 0.15rem 0.5rem;
|
padding: 0.15rem 0.5rem;
|
||||||
border-radius: 999px;
|
border-radius: 999px;
|
||||||
background: color-mix(in srgb, var(--fs-accent) 15%, transparent);
|
background: color-mix(in srgb, var(--color-primary) 15%, transparent);
|
||||||
border: 1px solid var(--fs-accent);
|
border: 1px solid var(--color-primary);
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
@@ -195,7 +195,7 @@ function focusInput() {
|
|||||||
border: none;
|
border: none;
|
||||||
outline: none;
|
outline: none;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
@@ -205,9 +205,9 @@ function focusInput() {
|
|||||||
left: 0;
|
left: 0;
|
||||||
min-width: 160px;
|
min-width: 160px;
|
||||||
max-width: 280px;
|
max-width: 280px;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
||||||
list-style: none;
|
list-style: none;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
@@ -218,11 +218,11 @@ function focusInput() {
|
|||||||
padding: 0.35rem 0.75rem;
|
padding: 0.35rem 0.75rem;
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
}
|
}
|
||||||
.tag-autocomplete-item:hover,
|
.tag-autocomplete-item:hover,
|
||||||
.tag-autocomplete-item.selected {
|
.tag-autocomplete-item.selected {
|
||||||
background: var(--fs-surface-hover);
|
background: var(--color-bg-hover, color-mix(in srgb, var(--color-primary) 8%, transparent));
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -29,8 +29,8 @@ defineEmits<{
|
|||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.25rem;
|
gap: 0.25rem;
|
||||||
background: var(--fs-accent-soft);
|
background: var(--color-tag-bg);
|
||||||
color: var(--fs-accent);
|
color: var(--color-tag-text);
|
||||||
padding: 0.15rem 0.5rem;
|
padding: 0.15rem 0.5rem;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
@@ -39,13 +39,13 @@ defineEmits<{
|
|||||||
transition: color 0.15s, background 0.15s;
|
transition: color 0.15s, background 0.15s;
|
||||||
}
|
}
|
||||||
.tag-pill:hover {
|
.tag-pill:hover {
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
background: var(--fs-accent-soft);
|
background: var(--color-primary-tint);
|
||||||
}
|
}
|
||||||
.dismiss {
|
.dismiss {
|
||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
color: var(--fs-accent);
|
color: var(--color-tag-text);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
|
|||||||
@@ -108,15 +108,15 @@ function isOverdue(): boolean {
|
|||||||
.task-card {
|
.task-card {
|
||||||
display: block;
|
display: block;
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
border-radius: var(--fs-radius-lg);
|
border-radius: var(--radius-md);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 0 0 1px color-mix(in srgb, var(--fs-accent) 6%, transparent);
|
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(91, 74, 138, 0.06);
|
||||||
transition: box-shadow 0.2s, transform 0.18s ease;
|
transition: box-shadow 0.2s, transform 0.18s ease;
|
||||||
}
|
}
|
||||||
.task-card:hover {
|
.task-card:hover {
|
||||||
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10), 0 0 0 1px color-mix(in srgb, var(--fs-accent) 14.0%, transparent);
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10), 0 0 0 1px rgba(91, 74, 138, 0.14);
|
||||||
transform: translateY(-2px);
|
transform: translateY(-2px);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -144,19 +144,19 @@ function isOverdue(): boolean {
|
|||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
}
|
}
|
||||||
.dot-todo {
|
.dot-todo {
|
||||||
background: var(--fs-status-todo);
|
background: var(--color-status-todo, #94a3b8);
|
||||||
border: 2px solid var(--fs-status-todo);
|
border: 2px solid var(--color-status-todo, #94a3b8);
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border: 2px solid var(--fs-text-tertiary);
|
border: 2px solid var(--color-text-muted);
|
||||||
}
|
}
|
||||||
.dot-in-progress {
|
.dot-in-progress {
|
||||||
background: var(--fs-status-in-progress);
|
background: var(--color-status-in-progress, #3b82f6);
|
||||||
}
|
}
|
||||||
.dot-done {
|
.dot-done {
|
||||||
background: var(--fs-status-done);
|
background: var(--color-status-done, #22c55e);
|
||||||
}
|
}
|
||||||
.dot-cancelled {
|
.dot-cancelled {
|
||||||
background: var(--fs-status-cancelled);
|
background: var(--color-status-cancelled, #6b7280);
|
||||||
}
|
}
|
||||||
|
|
||||||
.task-title-compact {
|
.task-title-compact {
|
||||||
@@ -170,10 +170,10 @@ function isOverdue(): boolean {
|
|||||||
}
|
}
|
||||||
.project-crumb {
|
.project-crumb {
|
||||||
font-size: 0.75rem;
|
font-size: 0.75rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
padding: 0.1rem 0.4rem;
|
padding: 0.1rem 0.4rem;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
@@ -185,12 +185,12 @@ function isOverdue(): boolean {
|
|||||||
}
|
}
|
||||||
.due-compact {
|
.due-compact {
|
||||||
font-size: 0.75rem;
|
font-size: 0.75rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
.due-compact.overdue {
|
.due-compact.overdue {
|
||||||
color: var(--fs-error);
|
color: var(--color-danger, #e74c3c);
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
/* Full layout */
|
/* Full layout */
|
||||||
@@ -211,7 +211,7 @@ function isOverdue(): boolean {
|
|||||||
}
|
}
|
||||||
.task-preview {
|
.task-preview {
|
||||||
margin: 0 0 0.5rem;
|
margin: 0 0 0.5rem;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
max-height: 7.5em;
|
max-height: 7.5em;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@@ -224,15 +224,15 @@ function isOverdue(): boolean {
|
|||||||
}
|
}
|
||||||
.due-date {
|
.due-date {
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
}
|
}
|
||||||
.due-date.overdue {
|
.due-date.overdue {
|
||||||
color: var(--fs-overdue);
|
color: var(--color-overdue);
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
.timestamp {
|
.timestamp {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
font-size: 0.75rem;
|
font-size: 0.75rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -175,9 +175,9 @@ onMounted(loadLogs);
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.log-section {
|
.log-section {
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
padding: 0.6rem 0.75rem;
|
padding: 0.6rem 0.75rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -187,7 +187,7 @@ onMounted(loadLogs);
|
|||||||
.log-header {
|
.log-header {
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.04em;
|
letter-spacing: 0.04em;
|
||||||
margin-bottom: 0.15rem;
|
margin-bottom: 0.15rem;
|
||||||
@@ -195,11 +195,11 @@ onMounted(loadLogs);
|
|||||||
|
|
||||||
.log-empty {
|
.log-empty {
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
.log-entry {
|
.log-entry {
|
||||||
border-top: 1px solid var(--fs-border-color);
|
border-top: 1px solid var(--color-border);
|
||||||
padding-top: 0.5rem;
|
padding-top: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -212,11 +212,11 @@ onMounted(loadLogs);
|
|||||||
}
|
}
|
||||||
|
|
||||||
.log-date {
|
.log-date {
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
.log-duration-badge {
|
.log-duration-badge {
|
||||||
background: var(--fs-accent);
|
background: var(--color-primary);
|
||||||
color: var(--fs-text-on-action);
|
color: var(--fs-text-on-action);
|
||||||
border-radius: 99px;
|
border-radius: 99px;
|
||||||
padding: 0.1rem 0.5rem;
|
padding: 0.1rem 0.5rem;
|
||||||
@@ -235,10 +235,10 @@ onMounted(loadLogs);
|
|||||||
.log-textarea {
|
.log-textarea {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0.4rem 0.5rem;
|
padding: 0.4rem 0.5rem;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-input-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-bg);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
resize: vertical;
|
resize: vertical;
|
||||||
@@ -247,7 +247,7 @@ onMounted(loadLogs);
|
|||||||
|
|
||||||
.log-textarea:focus {
|
.log-textarea:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.log-add-controls,
|
.log-add-controls,
|
||||||
@@ -259,7 +259,7 @@ onMounted(loadLogs);
|
|||||||
|
|
||||||
.log-duration-label {
|
.log-duration-label {
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.25rem;
|
gap: 0.25rem;
|
||||||
@@ -268,16 +268,16 @@ onMounted(loadLogs);
|
|||||||
.log-duration-input {
|
.log-duration-input {
|
||||||
width: 5rem;
|
width: 5rem;
|
||||||
padding: 0.3rem 0.4rem;
|
padding: 0.3rem 0.4rem;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-input-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-bg);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.log-duration-input:focus {
|
.log-duration-input:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -156,7 +156,7 @@ defineExpose({ editor });
|
|||||||
<style scoped>
|
<style scoped>
|
||||||
.editor-error {
|
.editor-error {
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
color: var(--fs-error);
|
color: var(--color-danger);
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -57,13 +57,13 @@ const toastStore = useToastStore();
|
|||||||
color: var(--fs-text-on-action);
|
color: var(--fs-text-on-action);
|
||||||
}
|
}
|
||||||
.toast--success {
|
.toast--success {
|
||||||
background: var(--fs-success);
|
background: var(--color-toast-success);
|
||||||
}
|
}
|
||||||
.toast--error {
|
.toast--error {
|
||||||
background: var(--fs-error);
|
background: var(--color-toast-error);
|
||||||
}
|
}
|
||||||
.toast--warning {
|
.toast--warning {
|
||||||
background: var(--fs-warning);
|
background: var(--color-warning);
|
||||||
color: #1a1a1a;
|
color: #1a1a1a;
|
||||||
}
|
}
|
||||||
.toast--warning .toast-close {
|
.toast--warning .toast-close {
|
||||||
|
|||||||
@@ -1,362 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
/**
|
|
||||||
* A design system's tokens, drawn rather than listed (#2431).
|
|
||||||
*
|
|
||||||
* WHAT MAKES THIS WORK FOR A SYSTEM YOU AREN'T RUNNING
|
|
||||||
* Every value is resolved on an offscreen probe carrying only this system's
|
|
||||||
* declarations (`resolveDeclared`), never read from the page. So a token like
|
|
||||||
* `color-mix(in srgb, var(--accent) 15%, transparent)` shows THIS system's
|
|
||||||
* accent, not the accent of the app you happen to be looking at. Previewing
|
|
||||||
* another project's palette from here is the point; a preview that quietly
|
|
||||||
* borrows the host app's values would be worse than no preview, because it
|
|
||||||
* would look right.
|
|
||||||
*
|
|
||||||
* SPECIMENS ARE CHOSEN BY VALUE SHAPE, NEVER BY NAME
|
|
||||||
* A colour is drawn as a swatch, a length as a rule of that length, a font
|
|
||||||
* stack as text set in it. Nothing here matches `--fs-space-*` or any other
|
|
||||||
* naming convention, because the convention is the install's (rule #115) — a
|
|
||||||
* system that calls its spacing `--gap-N` gets the same treatment.
|
|
||||||
*
|
|
||||||
* A token with no value for the chosen mode is shown as undecided rather than
|
|
||||||
* skipped. A named role awaiting a decision is information; a gap in a grid
|
|
||||||
* is not.
|
|
||||||
*/
|
|
||||||
import { computed, ref, watch } from "vue";
|
|
||||||
|
|
||||||
import type { ResolvedToken } from "@/api/designSystems";
|
|
||||||
import { BASE_MODE, modesPresent, resolveDeclared, valueForMode } from "@/utils/designValues";
|
|
||||||
|
|
||||||
const props = defineProps<{ tokens: ResolvedToken[] }>();
|
|
||||||
|
|
||||||
const modes = computed(() => modesPresent(props.tokens));
|
|
||||||
const mode = ref(BASE_MODE);
|
|
||||||
|
|
||||||
/** Values as the browser would compute them, for the chosen mode. */
|
|
||||||
const rendered = ref<Map<string, string>>(new Map());
|
|
||||||
|
|
||||||
function recompute() {
|
|
||||||
const declared = new Map<string, string>();
|
|
||||||
for (const token of props.tokens) {
|
|
||||||
const value = valueForMode(token.value_by_mode, mode.value);
|
|
||||||
if (value) declared.set(token.name, value);
|
|
||||||
}
|
|
||||||
rendered.value = resolveDeclared(declared);
|
|
||||||
}
|
|
||||||
|
|
||||||
watch(
|
|
||||||
[() => props.tokens, mode],
|
|
||||||
() => {
|
|
||||||
// Keep the selection only while it still exists — switching systems can
|
|
||||||
// drop a mode, and a stale one would silently render as base.
|
|
||||||
if (!modes.value.includes(mode.value)) mode.value = modes.value[0] ?? BASE_MODE;
|
|
||||||
recompute();
|
|
||||||
},
|
|
||||||
{ immediate: true, deep: false },
|
|
||||||
);
|
|
||||||
|
|
||||||
type Shape = "colour" | "surface" | "length" | "font" | "plain";
|
|
||||||
|
|
||||||
const COLOUR = /^(#|rgba?\(|hsla?\(|color-mix\(|light-dark\()/;
|
|
||||||
const LENGTH = /^-?\d*\.?\d+(px|rem|em|ch|vh|vw)$/;
|
|
||||||
const GRADIENT = /gradient\(/;
|
|
||||||
/** Two or more space-separated parts ending in a colour — i.e. a shadow. */
|
|
||||||
const SHADOW = /^[^,]*\d\s+.*(#|rgba?\(|color-mix\()/;
|
|
||||||
/** A stack of family names: commas, no functions, no digits. */
|
|
||||||
const FONT_STACK = /^[^(){}\d]+,[^(){}\d]+$/;
|
|
||||||
|
|
||||||
function shapeOf(value: string): Shape {
|
|
||||||
const v = value.trim();
|
|
||||||
if (!v) return "plain";
|
|
||||||
if (COLOUR.test(v)) return "colour";
|
|
||||||
if (GRADIENT.test(v) || SHADOW.test(v)) return "surface";
|
|
||||||
if (LENGTH.test(v)) return "length";
|
|
||||||
if (FONT_STACK.test(v)) return "font";
|
|
||||||
return "plain";
|
|
||||||
}
|
|
||||||
|
|
||||||
interface Specimen {
|
|
||||||
name: string;
|
|
||||||
declared: string;
|
|
||||||
rendered: string;
|
|
||||||
shape: Shape;
|
|
||||||
purpose: string | null;
|
|
||||||
/** True when `var()` substitution changed the value — worth showing on hover. */
|
|
||||||
substituted: boolean;
|
|
||||||
}
|
|
||||||
|
|
||||||
const groups = computed(() => {
|
|
||||||
const out = new Map<string, Specimen[]>();
|
|
||||||
for (const token of props.tokens) {
|
|
||||||
const declared = valueForMode(token.value_by_mode, mode.value);
|
|
||||||
const value = rendered.value.get(token.name) ?? "";
|
|
||||||
const bucket = out.get(token.group_name ?? "ungrouped") ?? [];
|
|
||||||
bucket.push({
|
|
||||||
name: token.name,
|
|
||||||
declared,
|
|
||||||
rendered: value,
|
|
||||||
shape: shapeOf(value),
|
|
||||||
purpose: token.purpose,
|
|
||||||
substituted: Boolean(declared) && value !== declared,
|
|
||||||
});
|
|
||||||
out.set(token.group_name ?? "ungrouped", bucket);
|
|
||||||
}
|
|
||||||
return [...out.entries()];
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Lengths are drawn to scale up to a ceiling, so a 40px heading and a 4px gap
|
|
||||||
* are visibly different — but a stray `100vw` can't stretch the row.
|
|
||||||
*/
|
|
||||||
function ruleWidth(value: string): string {
|
|
||||||
return `min(${value}, 12rem)`;
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<div class="tp">
|
|
||||||
<div v-if="modes.length > 1" class="tp-modes">
|
|
||||||
<button
|
|
||||||
v-for="m in modes"
|
|
||||||
:key="m"
|
|
||||||
class="tp-mode"
|
|
||||||
:class="{ active: m === mode }"
|
|
||||||
@click="mode = m"
|
|
||||||
>{{ m }}</button>
|
|
||||||
<span class="tp-modes-note">
|
|
||||||
The system's own modes — independent of the theme this app is in.
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-for="[group, specimens] in groups" :key="group" class="tp-group">
|
|
||||||
<h3 class="tp-group-heading">{{ group }}</h3>
|
|
||||||
<ul class="tp-grid">
|
|
||||||
<li v-for="s in specimens" :key="s.name" class="tp-item">
|
|
||||||
<div
|
|
||||||
class="tp-specimen"
|
|
||||||
:class="`is-${s.shape}`"
|
|
||||||
:title="s.substituted ? `${s.declared} → ${s.rendered}` : s.declared"
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
v-if="s.shape === 'colour'"
|
|
||||||
class="tp-swatch"
|
|
||||||
:style="{ '--tp-fill': s.rendered }"
|
|
||||||
/>
|
|
||||||
<span
|
|
||||||
v-else-if="s.shape === 'surface'"
|
|
||||||
class="tp-surface"
|
|
||||||
:style="s.rendered.includes('gradient(')
|
|
||||||
? { background: s.rendered }
|
|
||||||
: { boxShadow: s.rendered }"
|
|
||||||
/>
|
|
||||||
<span v-else-if="s.shape === 'length'" class="tp-rule-wrap">
|
|
||||||
<span class="tp-rule" :style="{ width: ruleWidth(s.rendered) }" />
|
|
||||||
<span class="tp-rule-label">{{ s.rendered }}</span>
|
|
||||||
</span>
|
|
||||||
<span
|
|
||||||
v-else-if="s.shape === 'font'"
|
|
||||||
class="tp-font"
|
|
||||||
:style="{ fontFamily: s.rendered }"
|
|
||||||
>Ag</span>
|
|
||||||
<span v-else-if="!s.declared" class="tp-undecided">to be decided</span>
|
|
||||||
<span v-else class="tp-plain">{{ s.rendered }}</span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<code class="tp-name">{{ s.name }}</code>
|
|
||||||
<span class="tp-value" :title="s.declared">{{ s.declared || "—" }}</span>
|
|
||||||
<span v-if="s.purpose" class="tp-purpose" :title="s.purpose">{{ s.purpose }}</span>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.tp-modes {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: var(--fs-space-2);
|
|
||||||
flex-wrap: wrap;
|
|
||||||
margin-bottom: var(--fs-space-4);
|
|
||||||
}
|
|
||||||
|
|
||||||
.tp-mode {
|
|
||||||
padding: 0.2rem 0.6rem;
|
|
||||||
font: inherit;
|
|
||||||
font-size: var(--fs-size-body-sm);
|
|
||||||
color: var(--fs-text-secondary);
|
|
||||||
background: transparent;
|
|
||||||
border: 1px solid var(--fs-border-color);
|
|
||||||
border-radius: var(--fs-radius-sm);
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.tp-mode:hover { color: var(--fs-text-primary); }
|
|
||||||
.tp-mode.active {
|
|
||||||
color: var(--fs-accent);
|
|
||||||
border-color: var(--fs-accent);
|
|
||||||
background: var(--fs-accent-faint);
|
|
||||||
}
|
|
||||||
|
|
||||||
.tp-modes-note {
|
|
||||||
font-size: var(--fs-size-tiny);
|
|
||||||
color: var(--fs-text-tertiary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.tp-group { margin-bottom: var(--fs-space-6); }
|
|
||||||
|
|
||||||
.tp-group-heading {
|
|
||||||
text-transform: uppercase;
|
|
||||||
letter-spacing: var(--fs-tracking-tiny);
|
|
||||||
font-size: var(--fs-size-tiny);
|
|
||||||
color: var(--fs-text-tertiary);
|
|
||||||
margin: 0 0 var(--fs-space-3);
|
|
||||||
padding-bottom: var(--fs-space-2);
|
|
||||||
border-bottom: var(--fs-border);
|
|
||||||
}
|
|
||||||
|
|
||||||
.tp-grid {
|
|
||||||
list-style: none;
|
|
||||||
padding: 0;
|
|
||||||
margin: 0;
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr));
|
|
||||||
gap: var(--fs-space-4) var(--fs-space-3);
|
|
||||||
}
|
|
||||||
|
|
||||||
.tp-item {
|
|
||||||
min-width: 0;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 0.15rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* A fixed-height stage so a 40px rule and a 2px one still line up in a grid.
|
|
||||||
*
|
|
||||||
* The stage itself is plain. An earlier version put the checkerboard here, so
|
|
||||||
* every specimen — including opaque colours and plain text — sat inside a
|
|
||||||
* frame of checks, and the pattern read as the loudest thing on the page. The
|
|
||||||
* checks belong to the ONE case that needs them: a colour that might be
|
|
||||||
* translucent. */
|
|
||||||
.tp-specimen {
|
|
||||||
height: 2.5rem;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
border-radius: var(--fs-radius-sm);
|
|
||||||
padding: var(--fs-space-1);
|
|
||||||
overflow: hidden;
|
|
||||||
background: var(--fs-surface-raised);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Text-bearing specimens get no box at all — a border around a value is a
|
|
||||||
frame around nothing, which is most of what made the grid feel busy. */
|
|
||||||
.tp-specimen.is-plain,
|
|
||||||
.tp-specimen.is-length,
|
|
||||||
.tp-specimen.is-font {
|
|
||||||
background: none;
|
|
||||||
padding: 0 var(--fs-space-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Checks UNDER the colour, not around it: an opaque value hides them
|
|
||||||
completely, and a 15% tint shows exactly as much of them as it should.
|
|
||||||
Layering the fill as a gradient is what lets one element do both. */
|
|
||||||
.tp-swatch {
|
|
||||||
/* Declared here, overridden inline per swatch. Two reasons it is a real
|
|
||||||
default rather than a formality: a token that resolves to nothing renders
|
|
||||||
as bare checks instead of an invalid gradient, and a custom property that
|
|
||||||
exists ONLY as an inline style is invisible to the CI token check — which
|
|
||||||
reads it as an unresolvable reference, correctly, since nothing in any
|
|
||||||
stylesheet declares it. */
|
|
||||||
--tp-fill: transparent;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
border-radius: calc(var(--fs-radius-sm) - 2px);
|
|
||||||
background-image:
|
|
||||||
linear-gradient(var(--tp-fill), var(--tp-fill)),
|
|
||||||
repeating-conic-gradient(
|
|
||||||
var(--fs-border-color) 0% 25%,
|
|
||||||
var(--fs-surface-raised) 0% 50%
|
|
||||||
);
|
|
||||||
background-size: auto, 10px 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tp-surface {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
border-radius: calc(var(--fs-radius-sm) - 2px);
|
|
||||||
background: var(--fs-surface-raised);
|
|
||||||
}
|
|
||||||
|
|
||||||
.tp-rule-wrap {
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: var(--fs-space-2);
|
|
||||||
min-width: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tp-rule {
|
|
||||||
height: 0.4rem;
|
|
||||||
min-width: 1px;
|
|
||||||
flex: none;
|
|
||||||
background: var(--fs-accent);
|
|
||||||
border-radius: 999px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tp-rule-label {
|
|
||||||
font-family: var(--fs-font-mono);
|
|
||||||
font-size: var(--fs-size-tiny);
|
|
||||||
color: var(--fs-text-tertiary);
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tp-font {
|
|
||||||
font-size: 1.4rem;
|
|
||||||
color: var(--fs-text-primary);
|
|
||||||
line-height: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tp-plain {
|
|
||||||
font-family: var(--fs-font-mono);
|
|
||||||
font-size: var(--fs-size-code);
|
|
||||||
color: var(--fs-text-secondary);
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tp-undecided {
|
|
||||||
font-size: var(--fs-size-tiny);
|
|
||||||
color: var(--fs-text-tertiary);
|
|
||||||
font-style: italic;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* One line each, with the full text on hover.
|
|
||||||
*
|
|
||||||
* These wrapped freely at first, so a card was two lines tall or five depending
|
|
||||||
* on how long its `color-mix()` happened to be, and the grid lost any rhythm —
|
|
||||||
* which is most of what "messy" was. A derived value is not something anyone
|
|
||||||
* reads character by character in a gallery; it is something you check the
|
|
||||||
* shape of and open if it matters. */
|
|
||||||
.tp-name,
|
|
||||||
.tp-value,
|
|
||||||
.tp-purpose {
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tp-name {
|
|
||||||
font-size: var(--fs-size-body-sm);
|
|
||||||
color: var(--fs-text-primary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.tp-value {
|
|
||||||
font-family: var(--fs-font-mono);
|
|
||||||
font-size: var(--fs-size-tiny);
|
|
||||||
color: var(--fs-text-secondary);
|
|
||||||
}
|
|
||||||
|
|
||||||
.tp-purpose {
|
|
||||||
font-size: var(--fs-size-tiny);
|
|
||||||
color: var(--fs-text-tertiary);
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -164,7 +164,7 @@ function restore() {
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.vh-section {
|
.vh-section {
|
||||||
border-top: 1px solid var(--fs-border-color);
|
border-top: 1px solid var(--color-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.vh-header {
|
.vh-header {
|
||||||
@@ -179,19 +179,19 @@ function restore() {
|
|||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
.vh-header:hover { background: var(--fs-surface-raised); }
|
.vh-header:hover { background: var(--color-bg-secondary); }
|
||||||
|
|
||||||
.vh-title {
|
.vh-title {
|
||||||
font-size: 0.75rem;
|
font-size: 0.75rem;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.05em;
|
letter-spacing: 0.05em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.vh-chevron {
|
.vh-chevron {
|
||||||
font-size: 0.7rem;
|
font-size: 0.7rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
.vh-body {
|
.vh-body {
|
||||||
@@ -201,20 +201,20 @@ function restore() {
|
|||||||
.vh-empty {
|
.vh-empty {
|
||||||
padding: 0.5rem 0.75rem;
|
padding: 0.5rem 0.75rem;
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
.vh-item {
|
.vh-item {
|
||||||
padding: 0.35rem 0.75rem;
|
padding: 0.35rem 0.75rem;
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
border-left: 2px solid transparent;
|
border-left: 2px solid transparent;
|
||||||
}
|
}
|
||||||
.vh-item:hover {
|
.vh-item:hover {
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
border-left-color: var(--fs-accent);
|
border-left-color: var(--color-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.vh-diff-actions {
|
.vh-diff-actions {
|
||||||
@@ -225,20 +225,20 @@ function restore() {
|
|||||||
|
|
||||||
.vh-btn-back {
|
.vh-btn-back {
|
||||||
background: none;
|
background: none;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
padding: 0.25rem 0.6rem;
|
padding: 0.25rem 0.6rem;
|
||||||
font-size: 0.78rem;
|
font-size: 0.78rem;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
}
|
}
|
||||||
.vh-btn-back:hover { border-color: var(--fs-accent); color: var(--fs-accent); }
|
.vh-btn-back:hover { border-color: var(--color-primary); color: var(--color-primary); }
|
||||||
|
|
||||||
.vh-btn-restore {
|
.vh-btn-restore {
|
||||||
background: var(--fs-action-primary);
|
background: var(--color-action-primary);
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
padding: 0.25rem 0.6rem;
|
padding: 0.25rem 0.6rem;
|
||||||
font-size: 0.78rem;
|
font-size: 0.78rem;
|
||||||
color: var(--fs-text-on-action);
|
color: var(--fs-text-on-action);
|
||||||
|
|||||||
@@ -50,11 +50,11 @@ const label = computed(() => {
|
|||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
font-size: 0.72rem;
|
font-size: 0.72rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
.word-count:hover { color: var(--fs-text-primary); }
|
.word-count:hover { color: var(--color-text); }
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -452,8 +452,8 @@ defineExpose({ reload: loadProjectNotes });
|
|||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: var(--fs-surface-hover);
|
background: var(--color-surface);
|
||||||
border-left: 1px solid var(--fs-border-color);
|
border-left: 1px solid var(--color-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ── Left rail ── */
|
/* ── Left rail ── */
|
||||||
@@ -463,7 +463,7 @@ defineExpose({ reload: loadProjectNotes });
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card, var(--color-bg-secondary));
|
||||||
}
|
}
|
||||||
|
|
||||||
.rail-header {
|
.rail-header {
|
||||||
@@ -471,12 +471,12 @@ defineExpose({ reload: loadProjectNotes });
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.3rem;
|
gap: 0.3rem;
|
||||||
padding: 0.5rem 0.6rem;
|
padding: 0.5rem 0.6rem;
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border);
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.rail-title {
|
.rail-title {
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.04em;
|
letter-spacing: 0.04em;
|
||||||
font-size: 0.72rem;
|
font-size: 0.72rem;
|
||||||
@@ -490,7 +490,7 @@ defineExpose({ reload: loadProjectNotes });
|
|||||||
background: transparent;
|
background: transparent;
|
||||||
border: none;
|
border: none;
|
||||||
font-size: 0.78rem;
|
font-size: 0.78rem;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
@@ -503,7 +503,7 @@ defineExpose({ reload: loadProjectNotes });
|
|||||||
.rail-state {
|
.rail-state {
|
||||||
padding: 1rem 0.65rem;
|
padding: 1rem 0.65rem;
|
||||||
font-size: 0.78rem;
|
font-size: 0.78rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Note list */
|
/* Note list */
|
||||||
@@ -519,16 +519,16 @@ defineExpose({ reload: loadProjectNotes });
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: 0.4rem 0.6rem;
|
padding: 0.4rem 0.6rem;
|
||||||
border-bottom: 1px solid color-mix(in srgb, var(--fs-border-color) 60%, transparent);
|
border-bottom: 1px solid color-mix(in srgb, var(--color-border) 60%, transparent);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
gap: 0.15rem;
|
gap: 0.15rem;
|
||||||
border-right: 2px solid transparent;
|
border-right: 2px solid transparent;
|
||||||
transition: background 0.12s;
|
transition: background 0.12s;
|
||||||
}
|
}
|
||||||
.note-row:hover { background: color-mix(in srgb, var(--fs-accent) 5%, var(--fs-surface-hover)); }
|
.note-row:hover { background: color-mix(in srgb, var(--color-primary) 5%, var(--color-surface)); }
|
||||||
.note-row.active {
|
.note-row.active {
|
||||||
background: color-mix(in srgb, var(--fs-accent) 8%, var(--fs-surface-hover));
|
background: color-mix(in srgb, var(--color-primary) 8%, var(--color-surface));
|
||||||
border-right-color: var(--fs-accent);
|
border-right-color: var(--color-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.note-row-main {
|
.note-row-main {
|
||||||
@@ -544,12 +544,12 @@ defineExpose({ reload: loadProjectNotes });
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
}
|
}
|
||||||
|
|
||||||
.note-row-age {
|
.note-row-age {
|
||||||
font-size: 0.62rem;
|
font-size: 0.62rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
@@ -562,8 +562,8 @@ defineExpose({ reload: loadProjectNotes });
|
|||||||
|
|
||||||
.note-tag-pill {
|
.note-tag-pill {
|
||||||
font-size: 0.58rem;
|
font-size: 0.58rem;
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
background: color-mix(in srgb, var(--fs-accent) 10%, transparent);
|
background: color-mix(in srgb, var(--color-primary) 10%, transparent);
|
||||||
border-radius: 999px;
|
border-radius: 999px;
|
||||||
padding: 0 0.3rem;
|
padding: 0 0.3rem;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
@@ -572,13 +572,13 @@ defineExpose({ reload: loadProjectNotes });
|
|||||||
max-width: 5rem;
|
max-width: 5rem;
|
||||||
}
|
}
|
||||||
.note-tag-pill.tag-match {
|
.note-tag-pill.tag-match {
|
||||||
background: color-mix(in srgb, var(--fs-accent) 22%, transparent);
|
background: color-mix(in srgb, var(--color-primary) 22%, transparent);
|
||||||
outline: 1px solid var(--fs-accent);
|
outline: 1px solid var(--color-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.note-tag-more {
|
.note-tag-more {
|
||||||
font-size: 0.58rem;
|
font-size: 0.58rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -606,8 +606,8 @@ defineExpose({ reload: loadProjectNotes });
|
|||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.unsaved { font-size: 0.72rem; color: var(--fs-text-tertiary); }
|
.unsaved { font-size: 0.72rem; color: var(--color-text-muted); }
|
||||||
.saving-txt { font-size: 0.72rem; color: var(--fs-accent); }
|
.saving-txt { font-size: 0.72rem; color: var(--color-primary); }
|
||||||
|
|
||||||
/* Moss action-primary per Hybrid */
|
/* Moss action-primary per Hybrid */
|
||||||
|
|
||||||
@@ -618,14 +618,14 @@ defineExpose({ reload: loadProjectNotes });
|
|||||||
font-size: 1.4rem;
|
font-size: 1.4rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
line-height: 1.25;
|
line-height: 1.25;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
padding: 0;
|
padding: 0;
|
||||||
font-family: 'Fraunces', serif;
|
font-family: 'Fraunces', serif;
|
||||||
letter-spacing: -0.01em;
|
letter-spacing: -0.01em;
|
||||||
}
|
}
|
||||||
.note-title-input:focus { outline: none; }
|
.note-title-input:focus { outline: none; }
|
||||||
.note-title-input::placeholder {
|
.note-title-input::placeholder {
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
.tag-row {
|
.tag-row {
|
||||||
@@ -645,25 +645,25 @@ defineExpose({ reload: loadProjectNotes });
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.3rem;
|
gap: 0.3rem;
|
||||||
padding: 0.35rem 0.6rem;
|
padding: 0.35rem 0.6rem;
|
||||||
background: color-mix(in srgb, var(--fs-accent) 5%, var(--fs-surface-hover));
|
background: color-mix(in srgb, var(--color-primary) 5%, var(--color-surface));
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
.tag-suggestions-label { font-size: 0.72rem; color: var(--fs-text-tertiary); flex-shrink: 0; }
|
.tag-suggestions-label { font-size: 0.72rem; color: var(--color-text-muted); flex-shrink: 0; }
|
||||||
|
|
||||||
.btn-tag-suggestion {
|
.btn-tag-suggestion {
|
||||||
background: none;
|
background: none;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: 999px;
|
border-radius: 999px;
|
||||||
padding: 0.15rem 0.55rem;
|
padding: 0.15rem 0.55rem;
|
||||||
font-size: 0.75rem;
|
font-size: 0.75rem;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.btn-tag-suggestion:hover { border-color: var(--fs-accent); color: var(--fs-accent); }
|
.btn-tag-suggestion:hover { border-color: var(--color-primary); color: var(--color-primary); }
|
||||||
.btn-tag-suggestion.applied {
|
.btn-tag-suggestion.applied {
|
||||||
background: color-mix(in srgb, var(--fs-accent) 15%, transparent);
|
background: color-mix(in srgb, var(--color-primary) 15%, transparent);
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary);
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -673,12 +673,12 @@ defineExpose({ reload: loadProjectNotes });
|
|||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
gap: 0.25rem;
|
gap: 0.25rem;
|
||||||
padding: 0.3rem 0.6rem;
|
padding: 0.3rem 0.6rem;
|
||||||
background: color-mix(in srgb, var(--fs-accent) 5%, var(--fs-surface-hover));
|
background: color-mix(in srgb, var(--color-primary) 5%, var(--color-surface));
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
.link-suggest-label {
|
.link-suggest-label {
|
||||||
font-size: 0.7rem;
|
font-size: 0.7rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
@@ -688,15 +688,15 @@ defineExpose({ reload: loadProjectNotes });
|
|||||||
|
|
||||||
.btn-chip-link {
|
.btn-chip-link {
|
||||||
background: none;
|
background: none;
|
||||||
border: 1px solid var(--fs-accent);
|
border: 1px solid var(--color-primary);
|
||||||
border-radius: 999px;
|
border-radius: 999px;
|
||||||
padding: 0.1rem 0.45rem;
|
padding: 0.1rem 0.45rem;
|
||||||
font-size: 0.7rem;
|
font-size: 0.7rem;
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.btn-chip-link:hover { background: color-mix(in srgb, var(--fs-accent) 15%, transparent); }
|
.btn-chip-link:hover { background: color-mix(in srgb, var(--color-primary) 15%, transparent); }
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -344,8 +344,8 @@ defineExpose({ reload: loadAll });
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: var(--fs-surface-hover);
|
background: var(--color-surface);
|
||||||
border-right: 1px solid var(--fs-border-color);
|
border-right: 1px solid var(--color-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ── List view ── */
|
/* ── List view ── */
|
||||||
@@ -360,17 +360,17 @@ defineExpose({ reload: loadAll });
|
|||||||
flex: 0 0 44%;
|
flex: 0 0 44%;
|
||||||
}
|
}
|
||||||
.task-active {
|
.task-active {
|
||||||
background: color-mix(in srgb, var(--fs-accent) 6%, var(--fs-surface-hover)) !important;
|
background: color-mix(in srgb, var(--color-primary) 6%, var(--color-surface)) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.panel-header {
|
.panel-header {
|
||||||
padding: 0.6rem 0.75rem;
|
padding: 0.6rem 0.75rem;
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border);
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.panel-title {
|
.panel-title {
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.04em;
|
letter-spacing: 0.04em;
|
||||||
font-size: 0.75rem;
|
font-size: 0.75rem;
|
||||||
@@ -381,20 +381,20 @@ defineExpose({ reload: loadAll });
|
|||||||
display: flex;
|
display: flex;
|
||||||
gap: 0.4rem;
|
gap: 0.4rem;
|
||||||
padding: 0.45rem 0.6rem;
|
padding: 0.45rem 0.6rem;
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border);
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.task-add-input {
|
.task-add-input {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-input-bg, var(--color-bg));
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
padding: 0.28rem 0.5rem;
|
padding: 0.28rem 0.5rem;
|
||||||
font-size: 0.83rem;
|
font-size: 0.83rem;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
}
|
}
|
||||||
.task-add-input:focus { outline: none; border-color: var(--fs-accent); }
|
.task-add-input:focus { outline: none; border-color: var(--color-primary); }
|
||||||
|
|
||||||
.btn-add { font-size: 1rem; } /* a '+' glyph, not a label */
|
.btn-add { font-size: 1rem; } /* a '+' glyph, not a label */
|
||||||
|
|
||||||
@@ -404,7 +404,7 @@ defineExpose({ reload: loadAll });
|
|||||||
}
|
}
|
||||||
|
|
||||||
.ms-group {
|
.ms-group {
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.ms-group-header {
|
.ms-group-header {
|
||||||
@@ -413,18 +413,18 @@ defineExpose({ reload: loadAll });
|
|||||||
gap: 0.4rem;
|
gap: 0.4rem;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0.4rem 0.65rem;
|
padding: 0.4rem 0.65rem;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-surface-raised, color-mix(in srgb, var(--color-surface) 92%, var(--color-text)));
|
||||||
border: none;
|
border: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
}
|
}
|
||||||
.ms-group-header:hover { background: color-mix(in srgb, var(--fs-accent) 8%, var(--fs-surface-hover)); }
|
.ms-group-header:hover { background: color-mix(in srgb, var(--color-primary) 8%, var(--color-surface)); }
|
||||||
|
|
||||||
.ms-chevron { font-size: 0.6rem; color: var(--fs-text-tertiary); width: 0.8rem; }
|
.ms-chevron { font-size: 0.6rem; color: var(--color-text-muted); width: 0.8rem; }
|
||||||
.ms-name { flex: 1; font-weight: 500; font-size: 0.8rem; }
|
.ms-name { flex: 1; font-weight: 500; font-size: 0.8rem; }
|
||||||
.ms-count { font-size: 0.72rem; color: var(--fs-text-tertiary); background: var(--fs-surface-page); border-radius: 10px; padding: 0 0.4rem; }
|
.ms-count { font-size: 0.72rem; color: var(--color-text-muted); background: var(--color-bg); border-radius: 10px; padding: 0 0.4rem; }
|
||||||
|
|
||||||
.ms-status {
|
.ms-status {
|
||||||
font-size: 0.68rem;
|
font-size: 0.68rem;
|
||||||
@@ -432,8 +432,8 @@ defineExpose({ reload: loadAll });
|
|||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
}
|
}
|
||||||
.ms-status-active { background: color-mix(in srgb, var(--fs-accent) 15%, transparent); color: var(--fs-accent); }
|
.ms-status-active { background: color-mix(in srgb, var(--color-primary) 15%, transparent); color: var(--color-primary); }
|
||||||
.ms-status-completed { background: color-mix(in srgb, var(--fs-success) 15%, transparent); color: var(--fs-success); }
|
.ms-status-completed { background: color-mix(in srgb, var(--color-success, #27ae60) 15%, transparent); color: var(--color-success, #27ae60); }
|
||||||
|
|
||||||
.task-items {
|
.task-items {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
@@ -447,9 +447,9 @@ defineExpose({ reload: loadAll });
|
|||||||
gap: 0.4rem;
|
gap: 0.4rem;
|
||||||
padding: 0.35rem 0.65rem 0.35rem 1.4rem;
|
padding: 0.35rem 0.65rem 0.35rem 1.4rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border-bottom: 1px solid color-mix(in srgb, var(--fs-border-color) 50%, transparent);
|
border-bottom: 1px solid color-mix(in srgb, var(--color-border) 50%, transparent);
|
||||||
}
|
}
|
||||||
.task-row:hover { background: color-mix(in srgb, var(--fs-accent) 5%, var(--fs-surface-hover)); }
|
.task-row:hover { background: color-mix(in srgb, var(--color-primary) 5%, var(--color-surface)); }
|
||||||
.task-row:last-child { border-bottom: none; }
|
.task-row:last-child { border-bottom: none; }
|
||||||
|
|
||||||
.status-dot {
|
.status-dot {
|
||||||
@@ -457,7 +457,7 @@ defineExpose({ reload: loadAll });
|
|||||||
width: 1.35rem;
|
width: 1.35rem;
|
||||||
height: 1.35rem;
|
height: 1.35rem;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
border: 1.5px solid var(--fs-border-color);
|
border: 1.5px solid var(--color-border);
|
||||||
background: none;
|
background: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 0.62rem;
|
font-size: 0.62rem;
|
||||||
@@ -465,8 +465,8 @@ defineExpose({ reload: loadAll });
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
.status-dot.status-in_progress { border-color: var(--fs-accent); color: var(--fs-accent); }
|
.status-dot.status-in_progress { border-color: var(--color-primary); color: var(--color-primary); }
|
||||||
.status-dot.status-done { border-color: var(--fs-success); color: var(--fs-success); }
|
.status-dot.status-done { border-color: var(--color-success, #27ae60); color: var(--color-success, #27ae60); }
|
||||||
|
|
||||||
.task-title {
|
.task-title {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
@@ -474,20 +474,20 @@ defineExpose({ reload: loadAll });
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
}
|
}
|
||||||
.task-title.done { text-decoration: line-through; color: var(--fs-text-tertiary); }
|
.task-title.done { text-decoration: line-through; color: var(--color-text-muted); }
|
||||||
|
|
||||||
.task-age {
|
.task-age {
|
||||||
font-size: 0.68rem;
|
font-size: 0.68rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.empty-group { padding: 0.4rem 1.4rem; font-size: 0.78rem; color: var(--fs-text-tertiary); }
|
.empty-group { padding: 0.4rem 1.4rem; font-size: 0.78rem; color: var(--color-text-muted); }
|
||||||
|
|
||||||
.state-msg { padding: 1.5rem; text-align: center; font-size: 0.85rem; color: var(--fs-text-tertiary); }
|
.state-msg { padding: 1.5rem; text-align: center; font-size: 0.85rem; color: var(--color-text-muted); }
|
||||||
|
|
||||||
/* ── Detail pane (bottom split) ── */
|
/* ── Detail pane (bottom split) ── */
|
||||||
.task-detail {
|
.task-detail {
|
||||||
@@ -496,8 +496,8 @@ defineExpose({ reload: loadAll });
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: var(--fs-surface-hover);
|
background: var(--color-surface);
|
||||||
border-top: 2px solid var(--fs-border-color);
|
border-top: 2px solid var(--color-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.detail-header {
|
.detail-header {
|
||||||
@@ -505,7 +505,7 @@ defineExpose({ reload: loadAll });
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.6rem;
|
gap: 0.6rem;
|
||||||
padding: 0.6rem 0.75rem;
|
padding: 0.6rem 0.75rem;
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border);
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -515,21 +515,21 @@ defineExpose({ reload: loadAll });
|
|||||||
font-size: 0.75rem;
|
font-size: 0.75rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border: 1.5px solid var(--fs-border-color);
|
border: 1.5px solid var(--color-border);
|
||||||
background: none;
|
background: none;
|
||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
}
|
}
|
||||||
.status-badge.status-in_progress { border-color: var(--fs-accent); color: var(--fs-accent); background: color-mix(in srgb, var(--fs-accent) 10%, transparent); }
|
.status-badge.status-in_progress { border-color: var(--color-primary); color: var(--color-primary); background: color-mix(in srgb, var(--color-primary) 10%, transparent); }
|
||||||
.status-badge.status-done { border-color: var(--fs-success); color: var(--fs-success); background: color-mix(in srgb, var(--fs-success) 10%, transparent); }
|
.status-badge.status-done { border-color: var(--color-success, #27ae60); color: var(--color-success, #27ae60); background: color-mix(in srgb, var(--color-success, #27ae60) 10%, transparent); }
|
||||||
|
|
||||||
.btn-edit-task { margin-left: 0.25rem; }
|
.btn-edit-task { margin-left: 0.25rem; }
|
||||||
.btn-edit-task:hover { text-decoration: underline; }
|
.btn-edit-task:hover { text-decoration: underline; }
|
||||||
|
|
||||||
.detail-body {
|
.detail-body {
|
||||||
padding: 0.5rem 0.75rem 0.5rem;
|
padding: 0.5rem 0.75rem 0.5rem;
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border);
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
max-height: 40%;
|
max-height: 40%;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
@@ -537,17 +537,17 @@ defineExpose({ reload: loadAll });
|
|||||||
|
|
||||||
.body-loading {
|
.body-loading {
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
.detail-body .prose {
|
.detail-body .prose {
|
||||||
font-size: 0.83rem;
|
font-size: 0.83rem;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-delete-task { margin-left: 0.25rem; }
|
.btn-delete-task { margin-left: 0.25rem; }
|
||||||
.btn-delete-task:hover { color: var(--fs-action-destructive); }
|
.btn-delete-task:hover { color: var(--color-action-destructive); }
|
||||||
|
|
||||||
.btn-delete-confirm { margin-left: 0.25rem; }
|
.btn-delete-confirm { margin-left: 0.25rem; }
|
||||||
|
|
||||||
@@ -563,9 +563,9 @@ defineExpose({ reload: loadAll });
|
|||||||
font-size: 0.72rem;
|
font-size: 0.72rem;
|
||||||
padding: 0.15rem 0.5rem;
|
padding: 0.15rem 0.5rem;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-bg);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -573,20 +573,20 @@ defineExpose({ reload: loadAll });
|
|||||||
font-size: 0.72rem;
|
font-size: 0.72rem;
|
||||||
padding: 0.15rem 0.4rem;
|
padding: 0.15rem 0.4rem;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-bg);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
max-width: 140px;
|
max-width: 140px;
|
||||||
}
|
}
|
||||||
.milestone-select:disabled { opacity: 0.5; cursor: default; }
|
.milestone-select:disabled { opacity: 0.5; cursor: default; }
|
||||||
.milestone-select:focus { outline: none; border-color: var(--fs-accent); }
|
.milestone-select:focus { outline: none; border-color: var(--color-primary); }
|
||||||
|
|
||||||
.detail-log {
|
.detail-log {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
padding: 0 0.6rem 0.6rem;
|
padding: 0 0.6rem 0.6rem;
|
||||||
border-top: 1px solid var(--fs-border-color);
|
border-top: 1px solid var(--color-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Detail fade transition */
|
/* Detail fade transition */
|
||||||
@@ -609,12 +609,12 @@ defineExpose({ reload: loadAll });
|
|||||||
/* Due date on task rows */
|
/* Due date on task rows */
|
||||||
.task-due {
|
.task-due {
|
||||||
font-size: 0.65rem;
|
font-size: 0.65rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
.task-due.overdue {
|
.task-due.overdue {
|
||||||
color: var(--fs-error);
|
color: var(--color-danger, #e74c3c);
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -46,19 +46,13 @@ watch(() => props.projectId, load);
|
|||||||
<style scoped>
|
<style scoped>
|
||||||
.plan-rules {
|
.plan-rules {
|
||||||
margin-top: 1.5rem;
|
margin-top: 1.5rem;
|
||||||
border-top: 1px solid var(--fs-border-color);
|
border-top: 1px solid var(--color-border, #2a2a2e);
|
||||||
padding-top: 1rem;
|
padding-top: 1rem;
|
||||||
}
|
}
|
||||||
.plan-rules h3 {
|
.plan-rules h3 {
|
||||||
font-size: 0.9em; opacity: 0.7;
|
font-size: 0.9em; opacity: 0.7;
|
||||||
text-transform: uppercase; letter-spacing: 0.05em;
|
text-transform: uppercase; letter-spacing: 0.05em;
|
||||||
}
|
}
|
||||||
/* `.rb` is deliberately bare — it exists to namespace the two heading rules
|
|
||||||
below, and its children carry their own spacing (the h4 keeps the UA
|
|
||||||
margin-top that separates one rulebook group from the next). Nothing here
|
|
||||||
assumes a flex or grid parent, which is the tell that distinguishes this
|
|
||||||
from a base rule someone deleted (#2444). Stated so the next reader doesn't
|
|
||||||
re-open the question. */
|
|
||||||
.rb h4 { font-family: Fraunces, serif; font-style: italic; margin-bottom: 0.25rem; }
|
.rb h4 { font-family: Fraunces, serif; font-style: italic; margin-bottom: 0.25rem; }
|
||||||
.rb h5 {
|
.rb h5 {
|
||||||
font-size: 0.8em; opacity: 0.7;
|
font-size: 0.8em; opacity: 0.7;
|
||||||
@@ -66,7 +60,7 @@ watch(() => props.projectId, load);
|
|||||||
}
|
}
|
||||||
.plan-rules ul {
|
.plan-rules ul {
|
||||||
list-style: none; padding-left: 0.75rem; margin: 0.25rem 0;
|
list-style: none; padding-left: 0.75rem; margin: 0.25rem 0;
|
||||||
border-left: 2px solid var(--fs-accent);
|
border-left: 2px solid var(--color-primary, #6366f1);
|
||||||
}
|
}
|
||||||
.plan-rules li { margin: 0.35rem 0; font-size: 0.92em; }
|
.plan-rules li { margin: 0.35rem 0; font-size: 0.92em; }
|
||||||
.truncated { opacity: 0.7; font-style: italic; font-size: 0.85em; }
|
.truncated { opacity: 0.7; font-style: italic; font-size: 0.85em; }
|
||||||
|
|||||||
@@ -329,7 +329,7 @@ h3 {
|
|||||||
.chips { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
|
.chips { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
|
||||||
.chip {
|
.chip {
|
||||||
display: inline-flex; align-items: center; gap: 0.25rem;
|
display: inline-flex; align-items: center; gap: 0.25rem;
|
||||||
background: var(--fs-accent-soft);
|
background: var(--color-primary-bg, rgba(99,102,241,0.15));
|
||||||
padding: 0.25rem 0.5rem; border-radius: 999px;
|
padding: 0.25rem 0.5rem; border-radius: 999px;
|
||||||
}
|
}
|
||||||
.chip a { cursor: pointer; }
|
.chip a { cursor: pointer; }
|
||||||
@@ -337,29 +337,25 @@ h3 {
|
|||||||
.chip-remove:hover { opacity: 1; }
|
.chip-remove:hover { opacity: 1; }
|
||||||
.add {
|
.add {
|
||||||
background: none;
|
background: none;
|
||||||
border: 1px dashed var(--fs-border-color);
|
border: 1px dashed var(--color-border, #2a2a2e);
|
||||||
padding: 0.25rem 0.75rem; border-radius: 999px; cursor: pointer;
|
padding: 0.25rem 0.75rem; border-radius: 999px; cursor: pointer;
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
select {
|
select {
|
||||||
background: var(--fs-surface-page); color: inherit;
|
background: var(--color-bg, #111113); color: inherit;
|
||||||
border: 1px solid var(--fs-border-color); border-radius: 6px;
|
border: 1px solid var(--color-border, #2a2a2e); border-radius: 6px;
|
||||||
padding: 0.25rem 0.5rem;
|
padding: 0.25rem 0.5rem;
|
||||||
}
|
}
|
||||||
.applicable { margin-top: 2rem; }
|
.applicable { margin-top: 2rem; }
|
||||||
.rb-group { margin-bottom: 1.5rem; }
|
.rb-group { margin-bottom: 1.5rem; }
|
||||||
.rb-group h4 { font-family: Fraunces, serif; font-style: italic; margin-bottom: 0.5rem; }
|
.rb-group h4 { font-family: Fraunces, serif; font-style: italic; margin-bottom: 0.5rem; }
|
||||||
/* `.topic-group` is deliberately bare — a namespace for the two h5 rules (this
|
|
||||||
one and the flex row further down), with the h5's own margin-top doing the
|
|
||||||
separating. Its children assume nothing about it, which is what tells it
|
|
||||||
apart from a base rule someone deleted (#2444). */
|
|
||||||
.topic-group h5 {
|
.topic-group h5 {
|
||||||
font-size: 0.85em; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.05em;
|
font-size: 0.85em; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.05em;
|
||||||
margin-top: 0.75rem;
|
margin-top: 0.75rem;
|
||||||
}
|
}
|
||||||
ul { list-style: none; padding: 0; margin: 0; }
|
ul { list-style: none; padding: 0; margin: 0; }
|
||||||
.rule {
|
.rule {
|
||||||
border-left: 2px solid var(--fs-accent);
|
border-left: 2px solid var(--color-primary, #6366f1);
|
||||||
padding-left: 0.75rem; margin: 0.5rem 0;
|
padding-left: 0.75rem; margin: 0.5rem 0;
|
||||||
}
|
}
|
||||||
.rule-head { cursor: pointer; }
|
.rule-head { cursor: pointer; }
|
||||||
@@ -367,12 +363,12 @@ ul { list-style: none; padding: 0; margin: 0; }
|
|||||||
.rule-statement { display: block; opacity: 0.85; margin-top: 0.25rem; }
|
.rule-statement { display: block; opacity: 0.85; margin-top: 0.25rem; }
|
||||||
.rule-detail {
|
.rule-detail {
|
||||||
margin-top: 0.5rem; padding: 0.5rem;
|
margin-top: 0.5rem; padding: 0.5rem;
|
||||||
background: var(--fs-surface-page); border-radius: 6px;
|
background: var(--color-bg, #111113); border-radius: 6px;
|
||||||
}
|
}
|
||||||
.rule-detail > div { margin-bottom: 0.5rem; }
|
.rule-detail > div { margin-bottom: 0.5rem; }
|
||||||
.edit-link {
|
.edit-link {
|
||||||
background: none; border: none; cursor: pointer;
|
background: none; border: none; cursor: pointer;
|
||||||
color: var(--fs-accent); padding: 0.5rem 0 0 0;
|
color: var(--color-primary, #6366f1); padding: 0.5rem 0 0 0;
|
||||||
}
|
}
|
||||||
.empty, .truncated { opacity: 0.7; font-style: italic; }
|
.empty, .truncated { opacity: 0.7; font-style: italic; }
|
||||||
.empty a { cursor: pointer; text-decoration: underline; }
|
.empty a { cursor: pointer; text-decoration: underline; }
|
||||||
@@ -381,18 +377,18 @@ ul { list-style: none; padding: 0; margin: 0; }
|
|||||||
.new-rule-form {
|
.new-rule-form {
|
||||||
display: flex; flex-direction: column; gap: 0.5rem;
|
display: flex; flex-direction: column; gap: 0.5rem;
|
||||||
padding: 0.75rem; margin: 0.5rem 0;
|
padding: 0.75rem; margin: 0.5rem 0;
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-bg, #111113);
|
||||||
border: 1px solid var(--fs-border-color); border-radius: 6px;
|
border: 1px solid var(--color-border, #2a2a2e); border-radius: 6px;
|
||||||
}
|
}
|
||||||
.new-rule-form input, .new-rule-form textarea {
|
.new-rule-form input, .new-rule-form textarea {
|
||||||
background: var(--fs-surface-hover); color: inherit;
|
background: var(--color-surface, #18181b); color: inherit;
|
||||||
border: 1px solid var(--fs-border-color); border-radius: 6px;
|
border: 1px solid var(--color-border, #2a2a2e); border-radius: 6px;
|
||||||
padding: 0.5rem; font: inherit; resize: vertical;
|
padding: 0.5rem; font: inherit; resize: vertical;
|
||||||
}
|
}
|
||||||
.rule-list { margin-top: 0.5rem; }
|
.rule-list { margin-top: 0.5rem; }
|
||||||
.delete-link {
|
.delete-link {
|
||||||
background: none; border: none; cursor: pointer;
|
background: none; border: none; cursor: pointer;
|
||||||
color: var(--fs-destructive); padding: 0.5rem 0 0 0;
|
color: var(--color-destructive, #b85a4a); padding: 0.5rem 0 0 0;
|
||||||
}
|
}
|
||||||
/* Per-rule / per-topic suppress affordance — quiet by default, reveal on hover */
|
/* Per-rule / per-topic suppress affordance — quiet by default, reveal on hover */
|
||||||
.topic-group h5 {
|
.topic-group h5 {
|
||||||
@@ -404,14 +400,14 @@ ul { list-style: none; padding: 0; margin: 0; }
|
|||||||
.rule-head-text { flex: 1; cursor: pointer; }
|
.rule-head-text { flex: 1; cursor: pointer; }
|
||||||
.skip-btn {
|
.skip-btn {
|
||||||
background: none; border: none; cursor: pointer;
|
background: none; border: none; cursor: pointer;
|
||||||
color: var(--fs-text-tertiary); font-size: 0.75rem;
|
color: var(--color-muted, #888); font-size: 0.75rem;
|
||||||
padding: 0.1rem 0.4rem; opacity: 0; transition: opacity 0.15s;
|
padding: 0.1rem 0.4rem; opacity: 0; transition: opacity 0.15s;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.topic-group h5:hover .skip-btn,
|
.topic-group h5:hover .skip-btn,
|
||||||
.rule:hover .skip-btn,
|
.rule:hover .skip-btn,
|
||||||
.skip-btn:focus { opacity: 1; }
|
.skip-btn:focus { opacity: 1; }
|
||||||
.skip-btn:hover { color: var(--fs-destructive); }
|
.skip-btn:hover { color: var(--color-destructive, #b85a4a); }
|
||||||
/* Suppressed section */
|
/* Suppressed section */
|
||||||
.suppressed { margin-top: 1.5rem; }
|
.suppressed { margin-top: 1.5rem; }
|
||||||
.suppressed-toggle {
|
.suppressed-toggle {
|
||||||
@@ -430,13 +426,13 @@ ul { list-style: none; padding: 0; margin: 0; }
|
|||||||
.suppressed-kind {
|
.suppressed-kind {
|
||||||
font-size: 0.7em; text-transform: uppercase; letter-spacing: 0.05em;
|
font-size: 0.7em; text-transform: uppercase; letter-spacing: 0.05em;
|
||||||
padding: 0.1rem 0.4rem; border-radius: 3px;
|
padding: 0.1rem 0.4rem; border-radius: 3px;
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-bg, #111113);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border, #2a2a2e);
|
||||||
}
|
}
|
||||||
.suppressed-path { flex: 1; }
|
.suppressed-path { flex: 1; }
|
||||||
.reenable-btn {
|
.reenable-btn {
|
||||||
background: none; border: none; cursor: pointer;
|
background: none; border: none; cursor: pointer;
|
||||||
color: var(--fs-accent); font-size: 0.85em;
|
color: var(--color-primary, #6366f1); font-size: 0.85em;
|
||||||
}
|
}
|
||||||
.reenable-btn:hover { text-decoration: underline; }
|
.reenable-btn:hover { text-decoration: underline; }
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -98,8 +98,8 @@ watch(() => props.ruleId, load);
|
|||||||
.slide-over {
|
.slide-over {
|
||||||
position: fixed; top: 0; right: 0; bottom: 0;
|
position: fixed; top: 0; right: 0; bottom: 0;
|
||||||
width: min(520px, 90vw);
|
width: min(520px, 90vw);
|
||||||
background: var(--fs-surface-hover);
|
background: var(--color-surface, #18181b);
|
||||||
border-left: 2px solid var(--fs-accent);
|
border-left: 2px solid var(--color-primary, #6366f1);
|
||||||
padding: 1.5rem;
|
padding: 1.5rem;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
box-shadow: -8px 0 32px rgba(0, 0, 0, 0.3);
|
box-shadow: -8px 0 32px rgba(0, 0, 0, 0.3);
|
||||||
@@ -110,11 +110,11 @@ header h2 {
|
|||||||
font-family: Fraunces, serif; font-style: italic;
|
font-family: Fraunces, serif; font-style: italic;
|
||||||
}
|
}
|
||||||
label { display: block; margin-bottom: 1rem; }
|
label { display: block; margin-bottom: 1rem; }
|
||||||
.required { color: var(--fs-accent); }
|
.required { color: var(--color-primary, #6366f1); }
|
||||||
input, textarea {
|
input, textarea {
|
||||||
width: 100%; margin-top: 0.25rem;
|
width: 100%; margin-top: 0.25rem;
|
||||||
background: var(--fs-surface-page); color: inherit;
|
background: var(--color-bg, #111113); color: inherit;
|
||||||
border: 1px solid var(--fs-border-color); border-radius: 6px;
|
border: 1px solid var(--color-border, #2a2a2e); border-radius: 6px;
|
||||||
padding: 0.5rem; font: inherit;
|
padding: 0.5rem; font: inherit;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,18 +22,18 @@ const emit = defineEmits<{
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.pane { background: var(--fs-surface-hover); padding: 1rem; overflow-y: auto; }
|
.pane { background: var(--color-surface, #18181b); padding: 1rem; overflow-y: auto; }
|
||||||
header h2 { font-family: Fraunces, serif; font-style: italic; margin: 0 0 0.5rem 0; }
|
header h2 { font-family: Fraunces, serif; font-style: italic; margin: 0 0 0.5rem 0; }
|
||||||
ul { list-style: none; padding: 0; margin: 1rem 0; }
|
ul { list-style: none; padding: 0; margin: 1rem 0; }
|
||||||
li {
|
li {
|
||||||
padding: 0.75rem;
|
padding: 0.75rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
border-left: 2px solid var(--fs-accent);
|
border-left: 2px solid var(--color-primary, #6366f1);
|
||||||
margin-bottom: 0.5rem;
|
margin-bottom: 0.5rem;
|
||||||
background: rgba(255, 255, 255, 0.02);
|
background: rgba(255, 255, 255, 0.02);
|
||||||
}
|
}
|
||||||
li:hover { background: var(--fs-surface-hover); }
|
li:hover { background: var(--color-hover, rgba(255,255,255,0.05)); }
|
||||||
.title { font-family: Fraunces, serif; font-style: italic; font-size: 1.05em; }
|
.title { font-family: Fraunces, serif; font-style: italic; font-size: 1.05em; }
|
||||||
.statement { font-size: 0.9em; opacity: 0.8; margin-top: 0.25rem; }
|
.statement { font-size: 0.9em; opacity: 0.8; margin-top: 0.25rem; }
|
||||||
.new-rule { cursor: pointer; }
|
.new-rule { cursor: pointer; }
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ watch(() => props.rulebookId, () => {/* re-render of isSubscribed from existing
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.pane { background: var(--fs-surface-hover); padding: 1rem; overflow-y: auto; }
|
.pane { background: var(--color-surface, #18181b); padding: 1rem; overflow-y: auto; }
|
||||||
header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
|
header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
|
||||||
header h2 { font-family: Fraunces, serif; font-style: italic; margin: 0 0 0.5rem 0; }
|
header h2 { font-family: Fraunces, serif; font-style: italic; margin: 0 0 0.5rem 0; }
|
||||||
.always-on-toggle {
|
.always-on-toggle {
|
||||||
@@ -133,23 +133,18 @@ header h2 { font-family: Fraunces, serif; font-style: italic; margin: 0 0 0.5rem
|
|||||||
.always-on-toggle input { cursor: pointer; }
|
.always-on-toggle input { cursor: pointer; }
|
||||||
ul { list-style: none; padding: 0; margin: 1rem 0; }
|
ul { list-style: none; padding: 0; margin: 1rem 0; }
|
||||||
li { padding: 0.5rem; cursor: pointer; border-radius: 6px; }
|
li { padding: 0.5rem; cursor: pointer; border-radius: 6px; }
|
||||||
li.active { background: var(--fs-accent-soft); }
|
li.active { background: var(--color-primary-bg, rgba(99,102,241,0.15)); }
|
||||||
li:hover { background: var(--fs-surface-hover); }
|
li:hover { background: var(--color-hover, rgba(255,255,255,0.05)); }
|
||||||
/* `.new-topic` and `.sub-list` are deliberately bare (#2444). The first wraps a
|
|
||||||
button-or-form whose children style themselves; the second is a `<ul>`, and
|
|
||||||
the bare `ul` rule above already gives it list-style, padding and margin —
|
|
||||||
a base a class-name check cannot see, since it comes from an element
|
|
||||||
selector. Both namespace descendant rules and assume nothing about layout. */
|
|
||||||
.new-topic input {
|
.new-topic input {
|
||||||
width: 100%; margin-bottom: 0.5rem;
|
width: 100%; margin-bottom: 0.5rem;
|
||||||
background: var(--fs-surface-page); color: inherit;
|
background: var(--color-bg, #111113); color: inherit;
|
||||||
border: 1px solid var(--fs-border-color); border-radius: 6px;
|
border: 1px solid var(--color-border, #2a2a2e); border-radius: 6px;
|
||||||
padding: 0.5rem;
|
padding: 0.5rem;
|
||||||
}
|
}
|
||||||
.form-buttons { display: flex; gap: 0.5rem; }
|
.form-buttons { display: flex; gap: 0.5rem; }
|
||||||
.subscriptions {
|
.subscriptions {
|
||||||
margin-top: 2rem;
|
margin-top: 2rem;
|
||||||
border-top: 1px solid var(--fs-border-color);
|
border-top: 1px solid var(--color-border, #2a2a2e);
|
||||||
padding-top: 1rem;
|
padding-top: 1rem;
|
||||||
}
|
}
|
||||||
.subscriptions h3 { font-size: 0.9em; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.05em; }
|
.subscriptions h3 { font-size: 0.9em; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.05em; }
|
||||||
|
|||||||
@@ -48,27 +48,27 @@ async function submitNew() {
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.pane { background: var(--fs-surface-hover); padding: 1rem; overflow-y: auto; }
|
.pane { background: var(--color-surface, #18181b); padding: 1rem; overflow-y: auto; }
|
||||||
header h2 { font-family: Fraunces, serif; font-style: italic; margin: 0 0 0.5rem 0; }
|
header h2 { font-family: Fraunces, serif; font-style: italic; margin: 0 0 0.5rem 0; }
|
||||||
ul { list-style: none; padding: 0; margin: 1rem 0; }
|
ul { list-style: none; padding: 0; margin: 1rem 0; }
|
||||||
li { padding: 0.5rem; cursor: pointer; border-radius: 6px; display: flex; align-items: center; gap: 0.5rem; }
|
li { padding: 0.5rem; cursor: pointer; border-radius: 6px; display: flex; align-items: center; gap: 0.5rem; }
|
||||||
li.active { background: var(--fs-accent-soft); }
|
li.active { background: var(--color-primary-bg, rgba(99,102,241,0.15)); }
|
||||||
li:hover { background: var(--fs-surface-hover); }
|
li:hover { background: var(--color-hover, rgba(255,255,255,0.05)); }
|
||||||
.always-on-badge {
|
.always-on-badge {
|
||||||
font-size: 0.7rem;
|
font-size: 0.7rem;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.05em;
|
letter-spacing: 0.05em;
|
||||||
padding: 0.1rem 0.4rem;
|
padding: 0.1rem 0.4rem;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
background: var(--fs-accent);
|
background: var(--color-accent, rgba(91,74,138,0.25));
|
||||||
color: var(--fs-text-on-action);
|
color: var(--color-accent-fg, inherit);
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
}
|
}
|
||||||
.new-rulebook { margin-top: 1rem; }
|
.new-rulebook { margin-top: 1rem; }
|
||||||
.new-rulebook input {
|
.new-rulebook input {
|
||||||
width: 100%; margin-bottom: 0.5rem;
|
width: 100%; margin-bottom: 0.5rem;
|
||||||
background: var(--fs-surface-page); color: inherit;
|
background: var(--color-bg, #111113); color: inherit;
|
||||||
border: 1px solid var(--fs-border-color); border-radius: 6px;
|
border: 1px solid var(--color-border, #2a2a2e); border-radius: 6px;
|
||||||
padding: 0.5rem;
|
padding: 0.5rem;
|
||||||
}
|
}
|
||||||
.form-buttons { display: flex; gap: 0.5rem; }
|
.form-buttons { display: flex; gap: 0.5rem; }
|
||||||
|
|||||||
@@ -110,11 +110,15 @@ const router = createRouter({
|
|||||||
component: () => import("@/views/RulesView.vue"),
|
component: () => import("@/views/RulesView.vue"),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// The design systems this install RECORDS — for the projects it tracks,
|
// Meta-surface, same family as /rules: it describes the app rather than
|
||||||
// not for the install itself. There was a sibling `/design` that read the
|
// holding the operator's records.
|
||||||
// running app's own stylesheet out of the browser; it could only ever
|
path: "/design",
|
||||||
// inspect the instance it was served from, which made it a mirror rather
|
name: "design",
|
||||||
// than a tool (#274).
|
component: () => import("@/views/DesignView.vue"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
// The editable half of the same surface: /design is what the browser
|
||||||
|
// renders, /design-systems is the record that ought to decide it.
|
||||||
path: "/design-systems",
|
path: "/design-systems",
|
||||||
name: "design-systems",
|
name: "design-systems",
|
||||||
component: () => import("@/views/DesignSystemsView.vue"),
|
component: () => import("@/views/DesignSystemsView.vue"),
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ export interface Note {
|
|||||||
title: string;
|
title: string;
|
||||||
body: string;
|
body: string;
|
||||||
description: string | null;
|
description: string | null;
|
||||||
|
consolidated_at: string | null;
|
||||||
tags: string[];
|
tags: string[];
|
||||||
parent_id: number | null;
|
parent_id: number | null;
|
||||||
parent_title?: string | null;
|
parent_title?: string | null;
|
||||||
|
|||||||
@@ -0,0 +1,169 @@
|
|||||||
|
/**
|
||||||
|
* Drift comparison — what the rulebook claims vs what the stylesheet does.
|
||||||
|
*
|
||||||
|
* Milestone #251 step 5. Deliberately thin: the hard half (turning rulebook
|
||||||
|
* prose into claims) is server-side in `services/design_system.py`, where pytest
|
||||||
|
* can assert on it. What's left here is set arithmetic over live token values,
|
||||||
|
* which is the one thing the browser knows and the server doesn't.
|
||||||
|
*
|
||||||
|
* SCOPE, and it is a real limit rather than an omission. This compares the
|
||||||
|
* rulebook against the TOKENS. It cannot see the third category of drift — a
|
||||||
|
* literal hardcoded in a component where a token should be referenced (#2275,
|
||||||
|
* 67 occurrences of `color: #fff` against a rule that forbids pure white). That
|
||||||
|
* drift isn't in the tokens at all, so no amount of inspecting them finds it.
|
||||||
|
*
|
||||||
|
* Catching it needs the component sources, which would mean bundling every SFC
|
||||||
|
* into the app to read at runtime — a large cost for a panel. It belongs in CI,
|
||||||
|
* as a lint-shaped check, and is tracked there (#2277). Saying so in the panel
|
||||||
|
* matters: a drift report that silently omits a category invites the reader to
|
||||||
|
* conclude the category is clean.
|
||||||
|
*/
|
||||||
|
import type { DesignToken } from "@/utils/designTokens";
|
||||||
|
|
||||||
|
export type ExpectationKind = "token" | "color" | "prohibited_color";
|
||||||
|
|
||||||
|
export interface Expectation {
|
||||||
|
kind: ExpectationKind;
|
||||||
|
value: string;
|
||||||
|
rule_id: number;
|
||||||
|
rule_title: string;
|
||||||
|
context: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ExpectationResponse {
|
||||||
|
rulebook_id: number | null;
|
||||||
|
expectations: Expectation[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export type FindingStatus = "ok" | "missing" | "violated";
|
||||||
|
|
||||||
|
export interface Finding {
|
||||||
|
expectation: Expectation;
|
||||||
|
status: FindingStatus;
|
||||||
|
/** Tokens that satisfy (or, for a prohibition, breach) the expectation. */
|
||||||
|
matches: string[];
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Normalise a colour for comparison — the client-side twin of
|
||||||
|
* `normalize_hex` in services/design_system.py.
|
||||||
|
*
|
||||||
|
* These two MUST agree. The rulebook writes `#FFFFFF`, `theme.css` writes
|
||||||
|
* `#fff`, and getComputedStyle hands back `rgb(255, 255, 255)` — three
|
||||||
|
* spellings of one colour, and a comparison that misses any of them under-reports
|
||||||
|
* rather than erroring. The rgb() case is browser-specific and therefore has no
|
||||||
|
* server-side counterpart, which is exactly why it is handled here.
|
||||||
|
*/
|
||||||
|
export function normalizeColour(value: string): string | null {
|
||||||
|
const raw = value.trim().toLowerCase();
|
||||||
|
|
||||||
|
const hex = /^#([0-9a-f]{3,8})$/.exec(raw);
|
||||||
|
if (hex) {
|
||||||
|
let digits = hex[1];
|
||||||
|
if (digits.length === 3 || digits.length === 4) {
|
||||||
|
digits = digits.split("").map((c) => c + c).join("");
|
||||||
|
}
|
||||||
|
return digits.length === 6 || digits.length === 8 ? `#${digits}` : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// getComputedStyle always reports colours as rgb()/rgba(), never as authored.
|
||||||
|
const rgb = /^rgba?\(([^)]+)\)$/.exec(raw);
|
||||||
|
if (rgb) {
|
||||||
|
const parts = rgb[1].split(/[,\s/]+/).filter(Boolean);
|
||||||
|
if (parts.length < 3) return null;
|
||||||
|
const channels = parts.slice(0, 3).map((p) => Number(p));
|
||||||
|
if (channels.some((n) => !Number.isFinite(n))) return null;
|
||||||
|
const hexOf = (n: number) => Math.round(n).toString(16).padStart(2, "0");
|
||||||
|
const base = `#${channels.map(hexOf).join("")}`;
|
||||||
|
if (parts.length === 3) return base;
|
||||||
|
const alpha = Number(parts[3]);
|
||||||
|
if (!Number.isFinite(alpha) || alpha >= 1) return base;
|
||||||
|
return `${base}${hexOf(alpha * 255)}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Every distinct colour the stylesheet actually resolves to, mapped to its tokens. */
|
||||||
|
export function colourIndex(tokens: DesignToken[]): Map<string, string[]> {
|
||||||
|
const index = new Map<string, string[]>();
|
||||||
|
for (const token of tokens) {
|
||||||
|
const colour = normalizeColour(token.value);
|
||||||
|
if (!colour) continue;
|
||||||
|
const names = index.get(colour);
|
||||||
|
if (names) names.push(token.name);
|
||||||
|
else index.set(colour, [token.name]);
|
||||||
|
}
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compare claims against the live tokens.
|
||||||
|
*
|
||||||
|
* A `token` claim asks whether a custom property of that name exists.
|
||||||
|
* A `color` claim asks whether any token resolves to that value.
|
||||||
|
* A `prohibited_color` claim INVERTS the test — present is the failure.
|
||||||
|
*/
|
||||||
|
export function compareToTokens(
|
||||||
|
expectations: Expectation[],
|
||||||
|
tokens: DesignToken[],
|
||||||
|
): Finding[] {
|
||||||
|
const names = new Set(tokens.map((t) => t.name));
|
||||||
|
const colours = colourIndex(tokens);
|
||||||
|
|
||||||
|
return expectations.map((expectation) => {
|
||||||
|
if (expectation.kind === "token") {
|
||||||
|
const present = names.has(expectation.value);
|
||||||
|
return {
|
||||||
|
expectation,
|
||||||
|
status: present ? "ok" : "missing",
|
||||||
|
matches: present ? [expectation.value] : [],
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
const matches = colours.get(expectation.value) ?? [];
|
||||||
|
if (expectation.kind === "prohibited_color") {
|
||||||
|
return {
|
||||||
|
expectation,
|
||||||
|
status: matches.length ? "violated" : "ok",
|
||||||
|
matches,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
expectation,
|
||||||
|
status: matches.length ? "ok" : "missing",
|
||||||
|
matches,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface DriftSummary {
|
||||||
|
ok: number;
|
||||||
|
missing: number;
|
||||||
|
violated: number;
|
||||||
|
total: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function summarise(findings: Finding[]): DriftSummary {
|
||||||
|
const summary: DriftSummary = { ok: 0, missing: 0, violated: 0, total: findings.length };
|
||||||
|
for (const finding of findings) summary[finding.status] += 1;
|
||||||
|
return summary;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Findings worth leading with.
|
||||||
|
*
|
||||||
|
* A panel that opens with every row gets closed and never reopened — the same
|
||||||
|
* principle the auto-inject menu is built on: a short list that gets read beats
|
||||||
|
* a complete one that doesn't. Violations first (something is actively wrong),
|
||||||
|
* then missing (something was never built), and `ok` rows are not "findings" at
|
||||||
|
* all — they belong behind an expansion.
|
||||||
|
*/
|
||||||
|
export function rankFindings(findings: Finding[]): Finding[] {
|
||||||
|
const order: Record<FindingStatus, number> = { violated: 0, missing: 1, ok: 2 };
|
||||||
|
return [...findings].sort((a, b) => {
|
||||||
|
const byStatus = order[a.status] - order[b.status];
|
||||||
|
if (byStatus !== 0) return byStatus;
|
||||||
|
return a.expectation.rule_id - b.expectation.rule_id;
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -0,0 +1,181 @@
|
|||||||
|
/**
|
||||||
|
* Design-token inventory — what tokens exist, and what they actually resolve to.
|
||||||
|
*
|
||||||
|
* Foundation for the design explorer (milestone #251): the gallery renders
|
||||||
|
* against these, and the drift panel compares them to the design rulebook.
|
||||||
|
*
|
||||||
|
* DESIGN NOTE — why this parses NAMES but never VALUES.
|
||||||
|
* Extracting `--foo` from a stylesheet is a trivial, robust regex. Extracting
|
||||||
|
* its VALUE is not: values contain nested parens, commas inside rgba(),
|
||||||
|
* `var()` references to other tokens, multi-part shadows, and gradients — and
|
||||||
|
* `theme.css` has all of those today. So we take the names from the source and
|
||||||
|
* ask the BROWSER for every value.
|
||||||
|
*
|
||||||
|
* That is not just easier, it is more correct. getComputedStyle reports what
|
||||||
|
* actually won the cascade, resolves `var()` chains, and — critically for this
|
||||||
|
* milestone — reflects live overrides set on a container, which is exactly what
|
||||||
|
* the preview surface needs (see #2261). Parsing the source would report what
|
||||||
|
* the file says rather than what the user is looking at.
|
||||||
|
*
|
||||||
|
* It also means this module needs no unit tests to be trustworthy: the only
|
||||||
|
* logic here is a name regex and a group lookup. The frontend has no test
|
||||||
|
* runner today (`vue-tsc --noEmit` is the whole check), so keeping the
|
||||||
|
* error-prone half in the browser rather than in our code is deliberate.
|
||||||
|
*/
|
||||||
|
import themeCss from "@/assets/theme.css?raw";
|
||||||
|
|
||||||
|
export type TokenGroup =
|
||||||
|
| "color"
|
||||||
|
| "radius"
|
||||||
|
| "gradient"
|
||||||
|
| "glow"
|
||||||
|
| "focus"
|
||||||
|
| "layout"
|
||||||
|
| "other";
|
||||||
|
|
||||||
|
export type ThemeMode = "light" | "dark";
|
||||||
|
|
||||||
|
export interface DesignToken {
|
||||||
|
/** Full custom-property name, including the leading `--`. */
|
||||||
|
name: string;
|
||||||
|
/** Coarse family, derived from the name prefix. */
|
||||||
|
group: TokenGroup;
|
||||||
|
/** Resolved value in the requested context, straight from the browser. */
|
||||||
|
value: string;
|
||||||
|
/** True when the declaration appears inside the dark block in source. */
|
||||||
|
overriddenInDark: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Matches a custom-property DECLARATION, and never a `var(--name)` use.
|
||||||
|
*
|
||||||
|
* The discriminator is the COLON, not the preceding character. A declaration is
|
||||||
|
* `--name:`; a reference is `var(--name)` or `var(--name, fallback)` — followed
|
||||||
|
* by `)` or `,`, never by `:`. So no anchor is needed, and adding one is
|
||||||
|
* actively wrong: an earlier version required the match to follow `{` or `;`,
|
||||||
|
* which silently dropped every declaration that came after a comment —
|
||||||
|
* including `--color-bg`, the first and most-used token in the file.
|
||||||
|
*/
|
||||||
|
const DECLARATION = /(--[A-Za-z0-9_-]+)\s*:/g;
|
||||||
|
|
||||||
|
/** Comments are stripped first so a commented-out declaration isn't counted. */
|
||||||
|
const COMMENT = /\/\*[\s\S]*?\*\//g;
|
||||||
|
|
||||||
|
/** The dark block's selector, as written in theme.css. */
|
||||||
|
const DARK_SELECTOR = '[data-theme="dark"]';
|
||||||
|
|
||||||
|
const GROUP_PREFIXES: ReadonlyArray<[string, TokenGroup]> = [
|
||||||
|
["--color-", "color"],
|
||||||
|
["--radius-", "radius"],
|
||||||
|
["--gradient-", "gradient"],
|
||||||
|
["--glow-", "glow"],
|
||||||
|
["--focus-", "focus"],
|
||||||
|
["--page-", "layout"],
|
||||||
|
["--sidebar-", "layout"],
|
||||||
|
["--chat-", "layout"],
|
||||||
|
];
|
||||||
|
|
||||||
|
export function groupFor(name: string): TokenGroup {
|
||||||
|
for (const [prefix, group] of GROUP_PREFIXES) {
|
||||||
|
if (name.startsWith(prefix)) return group;
|
||||||
|
}
|
||||||
|
return "other";
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Every custom property declared anywhere in the stylesheet, in source order, deduped. */
|
||||||
|
export function tokenNames(css: string = themeCss): string[] {
|
||||||
|
const seen = new Set<string>();
|
||||||
|
const out: string[] = [];
|
||||||
|
for (const match of css.replace(COMMENT, "").matchAll(DECLARATION)) {
|
||||||
|
const name = match[1];
|
||||||
|
if (!seen.has(name)) {
|
||||||
|
seen.add(name);
|
||||||
|
out.push(name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** The subset re-declared inside the dark block — i.e. tokens that change with mode. */
|
||||||
|
export function darkOverriddenNames(css: string = themeCss): Set<string> {
|
||||||
|
const bare = css.replace(COMMENT, "");
|
||||||
|
const start = bare.indexOf(DARK_SELECTOR);
|
||||||
|
if (start === -1) return new Set();
|
||||||
|
const open = bare.indexOf("{", start);
|
||||||
|
const close = bare.indexOf("}", open);
|
||||||
|
if (open === -1 || close === -1) return new Set();
|
||||||
|
return new Set(tokenNames(bare.slice(open, close)));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Read the resolved value of every token in `host`'s context.
|
||||||
|
*
|
||||||
|
* Pass a container to read the tokens as they apply INSIDE it — which is how
|
||||||
|
* the preview surface reads a scoped override without disturbing the page.
|
||||||
|
* Defaults to the document root, i.e. the app-wide values.
|
||||||
|
*/
|
||||||
|
export function readTokens(host: Element = document.documentElement): DesignToken[] {
|
||||||
|
const computed = getComputedStyle(host);
|
||||||
|
const dark = darkOverriddenNames();
|
||||||
|
return tokenNames().map((name) => ({
|
||||||
|
name,
|
||||||
|
group: groupFor(name),
|
||||||
|
value: computed.getPropertyValue(name).trim(),
|
||||||
|
overriddenInDark: dark.has(name),
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Read tokens as they would resolve in a given mode, without touching the page.
|
||||||
|
*
|
||||||
|
* Uses an offscreen probe carrying the mode attribute, so the live UI is never
|
||||||
|
* mutated to take a reading.
|
||||||
|
*
|
||||||
|
* KNOWN LIMITATION, and it is a property of the stylesheet rather than of this
|
||||||
|
* function: light is declared on `:root` while dark is declared on
|
||||||
|
* `[data-theme="dark"]`. An attribute selector can ADD the dark values to a
|
||||||
|
* subtree, but there is no `[data-theme="light"]` block to add the light ones
|
||||||
|
* back. So reading "light" from inside a dark page returns the dark values —
|
||||||
|
* the probe has nothing to match.
|
||||||
|
*
|
||||||
|
* Concretely: dark-inside-light previews work, light-inside-dark previews do
|
||||||
|
* not. Introducing a `[data-theme="light"]` block alongside the dark-first flip
|
||||||
|
* (milestone #251 step 6) is what makes this symmetric, and until then callers
|
||||||
|
* should treat a cross-mode read as best-effort.
|
||||||
|
*/
|
||||||
|
export function readTokensForMode(mode: ThemeMode): DesignToken[] {
|
||||||
|
const probe = document.createElement("div");
|
||||||
|
probe.setAttribute("data-theme", mode);
|
||||||
|
probe.style.display = "none";
|
||||||
|
document.body.appendChild(probe);
|
||||||
|
try {
|
||||||
|
return readTokens(probe);
|
||||||
|
} finally {
|
||||||
|
probe.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Tokens grouped by family, preserving source order within each group. */
|
||||||
|
export function groupTokens(tokens: DesignToken[]): Map<TokenGroup, DesignToken[]> {
|
||||||
|
const out = new Map<TokenGroup, DesignToken[]>();
|
||||||
|
for (const token of tokens) {
|
||||||
|
const bucket = out.get(token.group);
|
||||||
|
if (bucket) bucket.push(token);
|
||||||
|
else out.set(token.group, [token]);
|
||||||
|
}
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Tokens declared in the stylesheet that nothing references with `var()`.
|
||||||
|
*
|
||||||
|
* Dead tokens are drift too: `--chat-reading-width` and
|
||||||
|
* `--chat-context-sidebar-width` outlived the chat subsystem that was deleted
|
||||||
|
* in the MCP-first pivot, and nothing has referenced them since. Takes the
|
||||||
|
* corpus of source files to search as an argument so the caller decides what
|
||||||
|
* "used" means — this module has no opinion about the project layout.
|
||||||
|
*/
|
||||||
|
export function unreferencedTokens(tokens: DesignToken[], sources: string[]): DesignToken[] {
|
||||||
|
const haystack = sources.join("\n");
|
||||||
|
return tokens.filter((token) => !haystack.includes(`var(${token.name}`));
|
||||||
|
}
|
||||||
@@ -1,88 +0,0 @@
|
|||||||
/**
|
|
||||||
* Turning a design system's RECORDED values into ones you can look at.
|
|
||||||
*
|
|
||||||
* Replaces `designTokens.ts` and `designDrift.ts`, which between them read the
|
|
||||||
* running app's own stylesheet — names out of a bundled `theme.css`, values out
|
|
||||||
* of `getComputedStyle(document.documentElement)`. That could only ever describe
|
|
||||||
* the install serving the page, and the design surface is for the projects an
|
|
||||||
* install TRACKS (#274). What is left here works on any system's record,
|
|
||||||
* including one for an app this browser has never loaded.
|
|
||||||
*
|
|
||||||
* Nothing in this module reads the document's own tokens or mutates the page.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** The base mode's key in `value_by_mode`, mirroring services/design_stylesheet. */
|
|
||||||
export const BASE_MODE = "base";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Which declared value applies in `mode`.
|
|
||||||
*
|
|
||||||
* Falls back to base, which is the storage model rather than a convenience: a
|
|
||||||
* mode block is an OVERRIDE layer, so a token with no entry for the current
|
|
||||||
* mode is not missing — it is inheriting, exactly as the generated sheet has it.
|
|
||||||
*/
|
|
||||||
export function valueForMode(
|
|
||||||
valueByMode: Record<string, string>,
|
|
||||||
mode: string,
|
|
||||||
): string {
|
|
||||||
const own = valueByMode[mode];
|
|
||||||
if (own !== undefined && own !== "") return own;
|
|
||||||
return valueByMode[BASE_MODE] ?? "";
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Every mode any token in the set declares, base first then the rest by name. */
|
|
||||||
export function modesPresent(
|
|
||||||
tokens: { value_by_mode: Record<string, string> }[],
|
|
||||||
): string[] {
|
|
||||||
const modes = new Set<string>();
|
|
||||||
for (const token of tokens) {
|
|
||||||
for (const [mode, value] of Object.entries(token.value_by_mode)) {
|
|
||||||
if (value) modes.add(mode);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
const rest = [...modes].filter((m) => m !== BASE_MODE).sort();
|
|
||||||
return modes.has(BASE_MODE) ? [BASE_MODE, ...rest] : rest;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Resolve declared values the way a browser would, without applying them.
|
|
||||||
*
|
|
||||||
* A record holds `color-mix(in srgb, var(--fs-accent) 15%, transparent)`. Shown
|
|
||||||
* as text that is a string; shown as a swatch it needs `var()` substituted and
|
|
||||||
* the mix evaluated. Rather than write a CSS parser, set the declarations on an
|
|
||||||
* offscreen probe and read them back — the substitution is done by the
|
|
||||||
* implementation that would do it for real.
|
|
||||||
*
|
|
||||||
* Custom properties INHERIT, and `all: initial` does not reset them — so a probe
|
|
||||||
* sitting in this page would resolve any reference the record leaves undeclared
|
|
||||||
* against the surrounding app's own tokens. Previewing another project's system
|
|
||||||
* would then quietly borrow this one's palette wherever that system was
|
|
||||||
* incomplete, and a token the record already knows is broken (it shows up under
|
|
||||||
* `unknown_refs`) would render as though it were fine.
|
|
||||||
*
|
|
||||||
* So every name referenced but not declared is blanked on the probe first. It
|
|
||||||
* resolves to nothing, which is what the record says it is.
|
|
||||||
*/
|
|
||||||
const VAR_REFERENCE = /var\(\s*(--[A-Za-z0-9_-]+)/g;
|
|
||||||
|
|
||||||
export function resolveDeclared(declared: Map<string, string>): Map<string, string> {
|
|
||||||
const probe = document.createElement("div");
|
|
||||||
probe.style.display = "none";
|
|
||||||
for (const value of declared.values()) {
|
|
||||||
for (const match of value.matchAll(VAR_REFERENCE)) {
|
|
||||||
if (!declared.has(match[1])) probe.style.setProperty(match[1], " ");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (const [name, value] of declared) probe.style.setProperty(name, value);
|
|
||||||
document.body.appendChild(probe);
|
|
||||||
try {
|
|
||||||
const computed = getComputedStyle(probe);
|
|
||||||
const out = new Map<string, string>();
|
|
||||||
for (const name of declared.keys()) {
|
|
||||||
out.set(name, computed.getPropertyValue(name).trim());
|
|
||||||
}
|
|
||||||
return out;
|
|
||||||
} finally {
|
|
||||||
probe.remove();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
/** Cyclic color palette for milestone progress bars. */
|
/** Cyclic color palette for milestone progress bars. */
|
||||||
export const MILESTONE_PALETTE = [
|
export const MILESTONE_PALETTE = [
|
||||||
'var(--fs-accent)',
|
'var(--color-primary)',
|
||||||
'var(--fs-success, #22c55e)',
|
'var(--color-success, #22c55e)',
|
||||||
'#c98a00',
|
'#c98a00',
|
||||||
'#8b5cf6',
|
'#8b5cf6',
|
||||||
'var(--fs-error, #ef4444)',
|
'var(--color-danger, #ef4444)',
|
||||||
'#06b6d4',
|
'#06b6d4',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ onMounted(async () => {
|
|||||||
|
|
||||||
<article v-for="p in data.active_projects" :key="p.id" class="proj-panel">
|
<article v-for="p in data.active_projects" :key="p.id" class="proj-panel">
|
||||||
<header class="proj-head">
|
<header class="proj-head">
|
||||||
<span class="proj-dot" :style="{ background: p.color || 'var(--fs-accent)' }" />
|
<span class="proj-dot" :style="{ background: p.color || 'var(--color-primary)' }" />
|
||||||
<router-link :to="`/projects/${p.id}`" class="proj-title">{{ p.title }}</router-link>
|
<router-link :to="`/projects/${p.id}`" class="proj-title">{{ p.title }}</router-link>
|
||||||
<span class="proj-meta">{{ relativeTime(p.last_activity) }} · {{ p.open_count }} open</span>
|
<span class="proj-meta">{{ relativeTime(p.last_activity) }} · {{ p.open_count }} open</span>
|
||||||
</header>
|
</header>
|
||||||
@@ -156,7 +156,7 @@ onMounted(async () => {
|
|||||||
:to="`/projects/${p.id}`"
|
:to="`/projects/${p.id}`"
|
||||||
class="pstat-row"
|
class="pstat-row"
|
||||||
>
|
>
|
||||||
<span class="pstat-dot" :style="{ background: p.color || 'var(--fs-accent)' }" />
|
<span class="pstat-dot" :style="{ background: p.color || 'var(--color-primary)' }" />
|
||||||
<span class="pstat-title">{{ p.title }}</span>
|
<span class="pstat-title">{{ p.title }}</span>
|
||||||
<span class="pstat-counts">{{ p.open_count }} open · {{ p.done_count }} done</span>
|
<span class="pstat-counts">{{ p.open_count }} open · {{ p.done_count }} done</span>
|
||||||
</router-link>
|
</router-link>
|
||||||
@@ -176,72 +176,69 @@ onMounted(async () => {
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.dash-root { max-width: 1100px; margin: 0 auto; padding: 1.5rem; }
|
.dash-root { max-width: 1100px; margin: 0 auto; padding: 1.5rem; }
|
||||||
/* `.dash-head` is deliberately bare: a block header whose two children carry
|
|
||||||
all the spacing between them (h1 zeroed, .dash-sub margined). Nothing in it
|
|
||||||
assumes a flex parent, which is the tell for a deleted rule (#2444). */
|
|
||||||
.dash-head h1 { margin: 0; font-family: 'Fraunces', Georgia, serif; }
|
.dash-head h1 { margin: 0; font-family: 'Fraunces', Georgia, serif; }
|
||||||
.dash-sub { margin: 0.2rem 0 1.25rem; color: var(--fs-text-tertiary); font-size: 0.9rem; }
|
.dash-sub { margin: 0.2rem 0 1.25rem; color: var(--color-muted); font-size: 0.9rem; }
|
||||||
.dash-label { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--fs-text-tertiary); margin-bottom: 0.6rem; }
|
.dash-label { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-muted); margin-bottom: 0.6rem; }
|
||||||
.dash-empty { color: var(--fs-text-tertiary); padding: 1rem 0; }
|
.dash-empty { color: var(--color-muted); padding: 1rem 0; }
|
||||||
.dash-empty.card { padding: 1rem; border: 1px dashed var(--fs-border-color); border-radius: 10px; }
|
.dash-empty.card { padding: 1rem; border: 1px dashed var(--color-border); border-radius: 10px; }
|
||||||
|
|
||||||
.done-recent { margin-bottom: 1.5rem; }
|
.done-recent { margin-bottom: 1.5rem; }
|
||||||
.done-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.55rem; border-radius: 7px; text-decoration: none; color: var(--fs-text-primary); font-size: 0.86rem; }
|
.done-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.55rem; border-radius: 7px; text-decoration: none; color: var(--color-text); font-size: 0.86rem; }
|
||||||
.done-row:hover { background: var(--fs-surface-hover); }
|
.done-row:hover { background: var(--color-hover); }
|
||||||
.done-mark { color: var(--fs-accent); flex-shrink: 0; }
|
.done-mark { color: var(--color-primary); flex-shrink: 0; }
|
||||||
.done-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
.done-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||||
.done-meta { font-size: 0.72rem; color: var(--fs-text-tertiary); white-space: nowrap; flex-shrink: 0; }
|
.done-meta { font-size: 0.72rem; color: var(--color-muted); white-space: nowrap; flex-shrink: 0; }
|
||||||
.done-more { background: none; border: none; cursor: pointer; margin-top: 0.25rem; padding: 0.2rem 0.55rem; font-size: 0.78rem; color: var(--fs-accent); font-family: inherit; }
|
.done-more { background: none; border: none; cursor: pointer; margin-top: 0.25rem; padding: 0.2rem 0.55rem; font-size: 0.78rem; color: var(--color-primary); font-family: inherit; }
|
||||||
.done-more:hover { text-decoration: underline; }
|
.done-more:hover { text-decoration: underline; }
|
||||||
|
|
||||||
.dash-cols { display: flex; gap: 1.25rem; align-items: flex-start; }
|
.dash-cols { display: flex; gap: 1.25rem; align-items: flex-start; }
|
||||||
.dash-main { flex: 1.7; min-width: 0; }
|
.dash-main { flex: 1.7; min-width: 0; }
|
||||||
.dash-rail { flex: 1; min-width: 240px; }
|
.dash-rail { flex: 1; min-width: 240px; }
|
||||||
|
|
||||||
.proj-panel { background: var(--fs-surface-hover); border: 1px solid var(--fs-border-color); border-radius: 12px; padding: 0.9rem 1rem; margin-bottom: 0.9rem; }
|
.proj-panel { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; padding: 0.9rem 1rem; margin-bottom: 0.9rem; }
|
||||||
.proj-head { display: flex; align-items: center; gap: 0.5rem; }
|
.proj-head { display: flex; align-items: center; gap: 0.5rem; }
|
||||||
.proj-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
|
.proj-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
|
||||||
.proj-title { font-weight: 700; color: var(--fs-text-primary); text-decoration: none; }
|
.proj-title { font-weight: 700; color: var(--color-text); text-decoration: none; }
|
||||||
.proj-title:hover { color: var(--fs-accent); }
|
.proj-title:hover { color: var(--color-primary); }
|
||||||
.proj-meta { margin-left: auto; font-size: 0.74rem; color: var(--fs-text-tertiary); }
|
.proj-meta { margin-left: auto; font-size: 0.74rem; color: var(--color-muted); }
|
||||||
.bar { height: 5px; background: var(--fs-border-color); border-radius: 3px; margin: 0.55rem 0 0.2rem; }
|
.bar { height: 5px; background: var(--color-border); border-radius: 3px; margin: 0.55rem 0 0.2rem; }
|
||||||
.bar-fill { height: 5px; background: var(--fs-accent); border-radius: 3px; }
|
.bar-fill { height: 5px; background: var(--color-primary); border-radius: 3px; }
|
||||||
|
|
||||||
.ms-block { margin-top: 0.7rem; }
|
.ms-block { margin-top: 0.7rem; }
|
||||||
.ms-head { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.3rem; }
|
.ms-head { display: flex; align-items: baseline; gap: 0.5rem; margin-bottom: 0.3rem; }
|
||||||
.ms-title { font-size: 0.82rem; font-weight: 600; color: var(--fs-text-primary); }
|
.ms-title { font-size: 0.82rem; font-weight: 600; color: var(--color-text); }
|
||||||
.ms-title.ms-none { color: var(--fs-text-tertiary); font-weight: 500; }
|
.ms-title.ms-none { color: var(--color-muted); font-weight: 500; }
|
||||||
.ms-pct { margin-left: auto; font-size: 0.72rem; color: var(--fs-text-tertiary); }
|
.ms-pct { margin-left: auto; font-size: 0.72rem; color: var(--color-muted); }
|
||||||
|
|
||||||
.task-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.55rem; border-radius: 7px; text-decoration: none; color: var(--fs-text-primary); font-size: 0.86rem; }
|
.task-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.55rem; border-radius: 7px; text-decoration: none; color: var(--color-text); font-size: 0.86rem; }
|
||||||
.task-row:hover { background: var(--fs-surface-hover); }
|
.task-row:hover { background: var(--color-hover); }
|
||||||
.task-inprogress { border-left: 3px solid var(--fs-accent); padding-left: calc(0.55rem - 3px); }
|
.task-inprogress { border-left: 3px solid var(--color-primary); padding-left: calc(0.55rem - 3px); }
|
||||||
.task-mark { color: var(--fs-text-tertiary); }
|
.task-mark { color: var(--color-muted); }
|
||||||
.task-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
.task-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||||
.task-pri { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; padding: 1px 6px; border-radius: 8px; border: 1px solid var(--fs-border-color); color: var(--fs-text-tertiary); }
|
.task-pri { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.04em; padding: 1px 6px; border-radius: 8px; border: 1px solid var(--color-border); color: var(--color-muted); }
|
||||||
.pri-high { color: #c0556b; border-color: #c0556b66; }
|
.pri-high { color: #c0556b; border-color: #c0556b66; }
|
||||||
.proj-more { display: inline-block; margin-top: 0.6rem; font-size: 0.78rem; color: var(--fs-accent); text-decoration: none; }
|
.proj-more { display: inline-block; margin-top: 0.6rem; font-size: 0.78rem; color: var(--color-primary); text-decoration: none; }
|
||||||
|
|
||||||
.rail-card { background: var(--fs-surface-hover); border: 1px solid var(--fs-border-color); border-radius: 12px; padding: 0.7rem 0.85rem; margin-bottom: 1.25rem; }
|
.rail-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; padding: 0.7rem 0.85rem; margin-bottom: 1.25rem; }
|
||||||
.stats { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.9rem; }
|
.stats { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.9rem; }
|
||||||
.stats-sub { color: var(--fs-text-tertiary); font-size: 0.78rem; }
|
.stats-sub { color: var(--color-muted); font-size: 0.78rem; }
|
||||||
.proj-stats { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.4rem 0.45rem; }
|
.proj-stats { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.4rem 0.45rem; }
|
||||||
.pstat-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.4rem; border-radius: 7px; text-decoration: none; color: var(--fs-text-primary); font-size: 0.85rem; }
|
.pstat-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.4rem; border-radius: 7px; text-decoration: none; color: var(--color-text); font-size: 0.85rem; }
|
||||||
.pstat-row:hover { background: var(--fs-surface-hover); }
|
.pstat-row:hover { background: var(--color-hover); }
|
||||||
.pstat-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
|
.pstat-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
|
||||||
.pstat-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
|
.pstat-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
|
||||||
.pstat-counts { font-size: 0.74rem; color: var(--fs-text-tertiary); white-space: nowrap; flex-shrink: 0; }
|
.pstat-counts { font-size: 0.74rem; color: var(--color-muted); white-space: nowrap; flex-shrink: 0; }
|
||||||
.quick-add { display: flex; flex-wrap: wrap; gap: 0.4rem; }
|
.quick-add { display: flex; flex-wrap: wrap; gap: 0.4rem; }
|
||||||
.qa-btn { background: var(--fs-surface-hover); border: 1px solid var(--fs-border-color); border-radius: 8px; padding: 6px 12px; font-size: 0.82rem; color: var(--fs-text-primary); text-decoration: none; }
|
.qa-btn { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 8px; padding: 6px 12px; font-size: 0.82rem; color: var(--color-text); text-decoration: none; }
|
||||||
.qa-btn:hover { border-color: var(--fs-accent); color: var(--fs-accent); }
|
.qa-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
|
||||||
|
|
||||||
.issues-card { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.4rem 0.45rem; }
|
.issues-card { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.4rem 0.45rem; }
|
||||||
.issue-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.4rem; border-radius: 7px; text-decoration: none; color: var(--fs-text-primary); font-size: 0.85rem; }
|
.issue-row { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0.4rem; border-radius: 7px; text-decoration: none; color: var(--color-text); font-size: 0.85rem; }
|
||||||
.issue-row:hover { background: var(--fs-surface-hover); }
|
.issue-row:hover { background: var(--color-hover); }
|
||||||
.issue-mark { color: var(--fs-text-tertiary); flex-shrink: 0; }
|
.issue-mark { color: var(--color-muted); flex-shrink: 0; }
|
||||||
.issue-mark.imk-in_progress { color: var(--fs-accent); }
|
.issue-mark.imk-in_progress { color: var(--color-primary); }
|
||||||
.issue-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
.issue-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||||
.issue-meta { font-size: 0.72rem; color: var(--fs-text-tertiary); white-space: nowrap; flex-shrink: 0; }
|
.issue-meta { font-size: 0.72rem; color: var(--color-muted); white-space: nowrap; flex-shrink: 0; }
|
||||||
|
|
||||||
@media (max-width: 760px) { .dash-cols { flex-direction: column; } }
|
@media (max-width: 760px) { .dash-cols { flex-direction: column; } }
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,13 +1,9 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
/**
|
/**
|
||||||
* Design systems — the stylesheets this install RECORDS, for the projects it
|
* Design systems — editing the stylesheet Scribe holds (milestone #254 step 5).
|
||||||
* tracks (milestone #254 step 5).
|
|
||||||
*
|
*
|
||||||
* It had a sibling, `/design`, which showed the system as the BROWSER had it —
|
* Sibling of /design, which shows the system as the BROWSER has it. This page
|
||||||
* names out of a bundled stylesheet, values out of `getComputedStyle`. That
|
* shows it as the RECORD has it, which is the half you can change.
|
||||||
* could only ever describe the install serving the page, so it was a mirror
|
|
||||||
* rather than a tool and was retired (#274). Everything here works on a system
|
|
||||||
* whose app this browser has never loaded.
|
|
||||||
*
|
*
|
||||||
* The layout follows the model rather than decorating it. A system with a
|
* The layout follows the model rather than decorating it. A system with a
|
||||||
* parent holds only what it changes, so this page has two lists and they are
|
* parent holds only what it changes, so this page has two lists and they are
|
||||||
@@ -43,10 +39,9 @@ import {
|
|||||||
type SnippetCheck,
|
type SnippetCheck,
|
||||||
type StylesheetResult,
|
type StylesheetResult,
|
||||||
} from "@/api/designSystems";
|
} from "@/api/designSystems";
|
||||||
|
import DesignTabs from "@/components/DesignTabs.vue";
|
||||||
import { ApiError } from "@/api/client";
|
import { ApiError } from "@/api/client";
|
||||||
import { useToastStore } from "@/stores/toast";
|
import { useToastStore } from "@/stores/toast";
|
||||||
import StarterRolePicker from "@/components/StarterRolePicker.vue";
|
|
||||||
import TokenPreview from "@/components/TokenPreview.vue";
|
|
||||||
|
|
||||||
const toast = useToastStore();
|
const toast = useToastStore();
|
||||||
|
|
||||||
@@ -153,10 +148,6 @@ const newTitle = ref("");
|
|||||||
const newDescription = ref("");
|
const newDescription = ref("");
|
||||||
const newParentId = ref<number | null>(null);
|
const newParentId = ref<number | null>(null);
|
||||||
const creating = ref(false);
|
const creating = ref(false);
|
||||||
// Starter roles (#2349). The picker fills these on mount; empty means the
|
|
||||||
// operator unchecked everything, which is a real answer.
|
|
||||||
const starterGroups = ref<string[]>([]);
|
|
||||||
const tokenPrefix = ref("");
|
|
||||||
|
|
||||||
async function submitCreate() {
|
async function submitCreate() {
|
||||||
const title = newTitle.value.trim();
|
const title = newTitle.value.trim();
|
||||||
@@ -167,16 +158,11 @@ async function submitCreate() {
|
|||||||
title,
|
title,
|
||||||
description: newDescription.value.trim() || undefined,
|
description: newDescription.value.trim() || undefined,
|
||||||
parent_id: newParentId.value,
|
parent_id: newParentId.value,
|
||||||
starter_role_groups: starterGroups.value.length ? starterGroups.value : undefined,
|
|
||||||
token_prefix: tokenPrefix.value.trim() || undefined,
|
|
||||||
});
|
});
|
||||||
newTitle.value = "";
|
newTitle.value = "";
|
||||||
newDescription.value = "";
|
newDescription.value = "";
|
||||||
newParentId.value = null;
|
newParentId.value = null;
|
||||||
showCreate.value = false;
|
showCreate.value = false;
|
||||||
// NOT reset: the picker owns these and re-seeds on mount. Clearing them
|
|
||||||
// here would race the next mount and silently create the following system
|
|
||||||
// with no roles at all.
|
|
||||||
await loadSystems();
|
await loadSystems();
|
||||||
selectedId.value = created.id;
|
selectedId.value = created.id;
|
||||||
toast.show(`Created ${created.title}`);
|
toast.show(`Created ${created.title}`);
|
||||||
@@ -493,28 +479,14 @@ watch(selectedId, () => {
|
|||||||
snippetCheck.value = null;
|
snippetCheck.value = null;
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
function isColourish(value: string): boolean {
|
||||||
* A colour this row can draw HONESTLY — self-contained, no `var()` inside.
|
return /^(#|rgba?\(|hsla?\(|color-mix\()/.test(value.trim());
|
||||||
*
|
|
||||||
* The provenance list below shows values as the record states them, and a
|
|
||||||
* `var()` reference states nothing on its own: rendering
|
|
||||||
* `color-mix(in srgb, var(--accent) 15%, transparent)` as a background resolves
|
|
||||||
* `--accent` against THIS app, so a system that isn't the one Scribe runs on
|
|
||||||
* would be drawn in Scribe's palette. It looked right, which is why it went
|
|
||||||
* unnoticed (#274).
|
|
||||||
*
|
|
||||||
* The preview above resolves values properly, on a probe carrying only that
|
|
||||||
* system's declarations. So this list draws only what needs no resolving, and
|
|
||||||
* leaves the rest to the surface built for it.
|
|
||||||
*/
|
|
||||||
function isSelfContainedColour(value: string): boolean {
|
|
||||||
const v = value.trim();
|
|
||||||
return /^(#|rgba?\(|hsla?\(|color-mix\()/.test(v) && !v.includes("var(");
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="ds-view">
|
<div class="ds-view">
|
||||||
|
<DesignTabs />
|
||||||
|
|
||||||
<header class="ds-header">
|
<header class="ds-header">
|
||||||
<h1>Design systems</h1>
|
<h1>Design systems</h1>
|
||||||
@@ -568,10 +540,6 @@ function isSelfContainedColour(value: string): boolean {
|
|||||||
placeholder="What it covers"
|
placeholder="What it covers"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<StarterRolePicker
|
|
||||||
v-model:selected="starterGroups"
|
|
||||||
v-model:prefix="tokenPrefix"
|
|
||||||
/>
|
|
||||||
<div class="row-actions">
|
<div class="row-actions">
|
||||||
<button class="btn-primary" :disabled="!newTitle.trim() || creating" @click="submitCreate">
|
<button class="btn-primary" :disabled="!newTitle.trim() || creating" @click="submitCreate">
|
||||||
{{ creating ? "Creating…" : "Create" }}
|
{{ creating ? "Creating…" : "Create" }}
|
||||||
@@ -633,10 +601,6 @@ function isSelfContainedColour(value: string): boolean {
|
|||||||
A system with a parent stores only its differences from it.
|
A system with a parent stores only its differences from it.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<StarterRolePicker
|
|
||||||
v-model:selected="starterGroups"
|
|
||||||
v-model:prefix="tokenPrefix"
|
|
||||||
/>
|
|
||||||
<button class="btn-primary" :disabled="!newTitle.trim() || creating" @click="submitCreate">
|
<button class="btn-primary" :disabled="!newTitle.trim() || creating" @click="submitCreate">
|
||||||
{{ creating ? "Creating…" : "Create" }}
|
{{ creating ? "Creating…" : "Create" }}
|
||||||
</button>
|
</button>
|
||||||
@@ -786,7 +750,7 @@ function isSelfContainedColour(value: string): boolean {
|
|||||||
<ul class="dupe-list">
|
<ul class="dupe-list">
|
||||||
<li v-for="[value, names] in duplicateEntries" :key="value">
|
<li v-for="[value, names] in duplicateEntries" :key="value">
|
||||||
<span
|
<span
|
||||||
v-if="isSelfContainedColour(value)" class="swatch"
|
v-if="isColourish(value)" class="swatch"
|
||||||
:style="{ background: value }" aria-hidden="true"
|
:style="{ background: value }" aria-hidden="true"
|
||||||
/>
|
/>
|
||||||
<code>{{ value }}</code> — {{ names.join(", ") }}
|
<code>{{ value }}</code> — {{ names.join(", ") }}
|
||||||
@@ -944,7 +908,7 @@ function isSelfContainedColour(value: string): boolean {
|
|||||||
<input v-model="row.mode" class="input mono mode-key" type="text" placeholder="base" />
|
<input v-model="row.mode" class="input mono mode-key" type="text" placeholder="base" />
|
||||||
<input v-model="row.value" class="input mono" type="text" placeholder="#14171a" />
|
<input v-model="row.value" class="input mono" type="text" placeholder="#14171a" />
|
||||||
<span
|
<span
|
||||||
v-if="isSelfContainedColour(row.value)" class="swatch"
|
v-if="isColourish(row.value)" class="swatch"
|
||||||
:style="{ background: row.value }" aria-hidden="true"
|
:style="{ background: row.value }" aria-hidden="true"
|
||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
@@ -982,7 +946,7 @@ function isSelfContainedColour(value: string): boolean {
|
|||||||
<span class="token-values">
|
<span class="token-values">
|
||||||
<span v-for="(value, mode) in token.value_by_mode" :key="mode" class="mode-chip">
|
<span v-for="(value, mode) in token.value_by_mode" :key="mode" class="mode-chip">
|
||||||
<span
|
<span
|
||||||
v-if="isSelfContainedColour(value)" class="swatch"
|
v-if="isColourish(value)" class="swatch"
|
||||||
:style="{ background: value }" aria-hidden="true"
|
:style="{ background: value }" aria-hidden="true"
|
||||||
/>
|
/>
|
||||||
<span class="mode-name">{{ mode }}</span>
|
<span class="mode-name">{{ mode }}</span>
|
||||||
@@ -1005,18 +969,6 @@ function isSelfContainedColour(value: string): boolean {
|
|||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<!-- What it looks like. Drawn from the record on an isolated probe,
|
|
||||||
so this is THIS system's palette even when the app around it is
|
|
||||||
running a different one. -->
|
|
||||||
<section v-if="resolved.length" class="ds-section">
|
|
||||||
<h2>Preview</h2>
|
|
||||||
<p class="section-note">
|
|
||||||
{{ selected.title }} as it would render — resolved from the record,
|
|
||||||
not from the stylesheet this app happens to be running.
|
|
||||||
</p>
|
|
||||||
<TokenPreview :tokens="resolved" />
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<!-- Effective set -->
|
<!-- Effective set -->
|
||||||
<section class="ds-section">
|
<section class="ds-section">
|
||||||
<h2>Effective tokens</h2>
|
<h2>Effective tokens</h2>
|
||||||
@@ -1050,7 +1002,7 @@ function isSelfContainedColour(value: string): boolean {
|
|||||||
<div v-if="hasUniformOrigin(token)" class="resolved-modes">
|
<div v-if="hasUniformOrigin(token)" class="resolved-modes">
|
||||||
<span v-for="origin in modeOrigins(token)" :key="origin.mode" class="mode-chip">
|
<span v-for="origin in modeOrigins(token)" :key="origin.mode" class="mode-chip">
|
||||||
<span
|
<span
|
||||||
v-if="isSelfContainedColour(origin.value)" class="swatch"
|
v-if="isColourish(origin.value)" class="swatch"
|
||||||
:style="{ background: origin.value }" aria-hidden="true"
|
:style="{ background: origin.value }" aria-hidden="true"
|
||||||
/>
|
/>
|
||||||
<span class="mode-name">{{ origin.mode }}</span>
|
<span class="mode-name">{{ origin.mode }}</span>
|
||||||
@@ -1071,7 +1023,7 @@ function isSelfContainedColour(value: string): boolean {
|
|||||||
<div v-for="origin in modeOrigins(token)" :key="origin.mode" class="mode-line">
|
<div v-for="origin in modeOrigins(token)" :key="origin.mode" class="mode-line">
|
||||||
<span class="mode-chip">
|
<span class="mode-chip">
|
||||||
<span
|
<span
|
||||||
v-if="isSelfContainedColour(origin.value)" class="swatch"
|
v-if="isColourish(origin.value)" class="swatch"
|
||||||
:style="{ background: origin.value }" aria-hidden="true"
|
:style="{ background: origin.value }" aria-hidden="true"
|
||||||
/>
|
/>
|
||||||
<span class="mode-name">{{ origin.mode }}</span>
|
<span class="mode-name">{{ origin.mode }}</span>
|
||||||
@@ -1102,12 +1054,6 @@ function isSelfContainedColour(value: string): boolean {
|
|||||||
padding: 1.5rem 1rem 4rem;
|
padding: 1.5rem 1rem 4rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Restored with the same sweep that took `.milestone-header` — only the `h1`
|
|
||||||
descendant rule survived, so the header had no spacing of its own. */
|
|
||||||
.ds-header {
|
|
||||||
margin-bottom: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ds-header h1 {
|
.ds-header h1 {
|
||||||
margin: 0 0 0.5rem;
|
margin: 0 0 0.5rem;
|
||||||
font-size: 1.75rem;
|
font-size: 1.75rem;
|
||||||
@@ -1115,7 +1061,7 @@ function isSelfContainedColour(value: string): boolean {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.lede {
|
.lede {
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
max-width: 70ch;
|
max-width: 70ch;
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
margin: 0 0 1.5rem;
|
margin: 0 0 1.5rem;
|
||||||
@@ -1137,9 +1083,9 @@ function isSelfContainedColour(value: string): boolean {
|
|||||||
/* Sidebar ---------------------------------------------------------------- */
|
/* Sidebar ---------------------------------------------------------------- */
|
||||||
|
|
||||||
.ds-sidebar {
|
.ds-sidebar {
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-lg);
|
border-radius: var(--radius-md);
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1156,7 +1102,7 @@ function isSelfContainedColour(value: string): boolean {
|
|||||||
font-size: 0.75rem;
|
font-size: 0.75rem;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.08em;
|
letter-spacing: 0.08em;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
.system-list {
|
.system-list {
|
||||||
@@ -1173,22 +1119,22 @@ function isSelfContainedColour(value: string): boolean {
|
|||||||
text-align: left;
|
text-align: left;
|
||||||
background: none;
|
background: none;
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
padding: 0.5rem 0.6rem;
|
padding: 0.5rem 0.6rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 0.15rem;
|
gap: 0.15rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.system-btn:hover {
|
.system-btn:hover {
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.system-btn.active {
|
.system-btn.active {
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary);
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1198,7 +1144,7 @@ function isSelfContainedColour(value: string): boolean {
|
|||||||
|
|
||||||
.system-kind {
|
.system-kind {
|
||||||
font-size: 0.75rem;
|
font-size: 0.75rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Sections --------------------------------------------------------------- */
|
/* Sections --------------------------------------------------------------- */
|
||||||
@@ -1211,9 +1157,9 @@ function isSelfContainedColour(value: string): boolean {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.ds-section {
|
.ds-section {
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-lg);
|
border-radius: var(--radius-md);
|
||||||
padding: 1.25rem;
|
padding: 1.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1232,7 +1178,7 @@ function isSelfContainedColour(value: string): boolean {
|
|||||||
|
|
||||||
.section-note,
|
.section-note,
|
||||||
.muted {
|
.muted {
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
margin: 0 0 1rem;
|
margin: 0 0 1rem;
|
||||||
}
|
}
|
||||||
@@ -1247,17 +1193,17 @@ function isSelfContainedColour(value: string): boolean {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.chain-link {
|
.chain-link {
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.chain-link.self {
|
.chain-link.self {
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chain-arrow,
|
.chain-arrow,
|
||||||
.chain-note {
|
.chain-note {
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Fields ----------------------------------------------------------------- */
|
/* Fields ----------------------------------------------------------------- */
|
||||||
@@ -1282,24 +1228,24 @@ function isSelfContainedColour(value: string): boolean {
|
|||||||
font-size: 0.75rem;
|
font-size: 0.75rem;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.08em;
|
letter-spacing: 0.08em;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
margin-bottom: 0.3rem;
|
margin-bottom: 0.3rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.field-hint {
|
.field-hint {
|
||||||
margin: 0.3rem 0 0;
|
margin: 0.3rem 0 0;
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input {
|
.input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0.45rem 0.6rem;
|
padding: 0.45rem 0.6rem;
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-bg);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
font: inherit;
|
font: inherit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1328,15 +1274,15 @@ textarea.input {
|
|||||||
|
|
||||||
.confirm-copy {
|
.confirm-copy {
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
max-width: 40ch;
|
max-width: 40ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Tokens ----------------------------------------------------------------- */
|
/* Tokens ----------------------------------------------------------------- */
|
||||||
|
|
||||||
.token-form {
|
.token-form {
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
}
|
}
|
||||||
@@ -1371,7 +1317,7 @@ textarea.input {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.6rem;
|
gap: 0.6rem;
|
||||||
padding: 0.5rem 0;
|
padding: 0.5rem 0;
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.token-name {
|
.token-name {
|
||||||
@@ -1386,7 +1332,7 @@ textarea.input {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.token-meta {
|
.token-meta {
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
@@ -1405,18 +1351,18 @@ textarea.input {
|
|||||||
|
|
||||||
.finding-list li {
|
.finding-list li {
|
||||||
padding: 0.6rem 0;
|
padding: 0.6rem 0;
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.finding-title {
|
.finding-title {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
}
|
}
|
||||||
|
|
||||||
.finding-line {
|
.finding-line {
|
||||||
margin: 0.3rem 0 0;
|
margin: 0.3rem 0 0;
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -1428,24 +1374,24 @@ textarea.input {
|
|||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.06em;
|
letter-spacing: 0.06em;
|
||||||
padding: 0.1rem 0.45rem;
|
padding: 0.1rem 0.45rem;
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
flex: none;
|
flex: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.spec-status.violated {
|
.spec-status.violated {
|
||||||
background: var(--fs-priority-high-bg);
|
background: var(--color-priority-high-bg);
|
||||||
color: var(--fs-priority-high);
|
color: var(--color-priority-high);
|
||||||
}
|
}
|
||||||
|
|
||||||
.spec-status.missing {
|
.spec-status.missing {
|
||||||
background: var(--fs-priority-medium-bg);
|
background: var(--color-priority-medium-bg);
|
||||||
color: var(--fs-priority-medium);
|
color: var(--color-priority-medium);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sheet {
|
.sheet {
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-bg);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
padding: 0.75rem 1rem;
|
padding: 0.75rem 1rem;
|
||||||
margin-top: 0.75rem;
|
margin-top: 0.75rem;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
@@ -1472,7 +1418,7 @@ textarea.input {
|
|||||||
|
|
||||||
.supersedes {
|
.supersedes {
|
||||||
font-size: 0.75rem;
|
font-size: 0.75rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1484,7 +1430,7 @@ textarea.input {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.mode-name {
|
.mode-name {
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
font-size: 0.7rem;
|
font-size: 0.7rem;
|
||||||
letter-spacing: 0.06em;
|
letter-spacing: 0.06em;
|
||||||
@@ -1495,7 +1441,7 @@ textarea.input {
|
|||||||
width: 0.9rem;
|
width: 0.9rem;
|
||||||
height: 0.9rem;
|
height: 0.9rem;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
flex: none;
|
flex: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1510,12 +1456,12 @@ textarea.input {
|
|||||||
font-size: 0.7rem;
|
font-size: 0.7rem;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.08em;
|
letter-spacing: 0.08em;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
.resolved-list li {
|
.resolved-list li {
|
||||||
padding: 0.5rem 0;
|
padding: 0.5rem 0;
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.resolved-head {
|
.resolved-head {
|
||||||
@@ -1551,33 +1497,33 @@ textarea.input {
|
|||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.06em;
|
letter-spacing: 0.06em;
|
||||||
padding: 0.1rem 0.45rem;
|
padding: 0.1rem 0.45rem;
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
.origin-badge.own {
|
.origin-badge.own {
|
||||||
background: var(--fs-accent-soft);
|
background: var(--color-primary-tint);
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Notices ---------------------------------------------------------------- */
|
/* Notices ---------------------------------------------------------------- */
|
||||||
|
|
||||||
.notice {
|
.notice {
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-lg);
|
border-radius: var(--radius-md);
|
||||||
padding: 1.25rem;
|
padding: 1.25rem;
|
||||||
max-width: 60ch;
|
max-width: 60ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
.notice-warn {
|
.notice-warn {
|
||||||
border-left: 3px solid var(--fs-warning);
|
border-left: 3px solid var(--color-warning);
|
||||||
}
|
}
|
||||||
|
|
||||||
.notice p {
|
.notice p {
|
||||||
margin: 0.5rem 0 1rem;
|
margin: 0.5rem 0 1rem;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -0,0 +1,545 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
/**
|
||||||
|
* Design explorer — the gallery (milestone #251 step 3).
|
||||||
|
*
|
||||||
|
* Renders the design system against the tokens that are actually live, read at
|
||||||
|
* runtime rather than parsed from source, so what you see here is what the app
|
||||||
|
* is using right now.
|
||||||
|
*
|
||||||
|
* HONESTY RULE, and the reason parts of this page say "not implemented":
|
||||||
|
* a gallery of hand-written look-alikes drifts from the app within a month and
|
||||||
|
* then lies — which is the same failure this whole surface exists to catch. So
|
||||||
|
* every specimen below is either a REAL component imported from the app, or a
|
||||||
|
* real token read from the browser, or it is explicitly marked as missing.
|
||||||
|
*
|
||||||
|
* Buttons WERE the case where that bit: `.btn-primary` was defined five times
|
||||||
|
* in five `<style scoped>` blocks, all five drifted, and this page reported it
|
||||||
|
* as a gap because drawing a look-alike would have made it a sixth copy.
|
||||||
|
* `assets/components.css` is now the single definition (#2273), so the
|
||||||
|
* specimens below are the app's real classes — they cannot drift from the app
|
||||||
|
* without drifting the app itself.
|
||||||
|
*/
|
||||||
|
import { computed, onMounted, ref } from "vue";
|
||||||
|
|
||||||
|
import { fetchDesignExpectations } from "@/api/design";
|
||||||
|
import DesignTabs from "@/components/DesignTabs.vue";
|
||||||
|
import PriorityBadge from "@/components/PriorityBadge.vue";
|
||||||
|
import StatusBadge from "@/components/StatusBadge.vue";
|
||||||
|
import TagPill from "@/components/TagPill.vue";
|
||||||
|
import {
|
||||||
|
compareToTokens,
|
||||||
|
rankFindings,
|
||||||
|
summarise,
|
||||||
|
type Expectation,
|
||||||
|
type Finding,
|
||||||
|
} from "@/utils/designDrift";
|
||||||
|
import { groupTokens, readTokens, type DesignToken, type TokenGroup } from "@/utils/designTokens";
|
||||||
|
|
||||||
|
const tokens = ref<DesignToken[]>([]);
|
||||||
|
const expectations = ref<Expectation[]>([]);
|
||||||
|
const designRulebookId = ref<number | null>(null);
|
||||||
|
const driftLoaded = ref(false);
|
||||||
|
const showCleanRows = ref(false);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Read on mount, not at module scope: the values depend on the live cascade,
|
||||||
|
* which needs the app's stylesheets applied and the theme attribute set.
|
||||||
|
*/
|
||||||
|
onMounted(async () => {
|
||||||
|
tokens.value = readTokens();
|
||||||
|
try {
|
||||||
|
const response = await fetchDesignExpectations();
|
||||||
|
designRulebookId.value = response.rulebook_id;
|
||||||
|
expectations.value = response.expectations;
|
||||||
|
} catch {
|
||||||
|
// The gallery is useful without the panel, so a failed fetch degrades to
|
||||||
|
// "no drift data" rather than taking the page down with it.
|
||||||
|
designRulebookId.value = null;
|
||||||
|
} finally {
|
||||||
|
driftLoaded.value = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const findings = computed<Finding[]>(() =>
|
||||||
|
rankFindings(compareToTokens(expectations.value, tokens.value)),
|
||||||
|
);
|
||||||
|
const driftSummary = computed(() => summarise(findings.value));
|
||||||
|
const visibleFindings = computed(() =>
|
||||||
|
showCleanRows.value ? findings.value : findings.value.filter((f) => f.status !== "ok"),
|
||||||
|
);
|
||||||
|
|
||||||
|
const grouped = computed(() => groupTokens(tokens.value));
|
||||||
|
|
||||||
|
const GROUP_ORDER: TokenGroup[] = ["color", "radius", "glow", "gradient", "focus", "layout", "other"];
|
||||||
|
const orderedGroups = computed(() =>
|
||||||
|
GROUP_ORDER.filter((g) => grouped.value.has(g)).map((g) => ({ group: g, tokens: grouped.value.get(g)! })),
|
||||||
|
);
|
||||||
|
|
||||||
|
/** A token whose value reads as a colour is worth showing as a swatch. */
|
||||||
|
function isColourish(value: string): boolean {
|
||||||
|
return /^(#|rgba?\(|hsla?\(|color-mix\()/.test(value.trim());
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Rule 65's four variants — none of which exists as a shared artifact (#2273). */
|
||||||
|
const RULEBOOK_BUTTONS = [
|
||||||
|
{ name: "Primary", spec: "Moss #4A5D3F bg, Parchment text, no border" },
|
||||||
|
{ name: "Secondary", spec: "Bronze #8B7355 bg, Parchment text, no border" },
|
||||||
|
{ name: "Ghost", spec: "transparent, Parchment text, 0.5px Pewter border" },
|
||||||
|
{ name: "Destructive", spec: "Oxblood #6B2118 bg, Parchment text, pair with icon" },
|
||||||
|
];
|
||||||
|
|
||||||
|
const TYPE_SPECIMENS = [
|
||||||
|
{ token: "Display", spec: "40 / 500 / Fraunces" },
|
||||||
|
{ token: "H1", spec: "32 / 500 / Fraunces" },
|
||||||
|
{ token: "H2", spec: "24 / 500 / Fraunces" },
|
||||||
|
{ token: "H3", spec: "18 / 500 / Inter" },
|
||||||
|
{ token: "Body", spec: "15 / 400 / Inter" },
|
||||||
|
{ token: "Body small", spec: "13 / 400 / Inter" },
|
||||||
|
{ token: "Label", spec: "12 / 500 / Inter" },
|
||||||
|
{ token: "Code", spec: "13 / 400 / JetBrains Mono" },
|
||||||
|
{ token: "Tiny", spec: "11 / 500 / Inter, uppercase +0.08em" },
|
||||||
|
];
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="design-view">
|
||||||
|
<DesignTabs />
|
||||||
|
|
||||||
|
<header class="design-header">
|
||||||
|
<h1>Live tokens</h1>
|
||||||
|
<p class="lede">
|
||||||
|
The system as it actually is. Token values are read from the browser at
|
||||||
|
runtime, so this page reflects the live cascade rather than what the
|
||||||
|
stylesheet says. Components shown are the real ones — where a piece of
|
||||||
|
the system has no shared implementation, it is marked missing rather
|
||||||
|
than mocked up.
|
||||||
|
</p>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<!-- Drift: what the rulebook claims vs what the tokens do. -->
|
||||||
|
<section class="design-section">
|
||||||
|
<h2>Rulebook drift</h2>
|
||||||
|
|
||||||
|
<p v-if="!driftLoaded" class="muted">Checking against the design rulebook…</p>
|
||||||
|
|
||||||
|
<div v-else-if="designRulebookId === null" class="gap-notice">
|
||||||
|
<strong>No design rulebook designated.</strong>
|
||||||
|
<p>
|
||||||
|
This install hasn't said which rulebook describes its design system, so
|
||||||
|
there is nothing to check the tokens against. Designate one in
|
||||||
|
<router-link to="/settings">Settings</router-link> and this panel will
|
||||||
|
compare every colour and token the rulebook names against what the
|
||||||
|
stylesheet actually resolves to.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<template v-else>
|
||||||
|
<p class="section-note">
|
||||||
|
<strong>{{ driftSummary.violated }}</strong> violated ·
|
||||||
|
<strong>{{ driftSummary.missing }}</strong> missing ·
|
||||||
|
{{ driftSummary.ok }} matching, from {{ driftSummary.total }} checkable
|
||||||
|
claims in rulebook #{{ designRulebookId }}.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="gap-notice">
|
||||||
|
<strong>This compares the rulebook against the TOKENS only.</strong>
|
||||||
|
<p>
|
||||||
|
A value hardcoded in a component — where a token should have been
|
||||||
|
referenced — is invisible here, because the drift isn't in the tokens
|
||||||
|
at all. Reading it would mean bundling every component's source into
|
||||||
|
the app. That check belongs in CI and is tracked separately, so treat
|
||||||
|
a clean panel as "the tokens agree", not "the app agrees".
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p v-if="!findings.length" class="muted">
|
||||||
|
The rulebook names nothing this panel can check. Rules that state values
|
||||||
|
— colours, token names — produce claims; rules that state judgement
|
||||||
|
don't, by design.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<ul v-else class="spec-list">
|
||||||
|
<li v-for="finding in visibleFindings" :key="`${finding.expectation.kind}:${finding.expectation.value}`">
|
||||||
|
<span class="spec-name">
|
||||||
|
<span
|
||||||
|
v-if="finding.expectation.kind !== 'token'"
|
||||||
|
class="swatch"
|
||||||
|
:style="{ background: finding.expectation.value }"
|
||||||
|
aria-hidden="true"
|
||||||
|
/>
|
||||||
|
<code>{{ finding.expectation.value }}</code>
|
||||||
|
</span>
|
||||||
|
<span class="spec-detail">
|
||||||
|
rule #{{ finding.expectation.rule_id }} — {{ finding.expectation.rule_title }}
|
||||||
|
<span v-if="finding.matches.length" class="matches">
|
||||||
|
· {{ finding.matches.join(", ") }}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
<span class="spec-status" :class="finding.status">
|
||||||
|
{{ finding.status === "violated" ? "forbidden, but present"
|
||||||
|
: finding.status === "missing" ? "not in the stylesheet" : "ok" }}
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<button
|
||||||
|
v-if="findings.length && driftSummary.ok"
|
||||||
|
class="reveal-toggle"
|
||||||
|
@click="showCleanRows = !showCleanRows"
|
||||||
|
>
|
||||||
|
{{ showCleanRows ? "Hide" : "Show" }} the {{ driftSummary.ok }} matching claims
|
||||||
|
</button>
|
||||||
|
</template>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- Real components: these are imported, not recreated. -->
|
||||||
|
<section class="design-section">
|
||||||
|
<h2>Components</h2>
|
||||||
|
<p class="section-note">Imported from the app. What you see is what ships.</p>
|
||||||
|
|
||||||
|
<div class="specimen">
|
||||||
|
<span class="specimen-label">Status badge</span>
|
||||||
|
<div class="specimen-row">
|
||||||
|
<StatusBadge status="todo" />
|
||||||
|
<StatusBadge status="in_progress" />
|
||||||
|
<StatusBadge status="done" />
|
||||||
|
<StatusBadge status="cancelled" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="specimen">
|
||||||
|
<span class="specimen-label">Priority badge</span>
|
||||||
|
<div class="specimen-row">
|
||||||
|
<PriorityBadge priority="low" />
|
||||||
|
<PriorityBadge priority="medium" />
|
||||||
|
<PriorityBadge priority="high" />
|
||||||
|
<span class="muted">(<code>none</code> renders nothing, by design)</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="specimen">
|
||||||
|
<span class="specimen-label">Tag pill</span>
|
||||||
|
<div class="specimen-row">
|
||||||
|
<TagPill tag="design-system" />
|
||||||
|
<TagPill tag="dismissible" dismissible />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- No longer a gap: these are the app's real classes, from the shared
|
||||||
|
sheet. Nothing here is a look-alike — change components.css and these
|
||||||
|
specimens change with it, which is the only way this page stays true. -->
|
||||||
|
<section class="design-section">
|
||||||
|
<h2>Buttons</h2>
|
||||||
|
<div class="button-specimens">
|
||||||
|
<button class="btn-primary">Save</button>
|
||||||
|
<button class="btn-secondary">Detect</button>
|
||||||
|
<button class="btn-ghost">Cancel</button>
|
||||||
|
<button class="btn-danger">Delete</button>
|
||||||
|
<button class="btn-primary" disabled>Disabled</button>
|
||||||
|
</div>
|
||||||
|
<p class="spec-caption">
|
||||||
|
Three sizes, because the app has three kinds of button: a page action, a
|
||||||
|
row action, and an affordance that sits inside a card without disturbing
|
||||||
|
its rhythm.
|
||||||
|
</p>
|
||||||
|
<div class="button-specimens">
|
||||||
|
<button class="btn-primary">Default — page action</button>
|
||||||
|
<button class="btn-primary btn-compact">Compact — row action</button>
|
||||||
|
<button class="btn-primary btn-inline">Inline</button>
|
||||||
|
</div>
|
||||||
|
<ul class="spec-list">
|
||||||
|
<li v-for="b in RULEBOOK_BUTTONS" :key="b.name">
|
||||||
|
<span class="spec-name">{{ b.name }}</span>
|
||||||
|
<span class="spec-detail">{{ b.spec }}</span>
|
||||||
|
<span class="spec-status ok">shared</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- Typography: the families load, the scale does not exist as tokens. -->
|
||||||
|
<section class="design-section">
|
||||||
|
<h2>Type scale</h2>
|
||||||
|
<div class="gap-notice">
|
||||||
|
<strong>Families load; the scale has no tokens.</strong>
|
||||||
|
<p>
|
||||||
|
Fraunces, Inter and JetBrains Mono are imported (rule 59), but rule 60's
|
||||||
|
scale is not expressed as custom properties, so sizes and weights are
|
||||||
|
set ad hoc per component. Listed here as specification, not as a live
|
||||||
|
specimen — there is nothing to read.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<ul class="spec-list">
|
||||||
|
<li v-for="t in TYPE_SPECIMENS" :key="t.token">
|
||||||
|
<span class="spec-name">{{ t.token }}</span>
|
||||||
|
<span class="spec-detail">{{ t.spec }}</span>
|
||||||
|
<span class="spec-status missing">no token</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- Tokens: entirely real, read live. -->
|
||||||
|
<section v-for="{ group, tokens: groupTokenList } in orderedGroups" :key="group" class="design-section">
|
||||||
|
<h2 class="token-group-heading">{{ group }} <span class="count">{{ groupTokenList.length }}</span></h2>
|
||||||
|
<ul class="token-list">
|
||||||
|
<li v-for="token in groupTokenList" :key="token.name" class="token-row">
|
||||||
|
<span
|
||||||
|
v-if="isColourish(token.value)"
|
||||||
|
class="swatch"
|
||||||
|
:style="{ background: token.value }"
|
||||||
|
aria-hidden="true"
|
||||||
|
/>
|
||||||
|
<span v-else class="swatch swatch-none" aria-hidden="true" />
|
||||||
|
<code class="token-name">{{ token.name }}</code>
|
||||||
|
<code class="token-value">{{ token.value || "—" }}</code>
|
||||||
|
<span v-if="token.overriddenInDark" class="token-flag" title="Re-declared in the dark block">
|
||||||
|
mode-aware
|
||||||
|
</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<p v-if="!tokens.length" class="muted">Reading tokens…</p>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.design-view {
|
||||||
|
max-width: var(--page-max-width);
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 1.5rem var(--page-padding-x) 4rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.design-header {
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lede {
|
||||||
|
color: var(--color-text-secondary);
|
||||||
|
max-width: 60ch;
|
||||||
|
line-height: 1.7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.design-section {
|
||||||
|
margin-bottom: 2.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.design-section h2 {
|
||||||
|
margin-bottom: 0.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.token-group-heading {
|
||||||
|
text-transform: capitalize;
|
||||||
|
}
|
||||||
|
|
||||||
|
.count {
|
||||||
|
color: var(--color-text-muted);
|
||||||
|
font-size: 0.8rem;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-note,
|
||||||
|
.muted {
|
||||||
|
color: var(--color-text-muted);
|
||||||
|
font-size: 0.85rem;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Specimens -------------------------------------------------------------- */
|
||||||
|
|
||||||
|
.specimen {
|
||||||
|
padding: 0.75rem 0;
|
||||||
|
border-bottom: 1px solid var(--color-border);
|
||||||
|
}
|
||||||
|
|
||||||
|
.specimen-label {
|
||||||
|
display: block;
|
||||||
|
font-size: 0.75rem;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.08em;
|
||||||
|
color: var(--color-text-muted);
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.specimen-row {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 0.5rem;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Gaps ------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
.spec-caption {
|
||||||
|
margin: 0 0 0.75rem;
|
||||||
|
color: var(--color-text-secondary);
|
||||||
|
font-size: 0.85rem;
|
||||||
|
line-height: 1.5;
|
||||||
|
max-width: 60ch;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Layout only. The buttons inside style themselves from the shared sheet —
|
||||||
|
adding any appearance rule here would recreate the copy this section
|
||||||
|
just stopped being. */
|
||||||
|
.button-specimens {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
align-items: center;
|
||||||
|
gap: var(--fs-space-3);
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gap-notice {
|
||||||
|
background: var(--color-surface);
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
|
border-left: 3px solid var(--color-warning);
|
||||||
|
border-radius: var(--radius-sm);
|
||||||
|
padding: 0.75rem 1rem;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gap-notice p {
|
||||||
|
margin: 0.5rem 0 0;
|
||||||
|
color: var(--color-text-secondary);
|
||||||
|
font-size: 0.9rem;
|
||||||
|
line-height: 1.6;
|
||||||
|
max-width: 70ch;
|
||||||
|
}
|
||||||
|
|
||||||
|
.spec-list {
|
||||||
|
list-style: none;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.spec-list li {
|
||||||
|
display: flex;
|
||||||
|
align-items: baseline;
|
||||||
|
gap: 0.75rem;
|
||||||
|
padding: 0.4rem 0;
|
||||||
|
border-bottom: 1px solid var(--color-border);
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.spec-name {
|
||||||
|
min-width: 8rem;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.spec-detail {
|
||||||
|
color: var(--color-text-secondary);
|
||||||
|
font-size: 0.85rem;
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.spec-status {
|
||||||
|
font-size: 0.7rem;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.08em;
|
||||||
|
padding: 0.1rem 0.45rem;
|
||||||
|
border-radius: var(--radius-sm);
|
||||||
|
}
|
||||||
|
|
||||||
|
.spec-status.missing {
|
||||||
|
background: var(--color-priority-medium-bg);
|
||||||
|
color: var(--color-priority-medium);
|
||||||
|
}
|
||||||
|
|
||||||
|
.spec-status.violated {
|
||||||
|
background: var(--color-priority-high-bg);
|
||||||
|
color: var(--color-priority-high);
|
||||||
|
}
|
||||||
|
|
||||||
|
.spec-status.ok {
|
||||||
|
background: var(--color-status-done-bg);
|
||||||
|
color: var(--color-status-done);
|
||||||
|
}
|
||||||
|
|
||||||
|
.spec-name .swatch {
|
||||||
|
vertical-align: middle;
|
||||||
|
margin-right: 0.4rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.matches {
|
||||||
|
color: var(--color-text-muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal-toggle {
|
||||||
|
margin-top: 0.75rem;
|
||||||
|
padding: 0.35rem 0.75rem;
|
||||||
|
background: transparent;
|
||||||
|
color: var(--color-text-secondary);
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
|
border-radius: var(--radius-sm);
|
||||||
|
cursor: pointer;
|
||||||
|
font-family: inherit;
|
||||||
|
font-size: 0.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reveal-toggle:hover {
|
||||||
|
border-color: var(--color-text-muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Tokens ----------------------------------------------------------------- */
|
||||||
|
|
||||||
|
.token-list {
|
||||||
|
list-style: none;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.token-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.75rem;
|
||||||
|
padding: 0.3rem 0;
|
||||||
|
border-bottom: 1px solid var(--color-border);
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.swatch {
|
||||||
|
width: 1.25rem;
|
||||||
|
height: 1.25rem;
|
||||||
|
flex: none;
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
|
border-radius: var(--radius-sm);
|
||||||
|
}
|
||||||
|
|
||||||
|
.swatch-none {
|
||||||
|
background: repeating-linear-gradient(
|
||||||
|
45deg,
|
||||||
|
transparent,
|
||||||
|
transparent 3px,
|
||||||
|
var(--color-border) 3px,
|
||||||
|
var(--color-border) 4px
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
.token-name {
|
||||||
|
min-width: 16rem;
|
||||||
|
font-size: 0.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.token-value {
|
||||||
|
color: var(--color-text-secondary);
|
||||||
|
font-size: 0.8rem;
|
||||||
|
flex: 1;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
|
||||||
|
.token-flag {
|
||||||
|
font-size: 0.65rem;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.08em;
|
||||||
|
color: var(--color-text-muted);
|
||||||
|
border: 1px solid var(--color-border);
|
||||||
|
border-radius: var(--radius-sm);
|
||||||
|
padding: 0.05rem 0.35rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 640px) {
|
||||||
|
.token-name {
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -78,9 +78,9 @@ async function handleSubmit() {
|
|||||||
.auth-card {
|
.auth-card {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-lg);
|
border-radius: var(--radius-md);
|
||||||
padding: 2rem;
|
padding: 2rem;
|
||||||
}
|
}
|
||||||
.auth-brand {
|
.auth-brand {
|
||||||
@@ -97,7 +97,7 @@ async function handleSubmit() {
|
|||||||
.auth-hint {
|
.auth-hint {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
}
|
}
|
||||||
.field {
|
.field {
|
||||||
@@ -112,25 +112,25 @@ async function handleSubmit() {
|
|||||||
.input {
|
.input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0.5rem 0.75rem;
|
padding: 0.5rem 0.75rem;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
font-size: 0.95rem;
|
font-size: 0.95rem;
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-bg);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
.input:focus {
|
.input:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary);
|
||||||
}
|
}
|
||||||
.error-msg {
|
.error-msg {
|
||||||
color: var(--fs-error);
|
color: var(--color-danger);
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
margin: 0 0 0.75rem;
|
margin: 0 0 0.75rem;
|
||||||
}
|
}
|
||||||
.success-msg {
|
.success-msg {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
font-size: 0.95rem;
|
font-size: 0.95rem;
|
||||||
padding: 0.5rem 0;
|
padding: 0.5rem 0;
|
||||||
}
|
}
|
||||||
@@ -140,10 +140,10 @@ async function handleSubmit() {
|
|||||||
.auth-footer {
|
.auth-footer {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
margin: 1rem 0 0;
|
margin: 1rem 0 0;
|
||||||
}
|
}
|
||||||
.auth-footer a {
|
.auth-footer a {
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ function initGraph() {
|
|||||||
.attr("orient", "auto")
|
.attr("orient", "auto")
|
||||||
.append("path")
|
.append("path")
|
||||||
.attr("d", "M0,-4L8,0L0,4")
|
.attr("d", "M0,-4L8,0L0,4")
|
||||||
.attr("fill", "var(--fs-accent)")
|
.attr("fill", "var(--color-primary)")
|
||||||
.attr("opacity", "0.6");
|
.attr("opacity", "0.6");
|
||||||
|
|
||||||
// Zoom layer
|
// Zoom layer
|
||||||
@@ -237,7 +237,7 @@ function initGraph() {
|
|||||||
.append("line")
|
.append("line")
|
||||||
.attr("class", "graph-edge")
|
.attr("class", "graph-edge")
|
||||||
.attr("stroke", (d: any) =>
|
.attr("stroke", (d: any) =>
|
||||||
d.type === "wikilink" ? "var(--fs-accent)" : "var(--fs-text-tertiary)"
|
d.type === "wikilink" ? "var(--color-primary)" : "var(--color-text-muted)"
|
||||||
)
|
)
|
||||||
.attr("stroke-opacity", (d: any) => (d.type === "wikilink" ? 0.5 : 0.4))
|
.attr("stroke-opacity", (d: any) => (d.type === "wikilink" ? 0.5 : 0.4))
|
||||||
.attr("stroke-dasharray", null)
|
.attr("stroke-dasharray", null)
|
||||||
@@ -295,11 +295,11 @@ function initGraph() {
|
|||||||
.append("circle")
|
.append("circle")
|
||||||
.attr("r", (d: GraphNode) => d.radius ?? 8)
|
.attr("r", (d: GraphNode) => d.radius ?? 8)
|
||||||
.attr("fill", (d: GraphNode) => {
|
.attr("fill", (d: GraphNode) => {
|
||||||
if (d.type === "tag") return "color-mix(in srgb, var(--fs-accent) 20%, transparent)";
|
if (d.type === "tag") return "color-mix(in srgb, var(--color-primary) 20%, transparent)";
|
||||||
return d.project_color ?? "var(--fs-surface-raised)";
|
return d.project_color ?? "var(--color-bg-secondary)";
|
||||||
})
|
})
|
||||||
.attr("stroke", (d: GraphNode) =>
|
.attr("stroke", (d: GraphNode) =>
|
||||||
d.type === "tag" ? "var(--fs-accent)" : "var(--fs-border-color)"
|
d.type === "tag" ? "var(--color-primary)" : "var(--color-border)"
|
||||||
)
|
)
|
||||||
.attr("stroke-width", (d: GraphNode) => (d.type === "tag" ? 1.5 : 1.5))
|
.attr("stroke-width", (d: GraphNode) => (d.type === "tag" ? 1.5 : 1.5))
|
||||||
.attr("stroke-dasharray", (d: GraphNode) => (d.type === "task" ? "3" : null))
|
.attr("stroke-dasharray", (d: GraphNode) => (d.type === "task" ? "3" : null))
|
||||||
@@ -317,7 +317,7 @@ function initGraph() {
|
|||||||
.attr("dy", (d: GraphNode) => (d.radius ?? 8) + 12)
|
.attr("dy", (d: GraphNode) => (d.radius ?? 8) + 12)
|
||||||
.attr("font-size", "10px")
|
.attr("font-size", "10px")
|
||||||
.attr("fill", (d: GraphNode) =>
|
.attr("fill", (d: GraphNode) =>
|
||||||
d.type === "tag" ? "var(--fs-accent)" : "var(--fs-text-secondary)"
|
d.type === "tag" ? "var(--color-primary)" : "var(--color-text-secondary)"
|
||||||
)
|
)
|
||||||
.attr("pointer-events", "none");
|
.attr("pointer-events", "none");
|
||||||
|
|
||||||
@@ -600,7 +600,7 @@ onUnmounted(() => {
|
|||||||
.graph-page {
|
.graph-page {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
height: calc(100vh - var(--fs-layout-header));
|
height: calc(100vh - var(--header-height, 52px));
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -609,17 +609,17 @@ onUnmounted(() => {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.75rem;
|
gap: 0.75rem;
|
||||||
padding: 0.6rem 1rem;
|
padding: 0.6rem 1rem;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border);
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.graph-select {
|
.graph-select {
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
padding: 0.3rem 0.6rem;
|
padding: 0.3rem 0.6rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@@ -631,27 +631,27 @@ onUnmounted(() => {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.35rem;
|
gap: 0.35rem;
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.graph-toggle input {
|
.graph-toggle input {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
accent-color: var(--fs-accent);
|
accent-color: var(--color-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.graph-stats {
|
.graph-stats {
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
.graph-physics-btn {
|
.graph-physics-btn {
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
padding: 0.3rem 0.7rem;
|
padding: 0.3rem 0.7rem;
|
||||||
@@ -659,12 +659,12 @@ onUnmounted(() => {
|
|||||||
transition: border-color 0.15s, color 0.15s;
|
transition: border-color 0.15s, color 0.15s;
|
||||||
}
|
}
|
||||||
.graph-physics-btn:hover {
|
.graph-physics-btn:hover {
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
}
|
}
|
||||||
.graph-physics-btn.active {
|
.graph-physics-btn.active {
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary);
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.graph-physics-panel {
|
.graph-physics-panel {
|
||||||
@@ -672,8 +672,8 @@ onUnmounted(() => {
|
|||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
gap: 0.5rem 1.5rem;
|
gap: 0.5rem 1.5rem;
|
||||||
padding: 0.6rem 1rem;
|
padding: 0.6rem 1rem;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border);
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -688,20 +688,20 @@ onUnmounted(() => {
|
|||||||
|
|
||||||
.knob-label {
|
.knob-label {
|
||||||
font-size: 0.75rem;
|
font-size: 0.75rem;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.knob-label em {
|
.knob-label em {
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
font-variant-numeric: tabular-nums;
|
font-variant-numeric: tabular-nums;
|
||||||
}
|
}
|
||||||
|
|
||||||
.physics-knob input[type="range"] {
|
.physics-knob input[type="range"] {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
accent-color: var(--fs-accent);
|
accent-color: var(--color-primary);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -709,7 +709,7 @@ onUnmounted(() => {
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-bg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.graph-svg {
|
.graph-svg {
|
||||||
@@ -728,15 +728,15 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.graph-empty p {
|
.graph-empty p {
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
font-size: 0.95rem;
|
font-size: 0.95rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.spinner {
|
.spinner {
|
||||||
width: 28px;
|
width: 28px;
|
||||||
height: 28px;
|
height: 28px;
|
||||||
border: 3px solid var(--fs-border-color);
|
border: 3px solid var(--color-border);
|
||||||
border-top-color: var(--fs-accent);
|
border-top-color: var(--color-primary);
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
animation: spin 0.7s linear infinite;
|
animation: spin 0.7s linear infinite;
|
||||||
}
|
}
|
||||||
@@ -747,10 +747,10 @@ onUnmounted(() => {
|
|||||||
|
|
||||||
.graph-tooltip {
|
.graph-tooltip {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-lg);
|
border-radius: var(--radius-md);
|
||||||
box-shadow: 0 4px 16px var(--color-shadow);
|
box-shadow: 0 4px 16px var(--color-shadow, rgba(0, 0, 0, 0.15));
|
||||||
padding: 0.5rem 0.75rem;
|
padding: 0.5rem 0.75rem;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
@@ -760,7 +760,7 @@ onUnmounted(() => {
|
|||||||
.tooltip-title {
|
.tooltip-title {
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
margin-bottom: 0.25rem;
|
margin-bottom: 0.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -773,15 +773,15 @@ onUnmounted(() => {
|
|||||||
|
|
||||||
.tag-chip {
|
.tag-chip {
|
||||||
font-size: 0.7rem;
|
font-size: 0.7rem;
|
||||||
background: color-mix(in srgb, var(--fs-accent) 15%, transparent);
|
background: color-mix(in srgb, var(--color-primary) 15%, transparent);
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
border-radius: 999px;
|
border-radius: 999px;
|
||||||
padding: 0.1rem 0.4rem;
|
padding: 0.1rem 0.4rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tooltip-meta {
|
.tooltip-meta {
|
||||||
font-size: 0.75rem;
|
font-size: 0.75rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -792,8 +792,8 @@ onUnmounted(() => {
|
|||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
width: 340px;
|
width: 340px;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
border-left: 1px solid var(--fs-border-color);
|
border-left: 1px solid var(--color-border);
|
||||||
box-shadow: -4px 0 16px rgba(0, 0, 0, 0.1);
|
box-shadow: -4px 0 16px rgba(0, 0, 0, 0.1);
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -815,7 +815,7 @@ onUnmounted(() => {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
padding: 0.6rem 0.75rem;
|
padding: 0.6rem 0.75rem;
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border);
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -826,10 +826,10 @@ onUnmounted(() => {
|
|||||||
letter-spacing: 0.05em;
|
letter-spacing: 0.05em;
|
||||||
padding: 0.15rem 0.45rem;
|
padding: 0.15rem 0.45rem;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
.peek-type-task { border-color: var(--fs-accent); color: var(--fs-accent); }
|
.peek-type-task { border-color: var(--color-primary); color: var(--color-primary); }
|
||||||
|
|
||||||
.peek-actions {
|
.peek-actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -840,7 +840,7 @@ onUnmounted(() => {
|
|||||||
|
|
||||||
.peek-link {
|
.peek-link {
|
||||||
font-size: 0.78rem;
|
font-size: 0.78rem;
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
.peek-link:hover { text-decoration: underline; }
|
.peek-link:hover { text-decoration: underline; }
|
||||||
@@ -848,20 +848,20 @@ onUnmounted(() => {
|
|||||||
.peek-close {
|
.peek-close {
|
||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: 0.1rem 0.25rem;
|
padding: 0.1rem 0.25rem;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
.peek-close:hover { color: var(--fs-text-primary); }
|
.peek-close:hover { color: var(--color-text); }
|
||||||
|
|
||||||
.peek-title {
|
.peek-title {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0.75rem 0.75rem 0.4rem;
|
padding: 0.75rem 0.75rem 0.4rem;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -877,7 +877,7 @@ onUnmounted(() => {
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
padding: 0 0.75rem 0.5rem;
|
padding: 0 0.75rem 0.5rem;
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.peek-prose {
|
.peek-prose {
|
||||||
@@ -887,7 +887,7 @@ onUnmounted(() => {
|
|||||||
.peek-loading,
|
.peek-loading,
|
||||||
.peek-empty {
|
.peek-empty {
|
||||||
font-size: 0.82rem;
|
font-size: 0.82rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
padding-top: 0.5rem;
|
padding-top: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -901,7 +901,7 @@ onUnmounted(() => {
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.05em;
|
letter-spacing: 0.05em;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
margin-bottom: 0.4rem;
|
margin-bottom: 0.4rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -921,14 +921,14 @@ onUnmounted(() => {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.4rem;
|
gap: 0.4rem;
|
||||||
font-size: 0.82rem;
|
font-size: 0.82rem;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: 0.25rem 0.4rem;
|
padding: 0.25rem 0.4rem;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
.peek-linked-item:hover {
|
.peek-linked-item:hover {
|
||||||
background: color-mix(in srgb, var(--fs-accent) 8%, var(--fs-surface-raised));
|
background: color-mix(in srgb, var(--color-primary) 8%, var(--color-bg-card));
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.peek-linked-type {
|
.peek-linked-type {
|
||||||
@@ -937,12 +937,12 @@ onUnmounted(() => {
|
|||||||
width: 1.1rem;
|
width: 1.1rem;
|
||||||
height: 1.1rem;
|
height: 1.1rem;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-bg);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -46,50 +46,6 @@ const sortMode = ref<"modified" | "created" | "alpha" | "type">("modified");
|
|||||||
const searchQuery = ref("");
|
const searchQuery = ref("");
|
||||||
let searchDebounce: ReturnType<typeof setTimeout> | null = null;
|
let searchDebounce: ReturnType<typeof setTimeout> | null = null;
|
||||||
|
|
||||||
// ─── Near-duplicate report ────────────────────────────────────────────────────
|
|
||||||
// On demand, never automatic — a corpus-wide pairwise scan, and most visits to
|
|
||||||
// this page aren't a tidy-up (same reasoning as SnippetListView's report).
|
|
||||||
|
|
||||||
interface DupMember {
|
|
||||||
id: number; title: string;
|
|
||||||
created_at?: string | null; updated_at?: string | null;
|
|
||||||
task_kind?: string | null;
|
|
||||||
}
|
|
||||||
interface DupGroup {
|
|
||||||
note_ids: number[];
|
|
||||||
members: DupMember[];
|
|
||||||
top_score: number;
|
|
||||||
existing_supersessions?: { superseder_id: number; superseded_id: number }[];
|
|
||||||
}
|
|
||||||
|
|
||||||
const dupGroups = ref<DupGroup[]>([]);
|
|
||||||
const dupSuggestion = ref("");
|
|
||||||
const dupLoading = ref(false);
|
|
||||||
const dupChecked = ref(false);
|
|
||||||
// The report follows the type filter: viewing tasks checks tasks. Anything
|
|
||||||
// else (all / plan / process) checks notes — the kind with the most to find.
|
|
||||||
const dupKind = computed(() => (activeType.value === "task" ? "task" : "note"));
|
|
||||||
|
|
||||||
async function loadDuplicates() {
|
|
||||||
dupLoading.value = true;
|
|
||||||
try {
|
|
||||||
const data = await apiGet<{ groups: DupGroup[]; suggestion: string }>(
|
|
||||||
`/api/notes/duplicates?kind=${dupKind.value}`
|
|
||||||
);
|
|
||||||
dupGroups.value = data.groups;
|
|
||||||
dupSuggestion.value = data.suggestion;
|
|
||||||
dupChecked.value = true;
|
|
||||||
} catch {
|
|
||||||
dupChecked.value = false;
|
|
||||||
} finally {
|
|
||||||
dupLoading.value = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// A stale report is worse than none: switching the type filter changes which
|
|
||||||
// kind the button checks, so the old kind's groups must not linger under it.
|
|
||||||
watch(dupKind, () => { dupChecked.value = false; dupGroups.value = []; });
|
|
||||||
|
|
||||||
// ─── Type counts ──────────────────────────────────────────────────────────────
|
// ─── Type counts ──────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
interface KnowledgeCounts { note: number; task: number; plan: number; process: number; total: number }
|
interface KnowledgeCounts { note: number; task: number; plan: number; process: number; total: number }
|
||||||
@@ -429,51 +385,6 @@ onUnmounted(() => {
|
|||||||
<Share2 :size="16" />
|
<Share2 :size="16" />
|
||||||
Graph
|
Graph
|
||||||
</button>
|
</button>
|
||||||
<button
|
|
||||||
class="btn-ghost btn-compact"
|
|
||||||
:disabled="dupLoading"
|
|
||||||
title="Find notes or tasks already recorded that closely resemble each other — the report proposes, it never changes anything"
|
|
||||||
@click="loadDuplicates"
|
|
||||||
>
|
|
||||||
{{ dupLoading ? "Checking…" : "Find duplicates" }}
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Near-duplicate report. A proposal surface only: unlike snippets
|
|
||||||
(which merge losslessly), notes are never merged — the right fix is
|
|
||||||
supersession, extraction into a reference note, or leaving parallel
|
|
||||||
records alone, and choosing needs the records READ. That reading is
|
|
||||||
the assistant's job; this panel shows the human what exists. -->
|
|
||||||
<div v-if="dupChecked && !dupLoading" class="dup-panel">
|
|
||||||
<p v-if="!dupGroups.length" class="dup-empty">
|
|
||||||
No near-duplicate {{ dupKind }}s found — nothing recorded resembles
|
|
||||||
anything else closely enough to flag.
|
|
||||||
</p>
|
|
||||||
<template v-else>
|
|
||||||
<p class="dup-head">
|
|
||||||
{{ dupGroups.length }} possible duplicate
|
|
||||||
{{ dupGroups.length > 1 ? "sets" : "set" }} among your
|
|
||||||
{{ dupKind }}s. {{ dupSuggestion }}
|
|
||||||
</p>
|
|
||||||
<div v-for="(g, i) in dupGroups" :key="i" class="dup-group">
|
|
||||||
<div class="dup-members">
|
|
||||||
<router-link
|
|
||||||
v-for="m in g.members"
|
|
||||||
:key="m.id"
|
|
||||||
class="dup-member"
|
|
||||||
:to="dupKind === 'task' ? `/tasks/${m.id}` : `/notes/${m.id}`"
|
|
||||||
>
|
|
||||||
#{{ m.id }} {{ m.title }}
|
|
||||||
</router-link>
|
|
||||||
</div>
|
|
||||||
<span class="dup-score">{{ Math.round(g.top_score * 100) }}% alike</span>
|
|
||||||
<span
|
|
||||||
v-if="g.existing_supersessions?.length"
|
|
||||||
class="dup-claimed"
|
|
||||||
title="A supersession has already been declared inside this set — it is not an open question"
|
|
||||||
>already ruled on</span>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Loading / empty -->
|
<!-- Loading / empty -->
|
||||||
@@ -579,7 +490,7 @@ onUnmounted(() => {
|
|||||||
.knowledge-root {
|
.knowledge-root {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
height: calc(100vh - var(--fs-layout-header));
|
height: calc(100vh - var(--header-height, 56px));
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -590,8 +501,8 @@ onUnmounted(() => {
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
padding: 8px 20px;
|
padding: 8px 20px;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border, rgba(255,255,255,0.06));
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
font-size: 0.82rem;
|
font-size: 0.82rem;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
@@ -607,7 +518,7 @@ onUnmounted(() => {
|
|||||||
font-size: 0.78rem;
|
font-size: 0.78rem;
|
||||||
}
|
}
|
||||||
.today-link {
|
.today-link {
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
opacity: 0.85;
|
opacity: 0.85;
|
||||||
@@ -625,19 +536,19 @@ onUnmounted(() => {
|
|||||||
|
|
||||||
/* ── Filter panel ────────────────────────────────────────── */
|
/* ── Filter panel ────────────────────────────────────────── */
|
||||||
.filter-panel {
|
.filter-panel {
|
||||||
width: var(--fs-layout-sidebar);
|
width: var(--sidebar-width);
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
padding: 16px 12px;
|
padding: 16px 12px;
|
||||||
border-right: 1px solid var(--fs-border-color);
|
border-right: 1px solid var(--color-border, rgba(255,255,255,0.06));
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
}
|
}
|
||||||
.filter-section { margin-bottom: 20px; }
|
.filter-section { margin-bottom: 20px; }
|
||||||
.filter-section + .filter-section::before {
|
.filter-section + .filter-section::before {
|
||||||
content: '· · ·';
|
content: '· · ·';
|
||||||
display: block;
|
display: block;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: color-mix(in srgb, var(--fs-accent) 30%, transparent);
|
color: rgba(91, 74, 138, 0.3);
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
letter-spacing: 0.4em;
|
letter-spacing: 0.4em;
|
||||||
padding: 4px 0 12px;
|
padding: 4px 0 12px;
|
||||||
@@ -645,7 +556,7 @@ onUnmounted(() => {
|
|||||||
.filter-label {
|
.filter-label {
|
||||||
font-family: 'Fraunces', Georgia, serif;
|
font-family: 'Fraunces', Georgia, serif;
|
||||||
font-size: 0.95rem;
|
font-size: 0.95rem;
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
padding: 0 4px;
|
padding: 0 4px;
|
||||||
}
|
}
|
||||||
@@ -662,14 +573,14 @@ onUnmounted(() => {
|
|||||||
padding: 8px 12px;
|
padding: 8px 12px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
border: none;
|
border: none;
|
||||||
background: var(--fs-gradient-cta);
|
background: var(--gradient-cta);
|
||||||
color: var(--fs-text-on-action);
|
color: var(--fs-text-on-action);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
transition: box-shadow 0.15s;
|
transition: box-shadow 0.15s;
|
||||||
}
|
}
|
||||||
.btn-new-note:hover { box-shadow: var(--fs-glow-cta-hover); }
|
.btn-new-note:hover { box-shadow: var(--glow-cta-hover); }
|
||||||
.btn-new-icon {
|
.btn-new-icon {
|
||||||
font-size: 1.1rem;
|
font-size: 1.1rem;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
@@ -680,8 +591,8 @@ onUnmounted(() => {
|
|||||||
top: calc(100% + 6px);
|
top: calc(100% + 6px);
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
z-index: 50;
|
z-index: 50;
|
||||||
@@ -696,15 +607,15 @@ onUnmounted(() => {
|
|||||||
padding: 9px 14px;
|
padding: 9px 14px;
|
||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 0.84rem;
|
font-size: 0.84rem;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
transition: background 0.12s, color 0.12s;
|
transition: background 0.12s, color 0.12s;
|
||||||
}
|
}
|
||||||
.new-note-menu button:hover {
|
.new-note-menu button:hover {
|
||||||
background: var(--fs-accent-soft);
|
background: var(--color-primary-tint);
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
}
|
}
|
||||||
.new-note-menu button svg {
|
.new-note-menu button svg {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
@@ -712,7 +623,7 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
.new-note-menu button:hover svg {
|
.new-note-menu button:hover svg {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
stroke: var(--fs-accent);
|
stroke: var(--color-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.filter-btn {
|
.filter-btn {
|
||||||
@@ -725,7 +636,7 @@ onUnmounted(() => {
|
|||||||
border-radius: 7px;
|
border-radius: 7px;
|
||||||
border: none;
|
border: none;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
margin-bottom: 2px;
|
margin-bottom: 2px;
|
||||||
@@ -734,8 +645,8 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
.filter-btn:hover { background: rgba(255,255,255,0.05); opacity: 1; }
|
.filter-btn:hover { background: rgba(255,255,255,0.05); opacity: 1; }
|
||||||
.filter-btn.active {
|
.filter-btn.active {
|
||||||
background: var(--fs-accent-wash);
|
background: var(--color-primary-wash);
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
.filter-btn-label { flex: 1; }
|
.filter-btn-label { flex: 1; }
|
||||||
@@ -744,15 +655,15 @@ onUnmounted(() => {
|
|||||||
padding: 1px 6px;
|
padding: 1px 6px;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
background: rgba(255,255,255,0.07);
|
background: rgba(255,255,255,0.07);
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-muted);
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
min-width: 20px;
|
min-width: 20px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
.filter-btn.active .filter-count {
|
.filter-btn.active .filter-count {
|
||||||
background: color-mix(in srgb, var(--fs-accent) 20%, transparent);
|
background: rgba(91, 74, 138, 0.2);
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
}
|
}
|
||||||
.filter-tag { font-size: 0.78rem; }
|
.filter-tag { font-size: 0.78rem; }
|
||||||
|
|
||||||
@@ -772,7 +683,7 @@ onUnmounted(() => {
|
|||||||
gap: 10px;
|
gap: 10px;
|
||||||
padding: 12px 20px;
|
padding: 12px 20px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border, rgba(255,255,255,0.06));
|
||||||
}
|
}
|
||||||
.search-wrap {
|
.search-wrap {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
@@ -783,27 +694,27 @@ onUnmounted(() => {
|
|||||||
left: 10px;
|
left: 10px;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
transform: translateY(-50%);
|
transform: translateY(-50%);
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-muted);
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
.search-input {
|
.search-input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 7px 12px 7px 32px;
|
padding: 7px 12px 7px 32px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border, rgba(255,255,255,0.1));
|
||||||
background: var(--fs-surface-hover);
|
background: var(--color-bg-tertiary, rgba(255,255,255,0.04));
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
font-size: 0.88rem;
|
font-size: 0.88rem;
|
||||||
outline: none;
|
outline: none;
|
||||||
transition: border-color 0.15s;
|
transition: border-color 0.15s;
|
||||||
}
|
}
|
||||||
.search-input:focus { border-color: var(--fs-accent); }
|
.search-input:focus { border-color: var(--color-primary); }
|
||||||
.sort-select {
|
.sort-select {
|
||||||
padding: 7px 10px;
|
padding: 7px 10px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border, rgba(255,255,255,0.1));
|
||||||
background: var(--fs-surface-hover);
|
background: var(--color-bg-tertiary, rgba(255,255,255,0.04));
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
outline: none;
|
outline: none;
|
||||||
@@ -824,9 +735,9 @@ onUnmounted(() => {
|
|||||||
|
|
||||||
.k-card {
|
.k-card {
|
||||||
position: relative;
|
position: relative;
|
||||||
background: var(--fs-surface-hover);
|
background: var(--color-surface, rgba(255,255,255,0.03));
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border, rgba(255,255,255,0.07));
|
||||||
border-radius: var(--fs-radius-xl);
|
border-radius: var(--radius-lg, 14px);
|
||||||
padding: 14px;
|
padding: 14px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: border-color 0.15s, transform 0.12s, box-shadow 0.15s;
|
transition: border-color 0.15s, transform 0.12s, box-shadow 0.15s;
|
||||||
@@ -838,12 +749,12 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
.k-card:hover {
|
.k-card:hover {
|
||||||
transform: translateY(-2px);
|
transform: translateY(-2px);
|
||||||
box-shadow: 0 8px 28px color-mix(in srgb, var(--fs-accent) 25%, transparent), 0 2px 8px rgba(0, 0, 0, 0.3);
|
box-shadow: 0 8px 28px rgba(91, 74, 138, 0.25), 0 2px 8px rgba(0, 0, 0, 0.3);
|
||||||
border-color: color-mix(in srgb, var(--fs-accent) 35%, transparent);
|
border-color: rgba(91, 74, 138, 0.35);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Type-specific card DNA */
|
/* Type-specific card DNA */
|
||||||
.k-card--note { border-color: color-mix(in srgb, var(--fs-accent) 20%, transparent); }
|
.k-card--note { border-color: rgba(91, 74, 138, 0.20); }
|
||||||
.k-card--task { border-color: rgba(212, 160, 23, 0.18); }
|
.k-card--task { border-color: rgba(212, 160, 23, 0.18); }
|
||||||
|
|
||||||
/* Top gradient bars */
|
/* Top gradient bars */
|
||||||
@@ -858,7 +769,7 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
.k-card--note::before {
|
.k-card--note::before {
|
||||||
right: 0;
|
right: 0;
|
||||||
background: linear-gradient(90deg, var(--fs-accent), #7A6DA8);
|
background: linear-gradient(90deg, #5B4A8A, #7A6DA8);
|
||||||
}
|
}
|
||||||
.k-card--task::before {
|
.k-card--task::before {
|
||||||
right: 0;
|
right: 0;
|
||||||
@@ -877,7 +788,7 @@ onUnmounted(() => {
|
|||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.04em;
|
letter-spacing: 0.04em;
|
||||||
}
|
}
|
||||||
.badge--note { background: color-mix(in srgb, var(--fs-accent) 15%, transparent); color: #7A6DA8; }
|
.badge--note { background: rgba(91, 74, 138,0.15); color: #7A6DA8; }
|
||||||
.badge--task { background: rgba(212,160,23,0.15); color: #fbbf24; }
|
.badge--task { background: rgba(212,160,23,0.15); color: #fbbf24; }
|
||||||
.badge--plan { background: rgba(99,102,241,0.18); color: #818cf8; }
|
.badge--plan { background: rgba(99,102,241,0.18); color: #818cf8; }
|
||||||
|
|
||||||
@@ -894,7 +805,7 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
.k-card-snippet {
|
.k-card-snippet {
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-muted);
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
-webkit-line-clamp: 4;
|
-webkit-line-clamp: 4;
|
||||||
-webkit-box-orient: vertical;
|
-webkit-box-orient: vertical;
|
||||||
@@ -914,9 +825,9 @@ onUnmounted(() => {
|
|||||||
padding: 1px 6px;
|
padding: 1px 6px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
background: rgba(255,255,255,0.05);
|
background: rgba(255,255,255,0.05);
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-muted);
|
||||||
}
|
}
|
||||||
.k-card-date { font-size: 0.72rem; color: var(--fs-text-secondary); white-space: nowrap; opacity: 0.7; }
|
.k-card-date { font-size: 0.72rem; color: var(--color-text-secondary); white-space: nowrap; opacity: 0.7; }
|
||||||
/* Only rendered for a record another user owns, so an unmarked card is
|
/* Only rendered for a record another user owns, so an unmarked card is
|
||||||
unambiguously the viewer's own. */
|
unambiguously the viewer's own. */
|
||||||
.shared-tag {
|
.shared-tag {
|
||||||
@@ -924,8 +835,8 @@ onUnmounted(() => {
|
|||||||
padding: 0.08rem 0.35rem;
|
padding: 0.08rem 0.35rem;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
background: color-mix(in srgb, var(--fs-text-secondary) 15%, transparent);
|
background: color-mix(in srgb, var(--color-text-secondary) 15%, transparent);
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ── Task card ──────────────────────────────────────────── */
|
/* ── Task card ──────────────────────────────────────────── */
|
||||||
@@ -945,10 +856,10 @@ onUnmounted(() => {
|
|||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
.status--todo { background: var(--fs-status-todo-bg); color: var(--fs-status-todo); }
|
.status--todo { background: var(--color-status-todo-bg); color: var(--color-status-todo); }
|
||||||
.status--in_progress { background: var(--fs-status-in-progress-bg); color: var(--fs-status-in-progress); }
|
.status--in_progress { background: var(--color-status-in-progress-bg); color: var(--color-status-in-progress); }
|
||||||
.status--done { background: var(--fs-status-done-bg); color: var(--fs-status-done); }
|
.status--done { background: var(--color-status-done-bg); color: var(--color-status-done); }
|
||||||
.status--cancelled { background: var(--fs-status-todo-bg); color: var(--fs-status-todo); text-decoration: line-through; }
|
.status--cancelled { background: var(--color-status-todo-bg); color: var(--color-status-todo); text-decoration: line-through; }
|
||||||
|
|
||||||
.priority-badge {
|
.priority-badge {
|
||||||
font-size: 0.7rem;
|
font-size: 0.7rem;
|
||||||
@@ -956,16 +867,16 @@ onUnmounted(() => {
|
|||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
.priority--low { background: var(--fs-priority-low-bg); color: var(--fs-priority-low); }
|
.priority--low { background: var(--color-priority-low-bg); color: var(--color-priority-low); }
|
||||||
.priority--normal { background: var(--fs-priority-medium-bg); color: var(--fs-priority-medium); }
|
.priority--normal { background: var(--color-priority-medium-bg); color: var(--color-priority-medium); }
|
||||||
.priority--high { background: var(--fs-priority-high-bg); color: var(--fs-priority-high); }
|
.priority--high { background: var(--color-priority-high-bg); color: var(--color-priority-high); }
|
||||||
|
|
||||||
.task-due {
|
.task-due {
|
||||||
font-size: 0.78rem;
|
font-size: 0.78rem;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
}
|
}
|
||||||
.task-overdue {
|
.task-overdue {
|
||||||
color: var(--fs-overdue);
|
color: var(--color-overdue);
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -977,7 +888,7 @@ onUnmounted(() => {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: 60px 20px;
|
padding: 60px 20px;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-muted);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
gap: 6px;
|
gap: 6px;
|
||||||
}
|
}
|
||||||
@@ -985,7 +896,7 @@ onUnmounted(() => {
|
|||||||
.empty-narrator {
|
.empty-narrator {
|
||||||
font-family: 'Fraunces', Georgia, serif;
|
font-family: 'Fraunces', Georgia, serif;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
opacity: 0.85;
|
opacity: 0.85;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -999,17 +910,17 @@ onUnmounted(() => {
|
|||||||
}
|
}
|
||||||
.sentinel-loading {
|
.sentinel-loading {
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ── Graph panel ─────────────────────────────────────────── */
|
/* ── Graph panel ─────────────────────────────────────────── */
|
||||||
.graph-panel {
|
.graph-panel {
|
||||||
width: 500px;
|
width: 500px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
border-left: 1px solid var(--fs-border-color);
|
border-left: 1px solid var(--color-border, rgba(255,255,255,0.06));
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
transition: width 0.2s ease;
|
transition: width 0.2s ease;
|
||||||
}
|
}
|
||||||
.graph-panel.expanded {
|
.graph-panel.expanded {
|
||||||
@@ -1022,83 +933,12 @@ onUnmounted(() => {
|
|||||||
padding: 10px 14px;
|
padding: 10px 14px;
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border, rgba(255,255,255,0.06));
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
/* RESTORED (#2444). The panel is a flex COLUMN and its header is
|
|
||||||
`flex-shrink: 0`, so this is the item that takes the remaining height — and
|
|
||||||
without it the `height: 100%` below resolves against `auto` and does
|
|
||||||
nothing, which made the comment underneath a spec for a rule that could not
|
|
||||||
work. `min-height: 0` is the companion that lets a flex item shrink under
|
|
||||||
its content instead of overflowing the panel. */
|
|
||||||
.graph-embed {
|
|
||||||
flex: 1;
|
|
||||||
min-height: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Override GraphView's 100vh height so it fills the panel instead */
|
/* Override GraphView's 100vh height so it fills the panel instead */
|
||||||
.graph-embed :deep(.graph-page) {
|
.graph-embed :deep(.graph-page) {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ── Near-duplicate report ──────────────────────────────────────────────────
|
|
||||||
Mirrors SnippetListView's panel so the two reports read as one feature.
|
|
||||||
Scoped styles can't be shared across SFCs; if a third view ever grows this
|
|
||||||
panel, promote the family to components.css and record it (#2464's rule:
|
|
||||||
two-or-more is when a recipe earns the shared sheet). */
|
|
||||||
.dup-panel {
|
|
||||||
margin-bottom: 1.25rem;
|
|
||||||
padding: 0.85rem 1rem;
|
|
||||||
border: 1px solid var(--fs-border-color);
|
|
||||||
border-radius: 8px;
|
|
||||||
background: var(--fs-surface-hover);
|
|
||||||
}
|
|
||||||
.dup-empty,
|
|
||||||
.dup-head {
|
|
||||||
margin: 0 0 0.5rem;
|
|
||||||
font-size: 0.85rem;
|
|
||||||
color: var(--fs-text-tertiary);
|
|
||||||
}
|
|
||||||
.dup-empty { margin-bottom: 0; }
|
|
||||||
.dup-group {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 0.75rem;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
padding: 0.5rem 0;
|
|
||||||
border-top: 1px solid var(--fs-border-color);
|
|
||||||
}
|
|
||||||
.dup-members {
|
|
||||||
display: flex;
|
|
||||||
gap: 0.4rem;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
flex: 1 1 20rem;
|
|
||||||
min-width: 0;
|
|
||||||
}
|
|
||||||
.dup-member {
|
|
||||||
font-size: 0.8rem;
|
|
||||||
padding: 0.1rem 0.45rem;
|
|
||||||
border-radius: 4px;
|
|
||||||
background: color-mix(in srgb, var(--fs-text-tertiary) 12%, transparent);
|
|
||||||
color: var(--fs-text-primary);
|
|
||||||
text-decoration: none;
|
|
||||||
overflow-wrap: anywhere;
|
|
||||||
}
|
|
||||||
.dup-member:hover { background: var(--fs-surface-hover); }
|
|
||||||
.dup-score {
|
|
||||||
font-size: 0.75rem;
|
|
||||||
color: var(--fs-text-tertiary);
|
|
||||||
font-variant-numeric: tabular-nums;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
/* A set someone already ruled on — quiet, not celebratory: it means "skip". */
|
|
||||||
.dup-claimed {
|
|
||||||
font-size: 0.72rem;
|
|
||||||
color: var(--fs-text-tertiary);
|
|
||||||
border: 1px solid var(--fs-border-color);
|
|
||||||
border-radius: 4px;
|
|
||||||
padding: 0.05rem 0.4rem;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -123,9 +123,9 @@ function loginWithOAuth() {
|
|||||||
.auth-card {
|
.auth-card {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-lg);
|
border-radius: var(--radius-md);
|
||||||
padding: 2rem;
|
padding: 2rem;
|
||||||
}
|
}
|
||||||
.auth-brand {
|
.auth-brand {
|
||||||
@@ -142,11 +142,11 @@ function loginWithOAuth() {
|
|||||||
.auth-hint {
|
.auth-hint {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
}
|
}
|
||||||
.auth-hint a {
|
.auth-hint a {
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
}
|
}
|
||||||
.field {
|
.field {
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
@@ -160,19 +160,19 @@ function loginWithOAuth() {
|
|||||||
.input {
|
.input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0.5rem 0.75rem;
|
padding: 0.5rem 0.75rem;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
font-size: 0.95rem;
|
font-size: 0.95rem;
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-bg);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
.input:focus {
|
.input:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary);
|
||||||
}
|
}
|
||||||
.error-msg {
|
.error-msg {
|
||||||
color: var(--fs-error);
|
color: var(--color-danger);
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
margin: 0 0 0.75rem;
|
margin: 0 0 0.75rem;
|
||||||
}
|
}
|
||||||
@@ -181,23 +181,23 @@ function loginWithOAuth() {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.75rem;
|
gap: 0.75rem;
|
||||||
margin: 1.25rem 0;
|
margin: 1.25rem 0;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
}
|
}
|
||||||
.divider::before,
|
.divider::before,
|
||||||
.divider::after {
|
.divider::after {
|
||||||
content: "";
|
content: "";
|
||||||
flex: 1;
|
flex: 1;
|
||||||
border-top: 1px solid var(--fs-border-color);
|
border-top: 1px solid var(--color-border);
|
||||||
}
|
}
|
||||||
.auth-footer {
|
.auth-footer {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
margin: 1rem 0 0;
|
margin: 1rem 0 0;
|
||||||
}
|
}
|
||||||
.auth-footer a {
|
.auth-footer a {
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
}
|
}
|
||||||
.forgot-link {
|
.forgot-link {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
@@ -205,9 +205,9 @@ function loginWithOAuth() {
|
|||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
}
|
}
|
||||||
.forgot-link a {
|
.forgot-link a {
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
}
|
}
|
||||||
.forgot-link a:hover {
|
.forgot-link a:hover {
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -263,9 +263,9 @@ function clearFilters() {
|
|||||||
margin: 0 0 1.5rem;
|
margin: 0 0 1.5rem;
|
||||||
}
|
}
|
||||||
.settings-section {
|
.settings-section {
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-lg);
|
border-radius: var(--radius-md);
|
||||||
padding: 1.25rem;
|
padding: 1.25rem;
|
||||||
margin-bottom: 1.5rem;
|
margin-bottom: 1.5rem;
|
||||||
}
|
}
|
||||||
@@ -292,23 +292,23 @@ function clearFilters() {
|
|||||||
.stat-count {
|
.stat-count {
|
||||||
font-size: 1.5rem;
|
font-size: 1.5rem;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
}
|
}
|
||||||
.stat-label {
|
.stat-label {
|
||||||
font-size: 0.75rem;
|
font-size: 0.75rem;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.05em;
|
letter-spacing: 0.05em;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
.stat-audit {
|
.stat-audit {
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
}
|
}
|
||||||
.stat-usage {
|
.stat-usage {
|
||||||
color: var(--fs-success);
|
color: var(--color-success);
|
||||||
}
|
}
|
||||||
.stat-error {
|
.stat-error {
|
||||||
color: var(--fs-error);
|
color: var(--color-danger);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Filters */
|
/* Filters */
|
||||||
@@ -321,10 +321,10 @@ function clearFilters() {
|
|||||||
.filter-input,
|
.filter-input,
|
||||||
.filter-date {
|
.filter-date {
|
||||||
padding: 0.4rem 0.6rem;
|
padding: 0.4rem 0.6rem;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-bg);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
}
|
}
|
||||||
.filter-select {
|
.filter-select {
|
||||||
@@ -342,7 +342,7 @@ function clearFilters() {
|
|||||||
.loading-msg,
|
.loading-msg,
|
||||||
.empty-msg {
|
.empty-msg {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
padding: 1rem 0;
|
padding: 1rem 0;
|
||||||
}
|
}
|
||||||
@@ -356,13 +356,13 @@ function clearFilters() {
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.05em;
|
letter-spacing: 0.05em;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
padding: 0.5rem 0.75rem;
|
padding: 0.5rem 0.75rem;
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border);
|
||||||
}
|
}
|
||||||
.logs-table td {
|
.logs-table td {
|
||||||
padding: 0.5rem 0.75rem;
|
padding: 0.5rem 0.75rem;
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border);
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
}
|
}
|
||||||
.logs-table tbody tr:last-child td {
|
.logs-table tbody tr:last-child td {
|
||||||
@@ -373,18 +373,18 @@ function clearFilters() {
|
|||||||
transition: background 0.1s;
|
transition: background 0.1s;
|
||||||
}
|
}
|
||||||
.log-row:hover {
|
.log-row:hover {
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
}
|
}
|
||||||
.row-expanded {
|
.row-expanded {
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
}
|
}
|
||||||
.cell-time {
|
.cell-time {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
}
|
}
|
||||||
.cell-user {
|
.cell-user {
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
}
|
}
|
||||||
.cell-action {
|
.cell-action {
|
||||||
max-width: 280px;
|
max-width: 280px;
|
||||||
@@ -399,22 +399,22 @@ function clearFilters() {
|
|||||||
.cell-ip {
|
.cell-ip {
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.cell-duration {
|
.cell-duration {
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.detail-ip {
|
.detail-ip {
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
margin-bottom: 0.4rem;
|
margin-bottom: 0.4rem;
|
||||||
}
|
}
|
||||||
.text-error {
|
.text-error {
|
||||||
color: var(--fs-error);
|
color: var(--color-danger);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Category badges */
|
/* Category badges */
|
||||||
@@ -425,19 +425,19 @@ function clearFilters() {
|
|||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.05em;
|
letter-spacing: 0.05em;
|
||||||
padding: 0.1rem 0.35rem;
|
padding: 0.1rem 0.35rem;
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
}
|
}
|
||||||
.cat-audit {
|
.cat-audit {
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
background: color-mix(in srgb, var(--fs-accent) 15%, transparent);
|
background: color-mix(in srgb, var(--color-primary) 15%, transparent);
|
||||||
}
|
}
|
||||||
.cat-usage {
|
.cat-usage {
|
||||||
color: var(--fs-success);
|
color: var(--color-success);
|
||||||
background: color-mix(in srgb, var(--fs-success) 15%, transparent);
|
background: color-mix(in srgb, var(--color-success) 15%, transparent);
|
||||||
}
|
}
|
||||||
.cat-error {
|
.cat-error {
|
||||||
color: var(--fs-error);
|
color: var(--color-danger);
|
||||||
background: color-mix(in srgb, var(--fs-error) 15%, transparent);
|
background: color-mix(in srgb, var(--color-danger) 15%, transparent);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Method tag */
|
/* Method tag */
|
||||||
@@ -448,24 +448,22 @@ function clearFilters() {
|
|||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
padding: 0.05rem 0.25rem;
|
padding: 0.05rem 0.25rem;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
margin-right: 0.25rem;
|
margin-right: 0.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Detail row */
|
/* Detail row */
|
||||||
/* `.detail-row` is deliberately bare: a `<tr>` has nothing to style that its
|
|
||||||
cells don't carry, and the row exists to scope the rule below (#2444). */
|
|
||||||
.detail-row td {
|
.detail-row td {
|
||||||
padding: 0 0.75rem 0.75rem;
|
padding: 0 0.75rem 0.75rem;
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border);
|
||||||
}
|
}
|
||||||
.detail-json {
|
.detail-json {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0.75rem;
|
padding: 0.75rem;
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-bg);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
|
|||||||
@@ -633,13 +633,13 @@ onUnmounted(() => assist.clearSelection());
|
|||||||
gap: 0.75rem;
|
gap: 0.75rem;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
padding-bottom: 0.5rem;
|
padding-bottom: 0.5rem;
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.editor-tabs {
|
.editor-tabs {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-bg);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
gap: 2px;
|
gap: 2px;
|
||||||
@@ -653,14 +653,14 @@ onUnmounted(() => assist.clearSelection());
|
|||||||
padding: 0.22rem 0.75rem;
|
padding: 0.22rem 0.75rem;
|
||||||
font-size: 0.78rem;
|
font-size: 0.78rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: background 0.15s, color 0.15s;
|
transition: background 0.15s, color 0.15s;
|
||||||
}
|
}
|
||||||
.tab:hover { color: var(--fs-text-primary); }
|
.tab:hover { color: var(--color-text); }
|
||||||
.tab.active {
|
.tab.active {
|
||||||
background: var(--fs-surface-hover);
|
background: var(--color-surface);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
box-shadow: 0 1px 3px rgba(0,0,0,0.12);
|
box-shadow: 0 1px 3px rgba(0,0,0,0.12);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -679,14 +679,14 @@ onUnmounted(() => assist.clearSelection());
|
|||||||
|
|
||||||
.stream-label {
|
.stream-label {
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
.stream-preview {
|
.stream-preview {
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-input-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
padding: 0.75rem;
|
padding: 0.75rem;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
min-height: 200px;
|
min-height: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -699,7 +699,7 @@ onUnmounted(() => assist.clearSelection());
|
|||||||
.note-sidebar {
|
.note-sidebar {
|
||||||
width: 280px;
|
width: 280px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
border-left: 1px solid var(--fs-border-color);
|
border-left: 1px solid var(--color-border);
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -708,17 +708,17 @@ onUnmounted(() => assist.clearSelection());
|
|||||||
.sb-select, .sb-input {
|
.sb-select, .sb-input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 5px 8px;
|
padding: 5px 8px;
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-input-border, rgba(255,255,255,0.12));
|
||||||
background: var(--fs-surface-hover);
|
background: var(--color-bg-tertiary, rgba(255,255,255,0.04));
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
font-size: 0.82rem;
|
font-size: 0.82rem;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
outline: none;
|
outline: none;
|
||||||
transition: border-color 0.15s;
|
transition: border-color 0.15s;
|
||||||
}
|
}
|
||||||
.sb-select:focus, .sb-input:focus {
|
.sb-select:focus, .sb-input:focus {
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Tag suggest row inside sidebar */
|
/* Tag suggest row inside sidebar */
|
||||||
@@ -742,13 +742,13 @@ onUnmounted(() => assist.clearSelection());
|
|||||||
font-size: 0.72rem;
|
font-size: 0.72rem;
|
||||||
padding: 0.15rem 0.5rem;
|
padding: 0.15rem 0.5rem;
|
||||||
background: none;
|
background: none;
|
||||||
border: 1px solid var(--fs-accent);
|
border: 1px solid var(--color-primary);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
}
|
}
|
||||||
.btn-link-all:hover { background: var(--fs-action-primary); color: var(--fs-text-on-action); }
|
.btn-link-all:hover { background: var(--color-action-primary); color: var(--fs-text-on-action); }
|
||||||
|
|
||||||
.link-suggest-list {
|
.link-suggest-list {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -766,14 +766,14 @@ onUnmounted(() => assist.clearSelection());
|
|||||||
.link-suggest-title {
|
.link-suggest-title {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.link-suggest-count {
|
.link-suggest-count {
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
font-size: 0.72rem;
|
font-size: 0.72rem;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
@@ -783,13 +783,13 @@ onUnmounted(() => assist.clearSelection());
|
|||||||
font-size: 0.72rem;
|
font-size: 0.72rem;
|
||||||
padding: 0.1rem 0.4rem;
|
padding: 0.1rem 0.4rem;
|
||||||
background: none;
|
background: none;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
}
|
}
|
||||||
.btn-apply-link:hover { border-color: var(--fs-accent); color: var(--fs-accent); }
|
.btn-apply-link:hover { border-color: var(--color-primary); color: var(--color-primary); }
|
||||||
|
|
||||||
/* Writing Assistant section */
|
/* Writing Assistant section */
|
||||||
.assist-section {
|
.assist-section {
|
||||||
@@ -801,7 +801,7 @@ onUnmounted(() => assist.clearSelection());
|
|||||||
.assist-section-title {
|
.assist-section-title {
|
||||||
font-size: 0.78rem;
|
font-size: 0.78rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.05em;
|
letter-spacing: 0.05em;
|
||||||
}
|
}
|
||||||
@@ -810,19 +810,19 @@ onUnmounted(() => assist.clearSelection());
|
|||||||
.ef-label {
|
.ef-label {
|
||||||
font-family: 'Fraunces', Georgia, serif;
|
font-family: 'Fraunces', Georgia, serif;
|
||||||
font-size: 0.92rem;
|
font-size: 0.92rem;
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
}
|
}
|
||||||
.prompt-editor {
|
.prompt-editor {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 60vh;
|
min-height: 60vh;
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
padding: 14px 16px;
|
padding: 14px 16px;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
background: var(--fs-surface-hover);
|
background: var(--color-surface);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
/* Prompts are plain markdown — a code-style editor, not rich text. */
|
/* Prompts are plain markdown — a code-style editor, not rich text. */
|
||||||
font-family: var(--fs-font-mono);
|
font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
|
||||||
font-size: 0.88rem;
|
font-size: 0.88rem;
|
||||||
line-height: 1.55;
|
line-height: 1.55;
|
||||||
tab-size: 2;
|
tab-size: 2;
|
||||||
@@ -830,7 +830,7 @@ onUnmounted(() => assist.clearSelection());
|
|||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
.prompt-editor:focus {
|
.prompt-editor:focus {
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary);
|
||||||
}
|
}
|
||||||
/* Narrow screen: sidebar collapses */
|
/* Narrow screen: sidebar collapses */
|
||||||
@media (max-width: 720px) {
|
@media (max-width: 720px) {
|
||||||
@@ -839,7 +839,7 @@ onUnmounted(() => assist.clearSelection());
|
|||||||
.note-sidebar {
|
.note-sidebar {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-left: none;
|
border-left: none;
|
||||||
border-top: 1px solid var(--fs-border-color);
|
border-top: 1px solid var(--color-border);
|
||||||
overflow-y: visible;
|
overflow-y: visible;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -340,7 +340,7 @@ async function convertToTask() {
|
|||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
font-size: 0.83rem;
|
font-size: 0.83rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
margin: 0 0 0.75rem;
|
margin: 0 0 0.75rem;
|
||||||
}
|
}
|
||||||
.meta-item {
|
.meta-item {
|
||||||
@@ -359,7 +359,7 @@ async function convertToTask() {
|
|||||||
}
|
}
|
||||||
.backlinks {
|
.backlinks {
|
||||||
margin-top: 2.5rem;
|
margin-top: 2.5rem;
|
||||||
border-top: 1px solid var(--fs-border-color);
|
border-top: 1px solid var(--color-border);
|
||||||
padding-top: 1.25rem;
|
padding-top: 1.25rem;
|
||||||
}
|
}
|
||||||
.backlinks-heading {
|
.backlinks-heading {
|
||||||
@@ -370,14 +370,14 @@ async function convertToTask() {
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.06em;
|
letter-spacing: 0.06em;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
margin: 0 0 0.75rem;
|
margin: 0 0 0.75rem;
|
||||||
}
|
}
|
||||||
.backlinks-count {
|
.backlinks-count {
|
||||||
margin-left: 0.2rem;
|
margin-left: 0.2rem;
|
||||||
font-size: 0.72rem;
|
font-size: 0.72rem;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: 999px;
|
border-radius: 999px;
|
||||||
padding: 0 0.4rem;
|
padding: 0 0.4rem;
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
@@ -392,18 +392,18 @@ async function convertToTask() {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.6rem;
|
gap: 0.6rem;
|
||||||
padding: 0.5rem 0.75rem;
|
padding: 0.5rem 0.75rem;
|
||||||
border-radius: var(--fs-radius-lg);
|
border-radius: var(--radius-md);
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
transition: border-color 0.15s, box-shadow 0.15s;
|
transition: border-color 0.15s, box-shadow 0.15s;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
}
|
}
|
||||||
.backlink-card:hover {
|
.backlink-card:hover {
|
||||||
border-color: color-mix(in srgb, var(--fs-accent) 50%, transparent);
|
border-color: color-mix(in srgb, var(--color-primary) 50%, transparent);
|
||||||
box-shadow: 0 2px 8px rgba(0,0,0,0.06);
|
box-shadow: 0 2px 8px rgba(0,0,0,0.06);
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
}
|
}
|
||||||
.backlink-type-badge {
|
.backlink-type-badge {
|
||||||
font-size: 0.68rem;
|
font-size: 0.68rem;
|
||||||
@@ -415,9 +415,9 @@ async function convertToTask() {
|
|||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
.badge-note {
|
.badge-note {
|
||||||
background: color-mix(in srgb, var(--fs-accent) 12%, transparent);
|
background: color-mix(in srgb, var(--color-primary) 12%, transparent);
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
border: 1px solid color-mix(in srgb, var(--fs-accent) 25%, transparent);
|
border: 1px solid color-mix(in srgb, var(--color-primary) 25%, transparent);
|
||||||
}
|
}
|
||||||
.badge-task {
|
.badge-task {
|
||||||
background: color-mix(in srgb, #f59e0b 12%, transparent);
|
background: color-mix(in srgb, #f59e0b 12%, transparent);
|
||||||
@@ -446,12 +446,12 @@ async function convertToTask() {
|
|||||||
.skel-title,
|
.skel-title,
|
||||||
.skel-meta,
|
.skel-meta,
|
||||||
.skel-line {
|
.skel-line {
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
background: linear-gradient(
|
background: linear-gradient(
|
||||||
90deg,
|
90deg,
|
||||||
var(--fs-surface-raised) 25%,
|
var(--color-bg-secondary) 25%,
|
||||||
color-mix(in srgb, var(--fs-text-tertiary) 18%, var(--fs-surface-raised)) 50%,
|
color-mix(in srgb, var(--color-text-muted) 18%, var(--color-bg-secondary)) 50%,
|
||||||
var(--fs-surface-raised) 75%
|
var(--color-bg-secondary) 75%
|
||||||
);
|
);
|
||||||
background-size: 200% 100%;
|
background-size: 200% 100%;
|
||||||
animation: skel-shine 1.5s ease infinite;
|
animation: skel-shine 1.5s ease infinite;
|
||||||
@@ -463,7 +463,7 @@ async function convertToTask() {
|
|||||||
}
|
}
|
||||||
.skel-btn { width: 70px; height: 32px; }
|
.skel-btn { width: 70px; height: 32px; }
|
||||||
.skel-btn--wide { width: 90px; }
|
.skel-btn--wide { width: 90px; }
|
||||||
.skel-title { height: 2.2rem; width: 70%; border-radius: var(--fs-radius-lg); }
|
.skel-title { height: 2.2rem; width: 70%; border-radius: var(--radius-md); }
|
||||||
.skel-meta { height: 0.85rem; width: 40%; }
|
.skel-meta { height: 0.85rem; width: 40%; }
|
||||||
.skel-line { height: 0.9rem; }
|
.skel-line { height: 0.9rem; }
|
||||||
.skel-line--short { width: 55%; }
|
.skel-line--short { width: 55%; }
|
||||||
|
|||||||
@@ -317,9 +317,9 @@ function overallPct(project: Project): { total: number; pct: number } {
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.projects-list {
|
.projects-list {
|
||||||
max-width: var(--fs-layout-page-max);
|
max-width: var(--page-max-width);
|
||||||
margin: 2rem auto;
|
margin: 2rem auto;
|
||||||
padding: 0 var(--fs-layout-page-pad);
|
padding: 0 var(--page-padding-x);
|
||||||
overflow-x: clip;
|
overflow-x: clip;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -340,7 +340,7 @@ function overallPct(project: Project): { total: number; pct: number } {
|
|||||||
display: flex;
|
display: flex;
|
||||||
gap: 0.25rem;
|
gap: 0.25rem;
|
||||||
margin-bottom: 1.25rem;
|
margin-bottom: 1.25rem;
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border);
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
}
|
}
|
||||||
.tab-btn {
|
.tab-btn {
|
||||||
@@ -350,40 +350,40 @@ function overallPct(project: Project): { total: number; pct: number } {
|
|||||||
border-bottom: 2px solid transparent;
|
border-bottom: 2px solid transparent;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
margin-bottom: -1px;
|
margin-bottom: -1px;
|
||||||
}
|
}
|
||||||
.tab-btn:hover {
|
.tab-btn:hover {
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
}
|
}
|
||||||
.tab-btn.active {
|
.tab-btn.active {
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
border-bottom-color: var(--fs-accent);
|
border-bottom-color: var(--color-primary);
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading-msg,
|
.loading-msg,
|
||||||
.error-msg {
|
.error-msg {
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
}
|
}
|
||||||
.error-msg {
|
.error-msg {
|
||||||
color: var(--fs-error);
|
color: var(--color-danger);
|
||||||
}
|
}
|
||||||
|
|
||||||
.empty-state-rich { text-align: center; padding: 3rem 1rem; color: var(--fs-text-tertiary); }
|
.empty-state-rich { text-align: center; padding: 3rem 1rem; color: var(--color-text-muted); }
|
||||||
.empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; opacity: 0.3; }
|
.empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; opacity: 0.3; }
|
||||||
.empty-title { font-size: 1rem; font-weight: 500; color: var(--fs-text-secondary); margin: 0 0 0.35rem; }
|
.empty-title { font-size: 1rem; font-weight: 500; color: var(--color-text-secondary); margin: 0 0 0.35rem; }
|
||||||
.empty-sub { font-size: 0.85rem; margin: 0 0 1rem; }
|
.empty-sub { font-size: 0.85rem; margin: 0 0 1rem; }
|
||||||
.empty-action { display: inline-block; padding: 0.4rem 1rem; border: 1px solid var(--fs-action-primary); border-radius: var(--fs-radius-sm); color: var(--fs-action-primary); background: none; cursor: pointer; font-size: 0.85rem; transition: background 0.15s, color 0.15s; }
|
.empty-action { display: inline-block; padding: 0.4rem 1rem; border: 1px solid var(--color-action-primary); border-radius: var(--radius-sm); color: var(--color-action-primary); background: none; cursor: pointer; font-size: 0.85rem; transition: background 0.15s, color 0.15s; }
|
||||||
.empty-action:hover { background: var(--fs-action-primary); color: var(--fs-text-on-action); }
|
.empty-action:hover { background: var(--color-action-primary); color: var(--fs-text-on-action); }
|
||||||
|
|
||||||
.skeleton-card {
|
.skeleton-card {
|
||||||
height: 140px;
|
height: 140px;
|
||||||
border-radius: var(--fs-radius-lg);
|
border-radius: var(--radius-md);
|
||||||
background: linear-gradient(90deg, var(--fs-surface-raised) 25%, var(--fs-border-color) 50%, var(--fs-surface-raised) 75%);
|
background: linear-gradient(90deg, var(--color-bg-secondary) 25%, var(--color-border) 50%, var(--color-bg-secondary) 75%);
|
||||||
background-size: 200% 100%;
|
background-size: 200% 100%;
|
||||||
animation: skeleton-shimmer 1.4s ease infinite;
|
animation: skeleton-shimmer 1.4s ease infinite;
|
||||||
}
|
}
|
||||||
@@ -404,9 +404,9 @@ function overallPct(project: Project): { total: number; pct: number } {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.project-card {
|
.project-card {
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-lg);
|
border-radius: var(--radius-md);
|
||||||
padding: 1rem 1.1rem;
|
padding: 1rem 1.1rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: border-color 0.15s, box-shadow 0.15s, transform 0.18s ease;
|
transition: border-color 0.15s, box-shadow 0.15s, transform 0.18s ease;
|
||||||
@@ -415,7 +415,7 @@ function overallPct(project: Project): { total: number; pct: number } {
|
|||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
}
|
}
|
||||||
.project-card:hover {
|
.project-card:hover {
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary);
|
||||||
box-shadow: 0 2px 8px var(--color-shadow);
|
box-shadow: 0 2px 8px var(--color-shadow);
|
||||||
transform: translateY(-2px);
|
transform: translateY(-2px);
|
||||||
}
|
}
|
||||||
@@ -429,7 +429,7 @@ function overallPct(project: Project): { total: number; pct: number } {
|
|||||||
.project-title {
|
.project-title {
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
@@ -446,32 +446,32 @@ function overallPct(project: Project): { total: number; pct: number } {
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.status-active {
|
.status-active {
|
||||||
background: color-mix(in srgb, var(--fs-success) 15%, transparent);
|
background: color-mix(in srgb, var(--color-success) 15%, transparent);
|
||||||
color: var(--fs-success);
|
color: var(--color-success);
|
||||||
}
|
}
|
||||||
.status-completed {
|
.status-completed {
|
||||||
background: color-mix(in srgb, var(--fs-accent) 15%, transparent);
|
background: color-mix(in srgb, var(--color-primary) 15%, transparent);
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
}
|
}
|
||||||
.status-archived {
|
.status-archived {
|
||||||
background: color-mix(in srgb, var(--fs-text-tertiary) 15%, transparent);
|
background: color-mix(in srgb, var(--color-text-muted) 15%, transparent);
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
.project-goal {
|
.project-goal {
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
}
|
}
|
||||||
.field-label {
|
.field-label {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.project-desc {
|
.project-desc {
|
||||||
font-size: 0.82rem;
|
font-size: 0.82rem;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
line-height: 1.45;
|
line-height: 1.45;
|
||||||
}
|
}
|
||||||
@@ -486,18 +486,18 @@ function overallPct(project: Project): { total: number; pct: number } {
|
|||||||
.overall-bar-track {
|
.overall-bar-track {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 6px;
|
height: 6px;
|
||||||
background: var(--fs-border-color);
|
background: var(--color-border);
|
||||||
border-radius: 999px;
|
border-radius: 999px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.overall-bar-fill {
|
.overall-bar-fill {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
border-radius: 999px;
|
border-radius: 999px;
|
||||||
background: var(--fs-accent);
|
background: var(--color-primary);
|
||||||
transition: width 0.3s ease;
|
transition: width 0.3s ease;
|
||||||
}
|
}
|
||||||
.overall-bar-pct {
|
.overall-bar-pct {
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
min-width: 2.5rem;
|
min-width: 2.5rem;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
@@ -517,7 +517,7 @@ function overallPct(project: Project): { total: number; pct: number } {
|
|||||||
font-size: 0.72rem;
|
font-size: 0.72rem;
|
||||||
}
|
}
|
||||||
.milestone-bar-label {
|
.milestone-bar-label {
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
flex: 0 0 30%;
|
flex: 0 0 30%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@@ -527,7 +527,7 @@ function overallPct(project: Project): { total: number; pct: number } {
|
|||||||
.milestone-bar-track {
|
.milestone-bar-track {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
height: 5px;
|
height: 5px;
|
||||||
background: var(--fs-border-color);
|
background: var(--color-border);
|
||||||
border-radius: 999px;
|
border-radius: 999px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
@@ -537,7 +537,7 @@ function overallPct(project: Project): { total: number; pct: number } {
|
|||||||
transition: width 0.3s ease;
|
transition: width 0.3s ease;
|
||||||
}
|
}
|
||||||
.milestone-bar-pct {
|
.milestone-bar-pct {
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
min-width: 2.5rem;
|
min-width: 2.5rem;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
@@ -546,7 +546,7 @@ function overallPct(project: Project): { total: number; pct: number } {
|
|||||||
/* Deliberately quiet — it is a footnote about what is not shown, not another
|
/* Deliberately quiet — it is a footnote about what is not shown, not another
|
||||||
row competing with the bars above it. */
|
row competing with the bars above it. */
|
||||||
.milestone-more {
|
.milestone-more {
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
font-size: var(--fs-size-tiny);
|
font-size: var(--fs-size-tiny);
|
||||||
padding-top: 0.15rem;
|
padding-top: 0.15rem;
|
||||||
}
|
}
|
||||||
@@ -556,23 +556,23 @@ function overallPct(project: Project): { total: number; pct: number } {
|
|||||||
}
|
}
|
||||||
.meta-date {
|
.meta-date {
|
||||||
font-size: 0.75rem;
|
font-size: 0.75rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Modal */
|
/* Modal */
|
||||||
.modal-overlay {
|
.modal-overlay {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
background: var(--fs-overlay);
|
background: var(--color-overlay, rgba(0,0,0,0.45));
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
z-index: 200;
|
z-index: 200;
|
||||||
}
|
}
|
||||||
.modal-card {
|
.modal-card {
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-lg);
|
border-radius: var(--radius-md);
|
||||||
padding: 1.5rem;
|
padding: 1.5rem;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 480px;
|
max-width: 480px;
|
||||||
@@ -593,18 +593,18 @@ function overallPct(project: Project): { total: number; pct: number } {
|
|||||||
.modal-field label {
|
.modal-field label {
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
}
|
}
|
||||||
.required {
|
.required {
|
||||||
color: var(--fs-error);
|
color: var(--color-danger);
|
||||||
}
|
}
|
||||||
.modal-input,
|
.modal-input,
|
||||||
.modal-textarea {
|
.modal-textarea {
|
||||||
padding: 0.45rem 0.7rem;
|
padding: 0.45rem 0.7rem;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-bg);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
@@ -613,7 +613,7 @@ function overallPct(project: Project): { total: number; pct: number } {
|
|||||||
.modal-input:focus,
|
.modal-input:focus,
|
||||||
.modal-textarea:focus {
|
.modal-textarea:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary);
|
||||||
}
|
}
|
||||||
.modal-textarea {
|
.modal-textarea {
|
||||||
resize: vertical;
|
resize: vertical;
|
||||||
@@ -625,20 +625,20 @@ function overallPct(project: Project): { total: number; pct: number } {
|
|||||||
}
|
}
|
||||||
.modal-btn {
|
.modal-btn {
|
||||||
padding: 0.4rem 0.9rem;
|
padding: 0.4rem 0.9rem;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
}
|
}
|
||||||
.modal-btn:hover {
|
.modal-btn:hover {
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-bg);
|
||||||
}
|
}
|
||||||
.modal-btn-primary {
|
.modal-btn-primary {
|
||||||
background: var(--fs-action-primary);
|
background: var(--color-action-primary);
|
||||||
border-color: var(--fs-action-primary);
|
border-color: var(--color-action-primary);
|
||||||
color: var(--fs-text-on-action);
|
color: var(--fs-text-on-action);
|
||||||
}
|
}
|
||||||
.modal-btn-primary:hover:not(:disabled) {
|
.modal-btn-primary:hover:not(:disabled) {
|
||||||
|
|||||||
+159
-597
File diff suppressed because it is too large
Load Diff
@@ -168,9 +168,9 @@ async function handleSubmit() {
|
|||||||
.auth-card {
|
.auth-card {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-lg);
|
border-radius: var(--radius-md);
|
||||||
padding: 2rem;
|
padding: 2rem;
|
||||||
}
|
}
|
||||||
.auth-brand {
|
.auth-brand {
|
||||||
@@ -186,13 +186,13 @@ async function handleSubmit() {
|
|||||||
}
|
}
|
||||||
.loading-msg {
|
.loading-msg {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
font-size: 0.95rem;
|
font-size: 0.95rem;
|
||||||
padding: 1rem 0;
|
padding: 1rem 0;
|
||||||
}
|
}
|
||||||
.error-block {
|
.error-block {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
font-size: 0.95rem;
|
font-size: 0.95rem;
|
||||||
padding: 0.5rem 0;
|
padding: 0.5rem 0;
|
||||||
}
|
}
|
||||||
@@ -211,11 +211,11 @@ async function handleSubmit() {
|
|||||||
.input {
|
.input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0.5rem 0.75rem;
|
padding: 0.5rem 0.75rem;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
font-size: 0.95rem;
|
font-size: 0.95rem;
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-bg);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
.input:disabled {
|
.input:disabled {
|
||||||
@@ -224,36 +224,36 @@ async function handleSubmit() {
|
|||||||
}
|
}
|
||||||
.input:focus {
|
.input:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary);
|
||||||
}
|
}
|
||||||
.input-error {
|
.input-error {
|
||||||
border-color: var(--fs-error);
|
border-color: var(--color-danger);
|
||||||
}
|
}
|
||||||
.input-error:focus {
|
.input-error:focus {
|
||||||
border-color: var(--fs-error);
|
border-color: var(--color-danger);
|
||||||
}
|
}
|
||||||
.field-hint {
|
.field-hint {
|
||||||
margin: 0.35rem 0 0;
|
margin: 0.35rem 0 0;
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
.error-hint {
|
.error-hint {
|
||||||
margin: 0.35rem 0 0;
|
margin: 0.35rem 0 0;
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
color: var(--fs-error);
|
color: var(--color-danger);
|
||||||
}
|
}
|
||||||
.error-msg {
|
.error-msg {
|
||||||
color: var(--fs-error);
|
color: var(--color-danger);
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
margin: 0 0 0.75rem;
|
margin: 0 0 0.75rem;
|
||||||
}
|
}
|
||||||
.auth-footer {
|
.auth-footer {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
margin: 1rem 0 0;
|
margin: 1rem 0 0;
|
||||||
}
|
}
|
||||||
.auth-footer a {
|
.auth-footer a {
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -141,9 +141,9 @@ async function handleSubmit() {
|
|||||||
.auth-card {
|
.auth-card {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-lg);
|
border-radius: var(--radius-md);
|
||||||
padding: 2rem;
|
padding: 2rem;
|
||||||
}
|
}
|
||||||
.auth-brand {
|
.auth-brand {
|
||||||
@@ -159,13 +159,13 @@ async function handleSubmit() {
|
|||||||
}
|
}
|
||||||
.loading-msg {
|
.loading-msg {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
padding: 1rem 0;
|
padding: 1rem 0;
|
||||||
}
|
}
|
||||||
.closed-msg {
|
.closed-msg {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
font-size: 0.95rem;
|
font-size: 0.95rem;
|
||||||
padding: 0.5rem 0;
|
padding: 0.5rem 0;
|
||||||
}
|
}
|
||||||
@@ -184,45 +184,45 @@ async function handleSubmit() {
|
|||||||
.input {
|
.input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0.5rem 0.75rem;
|
padding: 0.5rem 0.75rem;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
font-size: 0.95rem;
|
font-size: 0.95rem;
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-bg);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
.input:focus {
|
.input:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary);
|
||||||
}
|
}
|
||||||
.input-error {
|
.input-error {
|
||||||
border-color: var(--fs-error);
|
border-color: var(--color-danger);
|
||||||
}
|
}
|
||||||
.input-error:focus {
|
.input-error:focus {
|
||||||
border-color: var(--fs-error);
|
border-color: var(--color-danger);
|
||||||
}
|
}
|
||||||
.field-hint {
|
.field-hint {
|
||||||
margin: 0.35rem 0 0;
|
margin: 0.35rem 0 0;
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
.error-hint {
|
.error-hint {
|
||||||
margin: 0.35rem 0 0;
|
margin: 0.35rem 0 0;
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
color: var(--fs-error);
|
color: var(--color-danger);
|
||||||
}
|
}
|
||||||
.error-msg {
|
.error-msg {
|
||||||
color: var(--fs-error);
|
color: var(--color-danger);
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
margin: 0 0 0.75rem;
|
margin: 0 0 0.75rem;
|
||||||
}
|
}
|
||||||
.auth-footer {
|
.auth-footer {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
margin: 1rem 0 0;
|
margin: 1rem 0 0;
|
||||||
}
|
}
|
||||||
.auth-footer a {
|
.auth-footer a {
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -117,9 +117,9 @@ async function handleSubmit() {
|
|||||||
.auth-card {
|
.auth-card {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-lg);
|
border-radius: var(--radius-md);
|
||||||
padding: 2rem;
|
padding: 2rem;
|
||||||
}
|
}
|
||||||
.auth-brand {
|
.auth-brand {
|
||||||
@@ -135,7 +135,7 @@ async function handleSubmit() {
|
|||||||
}
|
}
|
||||||
.error-block {
|
.error-block {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
font-size: 0.95rem;
|
font-size: 0.95rem;
|
||||||
padding: 0.5rem 0;
|
padding: 0.5rem 0;
|
||||||
}
|
}
|
||||||
@@ -144,7 +144,7 @@ async function handleSubmit() {
|
|||||||
}
|
}
|
||||||
.success-msg {
|
.success-msg {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
font-size: 0.95rem;
|
font-size: 0.95rem;
|
||||||
padding: 0.5rem 0;
|
padding: 0.5rem 0;
|
||||||
}
|
}
|
||||||
@@ -163,45 +163,45 @@ async function handleSubmit() {
|
|||||||
.input {
|
.input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0.5rem 0.75rem;
|
padding: 0.5rem 0.75rem;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
font-size: 0.95rem;
|
font-size: 0.95rem;
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-bg);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
.input:focus {
|
.input:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary);
|
||||||
}
|
}
|
||||||
.input-error {
|
.input-error {
|
||||||
border-color: var(--fs-error);
|
border-color: var(--color-danger);
|
||||||
}
|
}
|
||||||
.input-error:focus {
|
.input-error:focus {
|
||||||
border-color: var(--fs-error);
|
border-color: var(--color-danger);
|
||||||
}
|
}
|
||||||
.field-hint {
|
.field-hint {
|
||||||
margin: 0.35rem 0 0;
|
margin: 0.35rem 0 0;
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
.error-hint {
|
.error-hint {
|
||||||
margin: 0.35rem 0 0;
|
margin: 0.35rem 0 0;
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
color: var(--fs-error);
|
color: var(--color-danger);
|
||||||
}
|
}
|
||||||
.error-msg {
|
.error-msg {
|
||||||
color: var(--fs-error);
|
color: var(--color-danger);
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
margin: 0 0 0.75rem;
|
margin: 0 0 0.75rem;
|
||||||
}
|
}
|
||||||
.auth-footer {
|
.auth-footer {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
margin: 1rem 0 0;
|
margin: 1rem 0 0;
|
||||||
}
|
}
|
||||||
.auth-footer a {
|
.auth-footer a {
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -107,10 +107,10 @@ watch(() => route.query, syncFromRoute);
|
|||||||
grid-template-columns: 280px 300px 1fr;
|
grid-template-columns: 280px 300px 1fr;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
gap: 1px;
|
gap: 1px;
|
||||||
background: var(--fs-border-color);
|
background: var(--color-border, #2a2a2e);
|
||||||
}
|
}
|
||||||
.pane.empty {
|
.pane.empty {
|
||||||
background: var(--fs-surface-hover);
|
background: var(--color-surface, #18181b);
|
||||||
padding: 1rem;
|
padding: 1rem;
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
|
|||||||
+246
-484
File diff suppressed because it is too large
Load Diff
@@ -106,11 +106,11 @@ onMounted(async () => {
|
|||||||
font-size: 1.8rem;
|
font-size: 1.8rem;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading-state {
|
.loading-state {
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-muted);
|
||||||
padding: 2rem;
|
padding: 2rem;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
@@ -124,7 +124,7 @@ onMounted(async () => {
|
|||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.07em;
|
letter-spacing: 0.07em;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-muted);
|
||||||
margin: 0 0 0.75rem;
|
margin: 0 0 0.75rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -136,9 +136,9 @@ onMounted(async () => {
|
|||||||
|
|
||||||
.shared-card {
|
.shared-card {
|
||||||
display: flex;
|
display: flex;
|
||||||
background: var(--fs-surface-hover);
|
background: var(--color-surface);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-xl);
|
border-radius: var(--radius-lg);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
transition: box-shadow 0.15s, transform 0.15s;
|
transition: box-shadow 0.15s, transform 0.15s;
|
||||||
@@ -151,7 +151,7 @@ onMounted(async () => {
|
|||||||
.card-color-bar {
|
.card-color-bar {
|
||||||
width: 4px;
|
width: 4px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
background: var(--fs-border-color);
|
background: var(--color-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-body {
|
.card-body {
|
||||||
@@ -163,7 +163,7 @@ onMounted(async () => {
|
|||||||
.card-title {
|
.card-title {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: 0.95rem;
|
font-size: 0.95rem;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
margin-bottom: 0.3rem;
|
margin-bottom: 0.3rem;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@@ -179,12 +179,12 @@ onMounted(async () => {
|
|||||||
|
|
||||||
.card-owner {
|
.card-owner {
|
||||||
font-size: 0.78rem;
|
font-size: 0.78rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-desc {
|
.card-desc {
|
||||||
font-size: 0.82rem;
|
font-size: 0.82rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-muted);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
@@ -203,25 +203,25 @@ onMounted(async () => {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.6rem;
|
gap: 0.6rem;
|
||||||
padding: 0.6rem 0.9rem;
|
padding: 0.6rem 0.9rem;
|
||||||
background: var(--fs-surface-hover);
|
background: var(--color-surface);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
transition: background 0.1s;
|
transition: background 0.1s;
|
||||||
}
|
}
|
||||||
.shared-row:hover {
|
.shared-row:hover {
|
||||||
background: var(--fs-surface-hover);
|
background: var(--color-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
.row-icon {
|
.row-icon {
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-muted);
|
||||||
}
|
}
|
||||||
.row-title {
|
.row-title {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@@ -229,7 +229,7 @@ onMounted(async () => {
|
|||||||
}
|
}
|
||||||
.row-owner {
|
.row-owner {
|
||||||
font-size: 0.78rem;
|
font-size: 0.78rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-muted);
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -242,12 +242,12 @@ onMounted(async () => {
|
|||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.perm-viewer { background: color-mix(in srgb, var(--fs-text-tertiary) 15%, transparent); color: var(--fs-text-tertiary); }
|
.perm-viewer { background: color-mix(in srgb, var(--color-muted) 15%, transparent); color: var(--color-muted); }
|
||||||
.perm-editor { background: color-mix(in srgb, var(--fs-accent) 15%, transparent); color: var(--fs-accent); }
|
.perm-editor { background: color-mix(in srgb, var(--color-primary) 15%, transparent); color: var(--color-primary); }
|
||||||
.perm-admin { background: color-mix(in srgb, var(--fs-warning) 15%, transparent); color: var(--fs-warning); }
|
.perm-admin { background: color-mix(in srgb, var(--color-warning, #f59e0b) 15%, transparent); color: var(--color-warning, #f59e0b); }
|
||||||
|
|
||||||
.empty-msg {
|
.empty-msg {
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-muted);
|
||||||
font-size: 0.88rem;
|
font-size: 0.88rem;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 1rem 0;
|
padding: 1rem 0;
|
||||||
|
|||||||
@@ -205,7 +205,7 @@ async function confirmDelete() {
|
|||||||
.snippet-detail {
|
.snippet-detail {
|
||||||
max-width: 820px;
|
max-width: 820px;
|
||||||
margin: 2rem auto;
|
margin: 2rem auto;
|
||||||
padding: 0 var(--fs-layout-page-pad);
|
padding: 0 var(--page-padding-x);
|
||||||
overflow-x: clip;
|
overflow-x: clip;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -213,20 +213,20 @@ async function confirmDelete() {
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
.back-link:hover {
|
.back-link:hover {
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.state-msg {
|
.state-msg {
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
}
|
}
|
||||||
.error-msg {
|
.error-msg {
|
||||||
color: var(--fs-error);
|
color: var(--color-danger);
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
}
|
}
|
||||||
@@ -239,7 +239,7 @@ async function confirmDelete() {
|
|||||||
}
|
}
|
||||||
.snippet-name {
|
.snippet-name {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-family: var(--fs-font-mono);
|
font-family: var(--font-mono, ui-monospace, "JetBrains Mono", monospace);
|
||||||
font-size: 1.4rem;
|
font-size: 1.4rem;
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
}
|
}
|
||||||
@@ -253,7 +253,7 @@ async function confirmDelete() {
|
|||||||
.when-to-use {
|
.when-to-use {
|
||||||
margin: 0.75rem 0 1.25rem;
|
margin: 0.75rem 0 1.25rem;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
line-height: 1.55;
|
line-height: 1.55;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -262,12 +262,12 @@ async function confirmDelete() {
|
|||||||
.shared-notice {
|
.shared-notice {
|
||||||
margin: 0.75rem 0 0;
|
margin: 0.75rem 0 0;
|
||||||
padding: 0.6rem 0.85rem;
|
padding: 0.6rem 0.85rem;
|
||||||
border-left: 3px solid var(--fs-text-tertiary);
|
border-left: 3px solid var(--color-text-muted);
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.meta-grid {
|
.meta-grid {
|
||||||
@@ -280,23 +280,23 @@ async function confirmDelete() {
|
|||||||
font-size: 0.7rem;
|
font-size: 0.7rem;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.06em;
|
letter-spacing: 0.06em;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
padding-top: 0.15rem;
|
padding-top: 0.15rem;
|
||||||
}
|
}
|
||||||
.meta-grid dd {
|
.meta-grid dd {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
}
|
}
|
||||||
.meta-grid code,
|
.meta-grid code,
|
||||||
.tag-row + * code {
|
.tag-row + * code {
|
||||||
font-family: var(--fs-font-mono);
|
font-family: var(--font-mono, ui-monospace, "JetBrains Mono", monospace);
|
||||||
font-size: 0.82rem;
|
font-size: 0.82rem;
|
||||||
background: color-mix(in srgb, var(--fs-accent) 12%, transparent);
|
background: color-mix(in srgb, var(--color-primary) 12%, transparent);
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
padding: 0.08rem 0.35rem;
|
padding: 0.08rem 0.35rem;
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
.location-list {
|
.location-list {
|
||||||
@@ -317,7 +317,7 @@ async function confirmDelete() {
|
|||||||
align-items: baseline;
|
align-items: baseline;
|
||||||
}
|
}
|
||||||
.merged-hint {
|
.merged-hint {
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
}
|
}
|
||||||
.merged-entry {
|
.merged-entry {
|
||||||
@@ -328,15 +328,15 @@ async function confirmDelete() {
|
|||||||
.unmerge-btn {
|
.unmerge-btn {
|
||||||
font-size: 0.72rem;
|
font-size: 0.72rem;
|
||||||
padding: 0.05rem 0.35rem;
|
padding: 0.05rem 0.35rem;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.unmerge-btn:hover:not(:disabled) {
|
.unmerge-btn:hover:not(:disabled) {
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
border-color: var(--fs-text-tertiary);
|
border-color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
.unmerge-btn:disabled {
|
.unmerge-btn:disabled {
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
@@ -344,30 +344,30 @@ async function confirmDelete() {
|
|||||||
}
|
}
|
||||||
.unmerge-na {
|
.unmerge-na {
|
||||||
font-size: 0.72rem;
|
font-size: 0.72rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
/* Cursor cues that the explanation is in the tooltip. */
|
/* Cursor cues that the explanation is in the tooltip. */
|
||||||
cursor: help;
|
cursor: help;
|
||||||
}
|
}
|
||||||
|
|
||||||
.code-block {
|
.code-block {
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-lg);
|
border-radius: var(--radius-md);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-bg);
|
||||||
}
|
}
|
||||||
.code-bar {
|
.code-bar {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 0.4rem 0.5rem 0.4rem 0.85rem;
|
padding: 0.4rem 0.5rem 0.4rem 0.85rem;
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border);
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
}
|
}
|
||||||
.code-lang {
|
.code-lang {
|
||||||
font-size: 0.72rem;
|
font-size: 0.72rem;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.06em;
|
letter-spacing: 0.06em;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
.btn-copy {
|
.btn-copy {
|
||||||
padding: 0.2rem 0.65rem;
|
padding: 0.2rem 0.65rem;
|
||||||
@@ -379,10 +379,10 @@ async function confirmDelete() {
|
|||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
}
|
}
|
||||||
.code-block code {
|
.code-block code {
|
||||||
font-family: var(--fs-font-mono);
|
font-family: var(--font-mono, ui-monospace, "JetBrains Mono", monospace);
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
white-space: pre;
|
white-space: pre;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -396,9 +396,9 @@ async function confirmDelete() {
|
|||||||
font-size: 0.72rem;
|
font-size: 0.72rem;
|
||||||
padding: 0.15rem 0.5rem;
|
padding: 0.15rem 0.5rem;
|
||||||
border-radius: 999px;
|
border-radius: 999px;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 600px) {
|
@media (max-width: 600px) {
|
||||||
|
|||||||
@@ -365,7 +365,7 @@ function cancel() {
|
|||||||
.snippet-editor {
|
.snippet-editor {
|
||||||
max-width: 760px;
|
max-width: 760px;
|
||||||
margin: 2rem auto;
|
margin: 2rem auto;
|
||||||
padding: 0 var(--fs-layout-page-pad);
|
padding: 0 var(--page-padding-x);
|
||||||
overflow-x: clip;
|
overflow-x: clip;
|
||||||
}
|
}
|
||||||
.snippet-editor h1 {
|
.snippet-editor h1 {
|
||||||
@@ -376,19 +376,19 @@ function cancel() {
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
.back-link:hover {
|
.back-link:hover {
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.state-msg {
|
.state-msg {
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
}
|
}
|
||||||
.error-msg {
|
.error-msg {
|
||||||
color: var(--fs-error);
|
color: var(--color-danger);
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -415,27 +415,27 @@ function cancel() {
|
|||||||
.location-set legend {
|
.location-set legend {
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
}
|
}
|
||||||
.required {
|
.required {
|
||||||
color: var(--fs-error);
|
color: var(--color-danger);
|
||||||
}
|
}
|
||||||
.hint {
|
.hint {
|
||||||
font-size: 0.75rem;
|
font-size: 0.75rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
margin: 0.1rem 0 0;
|
margin: 0.1rem 0 0;
|
||||||
}
|
}
|
||||||
.hint-inline {
|
.hint-inline {
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
.input {
|
.input {
|
||||||
padding: 0.5rem 0.7rem;
|
padding: 0.5rem 0.7rem;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-bg);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
@@ -443,11 +443,11 @@ function cancel() {
|
|||||||
}
|
}
|
||||||
.input:focus {
|
.input:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary);
|
||||||
box-shadow: var(--fs-focus-ring);
|
box-shadow: var(--focus-ring);
|
||||||
}
|
}
|
||||||
.mono {
|
.mono {
|
||||||
font-family: var(--fs-font-mono);
|
font-family: var(--font-mono, ui-monospace, "JetBrains Mono", monospace);
|
||||||
}
|
}
|
||||||
.code-area {
|
.code-area {
|
||||||
resize: vertical;
|
resize: vertical;
|
||||||
@@ -459,8 +459,8 @@ function cancel() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.location-set {
|
.location-set {
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-lg);
|
border-radius: var(--radius-md);
|
||||||
padding: 0.85rem 1rem 1rem;
|
padding: 0.85rem 1rem 1rem;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
@@ -477,32 +477,32 @@ function cancel() {
|
|||||||
.loc-remove {
|
.loc-remove {
|
||||||
width: 2rem;
|
width: 2rem;
|
||||||
height: 2rem;
|
height: 2rem;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
background: transparent;
|
background: transparent;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 1.1rem;
|
font-size: 1.1rem;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
.loc-remove:hover {
|
.loc-remove:hover {
|
||||||
border-color: var(--fs-error);
|
border-color: var(--color-danger);
|
||||||
color: var(--fs-error);
|
color: var(--color-danger);
|
||||||
}
|
}
|
||||||
.loc-add {
|
.loc-add {
|
||||||
margin-top: 0.15rem;
|
margin-top: 0.15rem;
|
||||||
padding: 0.35rem 0.7rem;
|
padding: 0.35rem 0.7rem;
|
||||||
border: 1px dashed var(--fs-border-color);
|
border: 1px dashed var(--color-border);
|
||||||
background: transparent;
|
background: transparent;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 0.82rem;
|
font-size: 0.82rem;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
}
|
}
|
||||||
.loc-add:hover {
|
.loc-add:hover {
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary);
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 600px) {
|
@media (max-width: 600px) {
|
||||||
@@ -514,7 +514,7 @@ function cancel() {
|
|||||||
.field-label {
|
.field-label {
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
}
|
}
|
||||||
.systems {
|
.systems {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -528,11 +528,11 @@ function cancel() {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.45rem;
|
gap: 0.45rem;
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.system-opt input {
|
.system-opt input {
|
||||||
accent-color: var(--fs-accent);
|
accent-color: var(--color-primary);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -541,25 +541,25 @@ function cancel() {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 0.4rem;
|
gap: 0.4rem;
|
||||||
padding: 0.85rem 1rem;
|
padding: 0.85rem 1rem;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-left: 3px solid var(--fs-warning);
|
border-left: 3px solid var(--color-warning, var(--color-primary));
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
}
|
}
|
||||||
.duplicate-title {
|
.duplicate-title {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
}
|
}
|
||||||
.duplicate-body {
|
.duplicate-body {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
}
|
}
|
||||||
.duplicate-body a {
|
.duplicate-body a {
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
}
|
}
|
||||||
.duplicate-actions {
|
.duplicate-actions {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -519,9 +519,9 @@ function usageTitle(s: SnippetListItem): string {
|
|||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.snippets-list {
|
.snippets-list {
|
||||||
max-width: var(--fs-layout-page-max);
|
max-width: var(--page-max-width);
|
||||||
margin: 2rem auto;
|
margin: 2rem auto;
|
||||||
padding: 0 var(--fs-layout-page-pad);
|
padding: 0 var(--page-padding-x);
|
||||||
overflow-x: clip;
|
overflow-x: clip;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -536,7 +536,7 @@ function usageTitle(s: SnippetListItem): string {
|
|||||||
}
|
}
|
||||||
.page-sub {
|
.page-sub {
|
||||||
margin: 0 0 1.25rem;
|
margin: 0 0 1.25rem;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
max-width: 60ch;
|
max-width: 60ch;
|
||||||
@@ -553,8 +553,8 @@ function usageTitle(s: SnippetListItem): string {
|
|||||||
}
|
}
|
||||||
/* Filter is engaged — the accent marks "you are here", per the design system. */
|
/* Filter is engaged — the accent marks "you are here", per the design system. */
|
||||||
.filter-on {
|
.filter-on {
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary);
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.location-row {
|
.location-row {
|
||||||
@@ -569,12 +569,12 @@ function usageTitle(s: SnippetListItem): string {
|
|||||||
min-width: 0;
|
min-width: 0;
|
||||||
max-width: 12rem;
|
max-width: 12rem;
|
||||||
padding: 0.4rem 0.65rem;
|
padding: 0.4rem 0.65rem;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-bg);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
font-family: var(--fs-font-mono);
|
font-family: var(--font-mono, ui-monospace, "JetBrains Mono", monospace);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
.loc-input-wide {
|
.loc-input-wide {
|
||||||
@@ -583,46 +583,46 @@ function usageTitle(s: SnippetListItem): string {
|
|||||||
}
|
}
|
||||||
.loc-input::placeholder {
|
.loc-input::placeholder {
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
.loc-input:focus {
|
.loc-input:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary);
|
||||||
box-shadow: var(--fs-focus-ring);
|
box-shadow: var(--focus-ring);
|
||||||
}
|
}
|
||||||
.loc-clear {
|
.loc-clear {
|
||||||
padding: 0.4rem 0.65rem;
|
padding: 0.4rem 0.65rem;
|
||||||
border: none;
|
border: none;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
.loc-clear:hover {
|
.loc-clear:hover {
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
}
|
}
|
||||||
.search-input {
|
.search-input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 420px;
|
max-width: 420px;
|
||||||
padding: 0.5rem 0.8rem;
|
padding: 0.5rem 0.8rem;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-bg);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
.search-input:focus {
|
.search-input:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary);
|
||||||
box-shadow: var(--fs-focus-ring);
|
box-shadow: var(--focus-ring);
|
||||||
}
|
}
|
||||||
|
|
||||||
.error-msg {
|
.error-msg {
|
||||||
color: var(--fs-error);
|
color: var(--color-danger);
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
}
|
}
|
||||||
@@ -630,10 +630,10 @@ function usageTitle(s: SnippetListItem): string {
|
|||||||
.empty-state-rich {
|
.empty-state-rich {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 3rem 1rem;
|
padding: 3rem 1rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
.empty-icon {
|
.empty-icon {
|
||||||
font-family: var(--fs-font-mono);
|
font-family: var(--font-mono, ui-monospace, "JetBrains Mono", monospace);
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
margin-bottom: 0.75rem;
|
margin-bottom: 0.75rem;
|
||||||
opacity: 0.35;
|
opacity: 0.35;
|
||||||
@@ -641,7 +641,7 @@ function usageTitle(s: SnippetListItem): string {
|
|||||||
.empty-title {
|
.empty-title {
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
margin: 0 0 0.35rem;
|
margin: 0 0 0.35rem;
|
||||||
}
|
}
|
||||||
.empty-sub {
|
.empty-sub {
|
||||||
@@ -654,16 +654,16 @@ function usageTitle(s: SnippetListItem): string {
|
|||||||
.empty-action {
|
.empty-action {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 0.4rem 1rem;
|
padding: 0.4rem 1rem;
|
||||||
border: 1px solid var(--fs-action-primary);
|
border: 1px solid var(--color-action-primary);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
color: var(--fs-action-primary);
|
color: var(--color-action-primary);
|
||||||
background: none;
|
background: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
transition: background 0.15s, color 0.15s;
|
transition: background 0.15s, color 0.15s;
|
||||||
}
|
}
|
||||||
.empty-action:hover {
|
.empty-action:hover {
|
||||||
background: var(--fs-action-primary);
|
background: var(--color-action-primary);
|
||||||
color: var(--fs-text-on-action);
|
color: var(--fs-text-on-action);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -675,8 +675,8 @@ function usageTitle(s: SnippetListItem): string {
|
|||||||
}
|
}
|
||||||
.skeleton-card {
|
.skeleton-card {
|
||||||
height: 96px;
|
height: 96px;
|
||||||
border-radius: var(--fs-radius-lg);
|
border-radius: var(--radius-md);
|
||||||
background: linear-gradient(90deg, var(--fs-surface-raised) 25%, var(--fs-border-color) 50%, var(--fs-surface-raised) 75%);
|
background: linear-gradient(90deg, var(--color-bg-secondary) 25%, var(--color-border) 50%, var(--color-bg-secondary) 75%);
|
||||||
background-size: 200% 100%;
|
background-size: 200% 100%;
|
||||||
animation: skeleton-shimmer 1.4s ease infinite;
|
animation: skeleton-shimmer 1.4s ease infinite;
|
||||||
}
|
}
|
||||||
@@ -686,9 +686,9 @@ function usageTitle(s: SnippetListItem): string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.snippet-card {
|
.snippet-card {
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-lg);
|
border-radius: var(--radius-md);
|
||||||
padding: 0.9rem 1rem;
|
padding: 0.9rem 1rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: border-color 0.15s, box-shadow 0.15s, transform 0.18s ease;
|
transition: border-color 0.15s, box-shadow 0.15s, transform 0.18s ease;
|
||||||
@@ -697,14 +697,14 @@ function usageTitle(s: SnippetListItem): string {
|
|||||||
gap: 0.4rem;
|
gap: 0.4rem;
|
||||||
}
|
}
|
||||||
.snippet-card:hover {
|
.snippet-card:hover {
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary);
|
||||||
box-shadow: 0 2px 8px var(--color-shadow);
|
box-shadow: 0 2px 8px var(--color-shadow);
|
||||||
transform: translateY(-2px);
|
transform: translateY(-2px);
|
||||||
}
|
}
|
||||||
.snippet-card:focus-visible {
|
.snippet-card:focus-visible {
|
||||||
outline: none;
|
outline: none;
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary);
|
||||||
box-shadow: var(--fs-focus-ring);
|
box-shadow: var(--focus-ring);
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-header {
|
.card-header {
|
||||||
@@ -716,11 +716,11 @@ function usageTitle(s: SnippetListItem): string {
|
|||||||
.snippet-name {
|
.snippet-name {
|
||||||
font-size: 0.95rem;
|
font-size: 0.95rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
font-family: var(--fs-font-mono);
|
font-family: var(--font-mono, ui-monospace, "JetBrains Mono", monospace);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Language tag — accent pill per the design system's tag treatment. */
|
/* Language tag — accent pill per the design system's tag treatment. */
|
||||||
@@ -731,13 +731,13 @@ function usageTitle(s: SnippetListItem): string {
|
|||||||
border-radius: 999px;
|
border-radius: 999px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
background: color-mix(in srgb, var(--fs-accent) 15%, transparent);
|
background: color-mix(in srgb, var(--color-primary) 15%, transparent);
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.snippet-when {
|
.snippet-when {
|
||||||
font-size: 0.83rem;
|
font-size: 0.83rem;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
line-height: 1.45;
|
line-height: 1.45;
|
||||||
}
|
}
|
||||||
@@ -751,7 +751,7 @@ function usageTitle(s: SnippetListItem): string {
|
|||||||
}
|
}
|
||||||
.meta-date {
|
.meta-date {
|
||||||
font-size: 0.73rem;
|
font-size: 0.73rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
/* Marks a record someone else owns. Present only on shared rows, so an
|
/* Marks a record someone else owns. Present only on shared rows, so an
|
||||||
unmarked card is unambiguously the operator's own. */
|
unmarked card is unambiguously the operator's own. */
|
||||||
@@ -760,24 +760,24 @@ function usageTitle(s: SnippetListItem): string {
|
|||||||
padding: 0.1rem 0.4rem;
|
padding: 0.1rem 0.4rem;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
background: color-mix(in srgb, var(--fs-text-tertiary) 15%, transparent);
|
background: color-mix(in srgb, var(--color-text-muted) 15%, transparent);
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Near-duplicate report */
|
/* Near-duplicate report */
|
||||||
.dup-panel {
|
.dup-panel {
|
||||||
margin-bottom: 1.25rem;
|
margin-bottom: 1.25rem;
|
||||||
padding: 0.85rem 1rem;
|
padding: 0.85rem 1rem;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
background: var(--fs-surface-hover);
|
background: var(--color-surface-alt, var(--color-surface));
|
||||||
}
|
}
|
||||||
|
|
||||||
.dup-empty,
|
.dup-empty,
|
||||||
.dup-head {
|
.dup-head {
|
||||||
margin: 0 0 0.5rem;
|
margin: 0 0 0.5rem;
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
.dup-empty {
|
.dup-empty {
|
||||||
@@ -790,7 +790,7 @@ function usageTitle(s: SnippetListItem): string {
|
|||||||
gap: 0.75rem;
|
gap: 0.75rem;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
padding: 0.5rem 0;
|
padding: 0.5rem 0;
|
||||||
border-top: 1px solid var(--fs-border-color);
|
border-top: 1px solid var(--color-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.dup-members {
|
.dup-members {
|
||||||
@@ -805,14 +805,14 @@ function usageTitle(s: SnippetListItem): string {
|
|||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
padding: 0.1rem 0.45rem;
|
padding: 0.1rem 0.45rem;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
background: color-mix(in srgb, var(--fs-text-tertiary) 12%, transparent);
|
background: color-mix(in srgb, var(--color-text-muted) 12%, transparent);
|
||||||
/* Long snippet names must not push the row into a horizontal scroll. */
|
/* Long snippet names must not push the row into a horizontal scroll. */
|
||||||
overflow-wrap: anywhere;
|
overflow-wrap: anywhere;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dup-score {
|
.dup-score {
|
||||||
font-size: 0.75rem;
|
font-size: 0.75rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
font-variant-numeric: tabular-nums;
|
font-variant-numeric: tabular-nums;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
@@ -828,8 +828,8 @@ function usageTitle(s: SnippetListItem): string {
|
|||||||
padding: 0.1rem 0.4rem;
|
padding: 0.1rem 0.4rem;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
background: color-mix(in srgb, var(--fs-error) 15%, transparent);
|
background: color-mix(in srgb, var(--color-danger, #b91c1c) 15%, transparent);
|
||||||
color: var(--fs-error);
|
color: var(--color-danger, #b91c1c);
|
||||||
}
|
}
|
||||||
|
|
||||||
.usage-tag {
|
.usage-tag {
|
||||||
@@ -838,15 +838,15 @@ function usageTitle(s: SnippetListItem): string {
|
|||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
font-variant-numeric: tabular-nums;
|
font-variant-numeric: tabular-nums;
|
||||||
background: color-mix(in srgb, var(--fs-text-tertiary) 15%, transparent);
|
background: color-mix(in srgb, var(--color-text-muted) 15%, transparent);
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dead weight is a nudge, not an error — it warns in the warning colour rather
|
/* Dead weight is a nudge, not an error — it warns in the warning colour rather
|
||||||
than the danger one, because the record isn't broken, just unearned. */
|
than the danger one, because the record isn't broken, just unearned. */
|
||||||
.usage-tag.usage-dead {
|
.usage-tag.usage-dead {
|
||||||
background: color-mix(in srgb, var(--fs-warning) 18%, transparent);
|
background: color-mix(in srgb, var(--color-warning, #b45309) 18%, transparent);
|
||||||
color: var(--fs-warning);
|
color: var(--color-warning, #b45309);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Header + select-mode */
|
/* Header + select-mode */
|
||||||
@@ -858,7 +858,7 @@ function usageTitle(s: SnippetListItem): string {
|
|||||||
|
|
||||||
/* Selected card = 2px accent border per the design system (featured/active). */
|
/* Selected card = 2px accent border per the design system (featured/active). */
|
||||||
.snippet-card.selected {
|
.snippet-card.selected {
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary);
|
||||||
border-width: 2px;
|
border-width: 2px;
|
||||||
padding: calc(0.9rem - 1px) calc(1rem - 1px);
|
padding: calc(0.9rem - 1px) calc(1rem - 1px);
|
||||||
}
|
}
|
||||||
@@ -867,14 +867,14 @@ function usageTitle(s: SnippetListItem): string {
|
|||||||
height: 16px;
|
height: 16px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
margin-top: 0.15rem;
|
margin-top: 0.15rem;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
transition: background 0.12s, border-color 0.12s;
|
transition: background 0.12s, border-color 0.12s;
|
||||||
}
|
}
|
||||||
.select-box.on {
|
.select-box.on {
|
||||||
background: var(--fs-accent);
|
background: var(--color-primary);
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.select-bar {
|
.select-bar {
|
||||||
@@ -885,19 +885,19 @@ function usageTitle(s: SnippetListItem): string {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.75rem;
|
gap: 0.75rem;
|
||||||
padding: 0.6rem 0.9rem;
|
padding: 0.6rem 0.9rem;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-lg);
|
border-radius: var(--radius-md);
|
||||||
box-shadow: 0 4px 16px var(--color-shadow);
|
box-shadow: 0 4px 16px var(--color-shadow);
|
||||||
}
|
}
|
||||||
.select-count {
|
.select-count {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
}
|
}
|
||||||
.select-hint {
|
.select-hint {
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
}
|
}
|
||||||
@@ -906,16 +906,16 @@ function usageTitle(s: SnippetListItem): string {
|
|||||||
.modal-overlay {
|
.modal-overlay {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
background: var(--fs-overlay);
|
background: var(--color-overlay, rgba(0, 0, 0, 0.45));
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
z-index: 200;
|
z-index: 200;
|
||||||
}
|
}
|
||||||
.modal-card {
|
.modal-card {
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-lg);
|
border-radius: var(--radius-md);
|
||||||
padding: 1.5rem;
|
padding: 1.5rem;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 460px;
|
max-width: 460px;
|
||||||
@@ -931,7 +931,7 @@ function usageTitle(s: SnippetListItem): string {
|
|||||||
.modal-desc {
|
.modal-desc {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
.merge-choices {
|
.merge-choices {
|
||||||
@@ -944,18 +944,18 @@ function usageTitle(s: SnippetListItem): string {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.6rem;
|
gap: 0.6rem;
|
||||||
padding: 0.5rem 0.7rem;
|
padding: 0.5rem 0.7rem;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.merge-choice.chosen {
|
.merge-choice.chosen {
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary);
|
||||||
background: color-mix(in srgb, var(--fs-accent) 8%, transparent);
|
background: color-mix(in srgb, var(--color-primary) 8%, transparent);
|
||||||
}
|
}
|
||||||
.merge-choice-name {
|
.merge-choice-name {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
font-family: var(--fs-font-mono);
|
font-family: var(--font-mono, ui-monospace, "JetBrains Mono", monospace);
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
}
|
}
|
||||||
@@ -963,7 +963,7 @@ function usageTitle(s: SnippetListItem): string {
|
|||||||
font-size: 0.68rem;
|
font-size: 0.68rem;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.05em;
|
letter-spacing: 0.05em;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
.modal-actions {
|
.modal-actions {
|
||||||
@@ -973,24 +973,24 @@ function usageTitle(s: SnippetListItem): string {
|
|||||||
}
|
}
|
||||||
.modal-btn {
|
.modal-btn {
|
||||||
padding: 0.4rem 0.9rem;
|
padding: 0.4rem 0.9rem;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
}
|
}
|
||||||
.modal-btn:hover {
|
.modal-btn:hover {
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-bg);
|
||||||
}
|
}
|
||||||
.modal-btn-primary {
|
.modal-btn-primary {
|
||||||
background: var(--fs-action-primary);
|
background: var(--color-action-primary);
|
||||||
border-color: var(--fs-action-primary);
|
border-color: var(--color-action-primary);
|
||||||
color: var(--fs-text-on-action);
|
color: var(--fs-text-on-action);
|
||||||
}
|
}
|
||||||
.modal-btn-primary:hover:not(:disabled) {
|
.modal-btn-primary:hover:not(:disabled) {
|
||||||
background: var(--fs-action-primary-hover);
|
background: var(--color-action-primary-hover);
|
||||||
}
|
}
|
||||||
.modal-btn-primary:disabled {
|
.modal-btn-primary:disabled {
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ const toast = useToastStore();
|
|||||||
const title = ref("");
|
const title = ref("");
|
||||||
const body = ref("");
|
const body = ref("");
|
||||||
const description = ref("");
|
const description = ref("");
|
||||||
|
const consolidatedAt = ref<string | null>(null);
|
||||||
const tags = ref<string[]>([]);
|
const tags = ref<string[]>([]);
|
||||||
const status = ref<TaskStatus>("todo");
|
const status = ref<TaskStatus>("todo");
|
||||||
const priority = ref<TaskPriority>("none");
|
const priority = ref<TaskPriority>("none");
|
||||||
@@ -302,6 +303,7 @@ onMounted(async () => {
|
|||||||
title.value = store.currentTask.title;
|
title.value = store.currentTask.title;
|
||||||
body.value = store.currentTask.body;
|
body.value = store.currentTask.body;
|
||||||
description.value = store.currentTask.description ?? "";
|
description.value = store.currentTask.description ?? "";
|
||||||
|
consolidatedAt.value = store.currentTask.consolidated_at ?? null;
|
||||||
tags.value = [...(store.currentTask.tags || [])];
|
tags.value = [...(store.currentTask.tags || [])];
|
||||||
status.value = store.currentTask.status as TaskStatus;
|
status.value = store.currentTask.status as TaskStatus;
|
||||||
priority.value = store.currentTask.priority as TaskPriority;
|
priority.value = store.currentTask.priority as TaskPriority;
|
||||||
@@ -830,7 +832,7 @@ useEditorGuards(dirty, save);
|
|||||||
gap: 0.75rem;
|
gap: 0.75rem;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
padding-bottom: 0.5rem;
|
padding-bottom: 0.5rem;
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* .task-main is a flex column; without flex-shrink: 0, long body content
|
/* .task-main is a flex column; without flex-shrink: 0, long body content
|
||||||
@@ -852,7 +854,7 @@ useEditorGuards(dirty, save);
|
|||||||
.task-sidebar {
|
.task-sidebar {
|
||||||
width: 280px;
|
width: 280px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
border-left: 1px solid var(--fs-border-color);
|
border-left: 1px solid var(--color-border);
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -866,21 +868,21 @@ useEditorGuards(dirty, save);
|
|||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
font-size: 1.1rem;
|
font-size: 1.1rem;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
padding: 0 0.2rem;
|
padding: 0 0.2rem;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
.btn-clear-parent:hover { color: var(--fs-error); }
|
.btn-clear-parent:hover { color: var(--color-danger, #e74c3c); }
|
||||||
.parent-dropdown {
|
.parent-dropdown {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: calc(100% + 4px);
|
top: calc(100% + 4px);
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
box-shadow: 0 4px 12px var(--color-shadow);
|
box-shadow: 0 4px 12px var(--color-shadow);
|
||||||
z-index: 50;
|
z-index: 50;
|
||||||
max-height: 200px;
|
max-height: 200px;
|
||||||
@@ -890,21 +892,21 @@ useEditorGuards(dirty, save);
|
|||||||
padding: 0.4rem 0.65rem;
|
padding: 0.4rem 0.65rem;
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.parent-dropdown-item:hover { background: var(--fs-surface-raised); }
|
.parent-dropdown-item:hover { background: var(--color-bg-secondary); }
|
||||||
.parent-empty { color: var(--fs-text-tertiary); cursor: default; }
|
.parent-empty { color: var(--color-text-muted); cursor: default; }
|
||||||
.parent-empty:hover { background: none; }
|
.parent-empty:hover { background: none; }
|
||||||
|
|
||||||
/* Sub-tasks */
|
/* Sub-tasks */
|
||||||
.subtasks-section {
|
.subtasks-section {
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
padding: 0.5rem 0.65rem;
|
padding: 0.5rem 0.65rem;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
}
|
}
|
||||||
.subtasks-header {
|
.subtasks-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -915,23 +917,23 @@ useEditorGuards(dirty, save);
|
|||||||
.subtasks-label {
|
.subtasks-label {
|
||||||
font-size: 0.75rem;
|
font-size: 0.75rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.04em;
|
letter-spacing: 0.04em;
|
||||||
}
|
}
|
||||||
.subtask-checkbox { flex-shrink: 0; cursor: pointer; }
|
.subtask-checkbox { flex-shrink: 0; cursor: pointer; }
|
||||||
.subtask-title {
|
.subtask-title {
|
||||||
font-size: 0.83rem;
|
font-size: 0.83rem;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.subtask-title:hover { color: var(--fs-accent); }
|
.subtask-title:hover { color: var(--color-primary); }
|
||||||
.subtask-title.done { text-decoration: line-through; color: var(--fs-text-tertiary); }
|
.subtask-title.done { text-decoration: line-through; color: var(--color-text-muted); }
|
||||||
.subtasks-empty { font-size: 0.78rem; color: var(--fs-text-tertiary); margin: 0; }
|
.subtasks-empty { font-size: 0.78rem; color: var(--color-text-muted); margin: 0; }
|
||||||
.subtask-add-row {
|
.subtask-add-row {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -941,19 +943,19 @@ useEditorGuards(dirty, save);
|
|||||||
.subtask-input {
|
.subtask-input {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
padding: 0.25rem 0.4rem;
|
padding: 0.25rem 0.4rem;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-bg);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
font-size: 0.83rem;
|
font-size: 0.83rem;
|
||||||
font-family: inherit;
|
font-family: inherit;
|
||||||
}
|
}
|
||||||
.subtask-input:focus { outline: none; border-color: var(--fs-accent); }
|
.subtask-input:focus { outline: none; border-color: var(--color-primary); }
|
||||||
.stream-preview {
|
.stream-preview {
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-input-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
padding: 0.75rem;
|
padding: 0.75rem;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
min-height: 200px;
|
min-height: 200px;
|
||||||
}
|
}
|
||||||
.main-diff {
|
.main-diff {
|
||||||
@@ -963,9 +965,9 @@ useEditorGuards(dirty, save);
|
|||||||
|
|
||||||
/* Systems multi-select (in sidebar) */
|
/* Systems multi-select (in sidebar) */
|
||||||
.sb-systems { display: flex; flex-direction: column; gap: 0.25rem; max-height: 160px; overflow-y: auto; }
|
.sb-systems { display: flex; flex-direction: column; gap: 0.25rem; max-height: 160px; overflow-y: auto; }
|
||||||
.sb-system-opt { display: flex; align-items: center; gap: 0.45rem; font-size: 0.85rem; color: var(--fs-text-primary); cursor: pointer; }
|
.sb-system-opt { display: flex; align-items: center; gap: 0.45rem; font-size: 0.85rem; color: var(--color-text); cursor: pointer; }
|
||||||
.sb-system-opt input { accent-color: var(--fs-accent); cursor: pointer; }
|
.sb-system-opt input { accent-color: var(--color-primary); cursor: pointer; }
|
||||||
.sb-systems-empty { margin: 0; font-size: 0.8rem; color: var(--fs-text-tertiary); }
|
.sb-systems-empty { margin: 0; font-size: 0.8rem; color: var(--color-text-muted); }
|
||||||
|
|
||||||
/* Writing Assistant section (in sidebar) */
|
/* Writing Assistant section (in sidebar) */
|
||||||
.assist-section {
|
.assist-section {
|
||||||
@@ -976,7 +978,7 @@ useEditorGuards(dirty, save);
|
|||||||
.assist-section-title {
|
.assist-section-title {
|
||||||
font-size: 0.78rem;
|
font-size: 0.78rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.05em;
|
letter-spacing: 0.05em;
|
||||||
}
|
}
|
||||||
@@ -1007,11 +1009,11 @@ useEditorGuards(dirty, save);
|
|||||||
font-size: 0.75rem;
|
font-size: 0.75rem;
|
||||||
}
|
}
|
||||||
.sb-ts-label {
|
.sb-ts-label {
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
.sb-ts-value {
|
.sb-ts-value {
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1022,7 +1024,7 @@ useEditorGuards(dirty, save);
|
|||||||
.task-sidebar {
|
.task-sidebar {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-left: none;
|
border-left: none;
|
||||||
border-top: 1px solid var(--fs-border-color);
|
border-top: 1px solid var(--color-border);
|
||||||
overflow-y: visible;
|
overflow-y: visible;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1035,13 +1037,13 @@ useEditorGuards(dirty, save);
|
|||||||
margin: 0.5rem 0 0.25rem;
|
margin: 0.5rem 0 0.25rem;
|
||||||
}
|
}
|
||||||
.task-goal-label {
|
.task-goal-label {
|
||||||
font-family: var(--fs-font-display);
|
font-family: var(--font-display, "Fraunces", serif);
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
font-size: 0.78rem;
|
font-size: 0.78rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
letter-spacing: 0.04em;
|
letter-spacing: 0.04em;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted, rgba(255, 255, 255, 0.5));
|
||||||
}
|
}
|
||||||
.task-goal-input {
|
.task-goal-input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -1051,14 +1053,32 @@ useEditorGuards(dirty, save);
|
|||||||
font: inherit;
|
font: inherit;
|
||||||
font-size: 0.95rem;
|
font-size: 0.95rem;
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text, inherit);
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-input-bg, rgba(255, 255, 255, 0.03));
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border, rgba(255, 255, 255, 0.08));
|
||||||
border-radius: var(--fs-radius-lg);
|
border-radius: var(--radius-md, 8px);
|
||||||
}
|
}
|
||||||
.task-goal-input:focus {
|
.task-goal-input:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary, #6366f1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ── Auto-summary banner + re-consolidate button ─────────────────────────── */
|
||||||
|
.auto-summary-banner-editor {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.6rem;
|
||||||
|
padding: 0.45rem 0.7rem;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
font-size: 0.82rem;
|
||||||
|
font-style: italic;
|
||||||
|
color: var(--color-text-muted, rgba(255, 255, 255, 0.6));
|
||||||
|
background: rgba(99, 102, 241, 0.06);
|
||||||
|
border-left: 2px solid var(--color-primary, #6366f1);
|
||||||
|
border-radius: var(--radius-sm, 4px);
|
||||||
|
}
|
||||||
|
.auto-summary-banner-editor .auto-summary-icon {
|
||||||
|
color: var(--color-primary, #6366f1);
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -365,6 +365,13 @@ const subTaskProgress = computed(() => {
|
|||||||
<p class="goal-text">{{ store.currentTask.description }}</p>
|
<p class="goal-text">{{ store.currentTask.description }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
v-if="store.currentTask.consolidated_at"
|
||||||
|
class="auto-summary-banner"
|
||||||
|
>
|
||||||
|
<span class="auto-summary-icon" aria-hidden="true">✦</span>
|
||||||
|
Auto-summarized from work logs.
|
||||||
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="body prose"
|
class="body prose"
|
||||||
@@ -475,7 +482,7 @@ const subTaskProgress = computed(() => {
|
|||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
font-size: 0.83rem;
|
font-size: 0.83rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
margin: 0 0 0.75rem;
|
margin: 0 0 0.75rem;
|
||||||
}
|
}
|
||||||
.meta-item {
|
.meta-item {
|
||||||
@@ -494,10 +501,10 @@ const subTaskProgress = computed(() => {
|
|||||||
}
|
}
|
||||||
.due-date {
|
.due-date {
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
}
|
}
|
||||||
.due-date.overdue {
|
.due-date.overdue {
|
||||||
color: var(--fs-overdue);
|
color: var(--color-overdue);
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
.task-meta-row {
|
.task-meta-row {
|
||||||
@@ -508,10 +515,10 @@ const subTaskProgress = computed(() => {
|
|||||||
}
|
}
|
||||||
.task-meta-item {
|
.task-meta-item {
|
||||||
font-size: 0.78rem;
|
font-size: 0.78rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
.task-meta-recurrence {
|
.task-meta-recurrence {
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
.tags {
|
.tags {
|
||||||
@@ -524,7 +531,7 @@ const subTaskProgress = computed(() => {
|
|||||||
/* Sub-tasks */
|
/* Sub-tasks */
|
||||||
.subtasks {
|
.subtasks {
|
||||||
margin-top: 2rem;
|
margin-top: 2rem;
|
||||||
border-top: 1px solid var(--fs-border-color);
|
border-top: 1px solid var(--color-border);
|
||||||
padding-top: 1rem;
|
padding-top: 1rem;
|
||||||
}
|
}
|
||||||
.subtasks-header {
|
.subtasks-header {
|
||||||
@@ -540,21 +547,21 @@ const subTaskProgress = computed(() => {
|
|||||||
}
|
}
|
||||||
.subtasks-progress {
|
.subtasks-progress {
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
.subtasks-pct {
|
.subtasks-pct {
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
.subtasks-track {
|
.subtasks-track {
|
||||||
height: 4px;
|
height: 4px;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
margin-bottom: 0.75rem;
|
margin-bottom: 0.75rem;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
.subtasks-fill {
|
.subtasks-fill {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: var(--fs-status-done);
|
background: var(--color-status-done, #22c55e);
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
transition: width 0.3s ease;
|
transition: width 0.3s ease;
|
||||||
}
|
}
|
||||||
@@ -571,10 +578,10 @@ const subTaskProgress = computed(() => {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
padding: 0.3rem 0.5rem;
|
padding: 0.3rem 0.5rem;
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
}
|
}
|
||||||
.subtask-row:hover {
|
.subtask-row:hover {
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
}
|
}
|
||||||
.sub-dot {
|
.sub-dot {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
@@ -592,21 +599,21 @@ const subTaskProgress = computed(() => {
|
|||||||
}
|
}
|
||||||
.dot-todo {
|
.dot-todo {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border: 2px solid var(--fs-text-tertiary);
|
border: 2px solid var(--color-text-muted);
|
||||||
}
|
}
|
||||||
.dot-in-progress {
|
.dot-in-progress {
|
||||||
background: var(--fs-status-in-progress);
|
background: var(--color-status-in-progress, #3b82f6);
|
||||||
}
|
}
|
||||||
.dot-done {
|
.dot-done {
|
||||||
background: var(--fs-status-done);
|
background: var(--color-status-done, #22c55e);
|
||||||
}
|
}
|
||||||
.dot-cancelled {
|
.dot-cancelled {
|
||||||
background: var(--fs-text-tertiary);
|
background: var(--color-text-muted, #6b7280);
|
||||||
}
|
}
|
||||||
.sub-title {
|
.sub-title {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@@ -614,21 +621,21 @@ const subTaskProgress = computed(() => {
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.sub-title:hover {
|
.sub-title:hover {
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
}
|
}
|
||||||
.sub-title.sub-done {
|
.sub-title.sub-done {
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
text-decoration: line-through;
|
text-decoration: line-through;
|
||||||
}
|
}
|
||||||
.sub-due {
|
.sub-due {
|
||||||
font-size: 0.75rem;
|
font-size: 0.75rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.backlinks {
|
.backlinks {
|
||||||
margin-top: 2.5rem;
|
margin-top: 2.5rem;
|
||||||
border-top: 1px solid var(--fs-border-color);
|
border-top: 1px solid var(--color-border);
|
||||||
padding-top: 1.25rem;
|
padding-top: 1.25rem;
|
||||||
}
|
}
|
||||||
.backlinks-heading {
|
.backlinks-heading {
|
||||||
@@ -639,14 +646,14 @@ const subTaskProgress = computed(() => {
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.06em;
|
letter-spacing: 0.06em;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
margin: 0 0 0.75rem;
|
margin: 0 0 0.75rem;
|
||||||
}
|
}
|
||||||
.backlinks-count {
|
.backlinks-count {
|
||||||
margin-left: 0.2rem;
|
margin-left: 0.2rem;
|
||||||
font-size: 0.72rem;
|
font-size: 0.72rem;
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: 999px;
|
border-radius: 999px;
|
||||||
padding: 0 0.4rem;
|
padding: 0 0.4rem;
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
@@ -661,18 +668,18 @@ const subTaskProgress = computed(() => {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.6rem;
|
gap: 0.6rem;
|
||||||
padding: 0.5rem 0.75rem;
|
padding: 0.5rem 0.75rem;
|
||||||
border-radius: var(--fs-radius-lg);
|
border-radius: var(--radius-md);
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
transition: border-color 0.15s, box-shadow 0.15s;
|
transition: border-color 0.15s, box-shadow 0.15s;
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
}
|
}
|
||||||
.backlink-card:hover {
|
.backlink-card:hover {
|
||||||
border-color: color-mix(in srgb, var(--fs-accent) 50%, transparent);
|
border-color: color-mix(in srgb, var(--color-primary) 50%, transparent);
|
||||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
}
|
}
|
||||||
.backlink-type-badge {
|
.backlink-type-badge {
|
||||||
font-size: 0.68rem;
|
font-size: 0.68rem;
|
||||||
@@ -684,9 +691,9 @@ const subTaskProgress = computed(() => {
|
|||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
.badge-note {
|
.badge-note {
|
||||||
background: color-mix(in srgb, var(--fs-accent) 12%, transparent);
|
background: color-mix(in srgb, var(--color-primary) 12%, transparent);
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
border: 1px solid color-mix(in srgb, var(--fs-accent) 25%, transparent);
|
border: 1px solid color-mix(in srgb, var(--color-primary) 25%, transparent);
|
||||||
}
|
}
|
||||||
.badge-task {
|
.badge-task {
|
||||||
background: color-mix(in srgb, #f59e0b 12%, transparent);
|
background: color-mix(in srgb, #f59e0b 12%, transparent);
|
||||||
@@ -716,12 +723,12 @@ const subTaskProgress = computed(() => {
|
|||||||
.skel-meta,
|
.skel-meta,
|
||||||
.skel-badges,
|
.skel-badges,
|
||||||
.skel-line {
|
.skel-line {
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
background: linear-gradient(
|
background: linear-gradient(
|
||||||
90deg,
|
90deg,
|
||||||
var(--fs-surface-raised) 25%,
|
var(--color-bg-secondary) 25%,
|
||||||
color-mix(in srgb, var(--fs-text-tertiary) 18%, var(--fs-surface-raised)) 50%,
|
color-mix(in srgb, var(--color-text-muted) 18%, var(--color-bg-secondary)) 50%,
|
||||||
var(--fs-surface-raised) 75%
|
var(--color-bg-secondary) 75%
|
||||||
);
|
);
|
||||||
background-size: 200% 100%;
|
background-size: 200% 100%;
|
||||||
animation: skel-shine 1.5s ease infinite;
|
animation: skel-shine 1.5s ease infinite;
|
||||||
@@ -733,7 +740,7 @@ const subTaskProgress = computed(() => {
|
|||||||
}
|
}
|
||||||
.skel-btn { width: 70px; height: 32px; }
|
.skel-btn { width: 70px; height: 32px; }
|
||||||
.skel-btn--wide { width: 90px; }
|
.skel-btn--wide { width: 90px; }
|
||||||
.skel-title { height: 2.2rem; width: 65%; border-radius: var(--fs-radius-lg); }
|
.skel-title { height: 2.2rem; width: 65%; border-radius: var(--radius-md); }
|
||||||
.skel-meta { height: 0.85rem; width: 45%; }
|
.skel-meta { height: 0.85rem; width: 45%; }
|
||||||
.skel-badges { height: 1.6rem; width: 30%; border-radius: 999px; }
|
.skel-badges { height: 1.6rem; width: 30%; border-radius: 999px; }
|
||||||
.skel-line { height: 0.9rem; }
|
.skel-line { height: 0.9rem; }
|
||||||
@@ -742,26 +749,39 @@ const subTaskProgress = computed(() => {
|
|||||||
|
|
||||||
/* ── Goal block + auto-summary banner ─────────────────────────────────────── */
|
/* ── Goal block + auto-summary banner ─────────────────────────────────────── */
|
||||||
.task-goal-display {
|
.task-goal-display {
|
||||||
border-left: 2px solid var(--fs-border-color);
|
border-left: 2px solid var(--color-border, rgba(255, 255, 255, 0.12));
|
||||||
padding: 0.4rem 0 0.4rem 0.9rem;
|
padding: 0.4rem 0 0.4rem 0.9rem;
|
||||||
margin: 0.75rem 0 1.25rem;
|
margin: 0.75rem 0 1.25rem;
|
||||||
background: rgba(255, 255, 255, 0.02);
|
background: rgba(255, 255, 255, 0.02);
|
||||||
}
|
}
|
||||||
.goal-label {
|
.goal-label {
|
||||||
font-family: var(--fs-font-display);
|
font-family: var(--font-display, "Fraunces", serif);
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
font-size: 0.78rem;
|
font-size: 0.78rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
letter-spacing: 0.04em;
|
letter-spacing: 0.04em;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted, rgba(255, 255, 255, 0.5));
|
||||||
margin: 0 0 0.25rem;
|
margin: 0 0 0.25rem;
|
||||||
}
|
}
|
||||||
.goal-text {
|
.goal-text {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 0.95rem;
|
font-size: 0.95rem;
|
||||||
line-height: 1.45;
|
line-height: 1.45;
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text, inherit);
|
||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
}
|
}
|
||||||
|
.auto-summary-banner {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.5rem;
|
||||||
|
font-size: 0.78rem;
|
||||||
|
font-style: italic;
|
||||||
|
color: var(--color-text-muted, rgba(255, 255, 255, 0.55));
|
||||||
|
margin: 0 0 0.75rem;
|
||||||
|
}
|
||||||
|
.auto-summary-icon {
|
||||||
|
color: var(--color-primary, #6366f1);
|
||||||
|
font-size: 0.85rem;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ onMounted(() => store.fetchTrash());
|
|||||||
.batch-count { opacity: 0.6; font-weight: 400; font-size: 0.9em; margin-left: 0.35rem; }
|
.batch-count { opacity: 0.6; font-weight: 400; font-size: 0.9em; margin-left: 0.35rem; }
|
||||||
.batch-meta { font-size: 0.82em; opacity: 0.6; margin-top: 0.25rem; }
|
.batch-meta { font-size: 0.82em; opacity: 0.6; margin-top: 0.25rem; }
|
||||||
.batch-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
|
.batch-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
|
||||||
.batch-actions button { border-radius: 6px; padding: 0.35rem 0.7rem; cursor: pointer; border: 1px solid var(--fs-border-color); background: none; color: inherit; }
|
.batch-actions button { border-radius: 6px; padding: 0.35rem 0.7rem; cursor: pointer; border: 1px solid var(--color-border, #2a2a2e); background: none; color: inherit; }
|
||||||
.btn-restore:hover { border-color: var(--fs-action-primary); color: var(--fs-action-primary); }
|
.btn-restore:hover { border-color: var(--color-action-primary); color: var(--color-action-primary); }
|
||||||
.btn-purge:hover { border-color: var(--fs-action-destructive); color: var(--fs-action-destructive); }
|
.btn-purge:hover { border-color: var(--color-action-destructive); color: var(--color-action-destructive); }
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -297,9 +297,9 @@ function formatDate(iso: string): string {
|
|||||||
margin: 0 0 1.5rem;
|
margin: 0 0 1.5rem;
|
||||||
}
|
}
|
||||||
.settings-section {
|
.settings-section {
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-card);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-lg);
|
border-radius: var(--radius-md);
|
||||||
padding: 1.25rem;
|
padding: 1.25rem;
|
||||||
margin-bottom: 1.5rem;
|
margin-bottom: 1.5rem;
|
||||||
}
|
}
|
||||||
@@ -317,16 +317,16 @@ function formatDate(iso: string): string {
|
|||||||
.invite-input {
|
.invite-input {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
padding: 0.5rem 0.75rem;
|
padding: 0.5rem 0.75rem;
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
font-size: 0.95rem;
|
font-size: 0.95rem;
|
||||||
background: var(--fs-surface-page);
|
background: var(--color-bg);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
.invite-input:focus {
|
.invite-input:focus {
|
||||||
outline: none;
|
outline: none;
|
||||||
border-color: var(--fs-accent);
|
border-color: var(--color-primary);
|
||||||
}
|
}
|
||||||
.invite-list {
|
.invite-list {
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
@@ -334,7 +334,7 @@ function formatDate(iso: string): string {
|
|||||||
.invite-list h3 {
|
.invite-list h3 {
|
||||||
margin: 0 0 0.5rem;
|
margin: 0 0 0.5rem;
|
||||||
font-size: 0.95rem;
|
font-size: 0.95rem;
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Registration toggle */
|
/* Registration toggle */
|
||||||
@@ -352,33 +352,33 @@ function formatDate(iso: string): string {
|
|||||||
font-size: 0.95rem;
|
font-size: 0.95rem;
|
||||||
}
|
}
|
||||||
.text-success {
|
.text-success {
|
||||||
color: var(--fs-success);
|
color: var(--color-success);
|
||||||
}
|
}
|
||||||
.text-muted {
|
.text-muted {
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
.field-hint {
|
.field-hint {
|
||||||
margin: 0.35rem 0 0;
|
margin: 0.35rem 0 0;
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
/* The one genuine override: 'close registration' must NOT read as the
|
/* The one genuine override: 'close registration' must NOT read as the
|
||||||
primary action it sits on. Scoped, so it beats the shared variant. */
|
primary action it sits on. Scoped, so it beats the shared variant. */
|
||||||
.btn-toggle-close {
|
.btn-toggle-close {
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
color: var(--fs-text-primary);
|
color: var(--color-text);
|
||||||
border: 1px solid var(--fs-border-color);
|
border: 1px solid var(--color-border);
|
||||||
}
|
}
|
||||||
.btn-toggle-close:hover:not(:disabled) {
|
.btn-toggle-close:hover:not(:disabled) {
|
||||||
border-color: var(--fs-warning);
|
border-color: var(--color-warning);
|
||||||
color: var(--fs-warning);
|
color: var(--color-warning);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Users table */
|
/* Users table */
|
||||||
.loading-msg,
|
.loading-msg,
|
||||||
.empty-msg {
|
.empty-msg {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
padding: 1rem 0;
|
padding: 1rem 0;
|
||||||
}
|
}
|
||||||
@@ -392,13 +392,13 @@ function formatDate(iso: string): string {
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.05em;
|
letter-spacing: 0.05em;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
padding: 0.5rem 0.75rem;
|
padding: 0.5rem 0.75rem;
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border);
|
||||||
}
|
}
|
||||||
.users-table td {
|
.users-table td {
|
||||||
padding: 0.65rem 0.75rem;
|
padding: 0.65rem 0.75rem;
|
||||||
border-bottom: 1px solid var(--fs-border-color);
|
border-bottom: 1px solid var(--color-border);
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
}
|
}
|
||||||
.users-table tbody tr:last-child td {
|
.users-table tbody tr:last-child td {
|
||||||
@@ -408,10 +408,10 @@ function formatDate(iso: string): string {
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
.cell-email {
|
.cell-email {
|
||||||
color: var(--fs-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
}
|
}
|
||||||
.cell-date {
|
.cell-date {
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
}
|
}
|
||||||
.cell-actions {
|
.cell-actions {
|
||||||
@@ -426,21 +426,21 @@ function formatDate(iso: string): string {
|
|||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.05em;
|
letter-spacing: 0.05em;
|
||||||
padding: 0.15rem 0.4rem;
|
padding: 0.15rem 0.4rem;
|
||||||
border-radius: var(--fs-radius-sm);
|
border-radius: var(--radius-sm);
|
||||||
}
|
}
|
||||||
.role-admin {
|
.role-admin {
|
||||||
color: var(--fs-accent);
|
color: var(--color-primary);
|
||||||
background: color-mix(in srgb, var(--fs-accent) 15%, transparent);
|
background: color-mix(in srgb, var(--color-primary) 15%, transparent);
|
||||||
}
|
}
|
||||||
.role-user {
|
.role-user {
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
background: var(--fs-surface-raised);
|
background: var(--color-bg-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Action buttons */
|
/* Action buttons */
|
||||||
.you-label {
|
.you-label {
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
color: var(--fs-text-tertiary);
|
color: var(--color-text-muted);
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "scribe",
|
"name": "scribe",
|
||||||
"description": "Scribe system-of-record for Claude Code: MCP tools over your notes/tasks/projects/rules, a session-start push channel that surfaces your always-on rules + active-project context, process-skills (writing-plans, systematic-debugging, verification, brainstorming, reusing-code), and your saved Scribe Processes auto-surfaced as skills (/scribe:sync). Replaces superpowers + file-memory with one app-backed plugin.",
|
"description": "Scribe system-of-record for Claude Code: MCP tools over your notes/tasks/projects/rules, a session-start push channel that surfaces your always-on rules + active-project context, process-skills (writing-plans, systematic-debugging, verification, brainstorming, reusing-code), and your saved Scribe Processes auto-surfaced as skills (/scribe:sync). Replaces superpowers + file-memory with one app-backed plugin.",
|
||||||
"version": "0.1.33",
|
"version": "0.1.22",
|
||||||
"author": { "name": "Bryan Van Deusen" },
|
"author": { "name": "Bryan Van Deusen" },
|
||||||
"mcpServers": {
|
"mcpServers": {
|
||||||
"scribe": {
|
"scribe": {
|
||||||
|
|||||||
@@ -50,9 +50,6 @@ On install you'll be asked for:
|
|||||||
(`hooks/scribe_prior_art.sh`) → `GET /api/plugin/prior-art`. Returns
|
(`hooks/scribe_prior_art.sh`) → `GET /api/plugin/prior-art`. Returns
|
||||||
`additionalContext` with **no** permission decision, so it can inform the write
|
`additionalContext` with **no** permission decision, so it can inform the write
|
||||||
but never stop it; silent when nothing is recorded, which is most of the time.
|
but never stop it; silent when nothing is recorded, which is most of the time.
|
||||||
Two framings: a REUSE menu (similar/nearby records), and a SYNC nudge when a
|
|
||||||
snippet records the exact file being edited — "updating the record is part of
|
|
||||||
the edit" — each with its own once-per-session dedup.
|
|
||||||
Toggle in **Settings → Knowledge auto-inject**.
|
Toggle in **Settings → Knowledge auto-inject**.
|
||||||
- `skills/` → the universal process-skills, surfaced by description match.
|
- `skills/` → the universal process-skills, surfaced by description match.
|
||||||
- `hooks/scribe_sync_processes.sh` (a 2nd SessionStart hook) + the `/scribe:sync`
|
- `hooks/scribe_sync_processes.sh` (a 2nd SessionStart hook) + the `/scribe:sync`
|
||||||
|
|||||||
@@ -8,12 +8,6 @@
|
|||||||
# that path or in its directory, plus snippets resembling the code about to be
|
# that path or in its directory, plus snippets resembling the code about to be
|
||||||
# written. Titles + ids only, never bodies.
|
# written. Titles + ids only, never bodies.
|
||||||
#
|
#
|
||||||
# The answer comes in two framings (#2708). A snippet recorded AT the exact
|
|
||||||
# file being edited is the SYNC class — "you are editing the recorded file;
|
|
||||||
# updating the record is part of the edit" — which is how records stay current
|
|
||||||
# on an instance with no forge connection (decision #2707). Everything else is
|
|
||||||
# the REUSE menu. The two dedup separately (see the state files below).
|
|
||||||
#
|
|
||||||
# NEVER BLOCKS. It returns `additionalContext` with no `permissionDecision`, so
|
# NEVER BLOCKS. It returns `additionalContext` with no `permissionDecision`, so
|
||||||
# the write proceeds untouched and Claude sees the note beside the tool result.
|
# the write proceeds untouched and Claude sees the note beside the tool result.
|
||||||
# Any failure — unconfigured, unreachable, malformed — exits 0 in silence. A
|
# Any failure — unconfigured, unreachable, malformed — exits 0 in silence. A
|
||||||
@@ -85,60 +79,34 @@ fi
|
|||||||
# Definition-shaped patterns only. Grepping for bare occurrences would match
|
# Definition-shaped patterns only. Grepping for bare occurrences would match
|
||||||
# every CALL site and drown the real finding — and a hint that is mostly noise
|
# every CALL site and drown the real finding — and a hint that is mostly noise
|
||||||
# is one people learn to skip, which is worse than none.
|
# is one people learn to skip, which is worse than none.
|
||||||
#
|
|
||||||
# ALL code, not a language shortlist (#2682): the detector was born covering
|
|
||||||
# only the languages of the repo it was written in, which silently amputated
|
|
||||||
# this whole arm — and the record nudge gated on it — for every Go/Kotlin/Rust
|
|
||||||
# project. Definitions are announced by a small keyword family across
|
|
||||||
# languages (func/fun/fn/function/def/sub · class/struct/trait/interface/
|
|
||||||
# enum/object/protocol/type), so one modifier-strip + keyword match covers
|
|
||||||
# them all. Known out of scope: keyword-less declaration syntax (C/Java/Dart
|
|
||||||
# `ReturnType name(...)`) needs a real parser, and `impl` blocks are excluded
|
|
||||||
# because several per type is normal Rust, not duplication.
|
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
local_lines=""
|
local_lines=""
|
||||||
if [ -n "$repo_root" ] && [ -n "$code" ]; then
|
if [ -n "$repo_root" ] && [ -n "$code" ]; then
|
||||||
# kind<TAB>name for each thing this payload DEFINES.
|
# kind<TAB>name for each thing this payload DEFINES.
|
||||||
names=$(printf '%s' "$code" | awk '
|
names=$(printf '%s' "$code" | awk '
|
||||||
{
|
match($0, /^[[:space:]]*\.[A-Za-z][A-Za-z0-9_-]*[[:space:]]*[,{]/) {
|
||||||
# CSS class definition: .name { or .name,
|
t = $0; sub(/^[[:space:]]*\./, "", t); sub(/[[:space:]]*[,{].*$/, "", t);
|
||||||
if (match($0, /^[[:space:]]*\.[A-Za-z][A-Za-z0-9_-]*[[:space:]]*[,{]/)) {
|
if (t != "") print "css\t" t; next }
|
||||||
t = $0; sub(/^[[:space:]]*\./, "", t); sub(/[[:space:]]*[,{].*$/, "", t)
|
match($0, /^[[:space:]]*(export[[:space:]]+)?(default[[:space:]]+)?(async[[:space:]]+)?function[[:space:]]+[A-Za-z_$][A-Za-z0-9_$]*/) {
|
||||||
if (t != "") print "css\t" t; next
|
t = $0; sub(/^.*function[[:space:]]+/, "", t); sub(/[^A-Za-z0-9_$].*$/, "", t);
|
||||||
}
|
if (t != "") print "sym\t" t; next }
|
||||||
line = $0; sub(/^[[:space:]]+/, "", line)
|
match($0, /^[[:space:]]*(export[[:space:]]+)?class[[:space:]]+[A-Za-z_$][A-Za-z0-9_$]*/) {
|
||||||
# Strip leading declaration modifiers so the definition keyword is the
|
t = $0; sub(/^.*class[[:space:]]+/, "", t); sub(/[^A-Za-z0-9_$].*$/, "", t);
|
||||||
# first word regardless of language (export/pub/private/suspend/...).
|
if (t != "") print "sym\t" t; next }
|
||||||
sub(/^((pub(\([a-z]+\))?|export|default|private|internal|protected|public|static|suspend|async|open|sealed|data|abstract|final|inline|unsafe|extern|override)[[:space:]]+)*/, "", line)
|
match($0, /^[[:space:]]*(async[[:space:]]+)?def[[:space:]]+[A-Za-z_][A-Za-z0-9_]*/) {
|
||||||
# Go method with receiver: func (r *T) Name(
|
t = $0; sub(/^.*def[[:space:]]+/, "", t); sub(/[^A-Za-z0-9_].*$/, "", t);
|
||||||
if (match(line, /^func[[:space:]]*\([^)]*\)[[:space:]]*[A-Za-z_]/)) {
|
if (t != "") print "sym\t" t; next }
|
||||||
t = line; sub(/^func[[:space:]]*\([^)]*\)[[:space:]]*/, "", t)
|
match($0, /^[[:space:]]*(export[[:space:]]+)?(const|let)[[:space:]]+[A-Za-z_$][A-Za-z0-9_$]*[[:space:]]*=[[:space:]]*(async[[:space:]]*)?[(<]/) {
|
||||||
sub(/[^A-Za-z0-9_].*$/, "", t)
|
t = $0; sub(/^[[:space:]]*(export[[:space:]]+)?(const|let)[[:space:]]+/, "", t);
|
||||||
if (t != "") print "sym\t" t; next
|
sub(/[^A-Za-z0-9_$].*$/, "", t);
|
||||||
}
|
if (t != "") print "sym\t" t; next }
|
||||||
# Keyword-announced definitions, functions and named types alike.
|
|
||||||
# Dunders are skipped: every class defines __init__, so "already defined
|
|
||||||
# in N other files" is guaranteed noise for them — and noise is what
|
|
||||||
# teaches sessions to skip the hint.
|
|
||||||
if (match(line, /^(function|def|class|func|fun|fn|sub|struct|trait|interface|enum|object|protocol|type)[[:space:]]+[A-Za-z_$]/)) {
|
|
||||||
t = line; sub(/^[a-z]+[[:space:]]+/, "", t)
|
|
||||||
sub(/[^A-Za-z0-9_$].*$/, "", t)
|
|
||||||
if (t != "" && t !~ /^__.*__$/) print "sym\t" t; next
|
|
||||||
}
|
|
||||||
# Arrow/expression assignment: const name = (…) / let name = async (
|
|
||||||
if (match(line, /^(const|let)[[:space:]]+[A-Za-z_$][A-Za-z0-9_$]*[[:space:]]*=[[:space:]]*(async[[:space:]]*)?[(<]/)) {
|
|
||||||
t = line; sub(/^(const|let)[[:space:]]+/, "", t)
|
|
||||||
sub(/[^A-Za-z0-9_$].*$/, "", t)
|
|
||||||
if (t != "") print "sym\t" t; next
|
|
||||||
}
|
|
||||||
}
|
|
||||||
' 2>/dev/null | sort -u | head -12) || names=""
|
' 2>/dev/null | sort -u | head -12) || names=""
|
||||||
|
|
||||||
while IFS=$'\t' read -r kind name; do
|
while IFS=$'\t' read -r kind name; do
|
||||||
[ -n "${name:-}" ] || continue
|
[ -n "${name:-}" ] || continue
|
||||||
case "$kind" in
|
case "$kind" in
|
||||||
css) pat="^[[:space:]]*\.${name}[[:space:]]*[,{]" ;;
|
css) pat="^[[:space:]]*\.${name}[[:space:]]*[,{]" ;;
|
||||||
*) pat="(function|def|class|func|fun|fn|sub|struct|trait|interface|enum|object|protocol|type)[[:space:]]+${name}[^A-Za-z0-9_]|func[[:space:]]*\([^)]*\)[[:space:]]*${name}[[:space:]]*\(|(const|let)[[:space:]]+${name}[[:space:]]*=" ;;
|
*) pat="(function|class|def)[[:space:]]+${name}[^A-Za-z0-9_]|(const|let)[[:space:]]+${name}[[:space:]]*=" ;;
|
||||||
esac
|
esac
|
||||||
# -I skips binaries; :(exclude) drops the file being written, which would
|
# -I skips binaries; :(exclude) drops the file being written, which would
|
||||||
# otherwise always match itself on an Edit.
|
# otherwise always match itself on an Edit.
|
||||||
@@ -200,66 +168,31 @@ fi
|
|||||||
# surface shows a given snippet at most once per session, but they don't silence
|
# surface shows a given snippet at most once per session, but they don't silence
|
||||||
# each other: a title that flew past in a prompt menu twenty turns ago is
|
# each other: a title that flew past in a prompt menu twenty turns ago is
|
||||||
# exactly what should reappear at the moment the duplicate is being written.
|
# exactly what should reappear at the moment the duplicate is being written.
|
||||||
#
|
|
||||||
# TWO channels, not one (#2708). The server answers in two classes — REUSE
|
|
||||||
# ("something similar/nearby is recorded") and SYNC ("a snippet records the
|
|
||||||
# exact file being edited — updating the record is part of the edit"). They
|
|
||||||
# dedup separately: a reuse hint shown early in the session must not suppress
|
|
||||||
# the sync nudge when the recorded file itself is edited later.
|
|
||||||
state_dir="${TMPDIR:-/tmp}/scribe-priorart"
|
state_dir="${TMPDIR:-/tmp}/scribe-priorart"
|
||||||
mkdir -p "$state_dir" 2>/dev/null || true
|
mkdir -p "$state_dir" 2>/dev/null || true
|
||||||
idfile=""
|
idfile=""
|
||||||
syncfile=""
|
|
||||||
exclude_q=""
|
exclude_q=""
|
||||||
sync_exclude_q=""
|
|
||||||
if [ -n "$session_id" ]; then
|
if [ -n "$session_id" ]; then
|
||||||
safe_sid=$(printf '%s' "$session_id" | tr -c 'A-Za-z0-9._-' '_')
|
safe_sid=$(printf '%s' "$session_id" | tr -c 'A-Za-z0-9._-' '_')
|
||||||
idfile="$state_dir/${safe_sid}.ids"
|
idfile="$state_dir/${safe_sid}.ids"
|
||||||
syncfile="$state_dir/${safe_sid}.sync.ids"
|
|
||||||
if [ -f "$idfile" ]; then
|
if [ -f "$idfile" ]; then
|
||||||
seen=$(tr '\n' ',' < "$idfile" 2>/dev/null | sed 's/,$//')
|
seen=$(tr '\n' ',' < "$idfile" 2>/dev/null | sed 's/,$//')
|
||||||
[ -n "$seen" ] && exclude_q="&exclude_ids=${seen}"
|
[ -n "$seen" ] && exclude_q="&exclude_ids=${seen}"
|
||||||
fi
|
fi
|
||||||
if [ -f "$syncfile" ]; then
|
|
||||||
sync_seen=$(tr '\n' ',' < "$syncfile" 2>/dev/null | sed 's/,$//')
|
|
||||||
[ -n "$sync_seen" ] && sync_exclude_q="&exclude_sync_ids=${sync_seen}"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# `|| true`, not `|| exit 0`: an unreachable instance must not discard a local
|
# `|| true`, not `|| exit 0`: an unreachable instance must not discard a local
|
||||||
# finding that needed no instance to produce.
|
# finding that needed no instance to produce.
|
||||||
body=$(curl -fsS --max-time 5 \
|
body=$(curl -fsS --max-time 5 \
|
||||||
-H "Authorization: Bearer ${token}" \
|
-H "Authorization: Bearer ${token}" \
|
||||||
"${url%/}/api/plugin/prior-art?path=${path_enc}&code=${code_enc}${repo_q}${exclude_q}${sync_exclude_q}" 2>/dev/null) || body=""
|
"${url%/}/api/plugin/prior-art?path=${path_enc}&code=${code_enc}${repo_q}${exclude_q}" 2>/dev/null) || body=""
|
||||||
|
|
||||||
context=""
|
context=""
|
||||||
if [ -n "$body" ]; then
|
if [ -n "$body" ]; then
|
||||||
context=$(printf '%s' "$body" | jq -r '.context // empty' 2>/dev/null) || context=""
|
context=$(printf '%s' "$body" | jq -r '.context // empty' 2>/dev/null) || context=""
|
||||||
# Remember what was surfaced so it isn't shown again this session — each
|
# Remember what was surfaced so it isn't shown again this session.
|
||||||
# class into its own channel: sync ids (snippets recording the edited file)
|
if [ -n "$idfile" ] && [ -n "$context" ]; then
|
||||||
# to the sync file, everything else to the reuse file.
|
printf '%s' "$body" | jq -r '.note_ids[]? // empty' 2>/dev/null >> "$idfile" || true
|
||||||
if [ -n "$context" ]; then
|
|
||||||
if [ -n "$idfile" ]; then
|
|
||||||
printf '%s' "$body" | jq -r '((.note_ids // []) - (.sync_note_ids // []))[]?' 2>/dev/null >> "$idfile" || true
|
|
||||||
fi
|
|
||||||
if [ -n "$syncfile" ]; then
|
|
||||||
printf '%s' "$body" | jq -r '(.sync_note_ids // [])[]?' 2>/dev/null >> "$syncfile" || true
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# ARM 1½ — the RECORD nudge (#2664). The local arm just proved the thing being
|
|
||||||
# written already exists elsewhere in this repo, and Scribe returned no record
|
|
||||||
# of anything for it. That is the one moment "record it" is earned rather than
|
|
||||||
# noise: the duplication is demonstrated, not guessed. Gated on BOTH sides so
|
|
||||||
# an ordinary new helper (no other copies) and an already-recorded one (the
|
|
||||||
# server spoke) stay nudge-free — a reflex that fires on everything is one
|
|
||||||
# that gets skipped. An unreachable server counts as "nothing recorded": the
|
|
||||||
# local finding needed no server, and the nudge fails open with it.
|
|
||||||
if [ -n "$local_lines" ]; then
|
|
||||||
n_recorded=$(printf '%s' "$body" | jq -r '.note_ids | length' 2>/dev/null) || n_recorded=0
|
|
||||||
if [ "${n_recorded:-0}" = "0" ] || [ "$n_recorded" = "" ]; then
|
|
||||||
local_context="${local_context}"$'\n'"> None of those existing copies is recorded in Scribe. If the version being written is the canonical one — or this edit is consolidating the copies — record it now with create_snippet (name, code, when-to-reach-for-it, location) so the next session is offered it instead of writing another copy."
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -61,31 +61,6 @@ prepend() { if [ -n "$out" ]; then out="$1"$'\n\n---\n\n'"${out}"; else out="$1"
|
|||||||
# --- Tier 1: static behavioral mandate (always, keyless, networkless) ---
|
# --- Tier 1: static behavioral mandate (always, keyless, networkless) ---
|
||||||
[ -f "$here/scribe_static_context.md" ] && out=$(cat "$here/scribe_static_context.md")
|
[ -f "$here/scribe_static_context.md" ] && out=$(cat "$here/scribe_static_context.md")
|
||||||
|
|
||||||
# --- Which version is actually RUNNING (keyless, networkless) ---
|
|
||||||
#
|
|
||||||
# An install has two halves and only one self-updates:
|
|
||||||
#
|
|
||||||
# marketplaces/…/scribe-plugin/ git clone — pulls on its own
|
|
||||||
# cache/…/scribe/<version>/ what EXECUTES — refreshed only when the
|
|
||||||
# manifest version changes
|
|
||||||
#
|
|
||||||
# So inspecting the clone shows a fix present while the broken copy keeps
|
|
||||||
# running, and the obvious debugging move actively misleads (#2209). Twice, the
|
|
||||||
# only detector was the operator saying "I don't think it updated".
|
|
||||||
#
|
|
||||||
# Naming the running version in every session makes that answerable from the
|
|
||||||
# transcript instead of by archaeology in the cache directory. Deliberately NOT
|
|
||||||
# a server round-trip or a stored per-user record: the state most needing
|
|
||||||
# diagnosis is the one where credentials never arrive, and this line still
|
|
||||||
# appears there.
|
|
||||||
manifest="$here/../.claude-plugin/plugin.json"
|
|
||||||
if [ -f "$manifest" ]; then
|
|
||||||
plugin_version=$(jq -r '.version // empty' "$manifest" 2>/dev/null) || plugin_version=""
|
|
||||||
if [ -n "$plugin_version" ]; then
|
|
||||||
append "> Scribe plugin **v${plugin_version}** is executing in this session. A fix merged after this version has not reached it — the marketplace clone updates on its own, but the cache that runs only refreshes when the manifest version changes."
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# --- Tier 2: dynamic rules + active-project context (best-effort) ---
|
# --- Tier 2: dynamic rules + active-project context (best-effort) ---
|
||||||
url=${SCRIBE_URL:-${CLAUDE_PLUGIN_OPTION_API_ENDPOINT:-}}
|
url=${SCRIBE_URL:-${CLAUDE_PLUGIN_OPTION_API_ENDPOINT:-}}
|
||||||
token=${SCRIBE_TOKEN:-${CLAUDE_PLUGIN_OPTION_API_TOKEN:-}}
|
token=${SCRIBE_TOKEN:-${CLAUDE_PLUGIN_OPTION_API_TOKEN:-}}
|
||||||
|
|||||||
@@ -37,36 +37,11 @@ for the operator's work, and as your own working memory across sessions.
|
|||||||
moment it's complete. When you **fix** something — even in passing — record it
|
moment it's complete. When you **fix** something — even in passing — record it
|
||||||
as its own issue (`create_task(kind="issue")`), not as a work-log line on an
|
as its own issue (`create_task(kind="issue")`), not as a work-log line on an
|
||||||
unrelated open task.
|
unrelated open task.
|
||||||
- **Tag to Systems as you write** — `enter_project` lists the project's
|
- **Reuse before rebuilding** — before writing a new helper/utility/component,
|
||||||
Systems (its named subsystems/areas). When you create or meaningfully update
|
search recorded **snippets** (reusable code recorded once for recall) and
|
||||||
a record, ask which areas it is about and pass `system_ids`; if an area has
|
reuse the prior art instead of re-solving it; when you build something
|
||||||
no System yet, create it with `create_system` (name + a one-paragraph
|
reusable, record it with `create_snippet` (name, code, when-to-reach-for-it,
|
||||||
charter) rather than leaving it unmodelled. Cross-cutting records — audits,
|
location) so a later session is offered it, not left to write it again.
|
||||||
sweeps, reviews — take SEVERAL tags, and are the best moment to DISCOVER
|
|
||||||
missing Systems: a pass that walks the subsystems has just enumerated the
|
|
||||||
vocabulary, so mint what it names. Create liberally; the duplicate gate on
|
|
||||||
`create_system` (and reviewing the existing list) is the guardrail against
|
|
||||||
sprawl, not restraint. Every read and write of a project record shows its
|
|
||||||
`systems` — that is the "am I in a System's territory?" signal, and
|
|
||||||
`list_system_records` reads that territory's whole pile before you work in
|
|
||||||
it. An untagged project record carries the `systems_hint` question instead,
|
|
||||||
on creates, updates, and work-logs alike — treat it as the tagging question
|
|
||||||
asked at the moment of work, not as noise to skip past.
|
|
||||||
- **The pattern library: start from recorded shapes, and record every shape
|
|
||||||
at first build** — recorded **snippets** are the project's pattern library,
|
|
||||||
not a dedup net. Before building ANY shape — a button, an input field, a
|
|
||||||
modal, a route handler, a service class, a test scaffold, up through complex
|
|
||||||
subsystem patterns — search snippets and START from the recorded shape; a
|
|
||||||
deliberate departure is recorded as its own named variant, never left as
|
|
||||||
silent drift. And the FIRST time a shape is built, record it with
|
|
||||||
`create_snippet` (name, when-to-reach-for-it, location, code) in the same
|
|
||||||
breath — do not judge whether it "might recur": the builder of the first
|
|
||||||
instance can never know, and a missed record is invisible until it
|
|
||||||
resurfaces as an uninformed duplicate. A mature project's snippet corpus
|
|
||||||
should read as a map of every shape in it. The backstop still holds:
|
|
||||||
noticing the second copy of anything, or consolidating copies into a shared
|
|
||||||
X, means X gets recorded before that work is finished — which is how a
|
|
||||||
codebase is kept from growing four `.btn-primary` definitions.
|
|
||||||
- Do **not** keep the operator's rules, plans, or project notes in local
|
- Do **not** keep the operator's rules, plans, or project notes in local
|
||||||
memory / CLAUDE.md in parallel with Scribe — Scribe holds the single copy.
|
memory / CLAUDE.md in parallel with Scribe — Scribe holds the single copy.
|
||||||
- **Compact at clean seams** — because you record as you go, a context
|
- **Compact at clean seams** — because you record as you go, a context
|
||||||
@@ -76,25 +51,5 @@ for the operator's work, and as your own working memory across sessions.
|
|||||||
`/compact` (name what you logged). You can't run it yourself — surface the
|
`/compact` (name what you logged). You can't run it yourself — surface the
|
||||||
recommendation and let them decide. Suggest it at seams, not every turn.
|
recommendation and let them decide. Suggest it at seams, not every turn.
|
||||||
|
|
||||||
**How the instruction surfaces divide the work:** this file carries the
|
|
||||||
session-level reflexes (WHEN to reach for Scribe); each tool's own description
|
|
||||||
carries its full contract (HOW to call it — read it when you load the tool);
|
|
||||||
the bundled skills carry process arcs (planning, debugging, verification). The
|
|
||||||
MCP server's instruction block is deliberately only a map — the client injects
|
|
||||||
roughly its first 2,000 characters and silently cuts the rest, so nothing
|
|
||||||
load-bearing lives below that fold.
|
|
||||||
|
|
||||||
**If two Scribe instruction surfaces disagree** — this file, the MCP server's
|
|
||||||
tool instructions, the `using-scribe` skill — **follow the one that assumes
|
|
||||||
least about its own delivery.** This file is the floor: it ships with the
|
|
||||||
plugin and needs no API key and no network, so it still applies in exactly the
|
|
||||||
session where the others never arrived. The others may elaborate on what is
|
|
||||||
written here; they must not contradict it. Weigh a disagreement by which way it
|
|
||||||
fails, not by which surface said more: doing something a push would also have
|
|
||||||
covered costs one redundant call, while skipping it because you expected a push
|
|
||||||
that never came means working without the operator's rules and not knowing.
|
|
||||||
A contradiction between surfaces is a defect in the product — say so, so it
|
|
||||||
gets recorded and fixed rather than silently arbitrated again next session.
|
|
||||||
|
|
||||||
If the Scribe tools are unavailable, say so rather than silently falling back
|
If the Scribe tools are unavailable, say so rather than silently falling back
|
||||||
to local notes.
|
to local notes.
|
||||||
|
|||||||
@@ -1,24 +1,20 @@
|
|||||||
---
|
---
|
||||||
name: reusing-code
|
name: reusing-code
|
||||||
description: Use when you're about to build ANY shape — a component, control, route handler, service class, helper, test scaffold — search recorded snippets FIRST and start from the recorded shape instead of re-solving it. And the FIRST time a shape is built, record it as a snippet so every later instance starts from it. Triggers on "write a util/helper", "I need a function that…", "let me add a component/button/field/route", or having just built the first instance of anything.
|
description: Use when you're about to write a helper, utility, hook, or reusable component — search recorded snippets FIRST so prior art is reused instead of re-solved. And the moment you build or notice something reusable, record it as a snippet so a later session finds it. Triggers on "write a util/helper", "I need a function that…", "let me add a component", or just having built something worth reusing.
|
||||||
---
|
---
|
||||||
|
|
||||||
# Reusing code — the pattern library
|
# Reusing code — recall before you rebuild
|
||||||
|
|
||||||
Snippets are the project's **pattern library**, not a dedup net. Each records a
|
Reusable code is worth writing once. Scribe stores **snippets** — a named,
|
||||||
named shape — with its language, signature, canonical location (repo · path ·
|
reusable function or component recorded with its language, signature, canonical
|
||||||
symbol), a one-line *"when to reach for it,"* and the code — so every later
|
location (repo · path · symbol), a one-line *"when to reach for it,"* and the
|
||||||
instance STARTS from the recorded shape: buttons start from the button shape,
|
code itself — so prior art can surface *before* it's re-written as a one-off.
|
||||||
fields from the field shape, and "special" is a deliberate, named exception
|
|
||||||
rather than drift. A mature project's snippet corpus reads as a map of every
|
|
||||||
shape in it, from the humblest control to the most complex subsystem pattern.
|
|
||||||
Snippets are ordinary embedded notes, so a recorded one also surfaces on its own
|
Snippets are ordinary embedded notes, so a recorded one also surfaces on its own
|
||||||
through recall/auto-inject; this skill is the active reflex around that.
|
through recall/auto-inject; this skill is the active reflex around that.
|
||||||
|
|
||||||
## Before you build any shape — search first
|
## Before you write a new helper — search first
|
||||||
|
|
||||||
- About to build a component, control, route handler, service class, utility,
|
- About to write a utility, hook, formatter, adapter, or a reusable component?
|
||||||
hook, formatter, adapter, or test scaffold?
|
|
||||||
**Search snippets before writing it.** `list_snippets(q="…")` (or a plain
|
**Search snippets before writing it.** `list_snippets(q="…")` (or a plain
|
||||||
`search`) — a matching one may already exist, in this project or another.
|
`search`) — a matching one may already exist, in this project or another.
|
||||||
`list_snippets` searches every project by default; that's deliberate, since a
|
`list_snippets` searches every project by default; that's deliberate, since a
|
||||||
@@ -41,24 +37,11 @@ through recall/auto-inject; this skill is the active reflex around that.
|
|||||||
it before you go any further. Either it's the helper you were about to
|
it before you go any further. Either it's the helper you were about to
|
||||||
duplicate — reuse it and drop yours — or it isn't, and the record needs the new
|
duplicate — reuse it and drop yours — or it isn't, and the record needs the new
|
||||||
location adding. Both are cheaper now than after the duplicate settles in.
|
location adding. Both are cheaper now than after the duplicate settles in.
|
||||||
- **A `[records this file]` hint is a duty, not a menu.** When the hint says a
|
|
||||||
snippet records the very file you're editing, the record's freshness is now
|
|
||||||
YOUR edit's responsibility: if the edit changes the recorded shape,
|
|
||||||
`update_snippet(id, code=…)` with the new form as part of the same task; if
|
|
||||||
it doesn't, `verify_snippet(id, status="ok", commit_sha=…)` costs one call
|
|
||||||
and re-stamps the record as checked. Scribe never reads the repo — this
|
|
||||||
moment, in the session that has the context, is the only place the record
|
|
||||||
gets kept true.
|
|
||||||
|
|
||||||
## The first time a shape is built — record it
|
## The moment you build something reusable — record it
|
||||||
|
|
||||||
- Just built the FIRST instance of anything with a shape — a component, a
|
- Just wrote (or noticed) a helper, hook, pattern, or component worth repeating?
|
||||||
field, a route, a service pattern, a scaffold? Record it with
|
Record it with `create_snippet` while it's fresh:
|
||||||
`create_snippet` while it's fresh. Do **not** stop to judge whether it will
|
|
||||||
recur: the builder of the first instance can never know, and a missed record
|
|
||||||
is invisible until it resurfaces as an uninformed duplicate. Over-recording
|
|
||||||
is safe — dead weight shows up in the usage counters and can be pruned;
|
|
||||||
under-recording has no signal at all. The record is cheap — these fields:
|
|
||||||
- **name** — what it's called, e.g. `useDebouncedRef`.
|
- **name** — what it's called, e.g. `useDebouncedRef`.
|
||||||
- **code** — the implementation.
|
- **code** — the implementation.
|
||||||
- **when_to_use** — one sharp line on when to reach for it. This becomes part
|
- **when_to_use** — one sharp line on when to reach for it. This becomes part
|
||||||
@@ -107,26 +90,9 @@ The result is a single entry that shows every place the thing is used — which
|
|||||||
exactly the signal that it was worth consolidating. This is the cure the create
|
exactly the signal that it was worth consolidating. This is the cure the create
|
||||||
gate only hints at when it blocks a near-duplicate.
|
gate only hints at when it blocks a near-duplicate.
|
||||||
|
|
||||||
## Consumer maps are rows, never prose
|
|
||||||
|
|
||||||
Every enumerated relationship between code and canon belongs in the shape
|
|
||||||
ledger, not in a sentence. When you establish that call sites route through a
|
|
||||||
canonical helper — during an audit, a verify pass, or a consolidation —
|
|
||||||
record each consuming definition with
|
|
||||||
`classify_shapes(project_id, [{path, symbol, status: "instance", snippet_id}])`.
|
|
||||||
A deliberate departure is a `"variant"` (reason required — the why IS the
|
|
||||||
record); a judged one-off is `"exempt"` (reason required). Prose in a
|
|
||||||
verification detail cannot be sorted, queried, or diffed; rows are what make
|
|
||||||
"what uses this?" answerable forever. `list_shapes(project_id,
|
|
||||||
status="unclassified")` is the standing todo — and N same-shaped occurrences
|
|
||||||
matching no canon means derive one first (consolidate, `create_snippet`,
|
|
||||||
then classify the rest against it), never N loose classifications.
|
|
||||||
|
|
||||||
## Why this pays off
|
## Why this pays off
|
||||||
|
|
||||||
A one-off written a second time is the cost this avoids — and at project
|
A one-off written a second time is the cost this avoids. Recording a snippet
|
||||||
scale, the cost is an application whose buttons, fields, and services each
|
once — with a location and a crisp "when to use" — means the next session is
|
||||||
exist in four diverging shapes. Recording every shape once — with a location
|
offered the prior art instead of re-solving it. Search before writing; record
|
||||||
and a crisp "when to use" — means every later session starts from the pattern
|
what's worth reusing.
|
||||||
library instead of re-deriving it. Search before building; record every shape
|
|
||||||
at first build.
|
|
||||||
|
|||||||
@@ -1,51 +0,0 @@
|
|||||||
---
|
|
||||||
name: shape-accounting
|
|
||||||
description: Use when a project's shape accounting needs attention — the pattern_coverage line from enter_project shows unclassified shapes or is missing on a forge-served project, the operator asks about coverage/accounting/canon, or you just proved a code-to-canon relationship (an audit enumerated call sites, a consolidation repointed consumers, a verify pass confirmed a helper's users). Triggers on "coverage", "accounted", "unclassified", "classify shapes", "what uses this", or finishing any consolidation.
|
|
||||||
---
|
|
||||||
|
|
||||||
# Shape accounting — every shape classified against canon
|
|
||||||
|
|
||||||
The snippet library records **canon** (small); the shape ledger accounts for
|
|
||||||
**every extracted definition** in a project's bound repos (total). Each ledger
|
|
||||||
row carries a status:
|
|
||||||
|
|
||||||
- `canonical` — IS a snippet's reference (the coverage sync stamps these
|
|
||||||
mechanically; you rarely set it).
|
|
||||||
- `instance` of snippet N — conforms to recorded canon. Canon in another
|
|
||||||
project counts (a family-level button shape fully accounts for a local use).
|
|
||||||
- `variant` of snippet N — a deliberate, named departure. **Reason required**
|
|
||||||
— the why IS the record.
|
|
||||||
- `exempt` — judged genuinely one-off. **Reason required.** A recorded
|
|
||||||
judgment, not silence — it stops the next pass re-litigating it.
|
|
||||||
- `unclassified` — nobody has judged it yet. **This is the todo list.**
|
|
||||||
|
|
||||||
## The loop
|
|
||||||
|
|
||||||
1. **Seed / refresh** — the ledger fills from coverage computation. Entering a
|
|
||||||
project triggers a background seed automatically; when you need it current
|
|
||||||
*now* (before a classification batch, or when the line is missing on a
|
|
||||||
forge-served project), call `refresh_pattern_coverage(project_id)` — it
|
|
||||||
returns the fresh accounting line. Takes seconds; it moves repo archives.
|
|
||||||
2. **Read the todo** — `list_shapes(project_id, status="unclassified")`,
|
|
||||||
optionally scoped by `path` to the directories the coverage line names as
|
|
||||||
largest. `snippet_id=N` reads a consumer map.
|
|
||||||
3. **Judge in batches** — `classify_shapes(project_id, [{path, symbol,
|
|
||||||
status, snippet_id?, reason?}])`. All-or-nothing: a bad item applies
|
|
||||||
nothing. Rows, never prose — a consumer list in a note or verification
|
|
||||||
detail cannot be sorted, queried, or diffed.
|
|
||||||
|
|
||||||
## The derive-first rule
|
|
||||||
|
|
||||||
N same-shaped occurrences matching **no** recorded canon is never N loose
|
|
||||||
classifications — it is a consolidation candidate: derive one reference from
|
|
||||||
the dominant form, `create_snippet` it, migrate the outliers, then classify
|
|
||||||
the rest as instances. Canon is determined from the code; consistency comes
|
|
||||||
from the derivation, not from asking permission.
|
|
||||||
|
|
||||||
## What this buys
|
|
||||||
|
|
||||||
Divergence becomes mechanical: when button B appears where button A is canon,
|
|
||||||
the ledger says *unintended divergence* or *justified variant with its
|
|
||||||
reason* — nobody re-derives the history. `get_snippet` shows each snippet's
|
|
||||||
`instances` and `variants`, so "what uses this?" is answered from rows before
|
|
||||||
any contract change lands on its consumers.
|
|
||||||
@@ -81,31 +81,6 @@ Two constraints on *how* that's achieved:
|
|||||||
(`arose_from_id`) and the subsystem it touches (`system_ids`). Don't bury a
|
(`arose_from_id`) and the subsystem it touches (`system_ids`). Don't bury a
|
||||||
fix as a work-log line on whatever task happened to be open.
|
fix as a work-log line on whatever task happened to be open.
|
||||||
|
|
||||||
7. **Tag records to Systems.** `enter_project` lists the project's Systems —
|
|
||||||
its named subsystems/areas. When you create or meaningfully update a record,
|
|
||||||
ask which areas it is *about* and pass `system_ids`. The test: would someone
|
|
||||||
investigating that subsystem want this record in the pile
|
|
||||||
`list_system_records` returns? If the area has no System yet, create one
|
|
||||||
(`create_system`: name + a one-paragraph charter) — an area that plainly
|
|
||||||
exists deserves naming the moment two records would share it; don't wait to
|
|
||||||
be asked. Cross-cutting records — audits, sweeps, reviews — take *several*
|
|
||||||
tags and are the prime discovery moment: a pass that walks the subsystems
|
|
||||||
has just enumerated the vocabulary, so mint the Systems it names as it
|
|
||||||
names them. Create liberally — `create_system` is duplicate-gated, and that
|
|
||||||
gate (plus reviewing the existing list) is the guardrail against sprawl,
|
|
||||||
not restraint. Only a record genuinely about no particular area goes
|
|
||||||
untagged.
|
|
||||||
|
|
||||||
8. **State updates in place; chronicles don't.** A dev-log records what
|
|
||||||
*happened* — write it once, never rewrite it. A durable finding (how a
|
|
||||||
subsystem works, a measured number) lives in that System's **reference
|
|
||||||
note** ("«System» — reference"), which you UPDATE as facts change — safe,
|
|
||||||
because every meaningful edit is snapshotted and the version history is the
|
|
||||||
changelog. The dev-log then `[[links]]` the reference note instead of
|
|
||||||
restating state. When a new record outright *corrects* an older one (a
|
|
||||||
re-measurement, a reversed decision), pass the old id in `supersedes` so the
|
|
||||||
stale record is demoted and labelled rather than left competing.
|
|
||||||
|
|
||||||
## Stay inside the active project's scope
|
## Stay inside the active project's scope
|
||||||
|
|
||||||
Once a project is in scope — you called `enter_project`, or the working repo is
|
Once a project is in scope — you called `enter_project`, or the working repo is
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
|
"extends": [
|
||||||
|
"config:recommended"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,185 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
"""Find elements whose classes have no base rule — the dangling-selector bug.
|
|
||||||
|
|
||||||
THE FAILURE THIS CATCHES
|
|
||||||
|
|
||||||
Deleting a CSS rule from a scoped stylesheet is not the local edit it looks
|
|
||||||
like. Three ways it goes wrong, all of them silent:
|
|
||||||
|
|
||||||
1. A rule is deleted and its `:hover` / modifier survives. The selector still
|
|
||||||
exists, so nothing reads as unused, but the element renders with no base
|
|
||||||
styling at all. `.btn-workspace:hover` outlived `.btn-workspace` and a
|
|
||||||
router-link rendered as raw browser blue for days.
|
|
||||||
|
|
||||||
2. The parent's layout rule is deleted while the children keep theirs.
|
|
||||||
`.milestone-header` was a flex row; its children still declare `flex: 1`
|
|
||||||
and `flex-shrink: 0`. Without the parent they stack vertically, and a
|
|
||||||
milestone that was one line becomes five. Nothing errors — the page just
|
|
||||||
wastes space, which reads as a design decision.
|
|
||||||
|
|
||||||
3. A rule is removed from a comma-separated group, leaving `.a,` dangling in
|
|
||||||
front of the next rule and swallowing it. That one at least has a
|
|
||||||
brace-balance tell; these two do not.
|
|
||||||
|
|
||||||
None of it is visible to `vue-tsc`, which is the frontend's entire check. A
|
|
||||||
dead style typechecks perfectly.
|
|
||||||
|
|
||||||
WHAT IT REPORTS
|
|
||||||
|
|
||||||
An element whose every static class is styled NOWHERE as a base rule, while at
|
|
||||||
least one of them appears in the file's CSS. That conjunction is the signal: a
|
|
||||||
class nobody styles is ordinary (a hook for a test, a semantic label), and a
|
|
||||||
class with only modifier rules is a deletion that went half-way.
|
|
||||||
|
|
||||||
Descendant selectors count as a base — `.panel .row {}` styles `.row` — because
|
|
||||||
from the element's side there is no difference. Only the LAST compound of a
|
|
||||||
selector is what it styles, and a compound's whole class SET is what it
|
|
||||||
requires: `.pane.empty` and `td.num` are base rules for the element carrying
|
|
||||||
those classes, not modifiers. Reading them as modifiers cost this check four
|
|
||||||
false reports on its first run, and a check with false reports is one that gets
|
|
||||||
skimmed.
|
|
||||||
|
|
||||||
REPORT, NOT FAIL. Bare wrappers with no styling of their own are legitimate,
|
|
||||||
so this cannot be a gate without a suppression mechanism nobody would maintain.
|
|
||||||
A count that grows is the signal to look. Where a wrapper is bare on purpose,
|
|
||||||
say so in a comment beside its descendant rules — the remaining reports here
|
|
||||||
all carry one, so a new entry means something changed.
|
|
||||||
|
|
||||||
KNOWN BLIND SPOT: a class with NO rule anywhere is invisible to this, because
|
|
||||||
it cannot be told from a semantic-only hook. `.systems-list` had lost its
|
|
||||||
entire rule and was rendering with browser bullets; it was found by reading the
|
|
||||||
file next to a class that WAS half-styled, not by this check.
|
|
||||||
|
|
||||||
INSTANCE-AGNOSTIC (rule #115). Nothing here knows a class name, a component, or
|
|
||||||
a convention; point it at any Vue tree.
|
|
||||||
"""
|
|
||||||
from __future__ import annotations
|
|
||||||
|
|
||||||
import argparse
|
|
||||||
import pathlib
|
|
||||||
import re
|
|
||||||
import sys
|
|
||||||
|
|
||||||
STYLE_BLOCK = re.compile(r"<style[^>]*>(.*?)</style>", re.S)
|
|
||||||
CSS_COMMENT = re.compile(r"/\*.*?\*/", re.S)
|
|
||||||
# `class="a b"` only — never `:class="[...]"`, whose value is an expression.
|
|
||||||
# The negative lookbehind is the whole point: a bound class list mentions names
|
|
||||||
# that a static parse would misread as the element's only classes.
|
|
||||||
STATIC_CLASS = re.compile(r'(?<![:\w-])class="([^"{}\[\]]*)"')
|
|
||||||
SELECTOR = re.compile(r"([^{}]+)\{")
|
|
||||||
CLASS_TOKEN = re.compile(r"\.([A-Za-z][\w-]*)")
|
|
||||||
|
|
||||||
|
|
||||||
def shared_classes(sheets: list[pathlib.Path]) -> set[str]:
|
|
||||||
"""Class names any global stylesheet defines — a base rule from elsewhere."""
|
|
||||||
names: set[str] = set()
|
|
||||||
for sheet in sheets:
|
|
||||||
if sheet.exists():
|
|
||||||
names |= set(CLASS_TOKEN.findall(sheet.read_text()))
|
|
||||||
return names
|
|
||||||
|
|
||||||
|
|
||||||
def base_class_sets(css: str) -> list[frozenset[str]]:
|
|
||||||
"""Class combinations this stylesheet gives a base rule to.
|
|
||||||
|
|
||||||
The last compound of a selector is what the rule styles: in
|
|
||||||
`.panel .row:hover` that is `.row:hover`, a state — but in `.panel .row` it
|
|
||||||
is `.row`, a base.
|
|
||||||
|
|
||||||
A compound may carry more than one class, and a type selector alongside
|
|
||||||
them. `.pane.empty` and `td.num` are both base rules for the element that
|
|
||||||
matches, so each is recorded as the SET of classes it requires; an element
|
|
||||||
is styled when it carries all of them. Recording the classes individually
|
|
||||||
instead would clear `.pane` everywhere on the strength of a rule that only
|
|
||||||
ever applies with `.empty` — precision matters more here than reach, since
|
|
||||||
a missed base is a false report and a wrong one is a defect gone quiet.
|
|
||||||
|
|
||||||
A compound with no class at all (`ul`, `li`) is skipped: it styles by tag,
|
|
||||||
which this cannot verify without parsing the template's elements, and an
|
|
||||||
empty set would clear every element in the file.
|
|
||||||
"""
|
|
||||||
out: list[frozenset[str]] = []
|
|
||||||
for selector in SELECTOR.findall(css):
|
|
||||||
for part in selector.split(","):
|
|
||||||
part = part.strip()
|
|
||||||
if not part or part.startswith("@"):
|
|
||||||
continue
|
|
||||||
last = re.split(r"[\s>+~]+", part)[-1]
|
|
||||||
# A pseudo-class, pseudo-element or attribute selector makes it a
|
|
||||||
# state or a variant, not the element's base appearance.
|
|
||||||
if ":" in last or "[" in last:
|
|
||||||
continue
|
|
||||||
names = CLASS_TOKEN.findall(last)
|
|
||||||
# Everything outside the class tokens must be a bare type selector.
|
|
||||||
if names and re.fullmatch(r"[A-Za-z][\w-]*|\*|", CLASS_TOKEN.sub("", last)):
|
|
||||||
out.append(frozenset(names))
|
|
||||||
return out
|
|
||||||
|
|
||||||
|
|
||||||
def scan(path: pathlib.Path, shared: set[str]) -> list[tuple[str, list[str]]]:
|
|
||||||
source = path.read_text()
|
|
||||||
template = source.split("<style")[0]
|
|
||||||
css = "\n".join(CSS_COMMENT.sub("", block) for block in STYLE_BLOCK.findall(source))
|
|
||||||
if not css.strip():
|
|
||||||
return []
|
|
||||||
|
|
||||||
base_sets = base_class_sets(css)
|
|
||||||
mentioned = set(CLASS_TOKEN.findall(css))
|
|
||||||
|
|
||||||
findings: list[tuple[str, list[str]]] = []
|
|
||||||
for attr in sorted(set(STATIC_CLASS.findall(template))):
|
|
||||||
names = [n for n in attr.split() if re.fullmatch(r"[A-Za-z][\w-]*", n)]
|
|
||||||
if not names:
|
|
||||||
continue
|
|
||||||
carried = set(names)
|
|
||||||
if any(carried >= required for required in base_sets):
|
|
||||||
continue
|
|
||||||
if any(n in shared for n in names):
|
|
||||||
continue
|
|
||||||
dangling = [n for n in names if n in mentioned]
|
|
||||||
if dangling:
|
|
||||||
findings.append((attr, dangling))
|
|
||||||
return findings
|
|
||||||
|
|
||||||
|
|
||||||
def main() -> int:
|
|
||||||
parser = argparse.ArgumentParser(description=__doc__)
|
|
||||||
parser.add_argument("--root", default="frontend/src", help="tree of .vue files")
|
|
||||||
parser.add_argument(
|
|
||||||
"--shared",
|
|
||||||
action="append",
|
|
||||||
default=None,
|
|
||||||
help="global stylesheet whose classes count as a base rule (repeatable)",
|
|
||||||
)
|
|
||||||
args = parser.parse_args()
|
|
||||||
|
|
||||||
root = pathlib.Path(args.root)
|
|
||||||
if not root.exists():
|
|
||||||
print(f"{root}: no such directory", file=sys.stderr)
|
|
||||||
return 2
|
|
||||||
|
|
||||||
sheets = [pathlib.Path(s) for s in (args.shared or [])]
|
|
||||||
if not sheets:
|
|
||||||
sheets = sorted(root.glob("assets/*.css"))
|
|
||||||
shared = shared_classes(sheets)
|
|
||||||
|
|
||||||
total = 0
|
|
||||||
for path in sorted(root.rglob("*.vue")):
|
|
||||||
for attr, dangling in scan(path, shared):
|
|
||||||
total += 1
|
|
||||||
print(f'{path}: class="{attr}" — styled but never based: {", ".join(dangling)}')
|
|
||||||
|
|
||||||
print()
|
|
||||||
if total:
|
|
||||||
print(
|
|
||||||
f"REPORT: {total} element(s) whose classes carry modifier rules but no base "
|
|
||||||
f"rule. Each is either a deleted rule that left its :hover behind, or a "
|
|
||||||
f"deliberately bare wrapper."
|
|
||||||
)
|
|
||||||
else:
|
|
||||||
print("OK — every styled class has a base rule.")
|
|
||||||
return 0
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
raise SystemExit(main())
|
|
||||||
@@ -307,44 +307,6 @@ def check_local_prior_art_needs_no_instance() -> None:
|
|||||||
ok("prior-art local arm: answers with no instance configured")
|
ok("prior-art local arm: answers with no instance configured")
|
||||||
|
|
||||||
|
|
||||||
def check_session_context_reports_its_version() -> None:
|
|
||||||
"""The SessionStart context must name the plugin version it is running.
|
|
||||||
|
|
||||||
An install has two halves and only one self-updates: the marketplace clone
|
|
||||||
pulls on its own, while the CACHE is what executes and refreshes only when
|
|
||||||
the manifest version changes. So a shipped fix can sit unreached while
|
|
||||||
inspecting the clone shows it present — the obvious debugging move
|
|
||||||
misleads, and twice the only detector was a human saying "I don't think it
|
|
||||||
updated" (#2209, #2220).
|
|
||||||
|
|
||||||
Asserted WITHOUT credentials on purpose. The state most needing diagnosis
|
|
||||||
is the one where the token never arrives, and a marker that vanished there
|
|
||||||
would be missing exactly when it is wanted.
|
|
||||||
"""
|
|
||||||
script = HOOKS_DIR / "scribe_session_context.sh"
|
|
||||||
if not script.is_file() or not shutil.which("jq"):
|
|
||||||
skip("version marker: hook or jq missing")
|
|
||||||
return
|
|
||||||
|
|
||||||
manifest_v = manifest_version()
|
|
||||||
if manifest_v is None:
|
|
||||||
fail("version marker: could not read the manifest version")
|
|
||||||
return
|
|
||||||
|
|
||||||
try:
|
|
||||||
proc = _run_hook(script, json.dumps({"source": "startup"}), {})
|
|
||||||
except subprocess.TimeoutExpired:
|
|
||||||
fail("version marker: hook hung")
|
|
||||||
return
|
|
||||||
if proc.returncode != 0:
|
|
||||||
fail(f"version marker: hook exited {proc.returncode}")
|
|
||||||
elif manifest_v not in proc.stdout:
|
|
||||||
fail(f"version marker: session context never names v{manifest_v} — "
|
|
||||||
f"a stale install would be undetectable from the transcript")
|
|
||||||
else:
|
|
||||||
ok(f"version marker: session context reports v{manifest_v}, no credentials needed")
|
|
||||||
|
|
||||||
|
|
||||||
def _git(*args: str) -> tuple[int, str]:
|
def _git(*args: str) -> tuple[int, str]:
|
||||||
proc = subprocess.run(
|
proc = subprocess.run(
|
||||||
["git", *args], capture_output=True, text=True, cwd=ROOT
|
["git", *args], capture_output=True, text=True, cwd=ROOT
|
||||||
@@ -437,7 +399,6 @@ def main() -> int:
|
|||||||
check_shellcheck()
|
check_shellcheck()
|
||||||
check_fail_open()
|
check_fail_open()
|
||||||
check_local_prior_art_needs_no_instance()
|
check_local_prior_art_needs_no_instance()
|
||||||
check_session_context_reports_its_version()
|
|
||||||
if not args.no_version:
|
if not args.no_version:
|
||||||
check_version_bump(args.base)
|
check_version_bump(args.base)
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -26,12 +26,12 @@ from scribe.routes.profile import profile_bp
|
|||||||
from scribe.routes.knowledge import knowledge_bp
|
from scribe.routes.knowledge import knowledge_bp
|
||||||
from scribe.routes.rulebooks import rulebooks_bp
|
from scribe.routes.rulebooks import rulebooks_bp
|
||||||
from scribe.routes.plugin import plugin_bp
|
from scribe.routes.plugin import plugin_bp
|
||||||
|
from scribe.routes.design import design_bp
|
||||||
from scribe.routes.design_systems import design_systems_bp
|
from scribe.routes.design_systems import design_systems_bp
|
||||||
from scribe.routes.trash import trash_bp
|
from scribe.routes.trash import trash_bp
|
||||||
from scribe.routes.dashboard import dashboard_bp
|
from scribe.routes.dashboard import dashboard_bp
|
||||||
from scribe.routes.systems import systems_bp
|
from scribe.routes.systems import systems_bp
|
||||||
from scribe.routes.snippets import snippets_bp
|
from scribe.routes.snippets import snippets_bp
|
||||||
from scribe.routes.webhooks import webhooks_bp
|
|
||||||
from scribe.mcp import mount_mcp
|
from scribe.mcp import mount_mcp
|
||||||
|
|
||||||
STATIC_DIR = Path(__file__).parent / "static"
|
STATIC_DIR = Path(__file__).parent / "static"
|
||||||
@@ -91,12 +91,12 @@ def create_app() -> Quart:
|
|||||||
app.register_blueprint(knowledge_bp)
|
app.register_blueprint(knowledge_bp)
|
||||||
app.register_blueprint(rulebooks_bp)
|
app.register_blueprint(rulebooks_bp)
|
||||||
app.register_blueprint(plugin_bp)
|
app.register_blueprint(plugin_bp)
|
||||||
|
app.register_blueprint(design_bp)
|
||||||
app.register_blueprint(design_systems_bp)
|
app.register_blueprint(design_systems_bp)
|
||||||
app.register_blueprint(trash_bp)
|
app.register_blueprint(trash_bp)
|
||||||
app.register_blueprint(dashboard_bp)
|
app.register_blueprint(dashboard_bp)
|
||||||
app.register_blueprint(systems_bp)
|
app.register_blueprint(systems_bp)
|
||||||
app.register_blueprint(snippets_bp)
|
app.register_blueprint(snippets_bp)
|
||||||
app.register_blueprint(webhooks_bp)
|
|
||||||
|
|
||||||
@app.before_request
|
@app.before_request
|
||||||
async def before_request():
|
async def before_request():
|
||||||
|
|||||||
@@ -60,19 +60,6 @@ class Config:
|
|||||||
# the MCP layer doesn't proxy web search (Claude has its own).
|
# the MCP layer doesn't proxy web search (Claude has its own).
|
||||||
SEARXNG_URL: str = os.environ.get("SEARXNG_URL", "")
|
SEARXNG_URL: str = os.environ.get("SEARXNG_URL", "")
|
||||||
|
|
||||||
# Git forge integration (#2689) — optional read access to a git forge so
|
|
||||||
# snippet bodies can be fetched/verified server-side. Connections are
|
|
||||||
# per-user keyring rows (#2778, Settings → Git forges); these env values
|
|
||||||
# survive as an implicit keyring entry for ADMIN users' projects only, so
|
|
||||||
# a deployment can keep the operator's token in a Docker secret instead
|
|
||||||
# of the database. A stored row for the same host wins over the env entry.
|
|
||||||
FORGE_KIND: str = os.environ.get("FORGE_KIND", "")
|
|
||||||
FORGE_BASE_URL: str = os.environ.get("FORGE_BASE_URL", "").rstrip("/")
|
|
||||||
FORGE_TOKEN: str = _read_secret("FORGE_TOKEN", "FORGE_TOKEN_FILE", "")
|
|
||||||
FORGE_WEBHOOK_SECRET: str = _read_secret(
|
|
||||||
"FORGE_WEBHOOK_SECRET", "FORGE_WEBHOOK_SECRET_FILE", ""
|
|
||||||
)
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def oidc_enabled(cls) -> bool:
|
def oidc_enabled(cls) -> bool:
|
||||||
return bool(cls.OIDC_ISSUER and cls.OIDC_CLIENT_ID and cls.OIDC_CLIENT_SECRET)
|
return bool(cls.OIDC_ISSUER and cls.OIDC_CLIENT_ID and cls.OIDC_CLIENT_SECRET)
|
||||||
|
|||||||
+256
-139
@@ -1,90 +1,272 @@
|
|||||||
"""FastMCP instance + Quart mount-point. Tools are registered in mcp/tools/."""
|
"""FastMCP instance + Quart mount-point. Tools are registered in mcp/tools/."""
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import difflib
|
|
||||||
|
|
||||||
from mcp.server.fastmcp import FastMCP
|
from mcp.server.fastmcp import FastMCP
|
||||||
from mcp.server.transport_security import TransportSecuritySettings
|
from mcp.server.transport_security import TransportSecuritySettings
|
||||||
from quart import Quart
|
from quart import Quart
|
||||||
|
|
||||||
## The delivery budget — read before editing this block
|
|
||||||
#
|
|
||||||
# Claude Code injects only the FIRST ~2,048 CHARACTERS of an MCP server's
|
|
||||||
# instructions into the system prompt; the rest is silently cut mid-word
|
|
||||||
# (#2562 — the cut was observed live at exactly offset 2,048, and ~90% of the
|
|
||||||
# previous 20k-char version of this block never reached any session). So this
|
|
||||||
# block is deliberately a MAP, not a manual, and a test pins it under the
|
|
||||||
# fold (test_instruction_surfaces_agree.py::test_instructions_fit_the_fold).
|
|
||||||
#
|
|
||||||
# Where the detail lives instead — each surface has one job:
|
|
||||||
# - Tool docstrings: the per-tool HOW. Delivered with the tool schema, at
|
|
||||||
# reach-for time when the client defers tools. Guidance about one tool
|
|
||||||
# belongs there, not here.
|
|
||||||
# - Plugin static context (plugin/hooks/scribe_static_context.md): the
|
|
||||||
# session-level reflexes (recall-first, record-as-you-go, tag-to-Systems,
|
|
||||||
# compaction). Always delivered in full; needs no key and no network.
|
|
||||||
# - Plugin skills: process arcs (planning, debugging, verification…).
|
|
||||||
# Their listing line is the always-visible trigger; the body loads on
|
|
||||||
# match. Stored Processes become skills via /scribe:sync.
|
|
||||||
# - The server itself: behaviors prose can't be trusted to fire (the
|
|
||||||
# duplicate gate, the untagged-record systems_hint) act in-band in tool
|
|
||||||
# responses, at the moment they apply.
|
|
||||||
# Grow one of those, not this block.
|
|
||||||
_INSTRUCTIONS = """
|
_INSTRUCTIONS = """
|
||||||
Scribe is the operator's self-hosted second brain and system of record — and
|
Scribe is the user's self-hosted second-brain and project-management data
|
||||||
yours: recall from it before acting, record as you go. Keep no parallel copy
|
store, and your own system of record for their work. You (Claude) are the
|
||||||
in local files (CLAUDE.md, auto-memory); Scribe holds the single copy.
|
assistant: record what you do here — tasks, work-logs, decisions, notes — and
|
||||||
|
recall from here before acting. Do not keep the user's project work in local
|
||||||
|
files (CLAUDE.md, scratch/auto memory) in parallel; Scribe holds the single copy.
|
||||||
|
|
||||||
Hierarchy: Project -> Milestone -> Task/Note. The map, by purpose:
|
Hierarchy: Project -> Milestone -> Task/Note.
|
||||||
- ORIENT: enter_project(id) at session start — rules, open tasks, recent
|
|
||||||
notes, Systems and design system in one call.
|
|
||||||
- DO: create_task. Fixed a problem? kind="issue" (symptom -> root cause ->
|
|
||||||
fix), never a work-log line on an unrelated task. Log with add_task_log;
|
|
||||||
keep status honest — in_progress on start, done on finish.
|
|
||||||
- PLAN work with an arc: start_planning. The plan IS a milestone; each step is
|
|
||||||
a child task, not a checkbox. No local plan .md files.
|
|
||||||
- CAPTURE: create_note. RECALL: search first, before answering about the
|
|
||||||
operator's work or opening a task — assume prior art exists, and pass the
|
|
||||||
active project_id to stay in scope.
|
|
||||||
- WHERE work happens: Systems. Tag records with system_ids as you write;
|
|
||||||
create_system when the area is unmodelled.
|
|
||||||
- HOW to work: rules are pull-only and binding — call list_always_on_rules()
|
|
||||||
yourself at session start.
|
|
||||||
- UI: the project's design system is binding — resolve_design_system /
|
|
||||||
get_design_system_stylesheet before hand-writing a value.
|
|
||||||
- REUSE: search snippets before writing a helper; record what you build with
|
|
||||||
create_snippet; classify shapes against canon (classify_shapes) — a
|
|
||||||
consumer map is rows, never prose. Saved procedures are Processes (follow
|
|
||||||
verbatim). Deletes are trash-recoverable.
|
|
||||||
|
|
||||||
A task is a note with status (*_note vs *_task tools).
|
What each part is for, and when to reach for it:
|
||||||
Creates are duplicate-gated: a near-match BLOCKS and returns the existing
|
- Project: the top-level container for a body of work.
|
||||||
id — update it, don't force. shared:true records are another user's — a
|
- Milestone: groups related tasks within a project toward a goal (status
|
||||||
suggestion, not the operator's settled practice.
|
active/done). A milestone is ALSO the home of a plan — its `body` holds the
|
||||||
|
design/intent (Goal/Approach/Verification) and its child tasks are the steps.
|
||||||
|
Use one when a chunk of work needs its own arc.
|
||||||
|
- Task: a unit of actionable work with a lifecycle (status
|
||||||
|
todo/in_progress/done/cancelled, optional priority). A task is a note with a
|
||||||
|
status — reach for one when there is something to DO. Record progress over
|
||||||
|
time with work-logs (add_task_log) rather than rewriting the body.
|
||||||
|
- Issue: a task whose kind is corrective — a problem you fixed or are fixing, as
|
||||||
|
opposed to productive `work`. Create it with create_task(kind="issue"); the
|
||||||
|
body carries symptom → root cause → fix. It has the full task lifecycle, and
|
||||||
|
can link the originating task it arose from (arose_from_id) and the System(s)
|
||||||
|
it touches (system_ids). Reach for one whenever you fix something — even in
|
||||||
|
passing — instead of burying the fix in another task's work-log.
|
||||||
|
- Plan: a MILESTONE acting as a plan container — HOW you'll execute a chunk of
|
||||||
|
work. The design/intent lives in the milestone `body`; each step is its own
|
||||||
|
child task (create_task(milestone_id=...)), tracked with status + work-logs —
|
||||||
|
NOT a checkbox buried in the body. Create one with start_planning when the
|
||||||
|
work has an arc (same test as a milestone, above) and you want the approach
|
||||||
|
reviewable before you start; read it back with get_milestone (body + steps).
|
||||||
|
Work without an arc is a task, not a plan. (The old kind=plan task is retired
|
||||||
|
— some historical plan-tasks still exist and remain readable, but don't
|
||||||
|
create new ones.)
|
||||||
|
- Note: durable free-form knowledge — reference material, decisions, logs of
|
||||||
|
what happened.
|
||||||
|
No lifecycle, not actionable. Reach for one to CAPTURE something worth keeping.
|
||||||
|
- Design system: the visual standards a project's UI is built from — design
|
||||||
|
tokens (name + value per mode) plus the prose a token table cannot hold
|
||||||
|
(aesthetic, voice, what is out of scope). Systems INHERIT: a child holds only
|
||||||
|
what it changes and the chain supplies the rest, so a family's house style and
|
||||||
|
one app's departures from it are the same structure at two depths. A project
|
||||||
|
points at one with set_project_design_system, and enter_project then hands it
|
||||||
|
back with the guidance chain-merged. Treat it as binding for UI work: reach
|
||||||
|
for a token (resolve_design_system / get_design_system_stylesheet) before
|
||||||
|
writing a colour, size, radius or duration by hand. Do NOT record a design
|
||||||
|
system as a rulebook — rules are for behaviour, and tokens kept as prose
|
||||||
|
cannot be resolved, inherited, rendered to a stylesheet, or checked against
|
||||||
|
code.
|
||||||
|
- System: a per-project, reusable, self-describing subsystem/area. Associate any
|
||||||
|
record (note, task, issue) with it via system_ids so research, build-work, and
|
||||||
|
fixes for the same area line up, and recurring problem-spots surface. Manage
|
||||||
|
with create_system / list_systems / get_system.
|
||||||
|
|
||||||
This is only a map — the client injects ~2k chars and cuts the rest. Each
|
Mechanics:
|
||||||
tool's description carries its full contract: read it when you load the
|
- Notes and Tasks share a model; tasks are notes with is_task=True.
|
||||||
tool, and trust it over habit.
|
- Use the *_note tools for notes, the *_task tools for tasks. Don't mix them.
|
||||||
|
- Tags are plain strings (no `#` prefix). Empty list clears tags; omit to leave
|
||||||
|
unchanged on updates.
|
||||||
|
- For optional integer FKs (project_id, milestone_id, parent_id), use 0 to mean
|
||||||
|
"not set". On update_task, -1 clears an existing FK (e.g. milestone_id=-1
|
||||||
|
removes the task from its milestone); 0 leaves it unchanged.
|
||||||
|
|
||||||
|
Reach for Scribe to RECALL, not just to record. Scribe is a second brain —
|
||||||
|
its value is mostly in what it already holds, so make searching it a reflex,
|
||||||
|
not something you wait to be asked for:
|
||||||
|
- Before you answer a question about the user's work, or start a task, search
|
||||||
|
Scribe first (search / list_tasks / list_notes). Assume relevant prior work
|
||||||
|
already exists — a related task, an earlier decision, a prior note — and look
|
||||||
|
before you re-derive it or open a duplicate.
|
||||||
|
- Before creating a task, search for an existing one (search content_type=
|
||||||
|
'task') — don't open a second task for work already tracked.
|
||||||
|
- create_note / create_task enforce this: if a title- or meaning-similar record
|
||||||
|
already exists in the same project, the call is BLOCKED and returns
|
||||||
|
{"duplicate": true, "existing_id": ...} instead of creating. UPDATE that
|
||||||
|
record (update_note / update_task / add_task_log) rather than duplicating.
|
||||||
|
Only pass force=true when it's genuinely a distinct record — a duplicate both
|
||||||
|
bloats the store and surfaces as a stale competing copy in later searches.
|
||||||
|
- Scope to the project in scope. When a project is active (you called
|
||||||
|
enter_project), pass its project_id to search / list_tasks / list_notes so
|
||||||
|
results stay inside that project. Querying with no project_id pulls in every
|
||||||
|
project and bleeds unrelated work into the session — only do it for a
|
||||||
|
deliberate cross-project sweep. get_recent takes no project filter and spans
|
||||||
|
every project; when one is active, prefer the scoped list_* tools over it.
|
||||||
|
And this is not only about reads: once a project is in scope, only reference
|
||||||
|
or offer work on THAT project — don't surface or propose work from other
|
||||||
|
projects unless the operator widens scope. If something clearly belongs to a
|
||||||
|
different project, say so and ask before switching; never silently operate
|
||||||
|
cross-project. The active project does not stick on the server (each call is
|
||||||
|
self-contained); carrying its id forward is on you.
|
||||||
|
|
||||||
|
Keep task state honest — this is what makes the project a trustworthy record:
|
||||||
|
- When you begin working a task, set it to in_progress (update_task
|
||||||
|
status=in_progress).
|
||||||
|
- Log progress as you go with add_task_log — at meaningful steps, not saved up
|
||||||
|
for the end.
|
||||||
|
- The moment a task's work is complete, set it done. Never leave finished work
|
||||||
|
at todo/in_progress — an out-of-date status makes Scribe misrepresent what's
|
||||||
|
left to do.
|
||||||
|
- At a meaningful point — finishing a task, or hitting or discovering a problem
|
||||||
|
that changes direction — write a short dated note on the project (create_note)
|
||||||
|
capturing what happened (the pivots, not just the wins), and set the finished
|
||||||
|
task to done.
|
||||||
|
- When you fix a problem — even one solved in passing — record it as its own
|
||||||
|
issue (create_task(kind="issue")) with symptom → root cause → fix in the body,
|
||||||
|
NOT as a work-log line on whatever task happened to be open. An issue is
|
||||||
|
corrective work with its own lifecycle; recording it discretely (optionally
|
||||||
|
linked via arose_from_id to the task it came from, and system_ids to the
|
||||||
|
subsystem it touches) is what makes it findable so it isn't diagnosed from
|
||||||
|
scratch next time.
|
||||||
|
|
||||||
|
Compaction hygiene — recommend compacting at clean seams. Because you record
|
||||||
|
progress as you go, a context compaction is SAFE: the durable state lives in
|
||||||
|
Scribe (task status, work-logs, decision notes), not the transcript, so it
|
||||||
|
survives the summary. Use this rather than letting auto-compaction fire mid-task:
|
||||||
|
- At the end of a coherent block of work (a task closed, a plan phase finished)
|
||||||
|
in a long session, first make sure in-flight state is actually in Scribe —
|
||||||
|
update task status, add a work-log, capture any decision as a note. Surface
|
||||||
|
the few things worth logging before suggesting the compact.
|
||||||
|
- Then tell the operator it's a good, safe moment to /compact, naming what you
|
||||||
|
logged ("logged to #X/#Y — safe to /compact, nothing will be lost"). You
|
||||||
|
cannot run /compact yourself; surface the recommendation and let them decide.
|
||||||
|
- Recommend it at genuine seams, not every turn. The next session's start will
|
||||||
|
prompt you to reload your bearings from Scribe — so a clean-seam compact plus
|
||||||
|
that reload loses nothing.
|
||||||
|
|
||||||
|
Scribe maintains a Rulebook system (Rulebook -> Topic -> Rule). Rules carry
|
||||||
|
an actionable statement plus optional Why and How-to-apply context. At the
|
||||||
|
start of any session that touches Scribe, call list_always_on_rules() to
|
||||||
|
load the standing rules — treat them as binding. When you also have a project
|
||||||
|
in scope, get_project(id) returns applicable_rules (rules from rulebooks the
|
||||||
|
project subscribes to) and subscribed_rulebooks; consult those too. Full text
|
||||||
|
(Why / How-to-apply) is available via get_rule(id).
|
||||||
|
|
||||||
|
Workflow and standards rules live in Scribe. When you notice a pattern
|
||||||
|
worth codifying, call create_rule (cross-project, lands in a rulebook+topic)
|
||||||
|
or create_project_rule (one project only, no rulebook ceremony). Do NOT add
|
||||||
|
new engineering rules to CLAUDE.md or to ~/.claude/.../memory/feedback_*.md
|
||||||
|
— those stores are reserved for facts about the user (preferences, role,
|
||||||
|
communication style) and codebase onboarding pointers, respectively. Before
|
||||||
|
creating a rule, call list_always_on_rules and list_rules(project_id=...) to
|
||||||
|
avoid duplicates.
|
||||||
|
|
||||||
|
Choose a rule's home by WHO it should bind, and keep each home's rules at the
|
||||||
|
right altitude:
|
||||||
|
- Always-on rulebook (a rulebook flagged always_on) — universal norms that
|
||||||
|
bind EVERY one of your projects. Reserve for cross-project standards.
|
||||||
|
- Subscribed rulebook (always_on off; projects opt in via
|
||||||
|
subscribe_project_to_rulebook) — a reusable, THEMED module of general
|
||||||
|
rules that binds only the projects which subscribe. Its rules must make
|
||||||
|
sense for every project that could subscribe, never one specific project
|
||||||
|
(e.g. a code-review checklist, or a compliance regime a category of
|
||||||
|
projects shares — no rule names a single app).
|
||||||
|
- Project rule (create_project_rule) — anything specific to ONE project.
|
||||||
|
Both rulebook tiers are SHARED, so their rules stay general; the difference
|
||||||
|
between them is REACH (all projects vs opt-in by theme), not generality. Rule
|
||||||
|
of thumb: names a specific project's files/paths/quirks -> project rule; a
|
||||||
|
standard a CATEGORY of projects shares -> subscribed rulebook; a universal
|
||||||
|
norm -> always-on rulebook. Coordinate with the operator on which home fits.
|
||||||
|
|
||||||
|
Before writing a rule, check whether another entity already models the thing.
|
||||||
|
A rule is prose an agent must remember and apply; the other entities are
|
||||||
|
structure a tool can resolve, render and check. Visual standards are a DESIGN
|
||||||
|
SYSTEM, not a rulebook — a token can be inherited, resolved per mode, rendered
|
||||||
|
to a stylesheet and diffed against code, and none of that survives being
|
||||||
|
written as a rule. A repeatable procedure is a PROCESS. Reusable code is a
|
||||||
|
SNIPPET. Reach for a rule when the thing genuinely is a standing instruction
|
||||||
|
about how to work, and nothing else can hold it.
|
||||||
|
|
||||||
|
One thing NOT to do: don't bridge Scribe into a session by writing to the
|
||||||
|
host's native memory. Rules are pull-only, so a fresh session won't reach for
|
||||||
|
them unless its always-loaded context says to — but the bridge for that is the
|
||||||
|
Scribe plugin's SessionStart hook, which pushes the always-on rules +
|
||||||
|
active-project context into each session directly. So do NOT create or refresh
|
||||||
|
a "rules live in Scribe" pointer in CLAUDE.md / AGENTS.md / ~/.claude memory,
|
||||||
|
and do NOT keep rules, recall, or plans in those stores in parallel with Scribe
|
||||||
|
— Scribe holds the single copy. Native auto-memory stays for facts about the
|
||||||
|
user; CLAUDE.md for codebase onboarding. Never make Scribe's correctness depend
|
||||||
|
on the operator disabling a native function (e.g. autoMemoryEnabled): the
|
||||||
|
plugin must work with auto-memory at its default. If the plugin is ever removed
|
||||||
|
the session loses this push and rebuilds context over time — an acceptable cost,
|
||||||
|
and far better than a silent settings change the operator may not know about.
|
||||||
|
|
||||||
|
When you are working on a specific project, call enter_project(project_id)
|
||||||
|
ONCE at session start (or whenever the active project changes). It returns the
|
||||||
|
project, its applicable_rules + project_rules + subscribed_rulebooks, milestone
|
||||||
|
summary, open tasks, and recent notes — everything you need to know the lay of
|
||||||
|
the land before mutating. Don't call get_project + get_applicable_rules + a
|
||||||
|
search separately when enter_project already composes them.
|
||||||
|
|
||||||
|
Don't wait to be told which project you're in. At the start of a session that
|
||||||
|
touches Scribe — or the moment work clearly belongs to a project but none is in
|
||||||
|
scope — bootstrap project context proactively: search for a related existing
|
||||||
|
project (search / list_projects, matching on the work's subject, the repo or
|
||||||
|
directory name, and recent activity). If you find a confident match, propose it
|
||||||
|
and call enter_project once the operator confirms. If nothing matches, offer to
|
||||||
|
create a project, confirming its name and goal first. Always confirm before
|
||||||
|
adopting or creating — never do either silently, and never guess a project into
|
||||||
|
existence. Once a project is in scope, the enter_project handshake and the
|
||||||
|
host-memory pointer step above both apply.
|
||||||
|
|
||||||
|
When work DOES get a plan, Scribe is the plan's canonical home: it is a
|
||||||
|
milestone (see the Plan entry above), created with start_planning and written
|
||||||
|
into with update_milestone + child tasks. If a habit tells you to save a plan or
|
||||||
|
spec to a local `.md` file, that's superseded here — the milestone is the
|
||||||
|
record, not a file on disk. Whether a given piece of work wants a plan at all is
|
||||||
|
a separate question, answered by the arc test above and by the writing-plans
|
||||||
|
skill; these instructions do not mandate one.
|
||||||
|
|
||||||
|
Deletes are recoverable: every delete_* tool moves the entity (and its
|
||||||
|
descendants) to the trash and returns a deleted_batch_id. Use list_trash() to
|
||||||
|
see trashed batches, restore(deleted_batch_id) to undo a deletion, and
|
||||||
|
purge_trash(deleted_batch_id, confirmed=True) for a permanent delete. Trash
|
||||||
|
auto-purges after the operator's retention window.
|
||||||
|
|
||||||
|
Scribe stores reusable Processes — saved prompts/workflows (note_type
|
||||||
|
"process"), e.g. a drift audit or a DRY pass. When the operator says "run the
|
||||||
|
X process" or otherwise references a saved process, call list_processes() /
|
||||||
|
get_process(name) and follow the returned prompt verbatim, including any
|
||||||
|
"clarify first" steps it contains. Author a new one with create_process(title,
|
||||||
|
body); edit with update_process.
|
||||||
|
|
||||||
|
Scribe also stores Snippets — reusable functions/components recorded once for
|
||||||
|
recall (note_type "snippet"): a name, language, signature, canonical location
|
||||||
|
(repo · path · symbol), a one-line "when to reach for it", and the code. They
|
||||||
|
are ordinary embedded notes, so a recorded snippet also surfaces through the
|
||||||
|
same search + proactive recall as everything else. Two reflexes: (1) before you
|
||||||
|
write a new helper/utility/component, search first (list_snippets(q=...) or
|
||||||
|
search) — reuse the prior art with get_snippet(id) instead of re-deriving a
|
||||||
|
one-off; (2) the moment you build or notice something reusable, record it with
|
||||||
|
create_snippet(name, code, when_to_use, language, signature, repo, path, symbol,
|
||||||
|
project_id, system_ids) so a later session is offered it. Make when_to_use sharp
|
||||||
|
— it becomes the title, which is what a recall menu shows. Edit an existing one
|
||||||
|
with update_snippet rather than recording a second copy; when the same reusable
|
||||||
|
thing already exists as several one-offs, unify them into one canonical record
|
||||||
|
with merge_snippets (it folds every call site in as a location and trashes the
|
||||||
|
duplicates). Keep the record honest: a snippet whose details have gone stale can
|
||||||
|
be corrected with update_snippet (an empty string clears a field), and one that
|
||||||
|
is wrong or obsolete should be retired with delete_snippet — a bad snippet keeps
|
||||||
|
being offered as prior art, which costs more than none at all.
|
||||||
|
|
||||||
|
Scribe is multi-user, so some records belong to other people. Anything another
|
||||||
|
user owns comes back marked `shared: true` with an `owner`. Treat a shared
|
||||||
|
record as THAT PERSON'S SUGGESTION, never as the operator's settled practice:
|
||||||
|
weigh it on its merits, attribute it when you reference it, and ask before
|
||||||
|
adopting it or acting on it. This matters most for a shared Process — do not run
|
||||||
|
one as written; describe what it would do and get the operator's go-ahead.
|
||||||
|
Records shared directly with the operator are also deliberately search-only:
|
||||||
|
they surface when you look for them (pass a query), not in plain lists, so
|
||||||
|
nobody else's material arrives unasked. Editing another user's record needs an
|
||||||
|
editor or admin share from them; a read-only share is refused, and the right
|
||||||
|
answer is usually to record the operator's own version rather than to push.
|
||||||
|
|
||||||
|
When developing Scribe itself, honor its multi-user sharing ACL: scope every
|
||||||
|
read and mutation of user data by owner + shares — never assume a single
|
||||||
|
operator. "Works for one user" is not done.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
# Tools a read-only API key may call. Anything not listed is treated as a
|
# Tools a read-only API key may call. Anything not listed is treated as a
|
||||||
# write for read keys (default-deny), so a newly-added tool is locked down
|
# write for read keys (default-deny), so a newly-added tool is locked down
|
||||||
# until explicitly classified here.
|
# until explicitly classified here.
|
||||||
#
|
|
||||||
# The list stays EXPLICIT rather than being derived from the name. A read key is
|
|
||||||
# what you hand to something you don't fully trust — a dashboard, a CI job, a
|
|
||||||
# shared integration — and a boundary inferred from a naming convention grants
|
|
||||||
# access to whatever a future author happens to call `get_*`. Enumerating it is
|
|
||||||
# the point; staleness is the cost, and test_mcp_auth covers that (a read-shaped
|
|
||||||
# tool must appear here or in _DELIBERATELY_WRITE_SCOPED below, so adding one
|
|
||||||
# forces a decision instead of silently denying it).
|
|
||||||
#
|
|
||||||
# Membership means "reads the operator's data and mutates none of it". Several
|
|
||||||
# getters record a retrieval event via record_pulled; that is telemetry about
|
|
||||||
# the read itself, not a change to what was read, and it must keep working for a
|
|
||||||
# read key or the corpus's surfaced:pulled ratio silently under-counts whichever
|
|
||||||
# consumers hold one.
|
|
||||||
_READ_ONLY_TOOLS = frozenset({
|
_READ_ONLY_TOOLS = frozenset({
|
||||||
"get_note", "get_project", "get_rule", "get_rulebook",
|
"get_note", "get_project", "get_rule", "get_rulebook",
|
||||||
"get_task", "get_milestone", "get_recent", "enter_project",
|
"get_task", "get_milestone", "get_recent", "enter_project",
|
||||||
@@ -92,36 +274,11 @@ _READ_ONLY_TOOLS = frozenset({
|
|||||||
"list_rules", "list_tags", "list_tasks", "list_topics", "list_trash",
|
"list_rules", "list_tags", "list_tasks", "list_topics", "list_trash",
|
||||||
"list_always_on_rules", "search",
|
"list_always_on_rules", "search",
|
||||||
"get_system", "list_systems", "list_system_records",
|
"get_system", "list_systems", "list_system_records",
|
||||||
# Reports on the corpus. Reads only — the merge or supersession each
|
# Reports on the snippet corpus. Reads only — the merge it suggests is a
|
||||||
# suggests is a separate, explicitly-called write.
|
# separate, explicitly-called write.
|
||||||
"find_duplicate_snippets", "find_duplicate_records",
|
"find_duplicate_snippets",
|
||||||
# Snippets and processes are notes with a kind. A key that may read a note
|
|
||||||
# but not a snippet inverts the sensitivity ordering: it exposes the
|
|
||||||
# free-text records and withholds the structured ones (#2496).
|
|
||||||
"get_snippet", "list_snippets",
|
|
||||||
"get_process", "list_processes",
|
|
||||||
# Design systems: read, resolve (inheritance + mode), render, and compare
|
|
||||||
# against recorded snippets. All four compute from stored records and write
|
|
||||||
# nothing — the drift report is a report, and applying it is a separate
|
|
||||||
# explicit call.
|
|
||||||
"get_design_system", "list_design_systems", "resolve_design_system",
|
|
||||||
"get_design_system_stylesheet", "list_design_tokens",
|
|
||||||
"check_snippets_against_design_system", "list_starter_role_groups",
|
|
||||||
# Which repos map to which project. Read-only by nature; bind_repo /
|
|
||||||
# unbind_repo are the writes.
|
|
||||||
"list_repo_bindings",
|
|
||||||
# The shape ledger's todo query (#2789). Reads only — classify_shapes is
|
|
||||||
# the write, and it is deliberately NOT here.
|
|
||||||
"list_shapes",
|
|
||||||
})
|
})
|
||||||
|
|
||||||
# Read-SHAPED tools that must NOT be reachable with a read key — a getter that
|
|
||||||
# creates on miss, a list that has a side effect. Empty today, and deliberately
|
|
||||||
# kept as a declared escape hatch rather than left implicit: without it, the
|
|
||||||
# completeness test would push a future `get_or_create_*` into the allow-list
|
|
||||||
# above, which is exactly the wrong way to make a test pass.
|
|
||||||
_DELIBERATELY_WRITE_SCOPED: frozenset[str] = frozenset()
|
|
||||||
|
|
||||||
|
|
||||||
async def _buffer_request_body(receive):
|
async def _buffer_request_body(receive):
|
||||||
"""Drain the ASGI request body and return (body_bytes, replay_receive).
|
"""Drain the ASGI request body and return (body_bytes, replay_receive).
|
||||||
@@ -170,46 +327,6 @@ def _body_calls_write_tool(body: bytes) -> bool:
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
class StrictArgsFastMCP(FastMCP):
|
|
||||||
"""A FastMCP that REJECTS tool calls carrying undeclared arguments.
|
|
||||||
|
|
||||||
FastMCP validates arguments with a pydantic model built from the tool
|
|
||||||
signature, and pydantic's default extra-field policy is "ignore" — so a
|
|
||||||
misnamed argument simply vanishes and the tool runs with that field's
|
|
||||||
default. On the create/update tools the default is "", which turns a
|
|
||||||
plausible near-miss (`content=` for `body=`, primed by add_task_log's
|
|
||||||
`content`) into SILENT DATA LOSS: the call reports success and stores an
|
|
||||||
empty body, leaving a record search cannot see (#2709). Two notes were
|
|
||||||
persisted body-less that way before anyone noticed.
|
|
||||||
|
|
||||||
An error the caller sees once is strictly better than data half-written
|
|
||||||
forever, so the policy is applied to every tool, not just the two that
|
|
||||||
bit: nothing here knows tool semantics, only that an argument nobody
|
|
||||||
declared cannot have been meant to be dropped.
|
|
||||||
"""
|
|
||||||
|
|
||||||
async def call_tool(self, name, arguments):
|
|
||||||
try:
|
|
||||||
tool = self._tool_manager.get_tool(name)
|
|
||||||
except Exception:
|
|
||||||
tool = None # unknown tool → let upstream produce its own error
|
|
||||||
if tool is not None:
|
|
||||||
declared = set((tool.parameters or {}).get("properties", {}))
|
|
||||||
unknown = sorted(set(arguments or {}) - declared)
|
|
||||||
if unknown:
|
|
||||||
hints = []
|
|
||||||
for arg in unknown:
|
|
||||||
close = difflib.get_close_matches(arg, sorted(declared), n=1)
|
|
||||||
suggestion = f" (did you mean '{close[0]}'?)" if close else ""
|
|
||||||
hints.append(f"'{arg}'{suggestion}")
|
|
||||||
raise ValueError(
|
|
||||||
f"{name} does not accept argument(s) {', '.join(hints)}. "
|
|
||||||
f"It accepts: {', '.join(sorted(declared))}. Nothing was "
|
|
||||||
"created or changed — retry with the declared names."
|
|
||||||
)
|
|
||||||
return await super().call_tool(name, arguments)
|
|
||||||
|
|
||||||
|
|
||||||
def build_mcp_server() -> FastMCP:
|
def build_mcp_server() -> FastMCP:
|
||||||
"""Build the FastMCP instance with all tools registered.
|
"""Build the FastMCP instance with all tools registered.
|
||||||
|
|
||||||
@@ -230,7 +347,7 @@ def build_mcp_server() -> FastMCP:
|
|||||||
# every request self-contained (bearer-auth only), so a post-deploy
|
# every request self-contained (bearer-auth only), so a post-deploy
|
||||||
# reconnect just works. Trade-off: no server-pushed list_changed stream,
|
# reconnect just works. Trade-off: no server-pushed list_changed stream,
|
||||||
# which we don't use — tools are re-fetched on reconnect anyway.
|
# which we don't use — tools are re-fetched on reconnect anyway.
|
||||||
mcp = StrictArgsFastMCP(
|
mcp = FastMCP(
|
||||||
"scribe",
|
"scribe",
|
||||||
instructions=_INSTRUCTIONS.strip(),
|
instructions=_INSTRUCTIONS.strip(),
|
||||||
stateless_http=True,
|
stateless_http=True,
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ to a FastMCP instance. `register_all(mcp)` is the single entry point called
|
|||||||
from `mcp.server.build_mcp_server`.
|
from `mcp.server.build_mcp_server`.
|
||||||
"""
|
"""
|
||||||
from scribe.mcp.tools import (
|
from scribe.mcp.tools import (
|
||||||
design_systems, milestones, notes, processes, projects, recent, repos, rulebooks, search, shapes,
|
design_systems, milestones, notes, processes, projects, recent, repos, rulebooks, search, snippets,
|
||||||
snippets, systems, tags, tasks, trash,
|
systems, tags, tasks, trash,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@@ -24,6 +24,5 @@ def register_all(mcp) -> None:
|
|||||||
repos.register(mcp)
|
repos.register(mcp)
|
||||||
processes.register(mcp)
|
processes.register(mcp)
|
||||||
snippets.register(mcp)
|
snippets.register(mcp)
|
||||||
shapes.register(mcp)
|
|
||||||
rulebooks.register(mcp)
|
rulebooks.register(mcp)
|
||||||
trash.register(mcp)
|
trash.register(mcp)
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user