@intentic/extension-ui 1.430.0 → 1.431.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/check/extension.d.mts +6 -1
- package/check/extension.mjs +41 -4
- package/check/kit-decisions.mjs +46 -0
- package/dist/types/ui/src/components/forms/SegmentedControl.vue.d.ts +1 -1
- package/dist/types/ui/src/components/layout/BottomSheet.vue.d.ts +1 -0
- package/dist/types/ui/src/components/layout/SplitView.vue.d.ts +11 -7
- package/dist/types/ui/src/components/overlays/ResponsiveOverlay.vue.d.ts +12 -2
- package/dist/types/ui/src/composables/useListNavigation.d.ts +1 -1
- package/dist/types/ui/src/composables/useTheme.d.ts +0 -2
- package/dist/types/ui/src/icons/iconSets.d.ts +6 -0
- package/dist/types/ui/src/lib/portPreview.d.ts +2 -1
- package/dist/types/ui/src/lib/textDiff.d.ts +1 -0
- package/package.json +1 -1
package/check/extension.d.mts
CHANGED
|
@@ -4,12 +4,17 @@ export interface KitFinding {
|
|
|
4
4
|
readonly why: string;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
/** One version's record in extension-api's surface.json
|
|
7
|
+
/** One version's record in extension-api's surface.json: the two grains a bundle links by name, and the wire it may read. */
|
|
8
8
|
export interface RecordedLinks {
|
|
9
9
|
readonly uiKitExports?: readonly string[];
|
|
10
10
|
readonly moduleExports?: readonly string[];
|
|
11
|
+
/** Per @intentic/sandbox-contract specifier an extension may import, from 2.44.0. */
|
|
12
|
+
readonly wireExports?: Readonly<Record<string, { readonly exports: readonly string[]; readonly schemas: string }>>;
|
|
11
13
|
}
|
|
12
14
|
|
|
15
|
+
/** The sandbox-contract specifiers the newest record that has `wireExports` allows, or undefined when none has. */
|
|
16
|
+
export declare const wireOf: (surface: Readonly<Record<string, RecordedLinks>> | undefined) => ReadonlySet<string> | undefined;
|
|
17
|
+
|
|
13
18
|
/** What an extension's sources must change for the kit and API it builds against (check/extension.mjs). */
|
|
14
19
|
export declare const extensionFindings: (input: {
|
|
15
20
|
readonly files: readonly { readonly path: string; readonly text: string }[];
|
package/check/extension.mjs
CHANGED
|
@@ -8,7 +8,10 @@
|
|
|
8
8
|
// - the kit's decided looks (kit-decisions.mjs: a header decision at the call site, a header drawn by hand, a card in a
|
|
9
9
|
// card, sections nothing spaces, a row's own height, an icon nudged by hand);
|
|
10
10
|
// - a name imported from the kit or the API that the manifest's `engines.intentic` floor does not have, read off the
|
|
11
|
-
// API's surface record (surface.json), so a bundle never reaches a host whose link would fail
|
|
11
|
+
// API's surface record (surface.json), so a bundle never reaches a host whose link would fail;
|
|
12
|
+
// - a @intentic/sandbox-contract subpath outside the slice the extension API versions (`wireExports` in the newest
|
|
13
|
+
// surface record, extension-api's EXTENSION_WIRE): the contract moves with the product release, so a schema read from
|
|
14
|
+
// any other subpath can change under a `^1.x` range with nothing saying so.
|
|
12
15
|
// Pure: the caller hands in the files, the manifest and the surface record. check/cli.mjs is the command around it.
|
|
13
16
|
import { extensionUiDeprecated, extensionUiNames, extensionUiRetired } from "../names.mjs";
|
|
14
17
|
import { glyphFindings, sectionFindings } from "./kit-decisions.mjs";
|
|
@@ -16,6 +19,7 @@ import { blank } from "./scan.mjs";
|
|
|
16
19
|
|
|
17
20
|
const KIT = `@intentic/extension-ui`;
|
|
18
21
|
const API = `@intentic/extension-api`;
|
|
22
|
+
const CONTRACT = `@intentic/sandbox-contract`;
|
|
19
23
|
|
|
20
24
|
// A finding at a line excused by `allow(kit-check): <reason>` on that line or the one above it, in any comment form.
|
|
21
25
|
const ALLOW = /allow\(kit-check\):\s*\S/u;
|
|
@@ -153,14 +157,47 @@ const enginesFindings = (files, range, surface) => {
|
|
|
153
157
|
return [{ at: MANIFEST, why: `engines.intentic "${range}" admits hosts from ${floor}, which lack ${lacked}: such a host refuses the bundle at link, so raise it to "^${highest}"` }];
|
|
154
158
|
};
|
|
155
159
|
|
|
160
|
+
/**
|
|
161
|
+
* The @intentic/sandbox-contract specifiers an extension may import, as the newest surface record that has them lists
|
|
162
|
+
* (`wireExports`, from 2.44.0), or undefined when no record does: an API from before the wire was versioned holds an
|
|
163
|
+
* extension to nothing, and the intentic repository's own checks hold its list equal to the linter's.
|
|
164
|
+
*/
|
|
165
|
+
export const wireOf = (surface) => {
|
|
166
|
+
const version = Object.keys(surface ?? {})
|
|
167
|
+
.filter((entry) => surface[entry]?.wireExports !== undefined)
|
|
168
|
+
.toSorted(compare)
|
|
169
|
+
.at(-1);
|
|
170
|
+
return version === undefined ? undefined : new Set(Object.keys(surface[version].wireExports));
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
// Every specifier naming the wire contract, from an import, a re-export, a side-effect import or a dynamic one; a
|
|
174
|
+
// type-only import counts too, since a reshaped type is the change the record exists to catch.
|
|
175
|
+
const CONTRACT_SPECIFIER = /(?:\bfrom\s*|\bimport\s*\(\s*|\bimport\s+)["'](@intentic\/sandbox-contract(?:\/[^"']*)?)["']/gu;
|
|
176
|
+
|
|
177
|
+
// A wire subpath the extension API does not version, imported.
|
|
178
|
+
const wireFindings = (file, wire) =>
|
|
179
|
+
wire === undefined
|
|
180
|
+
? []
|
|
181
|
+
: sourceFindings(
|
|
182
|
+
file,
|
|
183
|
+
[...file.text.matchAll(CONTRACT_SPECIFIER)]
|
|
184
|
+
.filter((match) => !wire.has(match[1]))
|
|
185
|
+
.map((match) => ({
|
|
186
|
+
index: match.index,
|
|
187
|
+
why: `\`${match[1]}\` is a part of ${CONTRACT} the extension API does not version, so it can change under the extension with nothing saying so: import from the subpaths EXTENSION_WIRE lists (${API}/wire), or have it added there`,
|
|
188
|
+
})),
|
|
189
|
+
);
|
|
190
|
+
|
|
156
191
|
/**
|
|
157
192
|
* Every place an extension's sources leave the kit's decisions or its engines floor, as `{ at: "path:line", why }`.
|
|
158
193
|
* `files` are `{ path, text }` (.vue and .ts/.mts/.js/.mjs; tests and declarations are the caller's to leave out),
|
|
159
194
|
* `manifest` the parsed intentic-extension.json, `surface` the parsed surface.json of the extension API it builds
|
|
160
195
|
* against, or undefined when that cannot be read (the engines rule then says so instead of judging).
|
|
161
196
|
*/
|
|
162
|
-
export const extensionFindings = ({ files, manifest, surface }) =>
|
|
163
|
-
|
|
197
|
+
export const extensionFindings = ({ files, manifest, surface }) => {
|
|
198
|
+
const wire = wireOf(surface);
|
|
199
|
+
return [
|
|
164
200
|
...enginesFindings(files, manifest?.engines?.intentic, surface),
|
|
165
|
-
...files.flatMap((file) => [...importFindings(file), ...memberFindings(file), ...templateFindings(file)]),
|
|
201
|
+
...files.flatMap((file) => [...importFindings(file), ...memberFindings(file), ...templateFindings(file), ...wireFindings(file, wire)]),
|
|
166
202
|
].toSorted((a, b) => a.at.localeCompare(b.at, undefined, { numeric: true }));
|
|
203
|
+
};
|
package/check/kit-decisions.mjs
CHANGED
|
@@ -98,6 +98,52 @@ const unspaced = (frame) => {
|
|
|
98
98
|
: `<${frame.name}> holds several <RowGroup>/<Section>s and states no gap between them, so their headers touch the section above: give it the stack's gap (\`flex flex-col gap-6\`)`;
|
|
99
99
|
};
|
|
100
100
|
|
|
101
|
+
// ── 11 · a fixed sentence about a group leading its rows. What a section is for is said once, in its header's (i); a note
|
|
102
|
+
// on the surface is what is true now (a warning, an empty list, a step to take). The two together were the same words
|
|
103
|
+
// twice, one of them dressed as a row, and the owner asked for one place (2026-11-24).
|
|
104
|
+
const STATEFUL = /(?:^|\s)(?:v-if|v-else-if|v-else|v-show)(?:[\s=>]|$)/u;
|
|
105
|
+
// One catalog message, nothing interpolated: what a note says whatever the state.
|
|
106
|
+
const FIXED_TEXT = /^\s*t\(\s*`[\w.-]+`\s*\)\s*$/u;
|
|
107
|
+
|
|
108
|
+
// A note drawn whatever the state, untoned, a sentence (not empty / action / block), whose words are one fixed message,
|
|
109
|
+
// as its `label` or as its whole slot.
|
|
110
|
+
const fixedNote = (attrs, scan, bodyStart, selfClosing) => {
|
|
111
|
+
if (STATEFUL.test(attrs) || /(?:^|\s):?tone="/u.test(attrs) || /(?:^|\s)variant="(?!note")/u.test(attrs)) {
|
|
112
|
+
return false;
|
|
113
|
+
}
|
|
114
|
+
const label = /(?:^|\s):label="([^"]*)"/u.exec(attrs)?.[1];
|
|
115
|
+
if (label !== undefined) {
|
|
116
|
+
return FIXED_TEXT.test(label);
|
|
117
|
+
}
|
|
118
|
+
const close = selfClosing === `` ? scan.indexOf(`</RowNote>`, bodyStart) : -1;
|
|
119
|
+
const said = close === -1 ? undefined : /^\s*\{\{([\s\S]*)\}\}\s*$/u.exec(scan.slice(bodyStart, close))?.[1];
|
|
120
|
+
return said !== undefined && FIXED_TEXT.test(said);
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
/** A blanked template's groups that open on a fixed sentence about themselves (11). */
|
|
124
|
+
export const leadNoteFindings = (path, scan) => {
|
|
125
|
+
const findings = [];
|
|
126
|
+
walk(scan, ({ name, attrs, index, end, selfClosing }, stack) => {
|
|
127
|
+
const transparent = name === `template` && !/(?:^|\s)(?:#|v-slot)/u.test(attrs);
|
|
128
|
+
const namedSlot = name === `template` && !transparent;
|
|
129
|
+
const parentAt = stack.findLastIndex((frame) => !frame.transparent);
|
|
130
|
+
const group = stack[parentAt]?.name === `RowGroup` ? stack[parentAt] : undefined;
|
|
131
|
+
if (group !== undefined && !namedSlot && !transparent && group.drawn !== true) {
|
|
132
|
+
group.drawn = true;
|
|
133
|
+
// A `<template v-if>` between the note and its group makes it as conditional as a `v-if` on the note.
|
|
134
|
+
const gated = stack.slice(parentAt + 1).some((frame) => frame.gated);
|
|
135
|
+
if (name === `RowNote` && !gated && fixedNote(attrs, scan, end, selfClosing)) {
|
|
136
|
+
findings.push({
|
|
137
|
+
at: at(path, scan, index),
|
|
138
|
+
why: `<RowNote> opens its <RowGroup> with a fixed sentence about the group: what a section is for goes in its header's (i) (\`#info\`, with the sentence as the card's headline), and a list with nothing in it says so in a \`variant="empty"\` note. A note leading the rows is what is true now: conditional (\`v-if\`), toned (\`tone\`), or not one fixed catalog sentence`,
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
return { name, transparent, gated: transparent && STATEFUL.test(attrs) };
|
|
143
|
+
});
|
|
144
|
+
return findings;
|
|
145
|
+
};
|
|
146
|
+
|
|
101
147
|
/**
|
|
102
148
|
* A blanked template's section findings: a header decision taken at the call site (4), a group among another group's
|
|
103
149
|
* rows (8), sections side by side with nothing spacing them (9), a row given a height (10).
|
|
@@ -15,7 +15,7 @@ declare const __VLS_export: <T extends string>(__VLS_props: NonNullable<Awaited<
|
|
|
15
15
|
disabled?: boolean;
|
|
16
16
|
}[];
|
|
17
17
|
size?: `sm` | `xs`;
|
|
18
|
-
variant?: `pills` | `underline`;
|
|
18
|
+
variant?: `pills` | `underline` | `title`;
|
|
19
19
|
stretch?: boolean;
|
|
20
20
|
wrap?: boolean;
|
|
21
21
|
} & {
|
|
@@ -9,7 +9,7 @@ type __VLS_Props = {
|
|
|
9
9
|
};
|
|
10
10
|
declare var __VLS_6: {}, __VLS_8: {}, __VLS_10: {}, __VLS_12: {}, __VLS_14: {
|
|
11
11
|
compact: boolean;
|
|
12
|
-
},
|
|
12
|
+
}, __VLS_23: {}, __VLS_26: {}, __VLS_41: {}, __VLS_44: {}, __VLS_46: {}, __VLS_48: {}, __VLS_50: {}, __VLS_52: {
|
|
13
13
|
compact: boolean;
|
|
14
14
|
};
|
|
15
15
|
type __VLS_Slots = {} & {
|
|
@@ -23,17 +23,21 @@ type __VLS_Slots = {} & {
|
|
|
23
23
|
} & {
|
|
24
24
|
detail?: (props: typeof __VLS_14) => any;
|
|
25
25
|
} & {
|
|
26
|
-
info?: (props: typeof
|
|
26
|
+
info?: (props: typeof __VLS_23) => any;
|
|
27
27
|
} & {
|
|
28
|
-
actions?: (props: typeof
|
|
28
|
+
actions?: (props: typeof __VLS_26) => any;
|
|
29
29
|
} & {
|
|
30
|
-
|
|
30
|
+
info?: (props: typeof __VLS_41) => any;
|
|
31
31
|
} & {
|
|
32
|
-
|
|
32
|
+
actions?: (props: typeof __VLS_44) => any;
|
|
33
33
|
} & {
|
|
34
|
-
|
|
34
|
+
strips?: (props: typeof __VLS_46) => any;
|
|
35
35
|
} & {
|
|
36
|
-
|
|
36
|
+
compact?: (props: typeof __VLS_48) => any;
|
|
37
|
+
} & {
|
|
38
|
+
rail?: (props: typeof __VLS_50) => any;
|
|
39
|
+
} & {
|
|
40
|
+
detail?: (props: typeof __VLS_52) => any;
|
|
37
41
|
};
|
|
38
42
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
39
43
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -5,16 +5,26 @@ type __VLS_Props = {
|
|
|
5
5
|
panelClass?: string;
|
|
6
6
|
side?: Side;
|
|
7
7
|
cross?: Cross;
|
|
8
|
+
padded?: boolean;
|
|
9
|
+
titled?: boolean;
|
|
8
10
|
};
|
|
9
11
|
type __VLS_ModelProps = {
|
|
10
12
|
modelValue: boolean;
|
|
11
13
|
};
|
|
12
14
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
13
|
-
declare var __VLS_7: {
|
|
15
|
+
declare var __VLS_7: {
|
|
16
|
+
titleId: string | undefined;
|
|
17
|
+
}, __VLS_9: {
|
|
18
|
+
titleId: string | undefined;
|
|
19
|
+
}, __VLS_17: {
|
|
20
|
+
titleId: string | undefined;
|
|
21
|
+
};
|
|
14
22
|
type __VLS_Slots = {} & {
|
|
15
23
|
default?: (props: typeof __VLS_7) => any;
|
|
16
24
|
} & {
|
|
17
|
-
default?: (props: typeof
|
|
25
|
+
default?: (props: typeof __VLS_9) => any;
|
|
26
|
+
} & {
|
|
27
|
+
default?: (props: typeof __VLS_17) => any;
|
|
18
28
|
};
|
|
19
29
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
20
30
|
"update:modelValue": (value: boolean) => any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Ref } from "vue";
|
|
2
|
-
export declare function useListNavigation<T>(rows: Ref<readonly T[]>, keyOf: (row: T) => string): {
|
|
2
|
+
export declare function useListNavigation<T>(rows: Ref<readonly T[]>, keyOf: (row: T) => string, home?: (rows: readonly T[]) => number): {
|
|
3
3
|
activeIndex: Ref<number, number>;
|
|
4
4
|
activeRow: import("vue").ComputedRef<T | undefined>;
|
|
5
5
|
move: (delta: number) => void;
|
|
@@ -297,6 +297,9 @@ export declare const ICONS: {
|
|
|
297
297
|
maintenance: {
|
|
298
298
|
outline: string;
|
|
299
299
|
};
|
|
300
|
+
memory: {
|
|
301
|
+
outline: string;
|
|
302
|
+
};
|
|
300
303
|
microphone: {
|
|
301
304
|
outline: string;
|
|
302
305
|
};
|
|
@@ -335,6 +338,9 @@ export declare const ICONS: {
|
|
|
335
338
|
play: {
|
|
336
339
|
outline: string;
|
|
337
340
|
};
|
|
341
|
+
pointer: {
|
|
342
|
+
outline: string;
|
|
343
|
+
};
|
|
338
344
|
plug: {
|
|
339
345
|
outline: string;
|
|
340
346
|
};
|
|
@@ -24,8 +24,9 @@ export interface ForwardedPortTab {
|
|
|
24
24
|
readonly forward: (port: number) => Promise<string | undefined>;
|
|
25
25
|
readonly listed?: (port: number) => Promise<string | undefined>;
|
|
26
26
|
readonly onError?: (message: string) => void;
|
|
27
|
+
readonly handOff?: (url: string) => void;
|
|
27
28
|
}
|
|
28
|
-
export declare const openForwardedPort: ({ port, path, forward, listed, onError }: ForwardedPortTab) => void;
|
|
29
|
+
export declare const openForwardedPort: ({ port, path, forward, listed, onError, handOff }: ForwardedPortTab) => void;
|
|
29
30
|
export declare const parseLoopbackLink: (uri: string) => {
|
|
30
31
|
port: number;
|
|
31
32
|
path: string;
|
|
@@ -14,6 +14,7 @@ export type Op<T> = {
|
|
|
14
14
|
export declare const diffSequence: <T>(before: readonly T[], after: readonly T[], equal: (left: T, right: T) => boolean, maxCells?: number) => Op<T>[] | undefined;
|
|
15
15
|
export declare const wordDiff: (before: string, after: string) => Segment[];
|
|
16
16
|
export declare const similarity: (before: string, after: string) => number;
|
|
17
|
+
export declare const similarityOf: (before: string, after: string, segments: readonly Segment[]) => number;
|
|
17
18
|
export type Edit<T> = {
|
|
18
19
|
readonly kind: "same";
|
|
19
20
|
readonly before: T;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentic/extension-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.431.0",
|
|
4
4
|
"description": "The UI kit intentic extensions render with, host-provided at runtime (the app's own components via the import map), so extension UI is always native to the shell",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|