@intentic/extension-ui 1.393.0 → 1.395.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.mjs +2 -2
- package/check/scan.mjs +3 -3
- package/dist/types/ui/src/components/charts/dagLayered.d.ts +19 -0
- package/dist/types/ui/src/components/charts/dagLayout.d.ts +6 -1
- package/dist/types/ui/src/icons/iconSets.d.ts +13 -0
- package/dist/types/ui/src/lib/format.d.ts +1 -0
- package/package.json +1 -1
package/check/extension.mjs
CHANGED
|
@@ -33,12 +33,12 @@ const importsOf = (text) =>
|
|
|
33
33
|
.split(`,`)
|
|
34
34
|
.map((entry) => entry.trim())
|
|
35
35
|
.filter((entry) => entry !== `` && !entry.startsWith(`type `))
|
|
36
|
-
.map((entry) => ({ name: entry.split(/\
|
|
36
|
+
.map((entry) => ({ name: entry.split(/\sas\s/u)[0].trim(), from: match[3], index: match.index })),
|
|
37
37
|
);
|
|
38
38
|
|
|
39
39
|
// `^2.34.0` or `2.34.0`, the two forms the host's matcher (extension-api engines.ts) accepts; its floor, or undefined.
|
|
40
40
|
const floorOf = (range) => {
|
|
41
|
-
const match = /^\s
|
|
41
|
+
const match = /^\s*(?:\^\s*)?(\d+)(?:\.(\d+))?(?:\.(\d+))?\s*$/u.exec(range ?? ``);
|
|
42
42
|
return match === null ? undefined : `${match[1]}.${match[2] ?? 0}.${match[3] ?? 0}`;
|
|
43
43
|
};
|
|
44
44
|
const parts = (version) => version.split(`.`).map(Number);
|
package/check/scan.mjs
CHANGED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
const blanked = (m) => m.replace(/[^\n]/gu, ` `);
|
|
8
8
|
export const blank = (source) =>
|
|
9
9
|
source
|
|
10
|
-
.replace(/<script\b[^>]*>[\s\S]*?<\/script
|
|
11
|
-
.replace(/<style\b[^>]*>[\s\S]*?<\/style
|
|
12
|
-
.replace(/<!--[\s\S]
|
|
10
|
+
.replace(/<script\b[^>]*>[\s\S]*?<\/script[^>]*>/giu, blanked)
|
|
11
|
+
.replace(/<style\b[^>]*>[\s\S]*?<\/style[^>]*>/giu, blanked)
|
|
12
|
+
.replace(/<!--[\s\S]*?--!?>/gu, blanked);
|
|
13
13
|
|
|
14
14
|
// A tag walk, not a parser: attribute values are consumed as units so a `>` inside `:class="{…}"` can't end a tag
|
|
15
15
|
// early. A generator, not a shared regex, since `/g` carries `lastIndex` and callers would fight over one cursor.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { DagEdge, DagLayoutOptions, DagNode, DagPoint } from "./dagLayout.js";
|
|
2
|
+
export interface LayeredPlacement {
|
|
3
|
+
readonly nodes: ReadonlyMap<string, DagPoint>;
|
|
4
|
+
readonly lanes: ReadonlyMap<string, readonly DagPoint[]>;
|
|
5
|
+
readonly extent: DagExtent;
|
|
6
|
+
}
|
|
7
|
+
export interface DagExtent {
|
|
8
|
+
readonly x: number;
|
|
9
|
+
readonly y: number;
|
|
10
|
+
readonly width: number;
|
|
11
|
+
readonly height: number;
|
|
12
|
+
}
|
|
13
|
+
type Spacing = DagLayoutOptions & {
|
|
14
|
+
readonly rankSep: number;
|
|
15
|
+
readonly nodeSep: number;
|
|
16
|
+
};
|
|
17
|
+
export declare const wrapLines: (widths: readonly number[], maxSpan: number, gap: number) => number[];
|
|
18
|
+
export declare const layered: (nodes: readonly DagNode<never>[], edges: readonly DagEdge[], columns: ReadonlyMap<string, number>, options: Spacing) => LayeredPlacement;
|
|
19
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { TooltipValue } from "../../lib/tooltip.js";
|
|
2
|
+
import { type DagExtent } from "./dagLayered.js";
|
|
2
3
|
export interface DagNode<T = unknown> {
|
|
3
4
|
readonly id: string;
|
|
4
5
|
readonly data: T;
|
|
@@ -22,6 +23,7 @@ export interface DagLayoutOptions {
|
|
|
22
23
|
readonly nodeHeight: number;
|
|
23
24
|
readonly rankSep?: number;
|
|
24
25
|
readonly nodeSep?: number;
|
|
26
|
+
readonly wrapAt?: number;
|
|
25
27
|
}
|
|
26
28
|
export declare const layoutSignature: (nodes: readonly DagNode<never>[], edges: readonly DagEdge[], options: DagLayoutOptions) => string;
|
|
27
29
|
export interface DagPoint {
|
|
@@ -31,7 +33,10 @@ export interface DagPoint {
|
|
|
31
33
|
export interface DagPlacement {
|
|
32
34
|
readonly nodes: ReadonlyMap<string, DagPoint>;
|
|
33
35
|
readonly lanes: ReadonlyMap<string, readonly DagPoint[]>;
|
|
36
|
+
readonly extent: DagExtent;
|
|
34
37
|
}
|
|
38
|
+
export { type DagExtent, wrapLines } from "./dagLayered.js";
|
|
35
39
|
export declare const laneKey: (from: string, to: string) => string;
|
|
36
40
|
export declare const layoutDag: (nodes: readonly DagNode<never>[], edges: readonly DagEdge[], options: DagLayoutOptions) => DagPlacement;
|
|
37
|
-
export declare const lanePath: (from: DagPoint, to: DagPoint, via?: readonly DagPoint[], radius?: number) => string;
|
|
41
|
+
export declare const lanePath: (from: DagPoint, to: DagPoint, via?: readonly DagPoint[], radius?: number, direction?: `LR` | `TB`) => string;
|
|
42
|
+
export declare const smoothPath: (from: DagPoint, to: DagPoint, via?: readonly DagPoint[], gutter?: number, direction?: `LR` | `TB`) => string;
|
|
@@ -176,6 +176,9 @@ export declare const ICONS: {
|
|
|
176
176
|
"external-link": {
|
|
177
177
|
outline: string;
|
|
178
178
|
};
|
|
179
|
+
diff: {
|
|
180
|
+
outline: string;
|
|
181
|
+
};
|
|
179
182
|
eye: {
|
|
180
183
|
outline: string;
|
|
181
184
|
solid: string;
|
|
@@ -183,6 +186,10 @@ export declare const ICONS: {
|
|
|
183
186
|
"eye-slash": {
|
|
184
187
|
outline: string;
|
|
185
188
|
};
|
|
189
|
+
"face-smile": {
|
|
190
|
+
outline: string;
|
|
191
|
+
solid: string;
|
|
192
|
+
};
|
|
186
193
|
file: {
|
|
187
194
|
outline: string;
|
|
188
195
|
};
|
|
@@ -216,6 +223,12 @@ export declare const ICONS: {
|
|
|
216
223
|
forward: {
|
|
217
224
|
outline: string;
|
|
218
225
|
};
|
|
226
|
+
"flow-columns": {
|
|
227
|
+
outline: string;
|
|
228
|
+
};
|
|
229
|
+
"flow-rows": {
|
|
230
|
+
outline: string;
|
|
231
|
+
};
|
|
219
232
|
gift: {
|
|
220
233
|
outline: string;
|
|
221
234
|
};
|
|
@@ -26,6 +26,7 @@ export declare const timeAgo: (at: number, { now, days }?: {
|
|
|
26
26
|
now?: number;
|
|
27
27
|
days?: boolean;
|
|
28
28
|
}) => string;
|
|
29
|
+
export declare const formatAge: (at: number, now?: number) => string;
|
|
29
30
|
export declare const freshness: (at: number) => string;
|
|
30
31
|
export declare const formatCount: (value: number) => string;
|
|
31
32
|
export declare const formatCompact: (value: number) => string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentic/extension-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.395.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",
|