@nanobpm/nano-ide-ext-types 1.0.0 → 1.0.1

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/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export type ExtKind = "lang" | "app" | "example";
1
+ export type ExtKind = "lang" | "app" | "example" | "theme";
2
2
  export interface FileType {
3
3
  /** File extension including the dot, e.g. ".rs". */
4
4
  ext: string;
@@ -19,6 +19,25 @@ export interface TemplateSpec {
19
19
  id: string;
20
20
  label: string;
21
21
  }
22
+ /**
23
+ * The console's design-token vocabulary (nanobpmn
24
+ * console/src/theme/tokens.css). A theme restyles the whole console by giving
25
+ * CSS colours for these keys; missing keys fall back to the base appearance.
26
+ */
27
+ export declare const THEME_TOKEN_KEYS: readonly ["app", "panel", "raised", "inset", "hover", "edge", "edgeStrong", "text", "textMuted", "textFaint", "accent", "accentStrong", "accent2", "onAccent", "ok", "warn", "danger", "info"];
28
+ export type ThemeTokenKey = (typeof THEME_TOKEN_KEYS)[number];
29
+ /** One console colour theme a `kind: "theme"` pack contributes. Pure data. */
30
+ export interface ThemeSpec {
31
+ /** Stable id, unique across packs (e.g. "nord-dark"). */
32
+ id: string;
33
+ /** Human-facing name shown in the console's theme picker. */
34
+ label: string;
35
+ /** Base palette the tokens override — controls color-scheme and any token
36
+ * the theme doesn't specify. */
37
+ appearance: "light" | "dark";
38
+ /** Design-token name -> CSS colour. Unknown keys are ignored by the host. */
39
+ tokens: Partial<Record<ThemeTokenKey, string>>;
40
+ }
22
41
  export interface ExtManifest {
23
42
  id: string;
24
43
  kind: ExtKind;
@@ -26,12 +45,19 @@ export interface ExtManifest {
26
45
  fileTypes?: FileType[];
27
46
  templates?: TemplateSpec[];
28
47
  toolchain?: Toolchain;
29
- /** example packs: lang pack ids required to build/run this example. */
48
+ /** example/app packs: lang pack ids required to build/run this pack's
49
+ * projects. The FIRST entry sets the scaffolded project's language — which
50
+ * drives the host's run/compile toolchain — so any app or example pack that
51
+ * isn't Deno-based must declare it (else new projects fall back to the Deno
52
+ * runtime). Required for example packs; required for app packs whose
53
+ * toolchain declares a detect probe. */
30
54
  requires?: string[];
31
55
  /** example packs: subdir holding the ready-to-copy project. */
32
56
  appDir?: string;
33
57
  /** example packs: one-line description for the picker. */
34
58
  summary?: string;
59
+ /** theme packs: the console colour themes this pack contributes. */
60
+ themes?: ThemeSpec[];
35
61
  /** Built-in packs set this; published packs omit it. */
36
62
  builtin?: boolean;
37
63
  }
package/dist/index.js CHANGED
@@ -1,3 +1,28 @@
1
1
  // nano-ide.ext.json manifest contract (ADR 0007). Mirrors the host parser in
2
2
  // nanobpmn server/src/console/extensions.rs — keep in sync.
3
+ /**
4
+ * The console's design-token vocabulary (nanobpmn
5
+ * console/src/theme/tokens.css). A theme restyles the whole console by giving
6
+ * CSS colours for these keys; missing keys fall back to the base appearance.
7
+ */
8
+ export const THEME_TOKEN_KEYS = [
9
+ "app",
10
+ "panel",
11
+ "raised",
12
+ "inset",
13
+ "hover",
14
+ "edge",
15
+ "edgeStrong",
16
+ "text",
17
+ "textMuted",
18
+ "textFaint",
19
+ "accent",
20
+ "accentStrong",
21
+ "accent2",
22
+ "onAccent",
23
+ "ok",
24
+ "warn",
25
+ "danger",
26
+ "info",
27
+ ];
3
28
  export const MANIFEST_FILE = "nano-ide.ext.json";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nanobpm/nano-ide-ext-types",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "TypeScript types for the nano-ide.ext.json extension manifest (ADR 0007).",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",