@intentic/extension-ui 1.222.0 → 1.224.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/dist/index.js +3 -0
- package/dist/types/extension-ui/src/index.d.ts +1 -1
- package/dist/types/ui/src/index.d.ts +2 -0
- package/dist/types/ui/src/lib/link.d.ts +5 -0
- package/dist/types/ui/src/lib/portPreview.d.ts +17 -0
- package/names.mjs +3 -0
- package/package.json +1 -1
- package/src/format.ts +1 -1
- package/src/index.ts +33 -21
package/dist/index.js
CHANGED
|
@@ -64,6 +64,8 @@ export const StatusTally = m["StatusTally"];
|
|
|
64
64
|
export const StepSection = m["StepSection"];
|
|
65
65
|
export const TIME_WINDOWS = m["TIME_WINDOWS"];
|
|
66
66
|
export const ToggleSwitch = m["ToggleSwitch"];
|
|
67
|
+
export const appLink = m["appLink"];
|
|
68
|
+
export const browserOwnsClick = m["browserOwnsClick"];
|
|
67
69
|
export const clipboardOf = m["clipboardOf"];
|
|
68
70
|
export const errorMessage = m["errorMessage"];
|
|
69
71
|
export const formatBytes = m["formatBytes"];
|
|
@@ -78,6 +80,7 @@ export const freshness = m["freshness"];
|
|
|
78
80
|
export const isRenderableImage = m["isRenderableImage"];
|
|
79
81
|
export const noticeFrom = m["noticeFrom"];
|
|
80
82
|
export const noticeOf = m["noticeOf"];
|
|
83
|
+
export const openForwardedPort = m["openForwardedPort"];
|
|
81
84
|
export const seriesColor = m["seriesColor"];
|
|
82
85
|
export const sinceOf = m["sinceOf"];
|
|
83
86
|
export const timeAgo = m["timeAgo"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { AgentRunButton, type AgentRunChoice, type AgentRunPicker, type ModelPicking, useAgentRunPick, AnchoredOverlay, Avatar, BarChart, BottomSheet, BrandMark, Card, clipboardOf, ChangeStatusMark, type ChangeStatus, ui, Code, CodeField, ConfirmDialog, ContextMenu, CopyButton, StatusTally, type TallyItem, DagEditor, DagGraph, type DagEdge, type DagNode, DiffStat, FilterBar, Icon, type IconName, ImageView, InfoDialog, InfoHint, InfoTable, isRenderableImage, Markdown, MarkdownFigure, Modal, type NavGroup, NavRail, NoteEditor, type NoteDraft, type NoteDraftOptions, useNoteDraft, type NoticeModel, type NoticeTone, type NoticeAction, Notice, NoticeStack, Page, PageAction, PageHeader, ScrollFrame, PersonaFace, type PersonaLike, Picker, type PickerGroup, type PickerOption, type PickerOptions, ProgressRing, RepoRail, type RepoRailAll, type RepoRailGroup, type RepoRailRow, ProseField, ResizeSeam, ResponsiveOverlay, Row, RowGroup, SearchBar, SegmentedControl, seriesColor, sinceOf, useLoadingReveal, SkeletonRows, SplitView, StatStrip, StatusBadge, type StatusVariant, StepSection, TIME_WINDOWS, type TimeWindow, timeWindowWords, useCompact, useDevice, useListNavigation, useNow, errorMessage, noticeFrom, noticeOf, useAsyncAction, useNarrow, useRailMemory, useTheme, } from "../../ui/src/index.js";
|
|
1
|
+
export { AgentRunButton, type AgentRunChoice, type AgentRunPicker, type ModelPicking, useAgentRunPick, AnchoredOverlay, Avatar, BarChart, BottomSheet, BrandMark, Card, clipboardOf, browserOwnsClick, appLink, openForwardedPort, ChangeStatusMark, type ChangeStatus, ui, Code, CodeField, ConfirmDialog, ContextMenu, CopyButton, StatusTally, type TallyItem, DagEditor, DagGraph, type DagEdge, type DagNode, DiffStat, FilterBar, Icon, type IconName, ImageView, InfoDialog, InfoHint, InfoTable, isRenderableImage, Markdown, MarkdownFigure, Modal, type NavGroup, NavRail, NoteEditor, type NoteDraft, type NoteDraftOptions, useNoteDraft, type NoticeModel, type NoticeTone, type NoticeAction, Notice, NoticeStack, Page, PageAction, PageHeader, ScrollFrame, PersonaFace, type PersonaLike, Picker, type PickerGroup, type PickerOption, type PickerOptions, ProgressRing, RepoRail, type RepoRailAll, type RepoRailGroup, type RepoRailRow, ProseField, ResizeSeam, ResponsiveOverlay, Row, RowGroup, SearchBar, SegmentedControl, seriesColor, sinceOf, useLoadingReveal, SkeletonRows, SplitView, StatStrip, StatusBadge, type StatusVariant, StepSection, TIME_WINDOWS, type TimeWindow, timeWindowWords, useCompact, useDevice, useListNavigation, useNow, errorMessage, noticeFrom, noticeOf, useAsyncAction, useNarrow, useRailMemory, useTheme, } from "../../ui/src/index.js";
|
|
2
2
|
export { formatBytes, formatDate, formatDateTime, formatDayMonth, formatTime, formatTimestamp, formatTokens, formatWeekdayTime, freshness, timeAgo, } from "./format.js";
|
|
3
3
|
export type { BarsFigure, BarsFigureItem, DagFigure, DagFigureEdge, DagFigureNode, Figure, FigureAccent, MermaidFigure, StatsFigure, StatsFigureItem, } from "../../ui/src/markdown/index.js";
|
|
4
4
|
export { default as Button } from "primevue/button";
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { clipboardOf } from "./lib/clipboard.js";
|
|
2
|
+
export { appLink, browserOwnsClick } from "./lib/link.js";
|
|
3
|
+
export { openForwardedPort } from "./lib/portPreview.js";
|
|
2
4
|
export { ui } from "./lib/ui.js";
|
|
3
5
|
export { default as AgentRunButton } from "./components/AgentRunButton.vue";
|
|
4
6
|
export { type AgentRunChoice, type AgentRunPicker, type ModelPicking, useAgentRunPick } from "./composables/useAgentRunPick.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type ProbeOutcome = "reachable" | "gaveUp" | "abandoned";
|
|
2
|
+
export interface ProbeOptions {
|
|
3
|
+
readonly onWaiting?: (elapsedMs: number, slow: boolean) => void;
|
|
4
|
+
readonly stillWanted?: () => boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const probeUntilReachable: (url: string, options?: ProbeOptions) => Promise<ProbeOutcome>;
|
|
7
|
+
export interface ForwardedPortTab {
|
|
8
|
+
readonly port: number;
|
|
9
|
+
readonly path?: string;
|
|
10
|
+
readonly forward: (port: number) => Promise<string | undefined>;
|
|
11
|
+
readonly onError?: (message: string) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const openForwardedPort: ({ port, path, forward, onError }: ForwardedPortTab) => void;
|
|
14
|
+
export declare const parseLoopbackLink: (uri: string) => {
|
|
15
|
+
port: number;
|
|
16
|
+
path: string;
|
|
17
|
+
} | undefined;
|
package/names.mjs
CHANGED
|
@@ -13,6 +13,8 @@ export const extensionUiNames = [
|
|
|
13
13
|
"ChangeStatusMark",
|
|
14
14
|
"Checkbox",
|
|
15
15
|
"clipboardOf",
|
|
16
|
+
"browserOwnsClick",
|
|
17
|
+
"appLink",
|
|
16
18
|
"ui",
|
|
17
19
|
"Code",
|
|
18
20
|
"CodeField",
|
|
@@ -48,6 +50,7 @@ export const extensionUiNames = [
|
|
|
48
50
|
"noticeFrom",
|
|
49
51
|
"noticeOf",
|
|
50
52
|
"NoticeStack",
|
|
53
|
+
"openForwardedPort",
|
|
51
54
|
"Page",
|
|
52
55
|
"PageAction",
|
|
53
56
|
"PageHeader",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intentic/extension-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.224.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",
|
package/src/format.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* A SOURCE-level door, for in-repo extensions (whose code vite compiles into the app bundle) and their tests.
|
|
10
10
|
* A git-installed bundle resolves its bare specifiers through the import map in index.html, which carries the
|
|
11
|
-
* barrel alone
|
|
11
|
+
* barrel alone, so nothing is exported here that the barrel does not also export, and a third-party author
|
|
12
12
|
* reaching for `@intentic/extension-ui` is missing none of it. */
|
|
13
13
|
export {
|
|
14
14
|
formatBytes,
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* The UI kit extensions render with. This entrypoint is the package's ONE public surface (the repo's
|
|
2
2
|
* re-export exception): a curated slice of the app design system (@intentic/ui) plus the PrimeVue
|
|
3
|
-
* primitives extension views actually use. At runtime the kit is HOST-PROVIDED
|
|
3
|
+
* primitives extension views actually use. At runtime the kit is HOST-PROVIDED, the web app maps this module
|
|
4
4
|
* into its import map (extension-host/hostModules.ts), so third-party bundles marking it external get the
|
|
5
5
|
* shell's own component instances and theming; in-repo builtin extension packages bundle this same module and
|
|
6
6
|
* land on the same instances. Export names are mirrored in ../names.mjs (shim generation + drift assertion).
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
* <SplitView> is here for exactly the same reason one level up: five screens are an index beside a body, and the
|
|
15
15
|
* one implementation that had solved it (HubLayout) sat in the web app where no extension could import it. */
|
|
16
16
|
export {
|
|
17
|
-
/* <AgentRunButton> and its state ship because FOUR extensions start an agent for the user
|
|
18
|
-
* deployments, maintenance, acceptance
|
|
17
|
+
/* <AgentRunButton> and its state ship because FOUR extensions start an agent for the user, pipelines,
|
|
18
|
+
* deployments, maintenance, acceptance, and each of them had reached a different answer about how you
|
|
19
19
|
* choose what it spends: three had no control at all and named the model in a tooltip, the fourth grew a
|
|
20
20
|
* chip of its own. That is the same divergence <SplitView> and <Row> were shipped to end, arriving on the
|
|
21
21
|
* one control in the app where getting it wrong costs money rather than pixels. `useAgentRunPick` is the
|
|
@@ -27,14 +27,14 @@ export {
|
|
|
27
27
|
useAgentRunPick,
|
|
28
28
|
/* <AnchoredOverlay> ships because the alternative on this surface is PrimeVue's <Popover>, and six extension
|
|
29
29
|
* views had already reached for it. Popover measures and dismisses against the OPENER's window, so in a
|
|
30
|
-
* popped-out panel it opens off the bottom edge, over its own trigger, and cannot be clicked shut
|
|
30
|
+
* popped-out panel it opens off the bottom edge, over its own trigger, and cannot be clicked shut, the
|
|
31
31
|
* failure the kit's own tooltip directive exists to avoid. */
|
|
32
32
|
AnchoredOverlay,
|
|
33
33
|
Avatar,
|
|
34
34
|
BarChart,
|
|
35
35
|
BottomSheet,
|
|
36
36
|
/* <BrandMark> ships because the drafts queue is the second surface to draw a platform as its brand (the
|
|
37
|
-
* capability cards were the first)
|
|
37
|
+
* capability cards were the first), and because its fallback is the part a hand-roll skips: a platform
|
|
38
38
|
* with no installed connector still has to render as SOMETHING, and the monogram is that something. */
|
|
39
39
|
BrandMark,
|
|
40
40
|
Card,
|
|
@@ -43,10 +43,22 @@ export {
|
|
|
43
43
|
* the module-global navigator belongs to the opener, whose document isn't focused, so the write rejects
|
|
44
44
|
* and every call site swallows it. */
|
|
45
45
|
clipboardOf,
|
|
46
|
+
/* `browserOwnsClick` ships because every extension view that navigates has the same one-line decision to
|
|
47
|
+
make and no way to reach the app's answer: a row that is BOTH a link and a control must let a Ctrl/⌘,
|
|
48
|
+
Shift or Alt click belong to the browser, and do its own work only on the plain one. Three views had
|
|
49
|
+
hand-rolled a navigate() on a <button>, which is the version of that decision where the modifier keys
|
|
50
|
+
simply do not work. */
|
|
51
|
+
browserOwnsClick,
|
|
52
|
+
appLink,
|
|
53
|
+
/* `openForwardedPort` ships because the Ports view is the third surface to wait on a freshly-minted preview
|
|
54
|
+
* hostname and the second to open one in a tab, and the two that had solved it (the preview panel's iframe
|
|
55
|
+
* gate, the terminal's Ctrl+click) both sat in the web app where no extension could import them. The
|
|
56
|
+
* duplicate was word-for-word, down to the sentence a user reads while DNS propagates. */
|
|
57
|
+
openForwardedPort,
|
|
46
58
|
/* The two halves of a changed-file row ship together because they are always drawn together, and they ship
|
|
47
59
|
* at all for the reason <SplitView> did: the git-history extension is the seventh surface to draw one, and
|
|
48
60
|
* the six that had solved it all sat in the web app where no extension could import them. <ChangeStatusMark>
|
|
49
|
-
* carries the fixed-width cell that keeps a column of paths aligned whatever letter lands in it
|
|
61
|
+
* carries the fixed-width cell that keeps a column of paths aligned whatever letter lands in it, the detail
|
|
50
62
|
* a hand-rolled copy gets subtly wrong. */
|
|
51
63
|
ChangeStatusMark,
|
|
52
64
|
type ChangeStatus,
|
|
@@ -72,7 +84,7 @@ export {
|
|
|
72
84
|
ImageView,
|
|
73
85
|
/* <InfoDialog> and <InfoTable> ship beside <ConfirmDialog> and <Row> for the reason everything else here
|
|
74
86
|
* does: an extension with something to EXPLAIN rather than confirm, or a block of label→value facts to lay
|
|
75
|
-
* out, would otherwise hand-roll a dialog shell and a two-column grid
|
|
87
|
+
* out, would otherwise hand-roll a dialog shell and a two-column grid, and the grid is where a hand-roll
|
|
76
88
|
* drifts, because keeping the value column aligned across rows is the whole of it. */
|
|
77
89
|
InfoDialog,
|
|
78
90
|
InfoHint,
|
|
@@ -82,13 +94,13 @@ export {
|
|
|
82
94
|
MarkdownFigure,
|
|
83
95
|
/* <Modal> ships for the reason <ConfirmDialog> and <InfoDialog> already do, and it is the one they were
|
|
84
96
|
* both missing: an extension whose dialog is neither a confirm nor an explainer had nothing to reach for
|
|
85
|
-
* but PrimeVue's Dialog and a width typed into a style attribute
|
|
97
|
+
* but PrimeVue's Dialog and a width typed into a style attribute, which is exactly how the app itself
|
|
86
98
|
* ended up with thirteen widths and one viewport clamp between seventeen dialogs. */
|
|
87
99
|
Modal,
|
|
88
100
|
type NavGroup,
|
|
89
101
|
NavRail,
|
|
90
102
|
/* <NoteEditor> and `useNoteDraft` ship because TWO extensions are a pane that reads a markdown file, lets
|
|
91
|
-
* somebody correct it and lets them delete it
|
|
103
|
+
* somebody correct it and lets them delete it, knowledge and memory, and they had built the same thing
|
|
92
104
|
* twice: the same Copy/Edit/Delete cluster, the same Cancel/Save pair, the same in-place confirmation, the
|
|
93
105
|
* same draft-or-file binding, the same read-and-write-on-one-surface rule. They had already drifted in the
|
|
94
106
|
* ways a second copy does: one cleared its confirmation when a write failed and the other did not, and
|
|
@@ -103,11 +115,11 @@ export {
|
|
|
103
115
|
* with several async actions needs somewhere for their failures to land that isn't one action's own row,
|
|
104
116
|
* and a hand-rolled error strip is the first thing to disagree with the app's about tone and dismissal.
|
|
105
117
|
*
|
|
106
|
-
* <Notice
|
|
118
|
+
* <Notice>. THE SINGLE ONE, was missing from that shipment, and it is the same mistake <Row>/<RowGroup>
|
|
107
119
|
* and <PageAction>/<PageHeader> each record one release earlier: the container went out without the thing
|
|
108
120
|
* that goes in it. Notice.vue's own comment says every view that hand-rolled `ui.alertDanger()` around an
|
|
109
121
|
* interpolated error string renders it instead, "which is what makes the app's failures sound like one
|
|
110
|
-
* product rather than like sixty throw sites"
|
|
122
|
+
* product rather than like sixty throw sites", and the app took that sweep, 107 call sites of it. The
|
|
111
123
|
* extensions could not: the kit handed out the stack and kept the row, so thirteen of them went on
|
|
112
124
|
* hand-rolling the strip. Most of a view's failures are ONE at a time; the stack is the rarer case. */
|
|
113
125
|
type NoticeModel,
|
|
@@ -123,7 +135,7 @@ export {
|
|
|
123
135
|
PageHeader,
|
|
124
136
|
ScrollFrame,
|
|
125
137
|
/* <PersonaFace> ships because the TWO surfaces in the whole app where you choose a persona are both out
|
|
126
|
-
* here
|
|
138
|
+
* here, an automation's "Runs as" and a workflow step's "Acts as", and neither could reach the drawing
|
|
127
139
|
* every surface that merely LISTS a persona already uses. So the one screen where you are picking a person
|
|
128
140
|
* by sight was the one screen showing a line of text. It is exported alongside <Picker>'s own `face` option
|
|
129
141
|
* field, which is what most callers actually want: hand the row a persona and the picker draws it. */
|
|
@@ -135,7 +147,7 @@ export {
|
|
|
135
147
|
type PickerOptions,
|
|
136
148
|
ProgressRing,
|
|
137
149
|
/* <RepoRail> ships for the reason <SplitView> did, one level in: two extensions scope a workspace-wide
|
|
138
|
-
* board to one repository
|
|
150
|
+
* board to one repository, maintenance and pipelines, and both had written the same column. Same pinned
|
|
139
151
|
* "All repositories" row outside every group, same one-number-per-row rule with the second fact as its
|
|
140
152
|
* colour, same swap to a <Picker> at the width the split folds at. What differs between them is the report
|
|
141
153
|
* behind it, which is why the rows arrive as data. */
|
|
@@ -144,7 +156,7 @@ export {
|
|
|
144
156
|
type RepoRailGroup,
|
|
145
157
|
type RepoRailRow,
|
|
146
158
|
/* The writing field and the drag seam ship for the same reason <SplitView> did: an extension view that
|
|
147
|
-
* wants prose typeset as a document, or a pane the reader can size, would otherwise hand-roll one
|
|
159
|
+
* wants prose typeset as a document, or a pane the reader can size, would otherwise hand-roll one, and
|
|
148
160
|
* both recipes have a failure mode (a replica that disagrees with its field; a drag bound to the window)
|
|
149
161
|
* that is invisible until it is in front of somebody. */
|
|
150
162
|
ProseField,
|
|
@@ -166,7 +178,7 @@ export {
|
|
|
166
178
|
useLoadingReveal,
|
|
167
179
|
/* <SkeletonRows> ships beside <RowGroup> for the third time this file makes the argument: the container
|
|
168
180
|
* without the WAIT is what made three extensions write their own. Pipelines, deployments and maintenance
|
|
169
|
-
* each hand-rolled a placeholder board, and the row-shaped half of all three is this component
|
|
181
|
+
* each hand-rolled a placeholder board, and the row-shaped half of all three is this component, same
|
|
170
182
|
* bars, same widths walked in order, same `aria-hidden` under the caller's one status region. What they
|
|
171
183
|
* could not get right by hand is the part that does not show up in a screenshot: a bar is thinner than the
|
|
172
184
|
* text it replaces, so an outline built out of divs is shorter than the list that lands and the page jumps
|
|
@@ -190,24 +202,24 @@ export {
|
|
|
190
202
|
* hand-roll leaves out (wrapping at the ends, keeping the active row in view) are invisible on a mouse. */
|
|
191
203
|
useListNavigation,
|
|
192
204
|
/* <useNow> and <useAsyncAction> ship because the drafts queue was the first extension with a live countdown
|
|
193
|
-
* and a page of mutations
|
|
205
|
+
* and a page of mutations, the two shapes every such view hand-rolls, one interval and one busy flag at a
|
|
194
206
|
* time, each subtly wrong (a clock that keeps ticking with nothing on screen; a double-click firing twice). */
|
|
195
207
|
useNow,
|
|
196
208
|
errorMessage,
|
|
197
209
|
noticeFrom,
|
|
198
210
|
noticeOf,
|
|
199
211
|
useAsyncAction,
|
|
200
|
-
/* "Is my own element too narrow for this layout"
|
|
212
|
+
/* "Is my own element too narrow for this layout", the question every extension view actually means, since it
|
|
201
213
|
* renders into a pane the reader can drag to half its width, not into the window. */
|
|
202
214
|
useNarrow,
|
|
203
215
|
/* Where the reader left a narrowing rail. Ships for the reason <SplitView> did: three extension views grew
|
|
204
216
|
* the same index column, all three keep the pick in the URL, and all three lost it the moment you clicked the
|
|
205
|
-
* tile again
|
|
217
|
+
* tile again, because a tile opens a view at its bare address. Solving that per extension would be three
|
|
206
218
|
* copies of one rule about what a link means versus what a memory is allowed to guess. */
|
|
207
219
|
useRailMemory,
|
|
208
220
|
useTheme,
|
|
209
221
|
} from "@intentic/ui";
|
|
210
|
-
// Also reachable as `@intentic/extension-ui/format
|
|
222
|
+
// Also reachable as `@intentic/extension-ui/format`, see the note there for why an extension's pure logic
|
|
211
223
|
// wants them without the components attached.
|
|
212
224
|
export {
|
|
213
225
|
formatBytes,
|
|
@@ -221,7 +233,7 @@ export {
|
|
|
221
233
|
freshness,
|
|
222
234
|
timeAgo,
|
|
223
235
|
} from "./format.js";
|
|
224
|
-
/* The figure vocabulary that <Markdown> renders from prose and <MarkdownFigure> renders from data. Types only
|
|
236
|
+
/* The figure vocabulary that <Markdown> renders from prose and <MarkdownFigure> renders from data. Types only,
|
|
225
237
|
* an extension needs them to BUILD a figure out of facts it already holds (a dependency graph, a staleness
|
|
226
238
|
* tally) rather than round-tripping through markdown to draw one. The parser and the document splitter stay out
|
|
227
239
|
* of the kit: they are the prose surface's job, and <Markdown> already does it. */
|
|
@@ -243,7 +255,7 @@ export type {
|
|
|
243
255
|
* different padding beside `ui.input`. Those two are gone — <Picker> and `ui.input()` are the spellings.
|
|
244
256
|
* <Dialog> was the third, and it is gone for the same reason: it stayed "until the kit has a general dialog
|
|
245
257
|
* shell", six extension views took it, and every one of them typed its own width into a style attribute with
|
|
246
|
-
* no viewport clamp
|
|
258
|
+
* no viewport clamp, the exact spread that <Modal> above now exists to end. The shell is here, so the raw one
|
|
247
259
|
* is not. <Popover> stays only because <ResponsiveOverlay>/<AnchoredOverlay> do not yet cover every menu shape,
|
|
248
260
|
* and it is on the same clock: those two are the ones that open in the right window when a panel is popped out. */
|
|
249
261
|
export { default as Button } from "primevue/button";
|