瀏覽代碼

chore(editor): remove priority code

Zander Hawke 4 天之前
父節點
當前提交
ed981cb1a0

+ 5 - 6
AGENTS.md

@@ -50,7 +50,7 @@ All syntax features flow through a 2-stage pipeline in `packages/editor/src/lib/
 [ParsedDecorations — unified output struct]
 ```
 
-> **Note**: `classifyBlock()` in `block-classifier.ts` is used only by the paste handler (`usePasteHandler.ts`), not by the main decoration engine. Priority detection (`[#A]`, `[#B]`, `[#C]`) was removed from the parser; these are treated as plain text.
+> **Note**: `classifyBlock()` in `block-classifier.ts` is used only by the paste handler (`usePasteHandler.ts`), not by the main decoration engine.
 
 ### Unified Output Contract
 
@@ -75,17 +75,16 @@ Do not change this interface without updating both unit tests and block render c
 
 ## Supported Syntax
 
-### Task States and Priorities
+### Task States
 
 ```
-TODO Fix the critical focus bug [#A]
-└──┘                            └──┘
-status                          priority
+TODO Fix the critical focus bug
+└──┘
+status
 ```
 
 - **Valid states:** `TODO`, `DOING`, `DONE`, `LATER`, `NOW`, `WAITING`, `CANCELLED`
 - **State progression:** `TODO → DOING → DONE` (linear). `LATER`, `NOW`, `WAITING`, `CANCELLED` are orthogonal.
-- **Valid priorities:** `[#A]`, `[#B]`, `[#C]` — independent of task state. Priority tokens are **plain text** in the parser; they are not extracted as decorations.
 
 ### Obsidian-Style Elements
 

+ 1 - 1
apps/dev/README.md

@@ -19,7 +19,7 @@ Opens at `http://localhost:5173`.
 | Overview | `/` | Key concepts, Block + Editor API tables (props + events) |
 | Basic Editing | `/basic-editing` | Headings `#`–`######`, paragraphs, horizontal rules |
 | Inline Marks | `/inline-marks` | Bold, italic, inline code, strikethrough, highlight, combined marks |
-| Tasks & Priorities | `/tasks` | Task states (TODO→DONE cycle), priority flags `[#A]` |
+| Tasks | `/tasks` | Task states (TODO→DONE cycle) |
 | Blockquotes & Callouts | `/blockquotes` | Blockquote `>`, 5 callout types (NOTE, WARNING, TIP, DANGER, INFO) |
 | Links | `/links` | Standard markdown `[text](url)` links |
 | Page Refs & Tags | `/refs-tags` | Page refs `[[Page]]`, block refs `((id))`, tags `#tag` |

+ 1 - 1
packages/editor/README.md

@@ -177,7 +177,7 @@ Formatting is purely decorative — markdown syntax is stored as plain text in P
 | Fenced Code Block | `` ```python `` / `~~~js` | CM6 node view |
 | Highlight | `^^text^^` | `md-highlight` |
 
-> **Priority flags** (`[#A]`, `[#B]`, `[#C]`) were removed from the parser — they render as plain text. Styling classes remain for backward compatibility.
+
 
 ### Table Rendering
 

+ 0 - 20
packages/editor/src/assets/style.css

@@ -170,26 +170,6 @@
   @apply text-gray-500/40 line-through;
 }
 
-/* ── Priority ────────────────────────────────────────────────────── */
-
-.md-priority-marker {
-  @apply text-[0.8em] px-1 rounded-sm select-none;
-  color: color-mix(in srgb, currentColor 55%, transparent);
-}
-.md-priority-content {
-  @apply text-(--ui-text-muted);
-}
-
-[data-priority="A"] {
-  @apply text-red-500;
-}
-[data-priority="B"] {
-  @apply text-orange-500;
-}
-[data-priority="C"] {
-  @apply text-(--ui-text-muted);
-}
-
 /* ── Blockquote && Callouts ──────────────────────────────────────── */
 .md-blockquote .md-marker,
 .md-callout .md-marker {

+ 0 - 2
packages/editor/src/lib/markdown-parser.ts

@@ -18,7 +18,6 @@ import {
   MarkdownRuleEngine,
   type PageRefDecoration,
   type ParsedDecorations,
-  type PriorityLevel,
   type PropertyInfo,
   type TagDecoration,
   type TaskState,
@@ -34,7 +33,6 @@ export type {
   InlineMathDecoration,
   PageRefDecoration,
   ParsedDecorations,
-  PriorityLevel,
   PropertyInfo,
   TagDecoration,
   TaskState,

+ 0 - 1
packages/editor/src/lib/markdown-rules/index.ts

@@ -40,7 +40,6 @@ export type {
   ParseContext,
   ParsedDecorations,
   ParsedToken,
-  PriorityLevel,
   PropertyInfo,
   TagDecoration,
   TaskState,

+ 0 - 2
packages/editor/src/lib/markdown-rules/types.ts

@@ -81,7 +81,6 @@ export type TaskState =
   | "WAITING"
   | "CANCELLED"
 
-export type PriorityLevel = "A" | "B" | "C"
 export type CalloutType = "NOTE" | "WARNING" | "TIP" | "DANGER" | "INFO"
 
 export interface BlockDecoration extends ParsedToken {
@@ -95,7 +94,6 @@ export interface BlockDecoration extends ParsedToken {
   metadata?: {
     level?: number
     taskState?: TaskState
-    priority?: PriorityLevel
     calloutType?: CalloutType
   }
 }