@openchamber/sdk 1.23.2-preview.1 → 1.24.0
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/API.md +39 -20
- package/DOCUMENTATION.md +14 -1
- package/README.md +9 -2
- package/dist/contract.d.ts +6 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/protocol.d.ts +5 -0
- package/dist/protocol.js +5 -0
- package/dist/scrollbar-style.d.ts +2 -0
- package/dist/scrollbar-style.js +32 -0
- package/dist/ui/style.js +33 -21
- package/dist/ui/theme.js +10 -0
- package/package.json +2 -2
package/API.md
CHANGED
|
@@ -91,6 +91,10 @@ Each returns an unsubscribe function. Late subscribers get the last known value
|
|
|
91
91
|
| `item` | `GuestItem | null` | Set when the user clicked this guest's chip on the composer, or ran one of this guest's `contributes.actions`. Narrow with `isGuestMessageItem` / `isGuestSessionItem` / `isGuestAttachItem` |
|
|
92
92
|
|
|
93
93
|
|
|
94
|
+
`theme.tokens` includes `primaryText`, `successText`, `warningText`, `errorText`, and `infoText`. The host computes these for text on neutral surfaces and the UI kit's tinted controls. Keep using the base colors for fills and `primaryForeground` for text on a solid primary fill.
|
|
95
|
+
|
|
96
|
+
`applyHostReady` exposes the computed colors as `--primary-text`, `--success-text`, `--warning-text`, `--error-text`, and `--info-text`, with matching `--oc-*-text` aliases. These are required theme fields. Apply each `onReady` snapshot to update them when the theme changes.
|
|
97
|
+
|
|
94
98
|
`GuestItem` is `AttachIssueRequest | GuestMessageItem | GuestSessionItem`:
|
|
95
99
|
|
|
96
100
|
```ts
|
|
@@ -278,14 +282,34 @@ Always call theme first:
|
|
|
278
282
|
```ts
|
|
279
283
|
import { applyHostReady, mountList } from '@openchamber/sdk/ui';
|
|
280
284
|
|
|
285
|
+
let mounted = false;
|
|
281
286
|
host.onReady((ctx) => {
|
|
282
287
|
applyHostReady(ctx, document.documentElement);
|
|
288
|
+
if (mounted) return;
|
|
289
|
+
mounted = true;
|
|
283
290
|
// then mount…
|
|
284
291
|
});
|
|
285
292
|
```
|
|
286
293
|
|
|
287
294
|
Every mount returns `{ update(partial), dispose() }`. `update` merges the fields you pass and repaints; `dispose` removes the node and its listeners.
|
|
288
295
|
|
|
296
|
+
Selection controls report a proposed value; the caller commits it with `update`. Use `activeId` for tabs, `value` for selects, and `checked` for checkboxes and switches. Text and search inputs display typing immediately, but call `update({ value })` too so later updates do not restore stale props. Button clicks do not change `variant`; use tabs for mode selection. Preserve input state across tab changes instead of remounting empty fields.
|
|
297
|
+
|
|
298
|
+
```ts
|
|
299
|
+
import { mountTabs } from '@openchamber/sdk/ui';
|
|
300
|
+
|
|
301
|
+
let activeId = 'convert';
|
|
302
|
+
const tabs = mountTabs(root, {
|
|
303
|
+
items: [{ id: 'convert', label: 'Convert' }, { id: 'format', label: 'Format' }],
|
|
304
|
+
activeId,
|
|
305
|
+
onChange: (next) => {
|
|
306
|
+
activeId = next;
|
|
307
|
+
tabs.update({ activeId });
|
|
308
|
+
// Show the matching panel while preserving its draft values.
|
|
309
|
+
},
|
|
310
|
+
});
|
|
311
|
+
```
|
|
312
|
+
|
|
289
313
|
### 2.1 Theme
|
|
290
314
|
|
|
291
315
|
|
|
@@ -470,25 +494,29 @@ Do not go around the guest contract through `RuntimeAPIs`.
|
|
|
470
494
|
|
|
471
495
|
## 6. Minimal panel sketch
|
|
472
496
|
|
|
497
|
+
Mount once and keep the handles. `onReady` can repeat when the session or theme changes. Field listeners replay their current values too; compare relevant fields before fetching data again. For a complete request example with stale-response handling, see [the extension example](https://docs.openchamber.dev/sdk/example/).
|
|
498
|
+
|
|
473
499
|
```ts
|
|
474
|
-
import { connectHost
|
|
500
|
+
import { connectHost } from '@openchamber/sdk';
|
|
475
501
|
import { applyHostReady, mountList, mountEmpty } from '@openchamber/sdk/ui';
|
|
476
502
|
|
|
477
503
|
const host = connectHost();
|
|
478
504
|
const root = document.querySelector('#root')!;
|
|
479
505
|
|
|
506
|
+
let mounted = false;
|
|
480
507
|
host.onReady((ctx) => {
|
|
481
508
|
applyHostReady(ctx, document.documentElement);
|
|
509
|
+
if (mounted) return;
|
|
510
|
+
mounted = true;
|
|
482
511
|
|
|
483
|
-
|
|
484
|
-
|
|
512
|
+
const signInRoot = root.appendChild(document.createElement('div'));
|
|
513
|
+
const listRoot = root.appendChild(document.createElement('div'));
|
|
514
|
+
mountEmpty(signInRoot, {
|
|
485
515
|
title: 'Connect Acme',
|
|
486
516
|
action: { label: 'Sign in', onClick: () => { void host.oauthStart(); } },
|
|
487
|
-
|
|
488
|
-
return;
|
|
489
|
-
}
|
|
517
|
+
});
|
|
490
518
|
|
|
491
|
-
mountList(
|
|
519
|
+
mountList(listRoot, {
|
|
492
520
|
items: [], // fill from host.request
|
|
493
521
|
onSelect: (id) => {
|
|
494
522
|
void host.attach({
|
|
@@ -499,18 +527,10 @@ host.onReady((ctx) => {
|
|
|
499
527
|
});
|
|
500
528
|
},
|
|
501
529
|
});
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
try {
|
|
507
|
-
const res = await host.request({ method: 'GET', path: '/api/v2/tasks' });
|
|
508
|
-
// parse res.body, then remount / update the list
|
|
509
|
-
} catch (error) {
|
|
510
|
-
if (error instanceof HostRequestError && error.code === 'DISCONNECTED') {
|
|
511
|
-
await host.oauthStart();
|
|
512
|
-
}
|
|
513
|
-
}
|
|
530
|
+
host.onConnection((connection) => {
|
|
531
|
+
signInRoot.hidden = connection.connected;
|
|
532
|
+
listRoot.hidden = !connection.connected;
|
|
533
|
+
});
|
|
514
534
|
});
|
|
515
535
|
```
|
|
516
536
|
|
|
@@ -526,4 +546,3 @@ host.onConnection(async (connection) => {
|
|
|
526
546
|
| [GUEST_SERVICES.md](https://github.com/openchamber/openchamber/blob/main/packages/sdk/GUEST_SERVICES.md) | Local service contract |
|
|
527
547
|
| [src/ui/DOCUMENTATION.md](https://github.com/openchamber/openchamber/blob/main/packages/sdk/src/ui/DOCUMENTATION.md) | UI kit invariants |
|
|
528
548
|
| [sdk.mdx](https://github.com/openchamber/openchamber/blob/main/packages/docs/content/docs/sdk.mdx) / [sdk/host.mdx](https://github.com/openchamber/openchamber/blob/main/packages/docs/content/docs/sdk/host.mdx) / [sdk/ui.mdx](https://github.com/openchamber/openchamber/blob/main/packages/docs/content/docs/sdk/ui.mdx) | Author-facing website pages |
|
|
529
|
-
|
package/DOCUMENTATION.md
CHANGED
|
@@ -28,8 +28,9 @@ Public author pages live in `packages/docs/content/docs/sdk.mdx`, `sdk/host.mdx`
|
|
|
28
28
|
|
|
29
29
|
- Manifest `apiVersion` is `1`. Wire envelope `v` stays `1`. Any other value is `unsupported-api-version`. Optional `engines.openchamber` is `1.22.0` or `>=1.22.0`. Install refuses with `host-too-old` when this OpenChamber build is older. Package installs also need a semver `version` on `package.json` (`1.0.0`); the catalog exposes it and Settings → Extensions shows `v1.0.0` on the card. Already-installed packages without `version` still list; new installs without it fail as `invalid-manifest`.
|
|
30
30
|
- `panel.entry` is optional. `id`, `name`, and `icon` stay required: they identify the extension on the Extensions card and in the approval dialog. A package without `entry` is page-less (`hasGuestPage(contributes)` is `false`): it never mounts an iframe, so parse refuses `attach` (other than `false`), `actions`, `commands`, `service`, `integration`, a non-empty `capabilities`, and `filesystem` as `invalid-panel` (the message names the offending keys and says they need `panel.entry`). `tools`, `engines`, and `version` are all it may carry. Install skips the HTML and built-script checks, the catalog row has no `entry`, the served-file route refuses HTML and JS for that id (its SVG icons still serve), and the UI gives it no rail surface, attach row, action, command, or frame; the Extensions card shows "No panel" after the version. `examples/tools-only` is the reference.
|
|
31
|
-
- Panel `id` is kebab-case. `icon` is a Remixicon kebab-case name (`RiWindowLine` → `window`, `RiGitMergeLine` → `git-merge`) or a package `.svg` path (`icon.svg`). URLs and absolute paths fail parse. `entry` stays inside the package (no `..`, no absolute, no URL). The rail paints a Remixicon from the host sprite, or a `currentColor` mask for a package SVG. Package SVGs often fill the 24×24 viewBox; the rail scales that mask so it matches Remixicon optical size. A Remixicon name the sprite does not carry falls back to `
|
|
31
|
+
- Panel `id` is kebab-case. `icon` is a Remixicon kebab-case name (`RiWindowLine` → `window`, `RiGitMergeLine` → `git-merge`) or a package `.svg` path (`icon.svg`). URLs and absolute paths fail parse. `entry` stays inside the package (no `..`, no absolute, no URL). The rail paints a Remixicon from the host sprite, or a `currentColor` mask for a package SVG. Package SVGs often fill the 24×24 viewBox; the rail scales that mask so it matches Remixicon optical size. A Remixicon name the sprite does not carry falls back to `apps`.
|
|
32
32
|
- Extra manifest keys are dropped, not forwarded.
|
|
33
|
+
- Theme text fields are required on `apiVersion: 1`: `primaryText`, `successText`, `warningText`, `errorText`, `infoText`. Host calculation and UI-kit application are documented in `src/ui/DOCUMENTATION.md`. Keep the wire schema, TypeScript contract and iframe mapping in sync.
|
|
33
34
|
- `connectHost` rejects when `parent === self`. A silent host rejects in-flight RPCs as `HOST_TIMEOUT` after 20s. Dispose rejects the rest as `HOST_UNAVAILABLE`.
|
|
34
35
|
- Failed `result` may carry `code`. Known guest codes are `HOST_UNAVAILABLE`, `HOST_TIMEOUT`, `HOST_REJECTED`, `DISCONNECTED`, `DISABLED`, `BAD_PATH`, `NO_INTEGRATION`, `NO_SESSION`, `SESSION_BUSY`, `NO_SERVICE`, `SERVICE_FAILED`, `NOT_GRANTED`, `NO_DIRECTORY`, `NOT_FOUND`, `FILE_TOO_LARGE`, `DENIED`, `NO_MODEL`, `MODEL_FAILED`. Anything else becomes `HOST_REJECTED`. The `error` string stays.
|
|
35
36
|
- `parseManifest` takes a typed document. File or network bytes go through `parseManifestJson`. Both return a result and do not throw on junk.
|
|
@@ -56,6 +57,18 @@ Public author pages live in `packages/docs/content/docs/sdk.mdx`, `sdk/host.mdx`
|
|
|
56
57
|
|
|
57
58
|
## Host hole
|
|
58
59
|
|
|
60
|
+
Built-in extension source and registration rules live in `packages/extensions/DOCUMENTATION.md`. The server assigns `source: 'bundled'` only from its app-owned registry and automatically grants the package's declared capabilities. Built-ins use the same SDK, sandbox and enabled-state checks as user extensions; the `openchamber-builtin-` namespace is reserved. Their account cards appear under Built-in integrations, and their persisted disabled state and data survive app updates.
|
|
61
|
+
|
|
62
|
+
Relay panels use `lib/guests/relay-document.ts`: fetch package HTML and its statically referenced scripts, styles, CSS imports/URLs, images, fonts, and nested documents through `runtimeFetch`, then render self-contained `srcDoc` with the same `sandbox="allow-scripts"`. A normal iframe URL bypasses the client-side tunnel and can load the local host UI instead. Local resource paths stay under that guest's package; missing files, import cycles, or resource limits fail the load. The loader allows 500 referenced files, 40 MiB of fetched bytes and 64 MiB of embedded text. Runtime-created relative URLs are not intercepted: bundle those assets into the IIFE or use explicit external URLs/SDK operations. Existing authored CSP is preserved. Direct iframe URLs retain their existing path.
|
|
63
|
+
|
|
64
|
+
`useGuestIconSource` loads package SVGs through authenticated `runtimeFetch` in direct and relay modes, then exposes revocable blob URLs to CSS masks. It uses the package path rather than the original URL token, so cold-start token readiness and token expiry cannot strand an icon. Cache identity follows runtime, package path and extension version; late responses are discarded and old blobs revoked. Unknown icons and SVGs that are loading or failed use the shared `FALLBACK_GUEST_ICON`, the `apps` glyph.
|
|
65
|
+
|
|
66
|
+
Git installation accepts HTTPS, `ssh://` and scp-style SSH addresses. `POST /api/guests` accepts optional `gitIdentityId`; the server stores only that ID in the git origin, and resolves the profile again for clones and update fetches. Global/omitted identity uses the server process's Git/SSH configuration and agent. The Settings picker loads identities from the active runtime, discards stale loads, and never reuses a desktop's cached profiles on a remote server. SSH parsing, public-host validation and pinned connection options belong to `packages/web/server/lib/guests/clone.js`.
|
|
67
|
+
|
|
68
|
+
Catalog loading and installation retain typed request diagnostics in `lib/guests/request-failure.ts`: fixed API route, method, HTTP status, or a transport/invalid-response classification. Settings shows catalog diagnostics and passes install diagnostics to the toast description so Copy includes them. Response bodies, headers, credentials, and arbitrary transport error messages are excluded. Catalog failures preserve a previously loaded list; diagnostics clear on success or runtime switch, and late failures from a retired runtime are ignored.
|
|
69
|
+
|
|
70
|
+
`lib/guests/useGuestFrameUrl.ts` owns iframe URL lifetime. It retains the scoped token's expiry, renews on an expired navigation, and remints after enable/version/runtime changes. Expiry alone never reloads a healthy document. Recovery is bounded until the guest's next `hello`; mint failure leaves the existing load-failed UI rather than mounting an unauthenticated URL. Late mint responses from a retired owner are discarded. Guest capability grants and provider OAuth are separate from this host file-loading authorization.
|
|
71
|
+
|
|
59
72
|
`GET /api/guests` plus `PluginPane` on the desktop/web rail. The iframe URL carries a token minted for `guest:<id>` scope (`resolveGuestFrameUrl`), valid only for `GET /api/guests/<id>/*`; the session-wide URL token never enters a guest frame. Settings → Extensions installs a folder, a local `.zip`, or an https git / zip URL into that OpenChamber instance's data dir (`extensions.json`). Settings → Integrations shows a host card for each installed guest that declared `integration`. OAuth and pasted tokens live in `guest-auth.json`. Host Linear uses `linear-auth.json`. VS Code and mobile set the catalog to `unsupported`. That is not an empty success. A guest must ship a classic IIFE (`panel/main.js`). No runtime compiles guest TypeScript. The iframe cannot load ESM.
|
|
60
73
|
|
|
61
74
|
**Folder install** stores the realpath in `extensions.json` with `source: "path"`. Uninstall drops the catalog row and extension-owned storage. The user's folder stays.
|
package/README.md
CHANGED
|
@@ -42,10 +42,12 @@ bunx openchamber-guest-bundle panel/main.ts panel/main.js
|
|
|
42
42
|
|
|
43
43
|
Then install the folder from Settings → Extensions → Add. Folder installs run from your folder, so edit, rebuild, and reload. A `.zip` or an https git or zip link is copied into OpenChamber's data folder instead; ship the built files only. Git installs can update from Settings → Extensions when the repository's `version` is newer than the installed one, so bump `version` to ship an update; `https://…/panel.git#v1` pins a tag or branch.
|
|
44
44
|
|
|
45
|
-
A complete three-file example is on the [Build an extension](https://openchamber.dev/docs/sdk/) page.
|
|
45
|
+
A complete three-file example is on the [Build an extension](https://openchamber.dev/docs/sdk/) page. Six examples are at [github.com/openchamber/openchamber/tree/main/packages/sdk/examples](https://github.com/openchamber/openchamber/tree/main/packages/sdk/examples).
|
|
46
46
|
|
|
47
47
|
## Manifest
|
|
48
48
|
|
|
49
|
+
Git installs also accept SSH addresses such as `git@github.com:owner/extension.git` and `ssh://git@github.com/owner/extension.git`. The fingerprint menu in Settings → Extensions selects Global Identity or a Git identity on the active server. That identity is reused for update checks and updates. On a remote instance, SSH keys and any unlocked SSH agent must be available to the server process, not just your desktop. See [Extensions](https://docs.openchamber.dev/extensions/) for details.
|
|
50
|
+
|
|
49
51
|
```json
|
|
50
52
|
{
|
|
51
53
|
"name": "@acme/hello",
|
|
@@ -160,13 +162,16 @@ Every method, its limits, and the error codes are on the [Host API](https://open
|
|
|
160
162
|
|
|
161
163
|
## UI kit
|
|
162
164
|
|
|
163
|
-
`@openchamber/sdk/ui` has buttons, fields, a searchable dropdown, checkboxes, tabs, badges, lists, empty states, spinners, banners, separators, progress bars, menus, and safe text, all drawn with the app's colours and fonts.
|
|
165
|
+
`@openchamber/sdk/ui` has buttons, fields, a searchable dropdown, checkboxes, tabs, badges, lists, empty states, spinners, banners, separators, progress bars, menus, and safe text, all drawn with the app's colours and fonts. Apply `applyHostReady` on every `onReady`, but mount controls and register listeners once. Repeated snapshots must not erase inputs or drafts. Every mount returns `{ update, dispose }`. Use `update` to pass changed values back to controls, including `tabs.update({ activeId })` and `select.update({ value })` inside `onChange`. See the [UI kit examples](https://docs.openchamber.dev/sdk/ui/) for input state and tab switching.
|
|
164
166
|
|
|
165
167
|
```ts
|
|
166
168
|
import { applyHostReady, mountList } from '@openchamber/sdk/ui';
|
|
167
169
|
|
|
170
|
+
let mounted = false;
|
|
168
171
|
host.onReady((ctx) => {
|
|
169
172
|
applyHostReady(ctx, document.documentElement);
|
|
173
|
+
if (mounted) return;
|
|
174
|
+
mounted = true;
|
|
170
175
|
mountList(document.querySelector('#root')!, {
|
|
171
176
|
items: tasks.map((task) => ({ id: task.id, leading: task.key, title: task.title })),
|
|
172
177
|
onSelect: (id) => {
|
|
@@ -177,6 +182,8 @@ host.onReady((ctx) => {
|
|
|
177
182
|
});
|
|
178
183
|
```
|
|
179
184
|
|
|
185
|
+
OpenChamber supplies thin, theme-aware native scrollbars inside extension documents, including nested lists, tabs, and textareas. The UI kit includes the same defaults for development previews. Existing installed bundles get the host stylesheet without rebuilding. Custom rendering hosts can use `GUEST_SCROLLBAR_CSS` from `@openchamber/sdk`. Authors can override these default rules; an extension's CSP still applies.
|
|
186
|
+
|
|
180
187
|
## Schemas
|
|
181
188
|
|
|
182
189
|
`@openchamber/sdk/schemas` exports the zod schemas for the manifest and the messages, for tools that validate extensions. The main entry has no zod dependency, so a page bundle stays small.
|
package/dist/contract.d.ts
CHANGED
|
@@ -22,6 +22,12 @@ export type HostThemeTokens = {
|
|
|
22
22
|
selectionForeground: string;
|
|
23
23
|
/** Text on `primary`. */
|
|
24
24
|
primaryForeground: string;
|
|
25
|
+
/** Host-computed text on neutral or tinted surfaces, not on a solid fill. */
|
|
26
|
+
primaryText: string;
|
|
27
|
+
successText: string;
|
|
28
|
+
warningText: string;
|
|
29
|
+
errorText: string;
|
|
30
|
+
infoText: string;
|
|
25
31
|
success: string;
|
|
26
32
|
warning: string;
|
|
27
33
|
error: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { OPENCHAMBER_SDK_API_VERSION, OPENCHAMBER_SDK_CHANNEL, OPENCHAMBER_SDK_MANIFEST_API_VERSIONS } from './api-version.ts';
|
|
2
|
+
export { GUEST_SCROLLBAR_CSS } from './scrollbar-style.ts';
|
|
2
3
|
export type { GuestLoadState, GuestProject, GuestWorktree, GuestSessionActivity, GuestSessionRecord, GuestDirectoryCoverage, GuestProjectsSnapshot, GuestWorktreesSnapshot, GuestSessionsSnapshot, GuestWorkspaceSnapshot, GuestWorkspaceQuery, GuestWorkspaceSubscription, GuestWorkspaceUpdate, GuestStorageRequest, GuestStorageResult, GuestSessionWorktree } from './workspace.ts';
|
|
3
4
|
export { GUEST_STORAGE_KEY_MAX, GUEST_STORAGE_KEYS_MAX, GUEST_STORAGE_VALUE_BYTES, GUEST_STORAGE_TOTAL_BYTES } from './workspace.ts';
|
|
4
5
|
export type { OpenChamberManifestApiVersion } from './api-version.ts';
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { OPENCHAMBER_SDK_API_VERSION, OPENCHAMBER_SDK_CHANNEL, OPENCHAMBER_SDK_MANIFEST_API_VERSIONS } from "./api-version.js";
|
|
2
|
+
export { GUEST_SCROLLBAR_CSS } from "./scrollbar-style.js";
|
|
2
3
|
export { GUEST_STORAGE_KEY_MAX, GUEST_STORAGE_KEYS_MAX, GUEST_STORAGE_VALUE_BYTES, GUEST_STORAGE_TOTAL_BYTES } from "./workspace.js";
|
|
3
4
|
export { compareOpenChamberVersions, hostMeetsOpenChamberEngine, openChamberEngineMinimum, OPENCHAMBER_ENGINE_PATTERN, parseOpenChamberVersion, } from "./host-version.js";
|
|
4
5
|
export { DECLARED_GUEST_CAPABILITIES, GUEST_ACTIONS_MAX, GUEST_ACTION_LABEL_MAX, GUEST_CAPABILITIES, GUEST_COMMANDS_MAX, GUEST_COMMAND_DESCRIPTION_MAX, GUEST_COMMAND_NAME, GUEST_TOOLS_MAX, GUEST_TOOL_COLUMNS_MAX, GUEST_TOOL_COLUMN_MAX, GUEST_TOOL_LANGUAGE_MAX, GUEST_TOOL_MATCH, GUEST_TOOL_MATCH_MAX, GUEST_TOOL_NAME_MAX, GUEST_TOOL_OUTPUTS, GUEST_TOOL_TEMPLATE_MAX, GUEST_TOOL_TEMPLATE_VALUE_MAX, guestActionsNeedConversation, GUEST_FILESYSTEM_PATTERN_MAX, GUEST_FILESYSTEM_PATTERNS_MAX, HOST_LINEAR_API_ORIGIN, isGuestFilesystemPattern, hasGuestCapability, hasGuestPage, isGuestApproved, isGuestPackageSvgIcon, requestedGuestCapabilities, resolveAttachEntry, resolvePageEntry, resolveAttachMode, resolveIntegrationApi, resolveIntegrationAuth, toPublicService, toPublicIntegration, } from "./manifest.js";
|
package/dist/protocol.d.ts
CHANGED
|
@@ -116,6 +116,11 @@ export declare const hostMessageSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
116
116
|
active: z.ZodString;
|
|
117
117
|
selectionForeground: z.ZodString;
|
|
118
118
|
primaryForeground: z.ZodString;
|
|
119
|
+
primaryText: z.ZodString;
|
|
120
|
+
successText: z.ZodString;
|
|
121
|
+
warningText: z.ZodString;
|
|
122
|
+
errorText: z.ZodString;
|
|
123
|
+
infoText: z.ZodString;
|
|
119
124
|
success: z.ZodString;
|
|
120
125
|
warning: z.ZodString;
|
|
121
126
|
error: z.ZodString;
|
package/dist/protocol.js
CHANGED
|
@@ -22,6 +22,11 @@ const themeTokensSchema = z.object({
|
|
|
22
22
|
active: z.string().min(1),
|
|
23
23
|
selectionForeground: z.string().min(1),
|
|
24
24
|
primaryForeground: z.string().min(1),
|
|
25
|
+
primaryText: z.string().min(1),
|
|
26
|
+
successText: z.string().min(1),
|
|
27
|
+
warningText: z.string().min(1),
|
|
28
|
+
errorText: z.string().min(1),
|
|
29
|
+
infoText: z.string().min(1),
|
|
25
30
|
success: z.string().min(1),
|
|
26
31
|
warning: z.string().min(1),
|
|
27
32
|
error: z.string().min(1),
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/** Shared by served extension documents and the UI kit, including older guest bundles. */
|
|
2
|
+
export declare const GUEST_SCROLLBAR_CSS = "\n:root {\n --oc-scrollbar-thumb: color-mix(in srgb, var(--oc-muted, currentColor) 40%, transparent);\n --oc-scrollbar-thumb-hover: color-mix(in srgb, var(--oc-muted, currentColor) 65%, transparent);\n scrollbar-gutter: stable;\n}\n* {\n scrollbar-width: thin;\n scrollbar-color: var(--oc-scrollbar-thumb) transparent;\n}\n/* Chromium's standard scrollbar properties otherwise override its pseudo-elements. */\n@supports selector(::-webkit-scrollbar) {\n * { scrollbar-width: auto; scrollbar-color: auto; }\n ::-webkit-scrollbar { width: 6px; height: 6px; background: transparent; }\n :root::-webkit-scrollbar, body::-webkit-scrollbar { background: var(--oc-bg, inherit); }\n ::-webkit-scrollbar-track { background: transparent; }\n ::-webkit-scrollbar-thumb {\n background: var(--oc-scrollbar-thumb);\n border-radius: 999px;\n min-width: 24px;\n min-height: 24px;\n }\n ::-webkit-scrollbar-thumb:hover { background: var(--oc-scrollbar-thumb-hover); }\n ::-webkit-scrollbar-corner { background: transparent; }\n ::-webkit-scrollbar-button { display: none; width: 0; height: 0; }\n}\n@media (forced-colors: active) {\n * { scrollbar-color: auto; }\n ::-webkit-scrollbar-thumb, ::-webkit-scrollbar-thumb:hover { background: CanvasText; }\n}\n";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** Shared by served extension documents and the UI kit, including older guest bundles. */
|
|
2
|
+
export const GUEST_SCROLLBAR_CSS = `
|
|
3
|
+
:root {
|
|
4
|
+
--oc-scrollbar-thumb: color-mix(in srgb, var(--oc-muted, currentColor) 40%, transparent);
|
|
5
|
+
--oc-scrollbar-thumb-hover: color-mix(in srgb, var(--oc-muted, currentColor) 65%, transparent);
|
|
6
|
+
scrollbar-gutter: stable;
|
|
7
|
+
}
|
|
8
|
+
* {
|
|
9
|
+
scrollbar-width: thin;
|
|
10
|
+
scrollbar-color: var(--oc-scrollbar-thumb) transparent;
|
|
11
|
+
}
|
|
12
|
+
/* Chromium's standard scrollbar properties otherwise override its pseudo-elements. */
|
|
13
|
+
@supports selector(::-webkit-scrollbar) {
|
|
14
|
+
* { scrollbar-width: auto; scrollbar-color: auto; }
|
|
15
|
+
::-webkit-scrollbar { width: 6px; height: 6px; background: transparent; }
|
|
16
|
+
:root::-webkit-scrollbar, body::-webkit-scrollbar { background: var(--oc-bg, inherit); }
|
|
17
|
+
::-webkit-scrollbar-track { background: transparent; }
|
|
18
|
+
::-webkit-scrollbar-thumb {
|
|
19
|
+
background: var(--oc-scrollbar-thumb);
|
|
20
|
+
border-radius: 999px;
|
|
21
|
+
min-width: 24px;
|
|
22
|
+
min-height: 24px;
|
|
23
|
+
}
|
|
24
|
+
::-webkit-scrollbar-thumb:hover { background: var(--oc-scrollbar-thumb-hover); }
|
|
25
|
+
::-webkit-scrollbar-corner { background: transparent; }
|
|
26
|
+
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
|
|
27
|
+
}
|
|
28
|
+
@media (forced-colors: active) {
|
|
29
|
+
* { scrollbar-color: auto; }
|
|
30
|
+
::-webkit-scrollbar-thumb, ::-webkit-scrollbar-thumb:hover { background: CanvasText; }
|
|
31
|
+
}
|
|
32
|
+
`;
|
package/dist/ui/style.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { GUEST_SCROLLBAR_CSS } from "../scrollbar-style.js";
|
|
1
2
|
/** Host CSS variable → `--oc-*` alias written by `theme.ts`. */
|
|
2
3
|
const OC_ALIAS = {
|
|
3
4
|
'surface-background': 'bg',
|
|
@@ -5,6 +6,7 @@ const OC_ALIAS = {
|
|
|
5
6
|
'surface-elevated-foreground': 'elevated-fg',
|
|
6
7
|
'surface-foreground': 'fg',
|
|
7
8
|
'surface-muted-foreground': 'muted',
|
|
9
|
+
'surface-muted': 'muted-surface',
|
|
8
10
|
'surface-subtle': 'subtle',
|
|
9
11
|
'interactive-border': 'border',
|
|
10
12
|
'interactive-hover': 'hover',
|
|
@@ -14,6 +16,11 @@ const OC_ALIAS = {
|
|
|
14
16
|
'interactive-focus-ring': 'focus',
|
|
15
17
|
'primary': 'primary',
|
|
16
18
|
'primary-foreground': 'primary-fg',
|
|
19
|
+
'primary-text': 'primary-text',
|
|
20
|
+
'success-text': 'success-text',
|
|
21
|
+
'warning-text': 'warning-text',
|
|
22
|
+
'error-text': 'error-text',
|
|
23
|
+
'info-text': 'info-text',
|
|
17
24
|
'status-success': 'success',
|
|
18
25
|
'status-warning': 'warning',
|
|
19
26
|
'status-error': 'error',
|
|
@@ -28,7 +35,7 @@ const elevated = v('surface-elevated', 'transparent');
|
|
|
28
35
|
const elevatedFg = v('surface-elevated-foreground', 'inherit');
|
|
29
36
|
const fg = v('surface-foreground', 'inherit');
|
|
30
37
|
const muted = v('surface-muted-foreground', 'gray');
|
|
31
|
-
const
|
|
38
|
+
const secondary = v('surface-muted', 'transparent');
|
|
32
39
|
const border = v('interactive-border', 'currentColor');
|
|
33
40
|
const hover = v('interactive-hover', 'transparent');
|
|
34
41
|
const active = v('interactive-active', 'transparent');
|
|
@@ -36,6 +43,8 @@ const selection = v('interactive-selection', 'transparent');
|
|
|
36
43
|
const selectionFg = v('interactive-selection-foreground', 'inherit');
|
|
37
44
|
const focus = v('interactive-focus-ring', 'currentColor');
|
|
38
45
|
const primary = v('primary', 'currentColor');
|
|
46
|
+
const primaryText = v('primary-text', 'inherit');
|
|
47
|
+
const errorText = v('error-text', 'inherit');
|
|
39
48
|
const font = v('font-sans', 'inherit');
|
|
40
49
|
const mono = v('font-mono', 'monospace');
|
|
41
50
|
const radius = v('radius', '9px');
|
|
@@ -44,9 +53,10 @@ const focusRing = `box-shadow: 0 0 0 2px ${focus};`;
|
|
|
44
53
|
const tone = (name) => {
|
|
45
54
|
const color = v(`status-${name}`, 'currentColor');
|
|
46
55
|
return `
|
|
47
|
-
.oc-sdk[data-tone="${name}"], .oc-sdk [data-tone="${name}"] { --oc-sdk-tone: ${color}; }`;
|
|
56
|
+
.oc-sdk[data-tone="${name}"], .oc-sdk [data-tone="${name}"] { --oc-sdk-tone: ${color}; --oc-sdk-tone-text: ${v(`${name}-text`, 'inherit')}; }`;
|
|
48
57
|
};
|
|
49
58
|
export const UI_CSS = `
|
|
59
|
+
${GUEST_SCROLLBAR_CSS}
|
|
50
60
|
.oc-sdk { box-sizing: border-box; color: ${fg}; font-family: ${font}; font-size: 0.875rem; line-height: 1.45; }
|
|
51
61
|
.oc-sdk *, .oc-sdk *::before, .oc-sdk *::after { box-sizing: border-box; }
|
|
52
62
|
/* :where() keeps the reset at zero specificity so every primitive class below overrides it. */
|
|
@@ -57,22 +67,24 @@ export const UI_CSS = `
|
|
|
57
67
|
.oc-sdk-mono { font-family: ${mono}; }
|
|
58
68
|
.oc-sdk-muted { color: ${muted}; }
|
|
59
69
|
${tone('success')}${tone('warning')}${tone('error')}${tone('info')}
|
|
60
|
-
.oc-sdk[data-tone="primary"], .oc-sdk [data-tone="primary"] { --oc-sdk-tone: ${primary}; }
|
|
70
|
+
.oc-sdk[data-tone="primary"], .oc-sdk [data-tone="primary"] { --oc-sdk-tone: ${primary}; --oc-sdk-tone-text: ${primaryText}; }
|
|
61
71
|
|
|
62
72
|
.oc-sdk-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border: 1px solid transparent; border-radius: ${radius}; font-size: 0.875rem; font-weight: 500; line-height: 1; white-space: nowrap; transition: background 150ms ease-out, color 150ms ease-out; }
|
|
63
73
|
.oc-sdk-btn[data-size="sm"] { height: 32px; padding: 0 10px; font-size: 0.8125rem; }
|
|
64
74
|
.oc-sdk-btn[data-size="xs"] { height: 24px; padding: 0 8px; font-size: 0.75rem; border-radius: 6px; }
|
|
65
|
-
.oc-sdk-btn[data-variant="default"] { color: ${
|
|
75
|
+
.oc-sdk-btn[data-variant="default"] { color: ${primaryText}; background: ${mix(primary, 10, bg)}; border-color: ${mix(primary, 12)}; }
|
|
66
76
|
.oc-sdk-btn[data-variant="default"]:hover { background: ${mix(primary, 16, bg)}; }
|
|
67
77
|
.oc-sdk-btn[data-variant="default"]:active { background: ${mix(primary, 22, bg)}; }
|
|
68
|
-
.oc-sdk-btn[data-variant="secondary"] { background: ${
|
|
69
|
-
.oc-sdk-btn[data-variant="secondary"]:hover { background: ${
|
|
70
|
-
.oc-sdk-btn[data-variant="
|
|
71
|
-
.oc-sdk-btn[data-variant="outline"]
|
|
78
|
+
.oc-sdk-btn[data-variant="secondary"] { background: ${secondary}; color: var(--oc-fg); }
|
|
79
|
+
.oc-sdk-btn[data-variant="secondary"]:hover { background-image: linear-gradient(${hover}, ${hover}); }
|
|
80
|
+
.oc-sdk-btn[data-variant="secondary"]:active { background-image: linear-gradient(${active}, ${active}); }
|
|
81
|
+
.oc-sdk-btn[data-variant="outline"] { background: ${elevated}; color: ${elevatedFg}; border-color: ${border}; }
|
|
82
|
+
.oc-sdk-btn[data-variant="outline"]:hover { background-image: linear-gradient(${hover}, ${hover}); }
|
|
83
|
+
.oc-sdk-btn[data-variant="outline"]:active { background-image: linear-gradient(${active}, ${active}); }
|
|
72
84
|
.oc-sdk-btn[data-variant="ghost"] { background: transparent; }
|
|
73
85
|
.oc-sdk-btn[data-variant="ghost"]:hover { background: ${hover}; }
|
|
74
86
|
.oc-sdk-btn[data-variant="ghost"]:active { background: ${active}; }
|
|
75
|
-
.oc-sdk-btn[data-variant="destructive"] { --oc-sdk-tone: ${v('status-error', 'red')}; color:
|
|
87
|
+
.oc-sdk-btn[data-variant="destructive"] { --oc-sdk-tone: ${v('status-error', 'red')}; color: ${errorText}; background: ${mix('var(--oc-sdk-tone)', 7, bg)}; border-color: ${mix('var(--oc-sdk-tone)', 12)}; }
|
|
76
88
|
.oc-sdk-btn[data-variant="destructive"]:hover { background: ${mix('var(--oc-sdk-tone)', 9, bg)}; }
|
|
77
89
|
.oc-sdk-btn[data-variant="destructive"]:active { background: ${mix('var(--oc-sdk-tone)', 11, bg)}; }
|
|
78
90
|
.oc-sdk-btn[data-loading="true"] { opacity: .5; pointer-events: none; }
|
|
@@ -81,11 +93,11 @@ ${tone('success')}${tone('warning')}${tone('error')}${tone('info')}
|
|
|
81
93
|
.oc-sdk-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
|
|
82
94
|
.oc-sdk-field-label { font-size: 0.8125rem; font-weight: 500; }
|
|
83
95
|
.oc-sdk-field-note { font-size: 0.75rem; color: ${muted}; }
|
|
84
|
-
.oc-sdk-field[data-invalid="true"] .oc-sdk-field-note { color: ${
|
|
85
|
-
.oc-sdk-input { display: block; width: 100%; min-width: 0; height: 36px; padding: 0 12px; border: 0; border-radius: ${radius}; background: ${elevated}; color: ${
|
|
96
|
+
.oc-sdk-field[data-invalid="true"] .oc-sdk-field-note { color: ${errorText}; }
|
|
97
|
+
.oc-sdk-input { display: block; width: 100%; min-width: 0; height: 36px; padding: 0 12px; border: 0; border-radius: ${radius}; background: ${elevated}; color: ${elevatedFg}; font-size: 0.875rem; line-height: 1.45; appearance: none; box-shadow: inset 0 0 0 1px ${mix(border, 60)}; transition: background 150ms ease-out, box-shadow 150ms ease-out; }
|
|
86
98
|
textarea.oc-sdk-input { height: auto; padding: 8px 12px; resize: vertical; }
|
|
87
99
|
.oc-sdk-input::placeholder { color: ${muted}; }
|
|
88
|
-
.oc-sdk-input:hover:not(:focus) { background: ${
|
|
100
|
+
.oc-sdk-input:hover:not(:focus) { background-image: linear-gradient(${hover}, ${hover}); }
|
|
89
101
|
.oc-sdk-input:focus, .oc-sdk-input:focus-visible { box-shadow: inset 0 0 0 2px ${focus}; }
|
|
90
102
|
.oc-sdk-field[data-invalid="true"] .oc-sdk-input { box-shadow: inset 0 0 0 1px ${v('status-error', 'red')}; }
|
|
91
103
|
.oc-sdk-field[data-invalid="true"] .oc-sdk-input:focus { box-shadow: inset 0 0 0 2px ${v('status-error', 'red')}; }
|
|
@@ -100,19 +112,19 @@ textarea.oc-sdk-input { height: auto; padding: 8px 12px; resize: vertical; }
|
|
|
100
112
|
.oc-sdk-search-clear:hover { background: ${hover}; color: ${fg}; }
|
|
101
113
|
|
|
102
114
|
.oc-sdk-select { position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
|
|
103
|
-
.oc-sdk-trigger { display: inline-flex; align-items: center; gap: 6px; width: 100%; min-width: 0; height: 32px; padding: 0 8px 0 10px; border: 1px solid ${border}; border-radius: 6px; background:
|
|
104
|
-
.oc-sdk-trigger:hover { background: ${hover}; }
|
|
105
|
-
.oc-sdk-trigger[aria-expanded="true"] { background: ${active}; }
|
|
115
|
+
.oc-sdk-trigger { display: inline-flex; align-items: center; gap: 6px; width: 100%; min-width: 0; height: 32px; padding: 0 8px 0 10px; border: 1px solid ${border}; border-radius: 6px; background: ${elevated}; color: ${elevatedFg}; font-size: 0.8125rem; text-align: left; transition: background 150ms ease-out; }
|
|
116
|
+
.oc-sdk-trigger:hover { background-image: linear-gradient(${hover}, ${hover}); }
|
|
117
|
+
.oc-sdk-trigger[aria-expanded="true"] { background-image: linear-gradient(${active}, ${active}); }
|
|
106
118
|
.oc-sdk-trigger-value { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
107
119
|
.oc-sdk-trigger-value[data-empty="true"] { color: ${muted}; }
|
|
108
120
|
.oc-sdk-trigger-chevron { flex: 0 0 auto; color: ${muted}; }
|
|
109
|
-
.oc-sdk-popup { position: fixed; z-index: 50; display: flex; flex-direction: column; gap: 2px; min-width: 160px; max-width: calc(100vw - 16px); max-height: min(320px, calc(100vh - 16px)); overflow: auto; padding: 4px; border: 1px solid ${mix(border, 60)}; border-radius: 12px; background: ${elevated}; color: ${elevatedFg}; box-shadow: 0 8px 24px ${mix(fg, 12)}; }
|
|
121
|
+
.oc-sdk-popup { --surface-foreground: ${elevatedFg}; position: fixed; z-index: 50; display: flex; flex-direction: column; gap: 2px; min-width: 160px; max-width: calc(100vw - 16px); max-height: min(320px, calc(100vh - 16px)); overflow: auto; padding: 4px; border: 1px solid ${mix(border, 60)}; border-radius: 12px; background: ${elevated}; color: ${elevatedFg}; box-shadow: 0 8px 24px ${mix(fg, 12)}; }
|
|
110
122
|
.oc-sdk-popup-search { flex: 0 0 auto; padding: 2px 2px 4px; }
|
|
111
123
|
.oc-sdk-popup-search .oc-sdk-input { height: 32px; font-size: 0.8125rem; }
|
|
112
124
|
.oc-sdk-option { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border-radius: 8px; font-size: 0.8125rem; text-align: left; }
|
|
113
125
|
.oc-sdk-option[data-active="true"] { background: ${hover}; }
|
|
114
126
|
.oc-sdk-option[aria-selected="true"] { background: ${selection}; color: ${selectionFg}; }
|
|
115
|
-
.oc-sdk-option[data-destructive="true"] { color: ${
|
|
127
|
+
.oc-sdk-option[data-destructive="true"] { color: ${errorText}; }
|
|
116
128
|
.oc-sdk-option[data-destructive="true"][data-active="true"] { background: ${mix(v('status-error', 'red'), 10)}; }
|
|
117
129
|
.oc-sdk-option-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
118
130
|
.oc-sdk-option-hint { flex: 0 0 auto; font-size: 0.75rem; color: ${muted}; }
|
|
@@ -138,11 +150,11 @@ textarea.oc-sdk-input { height: auto; padding: 8px 12px; resize: vertical; }
|
|
|
138
150
|
.oc-sdk-tabs[data-track="true"] { background: ${mix(fg, 4)}; }
|
|
139
151
|
.oc-sdk-tab { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid transparent; border-radius: 8px; font-size: 0.8125rem; font-weight: 500; color: ${muted}; white-space: nowrap; transition: color 150ms ease-out, background 150ms ease-out; }
|
|
140
152
|
.oc-sdk-tab:hover { color: ${fg}; }
|
|
141
|
-
.oc-sdk-tab[aria-selected="true"] { color: ${
|
|
153
|
+
.oc-sdk-tab[aria-selected="true"] { color: ${selectionFg}; background: ${selection}; border-color: ${border}; }
|
|
142
154
|
.oc-sdk-tab-count { font-size: 0.75rem; font-variant-numeric: tabular-nums; color: ${muted}; }
|
|
143
155
|
|
|
144
156
|
.oc-sdk-badge { display: inline-flex; align-items: center; padding: 1px 6px; border-radius: 9999px; font-size: 11px; font-weight: 500; line-height: 16px; white-space: nowrap; background: ${hover}; color: ${muted}; }
|
|
145
|
-
.oc-sdk-badge[data-tone] { color: var(--oc-sdk-tone); background: ${mix('var(--oc-sdk-tone)', 15)}; }
|
|
157
|
+
.oc-sdk-badge[data-tone] { color: var(--oc-sdk-tone-text, var(--oc-sdk-tone)); background: ${mix('var(--oc-sdk-tone)', 15)}; }
|
|
146
158
|
|
|
147
159
|
.oc-sdk-list { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
|
|
148
160
|
.oc-sdk-row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border-radius: 6px; text-align: left; transition: background 120ms ease-out; }
|
|
@@ -168,7 +180,7 @@ textarea.oc-sdk-input { height: auto; padding: 8px 12px; resize: vertical; }
|
|
|
168
180
|
|
|
169
181
|
.oc-sdk-banner { display: flex; align-items: flex-start; gap: 12px; padding: 8px 12px; border: 1px solid ${mix('var(--oc-sdk-tone)', 40)}; border-radius: 8px; background: ${mix('var(--oc-sdk-tone)', 10)}; }
|
|
170
182
|
.oc-sdk-banner-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
|
|
171
|
-
.oc-sdk-banner-title { font-size: 0.8125rem; font-weight: 500; color: var(--oc-sdk-tone); }
|
|
183
|
+
.oc-sdk-banner-title { font-size: 0.8125rem; font-weight: 500; color: var(--oc-sdk-tone-text, var(--oc-sdk-tone)); }
|
|
172
184
|
.oc-sdk-banner-body { font-size: 0.8125rem; color: ${muted}; }
|
|
173
185
|
.oc-sdk-banner-action { flex: 0 0 auto; }
|
|
174
186
|
|
|
@@ -185,6 +197,6 @@ textarea.oc-sdk-input { height: auto; padding: 8px 12px; resize: vertical; }
|
|
|
185
197
|
.oc-sdk-menu { position: relative; display: inline-flex; }
|
|
186
198
|
|
|
187
199
|
.oc-sdk-text { white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
188
|
-
.oc-sdk-text a { color: ${
|
|
200
|
+
.oc-sdk-text a { color: ${primaryText}; text-decoration: underline; text-underline-offset: 2px; }
|
|
189
201
|
.oc-sdk-text img { display: block; max-width: 100%; margin: 8px 0; border-radius: 8px; border: 1px solid ${mix(border, 60)}; }
|
|
190
202
|
`;
|
package/dist/ui/theme.js
CHANGED
|
@@ -14,6 +14,11 @@ const TOKEN_VARS = [
|
|
|
14
14
|
['--oc-active', 'active'],
|
|
15
15
|
['--oc-selection-fg', 'selectionForeground'],
|
|
16
16
|
['--oc-primary-fg', 'primaryForeground'],
|
|
17
|
+
['--oc-primary-text', 'primaryText'],
|
|
18
|
+
['--oc-success-text', 'successText'],
|
|
19
|
+
['--oc-warning-text', 'warningText'],
|
|
20
|
+
['--oc-error-text', 'errorText'],
|
|
21
|
+
['--oc-info-text', 'infoText'],
|
|
17
22
|
['--oc-success', 'success'],
|
|
18
23
|
['--oc-warning', 'warning'],
|
|
19
24
|
['--oc-error', 'error'],
|
|
@@ -36,6 +41,11 @@ const TOKEN_VARS = [
|
|
|
36
41
|
['--interactive-active', 'active'],
|
|
37
42
|
['--interactive-selection-foreground', 'selectionForeground'],
|
|
38
43
|
['--primary-foreground', 'primaryForeground'],
|
|
44
|
+
['--primary-text', 'primaryText'],
|
|
45
|
+
['--success-text', 'successText'],
|
|
46
|
+
['--warning-text', 'warningText'],
|
|
47
|
+
['--error-text', 'errorText'],
|
|
48
|
+
['--info-text', 'infoText'],
|
|
39
49
|
['--status-success', 'success'],
|
|
40
50
|
['--status-warning', 'warning'],
|
|
41
51
|
['--status-error', 'error'],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openchamber/sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.24.0",
|
|
4
4
|
"description": "Contract for OpenChamber guests: manifest parse and iframe host bridge.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build": "tsc -p tsconfig.build.json",
|
|
37
37
|
"type-check": "tsc --noEmit",
|
|
38
|
-
"lint": "eslint \"./src/**/*.ts\" --config ../../eslint.config.js",
|
|
38
|
+
"lint": "eslint \"./{src,examples}/**/*.ts\" --config ../../eslint.config.js",
|
|
39
39
|
"bundle": "bun scripts/bundle-guest.ts",
|
|
40
40
|
"test": "node ../../scripts/run-isolated-tests.mjs src scripts",
|
|
41
41
|
"clean": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\""
|