@gradio/core 0.27.2 → 0.29.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/src/init.js CHANGED
@@ -3,6 +3,7 @@ import { dequal } from "dequal";
3
3
  import { load_component } from "virtual:component-loader";
4
4
  import { create_loading_status_store } from "./stores";
5
5
  import { _ } from "svelte-i18n";
6
+ import { i18n_marker } from "./i18n";
6
7
  let pending_updates = [];
7
8
  const is_browser = typeof window !== "undefined";
8
9
  const raf = is_browser
@@ -32,13 +33,12 @@ export function create_components({ initial_layout = undefined } = {
32
33
  function value_change(cb) {
33
34
  value_change_cb = cb;
34
35
  }
35
- // Store current layout and root for dynamic visibility recalculation
36
36
  let current_layout;
37
37
  let current_root;
38
38
  function set_event_specific_args(dependencies) {
39
39
  dependencies.forEach((dep) => {
40
40
  dep.targets.forEach((target) => {
41
- const instance = instance_map[target[0]];
41
+ const instance = instance_map?.[target[0]];
42
42
  if (instance && dep.event_specific_args?.length > 0) {
43
43
  dep.event_specific_args?.forEach((arg) => {
44
44
  instance.props[arg] = dep[arg];
@@ -48,14 +48,11 @@ export function create_components({ initial_layout = undefined } = {
48
48
  });
49
49
  }
50
50
  async function create_layout({ app: _app, components, layout, dependencies, root, options }) {
51
- // make sure the state is settled before proceeding
52
51
  flush();
53
52
  app = _app;
54
53
  if (instance_map) {
55
- // re-render in reload mode
56
54
  components.forEach((c) => {
57
55
  if (c.props.value == null && c.key) {
58
- // If the component has a key, we preserve its value by finding a matching instance with the same key
59
56
  const matching_instance = Object.values(instance_map).find((instance) => instance.key === c.key);
60
57
  if (matching_instance) {
61
58
  c.props.value = matching_instance.props.value;
@@ -70,13 +67,16 @@ export function create_components({ initial_layout = undefined } = {
70
67
  constructor_map = new Map();
71
68
  _component_map = new Map();
72
69
  instance_map = {};
73
- // Store current layout and root for dynamic visibility recalculation
74
70
  current_layout = layout;
75
71
  current_root = root;
76
72
  _rootNode = {
77
73
  id: layout.id,
78
74
  type: "column",
79
- props: { interactive: false, scale: options.fill_height ? 1 : null },
75
+ props: {
76
+ interactive: false,
77
+ scale: options.fill_height ? 1 : null,
78
+ visible: true
79
+ },
80
80
  has_modes: false,
81
81
  instance: null,
82
82
  component: null,
@@ -133,7 +133,7 @@ export function create_components({ initial_layout = undefined } = {
133
133
  get_inputs_outputs(dep, inputs, outputs);
134
134
  });
135
135
  target_map.set(_target_map);
136
- let current_element = instance_map[layout.id];
136
+ let current_element = instance_map?.[layout.id];
137
137
  let all_current_children = [];
138
138
  const add_to_current_children = (component) => {
139
139
  all_current_children.push(component);
@@ -149,7 +149,7 @@ export function create_components({ initial_layout = undefined } = {
149
149
  if (component.rendered_in === render_id) {
150
150
  let replacement_component = replacement_components.find((c) => c.key === component.key);
151
151
  if (component.key != null && replacement_component !== undefined) {
152
- const instance = instance_map[component.id];
152
+ const instance = instance_map?.[component.id];
153
153
  for (const prop in replacement_component.props) {
154
154
  if (!replacement_component.props.preserved_by_key?.includes(prop)) {
155
155
  instance.props[prop] = replacement_component.props[prop];
@@ -157,20 +157,21 @@ export function create_components({ initial_layout = undefined } = {
157
157
  }
158
158
  }
159
159
  else {
160
- delete instance_map[_id];
160
+ if (instance_map)
161
+ delete instance_map[_id];
161
162
  if (_component_map.has(_id)) {
162
163
  _component_map.delete(_id);
163
164
  }
164
165
  }
165
166
  }
166
167
  });
167
- const components_to_add = new_components.concat(replacement_components.filter((c) => !instance_map[c.id]));
168
+ const components_to_add = new_components.concat(replacement_components.filter((c) => !instance_map?.[c.id]));
168
169
  components_to_add.forEach((c) => {
169
170
  instance_map[c.id] = c;
170
171
  _component_map.set(c.id, c);
171
172
  });
172
173
  if (current_element.parent) {
173
- current_element.parent.children[current_element.parent.children.indexOf(current_element)] = instance_map[layout.id];
174
+ current_element.parent.children[current_element.parent.children.indexOf(current_element)] = instance_map?.[layout.id];
174
175
  }
175
176
  walk_layout(layout, root, _components.concat(components), current_element.parent).then(() => {
176
177
  layout_store.set(_rootNode);
@@ -181,7 +182,7 @@ export function create_components({ initial_layout = undefined } = {
181
182
  set_event_specific_args(dependencies);
182
183
  }
183
184
  async function walk_layout(node, root, components, parent) {
184
- const instance = instance_map[node.id];
185
+ const instance = instance_map?.[node.id];
185
186
  if (!instance.component) {
186
187
  const constructor_key = instance.component_class_id || instance.type;
187
188
  let component_constructor = constructor_map.get(constructor_key);
@@ -202,9 +203,10 @@ export function create_components({ initial_layout = undefined } = {
202
203
  if (node.children) {
203
204
  instance.children = await Promise.all(node.children.map((v) => walk_layout(v, root, components, instance)));
204
205
  }
205
- if (instance.type === "tabs" && !instance.props.initial_tabs) {
206
+ if ((instance.type === "tabs" && !instance.props.initial_tabs) ||
207
+ (instance.type === "walkthrough" && !instance.props.initial_tabs)) {
206
208
  const tab_items_props = node.children?.map((c, i) => {
207
- const instance = instance_map[c.id];
209
+ const instance = instance_map?.[c.id];
208
210
  instance.props.id ??= c.id;
209
211
  return {
210
212
  type: instance.type,
@@ -215,18 +217,22 @@ export function create_components({ initial_layout = undefined } = {
215
217
  }
216
218
  };
217
219
  }) || [];
218
- const child_tab_items = tab_items_props.filter((child) => child.type === "tabitem");
220
+ const _type = instance.type === "walkthrough" ? "walkthroughstep" : "tabitem";
221
+ const child_tab_items = tab_items_props.filter((child) => child.type === _type);
219
222
  instance.props.initial_tabs = child_tab_items?.map((child) => ({
220
- label: child.props.label,
223
+ label: child.props.label.includes(i18n_marker) ? "" : child.props.label,
221
224
  id: child.props.id,
222
- visible: typeof child.props.visible === "boolean" ? child.props.visible : true,
225
+ visible: typeof child.props.visible === "boolean" ||
226
+ child.props.visible === "hidden"
227
+ ? child.props.visible
228
+ : true,
223
229
  interactive: child.props.interactive,
224
230
  order: child.props.order
225
231
  }));
226
232
  }
227
- if (instance.type === "tabs") {
233
+ if (instance.type === "tabs" || instance.type === "walkthrough") {
228
234
  node.children?.forEach((c, i) => {
229
- const child = instance_map[c.id];
235
+ const child = instance_map?.[c.id];
230
236
  child.props.order = i;
231
237
  });
232
238
  }
@@ -244,7 +250,6 @@ export function create_components({ initial_layout = undefined } = {
244
250
  const components_to_load = components.filter((c) => newly_visible_ids.has(c.id));
245
251
  for (const component of components_to_load) {
246
252
  const constructor_key = component.component_class_id || component.type;
247
- // Only load if not already loaded
248
253
  if (!constructor_map.has(constructor_key)) {
249
254
  const { component: loadable_component, example_components } = get_component(component.type, component.component_class_id, current_root, components);
250
255
  constructor_map.set(constructor_key, loadable_component);
@@ -253,7 +258,6 @@ export function create_components({ initial_layout = undefined } = {
253
258
  constructor_map.set(name, example_component);
254
259
  }
255
260
  }
256
- // Load the component if it doesn't exist yet
257
261
  if (!component.component) {
258
262
  component.component = (await loadable_component)?.default;
259
263
  }
@@ -272,13 +276,11 @@ export function create_components({ initial_layout = undefined } = {
272
276
  */
273
277
  function has_visibility_changes(updates) {
274
278
  return updates.some((update_batch) => update_batch.some((update) => {
275
- const instance = instance_map[update.id];
279
+ const instance = instance_map?.[update.id];
276
280
  if (!instance)
277
281
  return false;
278
- // Check for visibility property changes
279
282
  if (update.prop === "visible")
280
283
  return true;
281
- // Check for selected tab changes in tabs components
282
284
  if (update.prop === "selected" && instance.type === "tabs")
283
285
  return true;
284
286
  return false;
@@ -290,7 +292,6 @@ export function create_components({ initial_layout = undefined } = {
290
292
  const all_components = _component_map
291
293
  ? [..._component_map.values()]
292
294
  : _components;
293
- // Capture current visibility state before applying updates
294
295
  if (had_visibility_changes && current_layout) {
295
296
  previous_visible_ids = determine_visible_components(current_layout, all_components);
296
297
  }
@@ -300,7 +301,7 @@ export function create_components({ initial_layout = undefined } = {
300
301
  const update = pending_updates[i][j];
301
302
  if (!update)
302
303
  continue;
303
- const instance = instance_map[update.id];
304
+ const instance = instance_map?.[update.id];
304
305
  if (!instance)
305
306
  continue;
306
307
  let new_value;
@@ -327,20 +328,16 @@ export function create_components({ initial_layout = undefined } = {
327
328
  }
328
329
  return layout;
329
330
  });
330
- // After applying updates, check if we need to load new components
331
331
  if (had_visibility_changes && current_layout && previous_visible_ids) {
332
332
  raf(async () => {
333
333
  const new_visible_ids = determine_visible_components(current_layout, all_components);
334
334
  const newly_visible_ids = new Set();
335
- // Find components that are now visible but weren't before
336
335
  for (const id of new_visible_ids) {
337
336
  if (!previous_visible_ids.has(id)) {
338
337
  newly_visible_ids.add(id);
339
338
  }
340
339
  }
341
- // Load the newly visible components
342
340
  await load_newly_visible_components(newly_visible_ids, all_components);
343
- // Trigger a layout update to render the newly loaded components
344
341
  if (newly_visible_ids.size > 0) {
345
342
  layout_store.update((layout) => layout);
346
343
  }
@@ -599,12 +596,10 @@ function is_tab_item_visible(component, component_visible, parent_tabs_context)
599
596
  * @returns The selected tab ID
600
597
  */
601
598
  function get_selected_tab_id(component, layout, components) {
602
- // Check if selected prop is a string or number
603
599
  const selected = component.props.selected;
604
600
  if (typeof selected === "string" || typeof selected === "number") {
605
601
  return selected;
606
602
  }
607
- // If no tab is explicitly selected, find the first visible and interactive tab
608
603
  if (layout.children) {
609
604
  for (const child of layout.children) {
610
605
  const child_component = components.find((c) => c.id === child.id);
@@ -648,44 +643,32 @@ function determine_visible_components(layout, components, parent_visible = true,
648
643
  if (!component) {
649
644
  return visible_components;
650
645
  }
651
- // Check if the component itself is visible
652
- const component_visible = parent_visible &&
653
- (typeof component.props.visible === "boolean"
654
- ? component.props.visible
655
- : true);
656
- // Handle tab_item special case
657
- if (component.type === "tabitem") {
658
- if (is_tab_item_visible(component, component_visible, parent_tabs_context)) {
659
- visible_components.add(component.id);
660
- // Process children if this tab item is visible
661
- const child_visible = process_children_visibility(layout, components, parent_tabs_context);
662
- child_visible.forEach((id) => visible_components.add(id));
663
- }
664
- // If tab item is not visible, none of its children should be loaded
646
+ const component_visible = component.props.visible !== false &&
647
+ component.props.visible !== "hidden" &&
648
+ parent_visible;
649
+ const should_load = component.props.visible === "hidden" || component_visible;
650
+ if (!should_load) {
665
651
  return visible_components;
666
652
  }
667
- // Handle tabs component
668
653
  if (component.type === "tabs") {
669
- if (component_visible) {
670
- visible_components.add(component.id);
671
- // Determine which tab should be selected
672
- const selected_tab_id = get_selected_tab_id(component, layout, components);
673
- // Process children with tabs context
674
- const child_visible = process_children_visibility(layout, components, {
675
- selected_tab_id
676
- });
654
+ const selected_tab_id = get_selected_tab_id(component, layout, components);
655
+ const tabs_context = { selected_tab_id };
656
+ visible_components.add(layout.id);
657
+ const child_visible = process_children_visibility(layout, components, tabs_context);
658
+ child_visible.forEach((id) => visible_components.add(id));
659
+ }
660
+ else if (component.type === "tabitem") {
661
+ if (is_tab_item_visible(component, component_visible, parent_tabs_context)) {
662
+ visible_components.add(layout.id);
663
+ const child_visible = process_children_visibility(layout, components, parent_tabs_context);
677
664
  child_visible.forEach((id) => visible_components.add(id));
678
665
  }
679
- return visible_components;
680
666
  }
681
- // For regular components
682
- if (component_visible) {
683
- visible_components.add(component.id);
684
- // Process children if this component is visible
667
+ else {
668
+ visible_components.add(layout.id);
685
669
  const child_visible = process_children_visibility(layout, components, parent_tabs_context);
686
670
  child_visible.forEach((id) => visible_components.add(id));
687
671
  }
688
- // If component is not visible, don't process children
689
672
  return visible_components;
690
673
  }
691
674
  /**
@@ -697,9 +680,7 @@ function determine_visible_components(layout, components, parent_visible = true,
697
680
  */
698
681
  export function preload_visible_components(components, layout, root) {
699
682
  let constructor_map = new Map();
700
- // Determine which components should be visible
701
683
  const visible_component_ids = determine_visible_components(layout, components);
702
- // Only preload visible components
703
684
  components.forEach((c) => {
704
685
  if (visible_component_ids.has(c.id)) {
705
686
  const { component, example_components } = get_component(c.type, c.component_class_id, root, components);
@@ -733,6 +714,9 @@ export function preload_all_components(components, root) {
733
714
  return constructor_map;
734
715
  }
735
716
  function is_visible(component) {
717
+ if (component.props.visible === "hidden") {
718
+ return true;
719
+ }
736
720
  if (typeof component.props.visible === "boolean" &&
737
721
  component.props.visible === false) {
738
722
  return false;
@@ -2,7 +2,7 @@
2
2
  "_name": "العربية",
3
3
  "3D_model": {
4
4
  "3d_model": "نموذج ثلاثي الأبعاد",
5
- "drop_to_upload": "اسقط ملف نموذج 3D (.obj، .glb، .stl، .gltf، .splat، أو .ply) هنا للتحميل"
5
+ "drop_to_upload": "اسقط ملف نموذج ثلاثي الأبعاد 3D (.obj، .glb، .stl، .gltf، .splat، أو .ply) هنا للتحميل"
6
6
  },
7
7
  "annotated_image": {
8
8
  "annotated_image": "صورة مشروحة"
@@ -23,10 +23,10 @@
23
23
  "drop_to_upload": "اسقط ملف صوت هنا للتحميل"
24
24
  },
25
25
  "blocks": {
26
- "connection_can_break": "على الهاتف المحمول، يمكن أن ينقطع الاتصال إذا تم تغيير التبويب أو دخل الجهاز في وضع السكون، مما يؤدي إلى فقدان موقعك في قائمة الانتظار.",
27
- "long_requests_queue": "هناك قائمة انتظار طويلة من الطلبات المعلقة. قم بتكرار هذا الفضاء للتخطي.",
28
- "lost_connection": "فقد الاتصال بسبب مغادرة الصفحة. إعادة الانضمام إلى قائمة الانتظار...",
29
- "waiting_for_inputs": "انتظار انتهاء تحميل الملف(ات)، يرجى إعادة المحاولة."
26
+ "connection_can_break": "على الهاتف المحمول، يمكن أن ينقطع الاتصال إذا تم تغيير التبويب لهذه الصفحةة أو دخل الجهاز في وضع السكون، مما يؤدي إلى فقدان موقعك في قائمة الانتظار.",
27
+ "long_requests_queue": "هناك قائمة انتظار طويلة من الطلبات المعلقة. قم بنسخ هذه المساحة للتخطي.",
28
+ "lost_connection": "تم فقدان الاتصال بسبب مغادرة الصفحة. جارٍ إعادة الانضمام إلى قائمة الانتظار...",
29
+ "waiting_for_inputs": "إنتظر انتهاء رفع الملف(ات)، يرجى إعادة المحاولة."
30
30
  },
31
31
  "checkbox": {
32
32
  "checkbox": "خانة اختيار",
@@ -40,9 +40,9 @@
40
40
  },
41
41
  "common": {
42
42
  "built_with": "بُني باستخدام",
43
- "built_with_gradio": "تم الإنشاء بإستخدام Gradio",
43
+ "built_with_gradio": "بني بإستخدام Gradio",
44
44
  "clear": "أمسح",
45
- "download": "تحميل",
45
+ "download": "تنزيل",
46
46
  "edit": "تعديل",
47
47
  "empty": "فارغ",
48
48
  "error": "خطأ",
@@ -58,7 +58,12 @@
58
58
  "no_devices": "لم يتم العثور على أجهزة",
59
59
  "language": "اللغة",
60
60
  "display_theme": "مظهر العرض",
61
- "pwa": "تطبيق ويب تقدمي"
61
+ "pwa": "تطبيق ويب تقدمي",
62
+ "record": "تسجيل",
63
+ "stop_recording": "إيقاف التسجيل",
64
+ "screen_studio": "شاشة الأستوديو",
65
+ "share_gradio_tab": "مشاركة تبويبة صفحة Gradio",
66
+ "run": "تشغيل"
62
67
  },
63
68
  "dataframe": {
64
69
  "incorrect_format": "تنسيق غير صحيح، يتم دعم ملفات CSV و TSV فقط",
@@ -73,8 +78,10 @@
73
78
  "sort_column": "فرز العمود",
74
79
  "sort_ascending": "فرز تصاعدي",
75
80
  "sort_descending": "فرز تنازلي",
76
- "drop_to_upload": "اسقط ملفات CSV أو TSV هنا لاستيراد البيانات إلى الإطار الجدولية",
77
- "clear_sort": "مسح الترتيب"
81
+ "drop_to_upload": "اسقط ملفات CSV أو TSV هنا لاستيراد البيانات إلى الإطر الجدولية",
82
+ "clear_sort": "مسح الترتيب",
83
+ "filter": "مرشح",
84
+ "clear_filter": "مسح المرشحات"
78
85
  },
79
86
  "dropdown": {
80
87
  "dropdown": "قائمة منسدلة"
@@ -82,18 +89,19 @@
82
89
  "errors": {
83
90
  "build_error": "هناك خطأ في البناء",
84
91
  "config_error": "هناك خطأ في التكوين",
85
- "contact_page_author": "يرجى الاتصال بمؤلف الصفحة",
92
+ "contact_page_author": "يرجى التواصل مع مبرمج الصفحة",
86
93
  "no_app_file": "لا يوجد ملف تطبيق",
87
- "runtime_error": "هناك خطأ في وقت التشغيل",
94
+ "runtime_error": "هناك خطأ أثناء التشغيل",
88
95
  "space_not_working": "المساحة لا تعمل لأن {0}",
89
96
  "space_paused": "المساحة متوقفة مؤقتًا",
90
- "use_via_api": "استخدم عبر API"
97
+ "use_via_api": "إستخدام عبر API",
98
+ "use_via_api_or_mcp": "إستخدام عبر واجهة برمجة التطبيقات API أو خادم MCP"
91
99
  },
92
100
  "file": {
93
101
  "uploading": "جاري الرفع..."
94
102
  },
95
103
  "highlighted_text": {
96
- "highlighted_text": "نص مميز"
104
+ "highlighted_text": "نص محدد"
97
105
  },
98
106
  "image": {
99
107
  "allow_webcam_access": "يرجى السماح بالوصول إلى كاميرا الويب للتسجيل.",
@@ -0,0 +1,154 @@
1
+ {
2
+ "_name": "Bahasa Indonesia",
3
+ "3D_model": {
4
+ "3d_model": "Model 3D",
5
+ "drop_to_upload": "Letakkan file model 3D (.obj, .glb, .stl, .gltf, .splat, atau .ply) di sini untuk mengunggah"
6
+ },
7
+ "annotated_image": {
8
+ "annotated_image": "Gambar Beranotasi"
9
+ },
10
+ "audio": {
11
+ "allow_recording_access": "Mohon izinkan akses ke mikrofon untuk merekam.",
12
+ "audio": "Audio",
13
+ "record_from_microphone": "Rekam dari mikrofon",
14
+ "stop_recording": "Hentikan rekaman",
15
+ "no_device_support": "Perangkat media tidak dapat diakses. Pastikan Anda menjalankan dari sumber yang aman (https) atau localhost (atau Anda telah meneruskan sertifikat SSL yang valid ke ssl_verify), dan Anda telah mengizinkan akses browser ke perangkat Anda.",
16
+ "stop": "Berhenti",
17
+ "resume": "Lanjutkan",
18
+ "record": "Rekam",
19
+ "no_microphone": "Tidak ada mikrofon yang ditemukan",
20
+ "pause": "Jeda",
21
+ "play": "Putar",
22
+ "waiting": "Menunggu",
23
+ "drop_to_upload": "Letakkan file audio di sini untuk mengunggah"
24
+ },
25
+ "blocks": {
26
+ "connection_can_break": "Di perangkat seluler, koneksi dapat terputus jika tab ini tidak dalam fokus atau perangkat dalam mode tidur, sehingga Anda kehilangan posisi dalam antrian.",
27
+ "long_requests_queue": "Ada antrian panjang dari permintaan yang tertunda. Gandakan Ruang ini untuk melompati antrian.",
28
+ "lost_connection": "Koneksi terputus karena meninggalkan halaman. Bergabung kembali ke antrian...",
29
+ "waiting_for_inputs": "Menunggu file selesai diunggah, mohon coba lagi."
30
+ },
31
+ "checkbox": {
32
+ "checkbox": "Kotak centang",
33
+ "checkbox_group": "Grup kotak centang"
34
+ },
35
+ "code": {
36
+ "code": "Kode"
37
+ },
38
+ "color_picker": {
39
+ "color_picker": "Pemilih Warna"
40
+ },
41
+ "common": {
42
+ "built_with": "dibuat dengan",
43
+ "built_with_gradio": "Dibuat dengan Gradio",
44
+ "clear": "Bersihkan",
45
+ "download": "Unduh",
46
+ "edit": "Edit",
47
+ "empty": "Kosong",
48
+ "error": "Error",
49
+ "hosted_on": "Di-hosting di",
50
+ "loading": "Memuat",
51
+ "logo": "logo",
52
+ "or": "atau",
53
+ "remove": "Hapus",
54
+ "settings": "Pengaturan",
55
+ "share": "Bagikan",
56
+ "submit": "Kirim",
57
+ "undo": "Urungkan",
58
+ "no_devices": "Tidak ada perangkat yang ditemukan",
59
+ "language": "Bahasa",
60
+ "display_theme": "Tema Tampilan",
61
+ "pwa": "Aplikasi Web Progresif"
62
+ },
63
+ "dataframe": {
64
+ "incorrect_format": "Format salah, hanya file CSV dan TSV yang didukung",
65
+ "new_column": "Tambah kolom",
66
+ "new_row": "Baris baru",
67
+ "add_row_above": "Tambah baris di atas",
68
+ "add_row_below": "Tambah baris di bawah",
69
+ "add_column_left": "Tambah kolom ke kiri",
70
+ "add_column_right": "Tambah kolom ke kanan",
71
+ "delete_row": "Hapus baris",
72
+ "delete_column": "Hapus kolom",
73
+ "sort_column": "Urutkan kolom",
74
+ "sort_ascending": "Urutkan menaik",
75
+ "sort_descending": "Urutkan menurun",
76
+ "drop_to_upload": "Letakkan file CSV atau TSV di sini untuk mengimpor data ke dataframe",
77
+ "clear_sort": "Bersihkan pengurutan"
78
+ },
79
+ "dropdown": {
80
+ "dropdown": "Dropdown"
81
+ },
82
+ "errors": {
83
+ "build_error": "ada error saat membangun",
84
+ "config_error": "ada error konfigurasi",
85
+ "contact_page_author": "Mohon hubungi penulis halaman untuk memberitahu mereka.",
86
+ "no_app_file": "tidak ada file aplikasi",
87
+ "runtime_error": "ada error runtime",
88
+ "space_not_working": "\"Ruang tidak berfungsi karena\" {0}",
89
+ "space_paused": "ruang sedang dijeda",
90
+ "use_via_api": "Gunakan melalui API"
91
+ },
92
+ "file": {
93
+ "uploading": "Mengunggah..."
94
+ },
95
+ "highlighted_text": {
96
+ "highlighted_text": "Teks yang Disorot"
97
+ },
98
+ "image": {
99
+ "allow_webcam_access": "Mohon izinkan akses ke webcam untuk merekam.",
100
+ "brush_color": "Warna kuas",
101
+ "brush_radius": "Radius kuas",
102
+ "image": "Gambar",
103
+ "remove_image": "Hapus Gambar",
104
+ "select_brush_color": "Pilih warna kuas",
105
+ "start_drawing": "Mulai menggambar",
106
+ "use_brush": "Gunakan kuas",
107
+ "drop_to_upload": "Letakkan file gambar di sini untuk mengunggah"
108
+ },
109
+ "label": {
110
+ "label": "Label"
111
+ },
112
+ "login": {
113
+ "enable_cookies": "Jika Anda mengunjungi Ruang HuggingFace dalam mode Penyamaran, Anda harus mengaktifkan cookie pihak ketiga.",
114
+ "incorrect_credentials": "Kredensial salah",
115
+ "username": "nama pengguna",
116
+ "password": "kata sandi",
117
+ "login": "Masuk"
118
+ },
119
+ "number": {
120
+ "number": "Nomor"
121
+ },
122
+ "plot": {
123
+ "plot": "Plot"
124
+ },
125
+ "radio": {
126
+ "radio": "Tombol Radio"
127
+ },
128
+ "slider": {
129
+ "slider": "Penggeser"
130
+ },
131
+ "upload_text": {
132
+ "click_to_upload": "Klik untuk Mengunggah",
133
+ "drop_audio": "Letakkan Audio di Sini",
134
+ "drop_csv": "Letakkan CSV di Sini",
135
+ "drop_file": "Letakkan File di Sini",
136
+ "drop_image": "Letakkan Gambar di Sini",
137
+ "drop_video": "Letakkan Video di Sini",
138
+ "drop_gallery": "Letakkan Media di Sini",
139
+ "paste_clipboard": "Tempel dari Papan Klip"
140
+ },
141
+ "video": {
142
+ "drop_to_upload": "Letakkan file video di sini untuk mengunggah"
143
+ },
144
+ "chatbot": {
145
+ "edit": "Edit",
146
+ "retry": "Coba lagi",
147
+ "undo": "Urungkan",
148
+ "submit": "Kirim",
149
+ "cancel": "Batal",
150
+ "like": "Suka",
151
+ "dislike": "Tidak Suka",
152
+ "clear": "Bersihkan obrolan"
153
+ }
154
+ }
@@ -0,0 +1,6 @@
1
+ export interface NavbarConfig {
2
+ visible?: boolean;
3
+ main_page_name?: string | false;
4
+ value?: [string, string][] | null;
5
+ }
6
+ export declare const navbar_config: import("svelte/store").Writable<NavbarConfig | null>;
@@ -0,0 +1,2 @@
1
+ import { writable } from "svelte/store";
2
+ export const navbar_config = writable(null);
@@ -17,6 +17,7 @@ export interface LoadingStatus {
17
17
  unit: string | null;
18
18
  desc: string | null;
19
19
  }[];
20
+ validation_error?: string | null;
20
21
  }
21
22
  export type LoadingStatusCollection = Record<number, LoadingStatus>;
22
23
  interface LoadingStatusStore {
@@ -25,6 +26,7 @@ interface LoadingStatusStore {
25
26
  register: (index: number, inputs: number[], outputs: number[]) => void;
26
27
  get_status_for_fn: (i: number) => LoadingStatus["status"];
27
28
  get_inputs_to_update: () => Map<number, string>;
29
+ update_component_status: (index: number, status: Partial<LoadingStatus>) => void;
28
30
  }
29
31
  export declare function create_loading_status_store(): LoadingStatusStore;
30
32
  export type LoadingStatusType = ReturnType<typeof create_loading_status_store>;
@@ -79,8 +79,18 @@ export function create_loading_status_store() {
79
79
  fn_inputs[index] = inputs;
80
80
  fn_outputs[index] = outputs;
81
81
  }
82
+ function update_component_status(index, status) {
83
+ store.update((outputs) => {
84
+ outputs[index] = {
85
+ ...outputs[index],
86
+ ...status
87
+ };
88
+ return outputs;
89
+ });
90
+ }
82
91
  return {
83
92
  update,
93
+ update_component_status,
84
94
  register,
85
95
  subscribe: store.subscribe,
86
96
  get_status_for_fn(i) {
@@ -1,7 +1,6 @@
1
1
  import type { StoryObj } from "@storybook/svelte";
2
2
  import I18nMultiLanguageTestComponent from "./I18nMultiLanguageTestComponent.svelte";
3
3
  declare const meta: {
4
- title: string;
5
4
  component: typeof I18nMultiLanguageTestComponent;
6
5
  parameters: {
7
6
  layout: string;
@@ -1,6 +1,6 @@
1
1
  import I18nMultiLanguageTestComponent from "./I18nMultiLanguageTestComponent.svelte";
2
2
  const meta = {
3
- title: "Core/I18n Multi-Language Test",
3
+ // title: "Core/I18n Multi-Language Test",
4
4
  component: I18nMultiLanguageTestComponent,
5
5
  parameters: {
6
6
  layout: "centered"
@@ -7,6 +7,7 @@ interface SharedProps {
7
7
  components?: string[];
8
8
  server_fns?: string[];
9
9
  interactive: boolean;
10
+ visible: boolean | "hidden";
10
11
  [key: string]: unknown;
11
12
  }
12
13
  /** The metadata for a component