@intentic/extension-ui 1.309.0 → 1.310.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
@@ -80,13 +80,13 @@ export const formatDateTime = m["formatDateTime"];
80
80
  export const formatDayMonth = m["formatDayMonth"];
81
81
  export const formatDayMonthTime = m["formatDayMonthTime"];
82
82
  export const formatDuration = m["formatDuration"];
83
+ export const formatOf = m["formatOf"];
83
84
  export const formatTime = m["formatTime"];
84
85
  export const formatTimestamp = m["formatTimestamp"];
85
86
  export const formatTokens = m["formatTokens"];
86
87
  export const formatWeekdayTime = m["formatWeekdayTime"];
87
88
  export const formatWhen = m["formatWhen"];
88
89
  export const freshness = m["freshness"];
89
- export const isRenderableImage = m["isRenderableImage"];
90
90
  export const noticeFrom = m["noticeFrom"];
91
91
  export const noticeOf = m["noticeOf"];
92
92
  export const openForwardedPort = m["openForwardedPort"];
@@ -103,6 +103,7 @@ export const useAsyncAction = m["useAsyncAction"];
103
103
  export const useCompact = m["useCompact"];
104
104
  export const useDevice = m["useDevice"];
105
105
  export const useKeyedDraft = m["useKeyedDraft"];
106
+ export const useLatest = m["useLatest"];
106
107
  export const useListNavigation = m["useListNavigation"];
107
108
  export const useLoadingReveal = m["useLoadingReveal"];
108
109
  export const useNarrow = m["useNarrow"];
@@ -1,4 +1,4 @@
1
- export { AgentRunButton, type AgentRunAttempt, type AgentRunChoice, type AgentRunPicker, type ModelPicking, useAgentRunPick, type FixStanceLook, fixStanceLook, 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, MarkdownDocument, 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, ProjectChip, 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, timeWindows, type TimeWindow, timeWindowWords, useCompact, useDevice, useListNavigation, useNow, errorMessage, noticeFrom, noticeOf, useAsyncAction, useNarrow, useRailMemory, useScrollReset, type StickyTop, useStickyTop, useTheme, } from "../../ui/src/index.js";
1
+ export { AgentRunButton, type AgentRunAttempt, type AgentRunChoice, type AgentRunPicker, type ModelPicking, useAgentRunPick, type FixStanceLook, fixStanceLook, 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, type FileFormat, formatOf, Markdown, MarkdownDocument, 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, ProjectChip, 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, timeWindows, type TimeWindow, timeWindowWords, useCompact, useDevice, useListNavigation, useNow, useLatest, errorMessage, noticeFrom, noticeOf, useAsyncAction, useNarrow, useRailMemory, useScrollReset, type StickyTop, useStickyTop, useTheme, } from "../../ui/src/index.js";
2
2
  export { formatBytes, formatDate, formatDateTime, formatDayMonth, formatDayMonthTime, formatDuration, formatTime, formatTimestamp, formatTokens, formatWeekdayTime, formatWhen, freshness, timeAgo, } from "./format.js";
3
3
  export { diffSequence, pairEdits, similarity, wordDiff } from "./diff.js";
4
4
  export { activeLocale, extensionT } from "./i18n.js";
@@ -1,4 +1,3 @@
1
- export declare const isRenderableImage: (path: string) => boolean;
2
1
  export type ImageViewState = {
3
2
  readonly fit: true;
4
3
  } | {
@@ -0,0 +1 @@
1
+ export declare const useLatest: () => (() => () => boolean);
@@ -29,7 +29,6 @@ export { type DagEdge, type DagNode } from "./components/charts/dagLayout.js";
29
29
  export { default as FilterBar } from "./components/forms/FilterBar.vue";
30
30
  export { default as Icon } from "./components/primitives/Icon.vue";
31
31
  export { default as ImageView } from "./components/primitives/ImageView.vue";
32
- export { isRenderableImage } from "./components/primitives/imageView.js";
33
32
  export { default as InfoDialog } from "./components/overlays/InfoDialog.vue";
34
33
  export { default as InfoHint } from "./components/feedback/InfoHint.vue";
35
34
  export { default as InfoTable } from "./components/feedback/InfoTable.vue";
@@ -73,6 +72,7 @@ export { default as StatusBadge, type StatusVariant } from "./components/feedbac
73
72
  export { default as StepSection } from "./components/layout/StepSection.vue";
74
73
  export { sinceOf, timeWindows, type TimeWindow, timeWindowWords } from "./lib/timeWindow.js";
75
74
  export { type IconName } from "./icons/iconSets.js";
75
+ export { type FileFormat, formatOf } from "./lib/fileFormat.js";
76
76
  export { useDevice } from "./composables/useDevice.js";
77
77
  export { useNarrow } from "./composables/useNarrow.js";
78
78
  export { useListNavigation } from "./composables/useListNavigation.js";
@@ -80,6 +80,7 @@ export { useScrollReset } from "./composables/useScrollReset.js";
80
80
  export { type StickyTop, useStickyTop } from "./composables/useStickyTop.js";
81
81
  export { useRailMemory } from "./composables/useRailMemory.js";
82
82
  export { useNow } from "./composables/useNow.js";
83
+ export { useLatest } from "./composables/useLatest.js";
83
84
  export { useLoadingReveal } from "./composables/loadingReveal.js";
84
85
  export { errorMessage, noticeFrom, noticeOf, useAsyncAction } from "./composables/useAsyncAction.js";
85
86
  export { useTheme } from "./composables/useTheme.js";
@@ -0,0 +1,11 @@
1
+ export type FileCategory = "code" | "style" | "config" | "data" | "image" | "audio" | "video" | "doc" | "shell" | "archive" | "lock" | "binary" | "generic";
2
+ export interface FileFormat {
3
+ readonly category: FileCategory;
4
+ readonly label?: string;
5
+ readonly binary?: true;
6
+ readonly reads?: "markdown" | "plain" | "table" | "document";
7
+ readonly sheet?: true;
8
+ readonly pages?: true;
9
+ }
10
+ export declare const extensionOf: (path: string) => string;
11
+ export declare const formatOf: (path: string) => FileFormat;
package/names.mjs CHANGED
@@ -30,6 +30,7 @@ export const extensionUiNames = [
30
30
  "FilterBar",
31
31
  "fixStanceLook",
32
32
  "formatBytes",
33
+ "formatOf",
33
34
  "formatDate",
34
35
  "formatDateTime",
35
36
  "formatDayMonth",
@@ -48,7 +49,6 @@ export const extensionUiNames = [
48
49
  "InfoDialog",
49
50
  "InfoHint",
50
51
  "InfoTable",
51
- "isRenderableImage",
52
52
  "Markdown",
53
53
  "MarkdownDocument",
54
54
  "MarkdownFigure",
@@ -100,6 +100,7 @@ export const extensionUiNames = [
100
100
  "useNarrow",
101
101
  "useNoteDraft",
102
102
  "useNow",
103
+ "useLatest",
103
104
  "pairEdits",
104
105
  "useRailMemory",
105
106
  "useScrollReset",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentic/extension-ui",
3
- "version": "1.309.0",
3
+ "version": "1.310.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/i18n.ts CHANGED
@@ -19,6 +19,8 @@ import type { Ref } from "vue";
19
19
  */
20
20
  export type ExtensionT = (key: string, values?: Record<string, unknown>, plural?: number) => string;
21
21
 
22
+ const namespaceOf = (extensionId: string): string => `ext.${extensionId}`;
23
+
22
24
  /**
23
25
  * One extension's translator, bound to the slice of the message tree the host mounted its catalog under. Keys are its
24
26
  * own — `t("panel.title")` for what lives at `ext.<id>.panel.title` — so nothing it writes can collide with the app's
@@ -34,7 +36,7 @@ export type ExtensionT = (key: string, values?: Record<string, unknown>, plural?
34
36
  * The messages themselves are declared on the extension's module (`export const messages`), which the host loads for
35
37
  * the reader's language before it calls `activate`.
36
38
  */
37
- export const extensionT = (extensionId: string): ExtensionT => useT(`ext.${extensionId}`);
39
+ export const extensionT = (extensionId: string): ExtensionT => useT(namespaceOf(extensionId));
38
40
 
39
41
  /**
40
42
  * One extension's words in one call: the catalog the host mounts (`messages`) and the translator its components
@@ -70,7 +72,7 @@ export const extensionI18n = (
70
72
  export const registerExtensionMessages = (
71
73
  extensionId: string,
72
74
  messages: { readonly base: MessageTree; readonly load: (locale: string) => Promise<{ readonly default: MessageTree }> },
73
- ): Promise<void> => registerCatalog({ namespace: `ext.${extensionId}`, base: messages.base, load: (locale: string) => messages.load(locale) });
75
+ ): Promise<void> => registerCatalog({ namespace: namespaceOf(extensionId), ...messages });
74
76
 
75
77
  /** The language on screen, for the rare contribution that formats something itself. Read-only: change it with nothing. */
76
78
  export const activeLocale: Readonly<Ref<Locale>> = active;
package/src/index.ts CHANGED
@@ -65,7 +65,9 @@ export {
65
65
  InfoDialog,
66
66
  InfoHint,
67
67
  InfoTable,
68
- isRenderableImage,
68
+ // What a file is by its name (category, label, whether it is ever text), the table the shell's own surfaces read.
69
+ type FileFormat,
70
+ formatOf,
69
71
  Markdown,
70
72
  // An editable markdown document (author-facing), unlike `Markdown`'s read-only render.
71
73
  MarkdownDocument,
@@ -140,6 +142,8 @@ export {
140
142
  useListNavigation,
141
143
  // A ticking clock (`useNow`) and a busy/error flag for one mutation at a time (`useAsyncAction`).
142
144
  useNow,
145
+ // Drops an answer a newer request has superseded: `const current = begin(); …; if (!current()) return;`.
146
+ useLatest,
143
147
  errorMessage,
144
148
  noticeFrom,
145
149
  noticeOf,