@intentic/extension-ui 1.176.3
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 +45 -0
- package/dist/format.js +16 -0
- package/dist/index.js +88 -0
- package/dist/types/extension-ui/src/format.d.ts +1 -0
- package/dist/types/extension-ui/src/index.d.ts +9 -0
- package/dist/types/ui/src/clipboard.d.ts +1 -0
- package/dist/types/ui/src/cmp.d.ts +11 -0
- package/dist/types/ui/src/components/AgentRunButton.vue.d.ts +22 -0
- package/dist/types/ui/src/components/AnchoredOverlay.vue.d.ts +29 -0
- package/dist/types/ui/src/components/Avatar.vue.d.ts +11 -0
- package/dist/types/ui/src/components/BarChart.vue.d.ts +9 -0
- package/dist/types/ui/src/components/BottomSheet.vue.d.ts +24 -0
- package/dist/types/ui/src/components/BrandMark.vue.d.ts +10 -0
- package/dist/types/ui/src/components/Card.vue.d.ts +16 -0
- package/dist/types/ui/src/components/ChangeStatusMark.vue.d.ts +7 -0
- package/dist/types/ui/src/components/Code.vue.d.ts +16 -0
- package/dist/types/ui/src/components/CodeField.vue.d.ts +19 -0
- package/dist/types/ui/src/components/ConfirmDialog.vue.d.ts +39 -0
- package/dist/types/ui/src/components/ContextMenu.vue.d.ts +12 -0
- package/dist/types/ui/src/components/CopyButton.vue.d.ts +13 -0
- package/dist/types/ui/src/components/CountBar.vue.d.ts +24 -0
- package/dist/types/ui/src/components/DagEditor.vue.d.ts +39 -0
- package/dist/types/ui/src/components/DagGraph.vue.d.ts +41 -0
- package/dist/types/ui/src/components/DiffStat.vue.d.ts +7 -0
- package/dist/types/ui/src/components/FilterBar.vue.d.ts +30 -0
- package/dist/types/ui/src/components/Icon.vue.d.ts +8 -0
- package/dist/types/ui/src/components/ImageView.vue.d.ts +6 -0
- package/dist/types/ui/src/components/InfoDialog.vue.d.ts +16 -0
- package/dist/types/ui/src/components/InfoHint.vue.d.ts +17 -0
- package/dist/types/ui/src/components/InfoTable.vue.d.ts +7 -0
- package/dist/types/ui/src/components/Markdown.vue.d.ts +8 -0
- package/dist/types/ui/src/components/MarkdownFigure.vue.d.ts +7 -0
- package/dist/types/ui/src/components/NavRail.vue.d.ts +41 -0
- package/dist/types/ui/src/components/Notice.vue.d.ts +12 -0
- package/dist/types/ui/src/components/NoticeStack.vue.d.ts +12 -0
- package/dist/types/ui/src/components/Page.vue.d.ts +18 -0
- package/dist/types/ui/src/components/PageAction.vue.d.ts +40 -0
- package/dist/types/ui/src/components/PageHeader.vue.d.ts +21 -0
- package/dist/types/ui/src/components/Panel.vue.d.ts +35 -0
- package/dist/types/ui/src/components/Picker.vue.d.ts +43 -0
- package/dist/types/ui/src/components/ProgressRing.vue.d.ts +8 -0
- package/dist/types/ui/src/components/ProseField.vue.d.ts +17 -0
- package/dist/types/ui/src/components/ResizeSeam.vue.d.ts +18 -0
- package/dist/types/ui/src/components/ResponsiveOverlay.vue.d.ts +31 -0
- package/dist/types/ui/src/components/Row.vue.d.ts +39 -0
- package/dist/types/ui/src/components/RowGroup.vue.d.ts +25 -0
- package/dist/types/ui/src/components/SearchBar.vue.d.ts +24 -0
- package/dist/types/ui/src/components/Segmented.vue.d.ts +35 -0
- package/dist/types/ui/src/components/SplitView.vue.d.ts +32 -0
- package/dist/types/ui/src/components/StatRow.vue.d.ts +7 -0
- package/dist/types/ui/src/components/StatusBadge.vue.d.ts +21 -0
- package/dist/types/ui/src/components/StepSection.vue.d.ts +22 -0
- package/dist/types/ui/src/components/barChart.d.ts +9 -0
- package/dist/types/ui/src/components/changeStatus.d.ts +3 -0
- package/dist/types/ui/src/components/dagLayout.d.ts +24 -0
- package/dist/types/ui/src/components/imageView.d.ts +1 -0
- package/dist/types/ui/src/components/navRail.d.ts +8 -0
- package/dist/types/ui/src/components/notice.d.ts +17 -0
- package/dist/types/ui/src/components/picker.d.ts +16 -0
- package/dist/types/ui/src/components/seriesAccent.d.ts +2 -0
- package/dist/types/ui/src/components/splitView.d.ts +3 -0
- package/dist/types/ui/src/composables/anchorPlacement.d.ts +29 -0
- package/dist/types/ui/src/composables/shikiLangs.d.ts +44 -0
- package/dist/types/ui/src/composables/useAgentRunPick.d.ts +25 -0
- package/dist/types/ui/src/composables/useAsyncAction.d.ts +33 -0
- package/dist/types/ui/src/composables/useDevice.d.ts +8 -0
- package/dist/types/ui/src/composables/useListNavigation.d.ts +7 -0
- package/dist/types/ui/src/composables/useNarrow.d.ts +2 -0
- package/dist/types/ui/src/composables/useNow.d.ts +2 -0
- package/dist/types/ui/src/composables/useTheme.d.ts +9 -0
- package/dist/types/ui/src/format.d.ts +14 -0
- package/dist/types/ui/src/icons/iconSets.d.ts +3 -0
- package/dist/types/ui/src/index.d.ts +64 -0
- package/dist/types/ui/src/markdown/code.d.ts +7 -0
- package/dist/types/ui/src/markdown/figures.d.ts +57 -0
- package/dist/types/ui/src/markdown/index.d.ts +3 -0
- package/dist/types/ui/src/markdown/render.d.ts +18 -0
- package/dist/types/ui/src/timeWindow.d.ts +8 -0
- package/names.mjs +82 -0
- package/package.json +53 -0
- package/src/format.ts +23 -0
- package/src/index.ts +200 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { IconName } from "../icons/iconSets.js";
|
|
2
|
+
export interface PickerOption<T extends string = string> {
|
|
3
|
+
readonly value: T;
|
|
4
|
+
readonly label: string;
|
|
5
|
+
readonly description?: string;
|
|
6
|
+
readonly icon?: IconName;
|
|
7
|
+
readonly mono?: boolean;
|
|
8
|
+
readonly disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface PickerGroup<T extends string = string> {
|
|
11
|
+
readonly label?: string;
|
|
12
|
+
readonly options: readonly PickerOption<T>[];
|
|
13
|
+
}
|
|
14
|
+
export type PickerOptions<T extends string = string> = readonly PickerOption<T>[] | readonly PickerGroup<T>[];
|
|
15
|
+
export declare const nextPickerId: () => string;
|
|
16
|
+
export declare const normalizePickerGroups: <T extends string>(options: PickerOptions<T>) => readonly PickerGroup<T>[];
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export type Side = "top" | "bottom" | "left" | "right";
|
|
2
|
+
export type Cross = "center" | "start" | "end";
|
|
3
|
+
export interface Size {
|
|
4
|
+
readonly width: number;
|
|
5
|
+
readonly height: number;
|
|
6
|
+
}
|
|
7
|
+
export interface AnchorRect {
|
|
8
|
+
readonly top: number;
|
|
9
|
+
readonly left: number;
|
|
10
|
+
readonly width: number;
|
|
11
|
+
readonly height: number;
|
|
12
|
+
}
|
|
13
|
+
export interface PlacementInput {
|
|
14
|
+
readonly anchor: AnchorRect;
|
|
15
|
+
readonly box: Size;
|
|
16
|
+
readonly view: Size;
|
|
17
|
+
readonly side: Side;
|
|
18
|
+
readonly cross: Cross;
|
|
19
|
+
readonly gap: number;
|
|
20
|
+
readonly edge: number;
|
|
21
|
+
}
|
|
22
|
+
export interface Placement {
|
|
23
|
+
readonly side: Side;
|
|
24
|
+
readonly left: number;
|
|
25
|
+
readonly top: number;
|
|
26
|
+
readonly maxHeight: number;
|
|
27
|
+
readonly arrow: number;
|
|
28
|
+
}
|
|
29
|
+
export declare const placeAnchored: ({ anchor, box, view, side, cross, gap, edge }: PlacementInput) => Placement;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export declare const LANGS: {
|
|
2
|
+
bash: () => Promise<typeof import("@shikijs/langs/bash")>;
|
|
3
|
+
powershell: () => Promise<typeof import("@shikijs/langs/powershell")>;
|
|
4
|
+
typescript: () => Promise<typeof import("@shikijs/langs/typescript")>;
|
|
5
|
+
tsx: () => Promise<typeof import("@shikijs/langs/tsx")>;
|
|
6
|
+
javascript: () => Promise<typeof import("@shikijs/langs/javascript")>;
|
|
7
|
+
jsx: () => Promise<typeof import("@shikijs/langs/jsx")>;
|
|
8
|
+
json: () => Promise<typeof import("@shikijs/langs/json")>;
|
|
9
|
+
yaml: () => Promise<typeof import("@shikijs/langs/yaml")>;
|
|
10
|
+
css: () => Promise<typeof import("@shikijs/langs/css")>;
|
|
11
|
+
scss: () => Promise<typeof import("@shikijs/langs/scss")>;
|
|
12
|
+
less: () => Promise<typeof import("@shikijs/langs/less")>;
|
|
13
|
+
html: () => Promise<typeof import("@shikijs/langs/html")>;
|
|
14
|
+
python: () => Promise<typeof import("@shikijs/langs/python")>;
|
|
15
|
+
go: () => Promise<typeof import("@shikijs/langs/go")>;
|
|
16
|
+
rust: () => Promise<typeof import("@shikijs/langs/rust")>;
|
|
17
|
+
java: () => Promise<typeof import("@shikijs/langs/java")>;
|
|
18
|
+
c: () => Promise<typeof import("@shikijs/langs/c")>;
|
|
19
|
+
cpp: () => Promise<typeof import("@shikijs/langs/cpp")>;
|
|
20
|
+
csharp: () => Promise<typeof import("@shikijs/langs/csharp")>;
|
|
21
|
+
sql: () => Promise<typeof import("@shikijs/langs/sql")>;
|
|
22
|
+
toml: () => Promise<typeof import("@shikijs/langs/toml")>;
|
|
23
|
+
xml: () => Promise<typeof import("@shikijs/langs/xml")>;
|
|
24
|
+
ini: () => Promise<typeof import("@shikijs/langs/ini")>;
|
|
25
|
+
docker: () => Promise<typeof import("@shikijs/langs/docker")>;
|
|
26
|
+
dotenv: () => Promise<typeof import("@shikijs/langs/dotenv")>;
|
|
27
|
+
gitignore: () => Promise<typeof import("./gitignoreGrammar")>;
|
|
28
|
+
make: () => Promise<typeof import("@shikijs/langs/make")>;
|
|
29
|
+
prisma: () => Promise<typeof import("@shikijs/langs/prisma")>;
|
|
30
|
+
graphql: () => Promise<typeof import("@shikijs/langs/graphql")>;
|
|
31
|
+
vue: () => Promise<typeof import("@shikijs/langs/vue")>;
|
|
32
|
+
svelte: () => Promise<typeof import("@shikijs/langs/svelte")>;
|
|
33
|
+
astro: () => Promise<typeof import("@shikijs/langs/astro")>;
|
|
34
|
+
php: () => Promise<typeof import("@shikijs/langs/php")>;
|
|
35
|
+
ruby: () => Promise<typeof import("@shikijs/langs/ruby")>;
|
|
36
|
+
kotlin: () => Promise<typeof import("@shikijs/langs/kotlin")>;
|
|
37
|
+
swift: () => Promise<typeof import("@shikijs/langs/swift")>;
|
|
38
|
+
diff: () => Promise<typeof import("@shikijs/langs/diff")>;
|
|
39
|
+
markdown: () => Promise<typeof import("@shikijs/langs/markdown")>;
|
|
40
|
+
log: () => Promise<typeof import("@shikijs/langs/log")>;
|
|
41
|
+
};
|
|
42
|
+
export type ShikiLang = keyof typeof LANGS;
|
|
43
|
+
export declare const langLoader: (lang: string) => (() => Promise<unknown>) | undefined;
|
|
44
|
+
export declare const shikiLangDeps: string[];
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type ComputedRef } from "vue";
|
|
2
|
+
export interface AgentRunChoice {
|
|
3
|
+
readonly provider: string;
|
|
4
|
+
readonly model: string;
|
|
5
|
+
readonly label: string;
|
|
6
|
+
readonly account?: string | undefined;
|
|
7
|
+
readonly harness?: string | undefined;
|
|
8
|
+
}
|
|
9
|
+
export interface ModelPicking {
|
|
10
|
+
agentRun(): AgentRunChoice;
|
|
11
|
+
pick(options: {
|
|
12
|
+
readonly anchor: HTMLElement;
|
|
13
|
+
readonly provider: string;
|
|
14
|
+
readonly model: string;
|
|
15
|
+
readonly account?: string | undefined;
|
|
16
|
+
readonly harness?: string | undefined;
|
|
17
|
+
}): Promise<AgentRunChoice | undefined>;
|
|
18
|
+
}
|
|
19
|
+
export interface AgentRunPicker {
|
|
20
|
+
readonly model: ComputedRef<AgentRunChoice>;
|
|
21
|
+
readonly overridden: ComputedRef<boolean>;
|
|
22
|
+
readonly choose: (anchor: HTMLElement) => Promise<void>;
|
|
23
|
+
readonly clear: () => void;
|
|
24
|
+
}
|
|
25
|
+
export declare function useAgentRunPick(models: () => ModelPicking): AgentRunPicker;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { NoticeModel, NoticeTone } from "../components/notice.js";
|
|
2
|
+
export declare const errorMessage: (error: unknown, fallback: string) => string;
|
|
3
|
+
interface NoticeOptions {
|
|
4
|
+
readonly tone?: NoticeTone;
|
|
5
|
+
readonly action?: NoticeModel[`action`];
|
|
6
|
+
readonly key?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const noticeFrom: (cause: unknown, wrote: string, options?: NoticeOptions) => NoticeModel;
|
|
9
|
+
export declare const noticeOf: (wrote: string, options?: NoticeOptions) => NoticeModel;
|
|
10
|
+
export declare function useAsyncAction(): {
|
|
11
|
+
busy: import("vue").Ref<boolean, boolean>;
|
|
12
|
+
notice: import("vue").Ref<{
|
|
13
|
+
readonly tone: NoticeTone;
|
|
14
|
+
readonly title: string;
|
|
15
|
+
readonly detail?: string | undefined;
|
|
16
|
+
readonly action?: {
|
|
17
|
+
readonly label: string;
|
|
18
|
+
readonly run: () => void;
|
|
19
|
+
} | undefined;
|
|
20
|
+
readonly key?: string | undefined;
|
|
21
|
+
} | undefined, NoticeModel | {
|
|
22
|
+
readonly tone: NoticeTone;
|
|
23
|
+
readonly title: string;
|
|
24
|
+
readonly detail?: string | undefined;
|
|
25
|
+
readonly action?: {
|
|
26
|
+
readonly label: string;
|
|
27
|
+
readonly run: () => void;
|
|
28
|
+
} | undefined;
|
|
29
|
+
readonly key?: string | undefined;
|
|
30
|
+
} | undefined>;
|
|
31
|
+
run: (task: () => Promise<void>, wrote: string) => Promise<void>;
|
|
32
|
+
};
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ComputedRef, type Ref } from "vue";
|
|
2
|
+
export type Device = "mobile" | "tablet" | "desktop";
|
|
3
|
+
export declare function useDevice(): {
|
|
4
|
+
device: ComputedRef<Device>;
|
|
5
|
+
mobile: ComputedRef<boolean>;
|
|
6
|
+
coarse: Readonly<Ref<boolean, boolean>>;
|
|
7
|
+
keyboardInset: Readonly<Ref<number, number>>;
|
|
8
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type Ref } from "vue";
|
|
2
|
+
export declare function useListNavigation<T>(rows: Ref<readonly T[]>, keyOf: (row: T) => string): {
|
|
3
|
+
activeIndex: Ref<number, number>;
|
|
4
|
+
activeRow: import("vue").ComputedRef<T | undefined>;
|
|
5
|
+
move: (delta: number) => void;
|
|
6
|
+
setRowEl: (key: string, el: unknown) => void;
|
|
7
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type Ref } from "vue";
|
|
2
|
+
export type ColorScheme = "light" | "dark";
|
|
3
|
+
export declare function useTheme(): {
|
|
4
|
+
scheme: Ref<ColorScheme, ColorScheme>;
|
|
5
|
+
set: (value: ColorScheme) => void;
|
|
6
|
+
toggle: () => void;
|
|
7
|
+
accent: Ref<string, string>;
|
|
8
|
+
setAccent: (hex: string) => void;
|
|
9
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const formatBytes: (bytes: number | undefined) => string;
|
|
2
|
+
export declare const formatTokens: (tokens: number) => string;
|
|
3
|
+
export declare const initialsOf: (name: string) => string | undefined;
|
|
4
|
+
export declare const formatDate: (at: number) => string;
|
|
5
|
+
export declare const formatDayMonth: (at: number) => string;
|
|
6
|
+
export declare const formatDateTime: (at: number) => string;
|
|
7
|
+
export declare const formatTimestamp: (at: number) => string;
|
|
8
|
+
export declare const formatTime: (at: number) => string;
|
|
9
|
+
export declare const formatClock: (at: number) => string;
|
|
10
|
+
export declare const formatWeekdayTime: (at: number) => string;
|
|
11
|
+
export declare const timeAgo: (at: number, { now, days }?: {
|
|
12
|
+
now?: number;
|
|
13
|
+
days?: boolean;
|
|
14
|
+
}) => string;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type IconName = "align-left" | "angle-right" | "arrow-circle-up" | "arrow-down-left" | "arrow-left" | "arrow-right" | "arrow-up-right" | "arrows-h" | "backward" | "bars" | "bolt" | "book" | "box" | "check" | "check-circle" | "check-square" | "chevron-down" | "chevron-right" | "chevron-up" | "circle" | "circle-fill" | "clock" | "clone" | "cloud" | "cloud-upload" | "code" | "cog" | "collapse-all" | "comments" | "compress" | "copy" | "credit-card" | "database" | "desktop" | "download" | "ellipsis" | "envelope" | "eraser" | "exclamation-circle" | "exclamation-triangle" | "expand" | "external-link" | "eye" | "eye-slash" | "file" | "file-edit" | "file-pdf" | "file-tree" | "filter" | "folder" | "folder-open" | "fork" | "forward" | "github" | "gitlab" | "globe" | "google" | "history" | "image" | "info-circle" | "key" | "link" | "list-check" | "lock" | "microphone" | "moon" | "palette" | "paperclip" | "pause" | "pencil" | "picture-in-picture" | "play" | "plus" | "plus-circle" | "question-circle" | "refresh" | "repeat" | "robot" | "save" | "search" | "send" | "server" | "shield" | "sign-in" | "sign-out" | "sitemap" | "slack" | "sliders-h" | "sparkles" | "spinner" | "square" | "star" | "star-fill" | "stop" | "sun" | "sync" | "terminal" | "th-large" | "times" | "trash" | "undo" | "unlock" | "upload" | "user" | "users" | "volume-off" | "volume-up" | "wave-pulse" | "wifi" | "window-maximize" | "window-minimize" | "wrench";
|
|
2
|
+
export declare const ICONS: Record<IconName, string>;
|
|
3
|
+
export declare const isIconName: (name: string) => name is IconName;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
export { clipboardOf } from "./clipboard.js";
|
|
2
|
+
export { cmp } from "./cmp.js";
|
|
3
|
+
export { default as AgentRunButton } from "./components/AgentRunButton.vue";
|
|
4
|
+
export { type AgentRunChoice, type AgentRunPicker, type ModelPicking, useAgentRunPick } from "./composables/useAgentRunPick.js";
|
|
5
|
+
export { default as AnchoredOverlay } from "./components/AnchoredOverlay.vue";
|
|
6
|
+
export { default as Avatar } from "./components/Avatar.vue";
|
|
7
|
+
export { default as BarChart } from "./components/BarChart.vue";
|
|
8
|
+
export { default as BottomSheet } from "./components/BottomSheet.vue";
|
|
9
|
+
export { default as BrandMark } from "./components/BrandMark.vue";
|
|
10
|
+
export { default as Card } from "./components/Card.vue";
|
|
11
|
+
export { default as ChangeStatusMark } from "./components/ChangeStatusMark.vue";
|
|
12
|
+
export { type ChangeStatus } from "./components/changeStatus.js";
|
|
13
|
+
export { default as DiffStat } from "./components/DiffStat.vue";
|
|
14
|
+
export { default as Code } from "./components/Code.vue";
|
|
15
|
+
export { default as CodeField } from "./components/CodeField.vue";
|
|
16
|
+
export { default as ConfirmDialog } from "./components/ConfirmDialog.vue";
|
|
17
|
+
export { default as ContextMenu } from "./components/ContextMenu.vue";
|
|
18
|
+
export { default as CopyButton } from "./components/CopyButton.vue";
|
|
19
|
+
export { type CountItem, default as CountBar } from "./components/CountBar.vue";
|
|
20
|
+
export { default as DagEditor } from "./components/DagEditor.vue";
|
|
21
|
+
export { default as DagGraph } from "./components/DagGraph.vue";
|
|
22
|
+
export { type DagEdge, type DagNode } from "./components/dagLayout.js";
|
|
23
|
+
export { default as FilterBar } from "./components/FilterBar.vue";
|
|
24
|
+
export { default as Icon } from "./components/Icon.vue";
|
|
25
|
+
export { default as ImageView } from "./components/ImageView.vue";
|
|
26
|
+
export { isRenderableImage } from "./components/imageView.js";
|
|
27
|
+
export { default as InfoDialog } from "./components/InfoDialog.vue";
|
|
28
|
+
export { default as InfoHint } from "./components/InfoHint.vue";
|
|
29
|
+
export { default as InfoTable } from "./components/InfoTable.vue";
|
|
30
|
+
export { default as Markdown } from "./components/Markdown.vue";
|
|
31
|
+
export { default as MarkdownFigure } from "./components/MarkdownFigure.vue";
|
|
32
|
+
export { default as NavRail } from "./components/NavRail.vue";
|
|
33
|
+
export { type NavGroup } from "./components/navRail.js";
|
|
34
|
+
export { default as Notice } from "./components/Notice.vue";
|
|
35
|
+
export { default as NoticeStack } from "./components/NoticeStack.vue";
|
|
36
|
+
export { type NoticeAction, type NoticeModel, type NoticeTone } from "./components/notice.js";
|
|
37
|
+
export { default as Page } from "./components/Page.vue";
|
|
38
|
+
export { default as PageAction } from "./components/PageAction.vue";
|
|
39
|
+
export { default as PageHeader } from "./components/PageHeader.vue";
|
|
40
|
+
export { default as Panel } from "./components/Panel.vue";
|
|
41
|
+
export { default as Picker } from "./components/Picker.vue";
|
|
42
|
+
export { type PickerGroup, type PickerOption, type PickerOptions } from "./components/picker.js";
|
|
43
|
+
export { default as ProgressRing } from "./components/ProgressRing.vue";
|
|
44
|
+
export { default as ProseField } from "./components/ProseField.vue";
|
|
45
|
+
export { default as ResizeSeam } from "./components/ResizeSeam.vue";
|
|
46
|
+
export { default as ResponsiveOverlay } from "./components/ResponsiveOverlay.vue";
|
|
47
|
+
export { default as Row } from "./components/Row.vue";
|
|
48
|
+
export { default as RowGroup } from "./components/RowGroup.vue";
|
|
49
|
+
export { default as SearchBar } from "./components/SearchBar.vue";
|
|
50
|
+
export { default as Segmented } from "./components/Segmented.vue";
|
|
51
|
+
export { seriesColor } from "./components/seriesAccent.js";
|
|
52
|
+
export { default as SplitView } from "./components/SplitView.vue";
|
|
53
|
+
export { useCompact } from "./components/splitView.js";
|
|
54
|
+
export { default as StatRow } from "./components/StatRow.vue";
|
|
55
|
+
export { default as StatusBadge, type StatusVariant } from "./components/StatusBadge.vue";
|
|
56
|
+
export { default as StepSection } from "./components/StepSection.vue";
|
|
57
|
+
export { sinceOf, TIME_WINDOWS, type TimeWindow, timeWindowWords } from "./timeWindow.js";
|
|
58
|
+
export { type IconName } from "./icons/iconSets.js";
|
|
59
|
+
export { useDevice } from "./composables/useDevice.js";
|
|
60
|
+
export { useNarrow } from "./composables/useNarrow.js";
|
|
61
|
+
export { useListNavigation } from "./composables/useListNavigation.js";
|
|
62
|
+
export { useNow } from "./composables/useNow.js";
|
|
63
|
+
export { errorMessage, noticeFrom, noticeOf, useAsyncAction } from "./composables/useAsyncAction.js";
|
|
64
|
+
export { useTheme } from "./composables/useTheme.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface CodeBlock {
|
|
2
|
+
readonly code: string;
|
|
3
|
+
readonly lang: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const escapeHtml: (text: string) => string;
|
|
6
|
+
export declare const codeBlockHtml: (block: CodeBlock, index: number, colour: boolean) => string;
|
|
7
|
+
export declare const copyCodeFromEvent: (event: Event) => void;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export declare const FIGURE_ACCENTS: readonly ["1", "2", "3", "4", "5", "neutral"];
|
|
2
|
+
export type FigureAccent = (typeof FIGURE_ACCENTS)[number];
|
|
3
|
+
export interface DagFigureNode {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly label: string;
|
|
6
|
+
readonly note?: string;
|
|
7
|
+
readonly accent?: FigureAccent;
|
|
8
|
+
}
|
|
9
|
+
export interface DagFigureEdge {
|
|
10
|
+
readonly from: string;
|
|
11
|
+
readonly to: string;
|
|
12
|
+
readonly dashed?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface DagFigure {
|
|
15
|
+
readonly kind: "dag";
|
|
16
|
+
readonly title?: string;
|
|
17
|
+
readonly direction: "LR" | "TB";
|
|
18
|
+
readonly nodes: readonly DagFigureNode[];
|
|
19
|
+
readonly edges: readonly DagFigureEdge[];
|
|
20
|
+
}
|
|
21
|
+
export interface BarsFigureItem {
|
|
22
|
+
readonly label: string;
|
|
23
|
+
readonly value: number;
|
|
24
|
+
readonly display?: string;
|
|
25
|
+
readonly accent?: FigureAccent;
|
|
26
|
+
}
|
|
27
|
+
export interface BarsFigure {
|
|
28
|
+
readonly kind: "bars";
|
|
29
|
+
readonly title?: string;
|
|
30
|
+
readonly items: readonly BarsFigureItem[];
|
|
31
|
+
}
|
|
32
|
+
export interface StatsFigureItem {
|
|
33
|
+
readonly label: string;
|
|
34
|
+
readonly value: string;
|
|
35
|
+
readonly note?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface StatsFigure {
|
|
38
|
+
readonly kind: "stats";
|
|
39
|
+
readonly items: readonly StatsFigureItem[];
|
|
40
|
+
}
|
|
41
|
+
export interface MermaidFigure {
|
|
42
|
+
readonly kind: "mermaid";
|
|
43
|
+
readonly code: string;
|
|
44
|
+
}
|
|
45
|
+
export type Figure = DagFigure | BarsFigure | StatsFigure | MermaidFigure;
|
|
46
|
+
export declare const JSON_FIGURE_LANGS: readonly string[];
|
|
47
|
+
export declare const MERMAID_LANG = "mermaid";
|
|
48
|
+
export declare const FIGURE_LANGS: readonly string[];
|
|
49
|
+
export declare const parseFigure: (lang: string, code: string) => Figure | undefined;
|
|
50
|
+
export type MarkdownSegment = {
|
|
51
|
+
readonly kind: "prose";
|
|
52
|
+
readonly text: string;
|
|
53
|
+
} | {
|
|
54
|
+
readonly kind: "figure";
|
|
55
|
+
readonly figure: Figure;
|
|
56
|
+
};
|
|
57
|
+
export declare const splitFigureSegments: (source: string) => readonly MarkdownSegment[];
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { type CodeBlock, codeBlockHtml, copyCodeFromEvent, escapeHtml } from "./code.js";
|
|
2
|
+
export { type BarsFigure, type BarsFigureItem, type DagFigure, type DagFigureEdge, type DagFigureNode, type Figure, FIGURE_ACCENTS, type FigureAccent, FIGURE_LANGS, JSON_FIGURE_LANGS, type MarkdownSegment, MERMAID_LANG, type MermaidFigure, parseFigure, splitFigureSegments, type StatsFigure, type StatsFigureItem, } from "./figures.js";
|
|
3
|
+
export { createStreamingMarkdown, type MarkdownDecorator, type MarkdownPart, markdownParseCount, renderMarkdown, renderMarkdownParts, type RenderedMarkdown, settledEnd, type StreamingMarkdown, } from "./render.js";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type Figure } from "./figures.js";
|
|
2
|
+
export type MarkdownDecorator = (fragment: DocumentFragment) => void;
|
|
3
|
+
export declare const markdownParseCount: () => number;
|
|
4
|
+
export declare const renderMarkdown: (source: string, decorate?: MarkdownDecorator) => string;
|
|
5
|
+
export type MarkdownPart = {
|
|
6
|
+
readonly kind: "html";
|
|
7
|
+
readonly html: string;
|
|
8
|
+
} | {
|
|
9
|
+
readonly kind: "figure";
|
|
10
|
+
readonly figure: Figure;
|
|
11
|
+
};
|
|
12
|
+
export type RenderedMarkdown = readonly MarkdownPart[];
|
|
13
|
+
export declare const renderMarkdownParts: (source: string, decorate?: MarkdownDecorator) => RenderedMarkdown;
|
|
14
|
+
export declare const settledEnd: (text: string, from: number) => number;
|
|
15
|
+
export interface StreamingMarkdown {
|
|
16
|
+
readonly render: (source: string) => RenderedMarkdown;
|
|
17
|
+
}
|
|
18
|
+
export declare const createStreamingMarkdown: (decorate?: MarkdownDecorator) => StreamingMarkdown;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type TimeWindow = `1h` | `24h` | `7d` | `all`;
|
|
2
|
+
export declare const TIME_WINDOWS: readonly {
|
|
3
|
+
label: string;
|
|
4
|
+
value: TimeWindow;
|
|
5
|
+
}[];
|
|
6
|
+
export declare const sinceOf: (window: TimeWindow, now: number) => number;
|
|
7
|
+
export declare const timeWindowWords: (window: TimeWindow) => string;
|
|
8
|
+
export declare const withinWindow: (at: number, window: TimeWindow, now: number) => boolean;
|
package/names.mjs
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
// The kit's export names — the single source consumed by the web app's shim generator
|
|
2
|
+
// (_editor/web/scripts/generate-ext-shims.mjs) and hostModules' dev-time coverage assertion. Update alongside
|
|
3
|
+
// src/index.ts; the assertion catches drift on the next dev boot.
|
|
4
|
+
export const extensionUiNames = [
|
|
5
|
+
"AgentRunButton",
|
|
6
|
+
"AnchoredOverlay",
|
|
7
|
+
"Avatar",
|
|
8
|
+
"BarChart",
|
|
9
|
+
"BottomSheet",
|
|
10
|
+
"BrandMark",
|
|
11
|
+
"Button",
|
|
12
|
+
"Card",
|
|
13
|
+
"ChangeStatusMark",
|
|
14
|
+
"Checkbox",
|
|
15
|
+
"clipboardOf",
|
|
16
|
+
"cmp",
|
|
17
|
+
"Code",
|
|
18
|
+
"CodeField",
|
|
19
|
+
"ConfirmDialog",
|
|
20
|
+
"ContextMenu",
|
|
21
|
+
"CopyButton",
|
|
22
|
+
"CountBar",
|
|
23
|
+
"DagEditor",
|
|
24
|
+
"DagGraph",
|
|
25
|
+
"Dialog",
|
|
26
|
+
"DiffStat",
|
|
27
|
+
"errorMessage",
|
|
28
|
+
"FilterBar",
|
|
29
|
+
"formatBytes",
|
|
30
|
+
"formatDate",
|
|
31
|
+
"formatDateTime",
|
|
32
|
+
"formatDayMonth",
|
|
33
|
+
"formatTime",
|
|
34
|
+
"formatTimestamp",
|
|
35
|
+
"formatTokens",
|
|
36
|
+
"formatWeekdayTime",
|
|
37
|
+
"Icon",
|
|
38
|
+
"ImageView",
|
|
39
|
+
"InfoDialog",
|
|
40
|
+
"InfoHint",
|
|
41
|
+
"InfoTable",
|
|
42
|
+
"isRenderableImage",
|
|
43
|
+
"Markdown",
|
|
44
|
+
"MarkdownFigure",
|
|
45
|
+
"NavRail",
|
|
46
|
+
"noticeFrom",
|
|
47
|
+
"noticeOf",
|
|
48
|
+
"Notice",
|
|
49
|
+
"NoticeStack",
|
|
50
|
+
"Page",
|
|
51
|
+
"PageAction",
|
|
52
|
+
"PageHeader",
|
|
53
|
+
"Panel",
|
|
54
|
+
"Picker",
|
|
55
|
+
"Popover",
|
|
56
|
+
"ProgressRing",
|
|
57
|
+
"ProseField",
|
|
58
|
+
"ResizeSeam",
|
|
59
|
+
"ResponsiveOverlay",
|
|
60
|
+
"Row",
|
|
61
|
+
"RowGroup",
|
|
62
|
+
"SearchBar",
|
|
63
|
+
"Segmented",
|
|
64
|
+
"seriesColor",
|
|
65
|
+
"sinceOf",
|
|
66
|
+
"SplitView",
|
|
67
|
+
"StatRow",
|
|
68
|
+
"StatusBadge",
|
|
69
|
+
"StepSection",
|
|
70
|
+
"TIME_WINDOWS",
|
|
71
|
+
"timeAgo",
|
|
72
|
+
"timeWindowWords",
|
|
73
|
+
"ToggleSwitch",
|
|
74
|
+
"useAgentRunPick",
|
|
75
|
+
"useAsyncAction",
|
|
76
|
+
"useCompact",
|
|
77
|
+
"useDevice",
|
|
78
|
+
"useListNavigation",
|
|
79
|
+
"useNarrow",
|
|
80
|
+
"useNow",
|
|
81
|
+
"useTheme",
|
|
82
|
+
];
|
package/package.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@intentic/extension-ui",
|
|
3
|
+
"version": "1.176.3",
|
|
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
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/intentic/intentic.git",
|
|
10
|
+
"directory": "_editor/extension-ui"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"dist",
|
|
14
|
+
"src",
|
|
15
|
+
"names.mjs"
|
|
16
|
+
],
|
|
17
|
+
"publishConfig": {
|
|
18
|
+
"access": "public",
|
|
19
|
+
"registry": "https://registry.npmjs.org/"
|
|
20
|
+
},
|
|
21
|
+
"main": "./dist/index.js",
|
|
22
|
+
"types": "./dist/types/extension-ui/src/index.d.ts",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"@intentic/src": "./src/index.ts",
|
|
26
|
+
"types": "./dist/types/extension-ui/src/index.d.ts",
|
|
27
|
+
"default": "./dist/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./format": {
|
|
30
|
+
"@intentic/src": "./src/format.ts",
|
|
31
|
+
"types": "./dist/types/extension-ui/src/format.d.ts",
|
|
32
|
+
"default": "./dist/format.js"
|
|
33
|
+
},
|
|
34
|
+
"./names": "./names.mjs"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"primevue": "4.5.5"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"typescript": "5.9.3",
|
|
41
|
+
"vue": "3.5.40",
|
|
42
|
+
"vue-tsc": "3.3.9",
|
|
43
|
+
"@intentic/tsconfig": "0.0.0",
|
|
44
|
+
"@intentic/ui": "0.0.0"
|
|
45
|
+
},
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"vue": "3"
|
|
48
|
+
},
|
|
49
|
+
"scripts": {
|
|
50
|
+
"build": "node scripts/build.mjs",
|
|
51
|
+
"typecheck": "vue-tsc --noEmit"
|
|
52
|
+
}
|
|
53
|
+
}
|
package/src/format.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* The kit's formatters, reachable WITHOUT the component barrel.
|
|
2
|
+
*
|
|
3
|
+
* `index.ts` pulls every .vue component in the kit, which is the right trade for an extension's own views but
|
|
4
|
+
* the wrong one for its pure logic: a day-divider label is plain arithmetic on a number, and an extension's
|
|
5
|
+
* node-environment tests run without a Vue plugin to parse SFCs with. Importing a formatter from the barrel
|
|
6
|
+
* dragged the whole component library into those tests and broke them on the first `<template>` it hit. Same
|
|
7
|
+
* split, and same reason, as `@intentic/ui`'s own `./path` and `./time` entry points.
|
|
8
|
+
*
|
|
9
|
+
* A SOURCE-level door, for in-repo extensions (whose code vite compiles into the app bundle) and their tests.
|
|
10
|
+
* A git-installed bundle resolves its bare specifiers through the import map in index.html, which carries the
|
|
11
|
+
* barrel alone — so nothing is exported here that the barrel does not also export, and a third-party author
|
|
12
|
+
* reaching for `@intentic/extension-ui` is missing none of it. */
|
|
13
|
+
export {
|
|
14
|
+
formatBytes,
|
|
15
|
+
formatDate,
|
|
16
|
+
formatDateTime,
|
|
17
|
+
formatDayMonth,
|
|
18
|
+
formatTime,
|
|
19
|
+
formatTimestamp,
|
|
20
|
+
formatTokens,
|
|
21
|
+
formatWeekdayTime,
|
|
22
|
+
timeAgo,
|
|
23
|
+
} from "@intentic/ui/format";
|