@acrylblends/blends-frame 0.1.4 → 0.1.6

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/lib/registry.d.ts CHANGED
@@ -27,6 +27,8 @@ export interface RegistryMarks {
27
27
  }
28
28
  /** `owner/repo` of a `github:` source, lower case; undefined for any other source. */
29
29
  export declare function repoOfSource(source: string): string | undefined;
30
+ /** The unpacked size of the native package an entry brings for this computer: its OS and CPU first, then its OS for any CPU (plugin-share/native.ts). */
31
+ export declare function downloadFor(native: unknown, platform?: string, arch?: string): number | undefined;
30
32
  /**
31
33
  * The entries a Blends app can pull: the ones the index gives a version and a pull line (a plugin whose code is only a folder of another
32
34
  * repository has none). @throws when the index is not formatVersion 1.
@@ -1,13 +1,17 @@
1
1
  /** What the Registry tab lists and how it words one row: pure, so the rules are tested without a page. */
2
- import type { PulledPluginView, RegistryEntryView } from '../contract.ts';
2
+ import type { PulledPluginView, RegistryEntryView, RegistryOrigin } from '../contract.ts';
3
3
  /** A plugin for a different kind of app (a stock DeepSeek Harness plugin) cannot run in a Blends app; it is hidden until the person asks to see all. */
4
4
  export declare const forOtherApps: (entry: RegistryEntryView) => boolean;
5
+ /** All (the default), or only official or only community entries. */
6
+ export type OriginFilter = 'all' | RegistryOrigin;
5
7
  /** The entries a search shows: by name, description or owner, every word of it; the ones for other apps only when asked. Order is kept. */
6
- export declare function filterRegistry(entries: readonly RegistryEntryView[], query: string, showAll: boolean): RegistryEntryView[];
8
+ export declare function filterRegistry(entries: readonly RegistryEntryView[], query: string, showAll: boolean, origin?: OriginFilter): RegistryEntryView[];
7
9
  /** The address a person can type or paste: `github:<owner>/<repo>@<version>`; leading and trailing space is ignored. */
8
10
  export declare function cleanAddress(text: string): string | undefined;
9
- /** The question before anything is added: whose code it is, in one sentence. */
10
- export declare const addQuestion: (name: string, owner: string) => string;
11
+ /** A download size the way a person reads it: whole megabytes (1 MB = 1,000,000 bytes, as npm and the Blends pages count). */
12
+ export declare const megabytes: (bytes: number) => string;
13
+ /** The question before anything is added: whose code it is (a community plugin says so: nobody at ACRYL reviewed it), and what it downloads for this computer. */
14
+ export declare const addQuestion: (name: string, owner: string, download?: number, origin?: RegistryOrigin) => string;
11
15
  /** The answer after an add. */
12
16
  export declare function addedText(pulled: PulledPluginView): string;
13
17
  /** One line under a row: who released it, which version and when. */
@@ -331,6 +331,8 @@ export interface AppReloadView {
331
331
  /** @throws an Error naming the field when the answer is not an app reload view. */
332
332
  export declare function parseAppReloadView(value: unknown): AppReloadView;
333
333
  /** What a plugin of the registry offers, as the registry's index lists it (`https://cordisplugins.github.io/registry/index.json`, formatVersion 1). */
334
+ /** Official: released from one of the project's organisations; community: from anyone else. The registry decides it from the repository owner's GitHub id. */
335
+ export type RegistryOrigin = 'official' | 'community';
334
336
  export interface RegistryEntryView {
335
337
  /** The plugin's name; a scoped name keeps its scope. */
336
338
  readonly name: string;
@@ -344,12 +346,15 @@ export interface RegistryEntryView {
344
346
  readonly published?: string;
345
347
  /** Where it runs: `ACRYL` (needs an ACRYL service), `Both`, or `DSH stock` (a Harness plugin, which an app of this kind cannot run). */
346
348
  readonly compatibility: string;
349
+ readonly origin: RegistryOrigin;
347
350
  /** The source a pull takes: `github:<owner>/<repo>@<version>`. */
348
351
  readonly source: string;
349
352
  /** This app already has a plugin of this name or pulled from this source. */
350
353
  readonly installed: boolean;
351
354
  /** The account the person is signed in to GitHub with (or shares to) released it. */
352
355
  readonly mine: boolean;
356
+ /** Bytes it downloads besides itself for this computer (a native package, plugin-share/native.ts), when the index says. */
357
+ readonly download?: number;
353
358
  }
354
359
  /** The registry as the Host read it: its entries, or why they could not be read (offline, rate limited, the site changed). */
355
360
  export type RegistryView = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acrylblends/blends-frame",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "ACRYL Blends frame: the workbench around an app being built - a top bar, the branches and versions on the left, the app alone in the centre, and the agents on the right - as one Cordis plugin with a Host and a client half",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -61,10 +61,10 @@
61
61
  "dependencies": {
62
62
  "@webboxes/blends-core": "0.5.0",
63
63
  "@webboxes/plugin-hub": "0.2.2",
64
- "@acrylblends/app-shell": "^0.1.0",
64
+ "@acrylblends/app-shell": "^0.1.1",
65
65
  "@acrylblends/loopback-http": "^0.1.0",
66
66
  "@acrylblends/versions": "^0.1.1",
67
- "@acrylblends/workspace": "^0.1.0",
67
+ "@acrylblends/workspace": "^0.1.1",
68
68
  "yaml": "2.9.0"
69
69
  },
70
70
  "peerDependencies": {
@@ -93,7 +93,7 @@
93
93
  "@types/node": "^24.0.0",
94
94
  "@types/react": "^18",
95
95
  "@types/react-dom": "^18",
96
- "acrylblends": "^0.1.4",
96
+ "acrylblends": "^0.1.6",
97
97
  "cytoscape": "3.34.3",
98
98
  "jsdom": "29.1.1",
99
99
  "react": "18.3.1",