@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.
- package/CHANGELOG.md +7 -0
- package/dist/core/i18n-common-base.d.ts +443 -1
- package/dist/core/i18n-common.js +1 -36
- package/dist/core/i18n-types.d.ts +8 -0
- package/dist/core/i18n-types.js +2 -0
- package/dist/core/manifest/rules.js +1 -2
- package/dist/pages/PageEditorChrome.js +1 -1
- package/dist/pages/hooks/page-editor-actions.hooks.d.ts +2 -2
- package/dist/pages/hooks/page-editor-load.hooks.d.ts +1 -1
- package/dist/pages/hooks/page-editor-preview.hooks.d.ts +3 -3
- package/dist/pages/hooks/page-editor-recovery.hooks.d.ts +2 -2
- package/dist/pages/hooks/page-editor-recovery.hooks.js +1 -1
- package/dist/pages/hooks/page-editor-workspace.hooks.d.ts +4 -4
- package/dist/pages/lib/page-preview-youtube.js +1 -3
- package/dist/pages/lib/prettify-html.js +1 -1
- package/dist/pages/page-editor-i18n.d.ts +191 -1
- package/dist/pages/page-editor-i18n.js +2 -2
- package/dist/pages/page-route-rules.d.ts +3 -2
- package/dist/pages/page-route-rules.js +3 -2
- package/dist/react/kit-chat-component-types.d.ts +17 -1
- package/dist/react/kit-chat-types.d.ts +2 -0
- package/dist/screens/auth/auth-i18n.js +1 -1
- package/dist/screens/consent/consent-i18n.js +1 -1
- package/dist/screens/content-analysis/content-analysis-i18n-rows-rtl-asia.d.ts +2 -1
- package/dist/screens/content-analysis/content-analysis-i18n.d.ts +3 -1
- package/dist/screens/content-analysis/content-analysis-i18n.js +3 -7
- package/dist/screens/email/email-tabs-i18n.d.ts +2 -1
- package/dist/screens/email/email-tabs-i18n.js +1 -9
- package/dist/screens/media/MediaEditPanel.js +2 -1
- package/dist/screens/media/MediaGenerationFacts.d.ts +8 -0
- package/dist/screens/media/MediaGenerationFacts.js +10 -0
- package/dist/screens/media/hooks/use-media.hooks.js +4 -1
- package/dist/screens/media/media-i18n/media-addons-i18n.js +21 -21
- package/dist/screens/media/rules.d.ts +7 -0
- package/dist/screens/media/rules.js +12 -1
- package/dist/screens/menus/hooks/use-menu-editor.hooks.js +1 -1
- package/dist/screens/plugins/PluginLists.d.ts +3 -3
- package/dist/screens/plugins/PluginLists.js +10 -8
- package/dist/screens/plugins/rules.js +4 -10
- package/dist/screens/routines/Routines.hooks.js +3 -2
- package/dist/screens/sites/AllSitesTab.js +1 -2
- package/dist/screens/sites/use-local-sites.hooks.js +4 -3
- package/dist/screens/skills/SkillInstallConfirmation.d.ts +1 -1
- package/dist/screens/skills/SkillInstallConfirmation.js +9 -4
- package/dist/screens/skills/skill-failure.js +4 -1
- package/dist/screens/skills/skill-upload.d.ts +10 -0
- package/dist/screens/skills/skill-upload.js +27 -9
- package/dist/screens/skills/skills-page-dictionary.js +1 -8
- package/dist/screens/storage/hooks/use-storage.hooks.js +2 -1
- package/dist/screens/storage/storage-screen-bindings.js +1 -1
- package/dist/screens/taxonomy/TaxonomyTermList.js +2 -13
- package/dist/screens/taxonomy/TermPicker.js +8 -24
- package/dist/screens/taxonomy/hooks/use-merge-term-section.hooks.js +0 -2
- package/dist/screens/taxonomy/hooks/use-term-detail-panel.hooks.js +0 -2
- package/dist/screens/webmcp/webmcp-i18n.js +1 -1
- package/dist/security/controllers/root-key-reveal.js +3 -2
- package/dist/security/controllers/shared-keys.controller.js +3 -2
- package/dist/security/credential-forms.rules.js +4 -1
- package/dist/security/host/AccessTokensGroups.js +1 -1
- package/dist/security/host/hooks/access-token-actions.d.ts +1 -1
- package/dist/security/host/hooks/access-token-actions.js +10 -7
- package/dist/security/host/hooks/access-token-add-actions.js +1 -1
- package/dist/security/host/hooks/access-token-groups.hooks.js +6 -4
- package/dist/security/host/hooks/access-token-refresh.hooks.d.ts +1 -1
- package/dist/security/host/hooks/access-token-refresh.hooks.js +4 -3
- package/dist/security/host/hooks/access-token-replace-actions.js +1 -1
- package/dist/security/host/hooks/access-token-stores.hooks.d.ts +19 -24
- package/dist/security/host/hooks/access-token-stores.hooks.js +7 -0
- package/dist/security/host/hooks/use-access-tokens.hooks.d.ts +2 -0
- package/dist/shell/components/AssistantDock/DockChatPane.d.ts +6 -3
- package/dist/shell/components/AssistantDock/DockChatPane.js +5 -2
- package/dist/shell/components/AssistantDock/DockCleanupHeader.d.ts +25 -14
- package/dist/shell/components/AssistantDock/DockCleanupHeader.js +9 -5
- package/dist/shell/components/AssistantDock/DockHeader.d.ts +6 -6
- package/dist/shell/components/AssistantDock/DockHeader.js +1 -1
- package/dist/shell/components/AssistantDock/assistant-dock-i18n/chat-pane-es-id-de.js +18 -0
- package/dist/shell/components/AssistantDock/assistant-dock-i18n/chat-pane-hi-ur-bn.js +18 -0
- package/dist/shell/components/AssistantDock/assistant-dock-i18n/chat-pane-hu-fr-uk.js +18 -0
- package/dist/shell/components/AssistantDock/assistant-dock-i18n/chat-pane-ja-ko-pl.js +18 -0
- package/dist/shell/components/AssistantDock/assistant-dock-i18n/chat-pane-ru-fa-ar.js +18 -0
- package/dist/shell/components/AssistantDock/assistant-dock-i18n/chat-pane-tr-th-it.js +18 -0
- package/dist/shell/components/AssistantDock/assistant-dock-i18n/chat-pane-zh-cn-zh-tw-pt-br.js +18 -0
- package/dist/shell/components/AssistantDock/dock-pane-props.d.ts +4 -1
- package/dist/shell/components/AssistantDock/dock-pane-props.js +4 -4
- package/dist/shell/components/AssistantDock/hooks/execution-config.hooks.js +3 -1
- package/dist/shell/hooks/assistant-chats-port.hooks.d.ts +2 -0
- package/dist/shell/hooks/use-conversation-deep-link.js +3 -1
- package/dist/shell/hooks/use-desktop-view-release.hooks.js +2 -2
- package/dist/shell/lib/addons-routes.js +3 -3
- package/dist/shell/lib/browser-stream.js +8 -8
- package/dist/shell/lib/descriptor-i18n.js +2 -2
- package/dist/sites/transfer/use-export-password.hooks.js +1 -2
- package/dist/widgets/react/components/WidgetInstanceNotices.d.ts +1 -1
- package/dist/widgets/react/components/WidgetInstanceNotices.js +0 -2
- package/dist/widgets/react/hooks/use-widget-instance-editor.hooks.js +1 -1
- package/package.json +9 -9
- package/src/screens/email/email.css +1 -1
- package/src/themes/default/admin.css +3 -0
|
@@ -134,7 +134,7 @@ export declare function usePageEditorWorkspace(input: ReturnType<typeof usePageE
|
|
|
134
134
|
interactiveEditorRef: import("react").RefObject<import("../../react/kit.js").InteractiveHtmlEditorHandle | null>;
|
|
135
135
|
flushInteractiveEdits: () => Promise<string | undefined>;
|
|
136
136
|
setHtmlFromCanvas: (value: string) => void;
|
|
137
|
-
device: "
|
|
137
|
+
device: "desktop" | "mobile" | "tablet";
|
|
138
138
|
setDevice: (value: import("../../shell/components/DevicePreview/DevicePreview.hooks.js").DevicePreviewDevice) => void;
|
|
139
139
|
previewExpanded: boolean;
|
|
140
140
|
setPreviewExpanded: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
@@ -296,7 +296,7 @@ export declare function usePageEditorHtmlWorkspace(input: ReturnType<typeof useP
|
|
|
296
296
|
interactiveEditorRef: import("react").RefObject<import("../../react/kit.js").InteractiveHtmlEditorHandle | null>;
|
|
297
297
|
flushInteractiveEdits: () => Promise<string | undefined>;
|
|
298
298
|
setHtmlFromCanvas: (value: string) => void;
|
|
299
|
-
device: "
|
|
299
|
+
device: "desktop" | "mobile" | "tablet";
|
|
300
300
|
setDevice: (value: import("../../shell/components/DevicePreview/DevicePreview.hooks.js").DevicePreviewDevice) => void;
|
|
301
301
|
previewExpanded: boolean;
|
|
302
302
|
setPreviewExpanded: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
@@ -493,7 +493,7 @@ export declare function usePageEditorFlush(input: ReturnType<typeof usePageEdito
|
|
|
493
493
|
interactiveEditorRef: import("react").RefObject<import("../../react/kit.js").InteractiveHtmlEditorHandle | null>;
|
|
494
494
|
flushInteractiveEdits: () => Promise<string | undefined>;
|
|
495
495
|
setHtmlFromCanvas: (value: string) => void;
|
|
496
|
-
device: "
|
|
496
|
+
device: "desktop" | "mobile" | "tablet";
|
|
497
497
|
setDevice: (value: import("../../shell/components/DevicePreview/DevicePreview.hooks.js").DevicePreviewDevice) => void;
|
|
498
498
|
previewExpanded: boolean;
|
|
499
499
|
setPreviewExpanded: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
@@ -617,7 +617,7 @@ export declare function pageEditorWorkspaceView(input: ReturnType<typeof usePage
|
|
|
617
617
|
onPreviewFrameLoad: (iframe: HTMLIFrameElement) => void;
|
|
618
618
|
view: PageEditorView;
|
|
619
619
|
setView: (next: PageEditorView) => void;
|
|
620
|
-
device: "
|
|
620
|
+
device: "desktop" | "mobile" | "tablet";
|
|
621
621
|
setDevice: (value: import("../../shell/components/DevicePreview/DevicePreview.hooks.js").DevicePreviewDevice) => void;
|
|
622
622
|
previewExpanded: boolean;
|
|
623
623
|
togglePreviewExpanded: () => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export function pagePreviewYoutubeIds({ html, bodyJson }, _optional = {}) {
|
|
2
2
|
const template = document.createElement("template");
|
|
3
3
|
template.innerHTML = html;
|
|
4
|
-
const sources = Array.from(template.content.querySelectorAll("iframe[src]"), frame => ({ src: frame.getAttribute("src"), embedOnly: true }));
|
|
4
|
+
const sources = Array.from(template.content.querySelectorAll("iframe[src]"), frame => ({ src: frame.getAttribute("src") ?? "", embedOnly: true }));
|
|
5
5
|
const nodes = [bodyJson];
|
|
6
6
|
while (nodes.length) {
|
|
7
7
|
nodes.splice(0, 1).filter((node) => typeof node === "object" && node !== null).forEach(node => {
|
|
@@ -15,8 +15,6 @@ export function pagePreviewYoutubeIds({ html, bodyJson }, _optional = {}) {
|
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
17
|
const parsed = sources.flatMap(({ src, embedOnly }) => {
|
|
18
|
-
if (src === null)
|
|
19
|
-
return [];
|
|
20
18
|
let url;
|
|
21
19
|
try {
|
|
22
20
|
url = new URL(src);
|
|
@@ -140,7 +140,7 @@ function consumeTag({ html, i, length, tokens }, _options = {}) {
|
|
|
140
140
|
return null;
|
|
141
141
|
const raw = match[0];
|
|
142
142
|
// TAG_PATTERN's group 1 is not optional, so a match always carries the tag name.
|
|
143
|
-
const { name, tagKind } = parseTagMeta({ raw, tagName: match[1]
|
|
143
|
+
const { name, tagKind } = parseTagMeta({ raw, tagName: match[1] });
|
|
144
144
|
tokens.push({ kind: "tag", text: raw, tagKind, name });
|
|
145
145
|
const next = i + raw.length;
|
|
146
146
|
if (tagKind === "open" && RAW_TEXT_ELEMENTS.has(name)) {
|
|
@@ -1,7 +1,197 @@
|
|
|
1
1
|
import { type LocaleDictionary } from '@jini-ai/core/text';
|
|
2
2
|
export declare const PAGE_EDITOR_DICT: Record<string, Record<string, string>>;
|
|
3
3
|
/** Locked-block copy is supplied to the shared editor by the Page host, in every admin locale. */
|
|
4
|
-
export declare const SCRIPT_BLOCK_DICT:
|
|
4
|
+
export declare const SCRIPT_BLOCK_DICT: {
|
|
5
|
+
es: {
|
|
6
|
+
"Animation \u00B7 Kuinetic": string;
|
|
7
|
+
Canvas: string;
|
|
8
|
+
"Autoplay video": string;
|
|
9
|
+
"Scripted section": string;
|
|
10
|
+
"Locked \u00B7 Edit in HTML \u00B7 Preview plays it": string;
|
|
11
|
+
"Edit HTML": string;
|
|
12
|
+
"Can't edit this source visually. Use HTML.": string;
|
|
13
|
+
};
|
|
14
|
+
de: {
|
|
15
|
+
"Animation \u00B7 Kuinetic": string;
|
|
16
|
+
Canvas: string;
|
|
17
|
+
"Autoplay video": string;
|
|
18
|
+
"Scripted section": string;
|
|
19
|
+
"Locked \u00B7 Edit in HTML \u00B7 Preview plays it": string;
|
|
20
|
+
"Edit HTML": string;
|
|
21
|
+
"Can't edit this source visually. Use HTML.": string;
|
|
22
|
+
};
|
|
23
|
+
it: {
|
|
24
|
+
"Animation \u00B7 Kuinetic": string;
|
|
25
|
+
Canvas: string;
|
|
26
|
+
"Autoplay video": string;
|
|
27
|
+
"Scripted section": string;
|
|
28
|
+
"Locked \u00B7 Edit in HTML \u00B7 Preview plays it": string;
|
|
29
|
+
"Edit HTML": string;
|
|
30
|
+
"Can't edit this source visually. Use HTML.": string;
|
|
31
|
+
};
|
|
32
|
+
fr: {
|
|
33
|
+
"Animation \u00B7 Kuinetic": string;
|
|
34
|
+
Canvas: string;
|
|
35
|
+
"Autoplay video": string;
|
|
36
|
+
"Scripted section": string;
|
|
37
|
+
"Locked \u00B7 Edit in HTML \u00B7 Preview plays it": string;
|
|
38
|
+
"Edit HTML": string;
|
|
39
|
+
"Can't edit this source visually. Use HTML.": string;
|
|
40
|
+
};
|
|
41
|
+
ru: {
|
|
42
|
+
"Animation \u00B7 Kuinetic": string;
|
|
43
|
+
Canvas: string;
|
|
44
|
+
"Autoplay video": string;
|
|
45
|
+
"Scripted section": string;
|
|
46
|
+
"Locked \u00B7 Edit in HTML \u00B7 Preview plays it": string;
|
|
47
|
+
"Edit HTML": string;
|
|
48
|
+
"Can't edit this source visually. Use HTML.": string;
|
|
49
|
+
};
|
|
50
|
+
ja: {
|
|
51
|
+
"Animation \u00B7 Kuinetic": string;
|
|
52
|
+
Canvas: string;
|
|
53
|
+
"Autoplay video": string;
|
|
54
|
+
"Scripted section": string;
|
|
55
|
+
"Locked \u00B7 Edit in HTML \u00B7 Preview plays it": string;
|
|
56
|
+
"Edit HTML": string;
|
|
57
|
+
"Can't edit this source visually. Use HTML.": string;
|
|
58
|
+
};
|
|
59
|
+
ko: {
|
|
60
|
+
"Animation \u00B7 Kuinetic": string;
|
|
61
|
+
Canvas: string;
|
|
62
|
+
"Autoplay video": string;
|
|
63
|
+
"Scripted section": string;
|
|
64
|
+
"Locked \u00B7 Edit in HTML \u00B7 Preview plays it": string;
|
|
65
|
+
"Edit HTML": string;
|
|
66
|
+
"Can't edit this source visually. Use HTML.": string;
|
|
67
|
+
};
|
|
68
|
+
"zh-CN": {
|
|
69
|
+
"Animation \u00B7 Kuinetic": string;
|
|
70
|
+
Canvas: string;
|
|
71
|
+
"Autoplay video": string;
|
|
72
|
+
"Scripted section": string;
|
|
73
|
+
"Locked \u00B7 Edit in HTML \u00B7 Preview plays it": string;
|
|
74
|
+
"Edit HTML": string;
|
|
75
|
+
"Can't edit this source visually. Use HTML.": string;
|
|
76
|
+
};
|
|
77
|
+
"zh-TW": {
|
|
78
|
+
"Animation \u00B7 Kuinetic": string;
|
|
79
|
+
Canvas: string;
|
|
80
|
+
"Autoplay video": string;
|
|
81
|
+
"Scripted section": string;
|
|
82
|
+
"Locked \u00B7 Edit in HTML \u00B7 Preview plays it": string;
|
|
83
|
+
"Edit HTML": string;
|
|
84
|
+
"Can't edit this source visually. Use HTML.": string;
|
|
85
|
+
};
|
|
86
|
+
ar: {
|
|
87
|
+
"Animation \u00B7 Kuinetic": string;
|
|
88
|
+
Canvas: string;
|
|
89
|
+
"Autoplay video": string;
|
|
90
|
+
"Scripted section": string;
|
|
91
|
+
"Locked \u00B7 Edit in HTML \u00B7 Preview plays it": string;
|
|
92
|
+
"Edit HTML": string;
|
|
93
|
+
"Can't edit this source visually. Use HTML.": string;
|
|
94
|
+
};
|
|
95
|
+
fa: {
|
|
96
|
+
"Animation \u00B7 Kuinetic": string;
|
|
97
|
+
Canvas: string;
|
|
98
|
+
"Autoplay video": string;
|
|
99
|
+
"Scripted section": string;
|
|
100
|
+
"Locked \u00B7 Edit in HTML \u00B7 Preview plays it": string;
|
|
101
|
+
"Edit HTML": string;
|
|
102
|
+
"Can't edit this source visually. Use HTML.": string;
|
|
103
|
+
};
|
|
104
|
+
id: {
|
|
105
|
+
"Animation \u00B7 Kuinetic": string;
|
|
106
|
+
Canvas: string;
|
|
107
|
+
"Autoplay video": string;
|
|
108
|
+
"Scripted section": string;
|
|
109
|
+
"Locked \u00B7 Edit in HTML \u00B7 Preview plays it": string;
|
|
110
|
+
"Edit HTML": string;
|
|
111
|
+
"Can't edit this source visually. Use HTML.": string;
|
|
112
|
+
};
|
|
113
|
+
"pt-BR": {
|
|
114
|
+
"Animation \u00B7 Kuinetic": string;
|
|
115
|
+
Canvas: string;
|
|
116
|
+
"Autoplay video": string;
|
|
117
|
+
"Scripted section": string;
|
|
118
|
+
"Locked \u00B7 Edit in HTML \u00B7 Preview plays it": string;
|
|
119
|
+
"Edit HTML": string;
|
|
120
|
+
"Can't edit this source visually. Use HTML.": string;
|
|
121
|
+
};
|
|
122
|
+
pl: {
|
|
123
|
+
"Animation \u00B7 Kuinetic": string;
|
|
124
|
+
Canvas: string;
|
|
125
|
+
"Autoplay video": string;
|
|
126
|
+
"Scripted section": string;
|
|
127
|
+
"Locked \u00B7 Edit in HTML \u00B7 Preview plays it": string;
|
|
128
|
+
"Edit HTML": string;
|
|
129
|
+
"Can't edit this source visually. Use HTML.": string;
|
|
130
|
+
};
|
|
131
|
+
hu: {
|
|
132
|
+
"Animation \u00B7 Kuinetic": string;
|
|
133
|
+
Canvas: string;
|
|
134
|
+
"Autoplay video": string;
|
|
135
|
+
"Scripted section": string;
|
|
136
|
+
"Locked \u00B7 Edit in HTML \u00B7 Preview plays it": string;
|
|
137
|
+
"Edit HTML": string;
|
|
138
|
+
"Can't edit this source visually. Use HTML.": string;
|
|
139
|
+
};
|
|
140
|
+
tr: {
|
|
141
|
+
"Animation \u00B7 Kuinetic": string;
|
|
142
|
+
Canvas: string;
|
|
143
|
+
"Autoplay video": string;
|
|
144
|
+
"Scripted section": string;
|
|
145
|
+
"Locked \u00B7 Edit in HTML \u00B7 Preview plays it": string;
|
|
146
|
+
"Edit HTML": string;
|
|
147
|
+
"Can't edit this source visually. Use HTML.": string;
|
|
148
|
+
};
|
|
149
|
+
uk: {
|
|
150
|
+
"Animation \u00B7 Kuinetic": string;
|
|
151
|
+
Canvas: string;
|
|
152
|
+
"Autoplay video": string;
|
|
153
|
+
"Scripted section": string;
|
|
154
|
+
"Locked \u00B7 Edit in HTML \u00B7 Preview plays it": string;
|
|
155
|
+
"Edit HTML": string;
|
|
156
|
+
"Can't edit this source visually. Use HTML.": string;
|
|
157
|
+
};
|
|
158
|
+
hi: {
|
|
159
|
+
"Animation \u00B7 Kuinetic": string;
|
|
160
|
+
Canvas: string;
|
|
161
|
+
"Autoplay video": string;
|
|
162
|
+
"Scripted section": string;
|
|
163
|
+
"Locked \u00B7 Edit in HTML \u00B7 Preview plays it": string;
|
|
164
|
+
"Edit HTML": string;
|
|
165
|
+
"Can't edit this source visually. Use HTML.": string;
|
|
166
|
+
};
|
|
167
|
+
ur: {
|
|
168
|
+
"Animation \u00B7 Kuinetic": string;
|
|
169
|
+
Canvas: string;
|
|
170
|
+
"Autoplay video": string;
|
|
171
|
+
"Scripted section": string;
|
|
172
|
+
"Locked \u00B7 Edit in HTML \u00B7 Preview plays it": string;
|
|
173
|
+
"Edit HTML": string;
|
|
174
|
+
"Can't edit this source visually. Use HTML.": string;
|
|
175
|
+
};
|
|
176
|
+
bn: {
|
|
177
|
+
"Animation \u00B7 Kuinetic": string;
|
|
178
|
+
Canvas: string;
|
|
179
|
+
"Autoplay video": string;
|
|
180
|
+
"Scripted section": string;
|
|
181
|
+
"Locked \u00B7 Edit in HTML \u00B7 Preview plays it": string;
|
|
182
|
+
"Edit HTML": string;
|
|
183
|
+
"Can't edit this source visually. Use HTML.": string;
|
|
184
|
+
};
|
|
185
|
+
th: {
|
|
186
|
+
"Animation \u00B7 Kuinetic": string;
|
|
187
|
+
Canvas: string;
|
|
188
|
+
"Autoplay video": string;
|
|
189
|
+
"Scripted section": string;
|
|
190
|
+
"Locked \u00B7 Edit in HTML \u00B7 Preview plays it": string;
|
|
191
|
+
"Edit HTML": string;
|
|
192
|
+
"Can't edit this source visually. Use HTML.": string;
|
|
193
|
+
};
|
|
194
|
+
};
|
|
5
195
|
/** The Page editor's locale-aware translator, as its call sites use it. */
|
|
6
196
|
export type PageEditorTranslator = (required: {
|
|
7
197
|
locale: string;
|
|
@@ -394,8 +394,8 @@ export function createPageEditorTranslator({ commonDictionary }, { sharedEditorT
|
|
|
394
394
|
const controlT = createDictionaryTranslator({ featureDictionary: pageEditorControlTranslations }, { commonDictionary });
|
|
395
395
|
const postT = sharedEditorTranslator ?? hookT;
|
|
396
396
|
const sharedKeys = new Set(postEditorKeys);
|
|
397
|
-
const scriptBlockKeys = new Set(Object.keys(SCRIPT_BLOCK_DICT.es
|
|
398
|
-
const markupKeys = new Set(Object.keys(pageEditorMarkupTranslations.es
|
|
397
|
+
const scriptBlockKeys = new Set(Object.keys(SCRIPT_BLOCK_DICT.es));
|
|
398
|
+
const markupKeys = new Set(Object.keys(pageEditorMarkupTranslations.es));
|
|
399
399
|
return ({ locale, key }, _options = {}) => {
|
|
400
400
|
if (scriptBlockKeys.has(key))
|
|
401
401
|
return scriptBlockT({ locale, key });
|
|
@@ -61,8 +61,9 @@ declare function themePageRowMenuItems({ row, handlers, t, deps }: {
|
|
|
61
61
|
* `host src/features/theme/static-render.ts`), so picking it back explicitly in the UI is a
|
|
62
62
|
* no-op. When the active theme ships neither name (a declarative/handlebars theme, or a static theme
|
|
63
63
|
* with no page shell at all), there is no real filename to show, so this returns
|
|
64
|
-
* {@link THEME_DEFAULT_SENTINEL} instead
|
|
65
|
-
*
|
|
64
|
+
* {@link THEME_DEFAULT_SENTINEL} instead. The picker always offers the synthetic "Theme default"
|
|
65
|
+
* option so an explicit template choice can return to `null`; {@link pickerValueToChoice} performs
|
|
66
|
+
* that conversion. When a shell filename exists, this display rule still shows that resolved file.
|
|
66
67
|
*
|
|
67
68
|
* `""` and a real filename pass straight through unchanged — the picker's value already IS the
|
|
68
69
|
* stored `templateChoice` for those two cases; only `null` needs translating into something a
|
|
@@ -64,8 +64,9 @@ function themePageRowMenuItems({ row, handlers, t, deps }, _options = {}) {
|
|
|
64
64
|
* `host src/features/theme/static-render.ts`), so picking it back explicitly in the UI is a
|
|
65
65
|
* no-op. When the active theme ships neither name (a declarative/handlebars theme, or a static theme
|
|
66
66
|
* with no page shell at all), there is no real filename to show, so this returns
|
|
67
|
-
* {@link THEME_DEFAULT_SENTINEL} instead
|
|
68
|
-
*
|
|
67
|
+
* {@link THEME_DEFAULT_SENTINEL} instead. The picker always offers the synthetic "Theme default"
|
|
68
|
+
* option so an explicit template choice can return to `null`; {@link pickerValueToChoice} performs
|
|
69
|
+
* that conversion. When a shell filename exists, this display rule still shows that resolved file.
|
|
69
70
|
*
|
|
70
71
|
* `""` and a real filename pass straight through unchanged — the picker's value already IS the
|
|
71
72
|
* stored `templateChoice` for those two cases; only `null` needs translating into something a
|
|
@@ -147,6 +147,8 @@ export interface KitChatSettingsDialogProps {
|
|
|
147
147
|
displaySections: readonly KitChatSettingsSection[];
|
|
148
148
|
permissions: KitChatPermissionsPort;
|
|
149
149
|
t?: (key: string) => string;
|
|
150
|
+
/** A host control after the display groups (the dock mounts its chat cleanup here). */
|
|
151
|
+
displayExtra?: ReactNode;
|
|
150
152
|
}
|
|
151
153
|
export interface KitJiniChatProviderProps {
|
|
152
154
|
transport: ChatTransport;
|
|
@@ -154,9 +156,10 @@ export interface KitJiniChatProviderProps {
|
|
|
154
156
|
extEventRendererRegistry?: ExtEventRendererRegistry;
|
|
155
157
|
children: ReactNode;
|
|
156
158
|
}
|
|
157
|
-
export type KitConversationListItem = Pick<AssistantConversation, 'id' | 'title'> & {
|
|
159
|
+
export type KitConversationListItem = Pick<AssistantConversation, 'id' | 'title' | 'kind'> & {
|
|
158
160
|
messageCount?: number;
|
|
159
161
|
updatedAt?: number;
|
|
162
|
+
pinned?: boolean;
|
|
160
163
|
};
|
|
161
164
|
export interface KitConversationListProps {
|
|
162
165
|
report?: {
|
|
@@ -167,6 +170,17 @@ export interface KitConversationListProps {
|
|
|
167
170
|
onSelect: (id: string) => void;
|
|
168
171
|
onCreate: () => void | Promise<void>;
|
|
169
172
|
onDelete?: (id: string) => void | Promise<void>;
|
|
173
|
+
/** Explicit host-owned destinations replace New; disabled states can differ by destination. */
|
|
174
|
+
creationActions?: {
|
|
175
|
+
desktop: {
|
|
176
|
+
onCreate: () => void | Promise<void>;
|
|
177
|
+
disabled?: boolean;
|
|
178
|
+
};
|
|
179
|
+
site: {
|
|
180
|
+
onCreate: () => void | Promise<void>;
|
|
181
|
+
disabled?: boolean;
|
|
182
|
+
};
|
|
183
|
+
} | undefined;
|
|
170
184
|
onRename?: (id: string, title: string) => void | Promise<void>;
|
|
171
185
|
onSearch?: (query: string) => Promise<KitConversationListItem[]>;
|
|
172
186
|
confirmDelete?: (item: KitConversationListItem) => boolean | Promise<boolean>;
|
|
@@ -187,6 +201,8 @@ export interface KitConversationListProps {
|
|
|
187
201
|
onSelectionChange?: ((required: {
|
|
188
202
|
ids: string[];
|
|
189
203
|
}) => void) | undefined;
|
|
204
|
+
/** The host's actions over ticked rows, at the foot of the open list while `selectable` is on. */
|
|
205
|
+
selectionActions?: ReactNode;
|
|
190
206
|
}
|
|
191
207
|
/** Opaque list-view hooks a host's conversation switcher understands; see {@link KitConversationListProps.hooks}. */
|
|
192
208
|
export type KitConversationListHooks = object;
|
|
@@ -379,6 +379,8 @@ export interface AssistantConversation {
|
|
|
379
379
|
messageCount: number;
|
|
380
380
|
createdAt: number;
|
|
381
381
|
updatedAt: number;
|
|
382
|
+
/** The host's transcript ownership, never derived from selected-site tools. */
|
|
383
|
+
kind?: 'desktop' | 'site';
|
|
382
384
|
}
|
|
383
385
|
export interface LastConversationStorage {
|
|
384
386
|
getItem(key: string): string | null;
|
|
@@ -52,6 +52,6 @@ const DETAILS_COPY = {
|
|
|
52
52
|
"zh-TW": ["顯示詳細資料", "複製詳細資料", "已複製", "複製失敗。請選取詳細資料並手動複製。", "請回報此錯誤 ID。"],
|
|
53
53
|
};
|
|
54
54
|
const dictionary = Object.fromEntries(Object.entries(AUTH_DICT).map(([locale, copy]) => [locale,
|
|
55
|
-
{ ...copy, ...Object.fromEntries(DETAILS_KEYS.map((key, index) => [key, DETAILS_COPY[locale]
|
|
55
|
+
{ ...copy, ...Object.fromEntries(DETAILS_KEYS.map((key, index) => [key, DETAILS_COPY[locale][index]])) }]));
|
|
56
56
|
export const t = createDictionaryTranslator({ featureDictionary: dictionary }, { commonDictionary: ADMIN_COMMON_I18N });
|
|
57
57
|
//# sourceMappingURL=auth-i18n.js.map
|
|
@@ -6,7 +6,7 @@ import {} from '@jini-ai/core/text';
|
|
|
6
6
|
* its own name here and no product is spelled by the package. @complexity O(k) in the locale's entries. */
|
|
7
7
|
export function consentTranslation({ locale, productName }, _optional = {}) {
|
|
8
8
|
const block = translate.dictionary[locale];
|
|
9
|
-
const dictionary = block ? bindDictionaryNames({ dictionary: { [locale]: block }, names: { productName } })[locale]
|
|
9
|
+
const dictionary = block ? bindDictionaryNames({ dictionary: { [locale]: block }, names: { productName } })[locale] : {};
|
|
10
10
|
return { t: (key) => translate({ locale, key }), dictionary, productName };
|
|
11
11
|
}
|
|
12
12
|
//# sourceMappingURL=consent-i18n.js.map
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
* Each row is index-aligned with `CONTENT_ANALYSIS_KEYS`; `content-analysis-i18n.unit.test.ts`
|
|
5
5
|
* pins every row to the key list.
|
|
6
6
|
*/
|
|
7
|
+
import type { ContentAnalysisRow } from "./content-analysis-i18n.js";
|
|
7
8
|
/** Reading-time copy; every locale keeps the same short form. */
|
|
8
9
|
export declare const MINUTES_SHORT = "{minutes} min";
|
|
9
|
-
export declare const CONTENT_ANALYSIS_ROWS_RTL_ASIA: Record<string,
|
|
10
|
+
export declare const CONTENT_ANALYSIS_ROWS_RTL_ASIA: Record<string, ContentAnalysisRow>;
|
|
10
11
|
//# sourceMappingURL=content-analysis-i18n-rows-rtl-asia.d.ts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { TranslationRow } from "../../core/i18n-types.js";
|
|
1
2
|
/**
|
|
2
3
|
* @file The Content analysis card's dictionary (AW-7 Tier 2, `ContentAnalysisCard.tsx` and
|
|
3
4
|
* `rules.ts`'s copy tables), in all 21 locales the admin ships. Same `DICT[locale]?.[key] ?? key`
|
|
@@ -17,7 +18,8 @@
|
|
|
17
18
|
*/
|
|
18
19
|
export declare const CONTENT_ANALYSIS_KEYS: readonly ["Content analysis", "Analyze now", "Analyzing…", "Table of contents", "No headings yet.", "Checks", "From the last save.", "From your current draft, including unsaved changes.", "Not analyzed yet. Save, or click Analyze now.", "Analysis unavailable.", "Score", "out of 100", "Words", "Sentences: {count}", "Reading time", "{minutes} min", "Estimated", "Readability", "{band} · grade {grade}", "Very easy", "Easy", "Fairly easy", "Standard", "Fairly difficult", "Difficult", "Very difficult", "Pass", "Warning", "Fail", "Skipped", "Title length", "Meta description", "Image alt text", "Heading order", "Single H1", "Content length", "Subheadings", "Title length is good: {length} characters.", "Title is {length} characters; aim for {min}–{max}.", "Meta description length is good: {length} characters.", "Meta description is {length} characters; aim for {min}–{max}.", "No meta description is set.", "All {images} images have alt text.", "{missing} of {images} images are missing alt text.", "No images to check.", "Headings follow a logical order.", "Heading “{heading}” jumps from H{from} to H{to}.", "The body has no extra H1; the title is the page’s H1.", "The body has {h1} H1 headings; the title is already the H1, so use H2 instead.", "{words} words — a solid length.", "{words} words; aim for at least {min}.", "The content is empty.", "Subheadings break up the content.", "{words} words with no subheadings; add H2–H6 headings.", "The Content Analyzer plugin is not enabled.", "The Content Analyzer plugin is not installed.", "The analyzer could not process this content.", "Analysis failed."];
|
|
19
20
|
/** One row per locale, in {@link CONTENT_ANALYSIS_KEYS} order. */
|
|
20
|
-
export
|
|
21
|
+
export type ContentAnalysisRow = TranslationRow<typeof CONTENT_ANALYSIS_KEYS>;
|
|
22
|
+
export declare const CONTENT_ANALYSIS_ROWS: Record<string, ContentAnalysisRow>;
|
|
21
23
|
export declare const CONTENT_ANALYSIS_DICT: Record<string, Record<string, string>>;
|
|
22
24
|
/** `CONTENT_ANALYSIS_DICT[locale]?.[key] ?? ADMIN_COMMON_I18N[locale]?.[key] ?? key` — the feature's hook
|
|
23
25
|
* binds it to the admin locale (`use-content-analysis.hooks.ts`). */
|
|
@@ -78,7 +78,6 @@ export const CONTENT_ANALYSIS_KEYS = [
|
|
|
78
78
|
"The analyzer could not process this content.",
|
|
79
79
|
"Analysis failed.",
|
|
80
80
|
];
|
|
81
|
-
/** One row per locale, in {@link CONTENT_ANALYSIS_KEYS} order. */
|
|
82
81
|
export const CONTENT_ANALYSIS_ROWS = {
|
|
83
82
|
es: [
|
|
84
83
|
"Análisis de contenido", "Analizar ahora", "Analizando…", "Tabla de contenidos", "Aún no hay encabezados.", "Comprobaciones",
|
|
@@ -401,15 +400,12 @@ export const CONTENT_ANALYSIS_ROWS = {
|
|
|
401
400
|
],
|
|
402
401
|
...CONTENT_ANALYSIS_ROWS_RTL_ASIA,
|
|
403
402
|
};
|
|
404
|
-
function buildDictionary(keys, rows) {
|
|
403
|
+
function buildDictionary({ keys, rows }, _optional = {}) {
|
|
405
404
|
return Object.fromEntries(Object.entries(rows).map(([locale, row]) => [locale, Object.fromEntries(keys.map((key, index) => {
|
|
406
|
-
|
|
407
|
-
if (value === undefined)
|
|
408
|
-
throw new Error(`content analysis dictionary ${locale} is missing ${key}`);
|
|
409
|
-
return [key, value];
|
|
405
|
+
return [key, row[index]];
|
|
410
406
|
}))]));
|
|
411
407
|
}
|
|
412
|
-
export const CONTENT_ANALYSIS_DICT = buildDictionary(CONTENT_ANALYSIS_KEYS, CONTENT_ANALYSIS_ROWS);
|
|
408
|
+
export const CONTENT_ANALYSIS_DICT = buildDictionary({ keys: CONTENT_ANALYSIS_KEYS, rows: CONTENT_ANALYSIS_ROWS });
|
|
413
409
|
/** `CONTENT_ANALYSIS_DICT[locale]?.[key] ?? ADMIN_COMMON_I18N[locale]?.[key] ?? key` — the feature's hook
|
|
414
410
|
* binds it to the admin locale (`use-content-analysis.hooks.ts`). */
|
|
415
411
|
export const t = createDictionaryTranslator({ featureDictionary: CONTENT_ANALYSIS_DICT }, { commonDictionary: ADMIN_COMMON_I18N });
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
* Each row has one value per EMAIL_TAB_LOCALES entry; the tuple keeps all 21 translations required.
|
|
4
4
|
* Placeholders are literal tokens, including the double braces used in template examples.
|
|
5
5
|
*/
|
|
6
|
+
import type { TranslationRow } from "../../core/i18n-types.js";
|
|
6
7
|
export declare const EMAIL_TAB_LOCALES: readonly ["es", "fr", "de", "it", "pt-BR", "id", "pl", "tr", "hu", "ru", "uk", "ar", "fa", "ur", "hi", "bn", "th", "ja", "ko", "zh-CN", "zh-TW"];
|
|
7
|
-
type Translations =
|
|
8
|
+
type Translations = TranslationRow<typeof EMAIL_TAB_LOCALES>;
|
|
8
9
|
export declare const EMAIL_TAB_ROWS: readonly (readonly [key: string, translations: Translations])[];
|
|
9
10
|
export declare const EMAIL_TABS_DICT: Record<string, Record<string, string>>;
|
|
10
11
|
export {};
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file Copy for the wired Email tabs and template editor. English keys follow email-i18n.ts.
|
|
3
|
-
* Each row has one value per EMAIL_TAB_LOCALES entry; the tuple keeps all 21 translations required.
|
|
4
|
-
* Placeholders are literal tokens, including the double braces used in template examples.
|
|
5
|
-
*/
|
|
6
1
|
export const EMAIL_TAB_LOCALES = ["es", "fr", "de", "it", "pt-BR", "id", "pl", "tr", "hu", "ru", "uk", "ar", "fa", "ur", "hi", "bn", "th", "ja", "ko", "zh-CN", "zh-TW"];
|
|
7
2
|
export const EMAIL_TAB_ROWS = [
|
|
8
3
|
["Not set", ["Sin configurar", "Non défini", "Nicht festgelegt", "Non impostato", "Não definido", "Belum diatur", "Nie ustawiono", "Ayarlanmadı", "Nincs beállítva", "Не задано", "Не задано", "غير محدد", "تنظیم نشده", "متعین نہیں", "सेट नहीं", "সেট করা হয়নি", "ยังไม่ได้ตั้งค่า", "未設定", "설정되지 않음", "未设置", "未設定"]],
|
|
@@ -192,9 +187,6 @@ export const EMAIL_TAB_ROWS = [
|
|
|
192
187
|
["Cleared {count} captured test message.", ["Se borró {count} mensaje de prueba capturado.", "{count} message de test capturé effacé.", "{count} erfasste Testnachricht gelöscht.", "{count} messaggio di prova acquisito eliminato.", "{count} mensagem de teste capturada limpa.", "{count} pesan uji yang ditangkap dihapus.", "Wyczyszczono przechwycone wiadomości testowe: {count}.", "{count} yakalanan test iletisi temizlendi.", "{count} rögzített tesztüzenet törölve.", "Очищено перехваченных тестовых сообщений: {count}.", "Очищено перехоплених тестових повідомлень: {count}.", "تم مسح {count} رسالة اختبار ملتقطة.", "{count} پیام آزمایشی ضبطشده پاک شد.", "{count} محفوظ کیا گیا ٹیسٹ پیغام صاف کر دیا گیا۔", "{count} कैप्चर किया गया टेस्ट संदेश साफ़ किया गया।", "{count}টি ক্যাপচার করা পরীক্ষামূলক বার্তা মোছা হয়েছে।", "ล้างข้อความทดสอบที่บันทึกไว้แล้ว {count} ข้อความ", "キャプチャしたテストメッセージを{count}件削除しました。", "캡처된 테스트 메시지 {count}개를 비웠습니다.", "已清除 {count} 条捕获的测试消息。", "已清除 {count} 則擷取的測試訊息。"]],
|
|
193
188
|
];
|
|
194
189
|
export const EMAIL_TABS_DICT = Object.fromEntries(EMAIL_TAB_LOCALES.map((locale, index) => [locale, Object.fromEntries(EMAIL_TAB_ROWS.map(([key, values]) => {
|
|
195
|
-
|
|
196
|
-
if (value === undefined)
|
|
197
|
-
throw new Error(`email tabs dictionary ${locale} is missing ${key}`);
|
|
198
|
-
return [key, value];
|
|
190
|
+
return [key, values[index]];
|
|
199
191
|
}))]));
|
|
200
192
|
//# sourceMappingURL=email-tabs-i18n.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { agentHandle } from "@jini-ai/core/agent-handles";
|
|
3
3
|
import { MediaEditFields } from "./MediaEditFields.js";
|
|
4
|
+
import { MediaGenerationFacts } from "./MediaGenerationFacts.js";
|
|
4
5
|
/** The metadata edit form for one media item's title/alt/caption/credit (REQ-01) plus the
|
|
5
6
|
* quick-and-dirty sizing/class/HTML-attributes overrides. Presented inside `EditMediaModal`'s `<dialog>` (owner
|
|
6
7
|
* ask, 2026-09-07 — see this file's header for why this moved off the grid) rather than rendering
|
|
@@ -15,6 +16,6 @@ function MediaEditForm({ titleId, t, item, createdByLabel, draft, setTitle, setA
|
|
|
15
16
|
return (_jsxs("div", { className: "media-edit-modal-body", ...agentHandle({ handle: "media-edit-panel" }, {
|
|
16
17
|
role: "region",
|
|
17
18
|
label: "Edit media metadata — title, alt text, caption, credit, size, CSS class and HTML attributes",
|
|
18
|
-
}), children: [_jsx("div", { className: "editor-header", children: _jsxs("h2", { id: titleId, children: [t("Editing"), " \"", item.title, "\""] }) }), _jsxs("p", { className: "jini-hint media-edit-created-by", children: [_jsx("span", { children: t("Created by") }), ": ", _jsx("span", { children: createdByLabel })] }), _jsx(MediaEditFields, { item: item, t: t, draft: draft, setTitle: setTitle, setAlt: setAlt, setSlug: setSlug, setCaption: setCaption, setCredit: setCredit, setWidth: setWidth, setHeight: setHeight, setCssClass: setCssClass, setHtmlAttributes: setHtmlAttributes, htmlAttributesError: htmlAttributesError, publicUrl: publicUrl, urlCopied: urlCopied, copyUrl: copyUrl, embedCopied: embedCopied, copyEmbedCode: copyEmbedCode, embedSnippet: embedSnippet, hashCopied: hashCopied, copyHash: copyHash, save: save, saving: saving, onCancel: onCancel }), error ? (_jsx("span", { className: "save-error", role: "alert", children: error })) : null] }));
|
|
19
|
+
}), children: [_jsx("div", { className: "editor-header", children: _jsxs("h2", { id: titleId, children: [t("Editing"), " \"", item.title, "\""] }) }), _jsxs("p", { className: "jini-hint media-edit-created-by", children: [_jsx("span", { children: t("Created by") }), ": ", _jsx("span", { children: createdByLabel })] }), _jsx(MediaGenerationFacts, { item: item, t: t }), _jsx(MediaEditFields, { item: item, t: t, draft: draft, setTitle: setTitle, setAlt: setAlt, setSlug: setSlug, setCaption: setCaption, setCredit: setCredit, setWidth: setWidth, setHeight: setHeight, setCssClass: setCssClass, setHtmlAttributes: setHtmlAttributes, htmlAttributesError: htmlAttributesError, publicUrl: publicUrl, urlCopied: urlCopied, copyUrl: copyUrl, embedCopied: embedCopied, copyEmbedCode: copyEmbedCode, embedSnippet: embedSnippet, hashCopied: hashCopied, copyHash: copyHash, save: save, saving: saving, onCancel: onCancel }), error ? (_jsx("span", { className: "save-error", role: "alert", children: error })) : null] }));
|
|
19
20
|
}
|
|
20
21
|
//# sourceMappingURL=MediaEditPanel.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AdminMedia } from "@jini-ai/core/contracts/site/cms-admin-media";
|
|
2
|
+
/** Production attribution is read-only and comes only from structured origin metadata. It never
|
|
3
|
+
* becomes creator identity, editable credit or a description of what the image shows. */
|
|
4
|
+
export declare function MediaGenerationFacts({ item, t }: {
|
|
5
|
+
item: Pick<AdminMedia, "provenance">;
|
|
6
|
+
t: (key: string) => string;
|
|
7
|
+
}, _optional?: {}): import("react").JSX.Element | null;
|
|
8
|
+
//# sourceMappingURL=MediaGenerationFacts.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
/** Production attribution is read-only and comes only from structured origin metadata. It never
|
|
3
|
+
* becomes creator identity, editable credit or a description of what the image shows. */
|
|
4
|
+
export function MediaGenerationFacts({ item, t }, _optional = {}) {
|
|
5
|
+
const origin = item.provenance;
|
|
6
|
+
if (origin?.kind !== "generated")
|
|
7
|
+
return null;
|
|
8
|
+
return (_jsxs(_Fragment, { children: [_jsxs("p", { className: "jini-hint", children: [_jsx("span", { children: t("Provider") }), ": ", _jsx("span", { children: origin.provider ?? t("Unknown") })] }), _jsxs("p", { className: "jini-hint", children: [_jsx("span", { children: t("Model") }), ": ", _jsx("span", { children: origin.model ?? t("Unknown") })] })] }));
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=MediaGenerationFacts.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useCallback, useRef, useState } from "react";
|
|
2
|
-
import { KEYS, MEDIA_RESOURCE, findEditingItem, visibleMediaError } from "../rules.js";
|
|
2
|
+
import { KEYS, MEDIA_RESOURCE, MediaFileReadFailure, findEditingItem, visibleMediaError } from "../rules.js";
|
|
3
3
|
const SIZE_REFUSAL = Symbol("media-json-upload-size-refusal");
|
|
4
4
|
/**
|
|
5
5
|
* The operator-facing text for a failed upload, or `null` when there is no failure. A typed size
|
|
@@ -11,6 +11,9 @@ function describeUploadFailure({ failure, locale, deps }, _optional = {}) {
|
|
|
11
11
|
if (failure === SIZE_REFUSAL)
|
|
12
12
|
return deps.translate({ locale, key: "This file is too large to upload here. The limit is {limit} MiB." })
|
|
13
13
|
.replace("{limit}", String(deps.maxJsonUploadBytes / (1024 * 1024)));
|
|
14
|
+
// The local fallback is approved copy; arbitrary browser diagnostics still use the host policy.
|
|
15
|
+
if (failure instanceof MediaFileReadFailure)
|
|
16
|
+
return deps.translate({ locale, key: failure.messageKey });
|
|
14
17
|
return deps.sizeRefusalFromError({ t: (key) => deps.translate({ locale, key }), error: failure })
|
|
15
18
|
?? deps.translate({ locale, key: deps.describeApiError({ e: failure, fallback: "upload failed" }) });
|
|
16
19
|
}
|
|
@@ -75,27 +75,27 @@ export const MEDIA_DIALOG_STRINGS = {
|
|
|
75
75
|
bn: { "Upload image": "ছবি আপলোড করুন", Import: "আমদানি করুন", "Enter an https:// image URL.": "একটি https:// ছবির URL লিখুন।" },
|
|
76
76
|
};
|
|
77
77
|
export const MEDIA_PROVENANCE_STRINGS = {
|
|
78
|
-
es: { "Created by": "Creado por", Unknown: "Desconocido" },
|
|
79
|
-
id: { "Created by": "Dibuat oleh", Unknown: "Tidak diketahui" },
|
|
80
|
-
de: { "Created by": "Erstellt von", Unknown: "Unbekannt" },
|
|
81
|
-
"zh-CN": { "Created by": "创建者", Unknown: "未知" },
|
|
82
|
-
"zh-TW": { "Created by": "建立者", Unknown: "未知" },
|
|
83
|
-
"pt-BR": { "Created by": "Criado por", Unknown: "Desconhecido" },
|
|
84
|
-
ru: { "Created by": "Создано пользователем", Unknown: "Неизвестно" },
|
|
85
|
-
fa: { "Created by": "ایجادشده توسط", Unknown: "نامشخص" },
|
|
86
|
-
ar: { "Created by": "أنشأه", Unknown: "غير معروف" },
|
|
87
|
-
ja: { "Created by": "作成者", Unknown: "不明" },
|
|
88
|
-
ko: { "Created by": "생성자", Unknown: "알 수 없음" },
|
|
89
|
-
pl: { "Created by": "Utworzone przez", Unknown: "Nieznane" },
|
|
90
|
-
hu: { "Created by": "Létrehozta", Unknown: "Ismeretlen" },
|
|
91
|
-
fr: { "Created by": "Créé par", Unknown: "Inconnu" },
|
|
92
|
-
uk: { "Created by": "Створено користувачем", Unknown: "Невідомо" },
|
|
93
|
-
tr: { "Created by": "Oluşturan", Unknown: "Bilinmiyor" },
|
|
94
|
-
th: { "Created by": "สร้างโดย", Unknown: "ไม่ทราบ" },
|
|
95
|
-
it: { "Created by": "Creato da", Unknown: "Sconosciuto" },
|
|
96
|
-
hi: { "Created by": "निर्माता", Unknown: "अज्ञात" },
|
|
97
|
-
ur: { "Created by": "تخلیق کنندہ", Unknown: "نامعلوم" },
|
|
98
|
-
bn: { "Created by": "তৈরি করেছেন", Unknown: "অজানা" },
|
|
78
|
+
es: { "Created by": "Creado por", Unknown: "Desconocido", Provider: "Proveedor", Model: "Modelo" },
|
|
79
|
+
id: { "Created by": "Dibuat oleh", Unknown: "Tidak diketahui", Provider: "Penyedia", Model: "Model" },
|
|
80
|
+
de: { "Created by": "Erstellt von", Unknown: "Unbekannt", Provider: "Anbieter", Model: "Modell" },
|
|
81
|
+
"zh-CN": { "Created by": "创建者", Unknown: "未知", Provider: "提供商", Model: "模型" },
|
|
82
|
+
"zh-TW": { "Created by": "建立者", Unknown: "未知", Provider: "供應商", Model: "模型" },
|
|
83
|
+
"pt-BR": { "Created by": "Criado por", Unknown: "Desconhecido", Provider: "Provedor", Model: "Modelo" },
|
|
84
|
+
ru: { "Created by": "Создано пользователем", Unknown: "Неизвестно", Provider: "Провайдер", Model: "Модель" },
|
|
85
|
+
fa: { "Created by": "ایجادشده توسط", Unknown: "نامشخص", Provider: "ارائهدهنده", Model: "مدل" },
|
|
86
|
+
ar: { "Created by": "أنشأه", Unknown: "غير معروف", Provider: "المزوّد", Model: "النموذج" },
|
|
87
|
+
ja: { "Created by": "作成者", Unknown: "不明", Provider: "プロバイダー", Model: "モデル" },
|
|
88
|
+
ko: { "Created by": "생성자", Unknown: "알 수 없음", Provider: "제공업체", Model: "모델" },
|
|
89
|
+
pl: { "Created by": "Utworzone przez", Unknown: "Nieznane", Provider: "Dostawca", Model: "Model" },
|
|
90
|
+
hu: { "Created by": "Létrehozta", Unknown: "Ismeretlen", Provider: "Szolgáltató", Model: "Modell" },
|
|
91
|
+
fr: { "Created by": "Créé par", Unknown: "Inconnu", Provider: "Fournisseur", Model: "Modèle" },
|
|
92
|
+
uk: { "Created by": "Створено користувачем", Unknown: "Невідомо", Provider: "Постачальник", Model: "Модель" },
|
|
93
|
+
tr: { "Created by": "Oluşturan", Unknown: "Bilinmiyor", Provider: "Sağlayıcı", Model: "Model" },
|
|
94
|
+
th: { "Created by": "สร้างโดย", Unknown: "ไม่ทราบ", Provider: "ผู้ให้บริการ", Model: "โมเดล" },
|
|
95
|
+
it: { "Created by": "Creato da", Unknown: "Sconosciuto", Provider: "Fornitore", Model: "Modello" },
|
|
96
|
+
hi: { "Created by": "निर्माता", Unknown: "अज्ञात", Provider: "प्रदाता", Model: "मॉडल" },
|
|
97
|
+
ur: { "Created by": "تخلیق کنندہ", Unknown: "نامعلوم", Provider: "فراہم کنندہ", Model: "ماڈل" },
|
|
98
|
+
bn: { "Created by": "তৈরি করেছেন", Unknown: "অজানা", Provider: "প্রদানকারী", Model: "মডেল" },
|
|
99
99
|
};
|
|
100
100
|
/** Trash tab empty state (owner, 2026-10-23) and its Restore button. */
|
|
101
101
|
export const MEDIA_TRASH_STRINGS = {
|
|
@@ -115,6 +115,13 @@ export interface Base64FileReader {
|
|
|
115
115
|
onload: (() => void) | null;
|
|
116
116
|
readAsDataURL(file: Blob): void;
|
|
117
117
|
}
|
|
118
|
+
/** Trusted fallback only when the browser supplied no diagnostic; browser errors stay private. */
|
|
119
|
+
export declare class MediaFileReadFailure extends Error {
|
|
120
|
+
readonly messageKey = "failed to read file";
|
|
121
|
+
constructor({ cause }: {
|
|
122
|
+
cause: unknown;
|
|
123
|
+
}, _optional?: {});
|
|
124
|
+
}
|
|
118
125
|
/** Reads a browser `File` into a base64 string (no data: URL prefix).
|
|
119
126
|
* @param optional.createReader - Builds the reader; defaults to the browser's `FileReader`. */
|
|
120
127
|
export declare function readFileAsBase64({ file }: {
|