@fungi.computer/gills 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +100 -2
- package/dist/declaration.d.ts +55 -0
- package/dist/declaration.js +41 -0
- package/dist/gill.d.ts +248 -0
- package/dist/gill.js +134 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/presentation.d.ts +2 -0
- package/dist/presentation.js +20 -0
- package/dist/rows.d.ts +78 -0
- package/dist/rows.js +46 -0
- package/docs/api/README.md +13 -0
- package/docs/api/index.md +879 -0
- package/docs/api/modules.md +14 -0
- package/docs/api/presentation.md +30 -0
- package/package.json +30 -3
package/dist/rows.d.ts
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
/** Nonempty display text, bounded to 4,096 characters. */
|
|
3
|
+
export declare const rowLabelSchemaV1: Schema.String;
|
|
4
|
+
/** Producer-owned row identity, bounded to 513 characters. */
|
|
5
|
+
export declare const rowIdentitySchemaV1: Schema.String;
|
|
6
|
+
/** A navigation parameter interpreted only by the receiving App. */
|
|
7
|
+
export declare const rowOpenSchemaV1: Schema.Struct<{
|
|
8
|
+
readonly params: Schema.$Array<Schema.Struct<{
|
|
9
|
+
readonly key: Schema.String;
|
|
10
|
+
readonly value: Schema.String;
|
|
11
|
+
}>>;
|
|
12
|
+
}>;
|
|
13
|
+
/** A bounded text row; each receiving host authorizes its open target. */
|
|
14
|
+
export declare const rowSchemaV1: Schema.Struct<{
|
|
15
|
+
readonly id: Schema.String;
|
|
16
|
+
readonly title: Schema.String;
|
|
17
|
+
readonly detail: Schema.optional<Schema.String>;
|
|
18
|
+
readonly tone: Schema.optional<Schema.Literals<readonly ["attention", "running", "error", "settled", "muted"]>>;
|
|
19
|
+
/** App-owned status text with the semantic colors used by Caps Status. */
|
|
20
|
+
readonly status: Schema.optional<Schema.Struct<{
|
|
21
|
+
readonly label: Schema.String;
|
|
22
|
+
readonly tone: Schema.Literals<readonly ["neutral", "primary", "secondary", "accent", "success", "info", "warning", "error"]>;
|
|
23
|
+
}>>;
|
|
24
|
+
/** The host supplies this Gill's App identity; rows only select its view. */
|
|
25
|
+
readonly open: Schema.optional<Schema.Struct<{
|
|
26
|
+
readonly params: Schema.$Array<Schema.Struct<{
|
|
27
|
+
readonly key: Schema.String;
|
|
28
|
+
readonly value: Schema.String;
|
|
29
|
+
}>>;
|
|
30
|
+
}>>;
|
|
31
|
+
}>;
|
|
32
|
+
/** One shared, bounded data row; the host owns navigation and execution. */
|
|
33
|
+
export type RowV1 = Schema.Schema.Type<typeof rowSchemaV1>;
|
|
34
|
+
/** A page containing at most 200 shared rows. */
|
|
35
|
+
export declare const rowPageSchemaV1: Schema.$Array<Schema.Struct<{
|
|
36
|
+
readonly id: Schema.String;
|
|
37
|
+
readonly title: Schema.String;
|
|
38
|
+
readonly detail: Schema.optional<Schema.String>;
|
|
39
|
+
readonly tone: Schema.optional<Schema.Literals<readonly ["attention", "running", "error", "settled", "muted"]>>;
|
|
40
|
+
/** App-owned status text with the semantic colors used by Caps Status. */
|
|
41
|
+
readonly status: Schema.optional<Schema.Struct<{
|
|
42
|
+
readonly label: Schema.String;
|
|
43
|
+
readonly tone: Schema.Literals<readonly ["neutral", "primary", "secondary", "accent", "success", "info", "warning", "error"]>;
|
|
44
|
+
}>>;
|
|
45
|
+
/** The host supplies this Gill's App identity; rows only select its view. */
|
|
46
|
+
readonly open: Schema.optional<Schema.Struct<{
|
|
47
|
+
readonly params: Schema.$Array<Schema.Struct<{
|
|
48
|
+
readonly key: Schema.String;
|
|
49
|
+
readonly value: Schema.String;
|
|
50
|
+
}>>;
|
|
51
|
+
}>>;
|
|
52
|
+
}>>;
|
|
53
|
+
/** A finished App call as a person reads it: a shared row plus an optional thumbnail. */
|
|
54
|
+
export declare const resultRowSchemaV1: Schema.Struct<{
|
|
55
|
+
/** A Computer file the receiving host may preview; the host authorizes the read. */
|
|
56
|
+
readonly media: Schema.optional<Schema.Struct<{
|
|
57
|
+
readonly path: Schema.String;
|
|
58
|
+
readonly format: Schema.Literals<readonly ["fungi:image", "fungi:video"]>;
|
|
59
|
+
}>>;
|
|
60
|
+
readonly id: Schema.String;
|
|
61
|
+
readonly title: Schema.String;
|
|
62
|
+
readonly detail: Schema.optional<Schema.String>;
|
|
63
|
+
readonly tone: Schema.optional<Schema.Literals<readonly ["attention", "running", "error", "settled", "muted"]>>;
|
|
64
|
+
/** App-owned status text with the semantic colors used by Caps Status. */
|
|
65
|
+
readonly status: Schema.optional<Schema.Struct<{
|
|
66
|
+
readonly label: Schema.String;
|
|
67
|
+
readonly tone: Schema.Literals<readonly ["neutral", "primary", "secondary", "accent", "success", "info", "warning", "error"]>;
|
|
68
|
+
}>>;
|
|
69
|
+
/** The host supplies this Gill's App identity; rows only select its view. */
|
|
70
|
+
readonly open: Schema.optional<Schema.Struct<{
|
|
71
|
+
readonly params: Schema.$Array<Schema.Struct<{
|
|
72
|
+
readonly key: Schema.String;
|
|
73
|
+
readonly value: Schema.String;
|
|
74
|
+
}>>;
|
|
75
|
+
}>>;
|
|
76
|
+
}>;
|
|
77
|
+
/** One shared result row; navigation and previews stay host-authorized. */
|
|
78
|
+
export type ResultRow = Schema.Schema.Type<typeof resultRowSchemaV1>;
|
package/dist/rows.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as Schema from "effect/Schema";
|
|
2
|
+
/** Nonempty display text, bounded to 4,096 characters. */
|
|
3
|
+
export const rowLabelSchemaV1 = Schema.String.pipe(Schema.check(Schema.isMinLength(1)), Schema.check(Schema.isMaxLength(4_096)));
|
|
4
|
+
/** Producer-owned row identity, bounded to 513 characters. */
|
|
5
|
+
export const rowIdentitySchemaV1 = Schema.String.pipe(Schema.check(Schema.isMinLength(1)), Schema.check(Schema.isMaxLength(513)));
|
|
6
|
+
/** A navigation parameter interpreted only by the receiving App. */
|
|
7
|
+
export const rowOpenSchemaV1 = Schema.Struct({
|
|
8
|
+
params: Schema.Array(Schema.Struct({
|
|
9
|
+
key: Schema.String.check(Schema.isMinLength(1), Schema.isMaxLength(64)),
|
|
10
|
+
value: Schema.String.check(Schema.isMaxLength(4_096)),
|
|
11
|
+
})).check(Schema.isMaxLength(16)),
|
|
12
|
+
});
|
|
13
|
+
/** A bounded text row; each receiving host authorizes its open target. */
|
|
14
|
+
export const rowSchemaV1 = Schema.Struct({
|
|
15
|
+
id: rowIdentitySchemaV1,
|
|
16
|
+
title: rowLabelSchemaV1,
|
|
17
|
+
detail: Schema.optional(Schema.String.pipe(Schema.check(Schema.isMaxLength(1_024)))),
|
|
18
|
+
tone: Schema.optional(Schema.Literals(["attention", "running", "error", "settled", "muted"])),
|
|
19
|
+
/** App-owned status text with the semantic colors used by Caps Status. */
|
|
20
|
+
status: Schema.optional(Schema.Struct({
|
|
21
|
+
label: rowLabelSchemaV1,
|
|
22
|
+
tone: Schema.Literals([
|
|
23
|
+
"neutral",
|
|
24
|
+
"primary",
|
|
25
|
+
"secondary",
|
|
26
|
+
"accent",
|
|
27
|
+
"success",
|
|
28
|
+
"info",
|
|
29
|
+
"warning",
|
|
30
|
+
"error",
|
|
31
|
+
]),
|
|
32
|
+
})),
|
|
33
|
+
/** The host supplies this Gill's App identity; rows only select its view. */
|
|
34
|
+
open: Schema.optional(rowOpenSchemaV1),
|
|
35
|
+
});
|
|
36
|
+
/** A page containing at most 200 shared rows. */
|
|
37
|
+
export const rowPageSchemaV1 = Schema.Array(rowSchemaV1).pipe(Schema.check(Schema.isMaxLength(200)));
|
|
38
|
+
/** A finished App call as a person reads it: a shared row plus an optional thumbnail. */
|
|
39
|
+
export const resultRowSchemaV1 = Schema.Struct({
|
|
40
|
+
...rowSchemaV1.fields,
|
|
41
|
+
/** A Computer file the receiving host may preview; the host authorizes the read. */
|
|
42
|
+
media: Schema.optional(Schema.Struct({
|
|
43
|
+
path: rowLabelSchemaV1,
|
|
44
|
+
format: Schema.Literals(["fungi:image", "fungi:video"]),
|
|
45
|
+
})),
|
|
46
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Generated by Botanical API docs (TypeDoc + typedoc-plugin-markdown). Do not edit. -->
|
|
2
|
+
|
|
3
|
+
**@fungi.computer/gills**
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Gills
|
|
8
|
+
|
|
9
|
+
Bounded Gill declarations, requests and plain-text rows for App hosts. Effect
|
|
10
|
+
owns decoding; the host owns authorization, navigation and action execution.
|
|
11
|
+
|
|
12
|
+
Import the public contract from `@fungi.computer/gills`. See the package README
|
|
13
|
+
for a runnable quick start and the generated API for each schema and type.
|