@opencode/ui 2.0.25 → 2.0.27

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opencode/ui",
3
- "version": "2.0.25",
3
+ "version": "2.0.27",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -195,6 +195,7 @@
195
195
  },
196
196
  "./styles": "./src/styles/index.css",
197
197
  "./styles/tokens": "./src/styles/tokens/index.css",
198
+ "./styles/tokens/*": "./src/styles/tokens/*",
198
199
  "./styles/tailwind": "./src/styles/tailwind/index.css",
199
200
  "./theme": {
200
201
  "types": "./dist/theme/index.d.ts",
@@ -3,10 +3,10 @@ import { Marked } from "marked"
3
3
  export function createMarkdownBase() {
4
4
  return new Marked({
5
5
  renderer: {
6
- link({ href, title, text }) {
6
+ link({ href, title, tokens }) {
7
7
  const titleAttr = title ? ` title="${title}"` : ""
8
8
 
9
- return `<a href="${href}"${titleAttr} class="external-link" target="_blank" rel="noopener noreferrer">${text}</a>`
9
+ return `<a href="${href}"${titleAttr} class="external-link" target="_blank" rel="noopener noreferrer">${this.parser.parseInline(tokens)}</a>`
10
10
  },
11
11
  },
12
12
  })
@@ -52,7 +52,7 @@ export const additionalIcons = {
52
52
  "magnifying-glass-menu": `<path d="M2.08325 10.0002H4.58325M2.08325 5.41683H5.41659M2.08325 14.5835H5.41659M16.4583 13.9585L18.7499 16.2502M17.9166 10.0002C17.9166 12.9917 15.4915 15.4168 12.4999 15.4168C9.50838 15.4168 7.08325 12.9917 7.08325 10.0002C7.08325 7.00862 9.50838 4.5835 12.4999 4.5835C15.4915 4.5835 17.9166 7.00862 17.9166 10.0002Z" stroke="currentColor" stroke-linecap="square"/>`,
53
53
  "window-cursor": `<path d="M17.5 10.4167V3.75H2.5V17.0833H10.4166M17.9166 13.5897L11.6666 11.6667L13.5897 17.9167L15.032 15.0321L17.9166 13.5897Z" stroke="currentColor" stroke-linecap="square"/><path d="M5.41675 6.125C5.71576 6.12518 5.95777 6.36795 5.95777 6.66699C5.95759 6.96589 5.71565 7.20783 5.41675 7.20801C5.11771 7.20801 4.87494 6.966 4.87476 6.66699C4.87476 6.36784 5.1176 6.125 5.41675 6.125ZM8.33276 6.125C8.63191 6.125 8.87476 6.36784 8.87476 6.66699C8.87458 6.966 8.63181 7.20801 8.33276 7.20801C8.03386 7.20783 7.79192 6.96589 7.79175 6.66699C7.79175 6.36795 8.03376 6.12518 8.33276 6.125ZM11.2498 6.125C11.5489 6.125 11.7917 6.36784 11.7917 6.66699C11.7916 6.966 11.5488 7.20801 11.2498 7.20801C10.9507 7.20801 10.7079 6.966 10.7078 6.66699C10.7078 6.36784 10.9506 6.125 11.2498 6.125Z" fill="currentColor" stroke="currentColor" stroke-width="0.25" stroke-linecap="square"/>`,
54
54
  task: `<path d="M9.99992 2.0835V17.9168M7.08325 3.75016H2.08325V16.2502H7.08325M12.9166 16.2502H17.9166V3.75016H12.9166" stroke="currentColor" stroke-linecap="square"/>`,
55
- subagent: `<path d="M4.5 5C4.5 4.72386 4.72386 4.5 5 4.5H11C11.2761 4.5 11.5 4.72386 11.5 5V11C11.5 11.2761 11.2761 11.5 11 11.5H5C4.72386 11.5 4.5 11.2761 4.5 11V5Z" fill="currentColor"/><path d="M13.5 2C13.7761 2 14 2.22386 14 2.5V13.5C14 13.7761 13.7761 14 13.5 14H2.5C2.22386 14 2 13.7761 2 13.5V2.5C2 2.22386 2.22386 2 2.5 2H13.5ZM3 13H13V3H3V13Z" fill="currentColor"/>`,
55
+ subagent: `<path d="M4 4.5C4 4.22386 4.22386 4 4.5 4H11.5C11.7761 4 12 4.22386 12 4.5V11.5C12 11.7761 11.7761 12 11.5 12H4.5C4.22386 12 4 11.7761 4 11.5V4.5Z" fill="currentColor"/><path d="M14.5 1C14.7761 1 15 1.22386 15 1.5V14.5C15 14.7761 14.7761 15 14.5 15H1.5C1.22386 15 1 14.7761 1 14.5V1.5C1 1.22386 1.22386 1 1.5 1H14.5ZM2 14H14V2H2V14Z" fill="currentColor"/>`,
56
56
  stop: `<rect x="5" y="5" width="10" height="10" fill="currentColor"/>`,
57
57
  status: `<path d="M2 10V18H18V10M2 10V2H18V10M2 10H18M5 6H9M5 14H9" stroke="currentColor"/>`,
58
58
  "status-active": `<path d="M18 2H2V10H18V2Z" fill="currentColor" fill-opacity="0.1"/>
@@ -23,6 +23,7 @@
23
23
  5. Use the user's configured `sans` font-feature-settings by default.
24
24
  6. Use the user's configured `sans` font-variation-settings by default.
25
25
  7. Disable tap highlights on iOS.
26
+ 8. Avoid one-word last lines in all wrapped text. Chromium keeps the line count, so heights do not change.
26
27
  */
27
28
 
28
29
  html,
@@ -34,6 +35,7 @@ html,
34
35
  font-feature-settings: var(--font-family-sans--font-feature-settings, normal); /* 5 */
35
36
  font-variation-settings: var(--font-family-sans--font-variation-settings, normal); /* 6 */
36
37
  -webkit-tap-highlight-color: transparent; /* 7 */
38
+ text-wrap-style: pretty; /* 8 */
37
39
  }
38
40
 
39
41
  /*
@@ -111,6 +113,7 @@ strong {
111
113
  2. Use the user's configured `mono` font-feature-settings by default.
112
114
  3. Use the user's configured `mono` font-variation-settings by default.
113
115
  4. Correct the odd `em` font sizing in all browsers.
116
+ 5. Keep code wrapping greedy so wrapped lines break where an editor would.
114
117
  */
115
118
 
116
119
  code,
@@ -121,6 +124,17 @@ pre {
121
124
  font-feature-settings: var(--font-family-mono--font-feature-settings, normal); /* 2 */
122
125
  font-variation-settings: var(--font-family-mono--font-variation-settings, normal); /* 3 */
123
126
  font-size: 1em; /* 4 */
127
+ text-wrap-style: auto; /* 5 */
128
+ }
129
+
130
+ /*
131
+ Keep earlier lines still while the user types.
132
+ */
133
+
134
+ input,
135
+ textarea,
136
+ [contenteditable] {
137
+ text-wrap-style: stable;
124
138
  }
125
139
 
126
140
  /*
@@ -49,6 +49,9 @@
49
49
  --container-5xl: 64rem;
50
50
  --container-6xl: 72rem;
51
51
  --container-7xl: 80rem;
52
+ /* Shared by the session timeline, composer dock, and drop target so their edges stay aligned.
53
+ The composer dock's 12px gutter leaves the design's 720px composer. */
54
+ --container-session: 744px;
52
55
 
53
56
  --font-sans: var(--font-family-sans);
54
57
  --font-sans--font-feature-settings: var(--font-family-sans--font-feature-settings);