@intentic/extension-ui 1.231.0 → 1.233.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 CHANGED
@@ -91,6 +91,7 @@ export const useAgentRunPick = m["useAgentRunPick"];
91
91
  export const useAsyncAction = m["useAsyncAction"];
92
92
  export const useCompact = m["useCompact"];
93
93
  export const useDevice = m["useDevice"];
94
+ export const useKeyedDraft = m["useKeyedDraft"];
94
95
  export const useListNavigation = m["useListNavigation"];
95
96
  export const useLoadingReveal = m["useLoadingReveal"];
96
97
  export const useNarrow = m["useNarrow"];
@@ -1,4 +1,4 @@
1
- export { AgentRunButton, type AgentRunChoice, type AgentRunPicker, type ModelPicking, useAgentRunPick, AnchoredOverlay, Avatar, Button, vAction, 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, DisclosureRow, 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, Button, vAction, 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, DisclosureRow, FilterBar, Icon, type IconName, ImageView, InfoDialog, InfoHint, InfoTable, isRenderableImage, Markdown, MarkdownFigure, Modal, type NavGroup, NavRail, NoteEditor, type NoteDraft, type NoteDraftOptions, useNoteDraft, useKeyedDraft, 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 Checkbox } from "primevue/checkbox";
@@ -1,4 +1,4 @@
1
- import { type IconName } from "../icons/iconSets.js";
1
+ import type { IconName } from "../icons/iconSets.js";
2
2
  declare const __VLS_export: <T>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
3
  props: import("vue").PublicProps & __VLS_PrettifyLocal<{
4
4
  open: boolean;
@@ -12,7 +12,11 @@ type __VLS_Props = {
12
12
  tone?: RowTone;
13
13
  disabled?: boolean;
14
14
  };
15
- declare var __VLS_1: {}, __VLS_26: {}, __VLS_29: {}, __VLS_32: {}, __VLS_35: {}, __VLS_38: {}, __VLS_46: {}, __VLS_48: {}, __VLS_50: {};
15
+ declare var __VLS_1: {}, __VLS_26: {
16
+ mark: 22 | 18 | 28;
17
+ }, __VLS_29: {}, __VLS_32: {}, __VLS_35: {}, __VLS_38: {}, __VLS_46: {
18
+ mark: 22 | 18 | 28;
19
+ }, __VLS_48: {}, __VLS_50: {};
16
20
  type __VLS_Slots = {} & {
17
21
  before?: (props: typeof __VLS_1) => any;
18
22
  } & {
@@ -1,6 +1,12 @@
1
+ import type { ImageViewState } from "./imageView.js";
1
2
  type __VLS_Props = {
2
3
  src: string;
4
+ view?: ImageViewState;
3
5
  };
4
- declare const __VLS_export: 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>;
6
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
7
+ "update:view": (args_0: ImageViewState) => any;
8
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
9
+ "onUpdate:view"?: ((args_0: ImageViewState) => any) | undefined;
10
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
11
  declare const _default: typeof __VLS_export;
6
12
  export default _default;
@@ -1,4 +1,4 @@
1
- import { type Cross, type Side } from "../lib/anchorPlacement.js";
1
+ import type { Cross, Side } from "../lib/anchorPlacement.js";
2
2
  type __VLS_Props = {
3
3
  anchor: HTMLElement | undefined;
4
4
  header?: string;
@@ -1,4 +1,4 @@
1
- import { type IconName } from "../icons/iconSets.js";
1
+ import type { IconName } from "../icons/iconSets.js";
2
2
  import { type RowDensity, type RowTone } from "./row.js";
3
3
  type __VLS_Props = {
4
4
  icon?: IconName;
@@ -20,7 +20,9 @@ type __VLS_Props = {
20
20
  headerControls?: string;
21
21
  headlineGuard?: boolean;
22
22
  };
23
- declare var __VLS_16: {}, __VLS_29: {}, __VLS_31: {}, __VLS_33: {}, __VLS_35: {}, __VLS_42: {};
23
+ declare var __VLS_16: {
24
+ mark: 22 | 18 | 28;
25
+ }, __VLS_29: {}, __VLS_31: {}, __VLS_33: {}, __VLS_35: {}, __VLS_42: {};
24
26
  type __VLS_Slots = {} & {
25
27
  lead?: (props: typeof __VLS_16) => any;
26
28
  } & {
@@ -1,9 +1,11 @@
1
+ import { type RowDensity } from "./row.js";
1
2
  type __VLS_Props = {
2
3
  label?: string;
3
4
  count?: string | number;
4
5
  caption?: string;
5
6
  flat?: boolean;
6
7
  undivided?: boolean;
8
+ density?: RowDensity;
7
9
  };
8
10
  declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {}, __VLS_7: {};
9
11
  type __VLS_Slots = {} & {
@@ -1,6 +1,7 @@
1
+ import { type RowDensity } from "./row.js";
1
2
  type __VLS_Props = {
2
3
  rows?: number;
3
- density?: `comfortable` | `compact` | `dense`;
4
+ density?: RowDensity;
4
5
  lead?: boolean;
5
6
  description?: boolean;
6
7
  control?: boolean;
@@ -7,7 +7,8 @@ export interface TallyItem {
7
7
  readonly pulse?: boolean;
8
8
  }
9
9
  type __VLS_Props = {
10
- items: readonly TallyItem[];
10
+ items?: readonly TallyItem[];
11
+ skeleton?: number;
11
12
  };
12
13
  declare var __VLS_1: {};
13
14
  type __VLS_Slots = {} & {
@@ -1,4 +1,4 @@
1
- import { type IconName } from "../icons/iconSets.js";
1
+ import type { IconName } from "../icons/iconSets.js";
2
2
  type __VLS_Props = {
3
3
  step?: number;
4
4
  icon?: IconName;
@@ -1 +1,9 @@
1
1
  export declare const isRenderableImage: (path: string) => boolean;
2
+ export type ImageViewState = {
3
+ readonly fit: true;
4
+ } | {
5
+ readonly fit: false;
6
+ readonly scale: number;
7
+ readonly x: number;
8
+ readonly y: number;
9
+ };
@@ -1,3 +1,4 @@
1
+ import { type ComputedRef } from "vue";
1
2
  export type RowDensity = `comfortable` | `compact` | `dense`;
2
3
  export type RowTone = `default` | `danger` | `warning` | `success` | `info`;
3
4
  export declare const ROW_TIERS: {
@@ -7,6 +8,7 @@ export declare const ROW_TIERS: {
7
8
  readonly icon: "text-lg";
8
9
  readonly title: "font-semibold leading-tight";
9
10
  readonly description: "text-xs";
11
+ readonly mark: 28;
10
12
  };
11
13
  readonly compact: {
12
14
  readonly pad: "px-4 py-2.5";
@@ -14,6 +16,7 @@ export declare const ROW_TIERS: {
14
16
  readonly icon: "text-sm";
15
17
  readonly title: "text-sm font-medium leading-tight";
16
18
  readonly description: "text-2xs";
19
+ readonly mark: 22;
17
20
  };
18
21
  readonly dense: {
19
22
  readonly pad: "px-2.5 py-2";
@@ -21,6 +24,7 @@ export declare const ROW_TIERS: {
21
24
  readonly icon: "text-xs";
22
25
  readonly title: "text-xs font-medium leading-tight";
23
26
  readonly description: "text-2xs";
27
+ readonly mark: 18;
24
28
  };
25
29
  };
26
30
  export declare const ROW_TONES: {
@@ -40,3 +44,10 @@ export declare const ROW_TOGGLE_SIZES: {
40
44
  readonly compact: "text-2xs";
41
45
  readonly dense: "text-2xs";
42
46
  };
47
+ export declare const ROW_BLOCK_PAD: {
48
+ readonly comfortable: "px-4.5 py-4";
49
+ readonly compact: "px-4 py-3.5";
50
+ readonly dense: "px-2.5 py-3";
51
+ };
52
+ export declare const provideRowDensity: (density: ComputedRef<RowDensity>) => void;
53
+ export declare const useRowDensity: (own: () => RowDensity | undefined) => ComputedRef<RowDensity>;
@@ -0,0 +1,5 @@
1
+ import { type Ref, type WritableComputedRef } from "vue";
2
+ export declare const useKeyedDraft: (selected: Ref<string | undefined>) => {
3
+ draft: WritableComputedRef<string | undefined>;
4
+ hasDraft: (key: string) => boolean;
5
+ };
@@ -1,4 +1,4 @@
1
- import { type Ref } from "vue";
1
+ import type { Ref } from "vue";
2
2
  export type ColorScheme = "light" | "dark";
3
3
  export declare function useTheme(): {
4
4
  scheme: Ref<ColorScheme, ColorScheme>;
@@ -39,6 +39,7 @@ export { default as NavRail } from "./components/NavRail.vue";
39
39
  export { type NavGroup } from "./components/navRail.js";
40
40
  export { default as NoteEditor } from "./components/NoteEditor.vue";
41
41
  export { type NoteDraft, type NoteDraftOptions, useNoteDraft } from "./composables/useNoteDraft.js";
42
+ export { useKeyedDraft } from "./composables/useKeyedDraft.js";
42
43
  export { default as Notice } from "./components/Notice.vue";
43
44
  export { default as NoticeStack } from "./components/NoticeStack.vue";
44
45
  export { type NoticeAction, type NoticeModel, type NoticeTone } from "./components/notice.js";
@@ -0,0 +1,11 @@
1
+ export interface MarkdownBlock {
2
+ readonly start: number;
3
+ readonly end: number;
4
+ }
5
+ export interface MarkdownBlocks {
6
+ readonly blocks: readonly MarkdownBlock[];
7
+ readonly defs: string;
8
+ }
9
+ export declare const splitMarkdownBlocks: (source: string) => MarkdownBlocks;
10
+ export declare const blockAtOffset: (blocks: readonly MarkdownBlock[], offset: number) => number;
11
+ export declare const offsetOfLine: (source: string, line: number) => number;
@@ -1,3 +1,4 @@
1
+ export { blockAtOffset, type MarkdownBlock, type MarkdownBlocks, offsetOfLine, splitMarkdownBlocks } from "./blocks.js";
1
2
  export { type CodeBlock, codeBlockHtml, copyCodeFromEvent, escapeHtml } from "./code.js";
2
3
  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";
4
+ export { createStreamingMarkdown, lexBlocks, lexInline, type MarkdownDecorator, type MarkdownPart, markdownParseCount, type MarkdownToken, renderMarkdown, renderMarkdownParts, type RenderedMarkdown, settledEnd, type StreamingMarkdown, } from "./render.js";
@@ -1,4 +1,11 @@
1
1
  import { type Figure } from "./figures.js";
2
+ export interface MarkdownToken {
3
+ readonly type: string;
4
+ readonly raw: string;
5
+ readonly tokens?: readonly MarkdownToken[];
6
+ }
7
+ export declare const lexBlocks: (source: string) => readonly MarkdownToken[] | undefined;
8
+ export declare const lexInline: (source: string) => readonly MarkdownToken[] | undefined;
2
9
  export type MarkdownDecorator = (fragment: DocumentFragment) => void;
3
10
  export declare const markdownParseCount: () => number;
4
11
  export declare const renderMarkdown: (source: string, decorate?: MarkdownDecorator) => string;
package/names.mjs CHANGED
@@ -84,6 +84,7 @@ export const extensionUiNames = [
84
84
  "useAsyncAction",
85
85
  "useCompact",
86
86
  "useDevice",
87
+ "useKeyedDraft",
87
88
  "useListNavigation",
88
89
  "useLoadingReveal",
89
90
  "useNarrow",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentic/extension-ui",
3
- "version": "1.231.0",
3
+ "version": "1.233.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",
@@ -40,8 +40,8 @@
40
40
  "typescript": "5.9.3",
41
41
  "vue": "3.5.40",
42
42
  "vue-tsc": "3.3.9",
43
- "@intentic/tsconfig": "0.0.0",
44
- "@intentic/ui": "0.0.0"
43
+ "@intentic/ui": "0.0.0",
44
+ "@intentic/tsconfig": "0.0.0"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "vue": "3"
package/src/index.ts CHANGED
@@ -74,8 +74,8 @@ export {
74
74
  type ChangeStatus,
75
75
  ui,
76
76
  Code,
77
- /* <CodeField> ships beside <Code> because shipping the reader WITHOUT the writer is what made the memory
78
- * extension put a bare grey <textarea> next to a coloured block of the very same file: the kit had no way
77
+ /* <CodeField> ships beside <Code> because shipping the reader WITHOUT the writer is what made a note pane
78
+ * put a bare grey <textarea> next to a coloured block of the very same file: the kit had no way
79
79
  * to say "this text, in its own colours, with a caret in it". */
80
80
  CodeField,
81
81
  ConfirmDialog,
@@ -116,18 +116,23 @@ export {
116
116
  Modal,
117
117
  type NavGroup,
118
118
  NavRail,
119
- /* <NoteEditor> and `useNoteDraft` ship because TWO extensions are a pane that reads a markdown file, lets
120
- * somebody correct it and lets them delete it, knowledge and memory, and they had built the same thing
121
- * twice: the same Copy/Edit/Delete cluster, the same Cancel/Save pair, the same in-place confirmation, the
122
- * same draft-or-file binding, the same read-and-write-on-one-surface rule. They had already drifted in the
123
- * ways a second copy does: one cleared its confirmation when a write failed and the other did not, and
124
- * NEITHER caught a failing write, so the error strip filled in from the mutation while the click handler's
125
- * promise rejected into the console. The component is the chrome and the composable is the lifecycle,
126
- * separately, because what a note LOOKS like past the frame is exactly where the two panes differ. */
119
+ /* <NoteEditor> and `useNoteDraft` ship because "a pane that reads a markdown file, lets somebody correct it
120
+ * and lets them delete it" is a shape an extension arrives at over and over, and the first two that did
121
+ * built the same thing twice: the same Copy/Edit/Delete cluster, the same Cancel/Save pair, the same
122
+ * in-place confirmation, the same draft-or-file binding, the same read-and-write-on-one-surface rule. They
123
+ * had already drifted in the ways a second copy does: one cleared its confirmation when a write failed and
124
+ * the other did not, and NEITHER caught a failing write, so the error strip filled in from the mutation
125
+ * while the click handler's promise rejected into the console. The component is the chrome and the
126
+ * composable is the lifecycle, separately, because what a note LOOKS like past the frame is exactly where
127
+ * two panes differ. */
127
128
  NoteEditor,
128
129
  type NoteDraft,
129
130
  type NoteDraftOptions,
130
131
  useNoteDraft,
132
+ /* And the map those drafts live in, for the same pair of callers: the lifecycle deliberately does not own
133
+ * the ref (an unsaved edit has to outlive the pane that shows it), so both views had written the same
134
+ * keyed store above it, down to the `undefined` deletes rule the picker's "Unsaved" reads. */
135
+ useKeyedDraft,
131
136
  /* <NoticeStack> and its model ship beside <ConfirmDialog> for the same reason <InfoDialog> does: a view
132
137
  * with several async actions needs somewhere for their failures to land that isn't one action's own row,
133
138
  * and a hand-rolled error strip is the first thing to disagree with the app's about tone and dismissal.