@adecore/intelligent-ui 0.54.2 → 0.54.4
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/README.md +1 -1
- package/dist/catalog.d.ts +1 -1
- package/dist/catalog.js +1 -1
- package/dist/event-time.js +1 -1
- package/dist/links.js +1 -1
- package/dist/places.js +1 -1
- package/package.json +1 -1
- package/src/catalog.ts +1 -1
- package/src/event-time.ts +2 -2
- package/src/links.ts +1 -1
- package/src/places.ts +1 -1
- package/src/syntax.ts +1 -1
package/README.md
CHANGED
|
@@ -33,7 +33,7 @@ for (const block of blocks) {
|
|
|
33
33
|
|
|
34
34
|
| Page | What it covers |
|
|
35
35
|
|---|---|
|
|
36
|
-
| [Getting started](https://adecore.dev/intelligent-ui/
|
|
36
|
+
| [Getting started](https://adecore.dev/intelligent-ui/getting-started) | Instructions, compilation, the wire and rendering |
|
|
37
37
|
| [Security model](https://adecore.dev/intelligent-ui/guide/security) | What a block can and cannot do |
|
|
38
38
|
| [Syntax](https://adecore.dev/intelligent-ui/language/syntax) | The language an agent writes |
|
|
39
39
|
| [Components](https://adecore.dev/intelligent-ui/components/status) | Every component and its props |
|
package/dist/catalog.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export declare const UI_GROUPS: {
|
|
|
31
31
|
};
|
|
32
32
|
readonly links: {
|
|
33
33
|
readonly description: 'Refer to a host-owned resource.';
|
|
34
|
-
readonly rules: '
|
|
34
|
+
readonly rules: 'The host checks every target. No arbitrary navigation or file reads.';
|
|
35
35
|
};
|
|
36
36
|
readonly inputs: {
|
|
37
37
|
readonly description: 'Change local block state.';
|
package/dist/catalog.js
CHANGED
|
@@ -21,7 +21,7 @@ export const UI_GROUPS = {
|
|
|
21
21
|
description: 'Show places on a map the host draws.',
|
|
22
22
|
rules: 'Give lat and lon in decimal degrees, or an address the host looks up. Never a tile or map URL. The host chooses the map.'
|
|
23
23
|
},
|
|
24
|
-
links: { description: 'Refer to a host-owned resource.', rules: '
|
|
24
|
+
links: { description: 'Refer to a host-owned resource.', rules: 'The host checks every target. No arbitrary navigation or file reads.' },
|
|
25
25
|
inputs: {
|
|
26
26
|
description: 'Change local block state.',
|
|
27
27
|
rules: 'Bind value={$name}. A Button sets a literal with action={@Set($name, value)} or restores a default with {@Reset($name)} or {@Reset()}. State stays local until a Choice sends visible context.'
|
package/dist/event-time.js
CHANGED
|
@@ -2,7 +2,7 @@ const EVENT_TIME = /^(?:(\d{2}):(\d{2})(?::(\d{2})(?:\.\d{1,9})?)?|(\d{4})-(\d{2
|
|
|
2
2
|
function validClock(hour, minute, second = 0) {
|
|
3
3
|
return hour <= 23 && minute <= 59 && second <= 59;
|
|
4
4
|
}
|
|
5
|
-
/* The minutes east of UTC that `Z` or `+02:00` stand for, or null
|
|
5
|
+
/* The minutes east of UTC that `Z` or `+02:00` stand for, or null outside -12:00 to +14:00, where no zone lies. */
|
|
6
6
|
function zoneOffset(zone) {
|
|
7
7
|
if (zone === 'Z') {
|
|
8
8
|
return 0;
|
package/dist/links.js
CHANGED
|
@@ -8,7 +8,7 @@ export const UiLinkTargetSchema = z.discriminatedUnion('type', [
|
|
|
8
8
|
z.object({ type: z.literal('Commit'), sha: z.string().regex(/^[a-f\d]{7,64}$/i) }).strict(),
|
|
9
9
|
z.object({ type: z.literal('Node'), id: z.string().min(1).max(256) }).strict()
|
|
10
10
|
]);
|
|
11
|
-
// `state` is a frozen set
|
|
11
|
+
// `state` is a frozen set. Native clients validate these payloads whole, so a new state would fail them.
|
|
12
12
|
export const UiLinkResolutionSchema = z.object({
|
|
13
13
|
state: z.enum(['chip', 'plain']),
|
|
14
14
|
target: UiLinkTargetSchema.optional(),
|
package/dist/places.js
CHANGED
|
@@ -10,7 +10,7 @@ function nameOf(node) {
|
|
|
10
10
|
}
|
|
11
11
|
/*
|
|
12
12
|
* The complete, valid Places that give an address, by node id, as the block evaluates with `input` and the
|
|
13
|
-
* values of its `queries`. A place that also gives coordinates is looked up too
|
|
13
|
+
* values of its `queries`. A place that also gives coordinates is looked up too. What the host finds for
|
|
14
14
|
* the address wins, and the coordinates stand when it finds nothing.
|
|
15
15
|
*/
|
|
16
16
|
export function uiPlaceQueries(block, input = {}, queries = {}, limits = {}) {
|
package/package.json
CHANGED
package/src/catalog.ts
CHANGED
|
@@ -25,7 +25,7 @@ export const UI_GROUPS = {
|
|
|
25
25
|
description: 'Show places on a map the host draws.',
|
|
26
26
|
rules: 'Give lat and lon in decimal degrees, or an address the host looks up. Never a tile or map URL. The host chooses the map.'
|
|
27
27
|
},
|
|
28
|
-
links: { description: 'Refer to a host-owned resource.', rules: '
|
|
28
|
+
links: { description: 'Refer to a host-owned resource.', rules: 'The host checks every target. No arbitrary navigation or file reads.' },
|
|
29
29
|
inputs: {
|
|
30
30
|
description: 'Change local block state.',
|
|
31
31
|
rules: 'Bind value={$name}. A Button sets a literal with action={@Set($name, value)} or restores a default with {@Reset($name)} or {@Reset()}. State stays local until a Choice sends visible context.'
|
package/src/event-time.ts
CHANGED
|
@@ -4,7 +4,7 @@ const EVENT_TIME =
|
|
|
4
4
|
export interface UiEventTime {
|
|
5
5
|
kind: 'time' | 'date' | 'datetime';
|
|
6
6
|
date: Date;
|
|
7
|
-
// True when the text gave no offset
|
|
7
|
+
// True when the text gave no offset. `date` then holds the written parts in UTC and is formatted in UTC, so no zone or clock change moves them. False is a real instant, formatted in the reader's zone.
|
|
8
8
|
written: boolean;
|
|
9
9
|
// True for a lone time that wrote seconds (`14:05:30`), which then shows them. A date-time shows its minutes only.
|
|
10
10
|
seconds: boolean;
|
|
@@ -14,7 +14,7 @@ function validClock(hour: number, minute: number, second = 0): boolean {
|
|
|
14
14
|
return hour <= 23 && minute <= 59 && second <= 59;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
/* The minutes east of UTC that `Z` or `+02:00` stand for, or null
|
|
17
|
+
/* The minutes east of UTC that `Z` or `+02:00` stand for, or null outside -12:00 to +14:00, where no zone lies. */
|
|
18
18
|
function zoneOffset(zone: string): number | null {
|
|
19
19
|
if (zone === 'Z') {
|
|
20
20
|
return 0;
|
package/src/links.ts
CHANGED
|
@@ -13,7 +13,7 @@ export const UiLinkTargetSchema = z.discriminatedUnion('type', [
|
|
|
13
13
|
]);
|
|
14
14
|
export type UiLinkTarget = z.infer<typeof UiLinkTargetSchema>;
|
|
15
15
|
|
|
16
|
-
// `state` is a frozen set
|
|
16
|
+
// `state` is a frozen set. Native clients validate these payloads whole, so a new state would fail them.
|
|
17
17
|
export const UiLinkResolutionSchema = z.object({
|
|
18
18
|
state: z.enum(['chip', 'plain']),
|
|
19
19
|
target: UiLinkTargetSchema.optional(),
|
package/src/places.ts
CHANGED
|
@@ -20,7 +20,7 @@ function nameOf(node: UiViewNode): string {
|
|
|
20
20
|
|
|
21
21
|
/*
|
|
22
22
|
* The complete, valid Places that give an address, by node id, as the block evaluates with `input` and the
|
|
23
|
-
* values of its `queries`. A place that also gives coordinates is looked up too
|
|
23
|
+
* values of its `queries`. A place that also gives coordinates is looked up too. What the host finds for
|
|
24
24
|
* the address wins, and the coordinates stand when it finds nothing.
|
|
25
25
|
*/
|
|
26
26
|
export function uiPlaceQueries(
|
package/src/syntax.ts
CHANGED
|
@@ -8,7 +8,7 @@ export interface UiDiagnostic {
|
|
|
8
8
|
start: number;
|
|
9
9
|
end: number;
|
|
10
10
|
nodeId?: string;
|
|
11
|
-
//
|
|
11
|
+
// A warning leaves the part it names drawn. Absent means an error, a part that could not be drawn.
|
|
12
12
|
severity?: 'warning';
|
|
13
13
|
}
|
|
14
14
|
|