@entropicwarrior/sdoc 0.1.12 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -102,7 +102,8 @@ Annotate text with semantic meaning that renders as colored highlights:
102
102
  |---|---|---|
103
103
  | `{+text+}` | Positive | Green |
104
104
  | `{=text=}` | Neutral | Blue |
105
- | `{^text^}` | Caution | Amber |
105
+ | `{^text^}` | Note | Amber |
106
+ | `{?text?}` | Caution | Dark amber |
106
107
  | `{!text!}` | Warning | Orange |
107
108
  | `{-text-}` | Negative | Red |
108
109
  | `{~text~}` | Highlight | Yellow |
@@ -181,7 +181,8 @@
181
181
  \`\$\$E = mc^2\$\$\` | Display math (centered)
182
182
  \`\{+text+\}\` | Positive marker (green)
183
183
  \`\{=text=\}\` | Neutral marker (blue)
184
- \`\{^text^\}\` | Caution marker (amber)
184
+ \`\{^text^\}\` | Note marker (amber)
185
+ \`\{?text?\}\` | Caution marker (dark amber)
185
186
  \`\{!text!\}\` | Warning marker (orange)
186
187
  \`\{-text-\}\` | Negative marker (red)
187
188
  \`\{~text~\}\` | Highlight (yellow)
@@ -454,7 +454,8 @@ Content of Section B.
454
454
  - Display math: `$$E = mc^2$$` (centered block)
455
455
  - Positive marker: `{+text+}` (green highlight)
456
456
  - Neutral marker: `{=text=}` (blue highlight)
457
- - Caution marker: `{^text^}` (amber highlight)
457
+ - Note marker: `{^text^}` (amber highlight)
458
+ - Caution marker: `{?text?}` (dark amber highlight)
458
459
  - Warning marker: `{!text!}` (orange highlight)
459
460
  - Negative marker: `{-text-}` (red highlight)
460
461
  - Highlight: `{~text~}` (yellow highlight)
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@entropicwarrior/sdoc",
3
3
  "displayName": "SDOC",
4
4
  "description": "A plain-text documentation format with explicit brace scoping — deterministic parsing, AI-agent efficiency, and 10-50x token savings vs Markdown.",
5
- "version": "0.1.12",
5
+ "version": "0.1.13",
6
6
  "publisher": "entropicwarrior",
7
7
  "license": "MIT",
8
8
  "repository": {
@@ -134,6 +134,12 @@
134
134
  "foreground": "#b08a1a"
135
135
  }
136
136
  },
137
+ {
138
+ "scope": "markup.keyword.caution.sdoc",
139
+ "settings": {
140
+ "foreground": "#c06a00"
141
+ }
142
+ },
137
143
  {
138
144
  "scope": "markup.keyword.warning.sdoc",
139
145
  "settings": {
@@ -139,6 +139,7 @@ function flattenInlineNodes(nodes, annotations, href) {
139
139
  break;
140
140
  case "mark_positive":
141
141
  case "mark_neutral":
142
+ case "mark_note":
142
143
  case "mark_caution":
143
144
  case "mark_warning":
144
145
  case "mark_negative":
package/src/sdoc.js CHANGED
@@ -8,7 +8,7 @@ const COMMAND_LIST_NUMBER = "{[#]";
8
8
  const COMMAND_TABLE = "{[table]";
9
9
  const COMMAND_CODE_FENCE = "```";
10
10
 
11
- const ESCAPABLE = new Set(["\\", "{", "}", "@", "[", "]", "(", ")", "*", "`", "#", "!", "~", "<", ">", "$", "+", "=", "-", "^"]);
11
+ const ESCAPABLE = new Set(["\\", "{", "}", "@", "[", "]", "(", ")", "*", "`", "#", "!", "~", "<", ">", "$", "+", "=", "-", "^", "?"]);
12
12
 
13
13
  let _katex = null;
14
14
  let _katexLoaded = false;
@@ -1205,7 +1205,8 @@ function parseInline(text) {
1205
1205
  let mt = null;
1206
1206
  if (mc === "+") mt = "mark_positive";
1207
1207
  else if (mc === "=") mt = "mark_neutral";
1208
- else if (mc === "^") mt = "mark_caution";
1208
+ else if (mc === "^") mt = "mark_note";
1209
+ else if (mc === "?") mt = "mark_caution";
1209
1210
  else if (mc === "!") mt = "mark_warning";
1210
1211
  else if (mc === "-") mt = "mark_negative";
1211
1212
  else if (mc === "~") mt = "mark_highlight";
@@ -1366,6 +1367,8 @@ function renderInlineNodes(nodes) {
1366
1367
  return `<span class="sdoc-mark sdoc-mark-positive">${renderInlineNodes(node.children)}</span>`;
1367
1368
  case "mark_neutral":
1368
1369
  return `<span class="sdoc-mark sdoc-mark-neutral">${renderInlineNodes(node.children)}</span>`;
1370
+ case "mark_note":
1371
+ return `<span class="sdoc-mark sdoc-mark-note">${renderInlineNodes(node.children)}</span>`;
1369
1372
  case "mark_caution":
1370
1373
  return `<span class="sdoc-mark sdoc-mark-caution">${renderInlineNodes(node.children)}</span>`;
1371
1374
  case "mark_warning":
@@ -1929,11 +1932,12 @@ const DEFAULT_STYLE = `
1929
1932
  padding: 0.05em 0.3em;
1930
1933
  font-weight: 500;
1931
1934
  }
1932
- .sdoc-mark-positive { background-color: rgba(34, 139, 34, 0.15); color: #166016; }
1933
- .sdoc-mark-neutral { background-color: rgba(59, 130, 195, 0.15); color: #245d8a; }
1934
- .sdoc-mark-caution { background-color: rgba(200, 150, 30, 0.18); color: #7a5f0e; }
1935
- .sdoc-mark-warning { background-color: rgba(255, 120, 0, 0.18); color: #b35400; }
1936
- .sdoc-mark-negative { background-color: rgba(187, 50, 50, 0.15); color: #911e1e; }
1935
+ .sdoc-mark-positive { background-color: rgba(34, 139, 34, 0.15); color: #166016; }
1936
+ .sdoc-mark-neutral { background-color: rgba(59, 130, 195, 0.15); color: #245d8a; }
1937
+ .sdoc-mark-note { background-color: rgba(190, 170, 0, 0.15); color: #6b5d00; }
1938
+ .sdoc-mark-caution { background-color: rgba(217, 130, 10, 0.18); color: #8a5000; }
1939
+ .sdoc-mark-warning { background-color: rgba(245, 115, 0, 0.20); color: #c05600; }
1940
+ .sdoc-mark-negative { background-color: rgba(210, 25, 25, 0.18); color: #a81414; }
1937
1941
  .sdoc-mark-highlight { background-color: rgba(255, 255, 0, 0.75); }
1938
1942
 
1939
1943
  .sdoc-image {