@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.
Files changed (83) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +45 -0
  3. package/dist/format.js +16 -0
  4. package/dist/index.js +88 -0
  5. package/dist/types/extension-ui/src/format.d.ts +1 -0
  6. package/dist/types/extension-ui/src/index.d.ts +9 -0
  7. package/dist/types/ui/src/clipboard.d.ts +1 -0
  8. package/dist/types/ui/src/cmp.d.ts +11 -0
  9. package/dist/types/ui/src/components/AgentRunButton.vue.d.ts +22 -0
  10. package/dist/types/ui/src/components/AnchoredOverlay.vue.d.ts +29 -0
  11. package/dist/types/ui/src/components/Avatar.vue.d.ts +11 -0
  12. package/dist/types/ui/src/components/BarChart.vue.d.ts +9 -0
  13. package/dist/types/ui/src/components/BottomSheet.vue.d.ts +24 -0
  14. package/dist/types/ui/src/components/BrandMark.vue.d.ts +10 -0
  15. package/dist/types/ui/src/components/Card.vue.d.ts +16 -0
  16. package/dist/types/ui/src/components/ChangeStatusMark.vue.d.ts +7 -0
  17. package/dist/types/ui/src/components/Code.vue.d.ts +16 -0
  18. package/dist/types/ui/src/components/CodeField.vue.d.ts +19 -0
  19. package/dist/types/ui/src/components/ConfirmDialog.vue.d.ts +39 -0
  20. package/dist/types/ui/src/components/ContextMenu.vue.d.ts +12 -0
  21. package/dist/types/ui/src/components/CopyButton.vue.d.ts +13 -0
  22. package/dist/types/ui/src/components/CountBar.vue.d.ts +24 -0
  23. package/dist/types/ui/src/components/DagEditor.vue.d.ts +39 -0
  24. package/dist/types/ui/src/components/DagGraph.vue.d.ts +41 -0
  25. package/dist/types/ui/src/components/DiffStat.vue.d.ts +7 -0
  26. package/dist/types/ui/src/components/FilterBar.vue.d.ts +30 -0
  27. package/dist/types/ui/src/components/Icon.vue.d.ts +8 -0
  28. package/dist/types/ui/src/components/ImageView.vue.d.ts +6 -0
  29. package/dist/types/ui/src/components/InfoDialog.vue.d.ts +16 -0
  30. package/dist/types/ui/src/components/InfoHint.vue.d.ts +17 -0
  31. package/dist/types/ui/src/components/InfoTable.vue.d.ts +7 -0
  32. package/dist/types/ui/src/components/Markdown.vue.d.ts +8 -0
  33. package/dist/types/ui/src/components/MarkdownFigure.vue.d.ts +7 -0
  34. package/dist/types/ui/src/components/NavRail.vue.d.ts +41 -0
  35. package/dist/types/ui/src/components/Notice.vue.d.ts +12 -0
  36. package/dist/types/ui/src/components/NoticeStack.vue.d.ts +12 -0
  37. package/dist/types/ui/src/components/Page.vue.d.ts +18 -0
  38. package/dist/types/ui/src/components/PageAction.vue.d.ts +40 -0
  39. package/dist/types/ui/src/components/PageHeader.vue.d.ts +21 -0
  40. package/dist/types/ui/src/components/Panel.vue.d.ts +35 -0
  41. package/dist/types/ui/src/components/Picker.vue.d.ts +43 -0
  42. package/dist/types/ui/src/components/ProgressRing.vue.d.ts +8 -0
  43. package/dist/types/ui/src/components/ProseField.vue.d.ts +17 -0
  44. package/dist/types/ui/src/components/ResizeSeam.vue.d.ts +18 -0
  45. package/dist/types/ui/src/components/ResponsiveOverlay.vue.d.ts +31 -0
  46. package/dist/types/ui/src/components/Row.vue.d.ts +39 -0
  47. package/dist/types/ui/src/components/RowGroup.vue.d.ts +25 -0
  48. package/dist/types/ui/src/components/SearchBar.vue.d.ts +24 -0
  49. package/dist/types/ui/src/components/Segmented.vue.d.ts +35 -0
  50. package/dist/types/ui/src/components/SplitView.vue.d.ts +32 -0
  51. package/dist/types/ui/src/components/StatRow.vue.d.ts +7 -0
  52. package/dist/types/ui/src/components/StatusBadge.vue.d.ts +21 -0
  53. package/dist/types/ui/src/components/StepSection.vue.d.ts +22 -0
  54. package/dist/types/ui/src/components/barChart.d.ts +9 -0
  55. package/dist/types/ui/src/components/changeStatus.d.ts +3 -0
  56. package/dist/types/ui/src/components/dagLayout.d.ts +24 -0
  57. package/dist/types/ui/src/components/imageView.d.ts +1 -0
  58. package/dist/types/ui/src/components/navRail.d.ts +8 -0
  59. package/dist/types/ui/src/components/notice.d.ts +17 -0
  60. package/dist/types/ui/src/components/picker.d.ts +16 -0
  61. package/dist/types/ui/src/components/seriesAccent.d.ts +2 -0
  62. package/dist/types/ui/src/components/splitView.d.ts +3 -0
  63. package/dist/types/ui/src/composables/anchorPlacement.d.ts +29 -0
  64. package/dist/types/ui/src/composables/shikiLangs.d.ts +44 -0
  65. package/dist/types/ui/src/composables/useAgentRunPick.d.ts +25 -0
  66. package/dist/types/ui/src/composables/useAsyncAction.d.ts +33 -0
  67. package/dist/types/ui/src/composables/useDevice.d.ts +8 -0
  68. package/dist/types/ui/src/composables/useListNavigation.d.ts +7 -0
  69. package/dist/types/ui/src/composables/useNarrow.d.ts +2 -0
  70. package/dist/types/ui/src/composables/useNow.d.ts +2 -0
  71. package/dist/types/ui/src/composables/useTheme.d.ts +9 -0
  72. package/dist/types/ui/src/format.d.ts +14 -0
  73. package/dist/types/ui/src/icons/iconSets.d.ts +3 -0
  74. package/dist/types/ui/src/index.d.ts +64 -0
  75. package/dist/types/ui/src/markdown/code.d.ts +7 -0
  76. package/dist/types/ui/src/markdown/figures.d.ts +57 -0
  77. package/dist/types/ui/src/markdown/index.d.ts +3 -0
  78. package/dist/types/ui/src/markdown/render.d.ts +18 -0
  79. package/dist/types/ui/src/timeWindow.d.ts +8 -0
  80. package/names.mjs +82 -0
  81. package/package.json +53 -0
  82. package/src/format.ts +23 -0
  83. package/src/index.ts +200 -0
package/src/index.ts ADDED
@@ -0,0 +1,200 @@
1
+ /* The UI kit extensions render with. This entrypoint is the package's ONE public surface (the repo's
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 — the web app maps this module
4
+ * into its import map (extension-host/hostModules.ts), so third-party bundles marking it external get the
5
+ * shell's own component instances and theming; in-repo builtin extension packages bundle this same module and
6
+ * land on the same instances. Export names are mirrored in ../names.mjs (shim generation + drift assertion).
7
+ * Publishing a typed npm artifact for out-of-repo authors is a marketplace-phase task. */
8
+
9
+ /* <Row> ships beside <RowGroup> because shipping the container WITHOUT the row is what made every extension
10
+ * write its own: five views imported the group, found nothing to put in it, and hand-rolled a row body each.
11
+ * The comment lives out here rather than beside the name because extensionUiNames.test.ts parses this brace
12
+ * block for names, and reads a comment inside it as exports that do not exist.
13
+ *
14
+ * <SplitView> is here for exactly the same reason one level up: five screens are an index beside a body, and the
15
+ * one implementation that had solved it (HubLayout) sat in the web app where no extension could import it. */
16
+ export {
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
+ * choose what it spends: three had no control at all and named the model in a tooltip, the fourth grew a
20
+ * chip of its own. That is the same divergence <SplitView> and <Row> were shipped to end, arriving on the
21
+ * one control in the app where getting it wrong costs money rather than pixels. `useAgentRunPick` is the
22
+ * half that needs `api.models` and takes it as an argument, so the kit stays free of the extension API. */
23
+ AgentRunButton,
24
+ type AgentRunChoice,
25
+ type AgentRunPicker,
26
+ type ModelPicking,
27
+ useAgentRunPick,
28
+ /* <AnchoredOverlay> ships because the alternative on this surface is PrimeVue's <Popover>, and six extension
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 — the
31
+ * failure the kit's own tooltip directive exists to avoid. */
32
+ AnchoredOverlay,
33
+ Avatar,
34
+ BarChart,
35
+ BottomSheet,
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) — and because its fallback is the part a hand-roll skips: a platform
38
+ * with no installed connector still has to render as SOMETHING, and the monogram is that something. */
39
+ BrandMark,
40
+ Card,
41
+ /* The window a copy has to go through. Missing from this surface is why git-history called
42
+ * `navigator.clipboard` directly and copying a commit SHA out of a POPPED-OUT panel silently did nothing:
43
+ * the module-global navigator belongs to the opener, whose document isn't focused, so the write rejects
44
+ * and every call site swallows it. */
45
+ clipboardOf,
46
+ /* The two halves of a changed-file row ship together because they are always drawn together, and they ship
47
+ * at all for the reason <SplitView> did: the git-history extension is the seventh surface to draw one, and
48
+ * 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 — the detail
50
+ * a hand-rolled copy gets subtly wrong. */
51
+ ChangeStatusMark,
52
+ type ChangeStatus,
53
+ cmp,
54
+ Code,
55
+ /* <CodeField> ships beside <Code> because shipping the reader WITHOUT the writer is what made the memory
56
+ * extension put a bare grey <textarea> next to a coloured block of the very same file: the kit had no way
57
+ * to say "this text, in its own colours, with a caret in it". */
58
+ CodeField,
59
+ ConfirmDialog,
60
+ ContextMenu,
61
+ CopyButton,
62
+ CountBar,
63
+ type CountItem,
64
+ DagEditor,
65
+ DagGraph,
66
+ type DagEdge,
67
+ type DagNode,
68
+ DiffStat,
69
+ FilterBar,
70
+ Icon,
71
+ type IconName,
72
+ ImageView,
73
+ /* <InfoDialog> and <InfoTable> ship beside <ConfirmDialog> and <Row> for the reason everything else here
74
+ * 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 — and the grid is where a hand-roll
76
+ * drifts, because keeping the value column aligned across rows is the whole of it. */
77
+ InfoDialog,
78
+ InfoHint,
79
+ InfoTable,
80
+ isRenderableImage,
81
+ Markdown,
82
+ MarkdownFigure,
83
+ type NavGroup,
84
+ NavRail,
85
+ /* <NoticeStack> and its model ship beside <ConfirmDialog> for the same reason <InfoDialog> does: a view
86
+ * with several async actions needs somewhere for their failures to land that isn't one action's own row,
87
+ * and a hand-rolled error strip is the first thing to disagree with the app's about tone and dismissal.
88
+ *
89
+ * <Notice> — THE SINGLE ONE — was missing from that shipment, and it is the same mistake <Row>/<RowGroup>
90
+ * and <PageAction>/<PageHeader> each record one release earlier: the container went out without the thing
91
+ * that goes in it. Notice.vue's own comment says every view that hand-rolled `cmp.alertDanger()` around an
92
+ * interpolated error string renders it instead, "which is what makes the app's failures sound like one
93
+ * product rather than like sixty throw sites" — and the app took that sweep, 107 call sites of it. The
94
+ * extensions could not: the kit handed out the stack and kept the row, so thirteen of them went on
95
+ * hand-rolling the strip. Most of a view's failures are ONE at a time; the stack is the rarer case. */
96
+ type NoticeModel,
97
+ type NoticeTone,
98
+ type NoticeAction,
99
+ Notice,
100
+ NoticeStack,
101
+ Page,
102
+ /* <PageAction> ships beside <PageHeader> for the same reason <Row> ships beside <RowGroup>: handing out the
103
+ * container without the thing that goes in it is what made every view invent one. Five extensions filled
104
+ * `#actions` with a raw PrimeVue <Button> and picked a different cell of its variant matrix each time. */
105
+ PageAction,
106
+ PageHeader,
107
+ Panel,
108
+ Picker,
109
+ type PickerGroup,
110
+ type PickerOption,
111
+ type PickerOptions,
112
+ ProgressRing,
113
+ /* The writing field and the drag seam ship for the same reason <SplitView> did: an extension view that
114
+ * wants prose typeset as a document, or a pane the reader can size, would otherwise hand-roll one — and
115
+ * both recipes have a failure mode (a replica that disagrees with its field; a drag bound to the window)
116
+ * that is invisible until it is in front of somebody. */
117
+ ProseField,
118
+ ResizeSeam,
119
+ /* <ResponsiveOverlay> is the one to reach for over <AnchoredOverlay> above whenever the panel is a MENU: it
120
+ * is the same anchored box on desktop and a thumb-reachable sheet on a phone, behind one open flag. Extension
121
+ * views are read on both, and a popover pinned to a 24px trigger is not usable on a touch screen. */
122
+ ResponsiveOverlay,
123
+ Row,
124
+ RowGroup,
125
+ SearchBar,
126
+ Segmented,
127
+ seriesColor,
128
+ sinceOf,
129
+ SplitView,
130
+ StatRow,
131
+ StatusBadge,
132
+ type StatusVariant,
133
+ StepSection,
134
+ TIME_WINDOWS,
135
+ type TimeWindow,
136
+ timeWindowWords,
137
+ /* Whether the <SplitView> above has folded its index above its body. What a rail asks before swapping itself
138
+ * to a compact control, so the two halves of one screen change shape at one width. Outside a split it falls
139
+ * back to the device, which is the only narrow case left. */
140
+ useCompact,
141
+ useDevice,
142
+ /* Arrow keys / Home / End / Enter over a list, with the wrap-around and the scroll-into-view already
143
+ * decided. Ships because a keyboard-navigable list is the shape half these views are, and the parts a
144
+ * hand-roll leaves out (wrapping at the ends, keeping the active row in view) are invisible on a mouse. */
145
+ useListNavigation,
146
+ /* <useNow> and <useAsyncAction> ship because the drafts queue was the first extension with a live countdown
147
+ * and a page of mutations — the two shapes every such view hand-rolls, one interval and one busy flag at a
148
+ * time, each subtly wrong (a clock that keeps ticking with nothing on screen; a double-click firing twice). */
149
+ useNow,
150
+ errorMessage,
151
+ noticeFrom,
152
+ noticeOf,
153
+ useAsyncAction,
154
+ /* "Is my own element too narrow for this layout" — the question every extension view actually means, since it
155
+ * renders into a pane the reader can drag to half its width, not into the window. */
156
+ useNarrow,
157
+ useTheme,
158
+ } from "@intentic/ui";
159
+ // Also reachable as `@intentic/extension-ui/format` — see the note there for why an extension's pure logic
160
+ // wants them without the components attached.
161
+ export {
162
+ formatBytes,
163
+ formatDate,
164
+ formatDateTime,
165
+ formatDayMonth,
166
+ formatTime,
167
+ formatTimestamp,
168
+ formatTokens,
169
+ formatWeekdayTime,
170
+ timeAgo,
171
+ } from "./format.js";
172
+ /* The figure vocabulary that <Markdown> renders from prose and <MarkdownFigure> renders from data. Types only —
173
+ * an extension needs them to BUILD a figure out of facts it already holds (a dependency graph, a staleness
174
+ * tally) rather than round-tripping through markdown to draw one. The parser and the document splitter stay out
175
+ * of the kit: they are the prose surface's job, and <Markdown> already does it. */
176
+ export type {
177
+ BarsFigure,
178
+ BarsFigureItem,
179
+ DagFigure,
180
+ DagFigureEdge,
181
+ DagFigureNode,
182
+ Figure,
183
+ FigureAccent,
184
+ MermaidFigure,
185
+ StatsFigure,
186
+ StatsFigureItem,
187
+ } from "@intentic/ui/markdown";
188
+ /* The raw primitives, kept deliberately short. Handing out a primitive the KIT already wraps is how an
189
+ * extension screen ends up wearing OS chrome next to the app's own: `Select` and `InputText` used to ship here
190
+ * and four views took them, so a dropdown with a different focus ring sat beside <Picker> and a text field with
191
+ * different padding beside `cmp.input`. Those two are gone — <Picker> and `cmp.input()` are the spellings.
192
+ * <Dialog> stays until the kit has a general dialog shell: <ConfirmDialog> and <InfoDialog> are both narrower
193
+ * than the five views using it need. <Popover> stays for the same reason, but <AnchoredOverlay> above is the
194
+ * one to reach for — it is the only one of the two that opens in the right window when a panel is popped out. */
195
+ export { default as Button } from "primevue/button";
196
+ export { default as Checkbox } from "primevue/checkbox";
197
+ export { default as Dialog } from "primevue/dialog";
198
+ export type { MenuItem } from "primevue/menuitem";
199
+ export { default as Popover } from "primevue/popover";
200
+ export { default as ToggleSwitch } from "primevue/toggleswitch";