@jini-ai/admin 0.7.3-next.3 → 0.7.4

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 (98) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/core/i18n-common-base.d.ts +443 -1
  3. package/dist/core/i18n-common.js +1 -36
  4. package/dist/core/i18n-types.d.ts +8 -0
  5. package/dist/core/i18n-types.js +2 -0
  6. package/dist/core/manifest/rules.js +1 -2
  7. package/dist/pages/PageEditorChrome.js +1 -1
  8. package/dist/pages/hooks/page-editor-actions.hooks.d.ts +2 -2
  9. package/dist/pages/hooks/page-editor-load.hooks.d.ts +1 -1
  10. package/dist/pages/hooks/page-editor-preview.hooks.d.ts +3 -3
  11. package/dist/pages/hooks/page-editor-recovery.hooks.d.ts +2 -2
  12. package/dist/pages/hooks/page-editor-recovery.hooks.js +1 -1
  13. package/dist/pages/hooks/page-editor-workspace.hooks.d.ts +4 -4
  14. package/dist/pages/lib/page-preview-youtube.js +1 -3
  15. package/dist/pages/lib/prettify-html.js +1 -1
  16. package/dist/pages/page-editor-i18n.d.ts +191 -1
  17. package/dist/pages/page-editor-i18n.js +2 -2
  18. package/dist/pages/page-route-rules.d.ts +3 -2
  19. package/dist/pages/page-route-rules.js +3 -2
  20. package/dist/react/kit-chat-component-types.d.ts +17 -1
  21. package/dist/react/kit-chat-types.d.ts +2 -0
  22. package/dist/screens/auth/auth-i18n.js +1 -1
  23. package/dist/screens/consent/consent-i18n.js +1 -1
  24. package/dist/screens/content-analysis/content-analysis-i18n-rows-rtl-asia.d.ts +2 -1
  25. package/dist/screens/content-analysis/content-analysis-i18n.d.ts +3 -1
  26. package/dist/screens/content-analysis/content-analysis-i18n.js +3 -7
  27. package/dist/screens/email/email-tabs-i18n.d.ts +2 -1
  28. package/dist/screens/email/email-tabs-i18n.js +1 -9
  29. package/dist/screens/media/MediaEditPanel.js +2 -1
  30. package/dist/screens/media/MediaGenerationFacts.d.ts +8 -0
  31. package/dist/screens/media/MediaGenerationFacts.js +10 -0
  32. package/dist/screens/media/hooks/use-media.hooks.js +4 -1
  33. package/dist/screens/media/media-i18n/media-addons-i18n.js +21 -21
  34. package/dist/screens/media/rules.d.ts +7 -0
  35. package/dist/screens/media/rules.js +12 -1
  36. package/dist/screens/menus/hooks/use-menu-editor.hooks.js +1 -1
  37. package/dist/screens/plugins/PluginLists.d.ts +3 -3
  38. package/dist/screens/plugins/PluginLists.js +10 -8
  39. package/dist/screens/plugins/rules.js +4 -10
  40. package/dist/screens/routines/Routines.hooks.js +3 -2
  41. package/dist/screens/sites/AllSitesTab.js +1 -2
  42. package/dist/screens/sites/use-local-sites.hooks.js +4 -3
  43. package/dist/screens/skills/SkillInstallConfirmation.d.ts +1 -1
  44. package/dist/screens/skills/SkillInstallConfirmation.js +9 -4
  45. package/dist/screens/skills/skill-failure.js +4 -1
  46. package/dist/screens/skills/skill-upload.d.ts +10 -0
  47. package/dist/screens/skills/skill-upload.js +27 -9
  48. package/dist/screens/skills/skills-page-dictionary.js +1 -8
  49. package/dist/screens/storage/hooks/use-storage.hooks.js +2 -1
  50. package/dist/screens/storage/storage-screen-bindings.js +1 -1
  51. package/dist/screens/taxonomy/TaxonomyTermList.js +2 -13
  52. package/dist/screens/taxonomy/TermPicker.js +8 -24
  53. package/dist/screens/taxonomy/hooks/use-merge-term-section.hooks.js +0 -2
  54. package/dist/screens/taxonomy/hooks/use-term-detail-panel.hooks.js +0 -2
  55. package/dist/screens/webmcp/webmcp-i18n.js +1 -1
  56. package/dist/security/controllers/root-key-reveal.js +3 -2
  57. package/dist/security/controllers/shared-keys.controller.js +3 -2
  58. package/dist/security/credential-forms.rules.js +4 -1
  59. package/dist/security/host/AccessTokensGroups.js +1 -1
  60. package/dist/security/host/hooks/access-token-actions.d.ts +1 -1
  61. package/dist/security/host/hooks/access-token-actions.js +10 -7
  62. package/dist/security/host/hooks/access-token-add-actions.js +1 -1
  63. package/dist/security/host/hooks/access-token-groups.hooks.js +6 -4
  64. package/dist/security/host/hooks/access-token-refresh.hooks.d.ts +1 -1
  65. package/dist/security/host/hooks/access-token-refresh.hooks.js +4 -3
  66. package/dist/security/host/hooks/access-token-replace-actions.js +1 -1
  67. package/dist/security/host/hooks/access-token-stores.hooks.d.ts +19 -24
  68. package/dist/security/host/hooks/access-token-stores.hooks.js +7 -0
  69. package/dist/security/host/hooks/use-access-tokens.hooks.d.ts +2 -0
  70. package/dist/shell/components/AssistantDock/DockChatPane.d.ts +6 -3
  71. package/dist/shell/components/AssistantDock/DockChatPane.js +5 -2
  72. package/dist/shell/components/AssistantDock/DockCleanupHeader.d.ts +25 -14
  73. package/dist/shell/components/AssistantDock/DockCleanupHeader.js +9 -5
  74. package/dist/shell/components/AssistantDock/DockHeader.d.ts +6 -6
  75. package/dist/shell/components/AssistantDock/DockHeader.js +1 -1
  76. package/dist/shell/components/AssistantDock/assistant-dock-i18n/chat-pane-es-id-de.js +18 -0
  77. package/dist/shell/components/AssistantDock/assistant-dock-i18n/chat-pane-hi-ur-bn.js +18 -0
  78. package/dist/shell/components/AssistantDock/assistant-dock-i18n/chat-pane-hu-fr-uk.js +18 -0
  79. package/dist/shell/components/AssistantDock/assistant-dock-i18n/chat-pane-ja-ko-pl.js +18 -0
  80. package/dist/shell/components/AssistantDock/assistant-dock-i18n/chat-pane-ru-fa-ar.js +18 -0
  81. package/dist/shell/components/AssistantDock/assistant-dock-i18n/chat-pane-tr-th-it.js +18 -0
  82. package/dist/shell/components/AssistantDock/assistant-dock-i18n/chat-pane-zh-cn-zh-tw-pt-br.js +18 -0
  83. package/dist/shell/components/AssistantDock/dock-pane-props.d.ts +4 -1
  84. package/dist/shell/components/AssistantDock/dock-pane-props.js +4 -4
  85. package/dist/shell/components/AssistantDock/hooks/execution-config.hooks.js +3 -1
  86. package/dist/shell/hooks/assistant-chats-port.hooks.d.ts +2 -0
  87. package/dist/shell/hooks/use-conversation-deep-link.js +3 -1
  88. package/dist/shell/hooks/use-desktop-view-release.hooks.js +2 -2
  89. package/dist/shell/lib/addons-routes.js +3 -3
  90. package/dist/shell/lib/browser-stream.js +8 -8
  91. package/dist/shell/lib/descriptor-i18n.js +2 -2
  92. package/dist/sites/transfer/use-export-password.hooks.js +1 -2
  93. package/dist/widgets/react/components/WidgetInstanceNotices.d.ts +1 -1
  94. package/dist/widgets/react/components/WidgetInstanceNotices.js +0 -2
  95. package/dist/widgets/react/hooks/use-widget-instance-editor.hooks.js +1 -1
  96. package/package.json +9 -9
  97. package/src/screens/email/email.css +1 -1
  98. package/src/themes/default/admin.css +3 -0
@@ -28,7 +28,13 @@ export const CHAT_PANE_TR_TH_IT = {
28
28
  "Stop using {name}": "{name} kullanımını durdur",
29
29
  "Voice input (coming soon)": "Sesli giriş (yakında)",
30
30
  "Stops future use in this chat. Guidance already loaded stays in the current context.": "Bu sohbette gelecekteki kullanımı durdurur. Önceden yüklenen yönergeler mevcut bağlamda kalır.",
31
+ "New desktop chat": "Yeni masaüstü sohbeti",
32
+ "New site chat": "Yeni site sohbeti",
33
+ "Desktop chat": "Masaüstü sohbeti",
34
+ "Site chat": "Site sohbeti",
31
35
  "Rename chat": "Sohbeti yeniden adlandır",
36
+ "Pin": "Sabitle",
37
+ "Unpin": "Sabitlemeyi kaldır",
32
38
  Conversations: "Konuşmalar",
33
39
  New: "Yeni",
34
40
  "Search conversations": "Konuşmalarda ara",
@@ -81,7 +87,13 @@ export const CHAT_PANE_TR_TH_IT = {
81
87
  "Stop using {name}": "หยุดใช้ {name}",
82
88
  "Voice input (coming soon)": "ป้อนข้อมูลด้วยเสียง (เร็วๆ นี้)",
83
89
  "Stops future use in this chat. Guidance already loaded stays in the current context.": "หยุดการใช้ในอนาคตสำหรับแชตนี้ คำแนะนำที่โหลดแล้วจะยังคงอยู่ในบริบทปัจจุบัน",
90
+ "New desktop chat": "แชตเดสก์ท็อปใหม่",
91
+ "New site chat": "แชตเว็บไซต์ใหม่",
92
+ "Desktop chat": "แชตเดสก์ท็อป",
93
+ "Site chat": "แชตเว็บไซต์",
84
94
  "Rename chat": "เปลี่ยนชื่อแชต",
95
+ "Pin": "ปักหมุด",
96
+ "Unpin": "เลิกปักหมุด",
85
97
  Conversations: "การสนทนา",
86
98
  New: "ใหม่",
87
99
  "Search conversations": "ค้นหาการสนทนา",
@@ -134,7 +146,13 @@ export const CHAT_PANE_TR_TH_IT = {
134
146
  "Stop using {name}": "Smetti di usare {name}",
135
147
  "Voice input (coming soon)": "Input vocale (in arrivo)",
136
148
  "Stops future use in this chat. Guidance already loaded stays in the current context.": "Interrompe gli utilizzi futuri in questa chat. Le istruzioni già caricate restano nel contesto attuale.",
149
+ "New desktop chat": "Nuova chat desktop",
150
+ "New site chat": "Nuova chat del sito",
151
+ "Desktop chat": "Chat desktop",
152
+ "Site chat": "Chat del sito",
137
153
  "Rename chat": "Rinomina chat",
154
+ "Pin": "Fissa",
155
+ "Unpin": "Rimuovi fissaggio",
138
156
  Conversations: "Conversazioni",
139
157
  New: "Nuova",
140
158
  "Search conversations": "Cerca conversazioni",
@@ -28,7 +28,13 @@ export const CHAT_PANE_ZH_CN_ZH_TW_PT_BR = {
28
28
  "Stop using {name}": "停止使用 {name}",
29
29
  "Voice input (coming soon)": "语音输入(即将推出)",
30
30
  "Stops future use in this chat. Guidance already loaded stays in the current context.": "停止在此聊天中继续使用。已加载的指导内容仍保留在当前上下文中。",
31
+ "New desktop chat": "新建桌面聊天",
32
+ "New site chat": "新建站点聊天",
33
+ "Desktop chat": "桌面聊天",
34
+ "Site chat": "站点聊天",
31
35
  "Rename chat": "重命名聊天",
36
+ "Pin": "置顶",
37
+ "Unpin": "取消置顶",
32
38
  Conversations: "对话",
33
39
  New: "新建",
34
40
  "Search conversations": "搜索对话",
@@ -81,7 +87,13 @@ export const CHAT_PANE_ZH_CN_ZH_TW_PT_BR = {
81
87
  "Stop using {name}": "停止使用 {name}",
82
88
  "Voice input (coming soon)": "語音輸入(即將推出)",
83
89
  "Stops future use in this chat. Guidance already loaded stays in the current context.": "停止在此聊天中繼續使用。已載入的指引仍保留在目前的上下文中。",
90
+ "New desktop chat": "新增桌面聊天",
91
+ "New site chat": "新增網站聊天",
92
+ "Desktop chat": "桌面聊天",
93
+ "Site chat": "網站聊天",
84
94
  "Rename chat": "重新命名聊天",
95
+ "Pin": "置頂",
96
+ "Unpin": "取消置頂",
85
97
  Conversations: "對話",
86
98
  New: "新增",
87
99
  "Search conversations": "搜尋對話",
@@ -134,7 +146,13 @@ export const CHAT_PANE_ZH_CN_ZH_TW_PT_BR = {
134
146
  "Stop using {name}": "Parar de usar {name}",
135
147
  "Voice input (coming soon)": "Entrada de voz (em breve)",
136
148
  "Stops future use in this chat. Guidance already loaded stays in the current context.": "Interrompe o uso futuro neste chat. As orientações já carregadas permanecem no contexto atual.",
149
+ "New desktop chat": "Novo chat do desktop",
150
+ "New site chat": "Novo chat do site",
151
+ "Desktop chat": "Chat do desktop",
152
+ "Site chat": "Chat do site",
137
153
  "Rename chat": "Renomear conversa",
154
+ "Pin": "Fixar",
155
+ "Unpin": "Desafixar",
138
156
  Conversations: "Conversas",
139
157
  New: "Nova",
140
158
  "Search conversations": "Buscar conversas",
@@ -1,4 +1,5 @@
1
1
  import type { DockChatPane } from "./DockChatPane.js";
2
+ import type { DockChatCleanup } from "./DockCleanupHeader.js";
2
3
  /** The pane's transport, session selection and runtime-picker wiring. */
3
4
  export declare function chatPaneSessionProps({ dock, deps }: Parameters<typeof DockChatPane>[0], _optional?: {}): {
4
5
  apiModeAvailable: boolean;
@@ -54,7 +55,9 @@ export declare function chatPaneSessionProps({ dock, deps }: Parameters<typeof D
54
55
  * the title where a history control is looked for.
55
56
  */
56
57
  /** The header, copy, run context and agent-control wiring. */
57
- export declare function chatPaneChromeProps({ dock, kit, hooks, deps }: Parameters<typeof DockChatPane>[0], _optional?: {}): {
58
+ export declare function chatPaneChromeProps({ dock, kit, hooks, deps, chatCleanup }: Parameters<typeof DockChatPane>[0] & {
59
+ chatCleanup: DockChatCleanup;
60
+ }, _optional?: {}): {
58
61
  header: import("react").JSX.Element;
59
62
  title: string;
60
63
  placeholder: string;
@@ -65,13 +65,13 @@ export function chatPaneSessionProps({ dock, deps }, _optional = {}) {
65
65
  * the title where a history control is looked for.
66
66
  */
67
67
  /** The header, copy, run context and agent-control wiring. */
68
- export function chatPaneChromeProps({ dock, kit, hooks, deps }, _optional = {}) {
69
- const { DockCleanupHeader, ChatCleanupPanel, ConversationTitle } = kit;
70
- const { useDockChatCleanup, useWiredAssistantSubagentsSettings } = hooks;
68
+ export function chatPaneChromeProps({ dock, kit, hooks, deps, chatCleanup }, _optional = {}) {
69
+ const { DockCleanupHeader, ChatCleanupSelectionActions, ConversationTitle } = kit;
70
+ const { useWiredAssistantSubagentsSettings } = hooks;
71
71
  const { translateAiAssistant, assistantTitleKey, toolCallOptions, replyLengthOptions } = deps;
72
72
  const { agentBridge, webMcpEnabled, locale, t, chatI18n, conversationDelete, chatDisplay, agentPlugins, runtime, agentPermissions, executionConfig, localCliSelection, chats, runContext, activeTitle, emptyState } = dock;
73
73
  return {
74
- header: _jsx(DockCleanupHeader, { ChatCleanupPanel: ChatCleanupPanel, chats: chats, activeTitle: activeTitle, mode: executionConfig.mode, agentId: localCliSelection.agentId, locale: locale, t: t, chatI18n: chatI18n, conversationDelete: conversationDelete, chatDisplay: chatDisplay, agentPlugins: agentPlugins, runtime: runtime, onMoreSettings: agentPermissions.onMoreSettings, empty: emptyState.empty, toolCallOptions: toolCallOptions, replyLengthOptions: replyLengthOptions, translateAiAssistant: translateAiAssistant, useSubagentsSettingsHook: useWiredAssistantSubagentsSettings, ConversationTitle: ConversationTitle, useChatCleanup: useDockChatCleanup }),
74
+ header: _jsx(DockCleanupHeader, { ChatCleanupSelectionActions: ChatCleanupSelectionActions, chats: chats, activeTitle: activeTitle, mode: executionConfig.mode, agentId: localCliSelection.agentId, locale: locale, t: t, chatI18n: chatI18n, conversationDelete: conversationDelete, chatDisplay: chatDisplay, agentPlugins: agentPlugins, runtime: runtime, onMoreSettings: agentPermissions.onMoreSettings, empty: emptyState.empty, toolCallOptions: toolCallOptions, replyLengthOptions: replyLengthOptions, translateAiAssistant: translateAiAssistant, useSubagentsSettingsHook: useWiredAssistantSubagentsSettings, ConversationTitle: ConversationTitle, chatCleanup: chatCleanup }),
75
75
  title: t({ key: assistantTitleKey }),
76
76
  placeholder: t({ key: "Ask the assistant to do something…" }),
77
77
  onMessagesChange: emptyState.handleMessagesChange,
@@ -28,8 +28,10 @@ export function useStoredAdminKey({ credentialLoader, invalidate, credentialKey,
28
28
  setHasStoredAdminKey(view.isSet);
29
29
  })
30
30
  .catch((error) => {
31
- if (isAbortError({ error }))
31
+ if (controller.signal.aborted || isAbortError({ error }))
32
32
  return;
33
+ // Only a terminal failure means unavailable; a pending restart retry stays unknown.
34
+ setHasStoredAdminKey(false);
33
35
  onLoadFailure(error);
34
36
  });
35
37
  };
@@ -2,6 +2,8 @@ import type { ChatMessage } from "../../react/kit.js";
2
2
  /** Structural slice of the host chat library's conversation summary, as the chats endpoint lists it. */
3
3
  export interface AssistantConversation {
4
4
  id: string;
5
+ /** Transcript ownership supplied by the host; independent of active-site tools. */
6
+ kind?: 'desktop' | 'site';
5
7
  title: string | null;
6
8
  titleSource: "fallback" | "generated" | "manual";
7
9
  messageCount: number;
@@ -18,6 +18,8 @@ export function useApplyConversationDeepLink({ query, chats, lookupConversation,
18
18
  let current = true; // fences a lookup that resolves after the link or principal changed
19
19
  void (async () => {
20
20
  const ports = latest.current;
21
+ // A non-empty conversation id came from this render's query, which cannot be null.
22
+ const lookupQuery = ports.query;
21
23
  let found;
22
24
  try {
23
25
  found = await ports.lookupConversation({ id: conversationId });
@@ -32,7 +34,7 @@ export function useApplyConversationDeepLink({ query, chats, lookupConversation,
32
34
  latest.current.chats.select({ id: conversationId }, {});
33
35
  return;
34
36
  }
35
- const next = new URLSearchParams(ports.query ?? undefined);
37
+ const next = new URLSearchParams(lookupQuery);
36
38
  next.delete("conversation");
37
39
  ports.notify({ key: CONVERSATION_GONE_KEY });
38
40
  ports.replaceQuery({ query: next });
@@ -6,8 +6,8 @@ const RELEASABLE_ROUTES = ['/', '/dashboard'];
6
6
  export function useDesktopViewRelease({ routePath, signedIn }, _options = {}) {
7
7
  useEffect(() => {
8
8
  const onReleaseCheck = (event) => {
9
- const path = routePath.split(/[?#]/, 1)[0];
10
- if (!signedIn || !RELEASABLE_ROUTES.includes(path ?? ''))
9
+ const [path = ''] = routePath.split(/[?#]/, 1);
10
+ if (!signedIn || !RELEASABLE_ROUTES.includes(path))
11
11
  event.preventDefault();
12
12
  };
13
13
  window.addEventListener('jini:release-check', onReleaseCheck);
@@ -52,7 +52,7 @@ function legacyRedirectPath({ parts, query, policy }) {
52
52
  const [section = ""] = parts;
53
53
  const { detail, panelPaths, legacyDefaults = {} } = policy;
54
54
  if (detail && parts.length === 2 && section === detail.legacySection)
55
- return legacyDetailPath({ parts, query, policy });
55
+ return legacyDetailPath({ parts, query, panelPaths, detail });
56
56
  // `hasOwn` keeps prototype names such as `/constructor` from resolving to a destination.
57
57
  if (parts.length !== 1 || !Object.hasOwn(panelPaths, section))
58
58
  return undefined;
@@ -62,8 +62,8 @@ function legacyRedirectPath({ parts, query, policy }) {
62
62
  return `${panelPaths[section]}${query}`;
63
63
  }
64
64
  /** A legacy two-segment detail URL (`/<legacySection>/<id>`) moved under its panel's path; undefined when that panel has no path. */
65
- function legacyDetailPath({ parts, query, policy }) {
66
- const base = policy.detail ? policy.panelPaths[policy.detail.panelId] : undefined;
65
+ function legacyDetailPath({ parts, query, panelPaths, detail }) {
66
+ const base = panelPaths[detail.panelId];
67
67
  return base === undefined ? undefined : `${base}/${parts[1]}${query}`;
68
68
  }
69
69
  /** Bare legacy links keep their former default tab; explicit tabs survive. */
@@ -40,10 +40,12 @@ export function startBrowserStream({ key, connect, receive = () => { } }, { port
40
40
  if (!state.away)
41
41
  receive({ frame: event.data });
42
42
  };
43
- state.channel = openSharedChannel({ key, scope, ports, onMessage });
43
+ const shared = openSharedChannel({ key, scope, ports, onMessage });
44
+ state.channel = shared?.channel;
44
45
  const halt = () => haltBrowserStream(state);
45
46
  const open = () => openBrowserStreamConnection(state, { connect, receive });
46
- const acquire = () => acquireBrowserStreamLock(state, { key, ports }, { open, halt, closeChannel, reconcile });
47
+ // Reconciliation acquires only while the channel admitted with this lock provider is open.
48
+ const acquire = () => acquireBrowserStreamLock(state, { key, requestLock: shared.requestLock }, { open, halt, closeChannel, reconcile });
47
49
  const closeChannel = () => closeBrowserStreamChannel(state, onMessage);
48
50
  const reconcile = () => reconcileBrowserStream(state, { halt, acquire, reconcileTab });
49
51
  const reconcileTab = () => reconcileTabStream(state, { ports, activity }, { halt, reconcile, open });
@@ -92,15 +94,13 @@ function openBrowserStreamConnection(state, { connect, receive }) {
92
94
  state.stopConnection = () => { connected = false; close(); };
93
95
  }
94
96
  /** A pending/acquired lock owns its own cancellation; denied hosts switch to tab mode. */
95
- function acquireBrowserStreamLock(state, { key, ports }, { open, halt, closeChannel, reconcile }) {
97
+ function acquireBrowserStreamLock(state, { key, requestLock }, { open, halt, closeChannel, reconcile }) {
96
98
  if (state.lock)
97
99
  return;
98
- if (!ports.requestLock)
99
- throw new Error("shared browser stream has no lock provider");
100
100
  const requested = new AbortController();
101
101
  state.lock = requested;
102
102
  // Disposal and pagehide both run `halt()`, which aborts this request, so its signal covers them.
103
- void ports.requestLock({ key: `browser-stream:${key}`, signal: requested.signal, hold: async () => {
103
+ void requestLock({ key: `browser-stream:${key}`, signal: requested.signal, hold: async () => {
104
104
  if (requested.signal.aborted)
105
105
  return;
106
106
  // Set the release first so cleanup always releases even when connect throws.
@@ -186,7 +186,7 @@ function hiddenSinceNow({ ports, previous }) {
186
186
  /**
187
187
  * Opens the cross-tab fan-out channel for an origin-scoped stream and starts listening on it.
188
188
  * @param required Stream key and scope, browser ports, and the frame listener.
189
- * @returns The channel, or undefined for tab scope, hosts lacking locks or channels, or a refused channel.
189
+ * @returns The channel and its admitted lock provider, or undefined for tab scope, missing capabilities or a refused channel.
190
190
  */
191
191
  function openSharedChannel({ key, scope, ports, onMessage }) {
192
192
  // Both capabilities are necessary: a lock without fan-out would silence follower tabs.
@@ -196,6 +196,6 @@ function openSharedChannel({ key, scope, ports, onMessage }) {
196
196
  if (!channel)
197
197
  return undefined; // Storage-denied hosts use the visibility-managed fallback.
198
198
  channel.addEventListener("message", onMessage);
199
- return channel;
199
+ return { channel, requestLock: ports.requestLock.bind(ports) };
200
200
  }
201
201
  //# sourceMappingURL=browser-stream.js.map
@@ -20,8 +20,8 @@ export function descriptorText({ i18n, locale, english }, _optional = {}) {
20
20
  const exact = i18n[locale]?.[english];
21
21
  if (exact !== undefined)
22
22
  return exact;
23
- // `String#split` always yields at least one element (`"".split("-")` is `[""]`), so `?? locale` never fires; it only narrows the index type.
24
- const base = locale.split("-")[0] ?? locale;
23
+ // `String#split` always yields at least one element (`"".split("-")` is `[""]`).
24
+ const [base = locale] = locale.split("-");
25
25
  return (base !== locale ? i18n[base]?.[english] : undefined) ?? english;
26
26
  }
27
27
  function localizeField(field, text) {
@@ -54,8 +54,7 @@ export function useExportPassword({ port, labels, canManageSavedKeys, identity,
54
54
  if (request !== generation.current)
55
55
  return;
56
56
  setPasswordCopied(copied);
57
- if (!copied)
58
- setPasswordError(labels.copyFailed);
57
+ setPasswordError(copied ? null : labels.copyFailed);
59
58
  }
60
59
  return { revealedPassword: canManageSavedKeys ? revealedPassword : null, passwordError, revealingId, passwordCopied, revealPassword, copyPassword, hidePassword };
61
60
  }
@@ -10,5 +10,5 @@ import type { WidgetInstanceGuard } from '../../rules.js';
10
10
  export declare function WidgetInstanceGuardNotice({ guard, t }: {
11
11
  guard: WidgetInstanceGuard;
12
12
  t: (key: string) => string;
13
- }): import("react").JSX.Element | null;
13
+ }): import("react").JSX.Element;
14
14
  //# sourceMappingURL=WidgetInstanceNotices.d.ts.map
@@ -20,8 +20,6 @@ export function WidgetInstanceGuardNotice({ guard, t }) {
20
20
  return _jsx("div", { className: "notice error", children: t("No widget type specified.") });
21
21
  case "unknown-type":
22
22
  return _jsxs("div", { className: "notice error", children: [t('Unknown widget type "'), guard.widgetType, "\"."] });
23
- default:
24
- return null;
25
23
  }
26
24
  }
27
25
  //# sourceMappingURL=WidgetInstanceNotices.js.map
@@ -28,7 +28,7 @@ export function useWidgetInstanceEditor({ params, api, defaultConfig }, { t = wi
28
28
  }, [controller, params.widgetId, params.widgetType]);
29
29
  const state = snapshot ?? { isNew: params.widgetId === null, widget: null, whereUsed: { count: 0, references: [] }, title: '', config: params.widgetId === null ? defaultConfig(params.widgetType ?? 'text') : {}, message: null, error: null, fieldErrors: [], loading: params.widgetId !== null, saving: false, widgetType: params.widgetId === null ? params.widgetType : undefined };
30
30
  // New unsaved widgets have no original to compare with and leave without a prompt.
31
- const { confirmLeave } = useDirtyGuard({ current: { title: state.title, config: state.config }, original: state.widget ? { title: state.widget.title, config: state.widget.config } : null }, { host: window, translate: key => key });
31
+ const { confirmLeave } = useDirtyGuard({ current: { title: state.title, config: state.config }, original: state.widget ? { title: state.widget.title, config: state.widget.config } : null }, { host: window, translate: t });
32
32
  return { ...state, widgetType: state.widgetType, setTitle: title => controller?.setTitle({ title }), setConfig: config => controller?.setConfig({ config }), save: async () => { await controller?.save(); }, confirmLeave, t, locale };
33
33
  }
34
34
  export function useWiredWidgetInstanceEditor(params) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jini-ai/admin",
3
- "version": "0.7.3-next.3",
3
+ "version": "0.7.4",
4
4
  "description": "Composable admin surface for Jini-hosted products: framework-free contracts, panel registry, and route model in `/core`; React shell and panels in `/react`. Import only the layers you need.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -5205,7 +5205,7 @@
5205
5205
  "peerDependencies": {
5206
5206
  "react": "^18.3.0 || ^19.0.0",
5207
5207
  "react-dom": "^18.3.0 || ^19.0.0",
5208
- "@jini-ai/core": "^0.7.3-next.3"
5208
+ "@jini-ai/core": "^0.7.4"
5209
5209
  },
5210
5210
  "devDependencies": {
5211
5211
  "@testing-library/jest-dom": "^6.6.3",
@@ -5217,13 +5217,13 @@
5217
5217
  "react": "^19.2.0",
5218
5218
  "react-dom": "^19.2.0",
5219
5219
  "@testing-library/user-event": "^14.6.1",
5220
- "@jini-ai/agentic": "^0.7.3-next.3",
5221
- "@jini-ai/ui-kit": "^0.7.3-next.3",
5222
- "@jini-ai/core": "^0.7.3-next.3",
5223
- "@jini-ai/agent-plugins": "^0.7.3-next.3",
5224
- "@jini-ai/cms": "^0.7.3-next.3",
5225
- "@jini-ai/ui": "^0.7.3-next.3",
5226
- "@jini-ai/chat": "^0.7.3-next.3"
5220
+ "@jini-ai/agentic": "^0.7.4",
5221
+ "@jini-ai/ui": "^0.7.4",
5222
+ "@jini-ai/agent-plugins": "^0.7.4",
5223
+ "@jini-ai/cms": "^0.7.4",
5224
+ "@jini-ai/core": "^0.7.4",
5225
+ "@jini-ai/ui-kit": "^0.7.4",
5226
+ "@jini-ai/chat": "^0.7.4"
5227
5227
  },
5228
5228
  "typesVersions": {
5229
5229
  "*": {
@@ -69,7 +69,7 @@
69
69
  .jini-admin-email-template-field-list { display: flex; flex-wrap: wrap; gap: var(--jini-admin-space-3); }
70
70
  .jini-admin-email-template-field-list .jini-admin-email-field { flex: 1 1 12rem; }
71
71
  .jini-admin-email-template-field-list label { display: flex; align-items: center; gap: var(--jini-admin-space-2); }
72
- .jini-admin-email-template-preview .page-preview-frame { background: var(--jini-admin-site-preview-bg, var(--jini-theme-light-bg)); }
72
+ .jini-admin-email-template-preview .page-preview-frame { background: var(--jini-admin-site-preview-bg); }
73
73
  .jini-admin-email-template-empty { padding: var(--jini-admin-space-3); margin: 0; }
74
74
  @media (max-width: 900px) {
75
75
  .jini-admin-email-template-source { min-height: 20rem; }
@@ -21,6 +21,9 @@
21
21
  --jini-theme-dark-danger: #ff8b80;
22
22
  --jini-theme-dark-success: #79d69b;
23
23
  --jini-theme-dark-warning: #ebc36b;
24
+ /* Email and site previews render on a light page even in the dark admin; equals --jini-theme-light-bg.
25
+ Declared here because screen CSS may read only shared tokens or --jini-admin-* (L7-css-tokens). */
26
+ --jini-admin-site-preview-bg: #ffffff;
24
27
  --jini-font-body: system-ui, sans-serif;
25
28
  --jini-font-heading: system-ui, sans-serif;
26
29
  --jini-font-mono: ui-monospace, monospace;